Skip to content

Commit

Permalink
Add capability information to the metamodel
Browse files Browse the repository at this point in the history
  • Loading branch information
MariaSolOs committed Nov 30, 2024
1 parent 906f5fb commit c10685b
Show file tree
Hide file tree
Showing 18 changed files with 33 additions and 2 deletions.
1 change: 1 addition & 0 deletions protocol/src/common/protocol.callHierarchy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export namespace CallHierarchyPrepareRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<CallHierarchyPrepareParams, CallHierarchyItem[] | null, never, void, CallHierarchyRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<CallHierarchyPrepareParams, CallHierarchyItem[] | null, void>;
export const capabilities: { client: 'textDocument.callHierarchy'; server: 'callHierarchyProvider' } = { client: 'textDocument.callHierarchy', server: 'callHierarchyProvider' };
}

/**
Expand Down
1 change: 1 addition & 0 deletions protocol/src/common/protocol.colorProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ export namespace DocumentColorRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<DocumentColorParams, ColorInformation[], ColorInformation[], void, DocumentColorRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<DocumentColorParams, ColorInformation[], void>;
export const capabilities: { client: 'textDocument.colorProvider'; server: 'colorProvider' } = { client: 'textDocument.colorProvider', server: 'colorProvider' };
}

/**
Expand Down
1 change: 1 addition & 0 deletions protocol/src/common/protocol.configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export namespace ConfigurationRequest {
export const type = new ProtocolRequestType<ConfigurationParams, LSPAny[], never, void, void>(method);
export type HandlerSignature = RequestHandler<ConfigurationParams, LSPAny[], void>;
export type MiddlewareSignature = (params: ConfigurationParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<LSPAny[], void>;
export const capabilities: { client: 'workspace.configuration' } = { client: 'workspace.configuration' };
}


Expand Down
1 change: 1 addition & 0 deletions protocol/src/common/protocol.declaration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,4 +52,5 @@ export namespace DeclarationRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<DeclarationParams, Declaration | DeclarationLink[] | null, Location[] | DeclarationLink[], void, DeclarationRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<DeclarationParams, Declaration | DeclarationLink[] | null, void>;
export const capabilities: { client: 'textDocument.declaration'; server: 'declarationProvider' } = { client: 'textDocument.declaration', server: 'declarationProvider' };
}
4 changes: 3 additions & 1 deletion protocol/src/common/protocol.diagnostic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import type {
DiagnosticsCapabilities
} from './protocol';


/**
* Client capabilities specific to diagnostic pull requests.
*
Expand Down Expand Up @@ -269,6 +268,7 @@ export namespace DocumentDiagnosticRequest {
export const type = new ProtocolRequestType<DocumentDiagnosticParams, DocumentDiagnosticReport, DocumentDiagnosticReportPartialResult, DiagnosticServerCancellationData, DiagnosticRegistrationOptions>(method);
export const partialResult = new ProgressType<DocumentDiagnosticReportPartialResult>();
export type HandlerSignature = RequestHandler<DocumentDiagnosticParams, DocumentDiagnosticReport, void>;
export const capabilities: { client: 'textDocument.diagnostic'; server: 'diagnosticProvider' } = { client: 'textDocument.diagnostic', server: 'diagnosticProvider' };
}

/**
Expand Down Expand Up @@ -382,6 +382,7 @@ export namespace WorkspaceDiagnosticRequest {
export const type = new ProtocolRequestType<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport, WorkspaceDiagnosticReportPartialResult, DiagnosticServerCancellationData, void>(method);
export const partialResult = new ProgressType<WorkspaceDiagnosticReportPartialResult>();
export type HandlerSignature = RequestHandler<WorkspaceDiagnosticParams, WorkspaceDiagnosticReport | null, void>;
export const capabilities: { client: 'workspace.diagnostics'; server: 'diagnosticProvider.workspaceDiagnostics' } = { client: 'workspace.diagnostics', server: 'diagnosticProvider.workspaceDiagnostics' };
}

/**
Expand All @@ -394,4 +395,5 @@ export namespace DiagnosticRefreshRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType0<void, void, void, void>(method);
export type HandlerSignature = RequestHandler0<void, void>;
export const capabilities: { client: 'workspace.diagnostics.refreshSupport' } = { client: 'workspace.diagnostics.refreshSupport' };
}
6 changes: 6 additions & 0 deletions protocol/src/common/protocol.fileOperations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -292,6 +292,7 @@ export namespace WillCreateFilesRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<CreateFilesParams, WorkspaceEdit | null, never, void, FileOperationRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<CreateFilesParams, WorkspaceEdit | undefined | null, void>;
export const capabilities: { client: 'workspace.fileOperations.willCreate'; server: 'workspace.fileOperations.willCreate' } = { client: 'workspace.fileOperations.willCreate', server: 'workspace.fileOperations.willCreate' };
}

/**
Expand All @@ -305,6 +306,7 @@ export namespace DidCreateFilesNotification {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolNotificationType<CreateFilesParams, FileOperationRegistrationOptions>(method);
export type HandlerSignature = NotificationHandler<CreateFilesParams>;
export const capabilities: { client: 'workspace.fileOperations.didCreate'; server: 'workspace.fileOperations.didCreate' } = { client: 'workspace.fileOperations.didCreate', server: 'workspace.fileOperations.didCreate' };
}

/**
Expand All @@ -318,6 +320,7 @@ export namespace WillRenameFilesRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<RenameFilesParams, WorkspaceEdit | null, never, void, FileOperationRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<RenameFilesParams, WorkspaceEdit | undefined | null, void>;
export const capabilities: { client: 'workspace.fileOperations.willRename'; server: 'workspace.fileOperations.willRename' } = { client: 'workspace.fileOperations.willRename', server: 'workspace.fileOperations.willRename' };
}

/**
Expand All @@ -331,6 +334,7 @@ export namespace DidRenameFilesNotification {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolNotificationType<RenameFilesParams, FileOperationRegistrationOptions>(method);
export type HandlerSignature = NotificationHandler<RenameFilesParams>;
export const capabilities: { client: 'workspace.fileOperations.didRename'; server: 'workspace.fileOperations.didRename' } = { client: 'workspace.fileOperations.didRename', server: 'workspace.fileOperations.didRename' };
}

/**
Expand All @@ -344,6 +348,7 @@ export namespace DidDeleteFilesNotification {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolNotificationType<DeleteFilesParams, FileOperationRegistrationOptions>(method);
export type HandlerSignature = NotificationHandler<DeleteFilesParams>;
export const capabilities: { client: 'workspace.fileOperations.didDelete'; server: 'workspace.fileOperations.didDelete' } = { client: 'workspace.fileOperations.didDelete', server: 'workspace.fileOperations.didDelete' };
}

/**
Expand All @@ -357,4 +362,5 @@ export namespace WillDeleteFilesRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<DeleteFilesParams, WorkspaceEdit | null, never, void, FileOperationRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<DeleteFilesParams, WorkspaceEdit | undefined | null, void>;
export const capabilities: { client: 'workspace.fileOperations.willDelete'; server: 'workspace.fileOperations.willDelete' } = { client: 'workspace.fileOperations.willDelete', server: 'workspace.fileOperations.willDelete' };
}
2 changes: 2 additions & 0 deletions protocol/src/common/protocol.foldingRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ export namespace FoldingRangeRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<FoldingRangeParams, FoldingRange[] | null, FoldingRange[], void, FoldingRangeRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<FoldingRangeParams, FoldingRange[] | null, void>;
export const capabilities: { client: 'textDocument.foldingRange'; server: 'foldingRangeProvider' } = { client: 'textDocument.foldingRange', server: 'foldingRangeProvider' };
}

/**
Expand All @@ -139,4 +140,5 @@ export namespace FoldingRangeRefreshRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType0<void, void, void, void>(method);
export type HandlerSignature = RequestHandler0<void, void>;
export const capabilities: { client: 'workspace.foldingRange.refreshSupport' } = { client: 'workspace.foldingRange.refreshSupport' };
}
1 change: 1 addition & 0 deletions protocol/src/common/protocol.implementation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ export namespace ImplementationRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<ImplementationParams, Definition | DefinitionLink[] | null, Location[] | DefinitionLink[], void, ImplementationRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<ImplementationParams, Definition | DefinitionLink[] | null, void>;
export const capabilities: { client: 'textDocument.implementation'; server: 'implementationProvider' } = { client: 'textDocument.implementation', server: 'implementationProvider' };
}
3 changes: 3 additions & 0 deletions protocol/src/common/protocol.inlayHint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ export namespace InlayHintRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<InlayHintParams, InlayHint[] | null, InlayHint[], void, InlayHintRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<InlayHintParams, InlayHint[] | null, void>;
export const capabilities: { client: 'textDocument.inlayHint'; server: 'inlayHintProvider' } = { client: 'textDocument.inlayHint', server: 'inlayHintProvider' };
}

/**
Expand All @@ -119,6 +120,7 @@ export namespace InlayHintResolveRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<InlayHint, InlayHint, never, void, void>(method);
export type HandlerSignature = RequestHandler<InlayHint, InlayHint, void>;
export const capabilities: { client: 'textDocument.inlayHint.resolveSupport'; server: 'inlayHintProvider.resolveProvider' } = { client: 'textDocument.inlayHint.resolveSupport', server: 'inlayHintProvider.resolveProvider' };
}

/**
Expand All @@ -129,4 +131,5 @@ export namespace InlayHintRefreshRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType0<void, void, void, void>(method);
export type HandlerSignature = RequestHandler0<void, void>;
export const capabilities: { client: 'workspace.inlayHint.refreshSupport' } = { client: 'workspace.inlayHint.refreshSupport' };
}
1 change: 1 addition & 0 deletions protocol/src/common/protocol.inlineCompletion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ export namespace InlineCompletionRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<InlineCompletionParams, InlineCompletionList | InlineCompletionItem[] | null, InlineCompletionItem[], void, InlineCompletionRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<InlineCompletionParams, InlineCompletionList | InlineCompletionItem[] | null, void>;
export const capabilities: { client: 'textDocument.inlineCompletion'; server: 'inlineCompletionProvider' } = { client: 'textDocument.inlineCompletion', server: 'inlineCompletionProvider' };
}
2 changes: 2 additions & 0 deletions protocol/src/common/protocol.inlineValue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export namespace InlineValueRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<InlineValueParams, InlineValue[] | null, InlineValue[], void, InlineValueRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<InlineValueParams, InlineValue[] | null, void>;
export const capabilities: { client: 'textDocument.inlineValue'; server: 'inlineValueProvider' } = { client: 'textDocument.inlineValue', server: 'inlineValueProvider' };
}

/**
Expand All @@ -100,4 +101,5 @@ export namespace InlineValueRefreshRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType0<void, void, void, void>(method);
export type HandlerSignature = RequestHandler0<void, void>;
export const capabilities: { client: 'workspace.inlineValue.refreshSupport' } = { client: 'workspace.inlineValue.refreshSupport' };
}
1 change: 1 addition & 0 deletions protocol/src/common/protocol.linkedEditingRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,5 @@ export namespace LinkedEditingRangeRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<LinkedEditingRangeParams, LinkedEditingRanges | null, void, void, LinkedEditingRangeRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<LinkedEditingRangeParams, LinkedEditingRanges | null, void>;
export const capabilities: { client: 'textDocument.linkedEditingRange'; server: 'linkedEditingRangeProvider' } = { client: 'textDocument.linkedEditingRange', server: 'linkedEditingRangeProvider' };
}
1 change: 1 addition & 0 deletions protocol/src/common/protocol.moniker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,4 +130,5 @@ export namespace MonikerRequest {
export const method: 'textDocument/moniker' = 'textDocument/moniker';
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<MonikerParams, Moniker[] | null, Moniker[], void, MonikerRegistrationOptions>(method);
export const capabilities: { client: 'textDocument.moniker'; server: 'monikerProvider' } = { client: 'textDocument.moniker', server: 'monikerProvider' };
}
1 change: 1 addition & 0 deletions protocol/src/common/protocol.progress.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export namespace WorkDoneProgressCreateRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType<WorkDoneProgressCreateParams, void, never, void, void>(method);
export type HandlerSignature = RequestHandler<WorkDoneProgressCreateParams, void, void>;
export const capabilities: { client: 'window.workDoneProgress' } = { client: 'window.workDoneProgress' };
}

export interface WorkDoneProgressCancelParams {
Expand Down
1 change: 1 addition & 0 deletions protocol/src/common/protocol.selectionRange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@ export namespace SelectionRangeRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<SelectionRangeParams, SelectionRange[] | null, SelectionRange[], void, SelectionRangeRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<SelectionRangeParams, SelectionRange[] | null, void>;
export const capabilities: { client: 'textDocument.selectionRange'; server: 'selectionRangeProvider' } = { client: 'textDocument.selectionRange', server: 'selectionRangeProvider' };
}
4 changes: 4 additions & 0 deletions protocol/src/common/protocol.semanticTokens.ts
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ export namespace SemanticTokensRequest {
export const type = new ProtocolRequestType<SemanticTokensParams, SemanticTokens | null, SemanticTokensPartialResult, void, SemanticTokensRegistrationOptions>(method);
export const registrationMethod: typeof SemanticTokensRegistrationType.method = SemanticTokensRegistrationType.method;
export type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | null, void>;
export const capabilities: { client: 'textDocument.semanticTokens'; server: 'semanticTokensProvider' } = { client: 'textDocument.semanticTokens', server: 'semanticTokensProvider' };
}

//------- 'textDocument/semanticTokens/edits' -----
Expand Down Expand Up @@ -233,6 +234,7 @@ export namespace SemanticTokensDeltaRequest {
export const type = new ProtocolRequestType<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, SemanticTokensPartialResult | SemanticTokensDeltaPartialResult, void, SemanticTokensRegistrationOptions>(method);
export const registrationMethod: typeof SemanticTokensRegistrationType.method = SemanticTokensRegistrationType.method;
export type HandlerSignature = RequestHandler<SemanticTokensDeltaParams, SemanticTokens | SemanticTokensDelta | null, void>;
export const capabilities: { client: 'textDocument.semanticTokens.requests.full.delta'; server: 'semanticTokensProvider.full.delta' } = { client: 'textDocument.semanticTokens.requests.full.delta', server: 'semanticTokensProvider.full.delta' };
}

//------- 'textDocument/semanticTokens/range' -----
Expand Down Expand Up @@ -261,6 +263,7 @@ export namespace SemanticTokensRangeRequest {
export const type = new ProtocolRequestType<SemanticTokensRangeParams, SemanticTokens | null, SemanticTokensPartialResult, void, void>(method);
export const registrationMethod: typeof SemanticTokensRegistrationType.method = SemanticTokensRegistrationType.method;
export type HandlerSignature = RequestHandler<SemanticTokensRangeParams, SemanticTokens | null, void>;
export const capabilities: { client: 'textDocument.semanticTokens.requests.range'; server: 'semanticTokensProvider.range' } = { client: 'textDocument.semanticTokens.requests.range', server: 'semanticTokensProvider.range' };
}

//------- 'workspace/semanticTokens/refresh' -----
Expand Down Expand Up @@ -289,4 +292,5 @@ export namespace SemanticTokensRefreshRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType0<void, void, void, void>(method);
export type HandlerSignature = RequestHandler0<void, void>;
export const capabilities: { client: 'workspace.semanticTokens.refreshSupport' } = { client: 'workspace.semanticTokens.refreshSupport' };
}
1 change: 1 addition & 0 deletions protocol/src/common/protocol.showDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,5 @@ export namespace ShowDocumentRequest {
export const type = new ProtocolRequestType<ShowDocumentParams, ShowDocumentResult, void, void, void>(method);
export type HandlerSignature = RequestHandler<ShowDocumentParams, ShowDocumentResult, void>;
export type MiddlewareSignature = (params: ShowDocumentParams, token: CancellationToken, next: HandlerSignature) => HandlerResult<ShowDocumentResult, void>;
export const capabilities: { client: 'window.showDocument.support' } = { client: 'window.showDocument.support' };
}
3 changes: 2 additions & 1 deletion protocol/src/common/protocol.textDocumentContent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export namespace TextDocumentContentRequest {
export const messageDirection: MessageDirection = MessageDirection.clientToServer;
export const type = new ProtocolRequestType<TextDocumentContentParams, TextDocumentContentResult, void, void, TextDocumentContentRegistrationOptions>(method);
export type HandlerSignature = RequestHandler<TextDocumentContentParams, TextDocumentContentResult, void>;
export const capabilities: { client: 'workspace.textDocumentContent'; server: 'workspace.textDocumentContent' } = { client: 'workspace.textDocumentContent', server: 'workspace.textDocumentContent' };
}

/**
Expand Down Expand Up @@ -111,4 +112,4 @@ export namespace TextDocumentContentRefreshRequest {
export const messageDirection: MessageDirection = MessageDirection.serverToClient;
export const type = new ProtocolRequestType<TextDocumentContentRefreshParams, void, void, void, void>(method);
export type HandlerSignature = RequestHandler<TextDocumentContentRefreshParams, void, void>;
}
}

0 comments on commit c10685b

Please sign in to comment.