Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!

Bug 258603

Summary: Handling shorthand property names
Product: javascript Reporter: Petr Pisl <ppisl>
Component: EditorAssignee: Petr Pisl <ppisl>
Status: RESOLVED FIXED QA Contact: issues <issues.netbeans.org>
Priority: P3    
Version: 8.2   
Target Milestone: 8.2   
Hardware: PC   
OS: Linux   
Whiteboard: ecma6
Issue Type: TASK Exception Report:
Bug Depends on:    
Bug Blocks: 242387    
Attachments: Object Initializer - shorthand property names
Object Initializer - shorthand method names
Object Initializer - computed property names

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.
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo