Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcletavernie2012-10-26 08:01:04 -0400
committercletavernie2012-10-26 08:01:04 -0400
commit4b5547218d558df2971afbe788818adc9d98de48 (patch)
treeddaec9e5525a90fa5ac9d4a106f0003cb85efce3 /plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src
parent45e3a9d71f25c51bc1c8a65c79ae24921f8b3fa1 (diff)
downloadorg.eclipse.papyrus-4b5547218d558df2971afbe788818adc9d98de48.tar.gz
org.eclipse.papyrus-4b5547218d558df2971afbe788818adc9d98de48.tar.xz
org.eclipse.papyrus-4b5547218d558df2971afbe788818adc9d98de48.zip
392438: [Core Services] Papyrus should provide a LabelProvider service
https://bugs.eclipse.org/bugs/show_bug.cgi?id=392438 LabelProviderService is now partially used.
Diffstat (limited to 'plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src')
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java5
-rw-r--r--plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/GMFToCSSConverter.java5
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
index 89a04aeb221..2e0d58204e0 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/AbstractStyleHandler.java
@@ -58,6 +58,7 @@ import org.eclipse.papyrus.infra.gmfdiag.css.configuration.Activator;
import org.eclipse.papyrus.infra.gmfdiag.css.handler.CSSRefreshHandler;
import org.eclipse.papyrus.infra.gmfdiag.css.provider.CustomStyle;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Shell;
@@ -307,7 +308,9 @@ public abstract class AbstractStyleHandler extends AbstractHandler {
if(isInteger(feature)) {
if(feature.getName().endsWith("Color")) {
- declaration.setExpression(converter.convert(FigureUtilities.integerToColor((Integer)style.eGet(feature))));
+ Color color = FigureUtilities.integerToColor((Integer)style.eGet(feature));
+ declaration.setExpression(converter.convert(color));
+ color.dispose();
} else {
declaration.setExpression(converter.convert((Integer)style.eGet(feature)));
}
diff --git a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/GMFToCSSConverter.java b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/GMFToCSSConverter.java
index fdacd0d7190..f66a8fd7892 100644
--- a/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/GMFToCSSConverter.java
+++ b/plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration/src/org/eclipse/papyrus/infra/gmfdiag/css/configuration/handler/GMFToCSSConverter.java
@@ -50,7 +50,10 @@ public class GMFToCSSConverter {
}
private HexColor getColor(int color) {
- return getColor(FigureUtilities.integerToColor(color));
+ Color swtColor = FigureUtilities.integerToColor(color);
+ HexColor result = getColor(swtColor);
+ swtColor.dispose();
+ return result;
}
private String twoDigitsHexString(int color) {

Back to the top