Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-12-03 12:24:20 +0000
committerChristian W. Damus2015-12-03 12:24:20 +0000
commitb8081f2a0b4fc7bf52ff060f34da21a5d9d215fa (patch)
tree20d1949957c4b0d848497c47642f88449aaff8f1
parent09d56589be181c7088207733d1a54814eb54e47e (diff)
downloadorg.eclipse.papyrus-b8081f2a0b4fc7bf52ff060f34da21a5d9d215fa.tar.gz
org.eclipse.papyrus-b8081f2a0b4fc7bf52ff060f34da21a5d9d215fa.tar.xz
org.eclipse.papyrus-b8081f2a0b4fc7bf52ff060f34da21a5d9d215fa.zip
Bug 434983: [SashEditor] Provide a mechanism to move the editor layout model to either the *.di (Legacy) or hidden *.sash resource (1.0)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434983 Instrument the CDO UI test framework for editors to prevent the sash-layout storage migration dialog popping up and hanging the tests.
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch2
-rw-r--r--tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java21
2 files changed, 20 insertions, 3 deletions
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch
index 73d94eef3a9..deffb4d7b0c 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests/Papyrus All CDO Tests.launch
@@ -35,7 +35,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.cdo.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.cdo.tests"/>
diff --git a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java
index 6722f3c5308..798f2f595b6 100644
--- a/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java
+++ b/tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests/src/org/eclipse/papyrus/cdo/ui/tests/AbstractPapyrusCDOUITest.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2015 CEA LIST and others.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,6 +11,7 @@
* Christian W. Damus (CEA) - bug 422257
* Christian W. Damus (CEA) - bug 432813
* Eike Stepper (CEA) - bug 466520
+ * Christian W. Damus - bug 434983
*
*****************************************************************************/
package org.eclipse.papyrus.cdo.ui.tests;
@@ -85,6 +86,9 @@ public abstract class AbstractPapyrusCDOUITest extends AbstractPapyrusCDOTest {
private DiagramDocumentEditor lastDiagramEditor;
+ @SuppressWarnings("restriction")
+ private org.eclipse.papyrus.infra.core.internal.preferences.YesNo initialSashStoragePreference;
+
public AbstractPapyrusCDOUITest() {
super();
}
@@ -140,6 +144,13 @@ public abstract class AbstractPapyrusCDOUITest extends AbstractPapyrusCDOTest {
close(getCheckout(), transaction);
}
+ @SuppressWarnings("restriction")
+ @Before
+ public void suppressSashLayoutMigrationDialog() {
+ initialSashStoragePreference = org.eclipse.papyrus.infra.core.internal.preferences.EditorPreferences.getInstance().getConvertSharedPageLayoutToPrivate();
+ org.eclipse.papyrus.infra.core.internal.preferences.EditorPreferences.getInstance().setConvertSharedPageLayoutToPrivate(org.eclipse.papyrus.infra.core.internal.preferences.YesNo.NO);
+ }
+
@After
public void closeEditors() {
flushDisplayEvents();
@@ -162,6 +173,12 @@ public abstract class AbstractPapyrusCDOUITest extends AbstractPapyrusCDOTest {
flushDisplayEvents();
}
+ @SuppressWarnings("restriction")
+ @After
+ public void restoreSashLayoutMigrationDialog() {
+ org.eclipse.papyrus.infra.core.internal.preferences.EditorPreferences.getInstance().setConvertSharedPageLayoutToPrivate(initialSashStoragePreference);
+ }
+
private void importResource(CDOTransaction transaction, String srcPath, String dstPath, Map<? super Resource, ? super Resource> importMap) {
ResourceSet rset = transaction.getResourceSet();
@@ -240,7 +257,7 @@ public abstract class AbstractPapyrusCDOUITest extends AbstractPapyrusCDOTest {
}
protected IDawnEditor getDawnEditor() {
- return (IDawnEditor) lastEditor.getAdapter(IDawnEditor.class);
+ return lastEditor.getAdapter(IDawnEditor.class);
}
protected IDawnEditorSupport getDawnEditorSupport() {

Back to the top