Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2012-09-17 18:55:36 +0000
committerMarkus Keller2012-09-17 18:55:36 +0000
commit7b835aa2a6a7fc236d5984d2e57061e17c171fe1 (patch)
treef1b487b63291c65a29c4ead75aeac52f82df990a
parent763e6ed01ac01ace24453f963deac731541d01b3 (diff)
downloadeclipse.platform.debug-20120917-185536.tar.gz
eclipse.platform.debug-20120917-185536.tar.xz
eclipse.platform.debug-20120917-185536.zip
Bug 389753: Set SWT.COLOR_INFO_FOREGROUND wherever we use SWT.COLOR_INFO_BACKGROUNDv20120917-185536
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java8
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java8
2 files changed, 13 insertions, 3 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
index bc353eaac..ab5d3f77e 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/preferences/StringVariablePreferencePage.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2007 IBM Corporation and others.
+ * Copyright (c) 2000, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -689,6 +689,12 @@ public class StringVariablePreferencePage extends PreferencePage implements IWor
return null;
}
public Color getForeground(Object element) {
+ if (element instanceof VariableWrapper) {
+ if (((VariableWrapper) element).isReadOnly()) {
+ Display display= Display.getCurrent();
+ return display.getSystemColor(SWT.COLOR_INFO_FOREGROUND);
+ }
+ }
return null;
}
public Color getBackground(Object element) {
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
index e1d7b1d6b..90d5babe2 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/ui/InspectPopupDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2005, 2010 IBM Corporation and others.
+ * Copyright (c) 2005, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -43,6 +43,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.ui.IViewPart;
@@ -350,7 +351,10 @@ public class InspectPopupDialog extends DebugPopup {
*/
public void paneChanged(String newPaneID) {
if (newPaneID.equals(DefaultDetailPane.ID)){
- applyBackgroundColor(getShell().getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND), fDetailPane.getCurrentControl());
+ Display display = getShell().getDisplay();
+ Control paneControl = fDetailPane.getCurrentControl();
+ applyBackgroundColor(display.getSystemColor(SWT.COLOR_INFO_BACKGROUND), paneControl);
+ applyForegroundColor(display.getSystemColor(SWT.COLOR_INFO_FOREGROUND), paneControl);
}
}

Back to the top