-
In the snippet below only one document is added tot the workspace. How can I do something similar by providing a directory name? Based on this directory name all files with applicable extensions should then give a list of documents to be passed to the DocumentBuilder. Or is there another way this should work?
|
Beta Was this translation helpful? Give feedback.
Answered by
msujew
Dec 21, 2024
Replies: 1 comment
-
Hey @BaukeL, there are two ways to go about this:
|
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
BaukeL
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hey @BaukeL,
there are two ways to go about this:
fs
import and create documents for all of them and pass them into theDocumentBuilder.build
method.WorkspaceManager#initializeWorkspace
method and pass in an array ofWorkspaceFolder
. It callsDocumentBuilder.build
internally. See:langium/examples/domainmodel/src/cli/cli-util.ts
Lines 45 to 57 in 3f9de4c