Options
All
  • Public
  • Public/Protected
  • All
Menu

Class GitRepositoryProvider

Hierarchy

  • GitRepositoryProvider

Index

Constructors

Properties

allRepoStorageKey: "theia-git-all-repositories" = 'theia-git-all-repositories'
commitMessageValidator: GitCommitMessageValidator
fileService: FileService
git: Git
lazyRefresh: (() => undefined | Promise<void>) = ...

Type declaration

    • (): undefined | Promise<void>
    • Returns undefined | Promise<void>

onDidChangeRepositoryEmitter: Emitter<undefined | Repository> = ...
scmProviderFactory: GitScmProvider.Factory
scmService: ScmService
selectedRepoStorageKey: "theia-git-selected-repository" = 'theia-git-selected-repository'
storageService: StorageService
workspaceService: WorkspaceService

Accessors

  • get onDidChangeRepository(): Event<undefined | Repository>
  • get selectedRepository(): undefined | Repository
  • set selectedRepository(repository: undefined | Repository): void
  • Returns with the previously selected repository, or if no repository has been selected yet, it picks the first available repository from the backend and sets it as the selected one and returns with that. If no repositories are available, returns undefined.

    Returns undefined | Repository

  • Sets the selected repository, but do nothing if the given repository is not a Git repository registered with the SCM service. We must be sure not to clear the selection if the selected repository is managed by an SCM other than Git.

    Parameters

    Returns void

Methods

  • doInit(): Promise<void>
  • fireDidChangeRepository(repository: undefined | Repository): void
  • init(): void
  • toGitRepository(scmRepository: undefined | ScmRepository): undefined | Repository
  • toGitScmProvider(scmRepository: undefined | ScmRepository): undefined | GitScmProvider
  • toGitScmRepository(scmRepository: undefined | ScmRepository): undefined | GitScmRepository
  • toScmRepository(repository: undefined | Repository): undefined | ScmRepository
  • updateRepositories(repositories: Repository[]): void