Index: /applications/editors/josm/plugins/namemanager/.classpath
===================================================================
--- /applications/editors/josm/plugins/namemanager/.classpath	(revision 29929)
+++ /applications/editors/josm/plugins/namemanager/.classpath	(revision 29930)
@@ -3,5 +3,5 @@
 	<classpathentry kind="src" path="src"/>
 	<classpathentry kind="src" path="resources"/>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/JOSM"/>
 	<classpathentry kind="output" path="bin"/>
Index: /applications/editors/josm/plugins/namemanager/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- /applications/editors/josm/plugins/namemanager/.settings/org.eclipse.jdt.core.prefs	(revision 29930)
+++ /applications/editors/josm/plugins/namemanager/.settings/org.eclipse.jdt.core.prefs	(revision 29930)
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Index: plications/editors/josm/plugins/namemanager/README.template
===================================================================
--- /applications/editors/josm/plugins/namemanager/README.template	(revision 29929)
+++ 	(revision )
@@ -1,75 +1,0 @@
-README 
-======
-
-This is a template project structure for a JOSM plugin.
-
-Layout
-======
-+--- src                                source of your plugin
-  |- images                             images your plugin needs
-  |- resources                          resources your plugin needs
-
-  LICENSE                               license file 
-  README                                README for your plugin
-  
-  README.template                       this file 
-  
-  
-Build
-=====  
-A JOSM plugin is built as a single jar. We use ant to build.
-
-See build.xml in this directory and update the plugin specific properties in the
-configuration section.
-  
-
-Maintaining versions
-====================
-There are two versions maintained with each plugin:
-   1) the main version
-      You have to manually set the plugins main version in the build script.
-      Set the property plugin.main.version in build.xml accordingly. 
-
-   2) the build version
-      The build version is unique for every build of the plugin. It is equal
-      to the SVN revision of your plugin directory. 
-
- Both the main version and the build version are included in properties of the plugins
- manifest:
-    Plugin-Version      the build version
-    Plugin-Mainversion  the main version
-
- JOSM automatically detects whether a plugin needs to be upgraded. It compares the build
- version of the currently installed plugin jar with the build version of the plugin jar in 
- the SVN. The main version is irrelevant for this process.  
- 
- Making your plugin available to JOSM users
- ===========================================
- When a plugin jar is checked into SVN a script updates the plugins list on the JOSM wiki:
-   http://josm.openstreetmap.de/wiki/Plugins
- JOSM retrieves the list of available plugins and their build versions from this list.
-
-            commit      publish               read
-                       meta data              meta data 
-      Build  ==>  SVN  =======>  JOSM Wiki   <======= JOSM 
-                   ^ 
-                   ==================================
-                            fetch current plugin jar 
- 
- Note that you have to manually publish (commit) your plugin jar. There is no nightly build
- in place. Everything else (pulishing meta data, updating plugins in the client) is then handled 
- by automatic processes. 
-
-See also
-========
-* Developing Plugins 
-  http://josm.openstreetmap.de/wiki/DevelopingPlugins
-  
-* List of JOSM Plugins
-  http://josm.openstreetmap.de/wiki/Plugins
-  
-  
- 
-     
-
- 
Index: /applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java
===================================================================
--- /applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java	(revision 29929)
+++ /applications/editors/josm/plugins/namemanager/src/org/openstreetmap/josm/plugins/namemanager/listeners/NameManagerAction.java	(revision 29930)
@@ -70,8 +70,11 @@
     @Override
     public void selectionChanged(Collection<? extends OsmPrimitive> newSelection) {
-        setEnabled(newSelection != null
-                && Main.main.getCurrentDataSet().getSelectedWays().size() == 1
-                && Main.main.getCurrentDataSet().getSelectedWays().iterator().next().firstNode() == Main.main.getCurrentDataSet()
-                        .getSelectedWays().iterator().next().lastNode());
+        boolean enabledState = false;
+        DataSet ds = Main.main.getCurrentDataSet();
+        if (newSelection != null && ds != null) {
+            Collection<Way> selectedWays = ds.getSelectedWays();
+            enabledState = selectedWays.size() == 1 && selectedWays.iterator().next().isClosed();
+        }
+        setEnabled(enabledState);
     }
 }
