Jay,
Sorry, I should have been clear that I was being exhaustive there.
EMF basically only creates getters and setters hooked up to notification and persistence systems. It lacks things like clone() or copy(), or even functions to add things to a list or map. I also couldn't figure out a way to make it create actual maps. Tutorials
just showed me a way to create lists of map entry classes that pair key and value data members.
Using AbstractControllerImpl as an example, EMF created the getters and setters for the disposed, model, and view data members (but not the disposed setter that takes a boolean value, and thus actually sets the AtomicBoolean. It created the one which replaces
disposed with a new AnotmicBoolean.) It also created the functions starting with e (eStaticClass(), eGet(), eInvoke(), etc.) and stubbed out versions of all the other functions. Percentage-wise, I'd say that EMF generated maybe 60% of that code, about 30%
of which was variable and function declarations I made in the model, about 20% of which are giant switch statements in functions like eGet(), and 10% was simple getting and setting code. For AbstractMeshComponentImpl, which had much more complex code, EMF
only generated something like 30% of it. I didn't need to make any changes to the interfaces, though.
If you've got this in Eclipse, you can got to model -> prototype5.genmodel, open it, open the properties view, and change the Model -> Model Directory to a new folder, and right click the Prototype5 node in the editor and click "Generate Model" to see what
EMF makes on its own.
Robert
From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, October 16, 2015 8:26 PM
To: ice developer discussions
Subject: Re: [ice-dev] EMF Modeling Prototype Screenshots
Robert,
Yes... I gathered that. Give me some idea, at a high level, of what you have done.
For example, for the data structures, did you only have to worry about copy() and clone()? For the Controller, etc., what was the rough percentage of the amount of code that you had to implement versus what was generated?
Jay
|