Ignore:
Timestamp:
2017-11-21T23:49:34+01:00 (7 years ago)
Author:
donvip
Message:

update to JOSM 12630

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

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/Create_grid_of_ways

    • Property svn:ignore
      •  

        old new  
        44checkstyle-josm-Create_grid_of_ways.xml
        55findbugs-josm-Create_grid_of_ways.xml
         6spotbugs-josm-Create_grid_of_ways.xml
  • applications/editors/josm/plugins/Create_grid_of_ways/build.xml

    r32680 r33856  
    44    <property name="commit.message" value="Changed constructor signature, updated build.xml"/>
    55    <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
    6     <property name="plugin.main.version" value="10580"/>
     6    <property name="plugin.main.version" value="12630"/>
    77
    88    <!-- Configure these properties (replace "..." accordingly).
  • applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysAction.java

    r32440 r33856  
    1616import org.openstreetmap.josm.command.SequenceCommand;
    1717import org.openstreetmap.josm.data.coor.LatLon;
     18import org.openstreetmap.josm.data.osm.DataSet;
    1819import org.openstreetmap.josm.data.osm.Node;
    1920import org.openstreetmap.josm.data.osm.OsmPrimitive;
    2021import org.openstreetmap.josm.data.osm.Way;
     22import org.openstreetmap.josm.gui.MainApplication;
    2123import org.openstreetmap.josm.tools.Shortcut;
    2224
     
    4648    @Override
    4749    public void actionPerformed(ActionEvent e) {
    48         Collection<OsmPrimitive> sel = Main.getLayerManager().getEditDataSet().getSelected();
     50        DataSet ds = getLayerManager().getEditDataSet();
     51        Collection<OsmPrimitive> sel = ds.getSelected();
    4952        Collection<Node> nodesWay1 = new LinkedList<>();
    5053        Collection<Node> nodesWay2 = new LinkedList<>();
     
    9093                }
    9194                Node nodeOfGrid = new Node(new LatLon(n2.getCoor().lat()+latDif,n2.getCoor().lon()+lonDif));
    92                 cmds.add(new AddCommand(nodeOfGrid));
     95                cmds.add(new AddCommand(ds, nodeOfGrid));
    9396                w1[c1].addNode(nodeOfGrid);
    9497                w2[c2++].addNode(nodeOfGrid);
     
    98101        }
    99102        for (int c=0;c<w1.length;c++)
    100             cmds.add(new AddCommand(w1[c]));
     103            cmds.add(new AddCommand(ds, w1[c]));
    101104        for (int c=0;c<w2.length;c++)
    102             cmds.add(new AddCommand(w2[c]));
     105            cmds.add(new AddCommand(ds, w2[c]));
    103106        Main.main.undoRedo.add(new SequenceCommand(tr("Create a grid of ways"), cmds));
    104         Main.map.repaint();
     107        MainApplication.getMap().repaint();
    105108    }
    106109}
  • applications/editors/josm/plugins/Create_grid_of_ways/src/CreateGridOfWaysPlugin/CreateGridOfWaysPlugin.java

    r29771 r33856  
    11package CreateGridOfWaysPlugin;
    22
    3 import org.openstreetmap.josm.Main;
     3import org.openstreetmap.josm.gui.MainApplication;
     4import org.openstreetmap.josm.gui.MainMenu;
    45import org.openstreetmap.josm.plugins.Plugin;
    56import org.openstreetmap.josm.plugins.PluginInformation;
    6 import org.openstreetmap.josm.gui.MainMenu;
    77
    88public class CreateGridOfWaysPlugin extends Plugin {
    99    public CreateGridOfWaysPlugin(PluginInformation info) {
    1010        super(info);
    11         MainMenu.add(Main.main.menu.moreToolsMenu, new CreateGridOfWaysAction());
     11        MainMenu.add(MainApplication.getMenu().moreToolsMenu, new CreateGridOfWaysAction());
    1212    }
    1313}
Note: See TracChangeset for help on using the changeset viewer.