Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoratikhomirov2008-11-19 17:34:46 +0000
committeratikhomirov2008-11-19 17:34:46 +0000
commit12c1e34e8c28261cef98ea71821cceb0bb08a7cb (patch)
treeb6672aa5f19f5dabf3ce9545a1323ef70539670c
parent7ccfcf07d3a0a8936a42d868148d2d8b62a4945e (diff)
downloadorg.eclipse.gmf-tooling-20081119-1650.tar.gz
org.eclipse.gmf-tooling-20081119-1650.tar.xz
org.eclipse.gmf-tooling-20081119-1650.zip
[174961] Menu actions - clean any default menu actions for tests to passv20081119-1650
-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