void (@NotNull DataContext dataContext, @NotNull String pattern) { List<String> commands = RunAnythingCache.getInstance(fetchProject(dataContext)).getState().getCommands(); Module module = PlatformCoreDataKeys.MODULE.getData(dataContext); if (module == null) { LOG.info("RunAnything: module hasn't been found, command will be executed in context of 'null' module."); } for (RunAnythingProvider provider : RunAnythingProvider.EP_NAME.getExtensions()) { Object value = provider.findMatchingValue(dataContext, pattern); if (value != null) { //noinspection unchecked provider.execute(dataContext, value); commands.remove(pattern); commands.add(pattern); break; } } }