MyTitle MyTitle - 1 year ago 149
Java Question

Intellij IDEA doesn't detect changes

Yesterday I refactored my project and I changed layout of my packages (I moved some packages into another packages, created new packages etc). But now, when I try to run JUnit test I get

on methods which name is changed after refactoring. Also, when I change other code in methods, IDEA still running old code.. I tried to run "Invalidate caches" in File menu, also I tried to reboot computer - no result. Where can be problem?

EDIT: Yesterday after moving packages IDEA doesn't correctly change package declarations in
files, so I changed them by hand

Answer Source

I have two suggestions you could try here

  • Edit your test configuration(s) and ensure that they're pointing to what you expect them to. I've sometimes seen a refactoring not being picked up in the run configuration and I've had to manually change it
  • Less likely to work, but try to synchronize your project: File->Synchronize. Do this at the highest level of your project

With regards to your edit - I've not seen this myself. Whenever I've renamed or moved files (including packages) these changes have been correctly applied to all applicable files. Are you refactoring with Refactor>Move / Refactor->Copy ?

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download