Skip to content

Conversation

@ArturitoGit
Copy link

syncRefresh() was used until now, but this method relies on a file-watcher.
As a consequence, the following statement (reloadFromDisk), would be played
before the file can be marked as dirty, and potentially be wrong.

This creates the following bug :
If one opens a file, modifies it so that a diagnostic message appears, and then saves it,
then the diagnostic message is also going to disappear, because Intellij is going to
"reload" a file from its internal cache, and is not going to take the change into account.

Use refreshWithoutFileWatcher() instead, to make sure that the file is refreshed before
reloadFromDisk() is called.

asyncRefresh() was used until now,
but this method relies on a file-watcher.
As a consequence, the following statement
(reloadFromDisk) happens before the file
can be marked as dirty, which makes the first
call to reloadFromDisk() use the idea cache.

Use refreshWithoutFileWatcher() instead, to
make sure that the file is refreshed before
the next call to reloadFromDisk().
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant