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 - Methods of Object (like .freeze) are suggested in CC for all objects
Summary: Methods of Object (like .freeze) are suggested in CC for all objects
Status: STARTED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
: 234107 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-12-01 20:13 UTC by c69
Modified: 2015-06-23 13:09 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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. ***