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 170779 - RFE: adjust indent for case line after blank
Summary: RFE: adjust indent for case line after blank
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-24 06:40 UTC by Masaki Katakai
Modified: 2012-12-06 09:17 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 Masaki Katakai 2009-08-24 06:40:42 UTC
Product Version: NetBeans IDE Dev (Build 200908221401)
Java: 1.5.0_19; Java HotSpot(TM) Client VM 1.5.0_19-137
System: Mac OS X version 10.5.8 running on i386; UTF8; ja_JP (nb)

I got this report from community people in Japan. 

1. Add the following codes into PHP editor.
"|" is cursor position.

switch($value){
    case 1:|
}

2. try to add "case 2:" in next line, so hit return

switch($value){
    case 1:
        |
}

It should be OK.

3. add "case 2:"

switch($value){
    case 1:
        case 2:|
}

At this point, after entering ":", it's better to change the indent of "case 2" and
change to the following codes. The reporter is saying Eclipse will adjust the indent in this case.

switch($value){
    case 1:
    case 2:|
}
Comment 1 Tomasz Slota 2010-02-04 10:11:56 UTC
ppisl is the new owner of formatting/indentation area
Comment 2 Ondrej Brejla 2012-11-29 14:08:59 UTC
This is defect in indentation. It should work.
Comment 3 Ondrej Brejla 2012-11-29 14:38:58 UTC
Fixed in web-main #85b29a53b4e6
Comment 4 Quality Engineering 2012-11-30 02:42:47 UTC
Integrated into 'main-golden', will be available in build *201211300001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/85b29a53b4e6
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #170779 - RFE: adjust indent for case line after blank
Comment 5 Martin Kanak 2012-12-06 09:17:44 UTC
verified

Product Version: NetBeans IDE Dev (Build 201212060001)
Java: 1.7.0_10-ea; Java HotSpot(TM) 64-Bit Server VM 23.6-b04
Runtime: Java(TM) SE Runtime Environment 1.7.0_10-ea-b17
System: Linux version 3.2.0-33-generic running on amd64; UTF-8; en_US (nb)