Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnsgar Radermacher2017-03-30 09:22:36 -0400
committerGerrit Code Review @ Eclipse.org2017-04-18 08:49:29 -0400
commit148fe0c36166daa6cc9334633c3381604269163f (patch)
tree175d42cd738302e3739d92cb1b6d1ec982318edb /plugins/developer
parentdf00c975514aa9850cf293519d08e0a81a6152dd (diff)
downloadorg.eclipse.papyrus-148fe0c36166daa6cc9334633c3381604269163f.tar.gz
org.eclipse.papyrus-148fe0c36166daa6cc9334633c3381604269163f.tar.xz
org.eclipse.papyrus-148fe0c36166daa6cc9334633c3381604269163f.zip
Bug 514455 - [All diagrams] Label icon does not correspond to element type
- Delegate to DiagramEditPartsUtil.getIcon to obtain the label icon (avoid identical generated code in all name edit parts) - Get label icon from EMFHelper instead of using UMLElementTypes.getIcon(eClass). This enables the use of the specified icon in case of element types
Diffstat (limited to 'plugins/developer')
-rw-r--r--plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/TextAware.xtend16
1 files changed, 3 insertions, 13 deletions
diff --git a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/TextAware.xtend b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/TextAware.xtend
index 2a0ed0ffce3..eec54b495ce 100644
--- a/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/TextAware.xtend
+++ b/plugins/developer/org.eclipse.papyrus.def/xtend/aspects/impl/diagram/editparts/TextAware.xtend
@@ -280,19 +280,9 @@ override getLabelIcon(GenCommonBase it,boolean useElementIcon, GenDiagram diagra
«generatedMemberComment»
protected org.eclipse.swt.graphics.Image getLabelIcon() {
«IF useElementIcon»
- org.eclipse.emf.ecore.EObject parserElement = getParserElement();
- if (parserElement == null) {
- return null;
- }
- ««« START: PapyrusGenCode
- java.util.List<org.eclipse.gmf.runtime.notation.View> views = org.eclipse.papyrus.uml.diagram.common.util.DiagramEditPartsUtil.findViews(parserElement, getViewer());
- for (org.eclipse.gmf.runtime.notation.View view : views) {
- if (org.eclipse.papyrus.infra.emf.appearance.helper.AppearanceHelper.showElementIcon(view)) {
- return «diagram.getElementTypesQualifiedClassName()».getImage(parserElement.eClass());
- }
- }
- return null;
- ««« END: PapyrusGenCode
+ ««« START: PapyrusGenCode
+ return org.eclipse.papyrus.infra.gmfdiag.common.utils.DiagramEditPartsUtil.getIcon(getParserElement(), getViewer());
+ ««« END: PapyrusGenCode
«ELSE»
return null;
«ENDIF»

Back to the top