Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ice-dev] EMF Modeling Prototype Screenshots

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

On Fri, Oct 16, 2015 at 3:54 PM, Smith, Robert W. <smithrw@xxxxxxxx> wrote:

In general, EMF will  give you an interface and a class implementing it. The class will have what are basically macros for the default values for class variables, along with getters and setters. Setters automatically come with notifications for EMF's observer pattern implementation and getters for objects will have a way of dealing with proxies (which I think are part of EMF's persistence that allow you to read things out of the persistence file lazily) Basic getters that ignore proxies also get included.


You can see which parts were generated by EMF because they're marked with a @generated annotation. Things marked with "@generated NOT" were things I changed, as that stops them from being overwritten when regenerating the model. (There's a way we can put the implementation code in the model itself to avoid that, but only as a plain string inside the properties page, which isn't very workable.) 


Robert


From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, October 16, 2015 3:38 PM

To: ice developer discussions
Subject: Re: [ice-dev] EMF Modeling Prototype Screenshots
 

Robert,

Okay. I see some of that in VizObject. In general (high level), what was generated and what did you implement?

Jay

On Oct 16, 2015 3:22 PM, "Smith, Robert W." <smithrw@xxxxxxxx> wrote:

​They were all generated by EMF, except JavaFXTutorial and Xform. I added implementation code for some functions in almost all of the Impl classes.


Robert


From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, October 16, 2015 3:18 PM
To: ice developer discussions
Subject: Re: [ice-dev] EMF Modeling Prototype Screenshots
 

Robert,

Will you tell me what classes you wrote? I'll assume the rest are generated by the EMF.

Jay

On Oct 16, 2015 1:17 PM, "Smith, Robert W." <smithrw@xxxxxxxx> wrote:

https://github.com/SmithRWORNL/EMF-JavaFX-Prototype


It isn't completely commented, partially due to avoiding comments for things that EMF is going to replace (along with their comments) the next time the model is regenerated, but also because I haven't had a chance to clean the code up entirely. I also haven't had EMF generate test code for it, yet. 


Robert


From: ice-dev-bounces@xxxxxxxxxxx <ice-dev-bounces@xxxxxxxxxxx> on behalf of Jay Jay Billings <jayjaybillings@xxxxxxxxx>
Sent: Friday, October 16, 2015 12:40 PM
To: ice developer discussions
Subject: Re: [ice-dev] EMF Modeling Prototype Screenshots
 

Robert,

Awesome! Have you committed your code to a repo somewhere so that I can look at it?

Jay

On Oct 16, 2015 12:34 PM, "Smith, Robert W." <smithrw@xxxxxxxx> wrote:

Attached are an example of a JavaFX geometry editor created using EMF modeling to auto-generate the code. It includes a screenshot of the editor itself as well as the UML diagram used to generate its code. ​


Robert


_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev

_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev

_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev

_______________________________________________
ice-dev mailing list
ice-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/ice-dev



--
Jay Jay Billings
Oak Ridge National Laboratory
Twitter Handle: @jayjaybillings

Back to the top