boolean (@NotNull AnActionEvent event) { Project project = event.getProject(); 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(); }