This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
I've found an issue with autocomplete in the javascript editor while developing ExtJS-style classes Exemple 1 - ExtJS style: ------------------------ Ext.define('My.test.Controller',{ extend: 'Ext.app.Controller', /** * This method returns an array * @param {Object} something * @returns {Array} */ giveAnArray: function(something) { return [something]; }, doSomething: function() { var self = this; | <-- caret here } }); *** If you type "this.", autocomplete will work as expected, suggesting the three members of the current object (giveAnArray, extend and doSomething). If you type "self.", autocomplete will give seemingly random suggestions, but none belonging to the current scope. Exemple 2 - Plain javascript: ----------------------------- var Static = { thing: 'Test String', /** * This method returns an array * @param {Object} something * @returns {Array} */ giveAnArray: function(something) { return [something]; }, doSomething: function() { var self = this; | <-- caret here } }; If you type "this", autocomplete will work as expected, suggesting the three members of the current object (giveAnArray, extend and doSomething). If you type "self", autocomplete will work as expected, suggesting the three members of the current object, plus seemingly random suggestions. It would seem that the editor is capable of understanding the "self = this" association in the second example, whereas it's unable of resolving it in the first example. This leads to another problem, which is that Cmd+clicking on a method call (ex: self.giveAnArray()) won't take me to the method definition. As an added request, it would be really cool if it we could get the method documentation in a popup box while Cmd+hovering a property or method call, just like in the PHP editor.
Reproducible, thank you for reporting. Could you please file the "method documentation" as a separate enhancement to javascript/editor? Thank you Product Version: NetBeans IDE Dev (Build 201501050001) Java: 1.7.0_71; Java HotSpot(TM) Client VM 24.71-b01 Runtime: Java(TM) SE Runtime Environment 1.7.0_71-b14 System: Linux version 3.13.0-35-generic running on i386; UTF-8; en_US (nb)
No problem! Here it is: https://netbeans.org/bugzilla/show_bug.cgi?id=249664