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.

Bug 216131

Summary: jQuery code completion for getters only
Product: javascript Reporter: Vladimir Riha <vriha>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: STARTED ---    
Severity: normal CC: terje7601
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:

Description Vladimir Riha 2012-07-30 13:01:58 UTC
Right now, code completion offers only getters, e.g.:

$(this).attr(name)

But there should be also setter

$(this).attr(name, value)


Also the help for the function contains only getter part.

I don't know how to separate getter & setter in completion list (except showing 2 items or to display only setter instead of getter) but the setter should be at least mentioned in help window.


Product Version: NetBeans IDE Dev (Build 201207300002)
Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b09
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Petr Pisl 2013-08-27 14:13:17 UTC
There is more problems then just one. 

1) the model can have only one method with the same name. The getters and setters are basicaly one method with two parameters, but when is used only one, then it's getter (jQuery approach)

2) Although the jQuery model build function for every version of a method mentioned in the api document (in the case of attr it is four times), due to point one the cc displays only one. 

3) Currently the documentation for different version can not be find, because there is no way how to find out for which version of jQuery  the function was generated in the model.

I have tried to implement some solution, but it requires many changes and in general js cc and also in jqeury plugin. It will be better to solve this in complex way.