Extending SSE [message #170688] |
Tue, 06 June 2006 03:35  |
Eclipse User |
|
|
|
Originally posted by: alban_news.laposte.net
Hello,
I'm trying to extend SSE in order to have an editor in a language which
the structure is similar to JSP.
My first step is to obtain the syntax highlighting for this language.
I have:
1. extended the SSE extention point TextViewerConfiguration.
2. a parser that parse in regions a structured document.
3. a partitioner and a lineStyleProvider.
What are the next tasks to do in order to color the code?
Is a DOM model essential to obtain the syntax highligting?
I've found very few technical papers about the extension of SSE. Is the
some articles or tutorial about it?
Thanks for any help!
Alban
|
|
|
|
|
|
Re: Extending SSE [message #171022 is a reply to message #170963] |
Fri, 09 June 2006 23:00   |
Eclipse User |
|
|
|
On Fri, 09 Jun 2006 12:25:49 -0400, Alban <alban_news@laposte.net> wrote:
>
> Ok, that was I thought. The DOM Model in mainely usefull to content
> assist and validation, right?
>
Yes, mainly. (technically, it could be useful in syntax highlighting, but
1. our "structuredDocumentRegions" (basically) is already pretty rich
information, and
2. DOM access/precessing tends to be slower, so is not appropriate for
lineStyleProviders,
per se ... would have to move some processing and highlight updating to
another thread.
>
> Where is the link between a ContentType and the
> LineStyleProvider/partition?
>
Not sure off top of my head, I'd have to dig around.
(some part of structuredTextViewerConfiguration and/or
search for "internal" extension points with "lineStyle" in
them).
> Is the implementation of a content type easy or is it heavy ? (I've
> looked at the content type described by the JSP plugin and it appears
> quite complex first...)
>
Can be very light, or very heavy. JSP is not a good one to start with
as an example. To just associate an extension to an existing one
is the easiest to do. To "peek" in the file gets progressively more
complex.
|
|
|
|
|
Re: Extending SSE [message #171711 is a reply to message #170688] |
Tue, 20 June 2006 10:27  |
Eclipse User |
|
|
|
Originally posted by: alban_news.laposte.net
Hi,
I'm now trying to get the content assist for my editor.
I have watched how the XML DOM Model is implemented and some questions
remains:
- Where should I start in order to create a DOM Model?
- What are the Adapters/AdapterFactory for?
- My idea is that the parser parse a document into regions, the adapters
are here to provide a structured region document -> DOM Model
conversion. Am i right?
- What are the different steps in order to provide content assist?
- How does the XML plugin provides a schema based content assist?
Thanks for any help.
Alban
|
|
|
Powered by
FUDForum. Page generated in 0.03701 seconds