List of usage examples for com.intellij.openapi.wm ToolWindowType DOCKED
ToolWindowType DOCKED
To view the source code for com.intellij.openapi.wm ToolWindowType DOCKED.
Click Source Link
From source file:com.intellij.designer.LightToolWindow.java
License:Apache License
private DefaultActionGroup createGearPopupGroup() { DefaultActionGroup group = new DefaultActionGroup(); group.add(myManager.createGearActions()); group.addSeparator();/*w w w. ja v a 2 s . c o m*/ ToolWindowType type = myManager.getToolWindow().getType(); if (type == ToolWindowType.DOCKED) { group.add(myToggleAutoHideModeAction); group.add(myToggleDockModeAction); group.add(myToggleFloatingModeAction); group.add(myToggleSideModeAction); } else if (type == ToolWindowType.FLOATING) { group.add(myToggleAutoHideModeAction); group.add(myToggleFloatingModeAction); } else if (type == ToolWindowType.SLIDING) { group.add(myToggleDockModeAction); group.add(myToggleFloatingModeAction); } return group; }
From source file:com.intellij.ide.actions.ToggleDockModeAction.java
License:Apache License
public boolean isSelected(AnActionEvent event) { Project project = CommonDataKeys.PROJECT.getData(event.getDataContext()); if (project == null) { return false; }/* www . ja v a 2 s . co m*/ ToolWindowManager windowManager = ToolWindowManager.getInstance(project); String id = windowManager.getActiveToolWindowId(); if (id == null) { return false; } return ToolWindowType.DOCKED == windowManager.getToolWindow(id).getType(); }
From source file:com.intellij.ide.actions.ToggleDockModeAction.java
License:Apache License
public void setSelected(AnActionEvent event, boolean flag) { Project project = CommonDataKeys.PROJECT.getData(event.getDataContext()); if (project == null) { return;/*w ww. j a v a 2s. c o m*/ } ToolWindowManager windowManager = ToolWindowManager.getInstance(project); String id = windowManager.getActiveToolWindowId(); if (id == null) { return; } ToolWindow toolWindow = windowManager.getToolWindow(id); ToolWindowType type = toolWindow.getType(); if (ToolWindowType.DOCKED == type) { toolWindow.setType(ToolWindowType.SLIDING, null); } else if (ToolWindowType.SLIDING == type) { toolWindow.setType(ToolWindowType.DOCKED, null); } }
From source file:com.jetbrains.edu.learning.EduDocumentationManager.java
License:Apache License
@Override protected void setToolwindowDefaultState() { final Rectangle rectangle = WindowManager.getInstance().getIdeFrame(myProject).suggestChildFrameBounds(); myToolWindow.setDefaultState(ToolWindowAnchor.RIGHT, ToolWindowType.DOCKED, new Rectangle(rectangle.width / 2, rectangle.height)); }
From source file:org.evosuite.intellij.ProjectRegistration.java
License:Open Source License
@Override public void projectOpened() { EvoParameters.getInstance().load(project); ActionManager am = ActionManager.getInstance(); //create the tool window, which will appear in the bottom when an EvoSuite run is started ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project); ToolWindow toolWindow = toolWindowManager.registerToolWindow("EvoSuite", false, ToolWindowAnchor.BOTTOM); toolWindow.setTitle("EvoSuite Console Output"); toolWindow.setType(ToolWindowType.DOCKED, null); //create a console panel console = (ConsoleViewImpl) TextConsoleBuilderFactory.getInstance().createBuilder(project).getConsole(); ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); JComponent consolePanel = console.getComponent(); IntelliJNotifier notifier = IntelliJNotifier.registerNotifier(project, "EvoSuite Plugin", console); //create left-toolbar with stop button DefaultActionGroup buttonGroup = new DefaultActionGroup(); buttonGroup.add(new StopEvoAction(notifier)); ActionToolbar viewToolbar = am.createActionToolbar("EvoSuite.ConsoleToolbar", buttonGroup, false); JComponent toolBarPanel = viewToolbar.getComponent(); JPanel panel = new JPanel(); panel.setLayout(new BorderLayout()); panel.add(toolBarPanel, BorderLayout.WEST); panel.add(consolePanel, BorderLayout.CENTER); //Content content = contentFactory.createContent(consolePanel, "", false); Content content = contentFactory.createContent(panel, "", false); toolWindow.getContentManager().addContent(content); }
From source file:org.sonarlint.intellij.ui.SonarLintToolWindowFactory.java
License:Open Source License
@Override public void createToolWindowContent(Project project, ToolWindow toolWindow) { addIssuesTab(project, toolWindow);//from ww w . ja v a 2 s . c o m addLogTab(project, toolWindow); toolWindow.setType(ToolWindowType.DOCKED, null); }
From source file:org.twodividedbyzero.idea.findbugs.core.FindBugsPluginImpl.java
License:Open Source License
private void initToolWindow() { final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(_project); _toolWindow = toolWindowManager.registerToolWindow(FindBugsPluginConstants.TOOL_WINDOW_ID, false, ToolWindowAnchor.BOTTOM);// w w w . j a v a 2 s.c o m _toolWindow.setTitle(FindBugsPluginConstants.TOOL_WINDOW_ID); _toolWindow.setType(ToolWindowType.DOCKED, null); final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance(); final JComponent toolWindowPanel = new ToolWindowPanel(_project, _toolWindow); final Content content = contentFactory.createContent(toolWindowPanel, "FindBugs Analysis Results", false); _toolWindow.getContentManager().addContent(content); _toolWindow.setIcon(GuiResources.FINDBUGS_ICON_13X13); }