Community
Participate
Working Groups
Please check product and component... Trying to format the follwing Java code via Control+A and Control+Shift+F reports an error: "Format" did not complete normally. Please see the log for mor information. An exception stack trace is not available. -------- example start ------ public class Main { public static void main(String[] args) { } /** * <pre> * public String toString() * { * return ""; * } * */ } ------------ example end ------- It's caused by the missing pre end tag in the java doc comment. Attention: The behaviour is different if Source->Format is triggered via mouse/Menu. In the preferences I have checked "Format Java code snippets" under Java->Code Style->Formatter, tab Comments.
Works for me using R3.2 and I20060809-0010, see also: http://www.eclipse.org/eclipse/platform-text/development/bug-incomplete.htm
Sorry, I should have tried it with a untainted Eclipse installation. Next time I will do that... The error depends on the preference setting: "Clear blank lines in comments" being checked which is not the default in the plain vanilla Eclipse. Start with the preference page Java->Code Style->Formatter Create a new profile from "Eclipse [built-in]" and select "New..." Enter a new profile name, e.g. test On the Comments tab select "Clear blank lines in comments" Press OK Press OK to close preference window Select the Java code via Control+A Format the code with Control+Shift+F *several times* (in case the first time succeeds)
Can reproduce using I20060807-2000. The edits are generated by JDT Core.
*** This bug has been marked as a duplicate of 111270 ***
Verified using 3.4.0 (I20080617-2000).