Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Monnier2016-11-23 13:36:08 +0000
committerLaurent Redor2017-03-24 11:03:11 +0000
commit47ed885a5666d0b8c1e597eee865dc0cfbe0ce53 (patch)
tree0da0a4e5f63b76921f043ab06328ab66aa3faa6e
parentfd45868c116805919c041bdc2e099cdc9b3fde35 (diff)
downloadorg.eclipse.sirius-47ed885a5666d0b8c1e597eee865dc0cfbe0ce53.tar.gz
org.eclipse.sirius-47ed885a5666d0b8c1e597eee865dc0cfbe0ce53.tar.xz
org.eclipse.sirius-47ed885a5666d0b8c1e597eee865dc0cfbe0ce53.zip
[506420] Make figures under decorator selectable
* Add a specific EditPolicy, SiriusDecoratorEditPolicy, to provide a specific Decoration that allows to select diagram elements underneath even if it is not the parent of the decoration (overlapping). * The default selection tool has also been overridden to allow the tooltip of the decoration to be still available. * A test has been added to check selection of diagram elements underneath decorator. Bug:506420 Change-Id: I1324c2b596978f2d737b16518a51e76b56023de9 Signed-off-by: Steve Monnier <steve.monnier@obeo.fr> Signed-off-by: Laurent Redor <laurent.redor@obeo.fr>
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractBorderedDiagramElementEditPart.java11
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramBorderNodeEditPart.java3
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SiriusDecoratorEditPolicy.java193
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/part/SiriusDiagramEditor.java11
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/palette/SiriusSelectionToolEx.java71
-rw-r--r--plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/part/SiriusDiagramGraphicalViewer.java22
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.html9
-rw-r--r--plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile5
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/condition/CheckSelectedCondition.java12
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/editor/SWTBotSiriusDiagramEditor.java26
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.ecore11
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.odesign91
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/representations.aird465
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/NodeWithDecoratorSelectionTest.java119
-rw-r--r--plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java3
15 files changed, 1043 insertions, 9 deletions
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractBorderedDiagramElementEditPart.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractBorderedDiagramElementEditPart.java
index 2fa9d6b834..26f6e02df2 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractBorderedDiagramElementEditPart.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractBorderedDiagramElementEditPart.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2013, 2015 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2013, 2017 THALES GLOBAL SERVICES and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,12 +18,14 @@ import org.eclipse.gef.SnapToHelper;
import org.eclipse.gef.editparts.ZoomManager;
import org.eclipse.gmf.runtime.diagram.core.listener.NotificationListener;
import org.eclipse.gmf.runtime.diagram.ui.editparts.AbstractBorderedShapeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.draw2d.ui.figures.IBorderItemLocator;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.sirius.diagram.DDiagramElement;
import org.eclipse.sirius.diagram.ui.edit.internal.part.AbstractDiagramNodeEditPartOperation;
import org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramElementEditPartOperation;
import org.eclipse.sirius.diagram.ui.edit.internal.part.EditStatusUpdater;
+import org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusDecoratorEditPolicy;
import org.eclipse.sirius.diagram.ui.tools.api.permission.EditPartAuthorityListener;
import org.eclipse.sirius.diagram.ui.tools.internal.ruler.SiriusSnapToHelperUtil;
import org.eclipse.sirius.ecore.extender.business.api.permission.IPermissionAuthority;
@@ -58,6 +60,13 @@ public abstract class AbstractBorderedDiagramElementEditPart extends AbstractBor
super(view);
}
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ removeEditPolicy(EditPolicyRoles.DECORATION_ROLE);
+ installEditPolicy(EditPolicyRoles.DECORATION_ROLE, new SiriusDecoratorEditPolicy());
+ }
+
/**
* {@inheritDoc}
*
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramBorderNodeEditPart.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramBorderNodeEditPart.java
index d2b7e23b70..c1ca00ff1d 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramBorderNodeEditPart.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/api/part/AbstractDiagramBorderNodeEditPart.java
@@ -63,6 +63,7 @@ import org.eclipse.sirius.diagram.ui.edit.internal.part.DiagramNodeEditPartOpera
import org.eclipse.sirius.diagram.ui.edit.internal.part.EditStatusUpdater;
import org.eclipse.sirius.diagram.ui.edit.internal.part.PortLayoutHelper;
import org.eclipse.sirius.diagram.ui.edit.internal.validators.ResizeValidator;
+import org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusDecoratorEditPolicy;
import org.eclipse.sirius.diagram.ui.graphical.edit.policies.SpecificBorderItemSelectionEditPolicy;
import org.eclipse.sirius.diagram.ui.internal.view.factories.ViewLocationHint;
import org.eclipse.sirius.diagram.ui.provider.Messages;
@@ -142,6 +143,8 @@ public abstract class AbstractDiagramBorderNodeEditPart extends BorderedBorderIt
// Add the Sirius feedback policy to have a the same lighter color for
// guides of snap features for border nodes on BorderNode
installEditPolicy(EditPolicyRoles.SNAP_FEEDBACK_ROLE, new SiriusSnapFeedbackPolicy());
+ removeEditPolicy(EditPolicyRoles.DECORATION_ROLE);
+ installEditPolicy(EditPolicyRoles.DECORATION_ROLE, new SiriusDecoratorEditPolicy());
}
@Override
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SiriusDecoratorEditPolicy.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SiriusDecoratorEditPolicy.java
new file mode 100644
index 0000000000..a811327071
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/graphical/edit/policies/SiriusDecoratorEditPolicy.java
@@ -0,0 +1,193 @@
+/*******************************************************************************
+ * Copyright (c) 2017 THALES GLOBAL SERVICES and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.diagram.ui.graphical.edit.policies;
+
+import java.util.HashMap;
+import java.util.Iterator;
+
+import org.eclipse.draw2d.IFigure;
+import org.eclipse.draw2d.Locator;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPolicy;
+import org.eclipse.gef.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramRootEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.DecorationEditPolicy;
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.diagram.ui.internal.services.decorator.DecoratorService;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.Decoration;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecoration;
+import org.eclipse.gmf.runtime.diagram.ui.services.decorator.IDecorator;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramBorderNodeEditPart;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramNodeEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractDNodeContainerCompartmentEditPart;
+import org.eclipse.sirius.ext.gmf.runtime.editparts.GraphicalHelper;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * A specific {@link DecorationEditPolicy} that provides its own {@link DecoratorTarget} in order to ignore the
+ * decorator when selected and select the diagram element behind it instead. This way if a children (node or border
+ * node) is under a decorator of the parent node, it is still selectable.
+ *
+ * @author <a href="mailto:florian.barbin@obeo.fr">Florian Barbin</a>
+ *
+ */
+@SuppressWarnings("restriction")
+public class SiriusDecoratorEditPolicy extends DecorationEditPolicy {
+
+ /**
+ * This method was overridden in order to create a {@link SiriusDecoratorTarget} instead of a default
+ * {@link DecoratorTarget}.
+ */
+ @SuppressWarnings({ "rawtypes" })
+ @Override
+ public void activate() {
+ if (decorators == null) {
+ decorators = new HashMap();
+ DecoratorService.getInstance().createDecorators(new SiriusDecoratorTarget());
+ }
+ if (decorators != null) {
+ for (Iterator iter = decorators.values().iterator(); iter.hasNext(); /* */) {
+ IDecorator decorator = (IDecorator) iter.next();
+ decorator.activate();
+ }
+ }
+ }
+
+ /**
+ * This method was overridden in order to create a {@link SiriusDecoratorTarget} instead of a default
+ * {@link DecoratorTarget}.
+ */
+ @SuppressWarnings({ "rawtypes" })
+ @Override
+ public void refresh() {
+ if (decorators == null) {
+ decorators = new HashMap();
+ DecoratorService.getInstance().createDecorators(new SiriusDecoratorTarget());
+ }
+ for (Iterator iter = decorators.values().iterator(); iter.hasNext(); /* */) {
+ IDecorator decorator = (IDecorator) iter.next();
+ decorator.refresh();
+ }
+ }
+
+ /**
+ * A custom {@link DecoratorTarget} to provide a custom {@link Decoration}.
+ *
+ * @author <a href="mailto:steve.monnier@obeo.fr">Steve Monnier</a>
+ *
+ */
+ private final class SiriusDecoratorTarget extends DecoratorTarget {
+
+ /**
+ * A specific {@link Decoration} whose selection selects the EditPart below, not automatically the parent
+ * EditPart.
+ *
+ * @author <a href="mailto:steve.monnier@obeo.fr">Steve Monnier</a>
+ *
+ */
+ private final class SiriusDecoration extends Decoration {
+ @Override
+ public IFigure findMouseEventTargetAt(int x, int y) {
+ if (checkHostEditPart(x, y)) {
+ IGraphicalEditPart bestChildCandidate = findBestChildCandidate((IGraphicalEditPart) getHost(), new Point(x, y));
+ if (bestChildCandidate != null) {
+ return bestChildCandidate.getFigure();
+ }
+ }
+ return super.findMouseEventTargetAt(x, y);
+ }
+
+ private boolean checkHostEditPart(int x, int y) {
+ if (getHost() instanceof IGraphicalEditPart) {
+ EditPolicy editPolicy = getHost().getEditPolicy(EditPolicyRoles.DECORATION_ROLE);
+ IFigure figure = ((IGraphicalEditPart) getHost()).getFigure();
+ if (editPolicy instanceof SiriusDecoratorEditPolicy && figure.getBounds().contains(x, y)) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ /**
+ * Looks recursively in the border node for the "deepest" one that contain the location where the mouse
+ * clicked.
+ *
+ * @param graphicalEditPart
+ * the current {@link IGraphicalEditPart} to investigate
+ * @param startLocation
+ * the location where the mouse clicked
+ * @return the best candidate for the selection
+ */
+ private IGraphicalEditPart findBestChildCandidate(IGraphicalEditPart graphicalEditPart, Point startLocation) {
+ IGraphicalEditPart bestCandidate = null;
+ // Firstly, search in border node (they are over other children)
+ for (AbstractDiagramBorderNodeEditPart editPart : Iterables.filter(graphicalEditPart.getChildren(), AbstractDiagramBorderNodeEditPart.class)) {
+ if (editPart.getFigure().getBounds().contains(startLocation)) {
+ bestCandidate = editPart;
+ }
+ IGraphicalEditPart bestChildBorderNodeCandidate = findBestChildCandidate(editPart, startLocation);
+ if (bestChildBorderNodeCandidate != null) {
+ bestCandidate = bestChildBorderNodeCandidate;
+ }
+ }
+ // Secondly, if nothing was found, search in node children
+ if (bestCandidate == null) {
+ if (graphicalEditPart instanceof AbstractDiagramContainerEditPart) {
+ for (AbstractDNodeContainerCompartmentEditPart compartmentEditPart : Iterables.filter(graphicalEditPart.getChildren(), AbstractDNodeContainerCompartmentEditPart.class)) {
+ for (AbstractDiagramNodeEditPart editPart : Iterables.filter(compartmentEditPart.getChildren(), AbstractDiagramNodeEditPart.class)) {
+ if (GraphicalHelper.getAbsoluteBoundsIn100Percent(editPart).contains(startLocation)) {
+ bestCandidate = editPart;
+ IGraphicalEditPart childBestCandidate = findBestChildCandidate(editPart, startLocation);
+ if (childBestCandidate != null) {
+ bestCandidate = childBestCandidate;
+ }
+ break;
+ }
+ }
+ if (bestCandidate != null) {
+ break;
+ }
+ }
+ }
+ }
+ return bestCandidate;
+ }
+ }
+
+ /**
+ * This method was overridden in order to create a decoration that on selection behave as if it did not exist
+ * (allowing to select the diagram element underneath).
+ */
+ @Override
+ public IDecoration addDecoration(IFigure figure, Locator locator, boolean isVolatile) {
+
+ Decoration decoration = new SiriusDecoration();
+ decoration.add(figure);
+ decoration.setSize(figure.getSize());
+
+ GraphicalEditPart ownerEditPart = (GraphicalEditPart) getAdapter(GraphicalEditPart.class);
+ decoration.setOwnerFigure(ownerEditPart.getFigure());
+ decoration.setLocator(locator);
+
+ // Register this figure with it's owner editpart so mouse events
+ // will be propagated to it's host.
+ ownerEditPart.getViewer().getVisualPartMap().put(decoration, ownerEditPart);
+
+ IFigure pane = getLayer(isVolatile ? DiagramRootEditPart.DECORATION_UNPRINTABLE_LAYER : DiagramRootEditPart.DECORATION_PRINTABLE_LAYER);
+
+ pane.add(decoration);
+ return decoration;
+ }
+ }
+}
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/part/SiriusDiagramEditor.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/part/SiriusDiagramEditor.java
index 524ae40fca..04d8dd4b6f 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/part/SiriusDiagramEditor.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/part/SiriusDiagramEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2007, 2016 THALES GLOBAL SERVICES and others.
+ * Copyright (c) 2007, 2017 THALES GLOBAL SERVICES and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,6 +22,7 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.emf.workspace.util.WorkspaceSynchronizer;
import org.eclipse.gef.palette.PaletteRoot;
+import org.eclipse.gef.palette.PanningSelectionToolEntry;
import org.eclipse.gmf.runtime.common.ui.services.marker.MarkerNavigationService;
import org.eclipse.gmf.runtime.diagram.core.preferences.PreferencesHint;
import org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.IDiagramDocument;
@@ -74,8 +75,14 @@ public class SiriusDiagramEditor extends DiagramDocumentEditor implements IGotoM
*/
@Override
protected PaletteRoot createPaletteRoot(final PaletteRoot existingPaletteRoot) {
- if (previousPalette == null)
+ if (previousPalette == null) {
previousPalette = super.createPaletteRoot(existingPaletteRoot);
+ if (previousPalette.getDefaultEntry() instanceof PanningSelectionToolEntry) {
+ // Replace the GMF SelectionToolEx by the specific Sirius one to correctly handle tooltip on decoration
+ // and the travesability of this last.
+ previousPalette.getDefaultEntry().setToolClass(org.eclipse.sirius.diagram.ui.tools.internal.palette.SiriusSelectionToolEx.class);
+ }
+ }
return previousPalette;
}
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/palette/SiriusSelectionToolEx.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/palette/SiriusSelectionToolEx.java
new file mode 100644
index 0000000000..99749ab1bd
--- /dev/null
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/palette/SiriusSelectionToolEx.java
@@ -0,0 +1,71 @@
+/*******************************************************************************
+ * Copyright (c) 2017 THALES GLOBAL SERVICES.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.diagram.ui.tools.internal.palette;
+
+import org.eclipse.gef.EditPart;
+import org.eclipse.gmf.runtime.diagram.ui.services.palette.SelectionToolEx;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramEdgeEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.AbstractDEdgeNameEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeListElementEditPart;
+import org.eclipse.sirius.diagram.ui.internal.edit.parts.DNodeNameEditPart;
+import org.eclipse.sirius.diagram.ui.tools.internal.part.SiriusDiagramGraphicalViewer;
+
+/**
+ * Specific Sirius SelectionToolEx to use findMouseEventTargetAt instead of findObjectAtExcluding. This allows to
+ * dissociate the editPart that displays the tooltip from the editPart that gets the focus in case of a click. This is
+ * correctly handled with SWTEventDispatcher (mouseTarget field is initialized with findMouseEventTargetAt and
+ * hoverSource field is initialized with findFigureAt) but not by the selection tool. The overridden method
+ * updateTargetUnderMouse() is used to set the targetEditPart then used by handleButtonDown latter. This override has a
+ * limitation for figures of editPart that is not "MouseEventTarget". This is the case of NameEditPart or EdgeEditPart
+ * like: {@link DNodeNameEditPart}, {@link AbstractDEdgeNameEditPart}, {@link DNodeListElementEditPart} and
+ * {@link AbstractDiagramEdgeEditPart}. In this case, we can not use findMouseEventTargetAt, so the selected element is
+ * not the right one.
+ *
+ * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a>
+ */
+public class SiriusSelectionToolEx extends SelectionToolEx {
+
+ /**
+ * Constructor.
+ */
+ public SiriusSelectionToolEx() {
+ }
+
+ @Override
+ protected boolean updateTargetUnderMouse() {
+ if (!isTargetLocked()) {
+ EditPart editPart = null;
+ if (getCurrentViewer() != null) {
+ // Firstly search the object under mouse (as super method)
+ EditPart editPartWithFindObject = getCurrentViewer().findObjectAtExcluding(getLocation(), getExclusionSet(), getTargetingConditional());
+ // Then if this edit part has a figure that is "MouseEventTarget", we search the mouseEvent target at
+ // this location. The figure that is not a "MouseEventTarget" (returning false to isMouseEventTarget())
+ // can not receive MouseEvent, this is why we can not use findMouseEventTargetAt for them.
+ if (getCurrentViewer() instanceof SiriusDiagramGraphicalViewer && !isEditPartWithMouseEventTargetFigure(editPartWithFindObject)) {
+ editPart = ((SiriusDiagramGraphicalViewer) getCurrentViewer()).findMouseEventTargetAt(getLocation());
+ } else {
+ editPart = editPartWithFindObject;
+ }
+ }
+ if (editPart != null)
+ editPart = editPart.getTargetEditPart(getTargetRequest());
+ boolean changed = getTargetEditPart() != editPart;
+ setTargetEditPart(editPart);
+ return changed;
+ } else
+ return false;
+ }
+
+ private boolean isEditPartWithMouseEventTargetFigure(EditPart editPart) {
+ return editPart instanceof DNodeNameEditPart || editPart instanceof AbstractDiagramEdgeEditPart || editPart instanceof AbstractDEdgeNameEditPart
+ || editPart instanceof DNodeListElementEditPart;
+ }
+}
diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/part/SiriusDiagramGraphicalViewer.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/part/SiriusDiagramGraphicalViewer.java
index fc594777ca..c5cde8b29d 100644
--- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/part/SiriusDiagramGraphicalViewer.java
+++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/part/SiriusDiagramGraphicalViewer.java
@@ -1,5 +1,5 @@
/******************************************************************************
- * Copyright (c) 2002, 2015 IBM Corporation and others and others.
+ * Copyright (c) 2002, 2017 IBM Corporation and others and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.draw2d.DeferredUpdateManager;
import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.LightweightSystem;
+import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.gef.EditPart;
import org.eclipse.gmf.runtime.diagram.ui.internal.parts.PaletteToolTransferDropTargetListener;
@@ -352,4 +353,23 @@ public class SiriusDiagramGraphicalViewer extends DiagramGraphicalViewer impleme
super.setSelection(newSelection);
}
}
+
+ /**
+ * Returns the EditPart located at the given location which will accept mouse events.
+ *
+ * @param location
+ * The mouse location
+ * @return The EditPart located at the given location which will accept mouse events
+ */
+ public EditPart findMouseEventTargetAt(Point location) {
+ IFigure figure = getLightweightSystem().getRootFigure().findMouseEventTargetAt(location.x, location.y);
+ EditPart part = null;
+ while (part == null && figure != null) {
+ part = (EditPart) getVisualPartMap().get(figure);
+ figure = figure.getParent();
+ }
+ if (part == null)
+ return getContents();
+ return part;
+ }
}
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
index 858cb50cd3..06ac8cd3d8 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.html
@@ -147,6 +147,7 @@
<li><span class="label label-info">Modified</span>The &#8220;straighten to&#8221; actions previously had a limitation concerning overlap detection. This is no longer the case. The previous known limitation was removed from the documentation (
<i>In case of multi-selection, the overlap check is done in the current context of existing border nodes and not in the context of location of border nodes after each straighten edges.</i>).
</li>
+ <li><span class="label label-info">Modified</span>Decorators on diagram elements are drawn over all figures. If there is an overlap between a decorator of a figure A and another figure B that is over figure A, when user clicks on the decorator, the figure B is now selected (before it was the parent figure A).</li>
</ul>
<h3 id="SpecifierVisibleChanges2">Specifier-Visible Changes</h3>
<ul>
@@ -276,6 +277,9 @@
<code>org.eclipse.sirius.diagram.ui</code>
</h4>
<ul>
+ <li><span class="label label-success">Added</span> The class
+ <code>org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusDecoratorEditPolicy</code> has been added to improve the behavior of decorator selection.
+ </li>
<li><span class="label label-info">Modified</span> The
<code>org.eclipse.sirius.diagram.ui.tools.api.part.DiagramEditPartService.DiagramEditPartService</code> class which can be used to export diagrams as images is now automatically adapting the output resolution for raster image based on maximum buffer size specified through the
<code>plugin.propeties</code> file of the
@@ -355,13 +359,16 @@
</h4>
<ul>
<li><span class="label label-success">Added</span> The utility method
- <code>org.eclipse.sirius.tests.support.api.TestsUtil.setTargetPlatform()</code> has been added to allow to load a PDE target platform according to all known OSGi bundles. It is useful to compile a plug-in in the execution runtime of the tests.
+ <code>org.eclipse.sirius.tests.support.api.TestsUtil.setTargetPlatform()</code> has been added to allow to load a PDE target platform according to all known OSGi bundles. It is usefull to compile a plug-in in the execution runtime of the tests.
</li>
</ul>
<h4 id="Changesinorg.eclipse.sirius.tests.swtbot.support">Changes in
<code>org.eclipse.sirius.tests.swtbot.support</code>
</h4>
<ul>
+ <li><span class="label label-success">Added</span> A new utility method
+ <code>org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor.dragCentered(String, Class&lt;? extends EditPart&gt;, int, int)</code> improving the dragCentered method by adding the aimed Class in parameter.
+ </li>
<li><span class="label label-info">Modified</span> A new AtomicBoolean parameter has been added to the utility method
<code>mouseDragWithKey(int, int, int, int, int)</code> in classes
<code>org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor</code>,
diff --git a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
index dcded9bbf3..29161db01d 100644
--- a/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
+++ b/plugins/org.eclipse.sirius.doc/doc/Release_Notes.textile
@@ -25,6 +25,7 @@ h3. User-Visible Changes
* <span class="label label-success">Added</span> An new _session editor_ is available on _.aird_ files. It provides an alternative, form-based GUI to visualize and manipulate sirius sessions which is not tied to the Modeling perspective or Model Explorer view. Sirius 5.0M6 includes a work-in-progress version of this new feature to encourage early community "feedback":https://wiki.eclipse.org/Sirius/SessionEditor. That version should be considered in alpha state in terms of stability an UI polish. By default, the new editor will automatically open when a session is opened, but this behavior can be disabled via a new preference in the _Sirius_ category.
* <span class="label label-info">Modified</span> The export diagram as images actions are now adapting the output resolution based on the diagram size, this leads to better resolution for small to medium diagrams (and also bigger file) and to an operation which is no longer failing with out of memory errors in case of very big diagrams.
* <span class="label label-info">Modified</span>The "straighten to" actions previously had a limitation concerning overlap detection. This is no longer the case. The previous known limitation was removed from the documentation (__In case of multi-selection, the overlap check is done in the current context of existing border nodes and not in the context of location of border nodes after each straighten edges.__).
+* <span class="label label-info">Modified</span>Decorators on diagram elements are drawn over all figures. If there is an overlap between a decorator of a figure A and another figure B that is over figure A, when user clicks on the decorator, the figure B is now selected (before it was the parent figure A).
h3. Specifier-Visible Changes
@@ -65,6 +66,7 @@ h4. Changes in @org.eclipse.sirius.diagram@
h4. Changes in @org.eclipse.sirius.diagram.ui@
+* <span class="label label-success">Added</span> The class @org.eclipse.sirius.diagram.ui.graphical.edit.policies.SiriusDecoratorEditPolicy@ has been added to improve the behavior of decorator selection.
* <span class="label label-info">Modified</span> The @org.eclipse.sirius.diagram.ui.tools.api.part.DiagramEditPartService.DiagramEditPartService@ class which can be used to export diagrams as images is now automatically adapting the output resolution for raster image based on maximum buffer size specified through the @plugin.propeties@ file of the @org.eclipse.sirius.diagram.ui@ plugin. This leads to a noticeable increase of the export image size (you can expect a 10 factor on small diagrams) and the method will no longer fail with OutOfMemory errors as bigger diagrams will lead to a lower output resolution. Implementers using this class can override the @DiagramEditPartService.getMaximumTotalSize()@ method to return their own limit or @DiagramEditPartService.getExportResolutionFactor(DiagramEditPart, SiriusDiagramImageGenerator)@ and return @1.0@ to get back to the previous behavior.
* <span class="label label-info">Moved</span> The methods of interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManagerWithMapping@ that are @getFormatData(FormatDataKey, RepresentationElementMapping)@ and @addFormatData(FormatDataKey, RepresentationElementMapping, AbstractFormatData)@ have been moved into the interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ to reduce interface numbers for less complexity.
* <span class="label label-danger">Removed</span> The methods @getFormatData(FormatDataKey key)@ and @addFormatData(FormatDataKey key, AbstractFormatData formatData)@ have been removed from interface @org.eclipse.sirius.diagram.ui.tools.api.format.SiriusFormatDataManager@ because they were deprecated.
@@ -93,10 +95,11 @@ h4. Changes in @org.eclipse.sirius.editor.properties@
h4. Changes in @org.eclipse.sirius.tests.junit.support@
-* <span class="label label-success">Added</span> The utility method @org.eclipse.sirius.tests.support.api.TestsUtil.setTargetPlatform()@ has been added to allow to load a PDE target platform according to all known OSGi bundles. It is useful to compile a plug-in in the execution runtime of the tests.
+* <span class="label label-success">Added</span> The utility method @org.eclipse.sirius.tests.support.api.TestsUtil.setTargetPlatform()@ has been added to allow to load a PDE target platform according to all known OSGi bundles. It is usefull to compile a plug-in in the execution runtime of the tests.
h4. Changes in @org.eclipse.sirius.tests.swtbot.support@
+* <span class="label label-success">Added</span> A new utility method @org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor.dragCentered(String, Class<? extends EditPart>, int, int)@ improving the dragCentered method by adding the aimed Class in parameter.
* <span class="label label-info">Modified</span> A new AtomicBoolean parameter has been added to the utility method @mouseDragWithKey(int, int, int, int, int)@ in classes @org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor@, @org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusGefViewer@ and @org.eclipse.sirius.tests.swtbot.support.api.widget.SWTBotSiriusFigureCanvas@. This allows to correctly wait the end of the drag'n'drop.
** Sample of code to use:
pre.. final AtomicBoolean dragFinished = new AtomicBoolean(false);
diff --git a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/condition/CheckSelectedCondition.java b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/condition/CheckSelectedCondition.java
index 16a3580b43..9dab1a20fc 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/condition/CheckSelectedCondition.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/condition/CheckSelectedCondition.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2011, 2014 THALES GLOBAL SERVICES
+ * Copyright (c) 2011, 2017 THALES GLOBAL SERVICES
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -117,7 +117,15 @@ public class CheckSelectedCondition extends DefaultCondition {
* {@inheritDoc}
*/
public String getFailureMessage() {
- return "The edit part has not been selected";
+ String simpleClassName = "";
+ if (editPartToWaitForSelection != null) {
+ simpleClassName = editPartToWaitForSelection.getClass().getSimpleName();
+ } else if (editPartClass != null) {
+ simpleClassName = editPartClass.getSimpleName();
+ }
+ String partTypeMessage = simpleClassName == null ? "" : " of type \"" + simpleClassName + "\"";
+ String partLabelMessage = labelOfEditPart == null ? "" : " with name \"" + labelOfEditPart + "\"";
+ return "The edit part" + partTypeMessage + partLabelMessage + " has not been selected.";
}
/**
diff --git a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/editor/SWTBotSiriusDiagramEditor.java b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/editor/SWTBotSiriusDiagramEditor.java
index fd730fa714..1ec4b60c41 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/editor/SWTBotSiriusDiagramEditor.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot.support/src/org/eclipse/sirius/tests/swtbot/support/api/editor/SWTBotSiriusDiagramEditor.java
@@ -365,6 +365,32 @@ public class SWTBotSiriusDiagramEditor extends SWTBotGefEditor {
}
/**
+ *
+ * Uses the generic mouseDrag functionality to drag the item from its
+ * center.
+ *
+ * @param label
+ * the label
+ * @param editPartClass
+ * The type of the expected edit part
+ * @param toXPosition
+ * the relative x position within the graphical viewer to drag to
+ * @param toYPosition
+ * the relative y position within the graphical viewer to drag to
+ *
+ * @see org.eclipse.swtbot.eclipse.gef.finder.widgets.SWTBotGefEditor#drag(java.lang.String,
+ * int, int)
+ */
+ public void dragCentered(final String label, final Class<? extends EditPart> editPartClass, final int toXPosition, final int toYPosition) {
+ final SWTBotGefEditPart selectedEP = getEditPart(label, editPartClass);
+ if (selectedEP == null) {
+ throw new WidgetNotFoundException(String.format(SWTBotSiriusDiagramEditor.EXPECTED_TO_FIND_WIDGET_S, label));
+ }
+ final Rectangle bounds = ((GraphicalEditPart) selectedEP.part()).getFigure().getBounds();
+ drag(bounds.x + bounds.width / 2, bounds.y + bounds.height / 2, toXPosition, toYPosition);
+ }
+
+ /**
* Get the EditPartBot representing the EditPart at this location.
*
* @param location
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.ecore b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.ecore
new file mode 100644
index 0000000000..b86130bec3
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.ecore
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="root">
+ <eClassifiers xsi:type="ecore:EClass" name="EClass1"/>
+ <eClassifiers xsi:type="ecore:EClass" name="EClass2">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="att2-1"/>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EClass3">
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="att3-1"/>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.odesign b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.odesign
new file mode 100644
index 0000000000..b9a9be1998
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/My.odesign
@@ -0,0 +1,91 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<description:Group xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:validation="http://www.eclipse.org/sirius/description/validation/1.1.0" name="My" version="11.1.1.201610211630">
+ <ownedViewpoints name="validation" modelFileExtension="ecore">
+ <ownedRepresentations xsi:type="description_1:DiagramDescription" name="diag" domainClass="ecore::EPackage" enablePopupBars="true">
+ <metamodel href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ <validationSet name="AlwaysOnError">
+ <ownedRules xsi:type="validation:ViewValidationRule" name="AlwaysOnError" level="ERROR" message="aql:'The element '.concat(self.name).concat(' is always on error.')" targets="//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer'] //@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes'] //@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']">
+ <audits auditExpression="aql:false"/>
+ </ownedRules>
+ <ownedRules xsi:type="validation:SemanticValidationRule" name="AlwaysOnWarning" level="WARNING" message="aql:'The element '.concat(self.name).concat(' is always on error.')" targetClass="ecore::EPackage">
+ <audits auditExpression="aql:false"/>
+ </ownedRules>
+ </validationSet>
+ <defaultLayer name="Default">
+ <containerMappings name="SelfContainer" semanticCandidatesExpression="var:self" domainClass="ecore::EPackage">
+ <borderedNodeMappings name="classBorderNodes" semanticCandidatesExpression="feature:eClassifiers" domainClass="ecore::EClass">
+ <style xsi:type="style:SquareDescription" showIcon="false" labelExpression="aql:self.name.concat('Border')" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='green']"/>
+ </style>
+ </borderedNodeMappings>
+ <subNodeMappings name="classNodes" semanticCandidatesExpression="feature:eClassifiers" domainClass="ecore::EClass">
+ <borderedNodeMappings name="Attributes" semanticCandidatesExpression="feature:eAttributes" domainClass="ecore::EAttribute">
+ <style xsi:type="style:SquareDescription" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_blue']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="SelfContainerList" semanticCandidatesExpression="var:self" domainClass="ecore::EPackage" childrenPresentation="List">
+ <subNodeMappings name="classNodes" semanticCandidatesExpression="feature:eClassifiers" domainClass="ecore::EClass">
+ <borderedNodeMappings name="Attributes" semanticCandidatesExpression="feature:eAttributes" domainClass="ecore::EAttribute">
+ <style xsi:type="style:SquareDescription" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="aql:'item' + self.name" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="aql:self.name + '2'">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_green']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_green']"/>
+ </style>
+ </containerMappings>
+ <containerMappings name="AnotherSelfContainerList" semanticCandidatesExpression="var:self" domainClass="ecore::EPackage" childrenPresentation="List">
+ <subNodeMappings name="classNodes" semanticCandidatesExpression="feature:eClassifiers" domainClass="ecore::EClass">
+ <borderedNodeMappings name="Attributes" semanticCandidatesExpression="feature:eAttributes" domainClass="ecore::EAttribute">
+ <style xsi:type="style:SquareDescription" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='gray']"/>
+ </style>
+ </borderedNodeMappings>
+ <style xsi:type="style:BundledImageDescription" showIcon="false" labelExpression="aql:'item' + self.name" labelPosition="node" resizeKind="NSEW">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <color xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='blue']"/>
+ </style>
+ </subNodeMappings>
+ <style xsi:type="style:FlatContainerStyleDescription" borderSizeComputationExpression="1" labelExpression="aql:self.name + '3'">
+ <borderColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <labelColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='black']"/>
+ <backgroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_purple']"/>
+ <foregroundColor xsi:type="description:SystemColor" href="environment:/viewpoint#//@systemColors/@entries[name='light_purple']"/>
+ </style>
+ </containerMappings>
+ </defaultLayer>
+ </ownedRepresentations>
+ </ownedViewpoints>
+</description:Group>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/representations.aird b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/representations.aird
new file mode 100644
index 0000000000..94ec0af212
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/data/unit/decorator/validation/representations.aird
@@ -0,0 +1,465 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:description="http://www.eclipse.org/sirius/description/1.1.0" xmlns:description_1="http://www.eclipse.org/sirius/diagram/description/1.1.0" xmlns:diagram="http://www.eclipse.org/sirius/diagram/1.1.0" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/sirius/diagram/description/style/1.1.0" xmlns:viewpoint="http://www.eclipse.org/sirius/1.1.0" xsi:schemaLocation="http://www.eclipse.org/sirius/description/1.1.0 http://www.eclipse.org/sirius/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description http://www.eclipse.org/sirius/diagram/description/style/1.1.0 http://www.eclipse.org/sirius/diagram/1.1.0#//description/style">
+ <viewpoint:DAnalysis xmi:id="_yK6dEAi8EeeKCJSRL5OfIw" selectedViews="_hmxqcAi-EeeKCJSRL5OfIw" version="11.1.0.201608251200">
+ <semanticResources>My.ecore</semanticResources>
+ <ownedViews xmi:type="viewpoint:DView" xmi:id="_hmxqcAi-EeeKCJSRL5OfIw">
+ <viewpoint xmi:type="description:Viewpoint" href="My.odesign#//@ownedViewpoints[name='validation']"/>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_jZPGkAi-EeeKCJSRL5OfIw" name="new diag" representation="_jZPGkQi-EeeKCJSRL5OfIw">
+ <description xmi:type="description_1:DiagramDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']"/>
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ </ownedRepresentationDescriptors>
+ <ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_t6OT4AjQEeeKCJSRL5OfIw" name="new diag2" representation="_t6O68AjQEeeKCJSRL5OfIw">
+ <description xmi:type="description_1:DiagramDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']"/>
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ </ownedRepresentationDescriptors>
+ </ownedViews>
+ </viewpoint:DAnalysis>
+ <diagram:DSemanticDiagram xmi:id="_jZPGkQi-EeeKCJSRL5OfIw" name="new diag">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_jZPGkgi-EeeKCJSRL5OfIw" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_jZPGkwi-EeeKCJSRL5OfIw"/>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_jZPtoAi-EeeKCJSRL5OfIw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_jZPtoQi-EeeKCJSRL5OfIw" type="Sirius" element="_jZPGkQi-EeeKCJSRL5OfIw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_Ar2HoA-nEeeusu_GvUDqLw" type="2003" element="_ArjzwA-nEeeusu_GvUDqLw">
+ <children xmi:type="notation:Node" xmi:id="_Ar380A-nEeeusu_GvUDqLw" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_Ar380Q-nEeeusu_GvUDqLw" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_Ar5yAA-nEeeusu_GvUDqLw" type="3010" element="_Arlo8A-nEeeusu_GvUDqLw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Ar5yAQ-nEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Ar5yAg-nEeeusu_GvUDqLw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Ar5yAw-nEeeusu_GvUDqLw" type="3010" element="_ArmQAA-nEeeusu_GvUDqLw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Ar5yBA-nEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Ar5yBQ-nEeeusu_GvUDqLw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Ar6ZEA-nEeeusu_GvUDqLw" type="3010" element="_Arm3EA-nEeeusu_GvUDqLw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Ar6ZEQ-nEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Ar6ZEg-nEeeusu_GvUDqLw"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_Ar380g-nEeeusu_GvUDqLw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_Ar380w-nEeeusu_GvUDqLw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Ar2HoQ-nEeeusu_GvUDqLw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ar2Hog-nEeeusu_GvUDqLw" x="217" y="162" width="128" height="168"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_jZSJ4Ai-EeeKCJSRL5OfIw" type="2002" element="_jZPGlAi-EeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_jZSw8Ai-EeeKCJSRL5OfIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_jZUmIAi-EeeKCJSRL5OfIw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_TkAd0gi_EeeKCJSRL5OfIw" type="3007" element="_Tj8MYAi_EeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_TkAd1Qi_EeeKCJSRL5OfIw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TkAd1gi_EeeKCJSRL5OfIw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_TkBE4Ai_EeeKCJSRL5OfIw" type="3004" element="_Tj8MYQi_EeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_TkBE4Qi_EeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkBE4gi_EeeKCJSRL5OfIw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1YrCcgjQEeeKCJSRL5OfIw" type="3001" element="_1YnYEAjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_1YrpgAjQEeeKCJSRL5OfIw" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1YrpgQjQEeeKCJSRL5OfIw" x="31" y="13"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1YrpggjQEeeKCJSRL5OfIw" type="3003" element="_1YnYEQjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1YrpgwjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1YrphAjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1YrCcwjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1YrCdAjQEeeKCJSRL5OfIw" x="88" y="30" width="30" height="30"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_TkAd0wi_EeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkAd1Ai_EeeKCJSRL5OfIw" x="20" y="52" width="96" height="66"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Tj_2wAi_EeeKCJSRL5OfIw" type="3007" element="_Tj7lUAi_EeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_TkAd0Ai_EeeKCJSRL5OfIw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TkAd0Qi_EeeKCJSRL5OfIw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_TkAd1wi_EeeKCJSRL5OfIw" type="3004" element="_Tj7lUQi_EeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_TkAd2Ai_EeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkAd2Qi_EeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Tj_2wQi_EeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Tj_2wgi_EeeKCJSRL5OfIw" x="86" y="20" width="85" height="76"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1YqbYgjQEeeKCJSRL5OfIw" type="3007" element="_1Yk70AjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_1YrCcAjQEeeKCJSRL5OfIw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1YrCcQjQEeeKCJSRL5OfIw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1YsQkAjQEeeKCJSRL5OfIw" type="3001" element="_1YmJ8AjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_1YsQkwjQEeeKCJSRL5OfIw" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1YsQlAjQEeeKCJSRL5OfIw" x="-9" y="-17"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1Ys3oAjQEeeKCJSRL5OfIw" type="3003" element="_1YmJ8QjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1Ys3oQjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1Ys3ogjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1YsQkQjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1YsQkgjQEeeKCJSRL5OfIw" x="59" y="12" width="30" height="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1YsQlQjQEeeKCJSRL5OfIw" type="3004" element="_1Yli4AjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1YsQlgjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1YsQlwjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1YqbYwjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1YqbZAjQEeeKCJSRL5OfIw" x="99" y="118" width="67" height="42"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_jZUmIQi-EeeKCJSRL5OfIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_jZUmIgi-EeeKCJSRL5OfIw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Tj-BkAi_EeeKCJSRL5OfIw" type="3012" element="_Tj6XMAi_EeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_Tj-ooAi_EeeKCJSRL5OfIw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Tj-ooQi_EeeKCJSRL5OfIw" x="31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_TkBE4wi_EeeKCJSRL5OfIw" type="3003" element="_Tj6XMQi_EeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_TkBE5Ai_EeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkBE5Qi_EeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Tj-BkQi_EeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Tj-Bkgi_EeeKCJSRL5OfIw" x="201" y="144" width="58" height="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Tj_PsAi_EeeKCJSRL5OfIw" type="3012" element="_Tj6-QAi_EeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_Tj_Pswi_EeeKCJSRL5OfIw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Tj_PtAi_EeeKCJSRL5OfIw" x="31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_TkBE5gi_EeeKCJSRL5OfIw" type="3003" element="_Tj6-QQi_EeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_TkBE5wi_EeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TkBE6Ai_EeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_Tj_PsQi_EeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Tj_Psgi_EeeKCJSRL5OfIw" x="203" width="30" height="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1Yp0UAjQEeeKCJSRL5OfIw" type="3012" element="_1YjGoAjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_1YqbYAjQEeeKCJSRL5OfIw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_1YqbYQjQEeeKCJSRL5OfIw" x="31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_1Ys3owjQEeeKCJSRL5OfIw" type="3003" element="_1YjtsAjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1Ys3pAjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1Ys3pQjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_1Yp0UQjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_1Yp0UgjQEeeKCJSRL5OfIw" x="201" y="58" width="30" height="30"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_jZSJ4Qi-EeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_jZSJ4gi-EeeKCJSRL5OfIw" x="17" y="19" width="211" height="181"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_C9C4wA-oEeeusu_GvUDqLw" type="2003" element="_C8-nUA-oEeeusu_GvUDqLw">
+ <children xmi:type="notation:Node" xmi:id="_C9C4ww-oEeeusu_GvUDqLw" type="5007"/>
+ <children xmi:type="notation:Node" xmi:id="_C9C4xA-oEeeusu_GvUDqLw" type="7004">
+ <children xmi:type="notation:Node" xmi:id="_C9Df0A-oEeeusu_GvUDqLw" type="3010" element="_C8_1cA-oEeeusu_GvUDqLw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_C9Df0Q-oEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_C9Df0g-oEeeusu_GvUDqLw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_C9Df0w-oEeeusu_GvUDqLw" type="3010" element="_C9AcgA-oEeeusu_GvUDqLw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_C9Df1A-oEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_C9Df1Q-oEeeusu_GvUDqLw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_C9EG4A-oEeeusu_GvUDqLw" type="3010" element="_C9Acgg-oEeeusu_GvUDqLw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_C9EG4Q-oEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_C9EG4g-oEeeusu_GvUDqLw"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_C9C4xQ-oEeeusu_GvUDqLw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_C9C4xg-oEeeusu_GvUDqLw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_C9C4wQ-oEeeusu_GvUDqLw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_C9C4wg-oEeeusu_GvUDqLw" x="272" y="265" width="117" height="150"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_jZPtogi-EeeKCJSRL5OfIw"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_jZPGlAi-EeeKCJSRL5OfIw" name="root" tooltipText="">
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_Tj6XMAi_EeeKCJSRL5OfIw" name="EClass1Border" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_Tj6XMQi_EeeKCJSRL5OfIw" showIcon="false" color="138,226,52">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_Tj6-QAi_EeeKCJSRL5OfIw" name="EClass2Border" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_Tj6-QQi_EeeKCJSRL5OfIw" showIcon="false" color="138,226,52">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_1YjGoAjQEeeKCJSRL5OfIw" name="EClass3Border" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_1YjtsAjQEeeKCJSRL5OfIw" showIcon="false" color="138,226,52">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_jZPGnwi-EeeKCJSRL5OfIw" borderSize="1" borderSizeComputationExpression="1" backgroundColor="194,239,255" foregroundColor="194,239,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']"/>
+ <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_Tj7lUAi_EeeKCJSRL5OfIw" name="EClass1" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Tj7lUQi_EeeKCJSRL5OfIw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_Tj8MYAi_EeeKCJSRL5OfIw" name="EClass2" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_1YnYEAjQEeeKCJSRL5OfIw" name="att2-1" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EAttribute" href="My.ecore#//EClass2/att2-1"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="My.ecore#//EClass2/att2-1"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_1YnYEQjQEeeKCJSRL5OfIw">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@borderedNodeMappings[name='Attributes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@borderedNodeMappings[name='Attributes']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Tj8MYQi_EeeKCJSRL5OfIw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_1Yk70AjQEeeKCJSRL5OfIw" name="EClass3" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_1YmJ8AjQEeeKCJSRL5OfIw" name="att3-1" tooltipText="" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EAttribute" href="My.ecore#//EClass3/att3-1"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="My.ecore#//EClass3/att3-1"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_1YmJ8QjQEeeKCJSRL5OfIw">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@borderedNodeMappings[name='Attributes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@borderedNodeMappings[name='Attributes']"/>
+ </ownedBorderedNodes>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_1Yli4AjQEeeKCJSRL5OfIw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_ArjzwA-nEeeusu_GvUDqLw" name="root2">
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_JKwNoA-nEeeusu_GvUDqLw" borderSize="1" borderSizeComputationExpression="1" backgroundColor="204,242,166" foregroundColor="204,242,166">
+ <description xmi:type="style:FlatContainerStyleDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Arlo8A-nEeeusu_GvUDqLw" name="itemEClass1">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Arlo8Q-nEeeusu_GvUDqLw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@subNodeMappings[name='classNodes']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_ArmQAA-nEeeusu_GvUDqLw" name="itemEClass2">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_ArmQAQ-nEeeusu_GvUDqLw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@subNodeMappings[name='classNodes']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_Arm3EA-nEeeusu_GvUDqLw" name="itemEClass3">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_Arm3EQ-nEeeusu_GvUDqLw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainerList']/@subNodeMappings[name='classNodes']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNodeList" xmi:id="_C8-nUA-oEeeusu_GvUDqLw" name="root3">
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <arrangeConstraints>KEEP_LOCATION</arrangeConstraints>
+ <arrangeConstraints>KEEP_SIZE</arrangeConstraints>
+ <arrangeConstraints>KEEP_RATIO</arrangeConstraints>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_C8_OYA-oEeeusu_GvUDqLw" borderSize="1" borderSizeComputationExpression="1" backgroundColor="217,196,215" foregroundColor="217,196,215">
+ <description xmi:type="style:FlatContainerStyleDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']"/>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_C8_1cA-oEeeusu_GvUDqLw" name="itemEClass1">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_C8_1cQ-oEeeusu_GvUDqLw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@subNodeMappings[name='classNodes']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_C9AcgA-oEeeusu_GvUDqLw" name="itemEClass2">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_C9AcgQ-oEeeusu_GvUDqLw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@subNodeMappings[name='classNodes']"/>
+ </ownedElements>
+ <ownedElements xmi:type="diagram:DNodeListElement" xmi:id="_C9Acgg-oEeeusu_GvUDqLw" name="itemEClass3">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass3"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_C9BDkA-oEeeusu_GvUDqLw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='AnotherSelfContainerList']/@subNodeMappings[name='classNodes']"/>
+ </ownedElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_jZPGqgi-EeeKCJSRL5OfIw"/>
+ <activatedLayers xmi:type="description_1:Layer" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ </diagram:DSemanticDiagram>
+ <diagram:DSemanticDiagram xmi:id="_t6O68AjQEeeKCJSRL5OfIw" name="new diag2">
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_t6O68QjQEeeKCJSRL5OfIw" source="DANNOTATION_CUSTOMIZATION_KEY">
+ <data xmi:type="diagram:ComputedStyleDescriptionRegistry" xmi:id="_t6O68gjQEeeKCJSRL5OfIw"/>
+ </ownedAnnotationEntries>
+ <ownedAnnotationEntries xmi:type="description:AnnotationEntry" xmi:id="_t6PiAAjQEeeKCJSRL5OfIw" source="GMF_DIAGRAMS">
+ <data xmi:type="notation:Diagram" xmi:id="_t6PiAQjQEeeKCJSRL5OfIw" type="Sirius" element="_t6O68AjQEeeKCJSRL5OfIw" measurementUnit="Pixel">
+ <children xmi:type="notation:Node" xmi:id="_t6QJEAjQEeeKCJSRL5OfIw" type="2002" element="_t6O68wjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_t6QJEwjQEeeKCJSRL5OfIw" type="5006"/>
+ <children xmi:type="notation:Node" xmi:id="_t6QJFAjQEeeKCJSRL5OfIw" type="7001">
+ <children xmi:type="notation:Node" xmi:id="_t6TMYAjQEeeKCJSRL5OfIw" type="3007" element="_t6O6-QjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_t6TMYwjQEeeKCJSRL5OfIw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_t6TMZAjQEeeKCJSRL5OfIw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6TzcgjQEeeKCJSRL5OfIw" type="3004" element="_t6O6-gjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6TzcwjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6TzdAjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6TMYQjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6TMYgjQEeeKCJSRL5OfIw" x="30" y="29" width="30" height="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6TMZQjQEeeKCJSRL5OfIw" type="3007" element="_t6O6-wjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_t6TzcAjQEeeKCJSRL5OfIw" type="5003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_t6TzcQjQEeeKCJSRL5OfIw" y="5"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6TzdQjQEeeKCJSRL5OfIw" type="3001" element="_t6O6_AjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_t6TzeAjQEeeKCJSRL5OfIw" type="5001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_t6TzeQjQEeeKCJSRL5OfIw" x="31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6UagwjQEeeKCJSRL5OfIw" type="3003" element="_t6O6_QjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6UahAjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6UahQjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6TzdgjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6TzdwjQEeeKCJSRL5OfIw" x="22" width="30" height="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6UagAjQEeeKCJSRL5OfIw" type="3004" element="_t6O6_gjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6UagQjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6UaggjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6TMZgjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6TMZwjQEeeKCJSRL5OfIw" x="90" y="30" width="30" height="30"/>
+ </children>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_t6QJFQjQEeeKCJSRL5OfIw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_t6QJFgjQEeeKCJSRL5OfIw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6QwIAjQEeeKCJSRL5OfIw" type="3012" element="_t6O69AjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_t6RXMAjQEeeKCJSRL5OfIw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_t6RXMQjQEeeKCJSRL5OfIw" x="31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6VBkAjQEeeKCJSRL5OfIw" type="3003" element="_t6O69QjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6VBkQjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6VBkgjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6QwIQjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6QwIgjQEeeKCJSRL5OfIw" x="-22" width="30" height="30"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6R-QAjQEeeKCJSRL5OfIw" type="3012" element="_t6O69gjQEeeKCJSRL5OfIw">
+ <children xmi:type="notation:Node" xmi:id="_t6SlUAjQEeeKCJSRL5OfIw" type="5010">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_t6SlUQjQEeeKCJSRL5OfIw" x="31"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_t6VBkwjQEeeKCJSRL5OfIw" type="3003" element="_t6O69wjQEeeKCJSRL5OfIw">
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6VBlAjQEeeKCJSRL5OfIw" fontName="Segoe UI"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6VBlQjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6R-QQjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6R-QgjQEeeKCJSRL5OfIw" x="-22" y="31" width="30" height="30"/>
+ </children>
+ <styles xmi:type="notation:ShapeStyle" xmi:id="_t6QJEQjQEeeKCJSRL5OfIw" fontName="Segoe UI" fontHeight="8"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_t6QJEgjQEeeKCJSRL5OfIw"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_t6PiAgjQEeeKCJSRL5OfIw"/>
+ </data>
+ </ownedAnnotationEntries>
+ <ownedDiagramElements xmi:type="diagram:DNodeContainer" xmi:id="_t6O68wjQEeeKCJSRL5OfIw" name="root">
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <semanticElements xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_t6O69AjQEeeKCJSRL5OfIw" name="EClass1Border" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_t6O69QjQEeeKCJSRL5OfIw" showIcon="false" color="138,226,52">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']"/>
+ </ownedBorderedNodes>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_t6O69gjQEeeKCJSRL5OfIw" name="EClass2Border" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_t6O69wjQEeeKCJSRL5OfIw" showIcon="false" color="138,226,52">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@borderedNodeMappings[name='classBorderNodes']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:FlatContainerStyle" xmi:id="_t6O6-AjQEeeKCJSRL5OfIw" borderSize="1" borderSizeComputationExpression="1" backgroundColor="194,239,255" foregroundColor="194,239,255">
+ <description xmi:type="style:FlatContainerStyleDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:ContainerMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']"/>
+ <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_t6O6-QjQEeeKCJSRL5OfIw" name="EClass1" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass1"/>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_t6O6-gjQEeeKCJSRL5OfIw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']"/>
+ </ownedDiagramElements>
+ <ownedDiagramElements xmi:type="diagram:DNode" xmi:id="_t6O6-wjQEeeKCJSRL5OfIw" name="EClass2" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <semanticElements xmi:type="ecore:EClass" href="My.ecore#//EClass2"/>
+ <ownedBorderedNodes xmi:type="diagram:DNode" xmi:id="_t6O6_AjQEeeKCJSRL5OfIw" name="att1" width="3" height="3" resizeKind="NSEW">
+ <target xmi:type="ecore:EAttribute" href="My.ecore#//EClass2/att1"/>
+ <semanticElements xmi:type="ecore:EAttribute" href="My.ecore#//EClass2/att1"/>
+ <ownedStyle xmi:type="diagram:Square" xmi:id="_t6O6_QjQEeeKCJSRL5OfIw">
+ <description xmi:type="style:SquareDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@borderedNodeMappings[name='Attributes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@borderedNodeMappings[name='Attributes']"/>
+ </ownedBorderedNodes>
+ <ownedStyle xmi:type="diagram:BundledImage" xmi:id="_t6O6_gjQEeeKCJSRL5OfIw" showIcon="false" labelPosition="node" color="114,159,207">
+ <description xmi:type="style:BundledImageDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']/@style"/>
+ </ownedStyle>
+ <actualMapping xmi:type="description_1:NodeMapping" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer/@containerMappings[name='SelfContainer']/@subNodeMappings[name='classNodes']"/>
+ </ownedDiagramElements>
+ </ownedDiagramElements>
+ <description xmi:type="description_1:DiagramDescription" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']"/>
+ <filterVariableHistory xmi:type="diagram:FilterVariableHistory" xmi:id="_t6O6_wjQEeeKCJSRL5OfIw"/>
+ <activatedLayers xmi:type="description_1:Layer" href="My.odesign#//@ownedViewpoints[name='validation']/@ownedRepresentations[name='diag']/@defaultLayer"/>
+ <target xmi:type="ecore:EPackage" href="My.ecore#/"/>
+ </diagram:DSemanticDiagram>
+</xmi:XMI>
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/NodeWithDecoratorSelectionTest.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/NodeWithDecoratorSelectionTest.java
new file mode 100644
index 0000000000..65b08e3362
--- /dev/null
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/NodeWithDecoratorSelectionTest.java
@@ -0,0 +1,119 @@
+/*******************************************************************************
+ * Copyright (c) 2017 THALES GLOBAL SERVICES.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Obeo - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.sirius.tests.swtbot;
+
+import org.eclipse.sirius.diagram.DDiagram;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramBorderNodeEditPart;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramContainerEditPart;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramListEditPart;
+import org.eclipse.sirius.diagram.ui.edit.api.part.AbstractDiagramNodeEditPart;
+import org.eclipse.sirius.tests.swtbot.support.api.business.UIResource;
+import org.eclipse.sirius.tests.swtbot.support.api.condition.CheckSelectedCondition;
+import org.eclipse.sirius.tests.swtbot.support.api.editor.SWTBotSiriusDiagramEditor;
+import org.eclipse.sirius.tests.swtbot.support.api.test.AbstractScenarioTestCase;
+import org.eclipse.sirius.tests.swtbot.support.utils.SWTBotUtils;
+
+/**
+ *
+ * @author <a href="mailto:laurent.redor@obeo.fr">Laurent Redor</a>
+ */
+public class NodeWithDecoratorSelectionTest extends AbstractScenarioTestCase {
+
+ private static final String DATA_UNIT_DIR = "/data/unit/decorator/validation/";
+
+ private static final String SEMANTIC_RESOURCE_FILENAME = "My.ecore";
+
+ private static final String SESSION_RESOURCE_FILENAME = "representations.aird";
+
+ private static final String MODELER_RESOURCE_FILENAME = "My.odesign";
+
+ private static final String REPRESENTATION_INSTANCE_NAME = "new diag";
+
+ private static final String REPRESENTATION_NAME = "diag";
+
+ @Override
+ protected void onSetUpBeforeClosingWelcomePage() throws Exception {
+ copyFileToTestProject(Activator.PLUGIN_ID, DATA_UNIT_DIR, SEMANTIC_RESOURCE_FILENAME, SESSION_RESOURCE_FILENAME, MODELER_RESOURCE_FILENAME);
+ }
+
+ @Override
+ protected void onSetUpAfterOpeningDesignerPerspective() throws Exception {
+ sessionAirdResource = new UIResource(designerProject, "/", SESSION_RESOURCE_FILENAME);
+ localSession = designerPerspective.openSessionFromFile(sessionAirdResource);
+ editor = (SWTBotSiriusDiagramEditor) openRepresentation(localSession.getOpenedSession(), REPRESENTATION_NAME, REPRESENTATION_INSTANCE_NAME, DDiagram.class);
+ }
+
+ /**
+ * Test that element under decorator is selected even if it is not the
+ * parent of the decorator.
+ */
+ public void testDDEUnderDecoratorSelection() {
+ // Launch the validation to make decorators visible
+ editor.clickContextMenu("Validate diagram");
+ SWTBotUtils.waitAllUiEvents();
+
+ // Click on the error decorator of container "root"
+ editor.click(218, 28);
+ // Check that the border node "EClass2Border" is selected (and not the
+ // parent of the decorator under the cursor, ie container "root")
+ bot.waitUntil(new CheckSelectedCondition(editor, "EClass2Border", AbstractDiagramBorderNodeEditPart.class));
+
+ // Click on the error decorator of container "root"
+ editor.click(212, 28);
+ // Check that the container "root" is selected (the parent of the
+ // decorator under the cursor is also the DDiagramElement under the
+ // cursor)
+ bot.waitUntil(new CheckSelectedCondition(editor, "root", AbstractDiagramContainerEditPart.class));
+
+ // Click on the error decorator of node "EClass2"
+ editor.click(128, 86);
+ // Check that the node "EClass1" is selected (and not the parent
+ // of the decorator under the cursor, ie node "EClass2")
+ bot.waitUntil(new CheckSelectedCondition(editor, "EClass1", AbstractDiagramNodeEditPart.class));
+
+ // Click on the error decorator of border node "att2-1"
+ editor.click(150, 114);
+ // Check that the node "EClass1" is selected (and not the parent
+ // of the decorator under the cursor, ie node "EClass2")
+ bot.waitUntil(new CheckSelectedCondition(editor, "EClass1", AbstractDiagramNodeEditPart.class));
+
+ // Click on the navigation decorator of container "root"
+ editor.click(218, 188);
+ // Check that the border node "EClass1Border" is selected (and not the
+ // parent of the decorator under the cursor, ie container "root")
+ bot.waitUntil(new CheckSelectedCondition(editor, "EClass1Border", AbstractDiagramBorderNodeEditPart.class));
+
+ // Click on the navigation decorator of container "root"
+ editor.click(208, 181);
+ // Check that the border node "att3-1" is selected (and not the parent
+ // of the decorator under the cursor, ie container "root")
+ bot.waitUntil(new CheckSelectedCondition(editor, "att3-1", AbstractDiagramBorderNodeEditPart.class));
+
+ // Click on the warning decorator of green list "root2"
+ editor.click(335, 172);
+ // Check that the border node "EClass1Border" is selected (and not the
+ // parent of the decorator under the cursor, ie list "root2"). This case
+ // is a limitation (the label "EClass1Border" under the decorator is not
+ // selected but its container instead, this is because figure of this
+ // part is not a "MouseEventTarget").
+ bot.waitUntil(new CheckSelectedCondition(editor, "EClass1Border", AbstractDiagramBorderNodeEditPart.class));
+
+ // Click on the navigation decorator of green list "root2"
+ editor.click(331, 314);
+ // Check that the purple list "root3" is selected (and not the
+ // parent of the decorator under the cursor, ie green list "root2").
+ // This case is a limitation (the list item label "EClass2" under the
+ // decorator is not selected but its container instead, this is because
+ // figure of this part is not a "MouseEventTarget").
+ bot.waitUntil(new CheckSelectedCondition(editor, "root3", AbstractDiagramListEditPart.class));
+ }
+
+}
diff --git a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
index 843f85001d..f64de73bc4 100644
--- a/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
+++ b/plugins/org.eclipse.sirius.tests.swtbot/src/org/eclipse/sirius/tests/swtbot/suite/AllTestSuite.java
@@ -161,6 +161,7 @@ public class AllTestSuite extends TestCase {
suite.addTestSuite(DiagramMouseZoomTest.class);
suite.addTestSuite(EdgeLabelsMoveFromEdgeMoveTest.class);
suite.addTestSuite(OpeningContextTest.class);
+ suite.addTestSuite(NodeWithDecoratorSelectionTest.class);
}
/**
@@ -262,7 +263,7 @@ public class AllTestSuite extends TestCase {
suite.addTestSuite(RepresentationVisibilityAfterSessionReloadTest.class);
suite.addTestSuite(HideRevealDiagramElementsLabelsTestWithOldUI.class);
suite.addTestSuite(HideLabelIconsWithPreferencesTest.class);
- //suite.addTestSuite(LabelFontModificationsTest.class);
+ // suite.addTestSuite(LabelFontModificationsTest.class);
suite.addTestSuite(MultiLineLabelDiagramTest.class);
suite.addTestSuite(NodeCreationPositionTest.class);
suite.addTestSuite(OpenMultipleRepresentationsTest.class);

Back to the top