Bug 46150 - formatter failed to format
Summary: formatter failed to format
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-05 17:23 EST by Rafael Chaves CLA
Modified: 2003-11-20 12:36 EST (History)
0 users

See Also:


Attachments
.log file (12.16 KB, application/octet-stream)
2003-11-05 17:23 EST, Rafael Chaves CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rafael Chaves CLA 2003-11-05 17:23:06 EST
i20031105 with Equinox 20031010

The formatter refused format a block of code, and an entry was added to the log.
Will attach the session .log.
Comment 1 Rafael Chaves CLA 2003-11-05 17:23:43 EST
Created attachment 6672 [details]
.log file
Comment 2 Olivier Thomann CLA 2003-11-05 22:40:09 EST
I will investigate.
Comment 3 Olivier Thomann CLA 2003-11-06 08:43:36 EST
Your code is not syntactically correct. Missing '}' in installBundles(). So the 
new formatter cannot format your code and returns no edit.
Close as INVALID?
Comment 4 Rafael Chaves CLA 2003-11-06 10:25:37 EST
If the idea is to stop logging it when the formatter is more stable, I agree.
Comment 5 Olivier Thomann CLA 2003-11-06 10:30:35 EST
Move to JDT/UI for comment.
Would it be possible to distinguish source with syntax errors from source that 
the formatter fails to format?
Move it back when you replied.
Comment 6 Olivier Thomann CLA 2003-11-06 11:02:43 EST
In this case, I can actually format all methods except the one that contains 
the syntax error. This one is left as is. This is possible in this case, 
because the diet parse was successfull and only the parsing of one method body 
failed.
In general, the formatter cannot format code that is not syntactically correct, 
but in this case we can do something.
I consider this enough to close this PR.
Fixed and released in HEAD.
Regression test added.
Comment 7 David Audel CLA 2003-11-20 12:36:29 EST
Verified.