File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
rider/src/main/java/org/digma/intellij/plugin/rider/editor Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 33import com .intellij .openapi .fileEditor .FileEditorManager ;
44import com .intellij .openapi .fileEditor .FileEditorManagerListener ;
55import com .intellij .openapi .project .Project ;
6+ import com .intellij .openapi .vcs .vfs .ContentRevisionVirtualFile ;
67import com .intellij .openapi .vfs .VirtualFile ;
78import com .intellij .psi .PsiManager ;
9+ import com .intellij .testFramework .BinaryLightVirtualFile ;
810import org .digma .intellij .plugin .document .DocumentInfoService ;
911import org .digma .intellij .plugin .psi .LanguageService ;
1012import org .digma .intellij .plugin .rider .protocol .CodeObjectHost ;
@@ -28,6 +30,12 @@ public RiderFileClosedListener(Project project) {
2830 @ Override
2931 public void fileClosed (@ NotNull FileEditorManager source , @ NotNull VirtualFile file ) {
3032
33+ //its vcs revision files that we open so not relevant for file closed
34+ if (file instanceof BinaryLightVirtualFile &&
35+ ((BinaryLightVirtualFile ) file ).getOriginalFile () instanceof ContentRevisionVirtualFile ) {
36+ return ;
37+ }
38+
3139 //when a file is closed or deleted while open we want to clear its document from the rider protocol and from
3240 //and the DocumentInfo from documentInfoService
3341 var psiFile = PsiManager .getInstance (project ).findFile (file );
You can’t perform that action at this time.
0 commit comments