Eclipse formatting to support One-Liners

You can configure the Eclipse Formatter configuration:

public Long getId() { return this.id; } 

Is it possible to format small (single-line) definitions as single-line?

+6
java eclipse configuration formatter
source share
2 answers

No: error 205973 is written to request such a formatting option.
3 years later, it seems that this will not be realized.


Edit May 2001:

maleki mentions in response to an orbfish comment that at least you have control over areas of code that Eclipse may or may not format:

Java Development Guide> Links> Java Editor> Formatter Help Page

This is not a direct answer, but it can help:

formatter disabling-enabling tags

+7
source share

As far as I know (and after a quick look), the default formatting does not provide this level of detail for customization. If this is important for business, you can find the Eclipse plugin (possibly commercial) that can be configured using these advanced rules.

0
source share

All Articles