This is a presentation of EMF from the ground up during Eclipse India Summit, Bangalore July 2009. This was a joint session from me and Annamalai, ANCiT.
10. Properties of (E)Attribute Data type of attribute EType Default value assigned when containing class is instantiated Default value Literal Find out if an attribute was touched Unsettable Value can be changed or not Changeable Attribute isn’t persisted Transient No associated storage (value can be calculated) Volatile Meaning Property
20. EMF.Edit Commands Command based editing of model instances Editing domain UI display “ Set” event as Command Command stack setXXX() undoable Model object
21.
22. EMF.Edit – commands, a deeper look Command interface Existing Command implementations Do you need to implement this interface ??
23. EMF.Edit – “Change… is here!” Should I have one command per operation ? Can I “record” changes done to a model ? Oooo yess!! Works on change notofications given on each operation ChangeRecorder recoreds these notifications from individual setters. Hence, bulk undo is possible Can I perform many operations in one command ?
24.
25. Model xml / xmi load save UI display What after you edit ?? – can ya persist ?
27. Load and save flows Model object xml / xmi load save EMF Reosource Typical code snippet:
28.
29. Can I directly persist EMF Objects into dbase ? Yes, u can – using EMF Teneo ( http:// www.eclipse.org/modeling/emf/?project = teneo ) Create HbDataStore Create Hibernate Session, Transaction Begin Transaction Create EMF Model root object, make it persistent Create sub-tree under persistent root Commit Tx
33. Model editing through multiple threads Thread 1 Change name : “ Jimmy Bend” Thread 2 Change name “ James Bond” name: Harry Potter name: ??? Model object Model object
34. “ A mind once stretched by a thought never regains its original dimensions”