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

Remove reflexive call for EMF attributes #68

Open
dvojtise opened this issue Jan 22, 2019 · 0 comments
Open

Remove reflexive call for EMF attributes #68

dvojtise opened this issue Jan 22, 2019 · 0 comments

Comments

@dvojtise
Copy link
Contributor

In order to deal with attribute both in EMF and in K3, the annotation processor currently use a strategy based on java invoke.
In order to optimize this behaviour, a better solution than the one proposed in #66 would be to detect the presence or not of the target methods directly during the compilation (ie. during annotation procressing).

However, after discussion (with @barais @combemale @jdeantoni )this optimisation cannot take place before a change in Melange (https://github.com/diverse-project/melange).

Actually in the current process with Melange:

  • we start from an ecore without runtime attribute, so the K3 code must rely on the attribute in the companion java object generated by the aspect.
  • then melange takes both the origial ecore + K3 aspects in order to generate a new ecore for the runtime language.
  • it generates the java code for this ecore (genmodel: generate model code)
  • It complements the ecore with a copy of the java code produced by the k3 aspect (with a change of the package namespace in order to adapt to the new ecore java code) (AspectCopier).

In this case, the aspect must give priority to the code in the attribute in EMF (ie. produced by the genmodel)

As this last AspectCopier works on the produced java code instead of the K3 code, the annotation processor is not called, and the code cannot be optimized (at least, easily) during this phase unless Melange changes its AspectCopier

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

1 participant