Community
Participate
Working Groups
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.
Created attachment 198960 [details] Test case for this bug report
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