Skip to content

Commit 9b97fde

Browse files
authored
fix(amazonq): refreshVfs off EDT (#5727)
``` java.lang.Throwable: Slow operations are prohibited on EDT. See SlowOperations.assertSlowOperationsAreAllowed javadoc. at com.intellij.openapi.diagnostic.Logger.error(Logger.java:375) at com.intellij.util.SlowOperations.assertSlowOperationsAreAllowed(SlowOperations.java:113) at com.intellij.openapi.vfs.newvfs.persistent.FSRecordsImpl.update(FSRecordsImpl.java:756) at com.intellij.openapi.vfs.newvfs.persistent.PersistentFSImpl.findChildInfo(PersistentFSImpl.java:620) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findInPersistence(VirtualDirectoryImpl.java:155) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.doFindChild(VirtualDirectoryImpl.java:138) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.findChild(VirtualDirectoryImpl.java:84) at com.intellij.openapi.vfs.newvfs.impl.VirtualDirectoryImpl.refreshAndFindChild(VirtualDirectoryImpl.java:387) at com.intellij.openapi.vfs.newvfs.VfsImplUtil.refreshAndFindFileByPath(VfsImplUtil.java:118) at com.intellij.openapi.vfs.impl.local.LocalFileSystemBase.refreshAndFindFileByPath(LocalFileSystemBase.java:67) at com.intellij.openapi.vfs.LocalFileSystem.refreshAndFindFileByIoFile(LocalFileSystem.java:45) at com.intellij.util.containers.ContainerUtil.map(ContainerUtil.java:2165) at com.intellij.openapi.vfs.VfsUtil.markDirtyAndRefresh(VfsUtil.java:489) at software.aws.toolkits.jetbrains.services.amazonq.lsp.AmazonQLanguageClientImpl.refreshVfs$lambda$33(AmazonQLanguageClientImpl.kt:416) ```
1 parent b331040 commit 9b97fde

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/amazonq/shared/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/lsp/AmazonQLanguageClientImpl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ class AmazonQLanguageClientImpl(private val project: Project) : AmazonQLanguageC
412412
val currPath = Paths.get(path)
413413
if (currPath.startsWith(localHistoryPath)) return
414414
try {
415-
ApplicationManager.getApplication().invokeLater {
415+
ApplicationManager.getApplication().executeOnPooledThread {
416416
VfsUtil.markDirtyAndRefresh(false, true, true, currPath.toFile())
417417
}
418418
} catch (e: Exception) {

0 commit comments

Comments
 (0)