diff options
author | Maged Elaasar | 2017-06-01 19:18:42 +0000 |
---|---|---|
committer | Florian Noyrit | 2017-06-06 15:05:32 +0000 |
commit | 17f500ad54d8dc9362b31a737ec19cd24627f297 (patch) | |
tree | 7afbc1ea66c80c935f0080f283f784ed99cc3720 /tests | |
parent | 273dd997e6462e2e1709e72dadb311460a60725c (diff) | |
download | org.eclipse.papyrus-17f500ad54d8dc9362b31a737ec19cd24627f297.tar.gz org.eclipse.papyrus-17f500ad54d8dc9362b31a737ec19cd24627f297.tar.xz org.eclipse.papyrus-17f500ad54d8dc9362b31a737ec19cd24627f297.zip |
Bug 516901 - Replaced references to Architecture model elements by their
unique ids instead. This will avoid such elements being loaded in user
model resource sets. Also, refactored the Architecture metamodel by
moving the id and icon attributes to ADElement so that all elements in
the model have them. This also include refactoring of the
uml.architecture model to give ids to various diagrams and tables. Also,
changed the UMLDiagramReconciler_1_3 to put the diagramKindId attribute
instead of the diagramKind reference in the PapyrusDiagramStyle. Also,
change the UMLTableReconciler_1_3 to a) test the proxy URI of the old
prototype instead of name (since the legacy viewpoint configuration
models were deleted earlier resulting in proxies) and to set the
tableKindId instead of changing the prototype (which is now deprecated).
Change-Id: I99413c1dd6daeaf395fc8c70b8b7ed2e0573acd1
Signed-off-by: Maged Elaasar <melaasar@gmail.com>
Diffstat (limited to 'tests')
10 files changed, 15 insertions, 23 deletions
diff --git a/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation b/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation index fa683c8a433..3bfdbc03053 100644 --- a/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation +++ b/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/canonical/css_leaktest.notation @@ -55,9 +55,8 @@ </children>
<styles xmi:type="notation:StringValueStyle" xmi:id="_b2JjccjxEeS9XIofcN-grg" name="diagram_compatibility_version" stringValue="1.3.0"/>
<styles xmi:type="notation:DiagramStyle" xmi:id="_b2JjcsjxEeS9XIofcN-grg"/>
- <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_b7wrIBMAEeeoPd87eel4nw">
+ <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_b7wrIBMAEeeoPd87eel4nw" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
<owner xmi:type="uml:Model" href="css_leaktest.uml#_b0QGAMjxEeS9XIofcN-grg"/>
- <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4gHDtEeWh-MssWmCB_A"/>
</styles>
<styles xmi:type="notation:EObjectListValueStyle" xmi:id="_yY3icMjxEeS9XIofcN-grg" name="css_stylesheets" eObjectListValue="_yY4wkMjxEeS9XIofcN-grg"/>
<element xmi:type="uml:Model" href="css_leaktest.uml#_b0QGAMjxEeS9XIofcN-grg"/>
diff --git a/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model-no-j2ee-constraints.notation b/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model-no-j2ee-constraints.notation index 5538fa02f69..ecc2551663c 100644 --- a/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model-no-j2ee-constraints.notation +++ b/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model-no-j2ee-constraints.notation @@ -74,9 +74,8 @@ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ef5KYrjVEeOUcroamP8z5w" x="221" y="120"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_J526gbjVEeOUcroamP8z5w"/>
- <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_nNAIIBL7EeeoPd87eel4nw">
+ <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_nNAIIBL7EeeoPd87eel4nw" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
<owner xmi:type="uml:Model" href="model-no-j2ee-constraints.uml#_J4wuULjVEeOUcroamP8z5w"/>
- <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4gHDtEeWh-MssWmCB_A"/>
</styles>
<styles xmi:type="notation:StringValueStyle" xmi:id="_nX5wkBL7EeeoPd87eel4nw" name="diagram_compatibility_version" stringValue="1.3.0"/>
<element xmi:type="uml:Model" href="model-no-j2ee-constraints.uml#_J4wuULjVEeOUcroamP8z5w"/>
diff --git a/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model.notation b/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model.notation index 7fbfcf3e544..14fb3cb60ca 100644 --- a/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model.notation +++ b/tests/junit/plugins/editor/org.eclipse.papyrus.editor.integration.tests/model/profile/model.notation @@ -74,9 +74,8 @@ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ef5KYrjVEeOUcroamP8z5w" x="221" y="120"/>
</children>
<styles xmi:type="notation:DiagramStyle" xmi:id="_J526gbjVEeOUcroamP8z5w"/>
- <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_HXCp4BMAEeeoPd87eel4nw">
+ <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_HXCp4BMAEeeoPd87eel4nw" diagramKindId="org.eclipse.papyrus.uml.diagram.class">
<owner xmi:type="uml:Model" href="model.uml#_J4wuULjVEeOUcroamP8z5w"/>
- <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4gHDtEeWh-MssWmCB_A"/>
</styles>
<styles xmi:type="notation:StringValueStyle" xmi:id="_HaFW0BMAEeeoPd87eel4nw" name="diagram_compatibility_version" stringValue="1.3.0"/>
<element xmi:type="uml:Model" href="model.uml#_J4wuULjVEeOUcroamP8z5w"/>
diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common.tests/src/org/eclipse/papyrus/infra/nattable/common/tests/AbstractTableHelperAPITest.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common.tests/src/org/eclipse/papyrus/infra/nattable/common/tests/AbstractTableHelperAPITest.java index b7d0a99c90d..36de56e689b 100644 --- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common.tests/src/org/eclipse/papyrus/infra/nattable/common/tests/AbstractTableHelperAPITest.java +++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common.tests/src/org/eclipse/papyrus/infra/nattable/common/tests/AbstractTableHelperAPITest.java @@ -19,6 +19,7 @@ import org.eclipse.core.runtime.IStatus; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.transaction.TransactionalEditingDomain; import org.eclipse.osgi.util.NLS; +import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager; import org.eclipse.papyrus.infra.architecture.representation.PapyrusRepresentationKind; import org.eclipse.papyrus.infra.core.resource.NotFoundException; import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager; @@ -224,7 +225,8 @@ public abstract class AbstractTableHelperAPITest extends AbstractPapyrusTest { Assert.assertEquals(createAssertMessage("The owner is not correct", tableType), tableOwner, tableToCheck.getOwner()); //$NON-NLS-1$ // we check the type - EObject proto = tableToCheck.getPrototype(); + ArchitectureDomainManager manager = ArchitectureDomainManager.getInstance(); + EObject proto = manager.getRepresentationKindById(tableToCheck.getTableKindId()); Assert.assertTrue(createAssertMessage("The view prototype seems not valid for a table", tableType), proto instanceof PapyrusTable); //$NON-NLS-1$ String implementation = ((PapyrusRepresentationKind) proto).getImplementationID(); diff --git a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableLabelProviderTest.java b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableLabelProviderTest.java index 89742d7407d..c57f1251f3f 100644 --- a/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableLabelProviderTest.java +++ b/tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests/src/org/eclipse/papyrus/infra/nattable/tests/tests/TableLabelProviderTest.java @@ -19,19 +19,14 @@ import static org.junit.Assume.assumeThat; import java.util.Collections; -import org.eclipse.emf.common.util.URI; import org.eclipse.jface.viewers.ILabelProvider; import org.eclipse.jface.viewers.ILabelProviderListener; import org.eclipse.jface.viewers.StructuredSelection; +import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager; import org.eclipse.papyrus.infra.core.architecture.ArchitectureDescriptionLanguage; import org.eclipse.papyrus.infra.core.architecture.ArchitectureDomain; import org.eclipse.papyrus.infra.core.architecture.ArchitectureFactory; -import org.eclipse.papyrus.infra.core.architecture.ArchitectureDescriptionPreferences; import org.eclipse.papyrus.infra.core.architecture.ArchitectureViewpoint; -import org.eclipse.papyrus.infra.architecture.ArchitectureDomainManager; -import org.eclipse.papyrus.infra.architecture.ArchitectureDomainPreferences; -import org.eclipse.papyrus.infra.architecture.ArchitectureDescriptionUtils; -import org.eclipse.papyrus.infra.core.resource.ModelSet; import org.eclipse.papyrus.infra.nattable.common.reconciler.TableVersioningUtils; import org.eclipse.papyrus.infra.nattable.model.nattable.NattableFactory; import org.eclipse.papyrus.infra.nattable.model.nattable.Table; @@ -134,6 +129,7 @@ public class TableLabelProviderTest { proto = RepresentationFactory.eINSTANCE.createPapyrusTable(); proto.setName("Test Table"); + proto.setId("org.eclipse.papyrus.infra.nattable.tests.table.test"); proto.setImplementationID("org.eclipse.papyrus.infra.nattable.tests.TestTable"); //proto.setConfiguration("TestTable"); language.getRepresentationKinds().add(proto); @@ -152,7 +148,7 @@ public class TableLabelProviderTest { table = NattableFactory.eINSTANCE.createTable(); TableVersioningUtils.stampCurrentVersion(table); table.setName("classes"); - table.setPrototype(proto); + table.setTableKindId(proto.getId()); table.setContext(package_); } diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/507488/model.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/507488/model.notation index ec1213377ba..faebf31ecc8 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/507488/model.notation +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests/resources/507488/model.notation @@ -190,9 +190,8 @@ </children> <styles xmi:type="notation:StringValueStyle" xmi:id="_aRQG4QfYEeecBNIdvHNERQ" name="diagram_compatibility_version" stringValue="1.3.0"/> <styles xmi:type="notation:DiagramStyle" xmi:id="_aRQG4gfYEeecBNIdvHNERQ"/> - <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_UyzUYA1uEeeQy-14Ti5JsQ"> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_UyzUYA1uEeeQy-14Ti5JsQ" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> <owner xmi:type="uml:Model" href="model.uml#_aM2vEAfYEeecBNIdvHNERQ"/> - <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4gHDtEeWh-MssWmCB_A"/> </styles> <element xmi:type="uml:Model" href="model.uml#_aM2vEAfYEeecBNIdvHNERQ"/> <edges xmi:type="notation:Connector" xmi:id="_kh3H0BCbEeeJu4TZy_sr1Q" type="Association_Edge" source="_jkm1YBCbEeeJu4TZy_sr1Q" target="_kCu70BCbEeeJu4TZy_sr1Q"> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF index a0335d60e04..bdb82b51b6e 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests/META-INF/MANIFEST.MF @@ -20,7 +20,8 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)", org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.infra.gmfdiag.preferences, - org.eclipse.ui.workbench + org.eclipse.ui.workbench,
+ org.eclipse.papyrus.tests.framework;bundle-version="[1.2.0,2.0.0)"
Export-Package: org.eclipse.papyrus.uml.diagram.sequence.tests, org.eclipse.papyrus.uml.diagram.sequence.tests.generation Bundle-Vendor: %Bundle-Vendor diff --git a/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionModelTest.notation b/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionModelTest.notation index 02db446f149..c939569f559 100755 --- a/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionModelTest.notation +++ b/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionModelTest.notation @@ -100,9 +100,8 @@ </children> <styles xmi:type="notation:StringValueStyle" xmi:id="_S-8MESgzEeeoAJG6t_MwCA" name="diagram_compatibility_version" stringValue="1.3.0"/> <styles xmi:type="notation:DiagramStyle" xmi:id="_S-8MEigzEeeoAJG6t_MwCA"/> - <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_S-8MEygzEeeoAJG6t_MwCA"> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_S-8MEygzEeeoAJG6t_MwCA" diagramKindId="org.eclipse.papyrus.uml.diagram.class"> <owner xmi:type="uml:Model" href="expressionModelTest.uml#_8TUvwCgyEeeoAJG6t_MwCA"/> - <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_zzf4gHDtEeWh-MssWmCB_A"/> </styles> <element xmi:type="uml:Model" href="expressionModelTest.uml#_8TUvwCgyEeeoAJG6t_MwCA"/> <edges xmi:type="notation:Connector" xmi:id="_3ooXtC0TEee42cCIRX36lw" type="StereotypeCommentLink" source="_TLBLIC0TEee42cCIRX36lw" target="_3ooXsC0TEee42cCIRX36lw"> diff --git a/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithURI.profile.notation b/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithURI.profile.notation index ce1c8998a0f..b5462753b19 100755 --- a/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithURI.profile.notation +++ b/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithURI.profile.notation @@ -76,9 +76,8 @@ </children> <styles xmi:type="notation:StringValueStyle" xmi:id="_o0MdkSgyEeeoAJG6t_MwCA" name="diagram_compatibility_version" stringValue="1.3.0"/> <styles xmi:type="notation:DiagramStyle" xmi:id="_o0MdkigyEeeoAJG6t_MwCA"/> - <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_o0MdkygyEeeoAJG6t_MwCA"> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_o0MdkygyEeeoAJG6t_MwCA" diagramKindId="org.eclipse.papyrus.uml.diagram.profile"> <owner xmi:type="uml:Profile" href="expressionProfileWithURI.profile.uml#_ozrgMCgyEeeoAJG6t_MwCA"/> - <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_UekVgHDwEeWh-MssWmCB_A"/> </styles> <element xmi:type="uml:Profile" href="expressionProfileWithURI.profile.uml#_ozrgMCgyEeeoAJG6t_MwCA"/> <edges xmi:type="notation:Connector" xmi:id="_tP83MCgyEeeoAJG6t_MwCA" type="StereotypeCommentLink" source="_tPCRMCgyEeeoAJG6t_MwCA" target="_tP8QICgyEeeoAJG6t_MwCA"> diff --git a/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithoutURI.profile.notation b/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithoutURI.profile.notation index 38a15f8cda4..c1ea329c48c 100755 --- a/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithoutURI.profile.notation +++ b/tests/junit/plugins/uml/expressions/org.eclipse.papyrus.uml.expressions.tests/resources/expressionProfileWithoutURI.profile.notation @@ -76,9 +76,8 @@ </children> <styles xmi:type="notation:StringValueStyle" xmi:id="_o0MdkSgyEeeoAJG6t_MwCA" name="diagram_compatibility_version" stringValue="1.3.0"/> <styles xmi:type="notation:DiagramStyle" xmi:id="_o0MdkigyEeeoAJG6t_MwCA"/> - <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_o0MdkygyEeeoAJG6t_MwCA"> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_o0MdkygyEeeoAJG6t_MwCA" diagramKindId="org.eclipse.papyrus.uml.diagram.profile"> <owner xmi:type="uml:Profile" href="expressionProfileWithoutURI.profile.uml#_ozrgMCgyEeeoAJG6t_MwCA"/> - <diagramKind xmi:type="gmfdiagrepresentation:PapyrusDiagram" href="platform:/plugin/org.eclipse.papyrus.uml.architecture/model/uml.architecture#_UekVgHDwEeWh-MssWmCB_A"/> </styles> <element xmi:type="uml:Profile" href="expressionProfileWithoutURI.profile.uml#_ozrgMCgyEeeoAJG6t_MwCA"/> <edges xmi:type="notation:Connector" xmi:id="_tP83MCgyEeeoAJG6t_MwCA" type="StereotypeCommentLink" source="_tPCRMCgyEeeoAJG6t_MwCA" target="_tP8QICgyEeeoAJG6t_MwCA"> |