id="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView">
</view>
</extension>
-
+
+ <extension
+ point="org.eclipse.ui.themes">
+ <themeElementCategory
+ id="org.tizen.adv.settingCategory"
+ label="Tizen Advanced Declaration View">
+ </themeElementCategory>
+ </extension>
+
+ <extension
+ point="org.eclipse.ui.themes">
+ <colorDefinition
+ label="Declaration view foreground"
+ categoryId="org.tizen.adv.settingCategory"
+ value="0,0,0"
+ id="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.foregroundColor">
+ <description>
+ The color used as foreground for the Advanced Declaration view.
+ </description>
+ </colorDefinition>
+ </extension>
+
<extension
point="org.eclipse.ui.themes">
<colorDefinition
label="Declaration view background"
- categoryId="org.eclipse.wst.jsdt.ui.presentation"
+ categoryId="org.tizen.adv.settingCategory"
value="242,254,255"
id="org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.backgroundColor">
<description>
- The color used as background for the JavaScript Declaration view.
+ The color used as background for the Advanced Declaration view.
</description>
</colorDefinition>
</extension>
return;
}
- setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-
ColorRegistry registry= JFaceResources.getColorRegistry();
registry.addListener(this);
-
+
+ RGB foregroundRGB = registry.getRGB(getForegroundColorKey());
+ Color fgColor;
+ if (foregroundRGB == null) {
+ fgColor = display.getSystemColor(SWT.COLOR_BLACK);
+ } else {
+ fgColor = new Color(display, foregroundRGB);
+ }
+ setForeground(fgColor);
+
+
fBackgroundColorRGB= registry.getRGB(getBackgroundColorKey());
Color bgColor;
if (fBackgroundColorRGB == null) {
protected String getBackgroundColorKey() {
return "org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.backgroundColor"; //$NON-NLS-1$
}
+
+ /**
+ * The preference key for the foreground color.
+ *
+ * @return the foreground color key
+ *
+ */
+ protected String getForegroundColorKey() {
+ return "org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.foregroundColor"; //$NON-NLS-1$
+ }
+
/*
* @see IWorkbenchPart#dispose()
@Override
public void propertyChange(PropertyChangeEvent event) {
- if (getBackgroundColorKey().equals(event.getProperty())) {
+ if (getBackgroundColorKey().equals(event.getProperty()) || getForegroundColorKey().equals(event.getProperty())) {
inititalizeColors();
}
}
return;
}
- setForeground(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND));
-
ColorRegistry registry= JFaceResources.getColorRegistry();
registry.addListener(this);
+
+ RGB foregroundRGB = registry.getRGB(getForegroundColorKey());
+ Color fgColor;
+ if (foregroundRGB == null) {
+ fgColor = display.getSystemColor(SWT.COLOR_BLACK);
+ } else {
+ fgColor = new Color(display, foregroundRGB);
+ }
+ setForeground(fgColor);
fBackgroundColorRGB= registry.getRGB(getBackgroundColorKey());
Color bgColor;
return "org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.backgroundColor"; //$NON-NLS-1$
}
+ /**
+ * The preference key for the foreground color.
+ *
+ * @return the foreground color key
+ *
+ */
+ protected String getForegroundColorKey() {
+ return "org.tizen.web.advanceddeclarationview.ui.AdvancedDeclarationView.foregroundColor"; //$NON-NLS-1$
+ }
+
/**
* Tries to get a JavaScript element out of the given element.
@Override
public void propertyChange(PropertyChangeEvent event) {
- if (getBackgroundColorKey().equals(event.getProperty())) {
+ if (getBackgroundColorKey().equals(event.getProperty()) || getForegroundColorKey().equals(event.getProperty())) {
inititalizeColors();
}
}