Search in sources :

Example 1 with ToolWindowEx

use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.

the class DesignerToolWindowManager method initToolWindow.

//////////////////////////////////////////////////////////////////////////////////////////
//
// Impl
//
//////////////////////////////////////////////////////////////////////////////////////////
@Override
protected void initToolWindow() {
    if (myToolWindowContent == null) {
        myToolWindowContent = new DesignerToolWindow(myProject, true);
    }
    myToolWindow = ToolWindowManager.getInstance(myProject).registerToolWindow(DesignerBundle.message("designer.toolwindow.name"), false, getAnchor(), myProject, true);
    myToolWindow.setIcon(UIDesignerNewIcons.ToolWindow);
    if (!ApplicationManager.getApplication().isHeadlessEnvironment()) {
        myToolWindow.getComponent().putClientProperty(ToolWindowContentUi.HIDE_ID_LABEL, "true");
    }
    ((ToolWindowEx) myToolWindow).setTitleActions(myToolWindowContent.createActions());
    initGearActions();
    ContentManager contentManager = myToolWindow.getContentManager();
    Content content = contentManager.getFactory().createContent(myToolWindowContent.getToolWindowPanel(), DesignerBundle.message("designer.toolwindow.title"), false);
    content.setCloseable(false);
    content.setPreferredFocusableComponent(myToolWindowContent.getComponentTree());
    contentManager.addContent(content);
    contentManager.setSelectedContent(content, true);
    myToolWindow.setAvailable(false, null);
}
Also used : ToolWindowEx(com.intellij.openapi.wm.ex.ToolWindowEx) Content(com.intellij.ui.content.Content) ContentManager(com.intellij.ui.content.ContentManager)

Example 2 with ToolWindowEx

use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.

the class TerminalToolWindowPanel method setToolWindowHeaderVisible.

private void setToolWindowHeaderVisible(boolean isVisible) {
    InternalDecorator decorator = ((ToolWindowEx) myWindow).getDecorator();
    decorator.setHeaderVisible(isVisible);
}
Also used : ToolWindowEx(com.intellij.openapi.wm.ex.ToolWindowEx) InternalDecorator(com.intellij.openapi.wm.impl.InternalDecorator)

Example 3 with ToolWindowEx

use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.

the class LightToolWindowManager method initGearActions.

protected final void initGearActions() {
    ToolWindowEx toolWindow = (ToolWindowEx) myToolWindow;
    toolWindow.setAdditionalGearActions(new DefaultActionGroup(createGearActions()));
}
Also used : ToolWindowEx(com.intellij.openapi.wm.ex.ToolWindowEx) DefaultActionGroup(com.intellij.openapi.actionSystem.DefaultActionGroup)

Example 4 with ToolWindowEx

use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.

the class ToggleFloatingModeAction method setSelected.

public void setSelected(AnActionEvent event, boolean flag) {
    Project project = event.getProject();
    if (project == null) {
        return;
    }
    String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
    if (id == null) {
        return;
    }
    ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
    ToolWindowEx toolWindow = (ToolWindowEx) mgr.getToolWindow(id);
    ToolWindowType type = toolWindow.getType();
    if (ToolWindowType.FLOATING == type) {
        toolWindow.setType(toolWindow.getInternalType(), null);
    } else {
        toolWindow.setType(ToolWindowType.FLOATING, null);
    }
}
Also used : Project(com.intellij.openapi.project.Project) ToolWindowEx(com.intellij.openapi.wm.ex.ToolWindowEx) ToolWindowType(com.intellij.openapi.wm.ToolWindowType) ToolWindowManagerEx(com.intellij.openapi.wm.ex.ToolWindowManagerEx)

Example 5 with ToolWindowEx

use of com.intellij.openapi.wm.ex.ToolWindowEx in project intellij-community by JetBrains.

the class ToggleWindowedModeAction method setSelected.

public void setSelected(AnActionEvent event, boolean flag) {
    Project project = event.getProject();
    if (project == null) {
        return;
    }
    String id = ToolWindowManager.getInstance(project).getActiveToolWindowId();
    if (id == null) {
        return;
    }
    ToolWindowManagerEx mgr = ToolWindowManagerEx.getInstanceEx(project);
    ToolWindowEx toolWindow = (ToolWindowEx) mgr.getToolWindow(id);
    ToolWindowType type = toolWindow.getType();
    if (ToolWindowType.WINDOWED == type) {
        toolWindow.setType(toolWindow.getInternalType(), null);
    } else {
        toolWindow.setType(ToolWindowType.WINDOWED, null);
    }
}
Also used : Project(com.intellij.openapi.project.Project) ToolWindowEx(com.intellij.openapi.wm.ex.ToolWindowEx) ToolWindowType(com.intellij.openapi.wm.ToolWindowType) ToolWindowManagerEx(com.intellij.openapi.wm.ex.ToolWindowManagerEx)

Aggregations

ToolWindowEx (com.intellij.openapi.wm.ex.ToolWindowEx)15 ToolWindowManagerEx (com.intellij.openapi.wm.ex.ToolWindowManagerEx)5 Project (com.intellij.openapi.project.Project)4 Content (com.intellij.ui.content.Content)3 ContentManager (com.intellij.ui.content.ContentManager)3 DefaultActionGroup (com.intellij.openapi.actionSystem.DefaultActionGroup)2 ToolWindowType (com.intellij.openapi.wm.ToolWindowType)2 Executor (com.intellij.execution.Executor)1 DefaultDebugExecutor (com.intellij.execution.executors.DefaultDebugExecutor)1 ProcessHandler (com.intellij.execution.process.ProcessHandler)1 RunContentDescriptor (com.intellij.execution.ui.RunContentDescriptor)1 RunContentWithExecutorListener (com.intellij.execution.ui.RunContentWithExecutorListener)1 AnAction (com.intellij.openapi.actionSystem.AnAction)1 AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)1 ToolWindow (com.intellij.openapi.wm.ToolWindow)1 ToolWindowAnchor (com.intellij.openapi.wm.ToolWindowAnchor)1 InternalDecorator (com.intellij.openapi.wm.impl.InternalDecorator)1 ContentManagerAdapter (com.intellij.ui.content.ContentManagerAdapter)1 ContentManagerEvent (com.intellij.ui.content.ContentManagerEvent)1 MessageBusConnection (com.intellij.util.messages.MessageBusConnection)1