Setting a TextEditor's background [message #282852] |
Tue, 22 March 2005 07:01  |
Eclipse User |
|
|
|
Hi all,
As part of my editor plug-in, I'd like to provide the ability to mimmick the
old terminal/console type editors - the ones that often have a black
background and green text.
By default, it seems that all code editors in Eclipse have a regular white
background. I'm hoping that, if I go deep enough down to the associated SWT
components I can do some sort of "setBackground( new RGB( 0, 0, 0 ) );"
call.
Is this possible?
If so, I'm a bit lost as to what sort of interface reference I'm looking
for - what type of SWT widget, and where from?
Any ideas?
Cheers,
Jack
|
|
|
Re: Setting a TextEditor's background [message #282876 is a reply to message #282852] |
Tue, 22 March 2005 14:30   |
Eclipse User |
|
|
|
In your subclass of (I assume) AbstractTextEditor, make sure you pass an
IPreferenceStore with the appropriate values for
AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAUL T and
AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND.
HTH, tom
Jack Hoxley wrote:
> Hi all,
>
> As part of my editor plug-in, I'd like to provide the ability to mimmick the
> old terminal/console type editors - the ones that often have a black
> background and green text.
>
> By default, it seems that all code editors in Eclipse have a regular white
> background. I'm hoping that, if I go deep enough down to the associated SWT
> components I can do some sort of "setBackground( new RGB( 0, 0, 0 ) );"
> call.
>
> Is this possible?
>
> If so, I'm a bit lost as to what sort of interface reference I'm looking
> for - what type of SWT widget, and where from?
>
> Any ideas?
> Cheers,
> Jack
>
>
>
|
|
|
Re: Setting a TextEditor's background [message #282963 is a reply to message #282876] |
Thu, 24 March 2005 06:51  |
Eclipse User |
|
|
|
"Tom Eicher" <eclipse@tom.eicher.name> wrote in message
news:d1q0h9$mq1$2@news.eclipse.org...
> In your subclass of (I assume) AbstractTextEditor, make sure you pass an
> IPreferenceStore with the appropriate values for
> AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND_SYSTEM_DEFAUL T and
> AbstractTextEditor.PREFERENCE_COLOR_BACKGROUND.
>
> HTH, tom
Thanks for the information - appreciated.
Courtesy of the great documentation took me several attempts to get it to
understand the colour I wanted. Temporarily turning every single source code
editor black... genius :-)
Jack
|
|
|
Powered by
FUDForum. Page generated in 0.03576 seconds