List<String> (@NotNull ThrowableComputable<? extends List<String>, IOException> query, @NotNull Project project) { try { if (ApplicationManager.getApplication().isReadAccessAllowed()) { List<String> result = ProgressManager.getInstance().run( new Task.WithResult<List<String>, IOException>(project, ExecutionBundle.message("searching.for.affected.file.paths"), true) { @Override protected List<String> compute(@NotNull ProgressIndicator indicator) throws IOException { return query.compute(); } }); return result == null ? Collections.emptyList() : result; } return query.compute(); } catch (IOException e) { LOG.warn("Can't execute remote query", e); return Collections.emptyList(); } }