| Summary: | [content assist] Still too many semicolons after constructor completion | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | Text | Assignee: | Dani Megert <daniel_megert> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, stephan.herrmann |
| Version: | 3.7 | ||
| Target Milestone: | 3.7 M2 | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Markus Keller
> };,, (String) o);
> // too much ^^
Grr.., I meant:
};,, (String) o);
too much ^^
This heuristic will continue to cause trouble. I saw that AnonymousTypeCompletionProposal#createNewBody(..) already creates an AST, and I think that should be used to find out whether the enclosing statement is missing a ';' or not.
Even harder example:
take(null,
(String) o);
I've fixed the ',' case. We can see whether more work is needed in the future but at this time I don't have time to rewrite the heuristic based on the AST. Please reopen if you have more cases that disturb you in your daily work. Fix is in AnonymousTypeCompletionProposal. Verified in I20100914-0100. (In reply to comment #2) > Please reopen if you have more cases that disturb you in your daily work. Not during daily work but while verifying bug 292087 I came across this: Before completion: class Bug324391 { private Runnable jobs[] = { new Run| }; } After completion: class Bug324391 { private Runnable jobs[] = { new Runnable() { @Override public void run() { // TODO Auto-generated method stub } }; }; } Compiler says: Syntax error on token ";", , expected . Please file a new bug. |