Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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 06:35 Go to next message
Michael Genau is currently offline Michael GenauFriend
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 13:34 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 4434
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 Web Tools Platform
Re: JSDT Extension to parse java script comments. [message #1064240 is a reply to message #1051991] Tue, 18 June 2013 11:23 Go to previous messageGo to next message
Michael Genau is currently offline Michael GenauFriend
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 09:16 Go to previous message
Dawid Pakula is currently offline Dawid PakulaFriend
Messages: 291
Registered: March 2013
Senior 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:Debug issues in Indigo/Glassfish 3.1.1 environment
Goto Forum:
  


Current Time: Fri Apr 19 16:42:39 GMT 2024

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

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

Back to the top