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 223106

Summary: Methods of Object (like .freeze) are suggested in CC for all objects
Product: javascript Reporter: c69
Component: EditorAssignee: Petr Pisl <ppisl>
Status: STARTED ---    
Severity: normal CC: marfous, RodMagnuson
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

Description c69 2012-12-01 20:13:32 UTC
When you type: 

var a = {}
a.

CC will suggest you .create, .freeze, .seal, .keys and other methods, which are not, in fact, available in normal objects.
Comment 1 Martin Fousek 2012-12-03 12:54:17 UTC
.create, .freeze, .seal, .keys etc. should be probably offered just for the "Object" object and called statically. Actually all mentioned methods already are marked as static in the signature files, so I expect that there would be sufficient just ask the JsDocumentationHolder for the STATIC modifier. For now, reassigning to the editor, documentation should be complete AFAIK.
Comment 2 Petr Pisl 2012-12-03 16:22:54 UTC
The fix has to have two parts. First add the modifiers from the documentation and alter code completion.
Comment 3 c69 2014-02-16 19:24:39 UTC
Funny update: They are even offered for jQuery inline :)

1) paste the text and put cursor at |
$(document).find('a#foo.|')

2) you will see HTML/CSS classes .. and properties of Object!
Comment 4 Martin Fousek 2014-02-17 08:07:45 UTC
(In reply to Petr Pisl from comment #2)
> The fix has to have two parts. First add the modifiers from the
> documentation and alter code completion.

Petre FYI the first part should be complete. You are able to get modifiers as JsDocumentationHolder#getModifiers().
Comment 5 Roman Svitanic 2015-06-23 13:09:49 UTC
*** Bug 234107 has been marked as a duplicate of this bug. ***