Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » ServerTools (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 NadavFriend
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 DahyabhaiFriend
Messages: 4435
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 Web Tools Platform
Previous Topic:Open file outside project-Eclipse File System (EFS)
Next Topic:Reconverting an existing web project to a Dynamic
Goto Forum:
  


Current Time: Fri Apr 26 23:55:02 GMT 2024

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

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

Back to the top