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

TGG Editor: Validation and handling of EDatatypes in attribute conditions #99

Open
anthonyanjorin opened this issue May 29, 2018 · 1 comment

Comments

@anthonyanjorin
Copy link
Contributor

A validation should be used to ensure that attribute conditions really make sense (regarding types). E.g. eq_string(bla.blup, "Foo") should ensure that both values are really of type EString...

A related problem is that the method csp.RuntimeTGGAttributeConstraintContainer.coerceToType assumes that all data types have an instance class. This is only the case for standard EDatatypes already defined in Ecore, or for EDataTypes for which the user supplies and registers generated code. For all other cases this returns null, and we should throw an exception telling the user that a user-defined attribute condition is required for this.

@anthonyanjorin anthonyanjorin self-assigned this May 29, 2018
@anthonyanjorin anthonyanjorin changed the title TGG Editor TGG Editor: Validation and handling of EDatatypes in attribute conditions May 29, 2018
@anthonyanjorin
Copy link
Contributor Author

Also things like eq_string(f.baz, 234523) for cases where f.baz is a string are not validated. I just tried it out and some weird number (not 234523) is fixed as string value.

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

No branches or pull requests

3 participants