Community
Participate
Working Groups
Continuing with my attempts to "single source" my model implementation with several edit and editor implementations, what I'd like to do is be able to set up a generator model for each runtime platform that I want to support. Of course, I only need to generate the model code once, but the edit and editor code needs to be specialized for each runtime platform. What I tried was to generate the model code using one of my generator models (for GWT) and to unset the model directory for the other generator models (so that the model code is not generated when choosing 'Generate All'). Unfortunately, I found that, despite explicit settings for the edit and editor directories in the other generator models, I was unable to successfully generate the code unless the model directory was set. This seems like an unnecessary limitation, especially since the model plug-in ID is still set. In the event that the model directory really is needed in order to generate the other code, an alternative solution to this problem might be to introduce flags to turn on/off generation for each kind of code (model, edit, editor, tests)...
Debugging this, it's trying to use the model directory information to set up project references. I'm not sure they're really needed with PDE's dependencies. Basically you want this to work just so you can avoid accidentally generating the model with the wrong settings, right?
(In reply to comment #1) > Debugging this, it's trying to use the model directory information to set up > project references. I'm not sure they're really needed with PDE's > dependencies. > > Basically you want this to work just so you can avoid accidentally generating > the model with the wrong settings, right? Yes, I just want to be able to configure each generator model so that I can do 'Generate All' on each one and end up regenerating (only) the appropriate code for each one. There also seems to be a dependency between the tests and model code which I'm not sure is necessary either... in my case I would want tests for the IDE runtime target only (and at some point in the future, possibly tests for the GWT target).
The enhancement is committed to master: http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=d8bb913b542fe1ad9830ae327987b92c06f3201f
The changes are available in the latest release.