All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ai.vespa.schemals.context.EventDocumentContext Maven / Gradle / Ivy

There is a newer version: 8.441.21
Show newest version
package ai.vespa.schemals.context;

import java.io.PrintStream;

import org.eclipse.lsp4j.TextDocumentIdentifier;

import ai.vespa.schemals.schemadocument.DocumentManager;

import ai.vespa.schemals.SchemaMessageHandler;
import ai.vespa.schemals.index.SchemaIndex;
import ai.vespa.schemals.schemadocument.SchemaDocumentScheduler;

public class EventDocumentContext extends EventContext {
    public final DocumentManager document;
    public final TextDocumentIdentifier documentIdentifier;

    public EventDocumentContext(
        SchemaDocumentScheduler scheduler,
        SchemaIndex schemaIndex,
        SchemaMessageHandler messageHandler,
        TextDocumentIdentifier documentIdentifier
    ) throws InvalidContextException {
        super(scheduler, schemaIndex, messageHandler);
        this.documentIdentifier = documentIdentifier;
        this.document = scheduler.getDocument(documentIdentifier.getUri());
        if (this.document == null) {
            throw new InvalidContextException();
        }
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy