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 258603 - Handling shorthand property names
Summary: Handling shorthand property names
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks: 242387
  Show dependency tree
 
Reported: 2016-03-31 13:39 UTC by Petr Pisl
Modified: 2016-04-05 15:09 UTC (History)
0 users

See Also:
Issue Type: TASK
Exception Reporter:


Attachments
Object Initializer - shorthand property names (92.78 KB, image/png)
2016-03-31 14:02 UTC, Petr Pisl
Details
Object Initializer - shorthand method names (84.96 KB, image/png)
2016-03-31 14:03 UTC, Petr Pisl
Details
Object Initializer - computed property names (62.98 KB, image/png)
2016-03-31 14:04 UTC, Petr Pisl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2016-03-31 13:39:19 UTC
Support new way of writing object initializers. Support shorthand property names, shorthand method names and computed property names.
Comment 1 Petr Pisl 2016-03-31 14:02:13 UTC
Created attachment 159070 [details]
Object Initializer - shorthand property names

The property of such literal object is a reference to the original object. So mark occurrences marks all occurrences of the property name and the original variable together. Also, when a new property or method is added to the object literal property or to the original variable, then the property is shared between the object literal property and variable -> mark occurrences works, code completion offers same properties for both objects etc.
Comment 2 Petr Pisl 2016-03-31 14:03:11 UTC
Created attachment 159071 [details]
Object Initializer - shorthand method names

NetBeans are able now handle short way of writing methods of an object literals.
Comment 3 Petr Pisl 2016-03-31 14:04:01 UTC
Created attachment 159072 [details]
Object Initializer - computed property names

NetBeans now handle computed properties names in the right way.
Comment 4 Petr Pisl 2016-03-31 14:06:07 UTC
Comment on attachment 159072 [details]
Object Initializer - computed property names

The computed properties names are not in the model, so are not displayed in navigator, code completion is not able to offer them.