private boolean setupRootAndAnnotateExternally(@NotNull OrderEntry entry,
                                                 @NotNull Project project,
                                                 @NotNull ExternalAnnotation annotation) {
    final FileChooserDescriptor descriptor = FileChooserDescriptorFactory.createSingleFolderDescriptor();
    descriptor.setTitle(JavaBundle.message("external.annotations.root.chooser.title", entry.getPresentableName()));
    descriptor.setDescription(JavaBundle.message("external.annotations.root.chooser.description"));
    descriptor.setForcedToUseIdeaFileChooser(true);
    final VirtualFile newRoot = FileChooser.chooseFile(descriptor, project, null);
    if (newRoot == null) {
      notifyAfterAnnotationChanging(annotation.getOwner(), annotation.getAnnotationFQName(), false);
      return false;
    }
    WriteCommandAction.writeCommandAction(project).run(() -> appendChosenAnnotationsRoot(entry, newRoot));
    annotateExternally(newRoot, annotation);
    return true;
  }
private boolean setupRootAndAnnotateExternally(@NotNull OrderEntry entry,
                                                 @NotNull Project project,
                                                 @NotNull ExternalAnnotation annotation)