SlideShare une entreprise Scribd logo
1  sur  35
Chetan Kumar K, RBEI jointly with  Annamalai C, ANCiT
In-memory dbase content D-Base UI display What is a model ??? That is a model!
What is model ??? ,[object Object],[object Object],Get data Set data Get data Data In memory representation of data ,[object Object]
…  and so on Will you spend time writing each class ??  Map design and code (model) PIM PSM Or be smart and generate them ??  UML Java
Typical code-generation flow PIM Generator Model Code Generation  Engine Code generation  templates PSM PSM
EMF a code generator. ,[object Object],[object Object],[object Object]
Code generation flow – EMF way PIM (ecore) Generator Model genmodel EMF Code Generation  Engine Code generation  Templates (JET) PSM (Java)
First look of EMF as a code-generator… Tap along guys…
The complete Example UML
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
M-V-C architecture thru EMF
… EMF first impressions. ,[object Object],[object Object],[object Object],[object Object],Points 3, 4 courtesy  Ed  Merks It will be great if these points are myths … wat say ?
EMF.Edit Control how model elements are displayed, edited.
EMF.Edit – bird’s eye view. Contains UI Providers for each Model Element. Content Provider Label Provider Property Source Item Provider Generated implementation for different providers
EMF.Edit control flow – Content Providers “ +” clicked Item provider code eGet api calls Generated api getter(s)
EMF.Edit control flow – Label Providers Item provider code eGet api calls Generated api getter(s)
EMF.Edit control flow – Property Source Tree item selected Item provider code Individual feature’s property descriptor built Property descriptors
EMF.Edit providers – one for all, all for one ,[object Object],[object Object]
EMF.Edit commands Command based model editing support
EMF.Edit Commands Command based editing of model instances Editing domain UI display “ Set” event as Command Command stack setXXX() undoable Model object
EMF.Edit – How do I create/use Commands ? Model object EMF Editing Domain ,[object Object],[object Object]
EMF.Edit – commands, a deeper look Command interface Existing Command implementations Do you need to implement this interface ??
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 ?
Should I always generate EMF.xxx code ? ,[object Object],[object Object],Responsible code: EMF Reflective API, EMF Reflective Item Providers
Model xml / xmi load save UI display What after you edit ?? – can ya persist ?
EMF serialization Model object EMF Resource EMF Resource Set xml / xmi
Load and save flows Model object xml / xmi load save EMF Reosource Typical code snippet:
EMF Serialization – behind the scenes ,[object Object],[object Object]
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
[object Object],Model Navigation and search Isn’t there a better way than loops ? Can’t I “Query” an EMF model ?? The cool “Query way”
In the end… what is EMF ? ,[object Object],[object Object],[object Object],[object Object]
EMF Transaction Thread-safe editing of a single Model Instance Transaction style editing of model instances
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
“ A mind once stretched by a thought never regains its original dimensions”
References ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]

Contenu connexe

Similaire à EMF as a code generator and modeling framework

Development of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsDevelopment of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsMario Cervera
 
Model-driven development and Code generation
Model-driven development and Code generationModel-driven development and Code generation
Model-driven development and Code generationPavel Vlasov
 
JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008inovex GmbH
 
Eclipse Summit 2008 Jcrm Demo V1.4
Eclipse Summit 2008 Jcrm Demo V1.4Eclipse Summit 2008 Jcrm Demo V1.4
Eclipse Summit 2008 Jcrm Demo V1.4guestc06d27
 
EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012Istvan Rath
 
JavaScript Modelling Framwork : MDE
JavaScript Modelling Framwork : MDE JavaScript Modelling Framwork : MDE
JavaScript Modelling Framwork : MDE Jean-Sebastien Sottet
 
Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeIstvan Rath
 
Codegeneration Goodies
Codegeneration GoodiesCodegeneration Goodies
Codegeneration Goodiesmeysholdt
 
Beautiful UIs With JFace Databinding
Beautiful UIs With JFace DatabindingBeautiful UIs With JFace Databinding
Beautiful UIs With JFace DatabindingLars Vogel
 
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...Codemotion
 
EMF-REST: Generation of RESTful APIs from Models
EMF-REST: Generation of RESTful APIs from ModelsEMF-REST: Generation of RESTful APIs from Models
EMF-REST: Generation of RESTful APIs from ModelsJordi Cabot
 
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...Dave Steinberg
 
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Dimitris Kolovos
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Julie Lerman
 
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)Jordi Cabot
 
Ember presentation
Ember presentationEmber presentation
Ember presentationDaniel N
 
Model Driven Development With Emf And Eclipse Link
Model Driven Development With Emf And Eclipse LinkModel Driven Development With Emf And Eclipse Link
Model Driven Development With Emf And Eclipse LinkSuresh Krishna Madhuvarsu
 

Similaire à EMF as a code generator and modeling framework (20)

Development of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodelsDevelopment of forms editors based on Ecore metamodels
Development of forms editors based on Ecore metamodels
 
Model-driven development and Code generation
Model-driven development and Code generationModel-driven development and Code generation
Model-driven development and Code generation
 
JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008JCR Mangement - Eclipse Summit 2008
JCR Mangement - Eclipse Summit 2008
 
Eclipse Summit 2008 Jcrm Demo V1.4
Eclipse Summit 2008 Jcrm Demo V1.4Eclipse Summit 2008 Jcrm Demo V1.4
Eclipse Summit 2008 Jcrm Demo V1.4
 
EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012EMF-IncQuery presentation at TOOLS 2012
EMF-IncQuery presentation at TOOLS 2012
 
JavaScript Modelling Framwork : MDE
JavaScript Modelling Framwork : MDE JavaScript Modelling Framwork : MDE
JavaScript Modelling Framwork : MDE
 
ITU - MDD - EMF
ITU - MDD - EMFITU - MDD - EMF
ITU - MDD - EMF
 
Xcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are MadeXcore meets IncQuery: How the New Generation of DSLs are Made
Xcore meets IncQuery: How the New Generation of DSLs are Made
 
Codegeneration Goodies
Codegeneration GoodiesCodegeneration Goodies
Codegeneration Goodies
 
Beautiful UIs With JFace Databinding
Beautiful UIs With JFace DatabindingBeautiful UIs With JFace Databinding
Beautiful UIs With JFace Databinding
 
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm - Erik Wende...
 
EMF-REST: Generation of RESTful APIs from Models
EMF-REST: Generation of RESTful APIs from ModelsEMF-REST: Generation of RESTful APIs from Models
EMF-REST: Generation of RESTful APIs from Models
 
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
EclipseCon 2005: Everything You Always Wanted to do with EMF (But were Afraid...
 
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
Eclipse Modeling Framework (EMF) and Graphical Modeling Framework (GMF)
 
Entity Framework Today (May 2012)
Entity Framework Today (May 2012)Entity Framework Today (May 2012)
Entity Framework Today (May 2012)
 
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)MDE=Model Driven Everything (Spanish Eclipse Day 2009)
MDE=Model Driven Everything (Spanish Eclipse Day 2009)
 
Ember presentation
Ember presentationEmber presentation
Ember presentation
 
Lecture 1
Lecture 1Lecture 1
Lecture 1
 
EMF Client Platform
EMF Client PlatformEMF Client Platform
EMF Client Platform
 
Model Driven Development With Emf And Eclipse Link
Model Driven Development With Emf And Eclipse LinkModel Driven Development With Emf And Eclipse Link
Model Driven Development With Emf And Eclipse Link
 

Dernier

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Dernier (20)

FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

EMF as a code generator and modeling framework

  • 1. Chetan Kumar K, RBEI jointly with Annamalai C, ANCiT
  • 2. In-memory dbase content D-Base UI display What is a model ??? That is a model!
  • 3.
  • 4. … and so on Will you spend time writing each class ?? Map design and code (model) PIM PSM Or be smart and generate them ?? UML Java
  • 5. Typical code-generation flow PIM Generator Model Code Generation Engine Code generation templates PSM PSM
  • 6.
  • 7. Code generation flow – EMF way PIM (ecore) Generator Model genmodel EMF Code Generation Engine Code generation Templates (JET) PSM (Java)
  • 8. First look of EMF as a code-generator… Tap along guys…
  • 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
  • 12.
  • 13. EMF.Edit Control how model elements are displayed, edited.
  • 14. EMF.Edit – bird’s eye view. Contains UI Providers for each Model Element. Content Provider Label Provider Property Source Item Provider Generated implementation for different providers
  • 15. EMF.Edit control flow – Content Providers “ +” clicked Item provider code eGet api calls Generated api getter(s)
  • 16. EMF.Edit control flow – Label Providers Item provider code eGet api calls Generated api getter(s)
  • 17. EMF.Edit control flow – Property Source Tree item selected Item provider code Individual feature’s property descriptor built Property descriptors
  • 18.
  • 19. EMF.Edit commands Command based model editing support
  • 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 ?
  • 26. EMF serialization Model object EMF Resource EMF Resource Set xml / xmi
  • 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
  • 30.
  • 31.
  • 32. EMF Transaction Thread-safe editing of a single Model Instance Transaction style editing of model instances
  • 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”
  • 35.