Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Extending JSDT
Extending JSDT [message #527784] Fri, 16 April 2010 09:14 Go to next message
Igor is currently offline Igor
Messages: 2
Registered: April 2010
Junior Member
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]

Report message to a 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
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2234
Registered: July 2009
Senior Member
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


---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: Extending JSDT [message #533095 is a reply to message #529970] Wed, 12 May 2010 04:42 Go to previous message
Igor is currently offline Igor
Messages: 2
Registered: April 2010
Junior Member
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: Thu Jul 24 19:16:50 EDT 2014

Powered by FUDForum. Page generated in 0.13189 seconds