Bug 213775 - [xslt][editor] Adding more syntax highlighting options
Summary: [xslt][editor] Adding more syntax highlighting options
Status: RESOLVED FIXED
Alias: None
Product: WTP Source Editing
Classification: WebTools
Component: wst.xsl (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 enhancement (vote)
Target Milestone: 3.1   Edit
Assignee: David Carver CLA
QA Contact: David Williams CLA
URL:
Whiteboard:
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2007-12-22 15:11 EST by David Carver CLA
Modified: 2009-04-30 14:35 EDT (History)
2 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 2007-12-22 15:11:35 EST
From EclipseXSLT bug report:

I would like to have different color on HTML and HTML related elements.
Maybe the ability to add new "Content type" selections and set color of
each individually?
Comment 1 Doug CLA 2008-03-21 06:33:34 EDT
Changing this to XML project and would like to expand a little on the requirement.

It would be really, really cool if it was possible to change the colour of an xml element based on its namespace. For example, if all xsl elements could be coloured differently to the rest of the document, it would be much easier to read an XSL file.

Is this possible?
Comment 2 Nitin Dahyabhai CLA 2008-04-15 22:23:11 EDT
Might be possible courtesy of bug 224209 in the next release.
Comment 3 David Carver CLA 2008-06-28 12:26:28 EDT
moving to wtp.inc.xsl
Comment 4 David Carver CLA 2008-07-16 01:49:26 EDT
doug this is something we might have to do by extending the LineStyleProviders to recognize at least the XSL Namespaced elements and providing different coloring for them.   I don't know if the XML source editor has plans to allow for the XML editor to have namespace specific coloring or not?   Nitin is this something you guys are looking at for 3.1?
Comment 5 David Carver CLA 2008-09-03 16:49:14 EDT
Tentatively adding this for 1.0M3, if time permits may move it up in the schedule.
Comment 6 David Carver CLA 2008-09-20 18:30:14 EDT
Here is what I see needs to be done to implement this:

* Add an XSL Editor Preference Page
* Under the XSL Editor preference Page add the Syntax Highlighting
* Provide a Syntax Highlighting preferences for xsl:elements and attributes.  Base this off of the existing XML colors.
* Implement a LineStyleProvider for the XSL Editor.

Additional items that can be done:
* Move the XSL Templates so that they appear under the Editor menu option.
Comment 7 David Carver CLA 2008-10-05 02:43:44 EDT
This is now implemented.  The default for XSL is to be bold, but this can be changed by the User through the new XSL Syntax Coloring preference page.   There still needs to be some more tweaking done to the code, and little bit more refactoring to allow easier maintenance, as well as listening for property change events, but it should work as designed.

I'll open separate bugs for the other features and refactorings.  There is also a new LineStyleProvider test as well.
Comment 8 David Carver CLA 2008-10-05 02:45:38 EDT
No Editor menu has been implemented yet, should we do this to follow the same pattern as the XML files?

Comment 9 David Carver CLA 2009-04-30 14:28:53 EDT
mass update to 3.1 target due to movement from wtp incubator to wtp source editing lost the original milestones.