diff --git a/plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF b/plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF index 6f408d8dd46f3f5b09d1608f43d4740cc54ca1c6..6351c28cdbfaf73da036096c9f130d5b610d1d54 100644 --- a/plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF +++ b/plugins/org.jkiss.dbeaver.core/META-INF/MANIFEST.MF @@ -109,6 +109,7 @@ Require-Bundle: org.eclipse.core.runtime, org.eclipse.core.filesystem, org.eclipse.core.resources, org.eclipse.core.expressions, + org.eclipse.equinox.security, org.eclipse.ui, org.eclipse.ui.editors, org.eclipse.ui.views, diff --git a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/css/EditorFolderElementHandler.java b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/css/EditorFolderElementHandler.java index 5f11a96c3f8d092874166bffa10d3dd693f81bda..9892b3d8f2a26094ae7b4f34140d9e25faaa0733 100644 --- a/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/css/EditorFolderElementHandler.java +++ b/plugins/org.jkiss.dbeaver.core/src/org/jkiss/dbeaver/ui/css/EditorFolderElementHandler.java @@ -30,12 +30,16 @@ public class EditorFolderElementHandler extends CSSPropertySelectedTabsSWTHandle //Object cssId = control.getData(CSSSWTConstants.CSS_ID_KEY); if (PROP_BACKGROUND.equalsIgnoreCase(property) && (value.getCssValueType() == CSSValue.CSS_VALUE_LIST)) { Color newColor = null; - IEditorPart activeEditor = DBeaverUI.getActiveWorkbenchWindow().getActivePage().getActiveEditor(); - if (activeEditor instanceof DBPContextProvider) { - DBCExecutionContext context = ((DBPContextProvider) activeEditor).getExecutionContext(); - if (context != null) { - newColor = UIUtils.getConnectionColor(context.getDataSource().getContainer().getConnectionConfiguration()); - } + try { + IEditorPart activeEditor = DBeaverUI.getActiveWorkbenchWindow().getActivePage().getActiveEditor(); + if (activeEditor instanceof DBPContextProvider) { + DBCExecutionContext context = ((DBPContextProvider) activeEditor).getExecutionContext(); + if (context != null) { + newColor = UIUtils.getConnectionColor(context.getDataSource().getContainer().getConnectionConfiguration()); + } + } + } catch (Exception e) { + // Some UI issues. Probably workbench window or page wasn't yet created } if (newColor == null) { super.applyCSSProperty(control, property, value, pseudo, engine);