Community
Participate
Working Groups
Can you add a preference to create an "import static" if a qualified name appears more than N times? For example, if the name X.FOO constant appears more than N times, it should be changed to FOO everywhere it appears and a static import added for X.FOO.
We have no plans for this. It's not trivial to do. The difficulty will be to do it 100% correct. There are several corner cases with visibility, shadowing etc, which would probably require a refactoring. We already have an action that the user can manually invoke ('add import, CTRL + M') on a qualified name. You can also add your static import 'favorites' to code assist (see preference page)
Yes, but it only replaces the one you click on, not all instances of the constant.