[506060] Make sure there is a sensible visibleWhen on command defs

Bug: 506060
Change-Id: I9ee24c7c563b6a31bffaabddc13a80d060bedc16
diff --git a/org.eclipse.emf.ecoretools.ui/plugin.xml b/org.eclipse.emf.ecoretools.ui/plugin.xml
index cc1c6b2..4aedbcf 100644
--- a/org.eclipse.emf.ecoretools.ui/plugin.xml
+++ b/org.eclipse.emf.ecoretools.ui/plugin.xml
@@ -1,114 +1,142 @@
-<?xml version="1.0" encoding="UTF-8"?>

-<?eclipse version="3.4"?>

-<plugin>

-	<extension point="org.eclipse.ui.perspectives">

-		<perspective

-			id="org.eclipse.emf.ecoretools.perspective"

-			class="org.eclipse.emf.ecoretools.ui.EcoreToolsPerspective"

-			name="%ecore.perspective.name"

-			icon="icons/eview16/etools_persp.gif"/>

-	</extension>

-

-   <extension

-         point="org.eclipse.ui.views">

-      <view

-            category="org.eclipse.emf.ecoretools.ui"

-            class="org.eclipse.emf.ecoretools.ui.views.EClassHierarchyView"

-            icon="icons/eview16/eclass_hi_nav.gif"

-            id="org.eclipse.emf.ecoretools.internal.views.EClassHierarchyView"

-            name="%ecoretools.view.eclass.information.title"

-            restorable="true">

-      </view>

-      <view

-            category="org.eclipse.emf.ecoretools.ui"

-            class="org.eclipse.emf.ecoretools.ui.views.EReferencesView"

-            icon="icons/eview16/eref_nav.gif"

-            id="org.eclipse.emf.ecoretools.internal.views.EReferencesView"

-            name="%ecoretools.view.eclass.references.title"

-            restorable="true"/>

-      <category

-            id="org.eclipse.emf.ecoretools.ui"

-            name="%ecoretools.view.category">

-      </category>

-   </extension>

-   <extension

-         point="org.eclipse.ui.menus">

-      <menuContribution

-            allPopups="false"

-            locationURI="popup:org.eclipse.ui.popup.any?after=additions">

-         <menu

-               commandId="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand"

-               icon="icons/eview16/eclass_hi_nav.gif"

-               label="%ecoretools.menu.eclass.information.command">

-            <visibleWhen

-                  checkEnabled="false">

-                  <with

-                     variable="activeMenuSelection">

-                  <iterate

-                        operator="and">

-                     <instanceof

-                           value="org.eclipse.emf.ecore.EObject">

-                     </instanceof>

-                  </iterate>

-               </with>

-            </visibleWhen>

-         </menu>

-        <command

-               commandId="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand"

-               icon="icons/eview16/eclass_hi_nav.gif"

-               label="%ecoretools.menu.eclass.information.command"

-               style="push">

-         </command>

-      </menuContribution>

-      <menuContribution

-            allPopups="false"

-            locationURI="popup:org.eclipse.ui.popup.any?after=additions">

-         <menu

-               commandId="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand"

-               icon="icons/eview16/eref_nav.gif"

-               label="%ecoretools.menu.eclass.references.command">

-            <visibleWhen

-                  checkEnabled="false">

-               <with

-                     variable="activeMenuSelection">

-                  <iterate

-                        operator="and">

-                     <instanceof

-                           value="org.eclipse.emf.ecore.EObject">

-                     </instanceof>

-                  </iterate>

-               </with>

-            </visibleWhen>

-         </menu>

-         <command

-               commandId="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand"

-               icon="icons/eview16/eref_nav.gif"

-               label="%ecoretools.menu.eclass.references.command"

-               style="push">

-         </command>

-      </menuContribution>

-   </extension>

-   <extension

-         point="org.eclipse.ui.commands">

-      <command

-            id="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand"

-            name="%ecoretools.menu.eclass.information.command">

-      </command>

-      <command

-            id="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand"

-            name="%ecoretools.menu.eclass.references.command">

-      </command>

-   </extension>

-   <extension

-         point="org.eclipse.ui.handlers">

-      <handler

-            class="org.eclipse.emf.ecoretools.ui.views.EClassHierarchyHandler"

-            commandId="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand">

-      </handler>

-      <handler

-            class="org.eclipse.emf.ecoretools.ui.views.EClassReferencesHandler"

-            commandId="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand">

-      </handler>

-   </extension>

-

-</plugin>

+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+	<extension point="org.eclipse.ui.perspectives">
+		<perspective
+			id="org.eclipse.emf.ecoretools.perspective"
+			class="org.eclipse.emf.ecoretools.ui.EcoreToolsPerspective"
+			name="%ecore.perspective.name"
+			icon="icons/eview16/etools_persp.gif"/>
+	</extension>
+
+   <extension
+         point="org.eclipse.ui.views">
+      <view
+            category="org.eclipse.emf.ecoretools.ui"
+            class="org.eclipse.emf.ecoretools.ui.views.EClassHierarchyView"
+            icon="icons/eview16/eclass_hi_nav.gif"
+            id="org.eclipse.emf.ecoretools.internal.views.EClassHierarchyView"
+            name="%ecoretools.view.eclass.information.title"
+            restorable="true">
+      </view>
+      <view
+            category="org.eclipse.emf.ecoretools.ui"
+            class="org.eclipse.emf.ecoretools.ui.views.EReferencesView"
+            icon="icons/eview16/eref_nav.gif"
+            id="org.eclipse.emf.ecoretools.internal.views.EReferencesView"
+            name="%ecoretools.view.eclass.references.title"
+            restorable="true"/>
+      <category
+            id="org.eclipse.emf.ecoretools.ui"
+            name="%ecoretools.view.category">
+      </category>
+   </extension>
+   <extension
+         point="org.eclipse.ui.menus">
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+         <menu
+               commandId="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand"
+               icon="icons/eview16/eclass_hi_nav.gif"
+               label="%ecoretools.menu.eclass.information.command">
+            <visibleWhen
+                  checkEnabled="false">
+                  <with
+                     variable="activeMenuSelection">
+                  <iterate
+                        ifEmpty="false"
+                        operator="and">
+                     <adapt
+                           type="org.eclipse.emf.ecore.EObject">
+                     </adapt>
+                  </iterate>
+               </with>
+            </visibleWhen>
+         </menu>
+        <command
+               commandId="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand"
+               icon="icons/eview16/eclass_hi_nav.gif"
+               label="%ecoretools.menu.eclass.information.command"
+               style="push">
+               <visibleWhen
+                  checkEnabled="false">
+                  <with
+                     variable="activeMenuSelection">
+                  <iterate
+                        ifEmpty="false"
+                        operator="and">
+                     <adapt
+                           type="org.eclipse.emf.ecore.EObject">
+                     </adapt>
+                  </iterate>
+               </with>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+      <menuContribution
+            allPopups="false"
+            locationURI="popup:org.eclipse.ui.popup.any?after=additions">
+         <menu
+               commandId="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand"
+               icon="icons/eview16/eref_nav.gif"
+               label="%ecoretools.menu.eclass.references.command">
+            <visibleWhen
+                  checkEnabled="false">
+                  <with
+                     variable="activeMenuSelection">
+                  <iterate
+                        ifEmpty="false"
+                        operator="and">
+                     <adapt
+                           type="org.eclipse.emf.ecore.EObject">
+                     </adapt>
+                  </iterate>
+               </with>
+            </visibleWhen>
+         </menu>
+         <command
+               commandId="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand"
+               icon="icons/eview16/eref_nav.gif"
+               label="%ecoretools.menu.eclass.references.command"
+               style="push">
+               <visibleWhen
+                  checkEnabled="false">
+                  <with
+                     variable="activeMenuSelection">
+                  <iterate
+                        ifEmpty="false"
+                        operator="and">
+                     <adapt
+                           type="org.eclipse.emf.ecore.EObject">
+                     </adapt>
+                  </iterate>
+               </with>
+            </visibleWhen>
+         </command>
+      </menuContribution>
+   </extension>
+   <extension
+         point="org.eclipse.ui.commands">
+      <command
+            id="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand"
+            name="%ecoretools.menu.eclass.information.command">
+      </command>
+      <command
+            id="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand"
+            name="%ecoretools.menu.eclass.references.command">
+      </command>
+   </extension>
+   <extension
+         point="org.eclipse.ui.handlers">
+      <handler
+            class="org.eclipse.emf.ecoretools.ui.views.EClassHierarchyHandler"
+            commandId="org.eclipse.emf.ecoretools.ui.EClassInformationViewCommand">
+      </handler>
+      <handler
+            class="org.eclipse.emf.ecoretools.ui.views.EClassReferencesHandler"
+            commandId="org.eclipse.emf.ecoretools.ui.EClassReferencesViewCommand">
+      </handler>
+   </extension>
+
+</plugin>