Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (WTP) » Custom Coloring of special XML files
Custom Coloring of special XML files [message #178064] Mon, 28 August 2006 19:01 Go to next message
Eclipse UserFriend
Originally posted by: hcurtis.xaware.com

I would like to add custom coloring of some of our XML files. My plan is to
extend the JobSafeStructuredDocument in my own Document factory for my
context type. The Document factory could then add the coloring provider to
the JobSafeStructuredDocument object (or I hope that is true).

My problem is I can't find out where and how the coloring gets applied in
the JobSafeStructuredDocument. Can someone explain where to look for this
information?


--
Bud Curtis
XAware, Inc.
719-884-5443
Re: Custom Coloring of special XML files [message #178107 is a reply to message #178064] Tue, 29 August 2006 05:52 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4425
Registered: July 2009
Senior Member

Bud Curtis wrote:
> I would like to add custom coloring of some of our XML files. My plan is to
> extend the JobSafeStructuredDocument in my own Document factory for my
> context type. The Document factory could then add the coloring provider to
> the JobSafeStructuredDocument object (or I hope that is true).
>
> My problem is I can't find out where and how the coloring gets applied in
> the JobSafeStructuredDocument. Can someone explain where to look for this
> information?

The coloring isn't done at the model level, it's hooked in using the
StructuredTextViewerConfiguration's LineStyleProviders. You can
find out how to specify your own StructuredTextViewerConfiguration
using the editor configuration extension point at
http://www.eclipse.org/webtools/wst/components/sse/designs/E ditorConfiguration.html
(see also the reference doc i the SDK for
org.eclipse.wst.sse.ui.editorConfiguration). Ideally you only need
to register your XML files as your own content type and use the
extension point to point the existing editor at your own text viewer
configuration.

--
- Nitin


_
Nitin Dahyabhai
Eclipse Web Tools Platform
Re: Custom Coloring of special XML files [message #178153 is a reply to message #178107] Tue, 29 August 2006 15:17 Go to previous message
Eclipse UserFriend
Originally posted by: hcurtis.xaware.com

Thank you very much for the suggestion. I had found the LineStyleProvider
but hadn't figured out how to replace it in the
StructuredTextViewerConfiguration.

"Nitin Dahyabhai" <nitind@us.ibm.com> wrote in message
news:ed0kng$20h$1@utils.eclipse.org...
> Bud Curtis wrote:
>> I would like to add custom coloring of some of our XML files. My plan is
>> to extend the JobSafeStructuredDocument in my own Document factory for my
>> context type. The Document factory could then add the coloring provider
>> to the JobSafeStructuredDocument object (or I hope that is true).
>>
>> My problem is I can't find out where and how the coloring gets applied in
>> the JobSafeStructuredDocument. Can someone explain where to look for this
>> information?
>
> The coloring isn't done at the model level, it's hooked in using the
> StructuredTextViewerConfiguration's LineStyleProviders. You can find out
> how to specify your own StructuredTextViewerConfiguration using the editor
> configuration extension point at
> http://www.eclipse.org/webtools/wst/components/sse/designs/E ditorConfiguration.html
> (see also the reference doc i the SDK for
> org.eclipse.wst.sse.ui.editorConfiguration). Ideally you only need to
> register your XML files as your own content type and use the extension
> point to point the existing editor at your own text viewer configuration.
>
> --
> - Nitin
Previous Topic:Eclipse PHP IDE and HTML code assist
Next Topic:web tools, 3.3M1 and Callisto updates
Goto Forum:
  


Current Time: Tue Mar 19 09:14:35 GMT 2024

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

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

Back to the top