Search in sources :

Example 6 with DockContainer

use of com.intellij.ui.docking.DockContainer in project intellij-community by JetBrains.

the class FileEditorManagerImpl method getSplittersFor.

@Override
public EditorsSplitters getSplittersFor(Component c) {
    EditorsSplitters splitters = null;
    DockContainer dockContainer = myDockManager.getContainerFor(c);
    if (dockContainer instanceof DockableEditorTabbedContainer) {
        splitters = ((DockableEditorTabbedContainer) dockContainer).getSplitters();
    }
    if (splitters == null) {
        splitters = getMainSplitters();
    }
    return splitters;
}
Also used : DockContainer(com.intellij.ui.docking.DockContainer)

Example 7 with DockContainer

use of com.intellij.ui.docking.DockContainer in project intellij-community by JetBrains.

the class OpenEditorsContextProvider method clearContext.

@Override
public void clearContext() {
    if (myFileEditorManager != null) {
        myFileEditorManager.closeAllFiles();
        myFileEditorManager.getMainSplitters().clear();
    }
    for (DockContainer container : myDockManager.getContainers()) {
        if (container instanceof DockableEditorTabbedContainer) {
            container.closeAll();
        }
    }
}
Also used : DockableEditorTabbedContainer(com.intellij.openapi.fileEditor.impl.DockableEditorTabbedContainer) DockContainer(com.intellij.ui.docking.DockContainer)

Aggregations

DockContainer (com.intellij.ui.docking.DockContainer)7 PersistentStateComponent (com.intellij.openapi.components.PersistentStateComponent)2 DockableEditorTabbedContainer (com.intellij.openapi.fileEditor.impl.DockableEditorTabbedContainer)2 IdeFocusManager (com.intellij.openapi.wm.IdeFocusManager)2 NotNull (org.jetbrains.annotations.NotNull)2 ComponentManagerImpl (com.intellij.openapi.components.impl.ComponentManagerImpl)1 EditorWithProviderComposite (com.intellij.openapi.fileEditor.impl.EditorWithProviderComposite)1 EditorsSplitters (com.intellij.openapi.fileEditor.impl.EditorsSplitters)1 FileEditorProviderManagerImpl (com.intellij.openapi.fileEditor.impl.FileEditorProviderManagerImpl)1 Nullable (org.jetbrains.annotations.Nullable)1