Skip to content

TypeQLiteRenameProvider

Defined in: libs/language/src/typeqlite-edits.ts:50

Rename a type or a role everywhere the workspace names it.

Langium’s rename edits cross-references only. A TypeQLite label in a query (isa person) is a plain ID (ADR-008 D5), so renaming person in its schema would leave every query naming a type that no longer exists. This edits the label uses too, and a rename may start from a label.

Constructors

Name Description
new TypeQLiteRenameProvider() Created with the language’s services by TypeQLiteModule.

Methods

Name Description
prepareRename() The range of the label under the position when it names a definition, otherwise Langium’s answer.
rename() Renames the type or role at the position everywhere the workspace names it: its definition, its cross-references and its label uses.

new TypeQLiteRenameProvider(services): TypeQLiteRenameProvider

Defined in: libs/language/src/typeqlite-edits.ts:60

Created with the language’s services by TypeQLiteModule.

TypeQLiteLabelServices

Langium’s services, with the label resolver.

TypeQLiteRenameProvider

if the grammar has no ID terminal.

DefaultRenameProvider.constructor

prepareRename(document, params, cancelToken?): MaybePromise<Range | undefined>

Defined in: libs/language/src/typeqlite-edits.ts:105

The range of the label under the position when it names a definition, otherwise Langium’s answer.

LangiumDocument

TextDocumentPositionParams

CancellationToken

MaybePromise<Range | undefined>

DefaultRenameProvider.prepareRename


rename(document, params, cancelToken?): Promise<WorkspaceEdit | undefined>

Defined in: libs/language/src/typeqlite-edits.ts:75

Renames the type or role at the position everywhere the workspace names it: its definition, its cross-references and its label uses.

LangiumDocument

RenameParams

CancellationToken

Promise<WorkspaceEdit | undefined>

a ResponseError if the new name is not a TypeQLite label, or is a reserved keyword.

DefaultRenameProvider.rename

TypeDBLite is an independent open-source project, built on TypeDB with thanks. It is not affiliated with, sponsored by, or endorsed by TypeDB Ltd. Released under the MPL-2.0 license.