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 198819 - Code-format should line up braces
Summary: Code-format should line up braces
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.0
Hardware: PC All
: P3 normal with 1 vote (vote)
Assignee: Petr Hejl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-23 14:54 UTC by _ gtzabari
Modified: 2012-09-09 02:02 UTC (History)
0 users

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 _ gtzabari 2011-05-23 14:54:02 UTC
Similar to issue 155491 the Javascript code-format feature is breaking alignment of braces. For example:


        $("#deviceTree").jstree({"plugins" : ["themes", "html_data", "ui", "crrm", "hotkeys"],
          "themes":
          {
            "theme": "default"
          }
        });

becomes:

        $("#deviceTree").jstree({"plugins" : ["themes", "html_data", "ui", "crrm", "hotkeys"],
          "themes":
            {
            "theme": "default"
          }
        });


Expected behavior: the opening and closing braces after "themes" should line up vertically.
Comment 1 Petr Pisl 2011-10-04 13:14:54 UTC
Reproducible
Comment 2 _ gtzabari 2012-03-18 02:30:27 UTC
This also affects JSON code-format.
Comment 3 Petr Hejl 2012-09-06 13:52:16 UTC
This happens because :\n means the next line is considered a continuation. Should be fixed or there should be an option for that.
Comment 4 _ gtzabari 2012-09-06 14:01:42 UTC
Even if it's a continuation (which I think doesn't look very nice alignment-wise), the closing brace still doesn't line up (and it should).
Comment 5 Petr Hejl 2012-09-06 15:03:13 UTC
(In reply to comment #4)
> Even if it's a continuation (which I think doesn't look very nice
> alignment-wise), the closing brace still doesn't line up (and it should).

I hasn't been arguing about that. As I wrote - should be fixed.
Comment 6 Petr Hejl 2012-09-07 14:37:10 UTC
Fixed in web-main 394aca1cf468.
Comment 7 Quality Engineering 2012-09-09 02:02:58 UTC
Integrated into 'main-golden', will be available in build *201209090001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/394aca1cf468
User: Petr Hejl <phejl@netbeans.org>
Log: #198819 - Code-format should line up braces