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 177251 - Use 'indent size' instead of 'continuation indent size' for formatting multiline arrays and func headers
Summary: Use 'indent size' instead of 'continuation indent size' for formatting multil...
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: PC Linux
: P2 normal (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-19 16:48 UTC by Filip Zamboj
Modified: 2010-02-15 03:24 UTC (History)
1 user (show)

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 Filip Zamboj 2009-11-19 16:48:51 UTC
Product Version: NetBeans IDE Dev (Build 091119-840bbe3ddcb3)
Java: 1.5.0_17-ea; Java HotSpot(TM) 64-Bit Server VM 1.5.0_17-ea-b01

code: 
class G_Check {
    private static $sizeUnits = array(
        "item" => array(
            "item" => array(
                
            )
        )
    );
}

after formatting: 
class G_Check {
    private static $sizeUnits = array(
            "item" => array(
                            "item" => array(
                            
                            )
            )
    );
}


I think the first one is much better :). However, see issue 177250 before.
Comment 1 Tomasz Slota 2009-11-20 09:34:20 UTC
this behavior is related to the change of the default continuation indent size (to be twice the indent size).

the question is whether the indentation within arrays should be driven by cont indent size as currently implemented (disadvantage: it looks weird with the new defaults as pointed out by Filip, advantage: it is consistent with the formatting of function calls and declarations), or should it be equal to the indent size - then maybe it also need to be changed for functions
Comment 2 Tomasz Slota 2009-11-24 07:27:32 UTC
closed by mistake, reopening
Comment 3 Tomasz Slota 2010-02-04 10:12:02 UTC
ppisl is the new owner of formatting/indentation area
Comment 4 Petr Pisl 2010-02-15 03:24:05 UTC
This is fixed by adding options to the formatting engine now.