diff options
author | Christian W. Damus | 2018-10-30 19:52:47 +0000 |
---|---|---|
committer | Christian W. Damus | 2018-10-31 17:00:53 +0000 |
commit | 12ec2ee6a2721d0998d419f400ee09728e5f2e9c (patch) | |
tree | 1fb520d253cd979d13d783c0d1bca7f10fe66db5 /tests | |
parent | dae2a89d2dc6314a9c73167a96197e5a2f5d33ff (diff) | |
download | org.eclipse.papyrus-12ec2ee6a2721d0998d419f400ee09728e5f2e9c.tar.gz org.eclipse.papyrus-12ec2ee6a2721d0998d419f400ee09728e5f2e9c.tar.xz org.eclipse.papyrus-12ec2ee6a2721d0998d419f400ee09728e5f2e9c.zip |
Bug 535696: [UsecaseDiagram] Strategy does not work when move use case in subject
Ensure that the drop strategy for use cases in subjects does not
duplicate the view when moving an existing use case within the subject
or when moving an existing use case from outside of the subject into
the subject. This also covers the case of dropping a use case from
the model explorer into a subject that is already presenting that
use case within it, but in that case the drop strategy is just
skipped and does not participate further in the drop gesture.
Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
Change-Id: Ic0f643b1da9aacbbba03a2f2673c93753aceb3c6
Signed-off-by: Christian W. Damus <give.a.damus@gmail.com>
Diffstat (limited to 'tests')
10 files changed, 274 insertions, 16 deletions
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.suite.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.suite.tests/META-INF/MANIFEST.MF index 5f0a2f5eb9a..525a76108d4 100755 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.suite.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.suite.tests/META-INF/MANIFEST.MF @@ -19,7 +19,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.diagram.deployment.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.uml.diagram.component.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.uml.diagram.timing.tests;bundle-version="[1.2.0,2.0.0)", - org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="[1.2.0,2.0.0)", + org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="[4.1.0,5.0.0)", org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.uml.diagram.statemachine.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.uml.diagram.communication.tests;bundle-version="[1.2.0,2.0.0)", diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath index 098194ca4b7..70bb9bba714 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.classpath @@ -1,7 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> <classpath> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/> - <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> - <classpathentry kind="src" path="src"/> + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/> + <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"> + <accessrules> + <accessrule kind="accessible" pattern="org/eclipse/papyrus/uml/diagram/usecase/**"/> + </accessrules> + </classpathentry> + <classpathentry kind="src" path="src"> + <attributes> + <attribute name="test" value="true"/> + </attributes> + </classpathentry> <classpathentry kind="output" path="bin"/> </classpath> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs index 19dd3450bfd..74c6d08d7e4 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/.settings/org.eclipse.jdt.core.prefs @@ -1,16 +1,16 @@ eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.7 +org.eclipse.jdt.core.compiler.compliance=1.8 org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.7 +org.eclipse.jdt.core.compiler.source=1.8 org.eclipse.jdt.core.formatter.align_type_members_on_columns=false org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0 diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF index 49abf420282..ed557cbf89e 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/META-INF/MANIFEST.MF @@ -9,7 +9,7 @@ Require-Bundle: org.eclipse.ui, org.eclipse.papyrus.uml.diagram.common;bundle-version="[3.0.0,4.0.0)", org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0", org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="[3.0.0,4.0.0)", - org.eclipse.papyrus.uml.diagram.usecase;bundle-version="[4.0.0,5.0.0)", + org.eclipse.papyrus.uml.diagram.usecase;bundle-version="[4.1.0,5.0.0)", org.eclipse.papyrus.uml.diagram.tests;bundle-version="[1.2.0,2.0.0)", org.eclipse.papyrus.uml.service.types;bundle-version="[4.0.0,5.0.0)", org.eclipse.uml2.uml;bundle-version="[5.3.0,6.0.0)", @@ -19,16 +19,18 @@ Require-Bundle: org.eclipse.ui, org.junit;bundle-version="4.10.0", org.eclipse.papyrus.junit.framework;bundle-version="[1.2.0,2.0.0)", org.eclipse.xtend.lib;bundle-version="2.8.1", - org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)" + org.eclipse.papyrus.infra.ui;bundle-version="[2.0.0,3.0.0)", + org.eclipse.papyrus.junit.utils;bundle-version="[2.2.0,3.0.0)", + org.eclipse.papyrus.infra.gmfdiag.dnd Export-Package: org.eclipse.papyrus.uml.diagram.usecase.tests, org.eclipse.papyrus.uml.diagram.usecase.tests.canonical Bundle-Vendor: %providerName Bundle-ActivationPolicy: lazy -Bundle-Version: 1.2.100.qualifier +Bundle-Version: 4.1.0.qualifier Bundle-Name: %pluginName Bundle-Localization: plugin Bundle-ManifestVersion: 2 Bundle-Activator: org.eclipse.papyrus.uml.diagram.usecase.tests.Activator Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.usecase.tests;singleton:=true -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 +Bundle-RequiredExecutionEnvironment: JavaSE-1.8 Automatic-Module-Name: org.eclipse.papyrus.uml.diagram.usecase.tests diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml index a5b61726e8f..b20dafb29f9 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/pom.xml @@ -10,7 +10,7 @@ </parent> <groupId>org.eclipse.papyrus.tests</groupId> <artifactId>org.eclipse.papyrus.uml.diagram.usecase.tests</artifactId> - <version>1.2.100-SNAPSHOT</version> + <version>4.1.0-SNAPSHOT</version> <packaging>eclipse-test-plugin</packaging> <properties> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java index 8b1fcf8d5fe..9a7561a9d6e 100644 --- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/AllTests.java @@ -1,7 +1,6 @@ /***************************************************************************** - * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others. + * Copyright (c) 2009, 2018 CEA LIST, Christian W. Damus, and others. * - * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 * which accompanies this distribution, and is available at @@ -11,7 +10,7 @@ * * Contributors: * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation - * Christian W. Damus - bug 464647 + * Christian W. Damus - bugs 464647, 535696 * *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.usecase.tests; @@ -30,7 +29,7 @@ import org.junit.runners.Suite.SuiteClasses; // canonical AllCanonicalTests.class, RoundedCompartmentTest.class, - + UsecaseToSubjectinUsecaseDiagramDropStrategyTest.class, }) @DynamicClasses("org.eclipse.papyrus.uml.diagram.usecase.test.AllGenTests") public class AllTests { diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/UsecaseToSubjectinUsecaseDiagramDropStrategyTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/UsecaseToSubjectinUsecaseDiagramDropStrategyTest.java new file mode 100644 index 00000000000..e20fa751573 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/src/org/eclipse/papyrus/uml/diagram/usecase/tests/UsecaseToSubjectinUsecaseDiagramDropStrategyTest.java @@ -0,0 +1,191 @@ +/***************************************************************************** + * Copyright (c) 2018 Christian W. Damus and others. + * + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License 2.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-2.0/ + * + * SPDX-License-Identifier: EPL-2.0 + * + * Contributors: + * Christian W. Damus - Initial API and implementation + * + *****************************************************************************/ + +package org.eclipse.papyrus.uml.diagram.usecase.tests; + +import static org.eclipse.papyrus.junit.matchers.CommandMatchers.GEF.canExecute; +import static org.hamcrest.CoreMatchers.anything; +import static org.hamcrest.CoreMatchers.hasItem; +import static org.hamcrest.CoreMatchers.is; +import static org.hamcrest.MatcherAssert.assertThat; + +import java.util.List; + +import org.eclipse.draw2d.geometry.Point; +import org.eclipse.draw2d.geometry.Rectangle; +import org.eclipse.emf.common.util.TreeIterator; +import org.eclipse.emf.ecore.EObject; +import org.eclipse.gef.EditPart; +import org.eclipse.gef.RequestConstants; +import org.eclipse.gef.commands.Command; +import org.eclipse.gef.requests.ChangeBoundsRequest; +import org.eclipse.gmf.runtime.common.core.command.CompositeCommand; +import org.eclipse.gmf.runtime.common.core.command.ICommand; +import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart; +import org.eclipse.gmf.runtime.emf.type.core.commands.SetValueCommand; +import org.eclipse.gmf.runtime.emf.type.core.requests.SetRequest; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil; +import org.eclipse.papyrus.infra.gmfdiag.common.utils.EditPartUtils; +import org.eclipse.papyrus.infra.gmfdiag.dnd.strategy.DropStrategy; +import org.eclipse.papyrus.junit.utils.rules.ActiveDiagram; +import org.eclipse.papyrus.junit.utils.rules.PapyrusEditorFixture; +import org.eclipse.papyrus.junit.utils.rules.PluginResource; +import org.eclipse.papyrus.uml.diagram.usecase.dnd.strategy.UsecaseToSubjectinUsecaseDiagramDropStrategy; +import org.eclipse.papyrus.uml.diagram.usecase.edit.parts.SubjectComponentUsecasesEditPart; +import org.eclipse.uml2.uml.Classifier; +import org.eclipse.uml2.uml.UMLPackage; +import org.eclipse.uml2.uml.UseCase; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; + +import com.google.common.collect.Lists; + +/** + * Test cases for the drop strategy that puts use cases into subjects. + */ +@PluginResource("test/resources/models/bug535696.di") +@ActiveDiagram("use cases") +public class UsecaseToSubjectinUsecaseDiagramDropStrategyTest { + + @Rule + public final PapyrusEditorFixture editor = new PapyrusEditorFixture(); + + private Classifier subject; + private UseCase useCaseInSubject; + private UseCase useCaseNotInSubject; + + /** + * Initializes me. + */ + public UsecaseToSubjectinUsecaseDiagramDropStrategyTest() { + super(); + } + + /** + * Verify that moving a use case shape already within a subject shape does not duplicate the + * use case shape. + */ + @Test + public void moveUseCaseWithinSubject() { + IGraphicalEditPart useCaseEP = getEditPart(useCaseInSubject); + + Rectangle bounds = useCaseEP.getFigure().getBounds().getCopy(); + bounds.translate(50, -50); + + ChangeBoundsRequest req = new ChangeBoundsRequest(RequestConstants.REQ_MOVE); + req.setEditParts(useCaseEP); + req.setMoveDelta(new Point(50, -50)); + req.setLocation(bounds.getCenter()); + + Command moveCommand = useCaseEP.getCommand(req); + assertThat(moveCommand, canExecute()); + editor.execute(moveCommand); + + List<IGraphicalEditPart> all = getAllTopEditParts(useCaseInSubject); + assertThat("Wrong number of use case views", all.size(), is(1)); + } + + /** + * Verify that moving a use case shape from outside of a subject shape into the subject + * does not leave the outside shape also. + */ + @Test + public void moveUseCaseIntoSubject() { + IGraphicalEditPart useCaseEP = getEditPart(useCaseNotInSubject); + EditPart compartmentEP = getCompartment(getEditPart(subject)); + + Rectangle bounds = useCaseEP.getFigure().getBounds().getCopy(); + bounds.translate(-400, 0); + + ChangeBoundsRequest req = new ChangeBoundsRequest(RequestConstants.REQ_MOVE); + req.setEditParts(useCaseEP); + req.setMoveDelta(new Point(-400, 0)); + req.setLocation(bounds.getCenter()); + + DropStrategy strategy = createDropStrategy(); + Command moveCommand = strategy.getCommand(req, compartmentEP); + assertThat(moveCommand, canExecute()); + editor.execute(moveCommand); + + List<IGraphicalEditPart> all = getAllTopEditParts(useCaseNotInSubject); + assertThat("Wrong number of use case views", all.size(), is(1)); + } + + // + // Test framework + // + + @Before + public void findModelElements() { + subject = (Classifier) editor.getModel().getOwnedType("Subject"); + useCaseInSubject = subject.getOwnedUseCase("In Subject"); + useCaseNotInSubject = (UseCase) subject.getPackage().getOwnedType("Not In Subject"); + } + + IGraphicalEditPart getEditPart(EObject element) { + return getAllTopEditParts(element).get(0); + } + + List<IGraphicalEditPart> getAllTopEditParts(EObject element) { + List<IGraphicalEditPart> result = Lists.newArrayListWithExpectedSize(1); + + TreeIterator<EditPart> iter = DiagramEditPartsUtil.getAllContents(editor.getActiveDiagram(), true); + while (iter.hasNext()) { + EditPart next = iter.next(); + if (next instanceof IGraphicalEditPart) { + IGraphicalEditPart gep = (IGraphicalEditPart) next; + if (gep.resolveSemanticElement() == element) { + result.add(gep); + + // Don't get any nested edit-parts such as compartments, labels, etc. + iter.prune(); + } + } + } + + assertThat("Edit-part not found", result, hasItem(anything())); + return result; + } + + EditPart getCompartment(EditPart shapeEditPart) { + return EditPartUtils.findFirstChildEditPartWithId(shapeEditPart, SubjectComponentUsecasesEditPart.VISUAL_ID); + } + + /** + * Create a specialization of the drop strategy under test that doesn't pop up any dialog but just + * always updates the use case owner and subject. + * + * @return the drop strategy fixture + */ + DropStrategy createDropStrategy() { + return new UsecaseToSubjectinUsecaseDiagramDropStrategy() { + @Override + protected ICommand getEditSlotsCommand(UseCase useCase, Classifier subject) { + CompositeCommand result = new CompositeCommand("Update owner and subject"); + + SetRequest setSubjectRequest = new SetRequest(useCase, UMLPackage.Literals.USE_CASE__SUBJECT, subject); + SetValueCommand setSubjectCommand = new SetValueCommand(setSubjectRequest); + result.add(setSubjectCommand); + + SetRequest setOwnerRequest = new SetRequest(subject, UMLPackage.Literals.CLASSIFIER__OWNED_USE_CASE, useCase); + SetValueCommand setOwnerCommand = new SetValueCommand(setOwnerRequest); + result.add(setOwnerCommand); + + return result.reduce(); + } + }; + } +} diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.di new file mode 100644 index 00000000000..8c549eecdc6 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.di @@ -0,0 +1,2 @@ +<?xml version="1.0" encoding="UTF-8"?> +<architecture:ArchitectureDescription xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:architecture="http://www.eclipse.org/papyrus/infra/core/architecture" contextId="org.eclipse.papyrus.infra.services.edit.TypeContext"/> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.notation new file mode 100644 index 00000000000..bd3cc664bc9 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.notation @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/gmfdiag/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_clryANx0EeigHN0P5cMFsg" type="UseCase" name="use cases" measurementUnit="Pixel"> + <children xmi:type="notation:Shape" xmi:id="_e0yt4Nx0EeigHN0P5cMFsg" type="Classifier_SubjectShape"> + <children xmi:type="notation:DecorationNode" xmi:id="_e0zU8Nx0EeigHN0P5cMFsg" type="Classifier_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_e0zU8dx0EeigHN0P5cMFsg" type="Classifier_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_e0zU8tx0EeigHN0P5cMFsg" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_e0zU89x0EeigHN0P5cMFsg" type="Classifier_UseCaseCompartment"> + <children xmi:type="notation:Shape" xmi:id="_gV9lsNx0EeigHN0P5cMFsg" type="UseCase_Shape_CCN"> + <children xmi:type="notation:DecorationNode" xmi:id="_gV9lstx0EeigHN0P5cMFsg" type="UseCase_NameLabel_CCN"/> + <children xmi:type="notation:DecorationNode" xmi:id="_gV9ls9x0EeigHN0P5cMFsg" type="UseCase_FloatingNameLabel_CCN"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_gV9ltNx0EeigHN0P5cMFsg" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_gV-MwNx0EeigHN0P5cMFsg" type="UseCase_ExtensionPointCompartment_CCN"> + <styles xmi:type="notation:SortingStyle" xmi:id="_gV-Mwdx0EeigHN0P5cMFsg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_gV-Mwtx0EeigHN0P5cMFsg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gV-Mw9x0EeigHN0P5cMFsg"/> + </children> + <element xmi:type="uml:UseCase" href="bug535696.uml#_gV57UNx0EeigHN0P5cMFsg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gV9lsdx0EeigHN0P5cMFsg" x="74" y="214"/> + </children> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_e0zU9Nx0EeigHN0P5cMFsg"/> + </children> + <element xmi:type="uml:Class" href="bug535696.uml#_e0wRoNx0EeigHN0P5cMFsg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_e0yt4dx0EeigHN0P5cMFsg" x="100" y="120" width="361" height="441"/> + </children> + <children xmi:type="notation:Shape" xmi:id="_iHyIoNx0EeigHN0P5cMFsg" type="UseCase_Shape"> + <children xmi:type="notation:DecorationNode" xmi:id="_iHyIotx0EeigHN0P5cMFsg" type="UseCase_NameLabel"/> + <children xmi:type="notation:DecorationNode" xmi:id="_iHyIo9x0EeigHN0P5cMFsg" type="UseCase_FloatingNameLabel"> + <layoutConstraint xmi:type="notation:Location" xmi:id="_iHyIpNx0EeigHN0P5cMFsg" y="15"/> + </children> + <children xmi:type="notation:BasicCompartment" xmi:id="_iHyIpdx0EeigHN0P5cMFsg" type="UseCase_ExtensionPointCompartment"> + <styles xmi:type="notation:SortingStyle" xmi:id="_iHyIptx0EeigHN0P5cMFsg"/> + <styles xmi:type="notation:FilteringStyle" xmi:id="_iHyIp9x0EeigHN0P5cMFsg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iHyIqNx0EeigHN0P5cMFsg"/> + </children> + <element xmi:type="uml:UseCase" href="bug535696.uml#_iHw6gNx0EeigHN0P5cMFsg"/> + <layoutConstraint xmi:type="notation:Bounds" xmi:id="_iHyIodx0EeigHN0P5cMFsg" x="540" y="260"/> + </children> + <styles xmi:type="notation:StringValueStyle" xmi:id="_clryAdx0EeigHN0P5cMFsg" name="diagram_compatibility_version" stringValue="1.4.0"/> + <styles xmi:type="notation:DiagramStyle" xmi:id="_clryAtx0EeigHN0P5cMFsg"/> + <styles xmi:type="style:PapyrusDiagramStyle" xmi:id="_clryA9x0EeigHN0P5cMFsg" diagramKindId="org.eclipse.papyrus.uml.diagram.useCase"> + <owner xmi:type="uml:Model" href="bug535696.uml#_clI_cNx0EeigHN0P5cMFsg"/> + </styles> + <element xmi:type="uml:Model" href="bug535696.uml#_clI_cNx0EeigHN0P5cMFsg"/> +</notation:Diagram> diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.uml new file mode 100644 index 00000000000..d57320e50e4 --- /dev/null +++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests/test/resources/models/bug535696.uml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_clI_cNx0EeigHN0P5cMFsg" name="bug535696"> + <packageImport xmi:type="uml:PackageImport" xmi:id="_cqn8YNx0EeigHN0P5cMFsg"> + <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/> + </packageImport> + <packagedElement xmi:type="uml:Class" xmi:id="_e0wRoNx0EeigHN0P5cMFsg" name="Subject" useCase="_gV57UNx0EeigHN0P5cMFsg"> + <ownedUseCase xmi:type="uml:UseCase" xmi:id="_gV57UNx0EeigHN0P5cMFsg" name="In Subject" subject="_e0wRoNx0EeigHN0P5cMFsg"/> + </packagedElement> + <packagedElement xmi:type="uml:UseCase" xmi:id="_iHw6gNx0EeigHN0P5cMFsg" name="Not In Subject"/> +</uml:Model> |