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.
Summary: | Indentation engine: indent braces too | ||
---|---|---|---|
Product: | java | Reporter: | shalomcrown <shalomcrown> |
Component: | Editor | Assignee: | Dusan Balek <dbalek> |
Status: | NEW --- | ||
Severity: | blocker | CC: | kjmcdonald |
Priority: | P3 | ||
Version: | 5.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | ENHANCEMENT | Exception Reporter: |
Description
shalomcrown
2005-10-02 10:30:55 UTC
Can you provide some example, please? The style of indenting that Netbeans supports: for (int j = 0; j < 10; j++) { // Statements indented to here Braces in line with outer block r = 10; } The coding style in use in many companies: for (int j = 0; j < 10; j++) { // Statements indented to here Braces in line with INNER code r = 10; } For some reason Java style guides specify the first type - and that is all the Java indentation engine supports. However the second type makes it easier to find the braces that enclose the statements - and is a style mandated by many organizations. I'd like to request an option for: for (int j = 0; j < 10; j++) { // Statements indented to here Braces in line with INNER code r = 10; } This could be expressed either as: 1. indent braces, and then indent code inside braces again (indent=2), or 2. indent braces by only half an indent (indent=4). Both way of formatting will be supported in upcoming 6.0 version |