Changeset 29762 in osm for applications/editors/josm/plugins
- Timestamp:
- 2013-07-18T20:49:34+02:00 (11 years ago)
- Location:
- applications/editors/josm/plugins/tagging-preset-tester
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/tagging-preset-tester/build.xml
r29760 r29762 26 26 --> 27 27 <project name="tagging-preset-tester" default="dist" basedir="."> 28 <property name="commit.message" value="[josm_tagging_preset_tester] fix #josm8853: use preset seach panel in the plugin instead of the compbobox"/>29 <property name="plugin.main.version" value="607 1"/>28 <property name="commit.message" value="[josm_tagging_preset_tester] #josm8853: listen for list selection, support standalone mode (ant run)"/> 29 <property name="plugin.main.version" value="6072"/> 30 30 <property name="josm" location="../../core/dist/josm-custom.jar"/> 31 31 <property name="plugin.dist.dir" value="../../dist"/> … … 42 42 <compilerarg value="-Xlint:unchecked"/> 43 43 </javac> 44 </target> 45 <target name="run" depends="install"> 46 <echo message="creating ${plugin.jar}"/> 47 <java classpath="${josm};${plugin.jar}" classname="org.openstreetmap.josm.plugins.taggingpresettester.TaggingPresetTester"/> 44 48 </target> 45 49 <target name="dist" depends="compile,revision"> -
applications/editors/josm/plugins/tagging-preset-tester/src/org/openstreetmap/josm/plugins/taggingpresettester/TaggingPresetTester.java
r29760 r29762 6 6 import java.awt.Dimension; 7 7 import java.awt.GridBagLayout; 8 import java.awt.GridLayout;9 8 import java.awt.event.ActionEvent; 10 9 import java.awt.event.ActionListener; … … 15 14 import javax.swing.BorderFactory; 16 15 import javax.swing.JButton; 17 import javax.swing.JComboBox;18 16 import javax.swing.JFileChooser; 19 17 import javax.swing.JFrame; … … 21 19 22 20 import org.openstreetmap.josm.Main; 21 import org.openstreetmap.josm.data.Preferences; 23 22 import org.openstreetmap.josm.data.coor.LatLon; 24 23 import org.openstreetmap.josm.data.osm.Node; … … 52 51 return; 53 52 Collection<OsmPrimitive> x; 54 if (Main.main .hasEditLayer()) {53 if (Main.main!=null && Main.main.hasEditLayer()) { 55 54 x = Main.main.getCurrentDataSet().getSelected(); 56 55 } else { … … 75 74 panel.add(taggingPresets, GBC.std(0,0).fill(GBC.BOTH)); 76 75 panel.add(taggingPresetPanel, GBC.std(1,0).fill(GBC.BOTH)); 77 taggingPresets. setClickListener(new ActionListener(){76 taggingPresets.addSelectionListener(new ActionListener(){ 78 77 @Override 79 78 public void actionPerformed(ActionEvent e) { 80 reselect(); 79 if (taggingPresets.getSelectedPreset()!=null) 80 reselect(); 81 81 } 82 82 }); … … 105 105 args = new String[]{c.getSelectedFile().getPath()}; 106 106 } 107 JFrame f = new TaggingPresetTester(args); 108 f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 107 if (args!=null) { 108 Main.pref = new Preferences(); 109 System.out.println("Opening file "+args[0]); 110 JFrame f = new TaggingPresetTester(args); 111 f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 112 f.setVisible(true); 113 } 109 114 } 110 115
Note:
See TracChangeset
for help on using the changeset viewer.