Changeset 14520 in osm for applications/editors
- Timestamp:
- 2009-04-16T11:04:20+02:00 (17 years ago)
- Location:
- applications/editors/josm/plugins/tageditor
- Files:
-
- 149 added
- 6 edited
-
.classpath (added)
-
.project (added)
-
.settings (added)
-
.settings/org.codehaus.groovy.eclipse.preferences.prefs (added)
-
.settings/org.eclipse.jdt.core.prefs (added)
-
build-local.xml (added)
-
build.number (modified) (1 diff)
-
build.xml (modified) (2 diffs)
-
classes (added)
-
classes/org (added)
-
classes/org/openstreetmap (added)
-
classes/org/openstreetmap/josm (added)
-
classes/org/openstreetmap/josm/plugins (added)
-
classes/org/openstreetmap/josm/plugins/tageditor (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/LaunchAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog$2.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog$3$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog$3.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog$CancelAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog$OKAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorDialog.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/TagEditorPlugin.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionCache.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionContext.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionItemPritority.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionList.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListItem.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListRenderer.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/AutoCompletionListViewer.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/ac/IAutoCompletionListListener.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/PresetItemListCellRenderer.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/PresetManager$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/PresetManager$2.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/PresetManager$3.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/PresetManager$4.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/PresetManager.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/RunnableAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TableCellEditor.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TableCellRenderer.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagEditor$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagEditor.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagFieldEditor$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagFieldEditor$2.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagFieldEditor$AutoCompletionDocument.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagFieldEditor.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagTable$AddAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagTable$DeleteAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagTable$SelectNextColumnCellAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagTable$SelectPreviousColumnCellAction.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagTable$TagTableColumnModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/editor/TagTable.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/Group.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/INameIconProvider.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/Item.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/Presets.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/Tag.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/io (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/io/Parser$Handler.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/io/Parser.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/io/PresetIOException.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/IPresetSelectorListener.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/NameIconCellRenderer.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTable.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableColumnModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/PresetsTableModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$2.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$3.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$4.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$5.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$6.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$7.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$8.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector$DoubleClickAdapter.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelector.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/KeyValuePair.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/LableSpecification.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecification.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecifications$Handler.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecifications$ResourceEntityResolver.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/TagSpecifications.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/ITagSelectorListener.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/KeyValueCellRenderer.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$2.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$3.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$4.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$5.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$6.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$7.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$8.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector$DoubleClickAdapter.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TabularTagSelector.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTable.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTableColumnModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTableModel$1.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/tagspec/ui/TagsTableModel.class (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/util (added)
-
classes/org/openstreetmap/josm/plugins/tageditor/util/IndentWriter.class (added)
-
doc (added)
-
doc/screen-shot.ppt (added)
-
doc/tageditor-screen-shot.jpg (added)
-
doc/tageditor-screen-shot.png (added)
-
lib (added)
-
lib/josm-tag-editor-plugin.jar (added)
-
lib/tag-editor-plugin.jar (added)
-
lib/tageditor.jar (added)
-
src/org/openstreetmap/josm/plugins/tageditor/editor/TableCellEditor.java (modified) (3 diffs)
-
src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditor.java (modified) (4 diffs)
-
src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java (modified) (4 diffs)
-
src/org/openstreetmap/josm/plugins/tageditor/editor/TagTable.java (modified) (2 diffs)
-
test (added)
-
test/functional (added)
-
test/functional/org (added)
-
test/functional/org/openstreetmap (added)
-
test/functional/org/openstreetmap/josm (added)
-
test/functional/org/openstreetmap/josm/plugins (added)
-
test/functional/org/openstreetmap/josm/plugins/tageditor (added)
-
test/functional/org/openstreetmap/josm/plugins/tageditor/editor (added)
-
test/functional/org/openstreetmap/josm/plugins/tageditor/editor/PresetManagerTest.java (added)
-
test/functional/org/openstreetmap/josm/plugins/tageditor/preset (added)
-
test/functional/org/openstreetmap/josm/plugins/tageditor/preset/ui (added)
-
test/functional/org/openstreetmap/josm/plugins/tageditor/preset/ui/TabularPresetSelectorTest.java (added)
-
test/map-feature-list.dtd (added)
-
test/osm-tag-definition-list-1.xml (added)
-
test/osm-tag-definition-list.xml (added)
-
test/osm-tag-definition-list.xsd (added)
-
test/sample1.xml (added)
-
test/unit (added)
-
test/unit/data (added)
-
test/unit/data/presets.xml (added)
-
test/unit/data/simple-presets.xml (added)
-
test/unit/org (added)
-
test/unit/org/openstreetmap (added)
-
test/unit/org/openstreetmap/josm (added)
-
test/unit/org/openstreetmap/josm/plugins (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/preset (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/preset/ItemTest.java (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/preset/PresetsTest.groovy (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/preset/io (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/preset/io/ParserTest.java (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/test (added)
-
test/unit/org/openstreetmap/josm/plugins/tageditor/test/AutoCompletionListItemTest.java (added)
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tageditor/build.number
r14426 r14520 1 1 #Build Number for ANT. Do not edit! 2 # Wed Apr 08 11:49:48CEST 20093 build.number= 1862 #Thu Apr 16 11:00:52 CEST 2009 3 build.number=204 -
applications/editors/josm/plugins/tageditor/build.xml
r14429 r14520 38 38 <property name="plugin.description" value="Provides a dialog for editing tags in a tabular grid."/> 39 39 <property name="plugin.doc.url" value="http://wiki.openstreetmap.org/index.php/JOSM/Plugins/TagEditor"/> 40 <property name="plugin.main.version" value=" 0.7"/>40 <property name="plugin.main.version" value="1515"/> 41 41 <property name="plugin.jar.name" value="${ant.project.name}.jar"/> 42 42 … … 73 73 </exec> 74 74 <mkdir dir="${plugin.build.dir}"/> 75 </target> 75 </target> 76 76 77 77 <!-- -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TableCellEditor.java
r14416 r14520 34 34 private TagFieldEditor editor = null; 35 35 private TagModel currentTag = null; 36 private TagEditorModel tagEditorModel = null; 36 37 private int currentColumn = 0; 37 38 … … 194 195 @Override 195 196 public boolean stopCellEditing() { 197 if (tagEditorModel == null) { 198 logger.warning("no tag editor model set. Can't update edited values. Please set tag editor model first"); 199 return super.stopCellEditing(); 200 } 196 201 197 202 if (currentColumn == 0) { 198 currentTag .setName(editor.getText());203 tagEditorModel.updateTagName(currentTag, editor.getText()); 199 204 } else if (currentColumn == 1){ 200 205 if (currentTag.getValueCount() > 1 && ! editor.getText().equals("")) { 201 currentTag .setValue(editor.getText());206 tagEditorModel.updateTagValue(currentTag, editor.getText()); 202 207 } else if (currentTag.getValueCount() <= 1) { 203 currentTag .setValue(editor.getText());208 tagEditorModel.updateTagValue(currentTag, editor.getText()); 204 209 } 205 210 } … … 243 248 } 244 249 250 /** 251 * sets the tag editor model 252 * 253 * @param tagEditorModel the tag editor model 254 */ 255 public void setTagEditorModel(TagEditorModel tagEditorModel) { 256 this.tagEditorModel = tagEditorModel; 257 } 258 245 259 } -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditor.java
r14338 r14520 10 10 import javax.swing.JScrollPane; 11 11 import javax.swing.ScrollPaneConstants; 12 import javax.swing.table.TableCellEditor; 12 13 13 14 14 import org.openstreetmap.josm.plugins.tageditor.ac.AutoCompletionCache; … … 103 103 // creates a default model and a default cache 104 104 // 105 tagEditorModel = new TagEditorModel(); 106 105 tagEditorModel = new TagEditorModel(); 107 106 108 107 build(); … … 125 124 public void setTagEditorModel(TagEditorModel tagEditorModel) { 126 125 tblTagEditor.setModel(tagEditorModel); 126 for (int i=0; i<=1; i++) { 127 TableCellEditor editor = (TableCellEditor)tblTagEditor.getColumnModel().getColumn(i).getCellEditor(); 128 if (editor != null) { 129 editor.setTagEditorModel(tagEditorModel); 130 } 131 } 127 132 presetManager.setModel(tagEditorModel); 128 133 } … … 145 150 146 151 public void stopEditing() { 147 TableCellEditor editor = tblTagEditor.getCellEditor(); 152 TableCellEditor editor = (TableCellEditor) tblTagEditor.getCellEditor(); 148 153 if (editor != null) { 149 154 editor.stopCellEditing(); -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagEditorModel.java
r14416 r14520 13 13 14 14 import javax.swing.DefaultComboBoxModel; 15 import javax.swing.SwingUtilities; 15 16 import javax.swing.table.AbstractTableModel; 16 17 … … 67 68 } 68 69 69 protected void fireDirtyStateChanged(boolean oldValue, boolean newValue) { 70 protected void fireDirtyStateChanged(final boolean oldValue, final boolean newValue) { 70 71 propChangeSupport.firePropertyChange(PROP_DIRTY, oldValue, newValue); 71 72 } … … 534 535 535 536 537 /** 538 * updates the name of a tag and sets the dirty state to true if 539 * the new name is different from the old name. 540 * 541 * @param tag the tag 542 * @param newName the new name 543 */ 536 544 public void updateTagName(TagModel tag, String newName) { 537 545 String oldName = tag.getName(); … … 542 550 } 543 551 552 /** 553 * updates the value value of a tag and sets the dirty state to true if the 554 * new name is different from the old name 555 * 556 * @param tag the tag 557 * @param newValue the new value 558 */ 544 559 public void updateTagValue(TagModel tag, String newValue) { 545 560 String oldValue = tag.getValue(); -
applications/editors/josm/plugins/tageditor/src/org/openstreetmap/josm/plugins/tageditor/editor/TagTable.java
r14338 r14520 340 340 // 341 341 editor = new TableCellEditor(); 342 editor.setTagEditorModel((TagEditorModel)getModel()); 342 343 getColumnModel().getColumn(0).setCellEditor(editor); 343 344 getColumnModel().getColumn(1).setCellEditor(editor); … … 468 469 469 470 } 470 471 471 472 472 473 473 }
Note:
See TracChangeset
for help on using the changeset viewer.
