Changeset 17638 in osm for applications/editors
- Timestamp:
- 2009-09-15T17:22:06+02:00 (15 years ago)
- 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 43 43 import org.openstreetmap.josm.plugins.tageditor.tagspec.ui.ITagSelectorListener; 44 44 import org.openstreetmap.josm.plugins.tageditor.tagspec.ui.TabularTagSelector; 45 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;46 45 /** 47 46 * The dialog for editing name/value-pairs (aka <em>tags</em>) associated with {@link OsmPrimitive}s. … … 345 344 model.updateJOSMSelection(); 346 345 347 Collection<OsmPrimitive> sel = getCurrentDataSet().getSelected();346 Collection<OsmPrimitive> sel = Main.main.getCurrentDataSet().getSelected(); 348 347 DataSet.fireSelectionChanged(sel); 349 348 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 1 1 package org.openstreetmap.josm.plugins.tageditor.ac; 2 3 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;4 2 5 3 import java.util.ArrayList; … … 8 6 import java.util.List; 9 7 8 import org.openstreetmap.josm.Main; 10 9 import org.openstreetmap.josm.data.osm.OsmPrimitive; 11 10 /** … … 84 83 public void initFromJOSMDataset() { 85 84 cache = new HashMap<String, ArrayList<String>>(); 86 Collection<OsmPrimitive> ds = getCurrentDataSet().allNonDeletedPrimitives();85 Collection<OsmPrimitive> ds = Main.main.getCurrentDataSet().allNonDeletedPrimitives(); 87 86 for (OsmPrimitive primitive : ds) { 88 87 cachePrimitive(primitive); -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionContext.java
r16848 r17638 1 1 package org.openstreetmap.josm.plugins.tageditor.ac; 2 2 3 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet; 3 import org.openstreetmap.josm.Main; 4 4 5 5 6 public class AutoCompletionContext { … … 14 15 15 16 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); 20 21 } 21 22 -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer.java
r16848 r17638 39 39 private ArrayList<IAutoCompletionListListener> listener = null; 40 40 41 42 41 /** 43 42 * creates the GUI … … 53 52 // 54 53 if (autoCompletionList == null) { 55 logger.info("setting model to default model");54 //logger.info("setting model to default model"); 56 55 table.setModel(new DefaultTableModel()); 57 56 } else { 58 logger.info("setting model to " + autoCompletionList);57 //logger.info("setting model to " + autoCompletionList); 59 58 table.setModel(autoCompletionList); 60 59 } … … 90 89 } 91 90 ); 92 93 94 91 } 95 96 92 97 93 /** … … 107 103 } 108 104 109 110 105 /** 111 106 * constructor … … 116 111 listener = new ArrayList<IAutoCompletionListListener>(); 117 112 } 118 119 113 120 114 /** … … 160 154 } 161 155 } 162 163 164 156 165 157 /** … … 189 181 } 190 182 191 192 183 /** 193 184 * notifies listeners about a selected item in the auto completion list … … 201 192 } 202 193 203 204 194 public void installKeyAction(Action a) { 205 195 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 23 23 import org.openstreetmap.josm.plugins.tageditor.preset.Tag; 24 24 import org.openstreetmap.josm.plugins.tageditor.tagspec.KeyValuePair; 25 import static org.openstreetmap.josm.plugins.tageditor.josm.CompatibilityUtil.getCurrentDataSet;26 25 27 26 /** … … 273 272 */ 274 273 public void initFromJOSMSelection() { 275 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();274 Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected(); 276 275 clear(); 277 276 for (OsmPrimitive element : selection) { … … 354 353 public void updateJOSMSelection() { 355 354 ArrayList<Command> commands = new ArrayList<Command>(); 356 Collection<OsmPrimitive> selection = getCurrentDataSet().getSelected();355 Collection<OsmPrimitive> selection = Main.main.getCurrentDataSet().getSelected(); 357 356 if (selection == null) 358 357 return; -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/preset/Item.java
r16574 r17638 13 13 import org.openstreetmap.josm.Main; 14 14 import org.openstreetmap.josm.plugins.tageditor.util.IndentWriter; 15 16 import sun.java2d.loops.ScaledBlit;17 15 18 16
Note:
See TracChangeset
for help on using the changeset viewer.