Reload from disk not always working

Answered

Sometimes, when a file on disk has changed, no matter how many times I use "Reload from disk" in IntelliJ, it refuses to display the file contents from disk in its editor. This only happens sometimes, at other times Reload from disk works, and yet other times, I don't even have to do reload from disk, it does it automatically!

When it refuses to reload the file from disk, then often after a few minutes it suddenly "wakes up", discovers it has changed, and finally listens to my command. However my current solution to do it more quickly, is to type a space in the file and press CTRL+S. Then it also suddenly discovers that the file on disk changed and gives a dialog in which I can choose to load the disk version (rather than the memory version).

The "Synchronize files on frame activation" setting is turned off the whole time.
I'm using IntelliJ 9.0.4 on Ubuntu.

Question 1:

Is there any command in IntelliJ that is "harder" than "Reload from disk" that basically means: "The file on disk has really, really, changed, believe me, display me its actual disk contents NOW!".

Question 2:

So IntelliJ has 3 modes of operation that happen at random times to me:
mode 1: it doesn't automatically discover disk changes, but immediatly responds correctly to "Reload from disk"
mode 2: it refuses to display the new file even when doing "Reload from disk"
mode 3: it displays the disk changes immediatly, in real time, without me even having to use "Reload from disk".

I like mode 1 and 3, but hate mode 2. What things influence in which of those 3 modes IntelliJ is? It seems quite random to me...

Thanks!

4
5 comments

Could this be related to the Git plugin? Can version control plugins have an effect on the Reload from disk option?

0

+1 The same is happening for me, still in September 2022. Using PhpStorm 2022.2.2. I sometimes rename the "vendor" directory in my Magento project, and it's immediately reindexed, but when I run "composer install" to install the dependencies again, PhpStorm fails to recognize that the "vendor" directory is there back again. Forcing to "reload from disk" does nothing.

1

+1 Same here.

I did a npm install and a 

node_modules/.bin/gulp default

but the node_modules directory and the files from the
gulp task are not there (they are physically there).
Also a reload from Disk does do nothing.
Furthermore, it does not reflect well on you if the "Code" comment function does not work, as you can see from my comment.

After some minutes the directories and files apeared.

I am trapped in this codeblooock.
0

I tested it for some days now and I didn´t have any problems. Thank you, Oksana Chumak.

0

Please sign in to leave a comment.