Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 194470 - [Organize Imports] Removes static imports used in Javadoc
Summary: [Organize Imports] Removes static imports used in Javadoc
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 194747
Blocks:
  Show dependency tree
 
Reported: 2007-06-26 14:12 EDT by Micah Hainline CLA
Modified: 2007-06-28 09:31 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Micah Hainline CLA 2007-06-26 14:12:36 EDT
Build ID: I20070601-1539

Steps To Reproduce:
Organize imports removes static imports that are only used in the Javadoc.  

To reproduce this, add the import "import static java.lang.Math.E;", then add {@link #E} in the javadoc.  Run Organize Imports and it will be removed, and the warning "Javadoc: E cannot be resolved or is not a field" will appear.
Comment 1 Martin Aeschlimann CLA 2007-06-28 08:28:38 EDT
As far as I know, you can't use statically imported references in Javadoc.
When the following code is send to Javadoc.exe, you get an warning:
'warning - Tag @link: can't find E in p.E01'

It seems that our compiler accepts this, but it shouldn't. I filed bug 194747.

package p;
import static java.lang.Math.E;
public class E01 {
	/**
	 * {@link #E}
	 */
        public void foo() {
        }
}