Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Setting a TextEditor's background
Setting a TextEditor's background [message #282852] Tue, 22 March 2005 07:01 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
"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
Previous Topic:Combo selection problems in wizard in RCP
Next Topic:Building Plugin externally from eclipse.
Goto Forum:
  


Current Time: Sat Sep 13 17:14:18 EDT 2025

Powered by FUDForum. Page generated in 0.03576 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top