diff options
author | cletavernie | 2013-02-21 18:41:03 +0000 |
---|---|---|
committer | cletavernie | 2013-02-21 18:41:03 +0000 |
commit | 71118b4c6a8f63c2494841c90c6c38f0dfb1b034 (patch) | |
tree | 1c380114aa6c86a7b36e8fbd6fd808a9634d5985 /tests | |
parent | f5fc92d8c6c115f15f60007b1dcf4e4d5d61a51b (diff) | |
download | org.eclipse.papyrus-71118b4c6a8f63c2494841c90c6c38f0dfb1b034.tar.gz org.eclipse.papyrus-71118b4c6a8f63c2494841c90c6c38f0dfb1b034.tar.xz org.eclipse.papyrus-71118b4c6a8f63c2494841c90c6c38f0dfb1b034.zip |
398712: [Core] Multiple issues with the PageManager
https://bugs.eclipse.org/bugs/show_bug.cgi?id=398712
401434: [Core] The CoreEditor shall be covered with integration tests
https://bugs.eclipse.org/bugs/show_bug.cgi?id=401434
Missing classes from previous commits
Diffstat (limited to 'tests')
3 files changed, 23 insertions, 2 deletions
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF index f8a2129c2d4..1a94add81ee 100644 --- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/META-INF/MANIFEST.MF @@ -13,7 +13,8 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
org.eclipse.papyrus.infra.widgets;bundle-version="0.10.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.0",
- org.eclipse.papyrus.uml.tools;bundle-version="0.10.0"
+ org.eclipse.papyrus.uml.tools;bundle-version="0.10.0",
+ org.eclipse.papyrus.editor;bundle-version="0.10.0"
Export-Package: org.eclipse.papyrus.junit.utils
Bundle-Vendor: %Bundle-Vendor
Bundle-ActivationPolicy: lazy
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/EditorUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/EditorUtils.java index 87b399f826b..43a386cb2a8 100644 --- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/EditorUtils.java +++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/EditorUtils.java @@ -14,6 +14,8 @@ package org.eclipse.papyrus.junit.utils;
import org.eclipse.core.resources.IFile;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
@@ -49,4 +51,20 @@ public class EditorUtils { return editor;
}
+ /**
+ * Opens the file with the Papyrus Editor
+ *
+ * @param file
+ * @return
+ * @throws PartInitException
+ */
+ public static final IMultiDiagramEditor openPapyrusEditor(final IFile file) throws PartInitException {
+ GenericUtils.closeIntroPart();
+ final IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ IEditorPart editor = null;
+ editor = IDE.openEditor(activePage, file, PapyrusMultiDiagramEditor.EDITOR_ID);
+ Assert.assertNotNull(editor);
+ return (IMultiDiagramEditor)editor;
+ }
+
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PapyrusProjectUtils.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PapyrusProjectUtils.java index f065b769fa7..e0ba2a4bc85 100644 --- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PapyrusProjectUtils.java +++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/PapyrusProjectUtils.java @@ -40,7 +40,7 @@ public class PapyrusProjectUtils { * @throws IOException
* @throws CoreException
*/
- public static final void copyPapyrusModel(final IProject project, final Bundle bundle, final String sourcePath, final String fileRootName) throws CoreException, IOException {
+ public static final IFile copyPapyrusModel(final IProject project, final Bundle bundle, final String sourcePath, final String fileRootName) throws CoreException, IOException {
final IFile emptyModel_di = project.getFile(fileRootName + "." + SashModel.MODEL_FILE_EXTENSION);
final IFile emptyModel_no = project.getFile(fileRootName + "." + NotationModel.NOTATION_FILE_EXTENSION);
final IFile emptyModel_uml = project.getFile(fileRootName + "." + UmlModel.UML_FILE_EXTENSION);
@@ -48,5 +48,7 @@ public class PapyrusProjectUtils { emptyModel_di.create(bundle.getResource(sourcePath + fileRootName + "." + SashModel.MODEL_FILE_EXTENSION).openStream(), true, new NullProgressMonitor());
emptyModel_no.create(bundle.getResource(sourcePath + fileRootName + "." + NotationModel.NOTATION_FILE_EXTENSION).openStream(), true, new NullProgressMonitor());
emptyModel_uml.create(bundle.getResource(sourcePath + fileRootName + "." + UmlModel.UML_FILE_EXTENSION).openStream(), true, new NullProgressMonitor());
+
+ return emptyModel_di;
}
}
|