本文整理汇总了Java中com.intellij.openapi.wm.ToolWindowManager.getActiveToolWindowId方法的典型用法代码示例。如果您正苦于以下问题:Java ToolWindowManager.getActiveToolWindowId方法的具体用法?Java ToolWindowManager.getActiveToolWindowId怎么用?Java ToolWindowManager.getActiveToolWindowId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.openapi.wm.ToolWindowManager
的用法示例。
在下文中一共展示了ToolWindowManager.getActiveToolWindowId方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
@Override
public final void update(AnActionEvent e) {
super.update(e);
Presentation presentation = e.getPresentation();
Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr=ToolWindowManager.getInstance(project);
String id=mgr.getActiveToolWindowId();
if (id == null) {
presentation.setEnabled(false);
return;
}
ToolWindow window = mgr.getToolWindow(id);
if (window == null) {
presentation.setEnabled(false);
return;
}
update(window, presentation);
}
示例2: update
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public void update(AnActionEvent event) {
super.update(event);
Presentation presentation = event.getPresentation();
if (SystemInfo.isMac) {
presentation.setEnabledAndVisible(false);
return;
}
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr = ToolWindowManager.getInstance(project);
String id = mgr.getActiveToolWindowId();
presentation.setEnabled(id != null && mgr.getToolWindow(id).isAvailable());
}
示例3: setSelected
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public void setSelected(AnActionEvent event,boolean flag){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return;
}
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);
}
}
示例4: update
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public void update(AnActionEvent event){
super.update(event);
Presentation presentation = event.getPresentation();
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr=ToolWindowManager.getInstance(project);
String id=mgr.getActiveToolWindowId();
if(id==null){
presentation.setEnabled(false);
return;
}
ToolWindow toolWindow=mgr.getToolWindow(id);
presentation.setEnabled(toolWindow.isAvailable()
&& toolWindow.getType() != ToolWindowType.FLOATING
&& toolWindow.getType() != ToolWindowType.WINDOWED);
}
示例5: isSelected
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public boolean isSelected(AnActionEvent event){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return false;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id=windowManager.getActiveToolWindowId();
if(id==null){
return false;
}
return ToolWindowType.FLOATING==windowManager.getToolWindow(id).getType();
}
示例6: update
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public void update(AnActionEvent event){
super.update(event);
Presentation presentation = event.getPresentation();
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager mgr=ToolWindowManager.getInstance(project);
String id=mgr.getActiveToolWindowId();
presentation.setEnabled(id!=null&&mgr.getToolWindow(id).isAvailable());
}
示例7: isSelected
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
@Override
public final boolean isSelected(AnActionEvent e) {
Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
if (project == null || project.isDisposed()) {
return false;
}
ToolWindowManager mgr=ToolWindowManager.getInstance(project);
String id=mgr.getActiveToolWindowId();
if(id==null){
return false;
}
return isSelected(mgr.getToolWindow(id));
}
示例8: isSelected
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public boolean isSelected(AnActionEvent event) {
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return false;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id = windowManager.getActiveToolWindowId();
if (id == null) {
return false;
}
return ToolWindowType.WINDOWED == windowManager.getToolWindow(id).getType();
}
示例9: isSelected
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public boolean isSelected(AnActionEvent event){
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
return false;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id=windowManager.getActiveToolWindowId();
if(id==null){
return false;
}
return ToolWindowType.DOCKED==windowManager.getToolWindow(id).getType();
}
示例10: update
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public void update(AnActionEvent event){
Presentation presentation = event.getPresentation();
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id = windowManager.getActiveToolWindowId();
presentation.setEnabled(ToolWindowId.COMMANDER.equals(id));
}
示例11: update
import com.intellij.openapi.wm.ToolWindowManager; //导入方法依赖的package包/类
public void update(AnActionEvent event){
Presentation presentation = event.getPresentation();
Project project = CommonDataKeys.PROJECT.getData(event.getDataContext());
if (project == null) {
presentation.setEnabled(false);
return;
}
ToolWindowManager windowManager = ToolWindowManager.getInstance(project);
String id = windowManager.getActiveToolWindowId();
boolean value=ToolWindowId.COMMANDER.equals(id);
presentation.setEnabled(value);
}