Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334733 - Support generating code with model directory unset
Summary: Support generating code with model directory unset
Status: CLOSED FIXED
Alias: None
Product: EMF
Classification: Modeling
Component: Tools (show other bugs)
Version: 2.7.0   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Ed Merks CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 23:32 EST by Kenn Hussey CLA
Modified: 2014-06-21 02:19 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kenn Hussey CLA 2011-01-18 23:32:08 EST
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)...
Comment 1 Ed Merks CLA 2011-01-21 01:39:18 EST
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?
Comment 2 Kenn Hussey CLA 2011-01-21 09:18:59 EST
(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).
Comment 3 Ed Merks CLA 2014-04-01 11:05:21 EDT
The enhancement is committed to master:

http://git.eclipse.org/c/emf/org.eclipse.emf.git/commit/?id=d8bb913b542fe1ad9830ae327987b92c06f3201f
Comment 4 Ed Merks CLA 2014-06-21 02:19:39 EDT
The changes are available in the latest release.