This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 270403 - Need ability to set Syntax Coloring through preferences
Summary: Need ability to set Syntax Coloring through preferences
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: WTP Incubator (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Sam Neth CLA
QA Contact: XQDT CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-29 22:31 EDT by David Carver CLA
Modified: 2021-11-18 16:19 EST (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Carver CLA 2009-03-29 22:31:48 EDT
The current syntax coloring is pretty picky on what it expects to be done.  This needs to be improved, so that NPE's are not being tossed, and wider range of XQuery samples needs to be run through the code.

Also, might have to run the Antlr runtime generator against the XQuery grammar provided by Martin Probst in XQpretty, so that it can be used with a released version of the Antlr Runtime.
Comment 1 David Carver CLA 2009-10-16 19:56:43 EDT
New XQuery code still doesn't allow for configuration of Syntax colors.
Comment 2 Sam Neth CLA 2009-10-20 15:21:16 EDT
We definitely have agreement that the colors should be configurable.  I'd like to support color profiles, possibly with export/import.  I don't know if this is a feature available in other plugins that we might be able to leverage.

I also think the default colors need some work; to the extent we're in conflict with XML coloring in other Eclipse editors, we should correct that.  For XQuery constructs though, color combinations like yellow on white just aren't readable.

What do you mean with the XQuery grammar comment David?  I do think our grammar has some issues, but it also contains vendor extensions, so if you're suggesting that we use an existing standard-based grammar, I don't think that will work.  Perhaps that comment is just dated?
Comment 3 David Carver CLA 2009-10-20 15:57:14 EDT
(In reply to comment #2)
> What do you mean with the XQuery grammar comment David?  I do think our grammar
> has some issues, but it also contains vendor extensions, so if you're
> suggesting that we use an existing standard-based grammar, I don't think that
> will work.  Perhaps that comment is just dated?

The old XQuery editor code still in org.eclipse.wst.xquery, used an old grammar from a third party which we didn't have control over.  It was hit or miss at times if we were detecting keywords correctly that needed to be colored.

So, yes the comment is out dated.
Comment 4 Gabriel Petrovay CLA 2009-12-01 09:52:04 EST
Should be implemented for 0.7 M1
Comment 5 Gabriel Petrovay CLA 2009-12-02 12:17:28 EST
Wrong priority!
Comment 6 Gabriel Petrovay CLA 2009-12-02 12:38:37 EST
You might want to take a look at: AbstractScriptEditorColoringConfigurationBlock
Comment 7 Lionel Villard CLA 2010-07-21 16:20:51 EDT
The SSE provides this feature (even though no sample document is provided). 

I suggest we close this bug.
Comment 8 David Carver CLA 2010-07-21 17:07:44 EDT
(In reply to comment #7)
> The SSE provides this feature (even though no sample document is provided). 
> 
> I suggest we close this bug.

Is this completely working now?  I haven't yet tried.
Comment 9 David Carver CLA 2010-07-21 17:08:43 EDT
Also would like to see Unit Tests to verify that this is working.  If preferences stored are changed are the new values in affect.

In general the plugins need more unit tests.
Comment 10 Lionel Villard CLA 2010-07-21 17:25:23 EDT
It's working but it is not integrated with the XML coloring preference page. That could be another enhancement request.

What tools are used to write UI tests?
Comment 11 David Carver CLA 2010-07-21 18:17:47 EDT
Junit as you are really testing the result of the values of the syntax coloring at specific regions.

Take a look at the org.eclipse.wst.xsl.ui.tests plugin for some examples.
Comment 12 Gabriel Petrovay CLA 2010-08-04 10:12:56 EDT
This bug is now obsolete as the main feature is there in the SSE editor.

Create bugs:
Bug 321720 for unit testing
Bug 321723 for color scheme enhancement