diff options
author | ptessier | 2014-03-13 13:13:12 +0000 |
---|---|---|
committer | ptessier | 2014-03-13 13:13:12 +0000 |
commit | da393269bea1fa51a453c731b609358c38884f1a (patch) | |
tree | 4e4ddd2f52e25fe9a942b4f1ac35c0d90d714058 /tests | |
parent | 801294d0f6f58d276454db2d80950ef6587fc54b (diff) | |
download | org.eclipse.papyrus-da393269bea1fa51a453c731b609358c38884f1a.tar.gz org.eclipse.papyrus-da393269bea1fa51a453c731b609358c38884f1a.tar.xz org.eclipse.papyrus-da393269bea1fa51a453c731b609358c38884f1a.zip |
Bug 386118 - [EMF Facet] Papyrus should progressively support EMF Facet
0.2
fix error on tests
Diffstat (limited to 'tests')
2 files changed, 23 insertions, 3 deletions
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF index d767afa793a..f6ebe099f5f 100644 --- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/META-INF/MANIFEST.MF @@ -2,7 +2,8 @@ Manifest-Version: 1.0 Require-Bundle: org.eclipse.core.expressions;bundle-version="3.4.300",
org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
- org.junit;bundle-version="4.10.0"
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.emf.facet.custom.core
Bundle-Vendor: %providerName
Fragment-Host: org.eclipse.papyrus.sysml.modelexplorer;bundle-version=
"0.10.0"
diff --git a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java index ee52b213f9e..165a3329338 100644 --- a/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java +++ b/tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests/test-gen/org/eclipse/papyrus/sysml/modelexplorer/tests/common/AbstractModelExplorerTest.java @@ -36,6 +36,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart; import org.eclipse.gmf.runtime.notation.Diagram; import org.eclipse.jface.viewers.IStructuredSelection; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.custom.Customization; import org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement; import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.core.resource.additional.AdditionalResourcesModel; @@ -207,9 +208,23 @@ public abstract class AbstractModelExplorerTest { Assert.assertNotNull("Impossible to find IBD_B1", iBD_B1_Diagram); bDD_Main_Diagram = getDiagram("BDD_Main"); Assert.assertNotNull("Impossible to find BDD_Main", bDD_Main_Diagram); + List<Customization> appliedCustomizations=org.eclipse.papyrus.views.modelexplorer.Activator.getDefault().getCustomizationManager().getManagedCustomizations(); + Customization SimpleUML=null; + Iterator<?>iter=appliedCustomizations.iterator(); + while(iter.hasNext()) { + Customization custo = (Customization)iter.next(); + if( custo.getName().equals("SimpleUML")){ + SimpleUML=custo; + } + } + org.junit.Assert.assertNotNull("Custom SimpleUML not found", SimpleUML); + org.eclipse.papyrus.views.modelexplorer.Activator.getDefault().getCustomizationManager().getManagedCustomizations().add(0, SimpleUML); + + + org.junit.Assert.assertEquals("bad order of applied Custom", "SimpleUML", appliedCustomizations.get(0).getName()); - /** end of generated selectable objects */ + /** end of generated selectable objects */ } /** @@ -347,12 +362,15 @@ public abstract class AbstractModelExplorerTest { if(bookViewPart != null) { modelExplorerView = (ModelExplorerView)bookViewPart.getActiveView(); } + modelExplorerView.getCommonViewer().expandAll(); // Set selection on new element in the model explorer if((modelExplorerView != null) && (newDiagrams != null)) { List<Diagram> semanticElementList = new ArrayList<Diagram>(); semanticElementList.addAll(newDiagrams); // reveal 'container' of the diagram - reveal(semanticElementList, modelExplorerView.getCommonViewer()); + + modelExplorerView.revealSemanticElement(semanticElementList); + //reveal(semanticElementList, modelExplorerView.getCommonViewer()); } else { throw new Exception("Impossible to find the model explorer required to select: " + newDiagrams); } @@ -476,6 +494,7 @@ public abstract class AbstractModelExplorerTest { * exception thrown in case of issue */ protected EObjectTreeElement findSemanticModelElementItem(Diagram diagramToFind) throws Exception { + selectAndRevealDiagram(diagramToFind); IStructuredSelection selection = (IStructuredSelection)modelExplorerPart.getSite().getSelectionProvider().getSelection(); Assert.assertEquals("one and only one diagram should be selected", 1, selection.size()); |