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 does not follow the previous line | ||
---|---|---|---|
Product: | php | Reporter: | Tomas Mysik <tmysik> |
Component: | Formatting & Indentation | Assignee: | Petr Pisl <ppisl> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | fzamboj |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | |||
Bug Blocks: | 174873 |
Description
Tomas Mysik
2009-10-07 09:22:37 UTC
More serious example: function test() { do { echo "test"; } while ($condition); // press ENTER here | // you will get here } moreover, if you incoke formatting on the code above you will get this: <? function test() { do { echo "test"; } while ($condition);| //press enter here | //you end up here } ?> the formatting issue was reported in 173906 Integrated into 'main-golden', will be available in build *200910160201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0db90a9db262 User: Filip Zamboj <fzamboj@netbeans.org> Log: #173937 unit test created but commented out as the issue is still open One more example: $arr = array(new ArrayIterator(array()), new ArrayObject(array()));| // <- ENTER here => no indentation Tomasi can you provide full context for the last example? I tried <?php function functionName($param) { $arr = array(new ArrayIterator(array()), new ArrayObject(array()));| } ?> and some cases and didn't see any problem <?php $arr = array(new ArrayIterator(array()), new ArrayObject(array())); ?> Product Version: NetBeans IDE Dev (Build 091016) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01 System: Linux version 2.6.28-15-generic running on amd64; UTF-8; cs_CZ (nb) <?php $arr = array(new ArrayIterator(array()), new ArrayObject(array())); ?> Product Version: NetBeans IDE Dev (Build 091016) Java: 1.6.0_16; Java HotSpot(TM) 64-Bit Server VM 14.2-b01 System: Linux version 2.6.28-15-generic running on amd64; UTF-8; cs_CZ (nb) I have separated the issue with while into issue #175118. The issue with $arr = array(new ArrayIterator(array()), new ArrayObject(array())); as was mentioned by tmysik, now works after my fixes in indentation. I will create test for it. There is still the original problem with an expression over more lines. > There is still the original problem with an expression over more lines.
Personally, I would prefer behaviour like in Java - I mean indent by 8 spaces (2 tabs), not 4 (1), for expressions over
more lines.
Thanks a lot.
Another example: <?php // 2b) load configuration from config.ini file Environment::loadConfig(); // <-- press <enter> here ?> After committing change ae0db6ba4faa this can be marked as fixed. All mentioned are working now. verified 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 |