void (final RunnerAndConfigurationSettings configuration, ConfigurationContext context) { final RunManagerEx runManager = (RunManagerEx)context.getRunManager(); if (configuration == null) { RunnerAndConfigurationSettings contextConfiguration = context.getConfiguration(); if (contextConfiguration == null) { return; } runManager.setTemporaryConfiguration(contextConfiguration); perform(runManager, contextConfiguration, context.getDataContext()); } else { DataContext dataContext = context.getDefaultDataContext(); ReadAction .nonBlocking(() -> findExisting(context)) .finishOnUiThread(ModalityState.nonModal(), existingConfiguration -> { if (configuration != existingConfiguration) { RunConfigurationOptionUsagesCollector.logAddNew(context.getProject(), configuration.getType().getId(), context.getPlace()); runManager.setTemporaryConfiguration(configuration); perform(runManager, configuration, dataContext); } else { perform(runManager, configuration, dataContext); } }) .submit(AppExecutorUtil.getAppExecutorService()); } }