fix AWT events are not allowed inside write action
This commit is contained in:
parent
7c9d8156a6
commit
d329db56df
@ -9,6 +9,7 @@
|
||||
- Removed deprecated API access (TranslatorToolWindowFactory)
|
||||
|
||||
### Fixed
|
||||
- Exception on file change listener
|
||||
- Broken badge link in README
|
||||
|
||||
## [4.4.0]
|
||||
|
@ -1,5 +1,6 @@
|
||||
package de.marhali.easyi18n.service;
|
||||
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diagnostic.Logger;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.vfs.AsyncFileListener;
|
||||
@ -54,7 +55,9 @@ public class FileChangeListener implements AsyncFileListener {
|
||||
events.forEach((e) -> {
|
||||
if(e.getPath().contains(localesPath)) { // Perform reload
|
||||
logger.debug("Detected file change. Reloading instance...");
|
||||
InstanceManager.get(project).reload();
|
||||
ApplicationManager.getApplication().invokeLater(() ->
|
||||
InstanceManager.get(project).reload()
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user