mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
detached splitters also need to watch focus (IDEA-70705)
This commit is contained in:
+8
-6
@@ -44,28 +44,30 @@ public class DockableEditorContainerFactory implements DockContainerFactory.Pers
|
||||
}
|
||||
|
||||
private DockContainer createContainer(boolean loadingState) {
|
||||
final Ref<DockableEditorTabbedContainer> container = new Ref<DockableEditorTabbedContainer>();
|
||||
final Ref<DockableEditorTabbedContainer> containerRef = new Ref<DockableEditorTabbedContainer>();
|
||||
EditorsSplitters splitters = new EditorsSplitters(myFileEditorManager, myDockManager, false) {
|
||||
@Override
|
||||
protected void afterFileClosed(VirtualFile file) {
|
||||
container.get().fireContentClosed(file);
|
||||
containerRef.get().fireContentClosed(file);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void afterFileOpen(VirtualFile file) {
|
||||
container.get().fireContentOpen(file);
|
||||
containerRef.get().fireContentOpen(file);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IdeFrame getFrame(Project project) {
|
||||
return DockManager.getInstance(project).getIdeFrame(container.get());
|
||||
return DockManager.getInstance(project).getIdeFrame(containerRef.get());
|
||||
}
|
||||
};
|
||||
if (!loadingState) {
|
||||
splitters.createCurrentWindow();
|
||||
}
|
||||
container.set(new DockableEditorTabbedContainer(myProject, splitters, true));
|
||||
return container.get();
|
||||
final DockableEditorTabbedContainer container = new DockableEditorTabbedContainer(myProject, splitters, true);
|
||||
containerRef.set(container);
|
||||
container.getSplitters().startListeningFocus();
|
||||
return container;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user