| Summary: | [content assist] Content assist -> Implement method creates method with wrong formatting and missing @Override | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | misja <misja.alma> |
| Component: | Text | Assignee: | JDT-Text-Inbox <jdt-text-inbox> |
| Status: | ASSIGNED --- | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | daniel_megert, didierloiseau+eclipse, Dirk.Steinkamp, markus.kell.r, misja.alma |
| Version: | 3.6.2 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | stalebug | ||
| Bug Depends on: | 377176 | ||
| Bug Blocks: | |||
|
Description
misja
Here's an example of such a generated method:
Thread thread = new Thread()
{
public void run() {};
}
Note that both braces are on the same line even though my code formatter specifies that each of them should be on a new line.
Sometimes the code generator does this correctly, and sometimes the code looks like this.
Self-contained snippet:
class Y {
public void foo() {
}
}
public class Snippet extends Y {
foo();
foo
}
Content assist after "foo" inserts:
public void foo() {};
If the foo() call removed or commented out, then it works fine.
The bug is in OverrideCompletionProposal.java.
See also bug 317497.
I can't reproduce comment 2 (inserts a correct overriding method), but comment 1 is due to a bad AST recovery, see bug 377176. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |