mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-127739 Navigation Tab
Stage 5 NPE fix
This commit is contained in:
+11
-8
@@ -176,12 +176,9 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
|
||||
|
||||
public Set<EditorsSplitters> getAllSplitters() {
|
||||
HashSet<EditorsSplitters> all = new LinkedHashSet<EditorsSplitters>();
|
||||
if (PreviewPanel.isAvailable()) {
|
||||
initUI();
|
||||
EditorWindow window = myPreviewPanel.getWindow();
|
||||
if (window != null) {
|
||||
all.add(window.getOwner());
|
||||
}
|
||||
EditorWindow previewWindow = getPreviewWindow();
|
||||
if (previewWindow != null) {
|
||||
all.add(previewWindow.getOwner());
|
||||
}
|
||||
all.add(getMainSplitters());
|
||||
Set<DockContainer> dockContainers = myDockManager.getContainers();
|
||||
@@ -262,6 +259,13 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
|
||||
}
|
||||
}
|
||||
|
||||
@Nullable
|
||||
private EditorWindow getPreviewWindow() {
|
||||
if (!PreviewPanel.isAvailable()) return null;
|
||||
initUI();
|
||||
return myPreviewPanel.getWindow();
|
||||
}
|
||||
|
||||
private static class MyBorder implements Border {
|
||||
@Override
|
||||
public void paintBorder(@NotNull Component c, @NotNull Graphics g, int x, int y, int width, int height) {
|
||||
@@ -643,8 +647,7 @@ public class FileEditorManagerImpl extends FileEditorManagerEx implements Projec
|
||||
}
|
||||
|
||||
if (wndToOpenIn == null || !wndToOpenIn.isFileOpen(file)) {
|
||||
initUI();
|
||||
EditorWindow previewWindow = PreviewPanel.isAvailable() && myPreviewPanel != null ? myPreviewPanel.getWindow() : null;
|
||||
EditorWindow previewWindow = getPreviewWindow();
|
||||
if (previewWindow != null) {
|
||||
wndToOpenIn = previewWindow;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user