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

Automatically validate project when a metamodel in the ALE environment changes #186

Open
echebbi opened this issue Jul 8, 2020 · 1 comment

Comments

@echebbi
Copy link
Collaborator

echebbi commented Jul 8, 2020

Motivation

Validators are only triggered when making changes in the editor. However, adding/removing/renaming a class/method/attribute to/from a metamodel should also trigger a new validation.

Proposed Solution

Detect when the a metamodel changes and programmatically trigger a new Xtext validation every time.

Proposed Implementation

Not sure about the best implementation; I see two possibilities:

  • use a couple resource/preferences listeners
  • use a project builder.
@dvojtise
Copy link
Contributor

the metamodel (ie. ecore file) is probably in another project, you'll need a workspace listener in order to detect changes

It will need to be carefully filtered in order to not trigger computation too often

https://www.eclipse.org/articles/Article-Resource-deltas/resource-deltas.html

about were the build should be done, I usually prefer a builder because it is convenient for a user to do a "clean all" in order to launch all validations and compilations (a couple of resource/preference listener doesn't allow that)

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