Skip to main content



      Home
Home » Language IDEs » ServerTools (WTP) » Extending JSDT
Extending JSDT [message #527784] Fri, 16 April 2010 09:14 Go to next message
Eclipse UserFriend
I have a PDE/RCP project which needs to support a custom extension to JavaScript, essentially a language that is a superset of JS (*.SJS files). It is ultimately compiled to JS, but I would like to be able to provide source editing, syntax coloring, folding, content assist, debugging, etc. within the .SJS extended source.

I was thinking that extending the JSDT is the right way to go, but am having some problems getting started. Also, judging from the fact that JSDT seems to have a lot of stuff copied from JDT, it makes me wonder if I will be ultimately forced to do the same.

Could someone suggest what is the best approach here and give me some initial pointers?

[Updated on: Fri, 16 April 2010 09:35] by Moderator

Re: Extending JSDT [message #529970 is a reply to message #527784] Tue, 27 April 2010 16:12 Go to previous messageGo to next message
Eclipse UserFriend
On 4/16/2010 9:14 AM, Igor F. wrote:
> I have a project which needs to support a custom extension to
> JavaScript, essentially a language that is a superset of JS (*.SJS
> files). It is ultimately compiled to JS, but I would like to be able to
> provide source editing, syntax coloring, folding, content assist,
> debugging, etc. within the .SJS extended source.
>
> I was thinking that extending the JSDT is the right way to go, but am
> having some problems getting started. Also, judging from the fact that
> JSDT seems to have a lot of stuff copied from JDT, it makes me wonder if
> I will be ultimately forced to do the same.
>
> Could someone suggest what is the best approach here and give me some
> initial pointers?

The Scala and JSP plug-ins both have similar requirements, but as JDT
wasn't architected with that in mind, I can't really give any pointers
for JSDT without a more concrete information (aside from looking at how
those plug-ins work).

--
Nitin Dahyabhai
Eclipse WTP Source Editing and JSDT
IBM Rational
Re: Extending JSDT [message #533095 is a reply to message #529970] Wed, 12 May 2010 04:42 Go to previous message
Eclipse UserFriend
Hello Nitin,

thank you for you answer.
Here are some more details about what I am trying to do and the approach I have taken so far:

We are creating a platform which relies on our own extended version of JavaScript (referred to as SJS), created to make some aspects of developing with JS easier. We have added things like packages, enums, some explicit typing, but in the end we compile the source into plain JavaScript.

What we would like to do is create a full Edit-Compile-Debug cycle, where the developer would not have to see the generated JS files, and would work entirely within the SJS files. Since there is a huge overlap with JSDT here, the idea is to reuse most of it and extend/tweak it where necessary to retain most of the functionality.

Our compiler (SJS->JS) is written on top of ANTLR-based grammar.

At this point I have copied the JSDT 3.1 core, manipulation and ui code and am tweaking it to support our extension. This is not an easy undertaking, as you can imagine. The fact that the parser JSDT uses is a different one than what we have also does not help. I have started looking at tweaking the jikespg grammar.

I would appreciate any thoughts,
Igor
Previous Topic:spring 2.5.6 annotation based web controller
Next Topic:Occasional server start-up error
Goto Forum:
  


Current Time: Sun Jul 06 03:23:59 EDT 2025

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

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

Back to the top