當前位置: 首頁>>代碼示例>>Java>>正文


Java ToolWindow.isActive方法代碼示例

本文整理匯總了Java中com.intellij.openapi.wm.ToolWindow.isActive方法的典型用法代碼示例。如果您正苦於以下問題:Java ToolWindow.isActive方法的具體用法?Java ToolWindow.isActive怎麽用?Java ToolWindow.isActive使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.intellij.openapi.wm.ToolWindow的用法示例。


在下文中一共展示了ToolWindow.isActive方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initAndExecute

import com.intellij.openapi.wm.ToolWindow; //導入方法依賴的package包/類
public void initAndExecute(final String workDir,final String[] shell) {
    ToolWindow toolWindow = getToolWindow();
    if (toolWindow.isActive()) {
        if (workDir != null) {
            executeShell("cd " + Utils.formatPath(workDir));
        }
        executeShell(shell);
    } else {
        toolWindow.activate(new Runnable() {
            @Override
            public void run() {
                if (workDir != null) {
                    executeShell("cd " + Utils.formatPath(workDir));
                }
                executeShell(shell);
            }
        });
    }
}
 
開發者ID:typ0520,項目名稱:fastdex,代碼行數:20,代碼來源:FastdexTerminal.java

示例2: initAndActiveRunRefresh

import com.intellij.openapi.wm.ToolWindow; //導入方法依賴的package包/類
public void initAndActiveRunRefresh(InputEvent e) {
    ToolWindow toolWindow = getToolWindow();
    if (!toolWindow.isActive()) {
        toolWindow.activate(new Runnable() {
            @Override
            public void run() {
                ActionManager.getInstance().tryToExecute(new AndroidRefreshAction(ReactNativeConsole.this), e, null, ActionPlaces.UNKNOWN, true);
            }
        });
    } else {
        ActionManager.getInstance().tryToExecute(new AndroidRefreshAction(this), e, null, ActionPlaces.UNKNOWN, true);
    }
}
 
開發者ID:beansoftapp,項目名稱:react-native-console,代碼行數:14,代碼來源:ReactNativeConsole.java

示例3: initAndExecute

import com.intellij.openapi.wm.ToolWindow; //導入方法依賴的package包/類
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);
            }
        });
    }
}
 
開發者ID:beansoftapp,項目名稱:react-native-console,代碼行數:14,代碼來源:ReactNativeTerminal.java

示例4: showToolWindow

import com.intellij.openapi.wm.ToolWindow; //導入方法依賴的package包/類
void showToolWindow(boolean activateWindow) {
  ToolWindow toolWindow = ToolWindowManager.getInstance(myProject).getToolWindow(ToolWindowId.FIND);
  toolWindow.show(null);
  if (activateWindow && !toolWindow.isActive()) {
    toolWindow.activate(null);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:8,代碼來源:UsageViewManagerImpl.java

示例5: actionPerformed

import com.intellij.openapi.wm.ToolWindow; //導入方法依賴的package包/類
public void actionPerformed(final AnActionEvent e) {
  Project project = getEventProject(e);
  if (project == null) return;
  ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
  final ToolWindow window = windowManager.getToolWindow(myToolWindowId);
  InputEvent event = e.getInputEvent();
  Runnable run = null;
  if (event instanceof KeyEvent && event.isShiftDown()) {
    final Content[] contents = window.getContentManager().getContents();
    if (contents.length > 0 && window.getContentManager().getSelectedContent() != contents[0]) {
      run = new Runnable() {
        public void run() {
          window.getContentManager().setSelectedContent(contents[0], true, true);
        }
      };
    }
  }

  if (windowManager.isEditorComponentActive() || !myToolWindowId.equals(windowManager.getActiveToolWindowId()) || run != null) {
    if (run != null && window.isActive()) {
      run.run();
    } else {
      window.activate(run);
    }
  } else {
    windowManager.getToolWindow(myToolWindowId).hide(null);
  }
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:29,代碼來源:ActivateToolWindowAction.java

示例6: initAndActive

import com.intellij.openapi.wm.ToolWindow; //導入方法依賴的package包/類
public void initAndActive() {
    ToolWindow toolWindow = getToolWindow();
    if (!toolWindow.isActive()) {
        toolWindow.activate(null);
    }
}
 
開發者ID:beansoftapp,項目名稱:react-native-console,代碼行數:7,代碼來源:ReactNativeConsole.java


注:本文中的com.intellij.openapi.wm.ToolWindow.isActive方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。