-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Go to declaration service * Removed tests and implementation
- Loading branch information
Showing
3 changed files
with
34 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/****************************************************************************** | ||
* Copyright 2022 TypeFox GmbH | ||
* This program and the accompanying materials are made available under the | ||
* terms of the MIT License, which is available in the project root. | ||
******************************************************************************/ | ||
|
||
import { CancellationToken, DeclarationParams, LocationLink } from 'vscode-languageserver'; | ||
import { MaybePromise } from '../utils/promise-util'; | ||
import { LangiumDocument } from '../workspace/documents'; | ||
|
||
/** | ||
* Language-specific service for handling go to declaration requests | ||
*/ | ||
export interface DeclarationProvider { | ||
/** | ||
* Handle a go to declaration request. | ||
* @throws `OperationCancelled` if cancellation is detected during execution | ||
* @throws `ResponseError` if an error is detected that should be sent as response to the client | ||
*/ | ||
getDeclaration(document: LangiumDocument, params: DeclarationParams, cancelToken?: CancellationToken): MaybePromise<LocationLink[] | undefined> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters