[JBoss JIRA] (JBIDE-25551) Format Checker: dont enforce line feed
by Dmitrii Bocharov (JIRA)
[ https://issues.jboss.org/browse/JBIDE-25551?page=com.atlassian.jira.plugi... ]
Dmitrii Bocharov commented on JBIDE-25551:
------------------------------------------
[~adietish] on the call you proposed how to solve it. Could you, please, remind it? What's the name of the item in the formatter settings?
I'm just afraid that it's impossible to solve it only for builders
> Format Checker: dont enforce line feed
> ---------------------------------------
>
> Key: JBIDE-25551
> URL: https://issues.jboss.org/browse/JBIDE-25551
> Project: Tools (JBoss Tools)
> Issue Type: Bug
> Components: openshift
> Affects Versions: 4.5.2.AM3
> Reporter: Andre Dietisheim
> Assignee: Dmitrii Bocharov
>
> Current format checks enforce line feeds which leads to badly readable code when you're using fluent builders like in the following case (see here: https://github.com/jbosstools/jbosstools-openshift/pull/1645/files?diff=u...):
> {code:title=enforced line feeds}
> TableViewer resourcesViewer = new TableViewerBuilder(table, tableContainer)
> .column(resource -> ((IResource) resource).getName()).name("Name").align(SWT.LEFT).weight(1)
> .minWidth(100).buildColumn().column(resource -> ((IResource) resource).getKind()).name("Type")
> .align(SWT.LEFT).weight(1).minWidth(100).buildColumn()
> .column(new LabelsCellLabelProvider(labelFilter)).name("Labels").align(SWT.LEFT).weight(2)
> .minWidth(200).buildColumn().buildViewer();
> {code}
> {code:title=manual line feeds with superior readability}
> TableViewer resourcesViewer = new TableViewerBuilder(table, tableContainer)
> .column(resource -> ((IResource) resource).getName())
> .name("Name").align(SWT.LEFT).weight(1).minWidth(100).buildColumn()
> .column(resource -> ((IResource) resource).getKind())
> .name("Type").align(SWT.LEFT).weight(1).minWidth(100).buildColumn()
> .column(new LabelsCellLabelProvider(labelFilter))
> .name("Labels").align(SWT.LEFT).weight(2).minWidth(200).buildColumn()
> .buildViewer();
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
8 years, 2 months