Adds proposed api checks and splits proposal

This commit is contained in:
Eric Amodio 2021-04-09 15:16:48 -04:00
parent b8afc6415b
commit d993d5d555
2 changed files with 16 additions and 5 deletions

View file

@ -727,11 +727,6 @@ declare module 'vscode' {
*/
export interface SourceControlInputBox {
/**
* Sets focus to the input.
*/
focus(): void;
/**
* Shows a transient contextual message on the input.
*/
@ -2921,4 +2916,16 @@ declare module 'vscode' {
export function registerPortAttributesProvider(portSelector: { pid?: number, portRange?: [number, number], commandMatcher?: RegExp }, provider: PortAttributesProvider): Disposable;
}
//#endregion
// region https://github.com/microsoft/vscode/issues/119904 @eamodio
export interface SourceControlInputBox {
/**
* Sets focus to the input.
*/
focus(): void;
}
//#endregion
}

View file

@ -260,6 +260,8 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox {
}
focus(): void {
checkProposedApiEnabled(this._extension);
if (!this._visible) {
this.visible = true;
}
@ -268,6 +270,8 @@ export class ExtHostSCMInputBox implements vscode.SourceControlInputBox {
}
showValidationMessage(message: string, type: vscode.SourceControlInputBoxValidationType) {
checkProposedApiEnabled(this._extension);
this._proxy.$showValidationMessage(this._sourceControlHandle, message, type as any);
}