Bug 266979 - [organize imports] @see in javadoc comments considered
Summary: [organize imports] @see in javadoc comments considered
Status: CLOSED DUPLICATE of bug 92821
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows Vista
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-04 02:52 EST by Adeeb CLA
Modified: 2009-03-04 22:55 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adeeb CLA 2009-03-04 02:52:52 EST
Build ID: 3.3 europa

Steps To Reproduce:
1.Create a java file with a javadoc comment - @see NA (I agree that its not a healthy practice, but can not help for maintenance and enhancement projects)
2.Incluse j2ee classes in classpath (having a class or inner class with name 'NA')
3. Do an organize imports.
4. Based on @see javadoc comment an import statement is added, in the example below the file will not compile as inner class MediaSize$NA is imported unnecessaily.


More information:
Unwanted import line added: Example
-----------------------------------
package com.xx.yy.ui.test;

import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;

import javax.print.attribute.standard.MediaSize$NA; // added by eclipse when organize import is given
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class Test{
	/**
	*@return String
	*@see NA
	*/
    public final String getModuleName() { return ""; }
}
Comment 1 Adeeb CLA 2009-03-04 03:10:22 EST
Specific example:

package test;

import java.util.Date;

import javax.print.attribute.standard.MediaSize$NA;
public class Test {

	/**
	 * @see NA
	 */
	public String test() {
		return new Date().toString();
	}
}
Comment 2 Markus Keller CLA 2009-03-04 09:23:44 EST
That's the expected behavior when Javadoc processing is enabled (see project properties > Java Compiler > Javadoc).

*** This bug has been marked as a duplicate of bug 92821 ***
Comment 3 Adeeb CLA 2009-03-04 22:55:34 EST
Thanks Markus Keller for your time and guaidance,
It was raised due to lack of knowledge.