Bug 39603 - for-Statement not correctly formatted by Codeformatter
Summary: for-Statement not correctly formatted by Codeformatter
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 3.0 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-03 10:54 EDT by Christian Kasper CLA
Modified: 2003-10-14 07:25 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Kasper CLA 2003-07-03 10:54:30 EDT
Hi!

The statement

for(int i=1;((i<10)&&(i<10));i++){

is formated to:
for (int i = 1;((i < 10) && (i < 10)); i++) {
               ^^
but the correct way is:
for (int i = 1; ((i < 10) && (i < 10)); i++) {

I try a fix and in 'case: TokenNameLPAREN'; I comment out 
'&& previousToken != TokenNameSEMICOLON'. This works for the for-statement, but I don't know how it works in other situation.

Christian
Comment 1 Olivier Thomann CLA 2003-10-03 10:33:20 EDT
This is addressed in the new formatter.
Fixed and released in HEAD.
Regression test added.
Comment 2 David Audel CLA 2003-10-14 07:25:06 EDT
Verified.