Bug 454865 - Add option "Never join already wrapped lines" to code formatter
Summary: Add option "Never join already wrapped lines" to code formatter
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: PDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Linux
: P3 normal with 3 votes (vote)
Target Milestone: ---   Edit
Assignee: PHP Core CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 529215 (view as bug list)
Depends on:
Blocks: 462711
  Show dependency tree
 
Reported: 2014-12-11 06:59 EST by Vicente Bissoli CLA
Modified: 2020-05-14 10:17 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vicente Bissoli CLA 2014-12-11 06:59:46 EST
Would be nice have an option like "Never join already wrapped lines" in PDT formatter like there's in JDT, 'cause sometimes I want keep short arrays inline like

$a = ['a' => 1, 'b' => 2, 'c' => 3];

and sometimes long arrays like

$a = [
    'a' => 1,
    'b' => 2,
    'c' => 3,
    ...
];
Comment 1 Nobody - feel free to take it CLA 2015-10-09 15:22:20 EDT
I would certainly love to see this for the case you used as example. Issue #462711 discusses the case of concat strings. Note that as discussed there, this is possible (in a sense) using @formatter:off/on.

I opened ticket #479461 about confusion in the profile dialog.
Comment 2 Dawid Pakula CLA 2020-01-12 11:44:21 EST
*** Bug 529215 has been marked as a duplicate of this bug. ***