| Author |
Message |
|
|
Post subject: JSDoc - where to find how to use?
Posted: Dec 29, 2008 - 08:51 PM
|
|
Registered Member

Joined: Nov 12, 2008
Posts: 63
|
|
In looking at the JavaScript perspective in 7.0 there is a JSDoc view on the bottom of the screen. But there does not seem to be anything in the help system or here on the forum about how to utilize that view.
Where do I find more info on the JSDoc view and how to utilize it?
thanks,
Ed |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: JSDoc - where to find how to use?
Posted: Dec 31, 2008 - 04:52 AM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
|
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: JSDoc - where to find how to use?
Posted: Dec 31, 2008 - 04:49 PM
|
|
Registered Member

Joined: Nov 12, 2008
Posts: 63
|
|
Hey Riyad,
Thanks for the reply, but there are still some questions.
I already had the comments in the code as your example shows, but if I have to use something like the toolkit to generate the jsdocs, where do I put the generated docs to have them displayed in the Jsdoc view in MyEclipse?
Is MyEclipse supposed to hotlink to the Jsdoc comment in the code like it does with documentation entered in Java. In Java, once I enter the comment, all I have to do is hover over a usage of that method and its javadoc comment is displayed in a popup window in the editor, does the Jsdoc work this way or only with a static generated document set?
Thanks for your help,
Ed |
|
|
| |
|
|
|
 |
|
|
Post subject: RE: JSDoc - where to find how to use?
Posted: Dec 31, 2008 - 05:08 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
| Quote: |
Is MyEclipse supposed to hotlink to the Jsdoc comment in the code like it does with documentation entered in Java. In Java, once I enter the comment, all I have to do is hover over a usage of that method and its javadoc comment is displayed in a popup window in the editor, does the Jsdoc work this way or only with a static generated document set?
|
Correct, it should work that way, no need to generate anything it will just load it on the fly like Javadoc. Are you not seeing this behavior? |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|
Post subject: RE: JSDoc - where to find how to use?
Posted: Dec 31, 2008 - 06:42 PM
|
|
Registered Member

Joined: Nov 12, 2008
Posts: 63
|
|
No I am not seeing the behavior in any js document, I thought that was how it should be working.
I copied the code from my actual application and tried different source configurations (comments tight to the left, no package declarations, etc. and have not been able to get anything to show as a popup or in the jsdoc view window.
Does the code have to be in a project of some type to work? I tried putting a test file into a Web Project and it also did not work? Does it have to be in a class? The code I have been using has static methods in a package, also tried them outside of the package declaration.
Here is a sample of the code I was trying:
/**
* Return the left number of characters specified in noChars from the string passed.
*
* @param strValue - String - text to have left segment extracted
* @param noChars - int - number of chars from the left to be extracted
*/
left = function(strValue, noChars)
{
try
{
if (noChars <= 0)
return "";
else if (noChars > strValue.length)
return strValue;
else
return strValue.substring(0, noChars);
}
catch (e)
{
e = jsx3.NativeError.wrap(e);
jsx3.log("util.left error: " + e.getMessage());
}
}
Thanks for any help,
Ed |
|
|
| |
|
|
|
 |
|
|
Post subject:
Posted: Jan 07, 2009 - 04:31 PM
|
|
Registered Member

Joined: Jan 06, 2004
Posts: 23824
|
|
Ah! Just had an idea...
Ed, when prompted to add advanced JavaScript support to the project, did you make sure ti say "Yes"? This will enable the advanced JavaScript tooling. Also under the project properties and MyEclipse > JavaScript > JavaScript Libraries and the "Source" tab, do you have a root level dir setup that contains all your JavaScript source so the parser knows what to parse?
(See screenshots) |
_________________ Riyad
MyEclipse Support
|
| |
|
|
|
 |
|
|