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)
|
- Removed deprecated API access (TranslatorToolWindowFactory)
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
- Exception on file change listener
|
||||||
- Broken badge link in README
|
- Broken badge link in README
|
||||||
|
|
||||||
## [4.4.0]
|
## [4.4.0]
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package de.marhali.easyi18n.service;
|
package de.marhali.easyi18n.service;
|
||||||
|
|
||||||
|
import com.intellij.openapi.application.ApplicationManager;
|
||||||
import com.intellij.openapi.diagnostic.Logger;
|
import com.intellij.openapi.diagnostic.Logger;
|
||||||
import com.intellij.openapi.project.Project;
|
import com.intellij.openapi.project.Project;
|
||||||
import com.intellij.openapi.vfs.AsyncFileListener;
|
import com.intellij.openapi.vfs.AsyncFileListener;
|
||||||
@ -54,7 +55,9 @@ public class FileChangeListener implements AsyncFileListener {
|
|||||||
events.forEach((e) -> {
|
events.forEach((e) -> {
|
||||||
if(e.getPath().contains(localesPath)) { // Perform reload
|
if(e.getPath().contains(localesPath)) { // Perform reload
|
||||||
logger.debug("Detected file change. Reloading instance...");
|
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