void () { setState(State.Loading); var selectedRemoteRepository = model.getRemoteRepository(); Promise<Collection<String>> promise = selectedRemoteRepository != null ? JarRepositoryManager.getAvailableVersions(project, repositoryLibraryDescription, List.of(selectedRemoteRepository)) : JarRepositoryManager.getAvailableVersions(project, repositoryLibraryDescription); promise.onSuccess(result -> versionsLoaded(new ArrayList<>(result))); }