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

Bug 364971

Summary: [Xtend] organize imports: unneeded import for FQN added
Product: [Modeling] TMF Reporter: Moritz Eysholdt <moritz.eysholdt>
Component: XtextAssignee: Project Inbox <tmf.xtext-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 Flags: moritz.eysholdt: juno+
Version: unspecified   
Target Milestone: M4   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Moritz Eysholdt CLA 2011-11-28 11:06:03 EST
Steps to reproduce

When running "organize imports" on file 
---
class bar implements java.util.List<Object> {	
}
---
the import "import java.util.List" is added.

This import is not actually needed, since the reference to List within the extends-clause remains in its FQN-form. Consequently, the import is now flagged with a warning marker: "The import 'java.util.List' is never used.".

This is somewhat inconvenient, since I like to use "organize imports" to wipe away my warnings caused by unused imports ;)

JDT does not add an import for the same scenario in Java.
Comment 1 Moritz Eysholdt CLA 2011-11-28 11:10:43 EST
Knut already reported this one in bug 362267

*** This bug has been marked as a duplicate of bug 362267 ***
Comment 2 Karsten Thoms CLA 2017-09-19 17:40:34 EDT
Closing all bugs that were set to RESOLVED before Neon.0
Comment 3 Karsten Thoms CLA 2017-09-19 17:51:41 EDT
Closing all bugs that were set to RESOLVED before Neon.0