Community
Participate
Working Groups
Build Identifier: 20090920-1017 I have a simple 200-line custom TextEditor. During a custom action ran from its context menu, I dynamically create, register and activate a MessageConsole to output the results of the action. Before I output any data, I set the background color to black with setBackground() using a Display.getDefault().syncExec() call, but it just doesn't work. No matter where I put the call to setBackground(), it always fails. I tried using display.getSystemColorId() and new Color(null,0,0,0). Reproducible: Always Steps to Reproduce: 1. Create a TextEditor and invoke an action from it 2. In the action, create a MessageConsole 3. In a display.syncExec(), set the background color of the console to black 4. Activate the console 5. Confirm the console is not black I will upload my simple project if allowed since it makes a simple test case.
Here's a URL to the project. The project is intended to be a simple Jython shell that can be invoked from a custom TextEditor. To see the bug in action, perform the following steps: 1. Run the project as an Eclipse plugin 2. In the second Eclipse that was started, open up a new project and a new file, test.py with the Jython Editor (use Open With->Other->Jython Editor). 3. Hit Control-R within the text editor window or right click inside the editor and hit "Run Script". 4. Confirm that the new console background is not black, despite line 157 of JythonEditor.java: console.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_BLACK)); This was also verified independently on Cocoa 64-bit and Helios on Vista.
Looks like the URL doesn't show up easily, so here it is. http://i8jesus.com/stuff/misc/JyConsole.zip
Also happens on build ID 20100917-0705.
I don't think this is a bug in SWT. Maybe in the Console, moving to the Debug Component (I believe they maintain the Console).
I believe it's duplicate. *** This bug has been marked as a duplicate of bug 278529 ***