Ignore:
Timestamp:
2009-10-10T23:34:39+02:00 (15 years ago)
Author:
stoecker
Message:

some cleanups

Location:
applications/editors/josm/plugins
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/dataimport/src/org/openstreetmap/josm/plugins/dataimport/DataImportPlugin.java

    r18063 r18071  
    77
    88import org.openstreetmap.josm.actions.ExtensionFileFilter;
    9 import org.openstreetmap.josm.io.TangoGPS;
    10 import org.openstreetmap.josm.io.Tcx;
     9import org.openstreetmap.josm.plugins.dataimport.io.TangoGPS;
     10import org.openstreetmap.josm.plugins.dataimport.io.Tcx;
    1111import org.openstreetmap.josm.plugins.Plugin;
    1212
  • applications/editors/josm/plugins/michigan_left/src/MichiganLeft/MichiganLeftAction.java

    r17647 r18071  
    2828public class MichiganLeftAction extends JosmAction {
    2929    private LinkedList<Command> cmds = new LinkedList<Command>();
    30    
     30
    3131    public MichiganLeftAction() {
    3232    super(tr("Michigan Left"), "michigan_left", tr("Adds no left turn for sets of 4 or 5 ways."), Shortcut.registerShortcut("tools:michigan_left", tr("Tool: {0}", tr("Michigan Left")),
     
    5050    {
    5151      // Find extremities of ways
    52       Hashtable ExtremNodes=new Hashtable();
     52      Hashtable<Node, Integer> ExtremNodes=new Hashtable<Node, Integer>();
    5353      for (OsmPrimitive prim : selection) {
    5454        if (prim instanceof Way)
     
    5959        }
    6060      }
    61       System.out.println(tr("{0} extrem nodes.", ExtremNodes.size()));     
    62      
     61      System.out.println(tr("{0} extrem nodes.", ExtremNodes.size()));
     62
    6363      ArrayList<Node> viaNodes=new ArrayList<Node>();
    6464      // find via nodes (they have 3 occurences in the list)
     
    7272          viaNodes.add(extrem);
    7373        }
    74       } 
    75       System.out.println(tr("{0} via nodes.", viaNodes.size()));     
    76  
     74      }
     75      System.out.println(tr("{0} via nodes.", viaNodes.size()));
     76
    7777      if (viaNodes.size() != 2) {
    7878        JOptionPane.showMessageDialog(Main.parent, tr("Unable to find via nodes. Please check your selection"));
    7979        return;
    8080      }
    81      
     81
    8282      Node viaFirst = viaNodes.get(0);
    8383      Node viaLast = viaNodes.get(1);      // Find middle segment
     
    9696        }
    9797      }
    98       System.out.println(tr("MIddle way: {0}", middle.getId()));       
    99          
     98      System.out.println(tr("MIddle way: {0}", middle.getId()));
     99
    100100      // Build relations
    101101      for (OsmPrimitive prim : selection) {
     
    121121      Command c = new SequenceCommand(tr("Create Michigan left turn restriction"), cmds);
    122122      Main.main.undoRedo.add(c);
    123       cmds.clear();     
     123      cmds.clear();
    124124    }
    125125  }
    126126
    127   public void incrementHashtable(Hashtable hash, Node node)
     127  public void incrementHashtable(Hashtable<Node, Integer> hash, Node node)
    128128  {
    129129    System.out.println(tr("Processing {0}", node.getId()));
     
    137137      hash.put(node, new Integer (1));
    138138  }
    139  
     139
    140140  public void buildRelation(Way fromWay, Way toWay, Node viaNode)
    141141  {
    142     System.out.println(tr("Relation: from {0} to {1} via {2}", fromWay.getId(), toWay.getId(), viaNode.getId()));       
    143    
     142    System.out.println(tr("Relation: from {0} to {1} via {2}", fromWay.getId(), toWay.getId(), viaNode.getId()));
     143
    144144    Relation relation = new Relation();
    145    
     145
    146146    RelationMember from = new RelationMember("from", fromWay);
    147147    relation.addMember(from);
    148    
     148
    149149    RelationMember to = new RelationMember("to", toWay);
    150150    relation.addMember(to);
    151    
     151
    152152    RelationMember via = new RelationMember("via", viaNode);
    153153    relation.addMember(via);
    154    
     154
    155155    relation.put("type", "restriction");
    156156    relation.put("restriction", "no_left_turn");
    157157
    158158    cmds.add(new AddCommand(relation));
    159   } 
     159  }
    160160
    161161}
  • applications/editors/josm/plugins/openstreetbugs/build.xml

    r17872 r18071  
    2626                <attribute name="Plugin-Description" value="Imports issues from OpenStreetBugs"/>
    2727                <attribute name="Plugin-Link" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/OpenStreetBugs"/>
    28                 <attribute name="Plugin-Mainversion" value="2219"/>
     28                <attribute name="Plugin-Mainversion" value="2264"/>
    2929                <attribute name="Plugin-Version" value="${version.entry.commit.revision}"/>
    3030            </manifest>
  • applications/editors/josm/plugins/openstreetbugs/src/org/openstreetmap/josm/plugins/osb/OsbLayer.java

    r17534 r18071  
    220220            }
    221221            // prefer already selected node when multiple nodes on one point
    222             else if(minDistanceSq == dist && n.isSelected() && !minPrimitive.isSelected())
     222            else if(minDistanceSq == dist && data.isSelected(n) && !data.isSelected(minPrimitive))
    223223            {
    224224                minPrimitive = n;
Note: See TracChangeset for help on using the changeset viewer.