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 221512

Summary: Insert comma on JavaScript object property when typing "enter"
Product: javascript Reporter: dalelarsen
Component: EditorAssignee: Petr Pisl <ppisl>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 7.2   
Hardware: PC   
OS: Windows 7   
Issue Type: ENHANCEMENT Exception Reporter:
Attachments: IDE log

Description dalelarsen 2012-11-05 18:37:46 UTC
Product Version = NetBeans IDE 7.2 (Build 201207171143)
Operating System = Windows 7 version 6.1 running on x86
Java; VM; Vendor = 1.6.0_26
Runtime = Java HotSpot(TM) Client VM 20.1-b02

This would be a wonderful feature for the JavaScript editor.

Take the following scenario:

We have a JS object like so:

var myObject = {
   prop1: 1,
   prop2: 2
}

If the cursor is at the end of a property without a comma (like after the 2 on prop2) and you press "enter" have it insert the comma. This will be useful when writing objects, just hit enter after each property and its value and it will add the comma.

Thanks!
Comment 1 dalelarsen 2012-11-05 18:37:49 UTC
Created attachment 127179 [details]
IDE log
Comment 2 Petr Pisl 2012-11-07 14:59:14 UTC
No time to implement in NB 7.3