private static FileChooserDescriptor getFileChooserDescriptor(
    @NotNull ExternalSystemManager<?, ?, ?, ?, ?> manager,
    @NotNull Project project,
    @NotNull ProjectSystemId externalSystemId
  ) {
    ExternalSystemUnlinkedProjectAware unlinkedProjectAware = ExternalSystemUnlinkedProjectAware.getInstance(externalSystemId);
    if (unlinkedProjectAware == null) {
      return manager.getExternalProjectDescriptor();
    }
    return new FileChooserDescriptor(true, true, false, false, false, false)
      .withFileFilter(virtualFile -> unlinkedProjectAware.isBuildFile(project, virtualFile));
  }
private static FileChooserDescriptor getFileChooserDescriptor(
    @NotNull ExternalSystemManager<?, ?, ?, ?, ?> manager,
    @NotNull Project project,
    @NotNull ProjectSystemId externalSystemId
  )