mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 02:28:34 +01:00
SCMInput enablement proposed api (#150270)
This commit is contained in:
@@ -1187,6 +1187,7 @@ export interface MainThreadSCMShape extends IDisposable {
|
||||
|
||||
$setInputBoxValue(sourceControlHandle: number, value: string): void;
|
||||
$setInputBoxPlaceholder(sourceControlHandle: number, placeholder: string): void;
|
||||
$setInputBoxEnablement(sourceControlHandle: number, enabled: boolean): void;
|
||||
$setInputBoxVisibility(sourceControlHandle: number, visible: boolean): void;
|
||||
$showValidationMessage(sourceControlHandle: number, message: string | IMarkdownString, type: InputValidationType): void;
|
||||
$setValidationProviderIsEnabled(sourceControlHandle: number, enabled: boolean): void;
|
||||
|
||||
@@ -249,6 +249,25 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox {
|
||||
this.#proxy.$setValidationProviderIsEnabled(this._sourceControlHandle, !!fn);
|
||||
}
|
||||
|
||||
private _enabled: boolean = true;
|
||||
|
||||
get enabled(): boolean {
|
||||
checkProposedApiEnabled(this._extension, 'scmInput');
|
||||
return this._enabled;
|
||||
}
|
||||
|
||||
set enabled(enabled: boolean) {
|
||||
checkProposedApiEnabled(this._extension, 'scmInput');
|
||||
enabled = !!enabled;
|
||||
|
||||
if (this._enabled === enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._enabled = enabled;
|
||||
this.#proxy.$setInputBoxEnablement(this._sourceControlHandle, enabled);
|
||||
}
|
||||
|
||||
private _visible: boolean = true;
|
||||
|
||||
get visible(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user