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

Provide a JvmGenericTypeValidator #3031

Merged
merged 98 commits into from May 16, 2024
Merged

Conversation

LorenzoBettini
Copy link
Contributor

Closes #2349

This is my proposal for a JvmGenericTypeValidator, containing code extracted and refactored from XtendValidator for typical inheritance-based checks on the inferred Jvm model for Xbase languages. This is an opt-in feature, to be enabled through a composed validator.

This has been tested through Xtend, which is now using it, and a testlanguage for some corner cases (https://github.com/eclipse/xtext/compare/main...LorenzoBettini:xtext:lb_2349?expand=1#diff-25aca6d3c766f0d3e06a3fd1d893c1d3e3dc23b7e503b3facabffbd1e3e882f9).

The Xtend tests have been updated when I thought they would be improved according to the introduced JvmGenericTypeValidator. As for the rest, the results are the same. Note that Xtend customizes such a validator for a few special cases.

This validator has been applied to Domainmodel ef578b5 and the corresponding Entities web example 08b5090

@szarnekow please let me know if I can provide further details to help the review.

@LorenzoBettini
Copy link
Contributor Author

@szarnekow I also added the commented composedCheck in the generated MWE2

@szarnekow
Copy link
Contributor

This is indeed an appreciated improvement for standard Xbase languages. Well done!

@LorenzoBettini LorenzoBettini added this to the Release_2.35 milestone May 16, 2024
@LorenzoBettini LorenzoBettini merged commit f212edb into eclipse:main May 16, 2024
7 checks passed
@LorenzoBettini LorenzoBettini deleted the lb_2349 branch May 16, 2024 08:48
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.

Provide a JvmGenericTypeValidator
2 participants