-
Notifications
You must be signed in to change notification settings - Fork 6
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
Paths to resources in .dsl file not updated when the project is renamed #70
Labels
Comments
This is also related to #52 |
echebbi
added a commit
that referenced
this issue
May 7, 2020
Because: - renaming a project or a container is likely to corrupt the whole ALE environment How: - a RenameParticipant listens for renaming events and triggers: - a change that updates paths to resources in .dsl files - a change that updates paths to resources in project's preferences Side changes: - AleAware.getEnvironment() does not return a Normalized instance anymore. Normalized was turning each behavior URI into an absolute file path, making code in Rename participants cumbersome. DslBuilder is instead charged of turning URI into files before feeding them to ANTLR. Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
echebbi
added a commit
that referenced
this issue
May 7, 2020
Because: - renaming a project or a container is likely to corrupt the whole ALE environment How: - a RenameParticipant listens for renaming events and triggers: - a change that updates paths to resources in .dsl files - a change that updates paths to resources in project's preferences Side changes: - AleAware.getEnvironment() does not return a Normalized instance anymore. Normalized was turning each behavior URI into an absolute file path, making code in Rename participants cumbersome. DslBuilder is instead charged of turning URI into files before feeding them to ANTLR. Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
echebbi
added a commit
that referenced
this issue
May 7, 2020
Because: - renaming a project or a container is likely to corrupt the whole ALE environment How: - a RenameParticipant listens for renaming events and triggers: - a change that updates paths to resources in .dsl files - a change that updates paths to resources in project's preferences Side changes: - AleAware.getEnvironment() does not return a Normalized instance anymore. Normalized was turning each behavior URI into an absolute file path, making code in Rename participants cumbersome. DslBuilder is instead charged of turning URI into files before feeding them to ANTLR. Signed-off-by: Emmanuel Chebbi <emmanuel.chebbi@outlook.fr>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Background
The .dsl file is used to express bindings between a metamodel (an .ecore file) and its semantic (an .ale file). By default (or at least that's what is done in example projects) absolute paths are used to identify the corresponding resources:
Expected behavior
When an ALE project is renamed, the path to these files should be updated as well.
Current behavior
When an ALE project is renamed, the .dsl file is left untouched, which leads to runtime exceptions when one attempts to run the interpreter:
Solution
I never tried, but it looks like using Rename Participants could provide an efficient solution.
The text was updated successfully, but these errors were encountered: