lingua-franca 0.10.1
Lingua Franca code generator
Loading...
Searching...
No Matches
org.lflang.diagram.lsp.LFLanguageServerExtension Class Reference

Provide Lingua-Franca-specific extensions to the language server's behavior. More...

Inherits ILanguageServerExtension.

Public Member Functions

CompletableFuture< String > build (BuildArgs args)
 Handle a request for a complete build of the Lingua Franca file specified by uri.
CompletableFuture< String[]> buildAndRun (BuildArgs args)
 Completely build the specified LF program and provide information that is sufficient to run it.
CompletableFuture< String > getAst (String uri)
CompletableFuture< LibraryFilegetLibraryReactors (String filePath)
 Manage requests to retrieve a hierarchical structure of reactor libraries based on the provided filePath.
CompletableFuture< NodePositiongetTargetPosition (String path)
 Retrieve the target position specified in the LF program file at the given path.
XtextResourceSet getXtextResourceSet (final URI uri)
void initialize (ILanguageServerAccess access)
LibraryFile parseLibraryReactors (URI uri)
 Parse a library of reactors specified by the provided URI and construct a hierarchical libraryFile representation.
void partialBuild (BuildArgs args)
 Handles a request for the most complete build of the specified Lingua Franca file that can be done in a limited amount of time.
void setClient (LFLanguageClient client)

Package Attributes

Injector injector

Detailed Description

Provide Lingua-Franca-specific extensions to the language server's behavior.

Author
Peter Donovan

Member Function Documentation

◆ build()

CompletableFuture< String > org.lflang.diagram.lsp.LFLanguageServerExtension.build ( BuildArgs args)

Handle a request for a complete build of the Lingua Franca file specified by uri.

Parameters
argsthe URI of the LF file of interest
Returns
A message describing the outcome of the build process.

◆ buildAndRun()

CompletableFuture< String[]> org.lflang.diagram.lsp.LFLanguageServerExtension.buildAndRun ( BuildArgs args)

Completely build the specified LF program and provide information that is sufficient to run it.

Parameters
argsThe URI of the LF program to be built.
Returns
An array consisting of the directory in which the execute command should be executed, the program of the execute command, and the arguments of the execute command.

◆ getAst()

CompletableFuture< String > org.lflang.diagram.lsp.LFLanguageServerExtension.getAst ( String uri)

◆ getLibraryReactors()

CompletableFuture< LibraryFile > org.lflang.diagram.lsp.LFLanguageServerExtension.getLibraryReactors ( String filePath)

Manage requests to retrieve a hierarchical structure of reactor libraries based on the provided filePath.

Parameters
filePaththe URI of the LF file of interest
Returns
A CompletableFuture<LibraryFile> representing the asynchronous computation of the parsed reactor structure. If an error occurs during parsing, the future will complete with null.

◆ getTargetPosition()

CompletableFuture< NodePosition > org.lflang.diagram.lsp.LFLanguageServerExtension.getTargetPosition ( String path)

Retrieve the target position specified in the LF program file at the given path.

Parameters
pathThe path to the LF program file.
Returns
A CompletableFuture<NodePosition> containing the NodePosition object representing the position of the target, or null if an error occurs during parsing or if the target position is not found.

◆ getXtextResourceSet()

XtextResourceSet org.lflang.diagram.lsp.LFLanguageServerExtension.getXtextResourceSet ( final URI uri)

◆ initialize()

void org.lflang.diagram.lsp.LFLanguageServerExtension.initialize ( ILanguageServerAccess access)

◆ parseLibraryReactors()

LibraryFile org.lflang.diagram.lsp.LFLanguageServerExtension.parseLibraryReactors ( URI uri)

Parse a library of reactors specified by the provided URI and construct a hierarchical libraryFile representation.

Parameters
uriThe URI specifying the location of the library.
Returns
A LibraryFile object representing the hierarchical structure of the reactor library, or null if an error occurs during parsing.

◆ partialBuild()

void org.lflang.diagram.lsp.LFLanguageServerExtension.partialBuild ( BuildArgs args)

Handles a request for the most complete build of the specified Lingua Franca file that can be done in a limited amount of time.

Parameters
argsthe URI of the LF file of interest

◆ setClient()

void org.lflang.diagram.lsp.LFLanguageServerExtension.setClient ( LFLanguageClient client)

Member Data Documentation

◆ injector

Injector org.lflang.diagram.lsp.LFLanguageServerExtension.injector
package

The documentation for this class was generated from the following file:
  • /Users/runner/work/lingua-franca/lingua-franca/lsp/src/main/java/org/lflang/diagram/lsp/LFLanguageServerExtension.java