Theia API Documentation v1.65.0
    Preparing search index...

    An source control resource state represents the state of an underlying workspace resource within a certain source control group.

    interface SourceControlResourceState {
        command?: Command;
        contextValue?: string;
        decorations?: SourceControlResourceDecorations;
        resourceUri: Uri;
    }
    Index

    Properties

    command?: Command

    The command which should be run when the resource state is open in the Source Control viewlet.

    contextValue?: string

    Context value of the resource state. This can be used to contribute resource specific actions. For example, if a resource is given a context value as diffable. When contributing actions to scm/resourceState/context using menus extension point, you can specify context value for key scmResourceState in when expressions, like scmResourceState == diffable.

     "contributes": {
    "menus": {
    "scm/resourceState/context": [
    {
    "command": "extension.diff",
    "when": "scmResourceState == diffable"
    }
    ]
    }
    }

    This will show action extension.diff only for resources with contextValue is diffable.

    The decorations for this source control resource state.

    resourceUri: Uri

    The uri of the underlying resource inside the workspace.