Community
Participate
Working Groups
If a switch case contains a nested switch case, using the code formatter makes subsequent cases indent too far. Try the following test case with the code formatter: switch ("1") { case "1a": switch ("2") { case "2a": break; case "2b": break; } break; case "1b": break; case "1c": switch ("3") { case "3a": break; case "3b": break; } break; case "1d": break; } Note case 1b and 1c are indented as if they were part of switch 2. Then because 1c contains another nested switch, 1d is indented as if it were part of switch 3. What I would expect to see is: switch ("1") { case "1a": switch ("2") { case "2a": break; case "2b": break; } break; case "1b": break; case "1c": switch ("3") { case "3a": break; case "3b": break; } break; case "1d": break; }
Reproducible in PDT 2.0.0 as well Tested on Wix XP Eclipse SDK Version: 3.4.1 Build id: M20080911-1700 debugger - org.zend.php.debug_feature-I20081127 pdt - N20081130 dltk-core-sdk-I-I200811251145-200811251145-incubation [Kalin Yanev kalin.a@zend.com]
Created attachment 129422 [details] contributed by zhongwei zhao
fixed in HEAD. contributed by zhongwei zhao
re-tested in PDT M7. Verified fixed. kalin yanev - kalin.a@zend.com