Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMickael ADAM2016-08-25 05:58:59 -0400
committerGerrit Code Review @ Eclipse.org2016-09-27 04:02:02 -0400
commitad65ff8c3f11fd8651c42be6eff13abbb1d3b279 (patch)
tree96920ac8874dce44d109342dda08af4e1e09814f /plugins/facet/org.eclipse.papyrus.emf.facet.custom.core
parent21f7c5441e48e341c79ccd90cc78227b39c6e6d7 (diff)
downloadorg.eclipse.papyrus-ad65ff8c3f11fd8651c42be6eff13abbb1d3b279.tar.gz
org.eclipse.papyrus-ad65ff8c3f11fd8651c42be6eff13abbb1d3b279.tar.xz
org.eclipse.papyrus-ad65ff8c3f11fd8651c42be6eff13abbb1d3b279.zip
Bug 500219 - [Model Explorer] Papyrus Should provide an other way to
customize uml label Change-Id: Ic3213ed9aefb636f4e581df7996378dfd96d8937 Signed-off-by: Mickael ADAM <mickael.adam@ALL4TEC.net>
Diffstat (limited to 'plugins/facet/org.eclipse.papyrus.emf.facet.custom.core')
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/META-INF/MANIFEST.MF2
-rw-r--r--plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/exported/CustomizationUtils.java8
2 files changed, 9 insertions, 1 deletions
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/META-INF/MANIFEST.MF b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/META-INF/MANIFEST.MF
index 00a1c80b084..8faa15d3def 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/META-INF/MANIFEST.MF
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/META-INF/MANIFEST.MF
@@ -7,7 +7,7 @@ Export-Package: org.eclipse.papyrus.emf.facet.custom.core,
org.eclipse.papyrus.emf.facet.custom.core.internal.query
Require-Bundle: org.eclipse.ui;bundle-version="[3.107.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.12.0,4.0.0)",
- org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="[1.2.0,2.0.0)";visibility:=reexport,
+ org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="[1.3.0,2.0.0)";visibility:=reexport,
org.eclipse.papyrus.emf.facet.efacet.core;bundle-version="[2.0.0,3.0.0)";visibility:=reexport,
org.eclipse.papyrus.emf.facet.util.core;bundle-version="[1.2.0,2.0.0)",
org.eclipse.emf.validation;bundle-version="[1.8.0,2.0.0)"
diff --git a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/exported/CustomizationUtils.java b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/exported/CustomizationUtils.java
index 36a961abc48..d17f8fcc391 100644
--- a/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/exported/CustomizationUtils.java
+++ b/plugins/facet/org.eclipse.papyrus.emf.facet.custom.core/src/org/eclipse/papyrus/emf/facet/custom/core/internal/exported/CustomizationUtils.java
@@ -10,6 +10,7 @@
* Gregoire Dupe (Mia-Software) - Bug 373078 - API Cleaning
* Gregoire Dupe (Mia-Software) - Bug 376576 - [EFacet] Change the multiplicity of Facet::extendedFacet
* David Couvrand (Soft-Maint) - Bug 418418 - [Customization] Overlay icons not implemented
+ * Mickael ADAM (ALL4TEC) - mickael.adam@all4tec.net - Bug 500219 - implementation of IStyledLabelProvider
*/
package org.eclipse.papyrus.emf.facet.custom.core.internal.exported;
@@ -22,6 +23,7 @@ import org.eclipse.emf.ecore.EClassifier;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.jface.viewers.StyledString;
import org.eclipse.papyrus.emf.facet.custom.core.ICustomizationManager;
import org.eclipse.papyrus.emf.facet.custom.core.exception.CustomizationException;
import org.eclipse.papyrus.emf.facet.custom.core.internal.Activator;
@@ -127,6 +129,12 @@ public final class CustomizationUtils {
Activator.getDefault());
}
}
+
+ // Patch to convert StyledString to String in case of customManager provide StyleString and String is expected.
+ if (result instanceof StyledString && !classs.isInstance(result)) {
+ result = (T) result.toString();
+ }
+
return result;
}
}

Back to the top