mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Fix Fabrique's problem: FBQ-10629
This commit is contained in:
@@ -11,6 +11,8 @@ import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.openapi.wm.FocusWatcher;
|
||||
import com.intellij.openapi.wm.ToolWindowManager;
|
||||
import com.intellij.openapi.wm.ex.IdeFocusTraversalPolicy;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.util.ArrayUtil;
|
||||
import com.intellij.util.containers.ArrayListSet;
|
||||
import org.jdom.Element;
|
||||
@@ -260,13 +262,24 @@ public class EditorsSplitters extends JPanel {
|
||||
return editors.toArray(new FileEditor[editors.size()]);
|
||||
}
|
||||
|
||||
protected void updateFileIcon(final VirtualFile file, final boolean b) {
|
||||
protected void updateFileIcon(final VirtualFile file, final boolean useAlarm) {
|
||||
LOG.assertTrue(file != null);
|
||||
final EditorWindow[] windows = findWindows(file);
|
||||
if (windows != null) {
|
||||
for (int i = 0; i < windows.length; i++) {
|
||||
windows[i].updateFileIcon(file);
|
||||
Runnable updateRunnable = new Runnable() {
|
||||
public void run() {
|
||||
final EditorWindow[] windows = findWindows(file);
|
||||
if (windows != null) {
|
||||
for (int i = 0; i < windows.length; i++) {
|
||||
windows[i].updateFileIcon(file);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (useAlarm) {
|
||||
ApplicationManager.getApplication().invokeLater(updateRunnable, ModalityState.NON_MMODAL);
|
||||
}
|
||||
else {
|
||||
updateRunnable.run();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1163,7 +1163,7 @@ public final class FileEditorManagerImpl extends FileEditorManagerEx implements
|
||||
for (int i = openFiles.length - 1; i >= 0; i--) {
|
||||
final VirtualFile file = openFiles[i];
|
||||
LOG.assertTrue(file != null);
|
||||
updateFileIcon(file, false);
|
||||
updateFileIcon(file, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user