Ticket #3347: mergenodesstatic-main.patch
| File mergenodesstatic-main.patch, 2.8 KB (added by , 16 years ago) |
|---|
-
src/org/openstreetmap/josm/actions/MergeNodesAction.java
65 65 } 66 66 } 67 67 68 protected void completeTagCollectionWithMissingTags(TagCollection tc, Collection<Node> mergedNodes) {68 protected static void completeTagCollectionWithMissingTags(TagCollection tc, Collection<Node> mergedNodes) { 69 69 for (String key: tc.getKeys()) { 70 70 // make sure the empty value is in the tag set if a tag is not present 71 71 // on all merged nodes … … 81 81 tc.removeByKey("created_by"); 82 82 } 83 83 84 protected void completeTagCollectionForEditing(TagCollection tc) {84 protected static void completeTagCollectionForEditing(TagCollection tc) { 85 85 for (String key: tc.getKeys()) { 86 86 // make sure the empty value is in the tag set such that we can delete the tag 87 87 // in the conflict dialog if necessary … … 97 97 * @param candidates the collection of candidate nodes 98 98 * @return the selected target node 99 99 */ 100 public Node selectTargetNode(Collection<Node> candidates) {100 public static Node selectTargetNode(Collection<Node> candidates) { 101 101 // Find which node to merge into (i.e. which one will be left) 102 102 // - this should be combined from two things: 103 103 // 1. It will be the first node in the list that has a … … 123 123 return targetNode; 124 124 } 125 125 126 127 126 /** 128 127 * Merges the nodes in <code>node</code> onto one of the nodes. Uses the dataset 129 128 * managed by <code>layer</code> as reference. … … 135 134 * @throws IllegalArgumentException thrown if targetNode is null 136 135 * 137 136 */ 138 public Command mergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetNode) throws IllegalArgumentException{137 public static Command mergeNodes(OsmDataLayer layer, Collection<Node> nodes, Node targetNode) throws IllegalArgumentException{ 139 138 if (layer == null) 140 139 throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "nodes")); 141 140 if (targetNode == null) … … 162 161 * @throw IllegalArgumentException thrown if layer is null 163 162 * @throw IllegalArgumentException thrown if backreferences.getSource() != layer.data 164 163 */ 165 public Command mergeNodes(OsmDataLayer layer, BackreferencedDataSet backreferences, Collection<Node> nodes, Node targetNode) {164 public static Command mergeNodes(OsmDataLayer layer, BackreferencedDataSet backreferences, Collection<Node> nodes, Node targetNode) { 166 165 if (layer == null) 167 166 throw new IllegalArgumentException(tr("parameter ''{0}'' must not be null", "nodes")); 168 167 if (targetNode == null)
