Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332027

Summary: auto completing anonymous inner type duplicates (almost) whole class - code assist
Product: [Eclipse Project] JDT Reporter: pengcheng <pengchenglee>
Component: CoreAssignee: Ayushman Jain <amj87.iitr>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3 CC: Olivier_Thomann
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows Vista   
Whiteboard: stalebug
Attachments:
Description Flags
java source
none
error source after code completion none

Description pengcheng CLA 2010-12-07 09:48:13 EST
Build Identifier: 20100617-1415

pls. see attachment source line 114 (in main method). Reproducible.

briefly:

class A {
   public static interface B {..}
   
   public static void main(String[] args) {
      ...
      new A( arg1, new B() {...} ); // auto-complete "new B()" causes duplication!
   }

}

Reproducible: Always
Comment 1 pengcheng CLA 2010-12-07 09:53:02 EST
Created attachment 184720 [details]
java source

(swt version 3.557)
Comment 2 pengcheng CLA 2010-12-07 09:59:19 EST
Created attachment 184721 [details]
error source after code completion

(at line 197:
Providerabstract class Type1291733629976 implements swt.text.AssistErrDemo.Provider {
)
Comment 3 Eclipse Genie CLA 2020-04-23 00:52:17 EDT
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.