intellij-idea

Why can't I rename package in intellij idea?


Why can't I change package name in intellij idea?

I want to change "java" package to something else, for example "junit" or "jtests":

enter image description here

But when I select Refactor -> Rename I wind up with the dialog window:

enter image description here

then I select Rename current, in the next window I enter desired package name:

enter image description here

and then, no matters whether I click Refactor or Preview button, nothing happens. Nothing at all: no errors, no warnings, no actions. Why can't I rename this package?


Solution

  • It seems to be a bug of IntelliJ IDEA. I found the solution on JetBrains forum. By invalidating the cache and restarting, I got the ability to rename this package.