Bug 8615 - Styled Text widget does not respond to system color change
Summary: Styled Text widget does not respond to system color change
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows NT
: P4 normal (vote)
Target Milestone: 2.0 M5   Edit
Assignee: Andre Weinand CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-28 13:55 EST by Peter Burka CLA
Modified: 2002-04-08 13:14 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Burka CLA 2002-01-28 13:55:11 EST
When I change the background colour of my widgets (using the Windows Display 
Properties dialog), all of the widgets respond except for the text widget used 
in, for instance, the Java text editor.  It maintains the colour I started with.

(Tested against 20020125 build)
Comment 1 Mike Wilson CLA 2002-01-29 09:55:44 EST
We have verified that StyledText *does* respond to system color changes if its 
background color has not been explicitely set. For example, if you open an 
editor on a .html file, and then switch colors, you will see that the editor 
background also changes.

JDT is currently setting the background color of the java editor, which 
prevents us from changing its background color in response to system changes. 
Below is a stack trace showing where the color is set...

Thread [main] (Suspended (breakpoint at line 6296 in 
org.eclipse.swt.custom.StyledText))
	org.eclipse.swt.custom.StyledText.setBackground
(org.eclipse.swt.graphics.Color) line: 6296
	org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor
(org.eclipse.ui.texteditor.AbstractTextEditor).initializeViewerColors
(org.eclipse.jface.text.source.ISourceViewer) line: 1060
	org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor
(org.eclipse.ui.texteditor.AbstractTextEditor).createPartControl
(org.eclipse.swt.widgets.Composite) line: 890
	org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPart
Control(org.eclipse.swt.widgets.Composite) line: 962
	org.eclipse.ui.internal.PartPane$2.run() line: 60
	org.eclipse.core.internal.runtime.InternalPlatform.run
(org.eclipse.core.runtime.ISafeRunnable) line: 821
	org.eclipse.core.runtime.Platform.run
(org.eclipse.core.runtime.ISafeRunnable) line: 395
	org.eclipse.ui.internal.EditorPane
(org.eclipse.ui.internal.PartPane).createChildControl
(org.eclipse.swt.widgets.Composite) line: 58
	org.eclipse.ui.internal.EditorPane
(org.eclipse.ui.internal.PartPane).createControl
(org.eclipse.swt.widgets.Composite) line: 100
	org.eclipse.ui.internal.EditorWorkbook.createPage
(org.eclipse.ui.internal.EditorPane) line: 214
	org.eclipse.ui.internal.EditorWorkbook.add
(org.eclipse.ui.internal.LayoutPart) line: 75
	org.eclipse.ui.internal.EditorArea.addEditor
(org.eclipse.ui.internal.EditorPane) line: 43
	org.eclipse.ui.internal.EditorPresentation.openEditor
(org.eclipse.ui.IEditorPart, boolean) line: 295
	org.eclipse.ui.internal.EditorManager$2.run() line: 461
	org.eclipse.swt.custom.BusyIndicator.showWhile
(org.eclipse.swt.widgets.Display, java.lang.Runnable) line: 56
	org.eclipse.ui.internal.EditorManager.openInternalEditor
(org.eclipse.ui.IEditorPart, 
org.eclipse.ui.internal.registry.EditorDescriptor, 
org.eclipse.ui.IEditorInput, boolean) line: 447
	org.eclipse.ui.internal.EditorManager.openInternalEditor
(org.eclipse.ui.internal.registry.EditorDescriptor, 
org.eclipse.ui.IEditorInput, boolean) line: 498
	org.eclipse.ui.internal.EditorManager.openEditor
(org.eclipse.ui.internal.registry.EditorDescriptor, 
org.eclipse.ui.IEditorInput) line: 372
	org.eclipse.ui.internal.EditorManager.openEditor(java.lang.String, 
org.eclipse.ui.IEditorInput) line: 256
	org.eclipse.ui.internal.WorkbenchPage.openEditor
(org.eclipse.ui.IEditorInput, java.lang.String, boolean, boolean, 
org.eclipse.core.resources.IFile) line: 1156
	org.eclipse.ui.internal.WorkbenchPage.openEditor
(org.eclipse.ui.IEditorInput, java.lang.String, boolean) line: 1117
	org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor
(org.eclipse.ui.IEditorInput, java.lang.String, boolean) line: 130
	org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor
(java.lang.Object, boolean) line: 102
	org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor
(java.lang.Object) line: 89
	org.eclipse.jdt.internal.ui.packageview.OpenResourceAction.run() line: 
51
	org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.handleDoubl
eClick(org.eclipse.jface.viewers.DoubleClickEvent) line: 742
	org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart.access$1
(org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart, 
org.eclipse.jface.viewers.DoubleClickEvent) line: 737
	org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.doubleCli
ck(org.eclipse.jface.viewers.DoubleClickEvent) line: 374
	org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer
(org.eclipse.jface.viewers.StructuredViewer).fireDoubleClick
(org.eclipse.jface.viewers.DoubleClickEvent) line: 272
	org.eclipse.jdt.internal.ui.viewsupport.ProblemTreeViewer
(org.eclipse.jface.viewers.StructuredViewer).handleDoubleSelect
(org.eclipse.swt.events.SelectionEvent) line: 416
	org.eclipse.jface.viewers.AbstractTreeViewer$1.widgetDefaultSelected
(org.eclipse.swt.events.SelectionEvent) line: 627
	org.eclipse.swt.widgets.TypedListener.handleEvent
(org.eclipse.swt.widgets.Event) line: 92
	org.eclipse.swt.widgets.EventTable.sendEvent
(org.eclipse.swt.widgets.Event) line: 74
	org.eclipse.swt.widgets.Tree
(org.eclipse.swt.widgets.Widget).notifyListeners(int, 
org.eclipse.swt.widgets.Event) line: 637
	org.eclipse.swt.widgets.Display.runDeferredEvents() line: 1413
	org.eclipse.swt.widgets.Display.readAndDispatch() line: 1205
	org.eclipse.ui.internal.Workbench.runEventLoop() line: 822
	org.eclipse.ui.internal.Workbench.run(java.lang.Object) line: 805
	org.eclipse.core.internal.boot.InternalBootLoader.run
(java.lang.String, java.net.URL, java.lang.String, java.lang.String[]) line: 
878
	org.eclipse.core.boot.BootLoader.run(java.lang.String, java.net.URL, 
java.lang.String, java.lang.String[]) line: 321
	java.lang.reflect.Method.invoke(java.lang.Object, java.lang.Object[]) 
line: not available [native method]
	org.eclipse.core.launcher.UIMain
(org.eclipse.core.launcher.Main).basicRun(java.lang.String[]) line: 151
	org.eclipse.core.launcher.UIMain(org.eclipse.core.launcher.Main).run
(java.lang.String[]) line: 502
	org.eclipse.core.launcher.UIMain.main(java.lang.String[]) line: 52
Comment 2 Erich Gamma CLA 2002-01-29 19:17:19 EST
we should verify that the compare editor doesn't do the same.
Comment 3 Kai-Uwe Maetzel CLA 2002-03-17 10:10:27 EST
Editor has been fixed for M3. Moved to compare.
Comment 4 Andre Weinand CLA 2002-04-08 13:14:13 EDT
Compare editor has been fixed for M5.