void (@NotNull AnActionEvent event) { DataContext dataContext = event.getDataContext(); ConfigurationContext context = ConfigurationContext.getFromEvent(event); Presentation presentation = event.getPresentation(); RunnerAndConfigurationSettings existing = findExisting(context); RunnerAndConfigurationSettings configuration = existing; if (configuration == null) { configuration = context.getConfiguration(); } if (configuration == null){ presentation.setEnabledAndVisible(false); presentation.setPerformGroup(false); } else{ isDumbAware = configuration.getType().isDumbAware(); presentation.setEnabledAndVisible(true); VirtualFile vFile = dataContext.getData(CommonDataKeys.VIRTUAL_FILE); if (vFile != null) { RunLineMarkerProvider.markRunnable(vFile, true); } final List<ConfigurationFromContext> fromContext = getConfigurationsFromContext(context); if (existing == null && fromContext.isEmpty()) { presentation.setEnabledAndVisible(false); presentation.setPerformGroup(false); return; } if ((existing == null || dataContext.getData(ExecutorAction.getOrderKey()) != null) && !fromContext.isEmpty()) { ConfigurationFromContext configurationFromContext = getOrderedConfiguration(dataContext, fromContext); configuration = configurationFromContext.getConfigurationSettings(); context.setConfiguration(configurationFromContext.getConfigurationSettings()); } final String name = suggestRunActionName(configuration.getConfiguration()); boolean performGroup = existing != null || fromContext.size() <= 1 || dataContext.getData(ExecutorAction.getOrderKey()) != null; updatePresentation(presentation, performGroup ? name : "", context); presentation.setPerformGroup(performGroup); } }