提交 e4fa0b8e 编写于 作者: S Serge Rider

UI fixes. Security deps.


Former-commit-id: da030f7f
上级 06c85be9
...@@ -109,6 +109,7 @@ Require-Bundle: org.eclipse.core.runtime, ...@@ -109,6 +109,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.filesystem, org.eclipse.core.filesystem,
org.eclipse.core.resources, org.eclipse.core.resources,
org.eclipse.core.expressions, org.eclipse.core.expressions,
org.eclipse.equinox.security,
org.eclipse.ui, org.eclipse.ui,
org.eclipse.ui.editors, org.eclipse.ui.editors,
org.eclipse.ui.views, org.eclipse.ui.views,
......
...@@ -30,12 +30,16 @@ public class EditorFolderElementHandler extends CSSPropertySelectedTabsSWTHandle ...@@ -30,12 +30,16 @@ public class EditorFolderElementHandler extends CSSPropertySelectedTabsSWTHandle
//Object cssId = control.getData(CSSSWTConstants.CSS_ID_KEY); //Object cssId = control.getData(CSSSWTConstants.CSS_ID_KEY);
if (PROP_BACKGROUND.equalsIgnoreCase(property) && (value.getCssValueType() == CSSValue.CSS_VALUE_LIST)) { if (PROP_BACKGROUND.equalsIgnoreCase(property) && (value.getCssValueType() == CSSValue.CSS_VALUE_LIST)) {
Color newColor = null; Color newColor = null;
IEditorPart activeEditor = DBeaverUI.getActiveWorkbenchWindow().getActivePage().getActiveEditor(); try {
if (activeEditor instanceof DBPContextProvider) { IEditorPart activeEditor = DBeaverUI.getActiveWorkbenchWindow().getActivePage().getActiveEditor();
DBCExecutionContext context = ((DBPContextProvider) activeEditor).getExecutionContext(); if (activeEditor instanceof DBPContextProvider) {
if (context != null) { DBCExecutionContext context = ((DBPContextProvider) activeEditor).getExecutionContext();
newColor = UIUtils.getConnectionColor(context.getDataSource().getContainer().getConnectionConfiguration()); 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) { if (newColor == null) {
super.applyCSSProperty(control, property, value, pseudo, engine); super.applyCSSProperty(control, property, value, pseudo, engine);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册