Bug 292677 - Do not add imports when class is referenced by doc comments
Summary: Do not add imports when class is referenced by doc comments
Status: CLOSED DUPLICATE of bug 128661
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.6   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-19 11:19 EDT by Paul Benedict CLA
Modified: 2009-10-19 11:56 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 Paul Benedict CLA 2009-10-19 11:19:56 EDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
Build Identifier: 20090920-1017

Based on analysis in my team, package cycles are sometimes caused solely by the import of classes solely for doc comments. They are often @see or @link tags to complete documentation.

I propose a new toggle option to Organize Imports/Clean Up that would insert the FQN of the class in the doc comments when no code reference exists; otherwise import. 

Creating run-time dependencies for non-code is not necessary nor optimal.

Reproducible: Always

Steps to Reproduce:
1. Doc a class with a @see clause for a class of another package
2. Organize imports
3. Import occurs
Comment 1 Dani Megert CLA 2009-10-19 11:56:37 EDT

*** This bug has been marked as a duplicate of bug 128661 ***