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

Make grammar reference in check language optional #95

Merged
merged 2 commits into from
May 16, 2018

Conversation

abrahamm87
Copy link
Collaborator

-make language attribute of validator extension point optional
-change check generator to handle absence of reference to grammar

@abrahamm87 abrahamm87 requested review from dpetroff and rmitin May 14, 2018 12:41
ICheckValidatorRegistry.INSTANCE.registerValidator(GRAMMAR_NAME, new «catalog.validatorClassName»());
ICheckCatalogRegistry.INSTANCE.registerCatalog(GRAMMAR_NAME, new ModelLocation(

ICheckValidatorRegistry.INSTANCE.registerValidator(«IF catalog.grammar !== null»GRAMMAR_NAME«ELSE»null«ENDIF», new «catalog.validatorClassName»());
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would consider adding a second method with signature without the language
void registerValidator(final ICheckValidatorImpl validator);

with the intention to deprecate the one with language parameter over time.

Reasoning: we could aim for getting rid of language information in this registry as we don't really use it. We specify language when we bind catalog to the DSL. We need to see if we still keep the language reference in the catalogs in the long run. It is handy for simple single-DSL projects to just bind checks directly from the catalog without the need to use some check configuration file. So might be the syntax with the language does make sense, but then it should probably generate the same binding as we either do manually or with check configuration file.

-make language attribute of validator extension point optional
-change check generator to handle absence of reference to grammar
@abrahamm87 abrahamm87 merged commit 66b5b6e into dsldevkit:master May 16, 2018
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.

3 participants