当前位置: 首页>>代码示例>>Java>>正文


Java ToolWindowManager.getActiveToolWindowId方法代码示例

本文整理汇总了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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:BaseToolWindowToggleAction.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:ToggleWindowedModeAction.java

示例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);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ToggleDockModeAction.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:ToggleDockModeAction.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleFloatingModeAction.java

示例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());
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleFloatingModeAction.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:14,代码来源:BaseToolWindowToggleAction.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleWindowedModeAction.java

示例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();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:ToggleDockModeAction.java

示例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));
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:12,代码来源:SwapPanelsAction.java

示例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);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:SyncViewsAction.java


注:本文中的com.intellij.openapi.wm.ToolWindowManager.getActiveToolWindowId方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。