Example usage for com.intellij.openapi.wm ToolWindowId COMMANDER

List of usage examples for com.intellij.openapi.wm ToolWindowId COMMANDER

Introduction

In this page you can find the example usage for com.intellij.openapi.wm ToolWindowId COMMANDER.

Prototype

String COMMANDER

To view the source code for com.intellij.openapi.wm ToolWindowId COMMANDER.

Click Source Link

Usage

From source file:com.intellij.ide.actions.CloneElementAction.java

License:Apache License

@Override
protected void updateForToolWindow(String id, DataContext dataContext, Presentation presentation) {
    // work only with single selection
    PsiElement[] elements = LangDataKeys.PSI_ELEMENT_ARRAY.getData(dataContext);
    presentation.setEnabled(elements != null && elements.length == 1 && CopyHandler.canClone(elements));
    presentation.setVisible(true);/*from  w w  w. ja v  a2  s.co  m*/
    if (!ToolWindowId.COMMANDER.equals(id)) {
        presentation.setVisible(false);
    }
}