@@ -9,7 +9,6 @@ import com.intellij.openapi.Disposable
99import com.intellij.openapi.actionSystem.DataContext
1010import com.intellij.openapi.application.ApplicationManager
1111import com.intellij.openapi.application.invokeLater
12- import com.intellij.openapi.command.WriteCommandAction
1312import com.intellij.openapi.diagnostic.Logger
1413import com.intellij.openapi.editor.Caret
1514import com.intellij.openapi.editor.EditorFactory
@@ -49,6 +48,7 @@ import javax.swing.JPanel
4948import com.intellij.openapi.fileEditor.FileDocumentManager
5049import com.intellij.openapi.fileEditor.FileEditorManagerEvent
5150import com.intellij.openapi.fileEditor.FileEditorManagerListener
51+ import com.intellij.openapi.roots.ProjectRootManager
5252
5353class SharedChatPane (val project : Project ) : JPanel(), Disposable {
5454 private val logger = Logger .getInstance(SharedChatPane ::class .java)
@@ -179,7 +179,7 @@ class SharedChatPane(val project: Project) : JPanel(), Disposable {
179179 logger.warn(" handleForceReloadFileByPath: File not found: $fileName (sanitized: $sanitizedFileName )" )
180180 return @invokeLater
181181 }
182- VfsUtil .markDirtyAndRefresh(true , false , true , virtualFile)
182+ VfsUtil .markDirtyAndRefresh(true , true , true , virtualFile)
183183 logger.warn(" handleForceReloadFileByPath: done for $fileName " )
184184 }
185185 }
@@ -621,8 +621,10 @@ class SharedChatPane(val project: Project) : JPanel(), Disposable {
621621 this .handleForceReloadFileByPath(event.path)
622622 }
623623
624- is Events .Editor .ForceReload -> {
625- // TODO: handle force reload event.
624+ is Events .Editor .ForceReloadProjectTreeFiles -> {
625+ ProjectRootManager .getInstance(project).contentRoots.forEach {
626+ this .handleForceReloadFileByPath(it.path)
627+ }
626628 }
627629
628630 else -> Unit
0 commit comments