diff options
author | Christian W. Damus | 2014-05-21 12:46:25 +0000 |
---|---|---|
committer | Christian W. Damus | 2014-05-21 12:46:25 +0000 |
commit | 340ef2eabd056efd76dd42544050e45963f018be (patch) | |
tree | c47a02c5321c17463b1aa655e9a8df5001ce1f29 | |
parent | 5ab7454cf2cde49a09d81e09dfaf206acecdbb9d (diff) | |
download | org.eclipse.papyrus-340ef2eabd056efd76dd42544050e45963f018be.tar.gz org.eclipse.papyrus-340ef2eabd056efd76dd42544050e45963f018be.tar.xz org.eclipse.papyrus-340ef2eabd056efd76dd42544050e45963f018be.zip |
434594: Enable Model (Library/Metamodel/Profile) Registrations to be added to via code
https://bugs.eclipse.org/bugs/show_bug.cgi?id=434594
Fix test build compilation errors caused by API changes.
3 files changed, 13 insertions, 7 deletions
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java index 490ba01fcf8..0a862205e20 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestLayoutWithStereotype.java @@ -9,6 +9,7 @@ * Contributors:
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus (CEA) - bug 434594
*
*****************************************************************************/
package org.eclipse.papyrus.diagram.stereotypeproperty;
@@ -57,6 +58,7 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure; import org.eclipse.papyrus.uml.diagram.common.figure.node.StereotypePropertiesCompartment;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
+import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
import org.eclipse.uml2.uml.Element;
@@ -791,9 +793,9 @@ public class TestLayoutWithStereotype extends AbstractPapyrusTestCase { @Override
public void setUp() throws Exception {
super.setUp();
- RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
+ IRegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
- URI modelUri = registeredProfile.uri;
+ URI modelUri = registeredProfile.getUri();
final Resource modelResource = EMFHelper.getResourceSet(root).getResource(modelUri, true);
final Profile profile = (Profile)modelResource.getContents().get(0);
// PackageUtil.applyProfile(root,profile, false);
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java index 5386b9e9727..ad0c0f1c674 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java @@ -10,6 +10,7 @@ * Contributors:
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus (CEA) - bug 434594
*
*****************************************************************************/
package org.eclipse.papyrus.diagram.stereotypeproperty;
@@ -23,6 +24,7 @@ import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper; import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.Profile;
@@ -33,13 +35,13 @@ public class TestProfileApplication extends AbstractPapyrusTestCase { @Test
public void testProfileApplicationOnModel() throws ServiceException {
- RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
+ IRegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
assertTrue("Registered profile not found", registeredProfile != null);
- URI modelUri = registeredProfile.uri;
+ URI modelUri = registeredProfile.getUri();
final Resource modelResource = EMFHelper.getResourceSet(root).getResource(modelUri, true);
assertTrue("the registered profile is not a profile", (modelResource.getContents().get(0) instanceof Profile));
- assertTrue("strange profile", ("".equals(registeredProfile.qualifiednames)));
+ assertTrue("strange profile", ("".equals(registeredProfile.getQualifiedNames())));
final Profile profile = (Profile)modelResource.getContents().get(0);
// PackageUtil.applyProfile(root,profile, false);
final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry());
diff --git a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java index 0fe4b0a5862..cfb6b8e87ad 100644 --- a/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java +++ b/tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestStereotypeApplication.java @@ -10,6 +10,7 @@ * Contributors:
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus (CEA) - bug 434594
*
*****************************************************************************/
package org.eclipse.papyrus.diagram.stereotypeproperty;
@@ -46,6 +47,7 @@ import org.eclipse.papyrus.uml.diagram.common.figure.node.EditingFlowPage; import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
+import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
import org.eclipse.uml2.uml.Element;
@@ -191,9 +193,9 @@ public class TestStereotypeApplication extends AbstractPapyrusTestCase { @Override
public void setUp() throws Exception {
super.setUp();
- RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
+ IRegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
- URI modelUri = registeredProfile.uri;
+ URI modelUri = registeredProfile.getUri();
final Resource modelResource = EMFHelper.getResourceSet(root).getResource(modelUri, true);
final Profile profile = (Profile)modelResource.getContents().get(0);
// PackageUtil.applyProfile(root,profile, false);
|