Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [wtp-dev] JSDT

Hi John,

I know you are asking about JSDT but I would like to take this opportunity to discuss an alternative project VJET which builds on the JSDT project and provides rich assist for nodejs modules.

#1... 

The VJET JS Toolkit has done some work with nodejs modules not AMD but the pattern is similar to provide code assistance and validation. For more info about VJET JS Toolkit see https://www.ebayopensource.org/index.php/VJET/HomePage and for more info about VJET moving to webtools please see the project proposal - http://www.eclipse.org/proposals/webtools.vjet/. To see what was done for nodejs modules you can see this page for some examples - https://www.ebayopensource.org/index.php/VJET/NodeJS

#2...

VJET avoids execution during authoring of JS code. You can execute the code and then generate a type library which has all the information needed for code assist and validation. Only static analysis is done using a recovery based AST parser. The structure of the JS code is only available when the code has no syntax errors. Also another reason that running the code is not viable is that there may be runtime errors due to dependency order issue. I know that AMD does solve some of these dependency order issues so it is possible but this will just help with name assist. In order to get the type info you need the jsdoc or type hints such as function arguments which construct a type or define a type. Running the authored js also causes high CPU which ends up running the fan on some notebook computers.

Justin

On Aug 11, 2012, at 10:49 PM, John Peberdy <john@xxxxxxxxxx> wrote:

Hi,

I'm evaluating implementing functionality for JSDT and looking for feedback.

What I need to do is support content assist for AMD style code and
code that is otherwise not straight forward to analyze (for example
calling a function to create a new subclass).

1. Has any work been done to add support for AMD style modules (or
other module systems)?

2. Instead of inferring the structure of the objects and functions
that a file defines manually, what are your thoughts on executing the
_javascript_ of the file and examining the result? This will give the
exact structure of what the file defines (with some caveats, eg no
DOM, side effects would have to be limited). Then we'd have to
correlate JSDoc nodes to nodes in the evaluation result.

Thanks for any feedback.

Regards
John
_______________________________________________
wtp-dev mailing list
wtp-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/wtp-dev


Back to the top