Changeset 17638 in osm for applications/editors


Ignore:
Timestamp:
2009-09-15T17:22:06+02:00 (15 years ago)
Author:
guggis
Message:

Removed compatibility mode with older JOSM version

Location:
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor
Files:
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog.java

    r16574 r17638  
    4343import org.openstreetmap.josm.plugins.tageditor.tagspec.ui.ITagSelectorListener;
    4444import org.openstreetmap.josm.plugins.tageditor.tagspec.ui.TabularTagSelector;
    45 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;
    4645/**
    4746 * The dialog for editing name/value-pairs (aka <em>tags</em>) associated with {@link OsmPrimitive}s.
     
    345344                        model.updateJOSMSelection();
    346345
    347                         Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();
     346                        Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected();
    348347                        DataSet.fireSelectionChanged(sel);
    349348                        Main.parent.repaint(); // repaint all - drawing could have been changed
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionCache.java

    r16848 r17638  
    11package org.openstreetmap.josm.plugins.tageditor.ac;
    2 
    3 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;
    42
    53import java.util.ArrayList;
     
    86import java.util.List;
    97
     8import org.openstreetmap.josm.Main;
    109import org.openstreetmap.josm.data.osm.OsmPrimitive;
    1110/**
     
    8483        public void initFromJOSMDataset() {
    8584                cache = new HashMap<String, ArrayList<String>>();
    86                 Collection<OsmPrimitive> ds = getCurrentDataSet().allNonDeletedPrimitives();
     85                Collection<OsmPrimitive> ds = Main.main.getCurrentDataSet().allNonDeletedPrimitives();
    8786                for (OsmPrimitive primitive : ds) {
    8887                        cachePrimitive(primitive);
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionContext.java

    r16848 r17638  
    11package org.openstreetmap.josm.plugins.tageditor.ac;
    22
    3 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;
     3import org.openstreetmap.josm.Main;
     4
    45
    56public class AutoCompletionContext {
     
    1415
    1516        public void initFromJOSMSelection() {
    16                 selectionIncludesNodes = ! getCurrentDataSet().getSelectedNodes().isEmpty();
    17                 selectionIncludesWays = !getCurrentDataSet().getSelectedWays().isEmpty();
    18                 selectionIncludesRelations = !getCurrentDataSet().getSelectedRelations().isEmpty();
    19                 selectionEmpty = (getCurrentDataSet().getSelected().size() == 0);
     17                selectionIncludesNodes = ! Main.main.getCurrentDataSet().getSelectedNodes().isEmpty();
     18                selectionIncludesWays = !Main.main.getCurrentDataSet().getSelectedWays().isEmpty();
     19                selectionIncludesRelations = !Main.main.getCurrentDataSet().getSelectedRelations().isEmpty();
     20                selectionEmpty = (Main.main.getCurrentDataSet().getSelected().size() == 0);
    2021        }
    2122
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer.java

    r16848 r17638  
    3939        private ArrayList<IAutoCompletionListListener> listener = null;
    4040       
    41        
    4241        /**
    4342         * creates the GUI
     
    5352                //
    5453                if (autoCompletionList == null) {
    55                         logger.info("setting model to default model");
     54                        //logger.info("setting model to default model");
    5655                        table.setModel(new DefaultTableModel());
    5756                } else {
    58                         logger.info("setting model to " + autoCompletionList);
     57                        //logger.info("setting model to " + autoCompletionList);
    5958                        table.setModel(autoCompletionList);
    6059                }
     
    9089                                }
    9190                );
    92 
    93 
    9491        }
    95        
    9692       
    9793        /**
     
    107103        }
    108104       
    109        
    110105        /**
    111106         * constructor
     
    116111                listener = new ArrayList<IAutoCompletionListListener>();
    117112        }
    118 
    119113
    120114        /**
     
    160154        }
    161155    }
    162 
    163 
    164156       
    165157        /**
     
    189181        }
    190182       
    191        
    192183        /**
    193184         * notifies listeners about a selected item in the auto completion list 
     
    201192        }       
    202193       
    203        
    204194        public void installKeyAction(Action a) {
    205195                getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW).put((KeyStroke)a.getValue(AbstractAction.ACCELERATOR_KEY), a.getValue(AbstractAction.NAME));
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java

    r16919 r17638  
    2323import org.openstreetmap.josm.plugins.tageditor.preset.Tag;
    2424import org.openstreetmap.josm.plugins.tageditor.tagspec.KeyValuePair;
    25 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;
    2625
    2726/**
     
    273272         */
    274273        public void initFromJOSMSelection() {
    275                 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
     274                Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected();
    276275                clear();
    277276                for (OsmPrimitive element : selection) {
     
    354353        public void updateJOSMSelection() {
    355354                ArrayList<Command> commands = new ArrayList<Command>();
    356                 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();
     355                Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected();
    357356                if (selection == null)
    358357                        return;
  • applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Item.java

    r16574 r17638  
    1313import org.openstreetmap.josm.Main;
    1414import org.openstreetmap.josm.plugins.tageditor.util.IndentWriter;
    15 
    16 import sun.java2d.loops.ScaledBlit;
    1715
    1816
Note: See TracChangeset for help on using the changeset viewer.