Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java')
-rw-r--r--tests/junit/plugins/uml/org.eclipse.papyrus.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/diagram/stereotypeproperty/TestProfileApplication.java7
1 files changed, 4 insertions, 3 deletions
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 1cd4991c5e9..2e807e5dc7c 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
@@ -18,7 +18,8 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.core.utils.EditorUtils;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
import org.eclipse.uml2.uml.Model;
@@ -29,7 +30,7 @@ import org.junit.Test;
public class TestProfileApplication extends AbstractPapyrusTestCase {
@Test
- public void testToManageModel() {
+ public void testToManageModel() throws ServiceException {
RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
assertTrue("Registered profile not found", registeredProfile != null);
@@ -39,7 +40,7 @@ public class TestProfileApplication extends AbstractPapyrusTestCase {
assertTrue("strange profile", ("".equals(registeredProfile.qualifiednames)));
final Profile profile = (Profile)modelResource.getContents().get(0);
// PackageUtil.applyProfile(root,profile, false);
- final TransactionalEditingDomain domain = EditorUtils.getTransactionalEditingDomain();
+ final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry());
AppliedProfileCommand appliedProfileCommand = new AppliedProfileCommand(domain, root, profile);
domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(appliedProfileCommand));

Back to the top