Theia API Documentation v1.65.0
    Preparing search index...
    interface SourceControl {
        acceptInputCommand?: Command;
        commitTemplate?: string;
        contextValue?: string;
        count?: number;
        id: string;
        inputBox: SourceControlInputBox;
        label: string;
        onDidChangeSelection: Event<boolean>;
        onDidDisposeParent: Event<void>;
        quickDiffProvider?: QuickDiffProvider;
        rootUri: undefined | Uri;
        selected: boolean;
        statusBarCommands?: Command[];
        createResourceGroup(id: string, label: string): SourceControlResourceGroup;
        dispose(): void;
    }
    Index

    Properties

    acceptInputCommand?: Command

    Optional accept input command.

    This command will be invoked when the user accepts the value in the Source Control input.

    commitTemplate?: string

    Optional commit template string.

    The Source Control viewlet will populate the Source Control input with this value when appropriate.

    contextValue?: string

    Context value of the source control. This can be used to contribute source control specific actions. For example, if a source control is given a context value of repository, when contributing actions to scm/sourceControl/context using menus extension point, you can specify context value for key scmProviderContext in when expressions, like scmProviderContext == repository.

    "contributes": {
    "menus": {
    "scm/sourceControl/context": [
    {
    "command": "extension.gitAction",
    "when": "scmProviderContext == repository"
    }
    ]
    }
    }

    This will show action extension.gitAction only for source controls with contextValue equal to repository.

    count?: number

    The UI-visible count of resource states of this source control.

    Equals to the total number of resource state of this source control, if undefined.

    id: string

    The id of this source control.

    The input box for this source control.

    label: string

    The human-readable label of this source control.

    onDidChangeSelection: Event<boolean>

    An event signaling when the selection state changes.

    onDidDisposeParent: Event<void>

    Fired when the parent source control is disposed.

    quickDiffProvider?: QuickDiffProvider

    An optional quick diff provider.

    rootUri: undefined | Uri

    The (optional) Uri of the root of this source control.

    selected: boolean

    Whether the source control is selected.

    statusBarCommands?: Command[]

    Optional status bar commands.

    These commands will be displayed in the editor's status bar.

    Methods