Index: /applications/editors/josm/plugins/epsg31287/build.xml
===================================================================
--- /applications/editors/josm/plugins/epsg31287/build.xml	(revision 28444)
+++ /applications/editors/josm/plugins/epsg31287/build.xml	(revision 28445)
@@ -36,5 +36,5 @@
     <property name="commit.message" value="fixed proj4 Parameters (thanks to Hetzi + Mikael Rittri)"/>
     <!-- enter the *lowest* JOSM version this plugin is currently compatible with -->
-    <property name="plugin.main.version" value="4394"/>
+    <property name="plugin.main.version" value="5248"/>
     <!--
       ************************************************
@@ -154,8 +154,8 @@
     </target>
     <!--
-    ************************** Publishing the plugin *********************************** 
-    -->
-    <!--
-        ** extracts the JOSM release for the JOSM version in ../core and saves it in the 
+    ************************** Publishing the plugin ***********************************
+    -->
+    <!--
+        ** extracts the JOSM release for the JOSM version in ../core and saves it in the
         ** property ${coreversion.info.entry.revision}
         **
@@ -207,15 +207,15 @@
     </target>
     <!--
-        ** commits the plugin.jar 
+        ** commits the plugin.jar
         -->
     <target name="commit-dist">
         <echo>
     ***** Properties of published ${plugin.jar} *****
-    Commit message    : '${commit.message}'                    
+    Commit message    : '${commit.message}'
     Plugin-Mainversion: ${plugin.main.version}
     JOSM build version: ${coreversion.info.entry.revision}
     Plugin-Version    : ${version.entry.commit.revision}
-    ***** / Properties of published ${plugin.jar} *****                    
-                        
+    ***** / Properties of published ${plugin.jar} *****
+
     Now commiting ${plugin.jar} ...
     </echo>
Index: /applications/editors/josm/plugins/epsg31287/josm-EPSG31287.launch
===================================================================
--- /applications/editors/josm/plugins/epsg31287/josm-EPSG31287.launch	(revision 28445)
+++ /applications/editors/josm/plugins/epsg31287/josm-EPSG31287.launch	(revision 28445)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/JOSM/src/org/openstreetmap/josm/gui/MainApplication.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JDK 6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openstreetmap.josm.gui.MainApplication"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="EPSG31287"/>
+</launchConfiguration>
Index: /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/Epsg31287.java
===================================================================
--- /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/Epsg31287.java	(revision 28444)
+++ /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/Epsg31287.java	(revision 28445)
@@ -3,5 +3,5 @@
 package org.openstreetmap.josm.plugins.epsg31287;
 
-import org.openstreetmap.josm.data.projection.Projections;
+import org.openstreetmap.josm.gui.preferences.projection.ProjectionPreference;
 import org.openstreetmap.josm.plugins.Plugin;
 import org.openstreetmap.josm.plugins.PluginInformation;
@@ -10,5 +10,5 @@
     public Epsg31287(PluginInformation info) {
         super(info);
-        Projections.addProjection(new ProjectionEPSG31287());
+        ProjectionPreference.registerProjectionChoice(new Epsg31287Gui());
     }
 }
Index: /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/Epsg31287Gui.java
===================================================================
--- /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/Epsg31287Gui.java	(revision 28445)
+++ /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/Epsg31287Gui.java	(revision 28445)
@@ -0,0 +1,94 @@
+package org.openstreetmap.josm.plugins.epsg31287;
+
+import static org.openstreetmap.josm.tools.I18n.tr;
+
+import java.awt.GridBagLayout;
+import java.awt.event.ActionListener;
+import java.util.Arrays;
+import java.util.Collection;
+
+import javax.swing.JLabel;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+
+import org.openstreetmap.josm.data.projection.Projection;
+import org.openstreetmap.josm.gui.preferences.projection.AbstractProjectionChoice;
+import org.openstreetmap.josm.tools.GBC;
+
+public class Epsg31287Gui extends AbstractProjectionChoice {
+
+	public Epsg31287Gui() {
+		super("epsg31287:epsg31287", tr("Epsg31287"));
+	}
+
+	private double dx;
+	private double dy;
+
+	// PreferencePanel, not used in plugin mode, useful for JOSM custom-build
+	@Override
+	public JPanel getPreferencePanel(ActionListener listener) {
+		//p.add(new HtmlPanel("<i>EPSG:31287 - Bessel 1841 in Lambert_Conformal_Conic_2SP</i>"), GBC.eol().fill(GBC.HORIZONTAL));
+		//p.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
+		JPanel p = new JPanel();
+		p.setLayout(new GridBagLayout());
+
+		JTextField gdx = new JTextField(""+dx);
+		JTextField gdy = new JTextField(""+dy);
+
+		p.add(new JLabel(tr("dx")), GBC.std().insets(5,5,0,5));
+		p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
+		p.add(gdx, GBC.eop().fill(GBC.HORIZONTAL));
+
+		p.add(new JLabel(tr("dy")), GBC.std().insets(5,5,0,5));
+		p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
+		p.add(gdy, GBC.eop().fill(GBC.HORIZONTAL));
+		p.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH));
+		return p;
+	}
+
+	// for PreferencePanel, not used in plugin mode, useful for JOSM custom-build
+	@Override
+	public Collection<String> getPreferences(JPanel p) {
+		dx = new Double(((JTextField)p.getComponent(2)).getText());
+		dy = new Double(((JTextField)p.getComponent(5)).getText());
+		return Arrays.asList(""+dx,""+dy);
+	}
+
+	// for PreferencePanel, not used in plugin mode, useful for JOSM custom-build
+	@Override
+	public Collection<String> getPreferencesFromCode(String code) {
+		dx = 85.0;
+		dy = 45.0;
+		return null;
+	}
+
+	// for PreferencePanel, not used in plugin mode, useful for JOSM custom-build
+	@Override
+	public void setPreferences(Collection<String> args) {
+		if(args != null)
+		{
+			String[] array = args.toArray(new String[0]);
+			if (array.length > 0) {
+				try {
+					dx = Double.parseDouble(array[0]);
+				} catch(NumberFormatException e) {}
+			}
+			if (array.length > 1) {
+				try {
+					dy = Double.parseDouble(array[1]);
+				} catch(NumberFormatException e) {}
+			}
+		}
+	}
+
+	@Override
+	public Projection getProjection() {
+		return new ProjectionEPSG31287(dx, dy);
+	}
+
+	@Override
+	public String[] allCodes() {
+		return new String[] {ProjectionEPSG31287.getProjCode()};
+	}
+
+}
Index: /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/ProjectionEPSG31287.java
===================================================================
--- /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/ProjectionEPSG31287.java	(revision 28444)
+++ /applications/editors/josm/plugins/epsg31287/src/org/openstreetmap/josm/plugins/epsg31287/ProjectionEPSG31287.java	(revision 28445)
@@ -5,23 +5,14 @@
 import static org.openstreetmap.josm.tools.I18n.tr;
 
-import java.awt.GridBagLayout;
-import java.awt.event.ActionListener;
 import java.awt.geom.Point2D;
-import java.util.Arrays;
-import java.util.Collection;
-
-import javax.swing.JLabel;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
 
 import org.openstreetmap.josm.data.Bounds;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
-import org.openstreetmap.josm.tools.GBC;
 
-public class ProjectionEPSG31287 implements org.openstreetmap.josm.data.projection.Projection, org.openstreetmap.josm.data.projection.ProjectionSubPrefs {
+public class ProjectionEPSG31287 implements org.openstreetmap.josm.data.projection.Projection {
 
-	private double dx = 0.0;
-	private double dy = 0.0;
+	private final double dx;
+	private final double dy;
 	private final static String projCode = "EPSG:31287";
 
@@ -29,5 +20,10 @@
 
 	public ProjectionEPSG31287() {
-		super();
+		this(0,0);
+	}
+
+	public ProjectionEPSG31287(double dx, double dy) {
+		this.dx = dx;
+		this.dy = dy;
 		// use use com.jhlabs.map.proj.ProjectionFactory for doing all the math
 		projection = com.jhlabs.map.proj.ProjectionFactory.fromPROJ4Specification(
@@ -45,60 +41,4 @@
 				}
 		);
-	}
-
-	// PreferencePanel, not used in plugin mode, useful for JOSM custom-build
-	@Override
-	public void setupPreferencePanel(JPanel p, ActionListener actionListener) {
-		//p.add(new HtmlPanel("<i>EPSG:31287 - Bessel 1841 in Lambert_Conformal_Conic_2SP</i>"), GBC.eol().fill(GBC.HORIZONTAL));
-		//p.add(Box.createVerticalGlue(), GBC.eol().fill(GBC.BOTH));
-		p.setLayout(new GridBagLayout());
-
-		JTextField gdx = new JTextField(""+dx);
-		JTextField gdy = new JTextField(""+dy);
-
-		p.add(new JLabel(tr("dx")), GBC.std().insets(5,5,0,5));
-		p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
-		p.add(gdx, GBC.eop().fill(GBC.HORIZONTAL));
-
-		p.add(new JLabel(tr("dy")), GBC.std().insets(5,5,0,5));
-		p.add(GBC.glue(1, 0), GBC.std().fill(GBC.HORIZONTAL));
-		p.add(gdy, GBC.eop().fill(GBC.HORIZONTAL));
-		p.add(GBC.glue(1, 1), GBC.eol().fill(GBC.BOTH));
-
-	}
-
-	// for PreferencePanel, not used in plugin mode, useful for JOSM custom-build
-	@Override
-	public Collection<String> getPreferences(JPanel p) {
-		dx = new Double(((JTextField)p.getComponent(2)).getText());
-		dy = new Double(((JTextField)p.getComponent(5)).getText());
-		return Arrays.asList(""+dx,""+dy);
-	}
-
-	// for PreferencePanel, not used in plugin mode, useful for JOSM custom-build
-	@Override
-	public Collection<String> getPreferencesFromCode(String code) {
-		dx = 85.0;
-		dy = 45.0;
-		return null;
-	}
-
-	// for PreferencePanel, not used in plugin mode, useful for JOSM custom-build
-	@Override
-	public void setPreferences(Collection<String> args) {
-		if(args != null)
-		{
-			String[] array = args.toArray(new String[0]);
-			if (array.length > 0) {
-				try {
-					dx = Double.parseDouble(array[0]);
-				} catch(NumberFormatException e) {}
-			}
-			if (array.length > 1) {
-				try {
-					dy = Double.parseDouble(array[1]);
-				} catch(NumberFormatException e) {}
-			}
-		}
 	}
 
@@ -162,8 +102,4 @@
 	}
 
-	@Override
-	public String[] allCodes() {
-		return new String[] {projCode};
-	}
 
 }
