Summary: | Code formatter and comments | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Pascal Rapicault <rapicaul> |
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> |
Status: | VERIFIED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P3 | CC: | jean-louis.willems, rapicaul |
Version: | 2.0 | ||
Target Milestone: | 3.0 M4 | ||
Hardware: | PC | ||
OS: | Windows 2000 | ||
Whiteboard: |
Description
Pascal Rapicault
2002-03-26 16:48:16 EST
The comment needs to be added at the end of the line : System.out.println("meuh"); Will consider post 2.0 Reopening Clearing resolution The cause of the problem is that 'clearNonBlockIndents' is reset during the use of the comment token in the format method from CodeFormatter. A solution is to exclude comment tokens from the condition that protect the removing of all indentations made by statements not followed by a block except if the current token is ELSE, CATCH or if we are in a switch/case The proposal is to update the line 365 in the version from eclipse 2.0.1 from if (clearNonBlockIndents && (token != Scanner.TokenNameWHITESPACE)) { to if (clearNonBlockIndents && (token != Scanner.TokenNameWHITESPACE) && (token != TokenNameCOMMENT_BLOCK) && (token != TokenNameCOMMENT_JAVADOC) && (token != TokenNameCOMMENT_LINE )) { We need to clear 2.1 bug reports that won't be addressed before 2.1. The new implementation is still in the works. Therefore we cannot include it for 2.1. Not enough testing and we need to polish the preferences. This will be address for 2.2 as stated in the JDT/Core plan. Resurrecting for 3.0 Reopen for 3.0 consideration. This is addressed in the new formatter. Fixed and released in HEAD. Regression test added. Verified. |