Bug 350928 - [content assist] jsdoc-toolkit array notation is not supported
Summary: [content assist] jsdoc-toolkit array notation is not supported
Status: NEW
Alias: None
Product: JSDT
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: Future   Edit
Assignee: Project Inbox CLA
QA Contact: Chris Jaun CLA
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-07-01 08:24 EDT by Dominic Chambers CLA
Modified: 2015-06-17 03:55 EDT (History)
1 user (show)

See Also:


Attachments
Test case for this bug report (224 bytes, text/plain)
2011-07-01 08:25 EDT, Dominic Chambers CLA
no flags Details
Tern JSDoc Array (31.91 KB, image/png)
2015-06-17 03:55 EDT, Angelo ZERR CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Chambers CLA 2011-07-01 08:24:53 EDT
Build Identifier: 20110505-1223

The content assist in Eclipse works really well until you hit a method that
returns arrays, at which point there is no way to inform Eclipse which type of
object the array consists of. jsdoc-toolkit uses an array notation to deal with this problem, but Eclipse doesn't recognize this notation.

Reproducible: Always

Steps to Reproduce:
1. Open the attached test case in Eclipse.
2. Try to get Content Assist for oClass.getXs()[0]
3. You will notice that this does not consider oClass.getXs()[0] to be a number, whereas oClass.getXs() is incorrectly considered to be a number.
Comment 1 Dominic Chambers CLA 2011-07-01 08:25:47 EDT
Created attachment 198960 [details]
Test case for this bug report
Comment 2 Angelo ZERR CLA 2015-06-17 03:55:30 EDT
Created attachment 254499 [details]
Tern JSDoc Array

For your information, tern.java provides a support for JSDoc https://github.com/angelozerr/tern.java/wiki/Tern-&-JSDoc-support.

It can manage this feature : 

------------------------------------
 /**
  * @return {Array.<String>}
  */
function f() {
  return null;
}

f()[0]. // here Ctrl+Space shows methods of String like charAt
------------------------------------

You can see result in the attached screenshot.

Note that tern.java will support soon validation with JSDoc https://github.com/angelozerr/tern-lint/wiki/Validation-JSDoc