[vcs] Documentation

This commit is contained in:
Ivan Semenov
2018-05-18 18:10:28 +03:00
parent 8ee5346dfe
commit 57647bb27a
2 changed files with 19 additions and 0 deletions
@@ -5,10 +5,19 @@ import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a remote service that hosts VCS repositories, e.g GitHub, BitBucket
*/
public interface RepositoryHostingService {
/**
* @return service name that will be used in UI actions
*/
@NotNull
String getServiceDisplayName();
/**
* @see RepositoryListLoader
*/
@Nullable
default RepositoryListLoader getRepositoryListLoader(@NotNull Project project) {return null;}
}
@@ -9,9 +9,19 @@ import org.jetbrains.annotations.NotNull;
import java.util.List;
/**
* Allows to query remote service for a list of available VCS repositories with the current IDEA settings.
* Can be used to suggest the list of repositories that can be checked out.
*/
public interface RepositoryListLoader {
/**
* Check if this loader is configured (e.g. has necessary authentication data)
*/
boolean isEnabled();
/**
* Prompt user for additional configuration (e.g. provide credentials)
*/
boolean enable();
@CalledInBackground