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

Disallow rule name duplicates #11

Open
MartinLoeper opened this issue Jul 8, 2017 · 4 comments
Open

Disallow rule name duplicates #11

MartinLoeper opened this issue Jul 8, 2017 · 4 comments

Comments

@MartinLoeper
Copy link
Owner

The user must not enter rules with the same identifier.
Is there an xText grammar features which ensures that duplicates produce an error?

@MartinLoeper
Copy link
Owner Author

This seams to be accomplished by the xText type ValidID.
We do not have to implement anything at all.

@MartinLoeper
Copy link
Owner Author

This was proved wrong. We need to write a custom validator such as: https://stackoverflow.com/questions/32126903/validating-unique-names-for-strings-and-optional-reference

@MartinLoeper MartinLoeper reopened this Jul 11, 2017
@MartinLoeper
Copy link
Owner Author

Setting the want help marker here in order to ask Dominik.

@dwerle
Copy link

dwerle commented Jul 18, 2017

Custom Validator should be the way to go. The Vitruvius reactions language implements basically the same thing:
ReactionsLanguageValidator#checkReactionsFile (in https://github.com/vitruv-tools/Vitruv/blob/master/bundles/dsls/tools.vitruv.dsls.reactions/src/tools/vitruv/dsls/reactions/validation/ReactionsLanguageValidator.xtend)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants