Index: /applications/editors/josm/plugins/annotation-tester/.classpath
===================================================================
--- /applications/editors/josm/plugins/annotation-tester/.classpath	(revision 2995)
+++ /applications/editors/josm/plugins/annotation-tester/.classpath	(revision 2996)
@@ -3,6 +3,6 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry including="images/" kind="src" path=""/>
+	<classpathentry combineaccessrules="false" exported="true" kind="src" path="/josm"/>
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
-	<classpathentry combineaccessrules="false" kind="src" path="/josm"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
Index: /applications/editors/josm/plugins/annotation-tester/build.xml
===================================================================
--- /applications/editors/josm/plugins/annotation-tester/build.xml	(revision 2995)
+++ /applications/editors/josm/plugins/annotation-tester/build.xml	(revision 2996)
@@ -2,11 +2,8 @@
 
 	<target name="build">
-		<jar destfile="${user.home}/.josm/plugins/annotation-tester.jar" basedir="bin">
+		<jar destfile="${user.home}/.josm/plugins/annotation-tester.jar" 
+			 basedir="bin"
+			 manifest="src/org/openstreetmap/josm/plugins/annotationtester/MANIFEST.MF">
 			<fileset dir="."><include name="images/*"/></fileset>
-			<manifest>
-				<attribute name="Main-Class" value="annotationtester.AnnotationTester" />
-				<attribute name="Plugin-Class" value="annotationtester.AnnotationTesterAction" />
-				<attribute name="Plugin-Description" value="Make the Annotation Preset Tester tool available in the help menu." />
-			</manifest>
 		</jar>
 	</target>
Index: /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/AnnotationTester.java
===================================================================
--- /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/AnnotationTester.java	(revision 2996)
+++ /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/AnnotationTester.java	(revision 2996)
@@ -0,0 +1,115 @@
+package org.openstreetmap.josm.plugins.annotationtester;
+
+import java.awt.BorderLayout;
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.URL;
+import java.util.Vector;
+
+import javax.swing.BorderFactory;
+import javax.swing.DefaultComboBoxModel;
+import javax.swing.JButton;
+import javax.swing.JComboBox;
+import javax.swing.JFileChooser;
+import javax.swing.JFrame;
+import javax.swing.JOptionPane;
+import javax.swing.JPanel;
+
+import org.openstreetmap.josm.gui.annotation.AnnotationCellRenderer;
+import org.openstreetmap.josm.gui.annotation.AnnotationPreset;
+import org.xml.sax.SAXException;
+
+public class AnnotationTester extends JFrame {
+
+	private JComboBox annotationPresets;
+	private final String[] args;
+	private JPanel annotationPanel = new JPanel(new BorderLayout());
+	private JPanel panel = new JPanel(new BorderLayout());
+
+	public void reload() {
+		Vector<AnnotationPreset> allPresets = new Vector<AnnotationPreset>();
+		for (String source : args) {
+			InputStream in = null;
+			try {
+				if (source.startsWith("http") || source.startsWith("ftp") || source.startsWith("file"))
+					in = new URL(source).openStream();
+				else if (source.startsWith("resource://"))
+					in = AnnotationTester.class.getResourceAsStream(source.substring("resource:/".length()));
+				else
+					in = new FileInputStream(source);
+				allPresets.addAll(AnnotationPreset.readAll(in));
+			} catch (IOException e) {
+				e.printStackTrace();
+				JOptionPane.showMessageDialog(null, "Could not read annotation preset source: "+source);
+			} catch (SAXException e) {
+				e.printStackTrace();
+				JOptionPane.showMessageDialog(null, "Error parsing "+source+": "+e.getMessage());
+			}
+
+			try {
+				if (in != null)
+					in.close();
+			} catch (IOException e) {
+			}
+		}
+		annotationPresets.setModel(new DefaultComboBoxModel(allPresets));
+	}
+
+	public void reselect() {
+		annotationPanel.removeAll();
+		AnnotationPreset preset = (AnnotationPreset)annotationPresets.getSelectedItem();
+		if (preset == null)
+			return;
+		JPanel p = preset.createPanel();
+		p.setBorder(BorderFactory.createEmptyBorder(5,5,5,5));
+		if (p != null)
+			annotationPanel.add(p, BorderLayout.NORTH);
+		panel.validate();
+		panel.repaint();
+	}
+
+	public AnnotationTester(String[] args) {
+		super("Annotation Preset Tester");
+		this.args = args;
+		annotationPresets = new JComboBox();
+		annotationPresets.setRenderer(new AnnotationCellRenderer());
+		reload();
+
+		panel.add(annotationPresets, BorderLayout.NORTH);
+		panel.add(annotationPanel, BorderLayout.CENTER);
+		annotationPresets.addActionListener(new ActionListener(){
+			public void actionPerformed(ActionEvent e) {
+				reselect();
+			}
+		});
+		reselect();
+
+		JButton b = new JButton("Reload");
+		b.addActionListener(new ActionListener(){
+			public void actionPerformed(ActionEvent e) {
+				int i = annotationPresets.getSelectedIndex();
+				reload();
+				annotationPresets.setSelectedIndex(i);
+			}
+		});
+		panel.add(b, BorderLayout.SOUTH);
+
+		setContentPane(panel);
+		setSize(300,500);
+		setVisible(true);
+	}
+
+	public static void main(String[] args) {
+		if (args.length == 0) {
+			JFileChooser c = new JFileChooser();
+			if (c.showOpenDialog(null) != JFileChooser.APPROVE_OPTION)
+				return;
+			args = new String[]{c.getSelectedFile().getPath()};
+		}
+		JFrame f = new AnnotationTester(args);
+		f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
+	}
+}
Index: /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/AnnotationTesterAction.java
===================================================================
--- /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/AnnotationTesterAction.java	(revision 2996)
+++ /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/AnnotationTesterAction.java	(revision 2996)
@@ -0,0 +1,34 @@
+package org.openstreetmap.josm.plugins.annotationtester;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.KeyEvent;
+
+import javax.swing.JOptionPane;
+
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.JosmAction;
+
+/**
+ * Fires up the annotation tester
+ * @author Immanuel.Scholz
+ */
+public class AnnotationTesterAction extends JosmAction {
+
+	public AnnotationTesterAction() {
+		super(tr("Annotation Preset Tester"), "annotation-tester2", tr("Open the annotation preset test tool for previewing annotation preset dialogs."), KeyEvent.VK_A, KeyEvent.CTRL_DOWN_MASK | KeyEvent.ALT_DOWN_MASK, true);
+		Main.main.menu.helpMenu.addSeparator();
+		Main.main.menu.helpMenu.add(this);
+	}
+
+	public void actionPerformed(ActionEvent e) {
+		String annotationSources = Main.pref.get("annotation.sources");
+		if (annotationSources.equals("")) {
+			JOptionPane.showMessageDialog(Main.parent, tr("You have to specify annotation sources in the preferences first."));
+			return;
+		}
+		String[] args = annotationSources.split(";");
+		new AnnotationTester(args);
+	}
+}
Index: /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/MANIFEST.MF
===================================================================
--- /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/MANIFEST.MF	(revision 2996)
+++ /applications/editors/josm/plugins/annotation-tester/src/org/openstreetmap/josm/plugins/annotationtester/MANIFEST.MF	(revision 2996)
@@ -0,0 +1,5 @@
+Manifest-Version: 1.0
+Main-Class: org.openstreetmap.josm.plugins.annotationtester.AnnotationTester
+Plugin-Class: org.openstreetmap.josm.plugins.annotationtester.AnnotationTesterAction
+Plugin-Description: Make the Annotation Preset Tester tool available in
+ the help menu.
