开发者

IDEA 10.0.3 replaces declarations with fully qualified names on refactoring

开发者 https://www.devze.com 2023-03-19 23:16 出处:网络
Whenever I move a (unambiguously named) type to another package, IDEA decides to replace all occurrences of given type with its fully qualified name instead of just adding the appropriate imports; goi

Whenever I move a (unambiguously named) type to another package, IDEA decides to replace all occurrences of given type with its fully qualified name instead of just adding the appropriate imports; going th开发者_StackOverflow中文版rough all affected files and manually fixing the imports is madness.

I tried out all possible combinations of the "Auto Import" settings to no effect. Has anybody run into the same problem?


Make sure that "Use fully qualified class names" checkbox is disabled in Settings>CodeStyle>Imports. I apologize if that was a no brainer and you've already tried it.


I recall similar issue reported at least once, however the user was not able to reproduce it with a new project and could not provide his real project affected by this bug.

This issue seems to be caused by some specific project configuration which is very unusual and therefore not affecting the majority of IDEA users.

If you have a reproducible test case, please file a bug to YouTrack and attach your project to the issue so that we can investigate and fix it.

P.S. also try IDEA 10.5.1 since you are using an old version, upgrade is free for you.


May be there exist two imports with same names ? Have you checked this issue ?

Also please specify IntelliJ IDEA's version.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号