Promise<Result> (VirtualFile @NotNull [] files) { if (ApplicationManager.getApplication().isReadAccessAllowed()) { return run(createModulesFilesTask(files)); } ProjectTask task = ReadAction.nonBlocking(() -> this.createModulesFilesTask(files)).executeSynchronously(); return run(task); }