private static @Nullable ToolWindowManager getToolWindowManager(@NotNull AnActionEvent e) {
    Project project = e.getProject();
    return (project == null || project.isDisposed()) ? null : ToolWindowManager.getInstance(project);
  }
private static @Nullable ToolWindowManager getToolWindowManager(@NotNull AnActionEvent e)