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 253282 - Add Options for Wrapping and New Lines
Summary: Add Options for Wrapping and New Lines
Status: NEW
Alias: None
Product: javascript
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.1
Hardware: PC Linux
: P3 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-07-02 05:50 UTC by Zon
Modified: 2015-09-09 11:22 UTC (History)
0 users

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 Zon 2015-07-02 05:50:10 UTC
Formatting options differ from language to language. We find ourselves limited, especially in javascript, whereas required options are present for some other languages. It would be wonderful if the variety of options is fully shared between languages in Netbeans.

Major concerns:

1. Leaving blank lines. Inside functions its ok, but in scripts with only var declarations, function calls and function declarations they split together and indentation is also wrong. For example, I get:

var queryStartDelay = 1 * 1000;
getAllModules(modules, testRange);
  /**
   * Specific conditions.
   */
    function getRefbookGrids() {
    return [
      'refbook.|be'
    ];
    }

2. Folding into curly braces for constructions like "if (true) return true"; Expected to be:

if (true) {
  return true;
}
Comment 1 Zon 2015-07-02 08:45:39 UTC
3. Wrapping line after ( in function calls when parameters are complicated (long names, consist of other operations or calls, are more than 2), required example:

do(
  callThisLongNameFunction(
    passSomethingElse[
     "index" + "_" + "number"
    ]),
  additionPartA + AdditionPartB,
  null);