Creating a JSP-like plugin? [message #107979] |
Mon, 20 October 2003 17:32  |
Eclipse User |
|
|
|
Hi all,
I need to create a plugin for editing and building a JSP-like language.
The syntax is pure XML with Java code in some of the attributes, sort
of like JSP + JSLT, minus the goofy <@ @> syntax.
I'm looking for advice on how to get started with this. I can see at
least a couple of options, and I'm not sure which would be the best
approach.
The first is to base my code on the "javafamily" example that comes with
3.0 M4. The example is basically a JSP editor/builder that uses a new
ITranslator interface to translate the JSP code into Java code that the
rest of the JDT can operate on. The advantage of this approach seem to
be that the building and debugging would be pretty easy to do: just
translate to Java and let the JDT do the rest. I'd probably still have
to write an editor that's aware of my syntax, but I'll have to do that
in any case. The disadvantage is that these new 3.0 APIs are still up
in the air, might change, and aren't documented very well yet. Then
again, the authors may appreciate some early feedback.
The other approach I thought of is to base my code on the simple XML
editor generated by the New Plugin wizard. I can parse the XML input
into a DOM and use that for on-the-fly validation / content assist /
whatever. I'm not sure about the building part using this method,
though. I could convert my XML DOM into a org.eclipse.jdt.dom
structure, but I'm not sure if there's a way for my builder to tell the
JDT to write that to a class file.
Comments on these approaches or suggestions for totally new ones would
be greatly appreciated. I'm a relative newbie to Eclipse development --
I've been using it for about a year but haven't written a plugin until
now -- so please be gentle.
Thanks!
Laura
|
|
|
Re: Creating a JSP-like plugin? [message #108144 is a reply to message #107979] |
Tue, 21 October 2003 06:22  |
Eclipse User |
|
|
|
Originally posted by: daniel.megert.gmx.net
Laura Werner wrote:
> Hi all,
>
> I need to create a plugin for editing and building a JSP-like
> language. The syntax is pure XML with Java code in some of the
> attributes, sort of like JSP + JSLT, minus the goofy <@ @> syntax.
>
> I'm looking for advice on how to get started with this. I can see at
> least a couple of options, and I'm not sure which would be the best
> approach.
Have a look at the org.eclipse.jdt.ui.examples.javafamily which is part
of the examples.
Dani
>
> The first is to base my code on the "javafamily" example that comes
> with 3.0 M4. The example is basically a JSP editor/builder that uses
> a new ITranslator interface to translate the JSP code into Java code
> that the rest of the JDT can operate on. The advantage of this
> approach seem to be that the building and debugging would be pretty
> easy to do: just translate to Java and let the JDT do the rest. I'd
> probably still have to write an editor that's aware of my syntax, but
> I'll have to do that in any case. The disadvantage is that these new
> 3.0 APIs are still up in the air, might change, and aren't documented
> very well yet. Then again, the authors may appreciate some early
> feedback.
>
> The other approach I thought of is to base my code on the simple XML
> editor generated by the New Plugin wizard. I can parse the XML input
> into a DOM and use that for on-the-fly validation / content assist /
> whatever. I'm not sure about the building part using this method,
> though. I could convert my XML DOM into a org.eclipse.jdt.dom
> structure, but I'm not sure if there's a way for my builder to tell
> the JDT to write that to a class file.
>
> Comments on these approaches or suggestions for totally new ones would
> be greatly appreciated. I'm a relative newbie to Eclipse development
> -- I've been using it for about a year but haven't written a plugin
> until now -- so please be gentle.
>
> Thanks!
>
> Laura
>
|
|
|
Powered by
FUDForum. Page generated in 0.03765 seconds