Bug 498996 - ClassCastException in UndoChangesHandler.execute

* Make sure Handler is only available in active Ecore Editor

Change-Id: I5ac062d9db126ac59b81c89986061bf78e7f8563
Signed-off-by: Johannes Faltermeier <jfaltermeier@eclipsesource.com>
diff --git a/plugins/org.eclipse.emf.edapt.history.editor/plugin.xml b/plugins/org.eclipse.emf.edapt.history.editor/plugin.xml
index 379e1f5..27edf96 100644
--- a/plugins/org.eclipse.emf.edapt.history.editor/plugin.xml
+++ b/plugins/org.eclipse.emf.edapt.history.editor/plugin.xml
@@ -539,22 +539,30 @@
                  style="push">
               <visibleWhen
                     checkEnabled="false">
-                 <with
-                       variable="selection">
-                    <count
-                          value="+">
-                    </count>
-                    <iterate
-                          ifEmpty="false">
+                 <and>
+                    <with
+                          variable="selection">
+                       <count
+                             value="+">
+                       </count>
+                       <iterate
+                             ifEmpty="false">
+                          <instanceof
+                                value="org.eclipse.emf.edapt.spi.history.Change">
+                          </instanceof>
+                       </iterate>
+                       <test
+                             forcePluginActivation="true"
+                             property="org.eclipse.emf.edapt.history.editor.subsequentChanges">
+                       </test>
+                    </with>
+                    <with
+                          variable="activeEditor">
                        <instanceof
-                             value="org.eclipse.emf.edapt.spi.history.Change">
+                             value="org.eclipse.emf.ecore.presentation.EcoreEditor">
                        </instanceof>
-                    </iterate>
-                    <test
-                          forcePluginActivation="true"
-                          property="org.eclipse.emf.edapt.history.editor.subsequentChanges">
-                    </test>
-                 </with>
+                    </with>
+                 </and>
               </visibleWhen>
            </command>
         </menu>