Moving classes causes references to be fully qualified

(using Intellij IDEA 4.5.2)

If I Refactor > Move a class, any references to that class in other classes use the fully-qualified name of the class. We have a requirement not to use fully-qualified names and instead use an import at the top.

How can I get the refactoring to perform the fully-qualified import at the top as opposed to fully-qualifying every reference in the code?

2 comments
Comment actions Permalink

IDEA insert fully qualified names on refactorings only if one of the following
conditions are met:
1. If being shortened the class reference will refer to other class due to
import conflicts (class with the same short name have already been imported).
2. Doing so explicitly specified in the code style settings ("Do not use
import statements").

(using Intellij IDEA 4.5.2)

If I Refactor > Move a class, any references to that class in other
classes use the fully-qualified name of the class. We have a
requirement not to use fully-qualified names and instead use an import
at the top.

How can I get the refactoring to perform the fully-qualified import at
the top as opposed to fully-qualifying every reference in the code?



0
Comment actions Permalink

I have the same problem. I am using Idea 5.0.2 and I cannot find the setting that you mention. Has the code style settings changed from 4.5 to 5.0?

Raj.

0

Please sign in to leave a comment.