Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » JSDT question - how can I recognize an optional function parameter ?
JSDT question - how can I recognize an optional function parameter ? [message #876316] Thu, 24 May 2012 11:07 Go to next message
Hoze Nadav is currently offline Hoze Nadav
Messages: 9
Registered: July 2009
Junior Member
I'm developing a plugin in eclipse with an editor that integrates with JS and I'm using the JSDT Core API to do so.
I need to add a new feature which depends on whether the last param of a function is optional.
The JSDoc is updated correctly - example:
/**
* @param {String} userName The user name to use when logging in.
* @param {String} [accessLevel] The user accessLevel is optional.
*/

function logIn(userName, accessLevel) {

// ...
}

but how do I access this information from jsdt ?

Appreciate your help.


Thanks,

Nadav
Re: JSDT question - how can I recognize an optional function parameter ? [message #876498 is a reply to message #876316] Thu, 24 May 2012 18:19 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2269
Registered: July 2009
Senior Member
JSDT doesn't currently take notice of or record that information for its own future use, but the doc as a whole should be attached to the method declaration.

---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Open file outside project-Eclipse File System (EFS)
Next Topic:Reconverting an existing web project to a Dynamic
Goto Forum:
  


Current Time: Thu Sep 18 07:43:45 GMT 2014

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

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