mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cwm: fix empty diff preview in remote development
CLM refresh event might come with host ClientId, while preview file is opened for unattended guest. GitOrigin-RevId: 0ec0256062fd9eda3f3c2d9db2a06b42e5d08e05
This commit is contained in:
committed by
intellij-monorepo-bot
parent
380fbc3be2
commit
a43c389c46
@@ -93,6 +93,15 @@ public abstract class FileEditorManager {
|
||||
*/
|
||||
public abstract boolean isFileOpen(@NotNull VirtualFile file);
|
||||
|
||||
/**
|
||||
* @return {@code true} if {@code file} is opened, {@code false} otherwise
|
||||
* Unlike {@link #isFileOpen(VirtualFile)} includes files which were opened by all guests during a collaborative development session.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
public boolean isFileOpenWithRemotes(@NotNull VirtualFile file) {
|
||||
return isFileOpen(file);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return all opened files. Order of files in the array corresponds to the order of editor tabs.
|
||||
*/
|
||||
@@ -263,5 +272,5 @@ public abstract class FileEditorManager {
|
||||
*
|
||||
* @param file the file to refresh.
|
||||
*/
|
||||
public void updateFilePresentation(@NotNull VirtualFile file) {}
|
||||
public void updateFilePresentation(@NotNull VirtualFile file) { }
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ abstract class EditorTabPreview(protected val diffProcessor: DiffRequestProcesso
|
||||
if (isPreviewVisible) openPreview(focus) else closePreview()
|
||||
}
|
||||
|
||||
protected fun isPreviewOpen(): Boolean = FileEditorManager.getInstance(project).isFileOpen(previewFile)
|
||||
protected fun isPreviewOpen(): Boolean = FileEditorManager.getInstance(project).isFileOpenWithRemotes(previewFile)
|
||||
|
||||
fun closePreview() {
|
||||
FileEditorManager.getInstance(project).closeFile(previewFile)
|
||||
|
||||
Reference in New Issue
Block a user