Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Enhancing the JDT Java Editor
Enhancing the JDT Java Editor [message #324701] Wed, 30 January 2008 15:46 Go to next message
Eclipse UserFriend
Originally posted by: nazdak9.gmail.com

Hi,

Is there anyway to modify the default Eclipse Java Editor programmaticaly? I can't seem to find any extensions that support the extending of the JavaEditor class.

For example, if I want my plug-in to change the color of comments in the Java editor from green to yellow, can it be done?

Cheers.
Re: Enhancing the JDT Java Editor [message #324702 is a reply to message #324701] Wed, 30 January 2008 15:49 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Shane,

Go crazy with Window->Preferences->Java->Editor->Syntax Coloring

Shane wrote:
> Hi,
>
> Is there anyway to modify the default Eclipse Java Editor programmaticaly? I can't seem to find any extensions that support the extending of the JavaEditor class.
>
> For example, if I want my plug-in to change the color of comments in the Java editor from green to yellow, can it be done?
>
> Cheers.
>
Re: Enhancing the JDT Java Editor [message #324705 is a reply to message #324702] Wed, 30 January 2008 16:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nazdak9.gmail.com

Perhaps I wasn't very clear in my request. I want to actually add functionality to the default java editor. The color change was just an example.

Here's a better example: I want the Java editor to automatically change any text in between two ampersands (&...&) to yellow. Is there any way I could add this feature? It would require somehow accessing the SourceViewerConfiguration.
Re: Enhancing the JDT Java Editor [message #324706 is a reply to message #324705] Wed, 30 January 2008 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: merks.ca.ibm.com

Shane,

It's not a very good example then. :-P

I don't think the Java editor has APIs to would let you arbitrarily
change the colorization algorithm. Of course it's open source, so you
could change the base code...


Shane wrote:
> Perhaps I wasn't very clear in my request. I want to actually add functionality to the default java editor. The color change was just an example.
>
> Here's a better example: I want the Java editor to automatically change any text in between two ampersands (&...&) to yellow. Is there any way I could add this feature? It would require somehow accessing the SourceViewerConfiguration.
>
Re: Enhancing the JDT Java Editor [message #324708 is a reply to message #324706] Wed, 30 January 2008 17:36 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: nazdak9.gmail.com

Ah I see. Thanks for that.

And in defense of my initial example, the first sentence of my post should have made it quite clear that I wasn't asking merely for directions to the customization menu.

But that's all good. :P
Re: Enhancing the JDT Java Editor [message #324710 is a reply to message #324702] Wed, 30 January 2008 18:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Ed Merks" <merks@ca.ibm.com> wrote in message
news:fnqnsv$v1c$1@build.eclipse.org...
> Shane,
>
> Go crazy with Window->Preferences->Java->Editor->Syntax Coloring
> Shane wrote:
>> Hi,
>>
>> Is there anyway to modify the default Eclipse Java Editor
>> programmaticaly? I can't seem to find any extensions that support the
>> extending of the JavaEditor class.
>>
>> For example, if I want my plug-in to change the color of comments in the
>> Java editor from green to yellow, can it be done?


Nice answer, Ed :-)

But I think Shane is asking about doing it programmatically. With regard to
the color of comments (or anything else that can be modified through the
preferences dialogs), one answer is simply to change the preference
programmatically, that is, using the Preference API - see
http://www.eclipse.org/eclipse/platform-core/documents/user_ settings/faq.html .

Shane, if you want to do something that is not covered by changing settings,
please be more specific.
Re: Enhancing the JDT Java Editor [message #324711 is a reply to message #324710] Wed, 30 January 2008 18:06 Go to previous message
Eclipse UserFriend
Originally posted by: wharley.bea.com

"Walter Harley" <wharley@bea.com> wrote in message
news:fnqvnt$koj$1@build.eclipse.org...
> Shane, if you want to do something that is not covered by changing
> settings, please be more specific.

Sorry, in the time it took me to respond, I see that you did clarify some
more.

Yes, if you want to actually change the syntax coloring algorithms, there's
not going to be a simple answer.

I would suggest looking at the Structured Source Editor, which is part of
WTP.
Previous Topic:java.lang.OutOfMemoryError: Java heap space
Next Topic:launchConfigurationTypeImages
Goto Forum:
  


Current Time: Tue Sep 16 23:25:16 EDT 2025

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

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

Back to the top