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 190094 - multiline alignment in js
Summary: multiline alignment in js
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 6.x
Hardware: All All
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-02 05:49 UTC by alex108
Modified: 2014-10-02 10:31 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alex108 2010-09-02 05:49:15 UTC
Product Version = NetBeans IDE 6.9.1 (Build 201007282301)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01

Dear developers! 
At the beginning please let me say to you a BIG THANKS for such outstanding IDE as NB!
May be my comments will help to do this IDE better.
Is it possible to add multiline alignment to Javascript code?
For example following code:
var oArr = new Array("one",
                                   "two",
                                   "trhee");
after autoformatting (Ctrl+F) looks like following:
var oArr = new Array("one",
"two",
"trhee");
Is it possible to align items "two" and "three" at the same column as item "one"?

Thanks a lot and best regards,
Alexey.
Comment 1 anuith 2014-10-01 08:54:17 UTC
Please make this possible. It will make our life easier.
Comment 2 Petr Pisl 2014-10-02 09:25:03 UTC
The formatting of this case is better now. The result is:

var oArr = new Array("one",
        "two",
        "trhee");

Do we need an option for the alignment like this:

var oArr = new Array("one",
                     "two",
                     "trhee");

or is better to write:

var oArr = new Array(
        "one",
        "two",
        "trhee");

?
Comment 3 anuith 2014-10-02 10:28:08 UTC
(In reply to Petr Pisl from comment #2)
> The formatting of this case is better now. The result is:
> 
> var oArr = new Array("one",
>         "two",
>         "trhee");
> 
> Do we need an option for the alignment like this:
> 
> var oArr = new Array("one",
>                      "two",
>                      "trhee");
> 
> or is better to write:
> 
> var oArr = new Array(
>         "one",
>         "two",
>         "trhee");
> 
> ?

The PHP alignment is looking best now, but the problem reported here is involving JavaScript language.
Comment 4 alex108 2014-10-02 10:31:54 UTC
Hello Petr!

Thanks a lot for your answer. It will be fine to have the option which makes following array multiline alignment (the first case of your question):

var oArr = new Array("one",
                     "two",
                     "trhee");

This is better at least at my point of view. May be this feature will be usefull for some other people.

Best Regards,
Alexey Makhov.