Ignore:
Timestamp:
2013-07-24T21:45:09+02:00 (12 years ago)
Author:
akks
Message:

[josm_plugins]: move more plugin items to new menus, set minimum JOSM to 6082, add Netbeans projects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/waydownloader/src/org/openstreetmap/josm/plugins/waydownloader/WayDownloaderPlugin.java

    r27852 r29771  
    4747        super(info);
    4848        //add WayDownloadAction to tools menu
    49         MainMenu.add(Main.main.menu.toolsMenu, new WayDownloadAction());
     49        MainMenu.add(Main.main.menu.moreToolsMenu, new WayDownloadAction());
    5050    }
    5151
     
    9292
    9393        /** Called when the WayDownloadAction action is triggered (e.g. user clicked the menu option) */
     94        @Override
    9495        public void actionPerformed(ActionEvent e) {
    9596            selectedNode = null;
    9697            Collection<Node> selection = Main.main.getCurrentDataSet().getSelectedNodes();
    97             if (selection.size()==0) {
     98            if (selection.isEmpty()) {
    9899                Collection<Way> selWays = Main.main.getCurrentDataSet().getSelectedWays();
    99100                if (!workFromWaySelection(selWays)) {
     
    104105            }
    105106
    106             if ( selection.size()==0 || selection.size()>1 || ! (selection.iterator().next() instanceof Node)) {
     107            if ( selection.isEmpty() || selection.size()>1 || ! (selection.iterator().next() instanceof Node)) {
    107108                showWarningMessage(tr("<html>Could not find a unique node to start downloading from.</html>"));
    108109                return;
     
    115116            //Find connected way
    116117            List<Way> connectedWays = findConnectedWays(selectedNode);
    117             if (connectedWays.size()==0) {
     118            if (connectedWays.isEmpty()) {
    118119                showWarningMessage(
    119120                        tr("<html>There are no ways connected to node ''{0}''. Aborting.</html>",
     
    143144            Main.worker.submit(
    144145                    new Runnable() {
     146                        @Override
    145147                        public void run() {
    146148                            try {
     
    162164         * Logic to excute after the download has happened
    163165         */
     166        @Override
    164167        public void run() {
    165168            //Find ways connected to the node after the download
    166169            List<Way> connectedWays = findConnectedWays(selectedNode);
    167170
    168             if (connectedWays.size()==0) {
     171            if (connectedWays.isEmpty()) {
    169172                String msg = tr("Way downloader data inconsistency. Prior connected way ''{0}'' wasn''t discovered after download",
    170173                                priorConnectedWay.getDisplayName(DefaultNameFormatter.getInstance())
Note: See TracChangeset for help on using the changeset viewer.