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 267617 - Add examples for 'Multiline Alignment'
Summary: Add examples for 'Multiline Alignment'
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Formatting & Indentation (show other bugs)
Version: 8.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
Depends on: 267699
Blocks:
  Show dependency tree
 
Reported: 2016-08-17 12:15 UTC by SebastianZ
Modified: 2016-09-26 11:12 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 SebastianZ 2016-08-17 12:15:37 UTC
The options 'Method Parameters', 'Method Call Arguments' and 'Implements List' at Tools > Options > Editor > Formatting > PHP > Alignment > Multiline Alignment are missing examples in the 'Preview:' field.
So it's not possible to see the effect of those options immediately.

Sebastian
Comment 1 Tomas Mysik 2016-08-24 07:42:56 UTC
So, I tried to investigate these options in the source code and unfortunately, the examples cannot be easily added since all of these options depend on wrapping options (e.g. "Implements List" option works only if wrapping after "implements" keyword is set etc.).

Thanks for reporting.
Comment 2 SebastianZ 2016-08-25 11:04:43 UTC
Ah, I see. I didn't realize that dependency before. Knowing that, there is also a dependency between wrapping and 'Group Multiline Alignment'.
Though the behavior of e.g. array initializer wrapping is different (incorrect) to the one of the implements list, therefore there's currently no influence on the examples, see bug 267695.

That formatting dependency is there with or without examples. So, if you fear that people may wonder why toggling the alignment options have no effect, that issue is still there when they format their sources.

Therefore I've now created bug 267699, which asks for a hint to let people know about that dependency. Once there is that note, I think it's ok to add the examples.

Sebastian
Comment 3 Tomas Mysik 2016-08-25 12:25:10 UTC
(In reply to SebastianZ from comment #2)
> I think it's ok to add the examples.

Feel free to provide them (e.g. attach an improved source code that is currently in NetBeans), will be more than happy to use it :)

Thanks.
Comment 4 Tomas Mysik 2016-08-26 06:29:16 UTC
Should be fixed now. Thanks.

http://hg.netbeans.org/web-main/rev/486aba926876
Comment 5 Quality Engineering 2016-08-27 02:18:32 UTC
Integrated into 'main-silver', will be available in build *201608270002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/486aba926876
User: Tomas Mysik <tmysik@netbeans.org>
Log: #267617 - Add examples for 'Multiline Alignment'
Comment 6 SebastianZ 2016-09-26 11:12:47 UTC
Sorry for catching up that late! The examples look very good!

Thanks a lot for adding them and the related note!

Sebastian