Community
Participate
Working Groups
You you format this with the new 3.0M4 formatter you might notice that the ";" after "0.5)" is misplaced by two tabs. If the code is more deeply nested - for example in an anonymous Action subclass, tree or more tabs are inserted. public class A { public void actionPerformed(ActionEvent e) { getParentTiledContainer() .dockPaneAt(Integer.parseInt(e.getActionCommand()), pane, RTabbedDocumentPane.this, 0.5) ; } }
I will investigate.
Nice find. It only happens if you have an implicit this in front of the first method invocation. So it would not happen if you write: this.getParentTiledContainer() instead of: getParentTiledContainer() I am investigating a fix.
Fixed and released in HEAD. Regression tests added. In fact the alignment strategy will be reviewed when we have more feedbacks. We are not quite happy with some formatting in case of multiple nested alignments. Even if this is revisited in the future, this should not change. Now we have: public class A { public void actionPerformed(ActionEvent e) { getParentTiledContainer() .dockPaneAt(Integer.parseInt(e.getActionCommand()), pane, RTabbedDocumentPane.this, 0.5); } } Of course it doesn't look good thanks to Bugzilla :-(.
Thanks for fixing this so fast! Regarding the indentation/alignment strategy: I dislike that the formatter tries to put as many argument as possible on that line. I'd prefer this simple strategy: If everything fits into a single line then put it into a single line otherwise put each argument into a separate line.
This will be customizable when the code formatter preference page is ready. By default, we chose the Sun conventions for long arguments.
Verified.