diff options
author | Sarika Sinha | 2018-09-03 09:01:45 +0000 |
---|---|---|
committer | Andrey Loskutov | 2018-09-06 17:33:49 +0000 |
commit | c6321fe6458dcbdd0d92915dbe14a72ed0cac34e (patch) | |
tree | 5cad2bdfb77734157fb1dca7ea2dbf0ffd07fc34 | |
parent | 450bbd103b511b870b31d63821c7566e6c46b602 (diff) | |
download | eclipse.platform-c6321fe6458dcbdd0d92915dbe14a72ed0cac34e.tar.gz eclipse.platform-c6321fe6458dcbdd0d92915dbe14a72ed0cac34e.tar.xz eclipse.platform-c6321fe6458dcbdd0d92915dbe14a72ed0cac34e.zip |
Bug 355011 - create Colors in UI threadY20180912-2200I20180913-1800I20180913-0415I20180912-2240I20180912-0225I20180912-0210I20180911-1400I20180910-0310I20180907-0855I20180907-0715I20180907-0650I20180907-0400I20180906-1400
Change-Id: I7dc1d0a68158f5c993f11f634544a945c5b71d45
-rw-r--r-- | ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColorManager.java | 7 | ||||
-rw-r--r-- | ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF | 2 | ||||
-rw-r--r-- | ant/org.eclipse.ant.ui/pom.xml | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColorManager.java b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColorManager.java index f8fedaefe..9742699d4 100644 --- a/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColorManager.java +++ b/ant/org.eclipse.ant.ui/Ant Tools Support/org/eclipse/ant/internal/ui/ColorManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2013 IBM Corporation and others. + * Copyright (c) 2000, 2018 IBM Corporation and others. * * This program and the accompanying materials * are made available under the terms of the Eclipse Public License 2.0 @@ -20,6 +20,7 @@ import org.eclipse.jface.text.source.ISharedTextColors; import org.eclipse.swt.graphics.Color; import org.eclipse.swt.graphics.RGB; import org.eclipse.swt.widgets.Display; +import org.eclipse.ui.PlatformUI; /** * Generic color manager. @@ -44,8 +45,8 @@ public class ColorManager implements ISharedTextColors { public Color getColor(RGB rgb) { Color color = fColorTable.get(rgb); if (color == null) { - color = new Color(Display.getCurrent(), rgb); - fColorTable.put(rgb, color); + PlatformUI.getWorkbench().getDisplay().syncExec(() -> fColorTable.put(rgb, new Color(Display.getCurrent(), rgb))); + color = fColorTable.get(rgb); } return color; } diff --git a/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF b/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF index d41e71241..a49661435 100644 --- a/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF +++ b/ant/org.eclipse.ant.ui/META-INF/MANIFEST.MF @@ -2,7 +2,7 @@ Manifest-Version: 1.0 Bundle-ManifestVersion: 2 Bundle-Name: %pluginName Bundle-SymbolicName: org.eclipse.ant.ui; singleton:=true -Bundle-Version: 3.7.200.qualifier +Bundle-Version: 3.7.300.qualifier Bundle-Activator: org.eclipse.ant.internal.ui.AntUIPlugin Bundle-Vendor: %providerName Bundle-Localization: plugin diff --git a/ant/org.eclipse.ant.ui/pom.xml b/ant/org.eclipse.ant.ui/pom.xml index 54244a4f1..a35529d45 100644 --- a/ant/org.eclipse.ant.ui/pom.xml +++ b/ant/org.eclipse.ant.ui/pom.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <!-- - Copyright (c) 2012, 2017 Eclipse Foundation and others. + Copyright (c) 2012, 2018 Eclipse Foundation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Distribution License v1.0 which accompanies this distribution, and is available at @@ -19,7 +19,7 @@ </parent> <groupId>org.eclipse.ant</groupId> <artifactId>org.eclipse.ant.ui</artifactId> - <version>3.7.200-SNAPSHOT</version> + <version>3.7.300-SNAPSHOT</version> <packaging>eclipse-plugin</packaging> <properties> <defaultSigning-excludeInnerJars>true</defaultSigning-excludeInnerJars> |