Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/CodegenReconcileTest.java4
-rw-r--r--tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/RuntimeCompilationTest.java2
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/CodegenReconcileTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/CodegenReconcileTest.java
index ad520b614..fc1dd1480 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/CodegenReconcileTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/CodegenReconcileTest.java
@@ -768,6 +768,10 @@ L1: for (GenNode n : old.getDiagram().getAllNodes()) {
public void testGenContextMenu() {
GenEditorGenerator old = createCopy();
GenEditorGenerator current = createCopy();
+ // make clean initial state
+ current.getContextMenus().clear();
+ old.getContextMenus().clear();
+ //
GenContextMenu menu1 = GMFGenFactory.eINSTANCE.createGenContextMenu();
GenContextMenu menu2 = GMFGenFactory.eINSTANCE.createGenContextMenu();
old.getContextMenus().add(menu1);
diff --git a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/RuntimeCompilationTest.java b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/RuntimeCompilationTest.java
index 0468037b2..cf2d076d3 100644
--- a/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/RuntimeCompilationTest.java
+++ b/tests/org.eclipse.gmf.tests/src/org/eclipse/gmf/tests/gen/RuntimeCompilationTest.java
@@ -187,6 +187,7 @@ public class RuntimeCompilationTest extends CompilationTest {
menu.getItems().add(GMFGenFactory.eINSTANCE.createGenSeparator());
menu.getItems().add(a2);
menu.getItems().add(subMenu);
+ editorGen.getContextMenus().clear(); // make sure there's no other (default) menus
editorGen.getContextMenus().add(menu);
//
generateAndCompile(s);
@@ -258,6 +259,7 @@ public class RuntimeCompilationTest extends CompilationTest {
final LoadResourceAction loadResourceAction = GMFGenFactory.eINSTANCE.createLoadResourceAction();
menu.getItems().add(createShortcutAction);
menu.getItems().add(loadResourceAction);
+ editorGen.getContextMenus().clear(); // make sure there's no other (default) menus
editorGen.getContextMenus().add(menu);
editorGen.getDiagram().getContainsShortcutsTo().add("ecore");
assertTrue("sanity", editorGen.getDiagram().generateCreateShortcutAction());

Back to the top