Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2019-03-05 10:19:21 -0500
committerFred Bricon2019-03-05 10:19:21 -0500
commitc5392da6bab9893bcbf5b43f651abe48d5819bea (patch)
treeee26816dca7273d1bc947bdeeb33e10daf5e86c8
parent7d1b966340eb2f6f1b0b18b0f2192ee1b6288b8a (diff)
downloadm2e-core-c5392da6bab9893bcbf5b43f651abe48d5819bea.tar.gz
m2e-core-c5392da6bab9893bcbf5b43f651abe48d5819bea.tar.xz
m2e-core-c5392da6bab9893bcbf5b43f651abe48d5819bea.zip
Bug 545026: fix background color in Source Lookup preferencesmilestones/1.11/1.11.0.20190220-2119
Change-Id: Icf6a81b3473bfe5c9c79c56c68b7eff64bf6fbd4 Signed-off-by: Fred Bricon <fbricon@gmail.com>
-rw-r--r--org.eclipse.m2e.sourcelookup.ui/plugin.xml1
-rw-r--r--org.eclipse.m2e.sourcelookup.ui/src/org/eclipse/m2e/sourcelookup/ui/internal/SourceLookupPreferencePage.java14
2 files changed, 14 insertions, 1 deletions
diff --git a/org.eclipse.m2e.sourcelookup.ui/plugin.xml b/org.eclipse.m2e.sourcelookup.ui/plugin.xml
index 240d8388..ccee9bfd 100644
--- a/org.eclipse.m2e.sourcelookup.ui/plugin.xml
+++ b/org.eclipse.m2e.sourcelookup.ui/plugin.xml
@@ -102,6 +102,7 @@
class="org.eclipse.m2e.sourcelookup.ui.internal.SourceLookupPreferencePage"
id="org.eclipse.m2e.sourcelookup.ui.internal.SourceLookupPreferencePage"
name="Source Lookup">
+ <keywordReference id="org.eclipse.m2e.core.maven"/>
</page>
</extension>
</plugin>
diff --git a/org.eclipse.m2e.sourcelookup.ui/src/org/eclipse/m2e/sourcelookup/ui/internal/SourceLookupPreferencePage.java b/org.eclipse.m2e.sourcelookup.ui/src/org/eclipse/m2e/sourcelookup/ui/internal/SourceLookupPreferencePage.java
index 69f6fbc7..64c8b6ed 100644
--- a/org.eclipse.m2e.sourcelookup.ui/src/org/eclipse/m2e/sourcelookup/ui/internal/SourceLookupPreferencePage.java
+++ b/org.eclipse.m2e.sourcelookup.ui/src/org/eclipse/m2e/sourcelookup/ui/internal/SourceLookupPreferencePage.java
@@ -11,13 +11,18 @@
package org.eclipse.m2e.sourcelookup.ui.internal;
import org.eclipse.jdt.internal.launching.sourcelookup.advanced.AdvancedSourceLookupSupport;
+import org.eclipse.jface.preference.JFacePreferences;
import org.eclipse.jface.preference.PreferencePage;
+import org.eclipse.jface.resource.JFaceColors;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.swt.SWT;
+import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Point;
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.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
@@ -52,12 +57,18 @@ public class SourceLookupPreferencePage extends PreferencePage implements IWorkb
gl_composite.marginHeight = 0;
composite.setLayout(gl_composite);
+ Color background = JFaceResources.getColorRegistry().get(JFacePreferences.INFORMATION_BACKGROUND_COLOR);
+ if(background == null) {
+ background = JFaceColors.getInformationViewerBackgroundColor(Display.getCurrent());
+ }
+ composite.setBackground(background);
Label lblVMArguments = new Label(composite, SWT.NONE);
lblVMArguments.setText("VM arguments:");
vmArguments = new Text(composite, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
vmArguments.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
vmArguments.setText(AdvancedSourceLookupSupport.getJavaagentString());
+ vmArguments.setBackground(background);
Label lblLaunchVMArguments = new Label(composite, SWT.NONE);
lblLaunchVMArguments.setText(".launch file VM arguments:");
@@ -65,6 +76,7 @@ public class SourceLookupPreferencePage extends PreferencePage implements IWorkb
launchFileVMArguments = new Text(composite, SWT.BORDER | SWT.READ_ONLY | SWT.WRAP);
launchFileVMArguments.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
launchFileVMArguments.setText("-javaagent:${sourcelookup_agent_path}");
+ launchFileVMArguments.setBackground(background);
Label lblLaunchFileAttribute = new Label(composite, SWT.NONE);
lblLaunchFileAttribute.setText(".launch file attribute:");
@@ -73,7 +85,7 @@ public class SourceLookupPreferencePage extends PreferencePage implements IWorkb
launchFileAttribute.setText(
"<stringAttribute key=\"org.eclipse.debug.core.source_locator_id\" value=\"org.eclipse.m2e.sourcelookupDirector\"/>\n");
launchFileAttribute.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
-
+ launchFileAttribute.setBackground(background);
return composite;
}
}

Back to the top