Summary: | Formatter misplaces semicolon | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Stefan Matthias Aust <sma> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | ||
Version: | 3.0 | ||
Target Milestone: | 3.0 M5 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Stefan Matthias Aust
2003-10-16 10:12:01 EDT
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. |