Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JSDT Extension to parse java script comments.(Parse JavaScript comments and show additional items in a tree view.)
icon5.gif  JSDT Extension to parse java script comments. [message #1049679] Fri, 26 April 2013 02:35 Go to next message
Michael Genau is currently offline Michael Genau
Messages: 9
Registered: April 2013
Junior Member
Hello forum,

last week I started to develop a plugin for eclipse to parse a special kind of comments contained in some file types (including batch files, html and various scripts) at different logical levels (file, function, etc).

So far I can parse text files and html to show these comments as items in my extension of the project explorer.

Now, I like to extend jsdt to parse these comments, add them as properties to the related function and embedd the functionality of the "script explorer" to my own view.
I read www.eclipsecon.org/2008/sub/attachments/Extending_the_JavaScript_Development_Toolkit.pdf but the example doesn't work.

What do I have to do to extend jsdt?
I tried to extend the DefaultInferrenceProvider and the InferEngine but eclipse ignores my classes.
Is this extension definition correct?
<extension point="org.eclipse.wst.jsdt.core.inferrenceSupport">
<inferrenceSupport class="plugin.files.parser.javascript.MyInferProvider"/>
</extension>

This topic is really new for me.
Please help me to achieve this purpose.


Kind regards,
Michael
Re: JSDT Extension to parse java script comments. [message #1051991 is a reply to message #1049679] Mon, 29 April 2013 09:34 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2238
Registered: July 2009
Senior Member
Check your Eclipse Application launch configuration (Run->Run Configurations...) and make sure that the Configuration tab is set to clear the configuration space. Information from older versions of your plugin.xml may be cached.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Re: JSDT Extension to parse java script comments. [message #1064240 is a reply to message #1051991] Tue, 18 June 2013 07:23 Go to previous messageGo to next message
Michael Genau is currently offline Michael Genau
Messages: 9
Registered: April 2013
Junior Member
Hello,

I checked my launch configuration and now my InferEngine is used by the framework. Thank you!

But how can I access a comment like "// Example comment" and how can I add a new Element to the tree view of the "Script Explorer" which represents this comment?
I tried to override some visit methods of ASTVisitor but
public boolean visit(IJsDoc doc)
is never called.

I'm interessted in comments of functions and global comments at the beginning of the script.
Re: JSDT Extension to parse java script comments. [message #1064620 is a reply to message #1064240] Thu, 20 June 2013 05:16 Go to previous message
Dawid Pakula is currently offline Dawid Pakula
Messages: 33
Registered: March 2013
Member
Hi,

I'm also looking for solution, but:


  1. Currently you cannot extend AST/InferedTypes during inferrencing
  2. Add new elements into outliner is not possible also
  3. JSDoc is only avaiable in visit if is before function, field, variable declaration and this is not raw comment Sad
  4. Non JSDoc comments are never in AST
  5. But, you have table with coordinates of all comments in file


Previous Topic:format jsp files programmatically
Next Topic:WEB-INF/classes not getting deployed to Glassfish 3.1
Goto Forum:
  


Current Time: Fri Aug 01 20:23:23 EDT 2014

Powered by FUDForum. Page generated in 0.04351 seconds