diff options
| author | Andrey Loskutov | 2019-05-16 06:57:57 +0000 |
|---|---|---|
| committer | Andrey Loskutov | 2019-05-16 07:55:27 +0000 |
| commit | 0470f4612faa0ca366c94ccdb40e1bd94bb9618d (patch) | |
| tree | 25b667abe7af958a3be700d0cf1b7bb260d12aa8 | |
| parent | 8aee01f78b50965a1b3f8a639fb56a042ae22f0c (diff) | |
| download | eclipse.pde.ui-0470f4612faa0ca366c94ccdb40e1bd94bb9618d.tar.gz eclipse.pde.ui-0470f4612faa0ca366c94ccdb40e1bd94bb9618d.tar.xz eclipse.pde.ui-0470f4612faa0ca366c94ccdb40e1bd94bb9618d.zip | |
Bug 546205 - IllegalStateException in ColorManager.initializeDefaults()I20190519-1800I20190518-1800I20190517-1800I20190516-1800I20190516-1405I20190516-1335I20190516-1250I20190516-1200I20190516-1055
If we run build headless, don't try to init or use Display.
Change-Id: Ic07968fe22c020ed4bada2d46cd1f99361327660
Signed-off-by: Andrey Loskutov <loskutov@gmx.de>
| -rw-r--r-- | ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ColorManager.java | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ColorManager.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ColorManager.java index b75a389226..5719e5b3c5 100644 --- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ColorManager.java +++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/text/ColorManager.java @@ -59,6 +59,9 @@ public class ColorManager implements IColorManager, IPDEColorConstants { PreferenceConverter.setDefault(store, P_HEADER_ATTRIBUTES, HEADER_ATTRIBUTES); store.setDefault(P_HEADER_ATTRIBUTES + IPDEColorConstants.P_ITALIC_SUFFIX, true); PreferenceConverter.setDefault(store, P_HEADER_ASSIGNMENT, HEADER_ASSIGNMENT); + if (!PlatformUI.isWorkbenchRunning()) { + return; + } try { Display display = PlatformUI.getWorkbench().getDisplay(); Runnable runnable = () -> { @@ -73,7 +76,8 @@ public class ColorManager implements IColorManager, IPDEColorConstants { } else { display.asyncExec(runnable); } - } catch (SWTException e) { // keep non-high-contrast-mode defaults + } catch (SWTException | IllegalStateException e) { + // keep non-high-contrast-mode defaults } } |
