Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorskovalsky2015-06-01 18:13:51 +0000
committerGerrit Code Review @ Eclipse.org2016-02-15 16:16:28 +0000
commit7d44cf445fc7653eef28e2a08040849e497192ac (patch)
tree217158742337904c82313a5990c32ffa13b00e9f
parentb7f1971ae1256a4fd778301faea08967632846b6 (diff)
downloadorg.eclipse.papyrus-7d44cf445fc7653eef28e2a08040849e497192ac.tar.gz
org.eclipse.papyrus-7d44cf445fc7653eef28e2a08040849e497192ac.tar.xz
org.eclipse.papyrus-7d44cf445fc7653eef28e2a08040849e497192ac.zip
Bug 459818 - [Activity Diagram] Activity Diagram nodes do not support
the ElementIcon property - add CreateLinkObjectAction elementIcon - add DataStoreNode elementIcon Change-Id: Ib7de4bb8e79a2e090f72e157f8d8d7765ff02611 Signed-off-by: skovalsky <kovalsky@montages.com>
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen6
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateLinkObjectActionNameEditPart.java14
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeLabelEditPart.java14
3 files changed, 32 insertions, 2 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen
index 5af0bd226aa..bc52445733a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/model/activityDiagram.gmfgen
@@ -4714,7 +4714,8 @@
visualID="5127"
editPartClassName="DataStoreNodeLabelEditPart"
itemSemanticEditPolicyClassName="DataStoreNodeLabelItemSemanticEditPolicy"
- notationViewFactoryClassName="DataStoreNodeLabelViewFactory">
+ notationViewFactoryClassName="DataStoreNodeLabelViewFactory"
+ elementIcon="true">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
@@ -17957,7 +17958,8 @@
</modelElementInitializer>
</modelFacet>
<labels
- visualID="5406">
+ visualID="5406"
+ elementIcon="true">
<diagramRunTimeClass
href="../../../plugin/org.eclipse.gmf.runtime.notation/model/notation.genmodel#//notation/Node"/>
<viewmap
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateLinkObjectActionNameEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateLinkObjectActionNameEditPart.java
index ad98161dca6..ce002c5afe3 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateLinkObjectActionNameEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/CreateLinkObjectActionNameEditPart.java
@@ -7,6 +7,7 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.RunnableWithResult;
@@ -46,6 +47,8 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
@@ -57,6 +60,7 @@ import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.custom.BusyIndicator;
@@ -223,6 +227,16 @@ public class CreateLinkObjectActionNameEditPart extends PapyrusCompartmentEditPa
* @generated
*/
protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return UMLElementTypes.getImage(parserElement.eClass());
+ }
+ }
return null;
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeLabelEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeLabelEditPart.java
index 79a224a38c4..10e2cbccc6a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeLabelEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity/src/org/eclipse/papyrus/uml/diagram/activity/edit/parts/DataStoreNodeLabelEditPart.java
@@ -20,6 +20,7 @@ import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.RunnableWithResult;
@@ -59,6 +60,8 @@ import org.eclipse.papyrus.extensionpoints.editors.ui.ILabelEditorDialog;
import org.eclipse.papyrus.extensionpoints.editors.ui.IPopupEditorHelper;
import org.eclipse.papyrus.extensionpoints.editors.utils.DirectEditorsUtil;
import org.eclipse.papyrus.extensionpoints.editors.utils.IDirectEditorsIds;
+import org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper;
+import org.eclipse.papyrus.infra.emf.appearance.helper.VisualInformationPapyrusConstants;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IControlParserForDirectEdit;
import org.eclipse.papyrus.infra.gmfdiag.common.editpart.PapyrusCompartmentEditPart;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.IMaskManagedLabelEditPolicy;
@@ -70,6 +73,7 @@ import org.eclipse.papyrus.uml.diagram.activity.providers.UMLParserProvider;
import org.eclipse.papyrus.uml.diagram.common.directedit.MultilineLabelDirectEditManager;
import org.eclipse.papyrus.uml.diagram.common.editpolicies.IDirectEdition;
import org.eclipse.papyrus.uml.diagram.common.figure.node.ILabelFigure;
+import org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.accessibility.AccessibleEvent;
import org.eclipse.swt.custom.BusyIndicator;
@@ -232,6 +236,16 @@ public class DataStoreNodeLabelEditPart extends PapyrusCompartmentEditPart imple
* @generated
*/
protected Image getLabelIcon() {
+ EObject parserElement = getParserElement();
+ if (parserElement == null) {
+ return null;
+ }
+ List<View> views = DiagramEditPartsUtil.findViews(parserElement, getViewer());
+ for (View view : views) {
+ if (AppearanceHelper.showElementIcon(view)) {
+ return UMLElementTypes.getImage(parserElement.eClass());
+ }
+ }
return null;
}

Back to the top