Bug 421757 - Organize Imports should avoid import just because of JavaDoc @link
Summary: Organize Imports should avoid import just because of JavaDoc @link
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.3   Edit
Hardware: PC Windows 7
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-14 11:40 EST by Peter CLA
Modified: 2013-11-14 11:40 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter CLA 2013-11-14 11:40:08 EST
Assume i got a Class

   package test.api;
   import test.tools.JSONBuilder;
   interface Test {
       /**
        * Returns a String created by {@link JSONBuilder}.
        */
       String createJSONString();
   }

A Checkstyle-Warning occour the Import is unused. Well, i know what you think: "I dont give a <bad word> on Checkstyle". I Think a import just because of javadoc is ugly.

But checkstyle is more right i think. He goes fine with this Source:

   package test.api;
   interface Test {
       /**
        * Returns a String created by {@link test.tools.JSONBuilder}.
        */
       String createJSONString();
   }

This should just be in case when the class usage is limited to javadoc.

This is similar to Bug 30372. 

Problem: To support downgrade this should be flaged on and off but the Organize-Imports-Preferencepage is very compact. Maybe a Checkbox right under "Do not create imports for types starting with a lowercase letter"....