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

UI fixes. Security deps.


Former-commit-id: da030f7f
上级 06c85be9
......@@ -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,
......
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册