Protected
Readonly
buildProtected
Readonly
buildProtected
currentProtected
Readonly
documentProtected
Readonly
documentProtected
Readonly
fileProtected
Readonly
indexProtected
Readonly
langiumProtected
Readonly
langiumProtected
Readonly
serviceProtected
Readonly
textThe options used for rebuilding documents after an update.
Protected
Readonly
updateProtected
Readonly
workspaceExecute all necessary build steps for the given documents.
Set of documents to be built.
Options for the document builder.
Indicates when to cancel the current operation.
Protected
buildBuild the given documents by stepping through all build phases. If a document's state indicates that a certain build phase is already done, the phase is skipped for that document.
The documents to build.
the BuildOptions to use.
A cancellation token that can be used to cancel the build.
A promise that resolves when the build is done.
Protected
emitProtected
findProtected
getProtected
notifyProtected
notifyNotify the given callback when a set of documents has been built reaching the specified target state.
Notify the specified callback when a document has been built reaching the specified target state. Unlike onBuildPhase the listener is called for every single document.
There are two main advantages compared to onBuildPhase:
Notify the given callback when a document update was triggered, but before any document is rebuilt. Listeners to this event should not perform any long-running task.
Protected
prepareRuns prior to beginning the build process to update the DocumentBuildState for each document
collection of documents to be built
the BuildOptions to use
Reset the state of a document to the specified state, removing any derived data as needed.
The document to reset.
The state to reset the document to.
Protected
runRuns a cancelable operation on a set of documents to bring them to a specified DocumentState.
The array of documents to process.
The target DocumentState to bring the documents to.
A token that can be used to cancel the operation.
A function to be called for each document.
A promise that resolves when all documents have been processed or the operation is canceled.
Protected
shouldDetermine whether the given document should be linked during a build. The default
implementation checks the eagerLinking
property of the build options. If it's set to true
or undefined
, the document is included in the linking phase. This also affects the
references indexing phase, which depends on eager linking.
Protected
shouldCheck whether the given document should be relinked after changes were found in the given URIs.
Protected
shouldDetermine whether the given document should be validated during a build. The default
implementation checks the validation
property of the build options. If it's set to true
or a ValidationOptions
object, the document is included in the validation phase.
Protected
sortSort the given documents by priority. By default, documents with an open text document are prioritized. This is useful to ensure that visible documents show their diagnostics before all other documents.
This improves the responsiveness in large workspaces as users usually don't care about diagnostics in files that are currently not opened in the editor.
This method is called when a document change is detected. It updates the state of all affected documents, including those with references to the changed ones, so they are rebuilt.
URIs of changed or created documents
URIs of deleted documents
allows to cancel the current operation
Protected
validateRun validation checks on the given document and store the resulting diagnostics in the document. If the document already contains diagnostics, the new ones are added to the list.
Wait until the workspace has reached the specified state for all documents.
The desired state. The promise won't resolve until all documents have reached this state
Optional
cancelToken: Cancellation.CancellationTokenOptionally allows to cancel the wait operation, disposing any listeners in the process
Wait until the document specified by the uri has reached the specified state.
The desired state. The promise won't resolve until the document has reached this state.
Optional
uri: URIThe specified URI that points to the document. If the URI does not exist, the promise will resolve once the workspace has reached the specified state.
Optional
cancelToken: Cancellation.CancellationTokenOptionally allows to cancel the wait operation, disposing any listeners in the process.
The URI of the document that has reached the desired state, or undefined
if the document does not exist.
Shared-service for building and updating
LangiumDocument
s.