Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » color scheme for java editor
color scheme for java editor [message #57569] Sat, 14 June 2003 16:33 Go to next message
Vladimir Blagojevic is currently offline Vladimir BlagojevicFriend
Messages: 71
Registered: July 2009
Member
Hi,

I am a recent convert to Eclipse. One of the things that I found quite
unusual is that Eclipse has a very primitive color scheme for java
editor.For example,there is no option to color object field references,
local references and static variables. It is a big difference,no? Lets add
some votes to the cause.

Best regards.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=31826
Re: color scheme for java editor [message #57763 is a reply to message #57569] Sun, 15 June 2003 10:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: simon+eclipse.tardell.se

"Vladimir Blagojevic" <vladimir@cs.yorku.ca> wrote in message
news:bcfioe$5am$1@rogue.oti.com...
> Hi,
>
> I am a recent convert to Eclipse. One of the things that I found quite
> unusual is that Eclipse has a very primitive color scheme for java
> editor.For example,there is no option to color object field references,
> local references and static variables. It is a big difference,no? Lets add
> some votes to the cause.
>
> Best regards.
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=31826
>
Also see the somewhat more specific:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=30154
https://bugs.eclipse.org/bugs/show_bug.cgi?id=36789

Simon
Re: color scheme for java editor [message #57869 is a reply to message #57763] Sun, 15 June 2003 17:45 Go to previous messageGo to next message
Vladimir Blagojevic is currently offline Vladimir BlagojevicFriend
Messages: 71
Registered: July 2009
Member
Hey,

Simon I agree with you. I took a 10 minute tour around jdt.ui code
responsible for coloring and my initial evaluation is that it is not going
to be an enhancement that is easy to implement. Look at the
org.eclipse.jdt.internal.ui.text.java.JavaCodeScanner from the head branch
of CVS. Focus on createRules() and its details. As far as I can conclude
java scanner is a very low level token based scanner. It can detect java
keywords , whitespaces etc but when we are delving into a higher lever
constructs like parameters , instance, local, and static variables you get
in trouble. Basically you need a scanner on a higher level IMHO. It would be
interesting if someone from JDT team can make a comment.

Best regrads.
Re: color scheme for java editor [message #57894 is a reply to message #57869] Sun, 15 June 2003 19:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam.kiezun.gmx.net.remove

> Simon I agree with you. I took a 10 minute tour around jdt.ui code
> responsible for coloring and my initial evaluation is that it is not going
> to be an enhancement that is easy to implement.

sure, if it were easy it would have been implemented already, right? :-)

a.
--
eclipse.org
Re: color scheme for java editor [message #58919 is a reply to message #57894] Tue, 17 June 2003 03:43 Go to previous messageGo to next message
Vladimir Blagojevic is currently offline Vladimir BlagojevicFriend
Messages: 71
Registered: July 2009
Member
> sure, if it were easy it would have been implemented already, right? :-)

Adam,

Can AST trees be used for code syntax highlighting? When java editor loads a
java file, AST tree is constructed as well, right? Hmmm these concepts and
problems are very interesting indeed. Any good JDT internals introduction
documents around?

Best regards.
Re: color scheme for java editor [message #59042 is a reply to message #58919] Tue, 17 June 2003 08:26 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

yes, they could
the problem is that parsing a java file takes, let's say 300ms
that might be too slow for smooth syntax highlighting
what you need is incremental AST, and that we don't have
see https://bugs.eclipse.org/bugs/show_bug.cgi?id=36890

documents for internals? no, there's nothing, afaik - just read the code
but ASTs are API - see javadoc in the appropriate package

> When java editor loads a java file, AST tree is constructed as well, right?
nope

a.
--
eclipse.org
Re: color scheme for java editor [message #59332 is a reply to message #59042] Tue, 17 June 2003 16:03 Go to previous messageGo to next message
Vladimir Blagojevic is currently offline Vladimir BlagojevicFriend
Messages: 71
Registered: July 2009
Member
> yes, they could
> the problem is that parsing a java file takes, let's say 300ms
> that might be too slow for smooth syntax highlighting
> what you need is incremental AST, and that we don't have
> see https://bugs.eclipse.org/bugs/show_bug.cgi?id=36890

Thanks Adam. I wish the reporter (Jerome Lanneluc) was a little bit more
explicit. It is a nice practice to describe the problems thoroughly :)

I am guessing that Jerome wants to say that rebuilding the whole class tree
after one of its nodes changes is deemed too expensive and inefficient?
Sure, that is going to help somewhat I guess. But you still have to
construct the syntax tree for the whole java file before syntax colouring
it? How is incremental AST going to hep in that case?

Or does Jerome want to have an AST consisting of lazily created nodes, so
that only source visible part of the java file has the actual AST node
created and the rest (invisible part) consist of some sort of lightweight
node proxies? I think that this is what he wants when he talks about "create
nodes on request".

Best regards.
Re: color scheme for java editor [message #59432 is a reply to message #59332] Tue, 17 June 2003 16:59 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: adam_kiezun.ch.ibm.spam.protection.com

> Thanks Adam. I wish the reporter (Jerome Lanneluc) was a little bit more
> explicit.

Jerome is also a commiter in JDT Core team - that's why :-)
(he knows exactly what is meant)

a.
--
Re: color scheme for java editor [message #60113 is a reply to message #59332] Wed, 18 June 2003 09:44 Go to previous message
Jerome Lanneluc is currently offline Jerome LannelucFriend
Messages: 572
Registered: July 2009
Senior Member
Please see my comments below.

"Vladimir Blagojevic" <vladimir@cs.yorku.ca> wrote in message
news:bcne5f$ljo$1@rogue.oti.com...
> > yes, they could
> > the problem is that parsing a java file takes, let's say 300ms
> > that might be too slow for smooth syntax highlighting
> > what you need is incremental AST, and that we don't have
> > see https://bugs.eclipse.org/bugs/show_bug.cgi?id=36890
>
> Thanks Adam. I wish the reporter (Jerome Lanneluc) was a little bit more
> explicit. It is a nice practice to describe the problems thoroughly :)
This bug was not intended for public consumption, but more as a reminder for
a possible work item.

>
> I am guessing that Jerome wants to say that rebuilding the whole class
tree
> after one of its nodes changes is deemed too expensive and inefficient?
Right.

> Sure, that is going to help somewhat I guess. But you still have to
> construct the syntax tree for the whole java file before syntax colouring
> it? How is incremental AST going to hep in that case?
If incremental AST is associated with a callback mechanism, then the syntax
coloror could listen to these events and redraw only the parts that have
changed.

>
> Or does Jerome want to have an AST consisting of lazily created nodes, so
> that only source visible part of the java file has the actual AST node
> created and the rest (invisible part) consist of some sort of lightweight
> node proxies? I think that this is what he wants when he talks about
"create
> nodes on request".
Thats' correct.

>
> Best regards.
>
>
Previous Topic:Using SOAP
Next Topic:Project Classpath through Command Line
Goto Forum:
  


Current Time: Fri Aug 16 18:22:52 GMT 2024

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

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

Back to the top