| Summary: | Organize Imports creates illegal import statement on javadoc {@link EmbeddedClass} tag | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Sebastian Haufe <eclipse> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | minor | ||
| Priority: | P3 | CC: | eclipse, Olivier_Thomann |
| Version: | 3.6 | ||
| Target Milestone: | 3.6.1 | ||
| Hardware: | PC | ||
| OS: | All | ||
| Whiteboard: | |||
I could reproduce in 3.6.0, but not in 3.6.1. This looks like a duplicate of bug 319860 *** This bug has been marked as a duplicate of bug 319860 *** |
Build Identifier: 20100617-1415 Organize Imports creates an import statement for an embedded class/interface/enum linked by the javadoc {@link} tag. 1. The import leads to a compile error if the class exists in the default package. 2. The import is unused if the class exists in a package: The import foo.OrganizeImportBug.SomeClass is never used OrganizeImportBug.java ---------------------------------------------------------------------------- import OrganizeImportBug.SomeClass; // generated by Eclipse Organize Imports /** {@link SomeClass} */ public class OrganizeImportBug { public class SomeClass {} } Shell: ---------------------------------------------------------------------------- $ javac OrganizeImportBug.java OrganizeImportBug.java:1: package OrganizeImportBug does not exist import OrganizeImportBug.SomeClass; ^ 1 error Workaround: Use {@link OrganizeImportBug.SomeClass} instead. Reproducible: Always