mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-20 16:49:06 +01:00
Move code action documentation contribution point to come from metadata
For #86788
This commit is contained in:
@@ -1576,9 +1576,17 @@ export class ExtHostLanguageFeatures implements extHostProtocol.ExtHostLanguageF
|
||||
// --- quick fix
|
||||
|
||||
registerCodeActionProvider(extension: IExtensionDescription, selector: vscode.DocumentSelector, provider: vscode.CodeActionProvider, metadata?: vscode.CodeActionProviderMetadata): vscode.Disposable {
|
||||
const store = new DisposableStore();
|
||||
const handle = this._addNewAdapter(new CodeActionAdapter(this._documents, this._commands.converter, this._diagnostics, provider, this._logService, extension, this._apiDeprecation), extension);
|
||||
this._proxy.$registerQuickFixSupport(handle, this._transformDocumentSelector(selector), (metadata && metadata.providedCodeActionKinds) ? metadata.providedCodeActionKinds.map(kind => kind.value) : undefined);
|
||||
return this._createDisposable(handle);
|
||||
this._proxy.$registerQuickFixSupport(handle, this._transformDocumentSelector(selector), {
|
||||
providedKinds: metadata?.providedCodeActionKinds?.map(kind => kind.value),
|
||||
documentation: metadata?.documentation?.map(x => ({
|
||||
kind: x.kind.value,
|
||||
command: this._commands.converter.toInternal(x.command, store),
|
||||
}))
|
||||
});
|
||||
store.add(this._createDisposable(handle));
|
||||
return store;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user