Java Code Examples for com.intellij.openapi.wm.ToolWindow#isActive()
The following examples show how to use
com.intellij.openapi.wm.ToolWindow#isActive() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VcsShowToolWindowTabAction.java From consulo with Apache License 2.0 | 6 votes |
@Override public void actionPerformed(@Nonnull AnActionEvent e) { final Project project = e.getRequiredData(CommonDataKeys.PROJECT); ToolWindow toolWindow = assertNotNull(getToolWindow(project)); final ChangesViewContentManager changesViewContentManager = (ChangesViewContentManager)ChangesViewContentManager.getInstance(project); final String tabName = getTabName(); boolean contentAlreadySelected = changesViewContentManager.isContentSelected(tabName); if (toolWindow.isActive() && contentAlreadySelected) { toolWindow.hide(null); } else { Runnable runnable = contentAlreadySelected ? null : new Runnable() { @Override public void run() { changesViewContentManager.selectContent(tabName, true); } }; toolWindow.activate(runnable, true, true); } }
Example 2
Source File: ReactNativeConsole.java From react-native-console with BSD 3-Clause "New" or "Revised" License | 5 votes |
public void initAndActiveRunRefresh(InputEvent e) { ToolWindow toolWindow = getToolWindow(); if (!toolWindow.isActive()) { toolWindow.activate(() -> ActionManager.getInstance().tryToExecute(new AndroidRefreshAction(ReactNativeConsole.this), e, null, ActionPlaces.UNKNOWN, true)); } else { ActionManager.getInstance().tryToExecute(new AndroidRefreshAction(this), e, null, ActionPlaces.UNKNOWN, true); } }
Example 3
Source File: FreelineTerminal.java From freeline with BSD 3-Clause "New" or "Revised" License | 5 votes |
public void initAndExecute(final String[] shell) { ToolWindow toolWindow = getToolWindow(); if (toolWindow.isActive()) { executeShell(shell); } else { toolWindow.activate(new Runnable() { @Override public void run() { executeShell(shell); } }); } }
Example 4
Source File: ConsoleToolWindow.java From jetbrains-plugin-graph-database-support with Apache License 2.0 | 5 votes |
public static void ensureOpen(Project project) { ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project); ToolWindow toolWindow = toolWindowManager.getToolWindow(GraphConstants.ToolWindow.CONSOLE_TOOL_WINDOW); if (!toolWindow.isActive()) { toolWindow.activate(null, false); return; } if (!toolWindow.isVisible()) { toolWindow.show(null); } }
Example 5
Source File: UsageViewManagerImpl.java From consulo with Apache License 2.0 | 5 votes |
void showToolWindow(boolean activateWindow) { ToolWindow toolWindow = ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.FIND); toolWindow.show(null); if (activateWindow && !toolWindow.isActive()) { toolWindow.activate(null); } }
Example 6
Source File: ReactNativeConsole.java From react-native-console with BSD 3-Clause "New" or "Revised" License | 4 votes |
public void initAndActive() { ToolWindow toolWindow = getToolWindow(); if (!toolWindow.isActive()) { toolWindow.activate(null); } }