Changeset 32395 in osm for applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/RelationFixer.java
- Timestamp:
- 2016-06-24T09:10:57+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/reltoolbox/src/relcontext/relationfix/RelationFixer.java
r30738 r32395 1 // License: GPL. For details, see LICENSE file. 1 2 package relcontext.relationfix; 2 3 … … 20 21 /** 21 22 * Construct new RelationFixer by a list of applicable types 22 * @param types 23 * @param types types 23 24 */ 24 25 public RelationFixer(String... types) { 25 26 applicableTypes = new ArrayList<>(); 26 for(String type: types) { 27 for (String type: types) { 27 28 applicableTypes.add(type); 28 29 } … … 33 34 * and then check desired relation properties. 34 35 * Note that this only verifies if current RelationFixer can be used to check and fix given relation 35 * Deeper relation checking is at {@link isRelationGood} 36 * Deeper relation checking is at {@link #isRelationGood} 36 37 * 37 38 * @param rel Relation to check … … 45 46 46 47 String type = rel.get("type"); 47 for(String oktype: applicableTypes) 48 for (String oktype: applicableTypes) { 48 49 if (oktype.equals(type)) 49 50 return true; 51 } 50 52 51 53 return false; … … 73 75 this.sortAndFixAction = sortAndFixAction; 74 76 } 77 75 78 protected void setWarningMessage(String text) { 76 79 if (text == null) { … … 80 83 } 81 84 } 85 82 86 protected void clearWarningMessage() { 83 87 sortAndFixAction.putValue(Action.SHORT_DESCRIPTION, tr("Fix roles of the chosen relation members")); 84 88 } 85 86 89 }
Note:
See TracChangeset
for help on using the changeset viewer.
