Index: /applications/editors/josm/plugins/tagging-preset-tester/build.xml
===================================================================
--- /applications/editors/josm/plugins/tagging-preset-tester/build.xml	(revision 29761)
+++ /applications/editors/josm/plugins/tagging-preset-tester/build.xml	(revision 29762)
@@ -26,6 +26,6 @@
 -->
 <project name="tagging-preset-tester" default="dist" basedir=".">
-    <property name="commit.message" value="[josm_tagging_preset_tester] fix #josm8853: use preset seach panel in the plugin instead of the compbobox"/>
-    <property name="plugin.main.version" value="6071"/>
+    <property name="commit.message" value="[josm_tagging_preset_tester] #josm8853: listen for list selection, support standalone mode (ant run)"/>
+    <property name="plugin.main.version" value="6072"/>
     <property name="josm" location="../../core/dist/josm-custom.jar"/>
     <property name="plugin.dist.dir" value="../../dist"/>
@@ -42,4 +42,8 @@
             <compilerarg value="-Xlint:unchecked"/>
         </javac>
+    </target>
+    <target name="run" depends="install">
+        <echo message="creating ${plugin.jar}"/>
+        <java classpath="${josm};${plugin.jar}" classname="org.openstreetmap.josm.plugins.taggingpresettester.TaggingPresetTester"/>
     </target>
     <target name="dist" depends="compile,revision">
Index: /applications/editors/josm/plugins/tagging-preset-tester/nbproject/project.xml
===================================================================
--- /applications/editors/josm/plugins/tagging-preset-tester/nbproject/project.xml	(revision 29762)
+++ /applications/editors/josm/plugins/tagging-preset-tester/nbproject/project.xml	(revision 29762)
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://www.netbeans.org/ns/project/1">
+    <type>org.netbeans.modules.ant.freeform</type>
+    <configuration>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/1">
+            <name>tagging-preset-tester</name>
+        </general-data>
+        <general-data xmlns="http://www.netbeans.org/ns/freeform-project/2">
+            <!-- Не используйте диалоговое окно свойств проекта при редактировании данного файла вручную. -->
+            <name>tagging-preset-tester</name>
+            <properties/>
+            <folders>
+                <source-folder>
+                    <label>tagging-preset-tester</label>
+                    <location>.</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <source-folder>
+                    <label>src</label>
+                    <type>java</type>
+                    <location>src</location>
+                    <encoding>UTF-8</encoding>
+                </source-folder>
+                <build-file>
+                    <location>../../dist/tagging-preset-tester.jar</location>
+                </build-file>
+            </folders>
+            <ide-actions>
+                <action name="build">
+                    <target>compile</target>
+                </action>
+                <action name="clean">
+                    <target>clean</target>
+                </action>
+                <action name="run">
+                    <target>run</target>
+                </action>
+                <action name="rebuild">
+                    <target>clean</target>
+                    <target>compile</target>
+                </action>
+            </ide-actions>
+            <export>
+                <type>jar</type>
+                <location>../../dist/tagging-preset-tester.jar</location>
+                <build-target>compile</build-target>
+            </export>
+            <view>
+                <items>
+                    <source-folder style="packages">
+                        <label>src</label>
+                        <location>src</location>
+                    </source-folder>
+                    <source-file>
+                        <location>build.xml</location>
+                    </source-file>
+                </items>
+                <context-menu>
+                    <ide-action name="build"/>
+                    <ide-action name="rebuild"/>
+                    <ide-action name="clean"/>
+                    <ide-action name="run"/>
+                </context-menu>
+            </view>
+            <subprojects/>
+        </general-data>
+        <java-data xmlns="http://www.netbeans.org/ns/freeform-project-java/3">
+            <compilation-unit>
+                <package-root>src</package-root>
+                <classpath mode="compile">../../core/src</classpath>
+                <built-to>../../dist/tagging-preset-tester.jar</built-to>
+                <source-level>1.6</source-level>
+            </compilation-unit>
+        </java-data>
+    </configuration>
+</project>
Index: /applications/editors/josm/plugins/tagging-preset-tester/src/org/openstreetmap/josm/plugins/taggingpresettester/TaggingPresetTester.java
===================================================================
--- /applications/editors/josm/plugins/tagging-preset-tester/src/org/openstreetmap/josm/plugins/taggingpresettester/TaggingPresetTester.java	(revision 29761)
+++ /applications/editors/josm/plugins/tagging-preset-tester/src/org/openstreetmap/josm/plugins/taggingpresettester/TaggingPresetTester.java	(revision 29762)
@@ -6,5 +6,4 @@
 import java.awt.Dimension;
 import java.awt.GridBagLayout;
-import java.awt.GridLayout;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -15,5 +14,4 @@
 import javax.swing.BorderFactory;
 import javax.swing.JButton;
-import javax.swing.JComboBox;
 import javax.swing.JFileChooser;
 import javax.swing.JFrame;
@@ -21,4 +19,5 @@
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.Preferences;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.Node;
@@ -52,5 +51,5 @@
             return;
         Collection<OsmPrimitive> x;
-        if (Main.main.hasEditLayer()) {
+        if (Main.main!=null && Main.main.hasEditLayer()) {
             x = Main.main.getCurrentDataSet().getSelected();
         } else {
@@ -75,8 +74,9 @@
         panel.add(taggingPresets, GBC.std(0,0).fill(GBC.BOTH));
         panel.add(taggingPresetPanel, GBC.std(1,0).fill(GBC.BOTH));
-        taggingPresets.setClickListener(new ActionListener(){
+        taggingPresets.addSelectionListener(new ActionListener(){
             @Override
             public void actionPerformed(ActionEvent e) {
-                reselect();
+                if (taggingPresets.getSelectedPreset()!=null)
+                    reselect();
             }
         });
@@ -105,6 +105,11 @@
             args = new String[]{c.getSelectedFile().getPath()};
         }
-        JFrame f = new TaggingPresetTester(args);
-        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+        if (args!=null) {
+            Main.pref = new Preferences();
+            System.out.println("Opening file "+args[0]);
+            JFrame f = new TaggingPresetTester(args);
+            f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+            f.setVisible(true);
+        }
     }
 
