Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Further reworks of the documents loading… #806

Merged
merged 1 commit into from Dec 9, 2022
Merged

Conversation

sailingKieler
Copy link
Contributor

... to concentrate accesses the TextDocuments and FS in the 'LangiumDocumentFactory'

followup on #788, #801

Copy link
Contributor

@spoenemann spoenemann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, another improvement!

…TextDocuments and FS in the 'LangiumDocumentFactory'

followup on #788, #801
* Create a Langium document for the given URI. The document shall be fetched from the {@link TextDocuments}
* service if present, and loaded via the configured {@link FileSystemProvider} otherwise.
*/
create<T extends AstNode = AstNode>(uri: URI): LangiumDocument<T>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the additional optional content parameter that was in here in my first draft.
IMO this justifies the presence of the 'from...' methods much better, the document builder needs just this, and everything below is just implementation detail of DefaultLangiumDocumentFactory.

@spoenemann @msujew Do you agree?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sailingKieler sailingKieler merged commit 21446a1 into main Dec 9, 2022
@sailingKieler sailingKieler deleted the cd-801-follow-up branch December 9, 2022 11:14
@spoenemann spoenemann added this to the v1.0.0 milestone Dec 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants