Community
Participate
Working Groups
The implementation of FormattingConfigBasedStream needs to be seriously cleand up since everybody who is not satisfied with the formatters builtin capabilities needs to customize this behavior. Furthermore, the API for formatting rules should be extended so that custom formatting rules can be implemented. A formatting rule is basically an object that can be registered for a certain position in the grammar. During formatting, when this position in the grammar is being hit, this object is passed to the FormattingConfigBasedStream so that formatting can "act" according to this rule. This mechanism is already implemented, however, not to be extensible.
Are there any plans to fix this for v2.0? I am trying to get the formatter to indent wrapped lines, but it's not simple to do with the current FormattingConfigBasedStream. I have to get to FormattingConfigBasedStream.Line.flushLine() and there is no easy way to do it. I tried extending/overriding, but I end up overriding most of FormattingConfigBasedStream -- which ends up looking more like a copy of FormattingConfigBasedStream with some minor changes. I've also had some challenges with enabling user level custom formatting. See my post in the forum: http://www.eclipse.org/forums/index.php?t=msg&th=207769&start=0&S=baf1586abcd94cd412e7a4007b11a3d8
I have opened BUG 345281 for supporting indentation of wrapped lines. I know this bug is a placeholder for custom formatting support, but this is targeting a major overhaul. I'm hoping to get small (incremental) fixes to support custom formatting and really hoping to get some fixes in v2.0.
won't fix because it affects the old formatter infrastructure