void (@NotNull AnActionEvent e) { List<RunContentDescriptor> descriptors = new ArrayList<>(REGISTRY); for (RunContentDescriptor descriptor : descriptors) { if (descriptor.getComponent() == null) { REGISTRY.remove(descriptor); } else { Project project = e.getProject(); if (project != null) { RunContentManager runContentManager = RunContentManager.getInstance(project); // check if the descriptor belongs to the current project if (runContentManager.getToolWindowByDescriptor(descriptor) != null) { ExecutionUtil.restart(descriptor); } } } } }