SlideShare une entreprise Scribd logo
1  sur  47
Télécharger pour lire hors ligne
EMF.Edit
A Story of Adapters
Mikaël Barbero
Obeo
Eclipse Con North America 2014
March 20, 2014
©JohnWilhelmhttp://500px.com/photo/59208448
Super
Java
Beans
© Rangizzz http://500px.com/photo/30648317
On Steroids
© Max Ellis http://500px.com/photo/57968110
© Rangizzz http://500px.com/photo/43660830
Today’s Workout Routine
Connecting the Viewer
Changing the Labels
Changing the Content
Connecting the
viewers
Exercise 1
Model View
Controller
Listening for Reacting to
CHANGES
notifies
adapts
Notifier Adapter
Listener pattern
Notifier is the observable and Adapter is the observer
5
Notification
Message from the Observable to the Observer
TreeViewer
Chain of notifications
Explains the importance of calling dispose()
Adapter
Factory Content
& Label
Provider
Item
Provider
Adapter
Factory
Item
Provider
EObject
Update or Refresh
Or how to be smart when notifying the viewer
TreeViewer
Adapter
Factory Content
& Label
Provider
Item
Provider
Adapter
Factory
Item
Provider
EObject
#notifyChanged
Update or Refresh
Or how to be smart when notifying the viewer
Provider type
Singleton
Book
Item
Provider
Book
Book
Book
Provider type
Stateful
Book
Item
Provider
Book
Book
Book
Book
Item
Provider
Book
Item
Provider
TreeViewer
Composed Adapter Factory
Look for the proper adapter factory for each type of object
Item
Provider
Adapter
Factory
Item
Provider
Adapter
Factory
Item
Provider
Adapter
Factory
Adapter
Factory Content
& Label
Provider
Item
Provider
Adapter
Factory
Item
Provider
EObject
Code is Available
https://github.com/mbarbero/econ-na-2014-emf-edit
Tags demo1 and demo2
Changing the Labels
Exercise 2
XXXItemProvider#getText(Object)
Easy
src
src-gen
Generation gap pattern
Treat generated code as byte code
Item
Book Periodical
BookOn
Tape
Video
Cassette
TreeViewer
Adapter
Factory Content
& Label
Provider
Item
Provider
Adapter
Factory
Item
Provider
EObject
Decorators
of AdapterFactory and ItemProvider
TreeViewer
Decorators
of AdapterFactory and ItemProvider
Item
Adapter
Factory Content
& Label
Provider
Item
Provider
Adapter
Factory
Item
Item
Provider
EObject
Code is Available
https://github.com/mbarbero/econ-na-2014-emf-edit
Tag demo3
Changing the Contents
Exercise 3
XXXItemProvider#getChildren(Object)
Easy
TreeNode
Tree Model
Wrap EObjects
EObject
data
TreeViewer
Tree Model
Wrap EObjects
Item
Adapter
Factory Content
& Label
Provider
Item
Provider
Adapter
Factory
Item Item
Item
Provider
EObject
Beware of too many notifications
Make your item providers stateful
EObject
EObject
EObject
Beware of too many notifications
Make your item providers stateful
Tree
Node
Tree
Node
Tree
Node
Beware of too many notifications
Make your item providers stateful
Tree
NodeItem
Provider
Tree
NodeItem
Provider
Tree
NodeItem
Provider
Beware of too many notifications
Make your item providers stateful
EObject
ItemProvider
Beware of too many notifications
Make your item providers stateful
EObject
ItemProvider
Beware of too many notifications
Make your item providers stateful
Code is Available
https://github.com/mbarbero/econ-na-2014-emf-edit
Tag demo4
Connecting the Viewer
Changing the Labels
Changing the Content
Recap
Q
&
A
Mikaël Barbero
mikael.barbero@obeo.fr
+Mikaël Barbero
@mikbarbero
Obeo
http://www.obeo.fr

Contenu connexe

En vedette

Laura Huser's Design Portf
Laura Huser's Design PortfLaura Huser's Design Portf
Laura Huser's Design Portf
laura_huser
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
Ajay K
 
Sydney Sales Corporation - Introduction
Sydney Sales Corporation - IntroductionSydney Sales Corporation - Introduction
Sydney Sales Corporation - Introduction
Abhay K
 
Microsoft Word - 2_E_N_238
Microsoft Word - 2_E_N_238Microsoft Word - 2_E_N_238
Microsoft Word - 2_E_N_238
Longchrea NEAK
 

En vedette (14)

academic and proof
academic and proofacademic and proof
academic and proof
 
Isabelle Coudere - Interior designer - Portfolio - Book
Isabelle Coudere - Interior designer - Portfolio - BookIsabelle Coudere - Interior designer - Portfolio - Book
Isabelle Coudere - Interior designer - Portfolio - Book
 
Laura Huser's Design Portf
Laura Huser's Design PortfLaura Huser's Design Portf
Laura Huser's Design Portf
 
9th grade dance flyer
9th grade dance flyer9th grade dance flyer
9th grade dance flyer
 
Patterns in Eclipse
Patterns in EclipsePatterns in Eclipse
Patterns in Eclipse
 
Portfolio – black and white images
Portfolio – black and white imagesPortfolio – black and white images
Portfolio – black and white images
 
Eclipse Modeling Framework
Eclipse Modeling FrameworkEclipse Modeling Framework
Eclipse Modeling Framework
 
Impact of platformization on your business processes and ERP Landscape
Impact of platformization on your business processes and ERP LandscapeImpact of platformization on your business processes and ERP Landscape
Impact of platformization on your business processes and ERP Landscape
 
Sydney Sales Corporation - Introduction
Sydney Sales Corporation - IntroductionSydney Sales Corporation - Introduction
Sydney Sales Corporation - Introduction
 
Elizabethan Duelling
Elizabethan DuellingElizabethan Duelling
Elizabethan Duelling
 
Colon cancer
Colon cancerColon cancer
Colon cancer
 
Microsoft Word - 2_E_N_238
Microsoft Word - 2_E_N_238Microsoft Word - 2_E_N_238
Microsoft Word - 2_E_N_238
 
Design Portfolio
Design Portfolio Design Portfolio
Design Portfolio
 
Interior Design Portfolio.
Interior Design Portfolio.Interior Design Portfolio.
Interior Design Portfolio.
 

Plus de mikaelbarbero

OSGi: Don't let me be Misunderstood
OSGi: Don't let me be MisunderstoodOSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstood
mikaelbarbero
 
Google Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG NantesGoogle Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG Nantes
mikaelbarbero
 
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
mikaelbarbero
 

Plus de mikaelbarbero (18)

Kubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating SystemKubernetes 101 - A Cluster Operating System
Kubernetes 101 - A Cluster Operating System
 
Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?Language Server Protocol - Why the Hype?
Language Server Protocol - Why the Hype?
 
What's new in Eclipse Oxygen (Devoxx France 2017)
What's new in Eclipse Oxygen (Devoxx France 2017)What's new in Eclipse Oxygen (Devoxx France 2017)
What's new in Eclipse Oxygen (Devoxx France 2017)
 
The Eclipse IDE: What's new in the 2017 release?
The Eclipse IDE: What's new in the 2017 release?The Eclipse IDE: What's new in the 2017 release?
The Eclipse IDE: What's new in the 2017 release?
 
What every Eclipse developer should know about progress reporting and job can...
What every Eclipse developer should know about progress reporting and job can...What every Eclipse developer should know about progress reporting and job can...
What every Eclipse developer should know about progress reporting and job can...
 
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)The Eclipse IDE - The Force Awakens (Devoxx France 2016)
The Eclipse IDE - The Force Awakens (Devoxx France 2016)
 
Sirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLsSirius: Graphical Editors for your DSLs
Sirius: Graphical Editors for your DSLs
 
Modeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGitModeling in a Team Environment with EMF Compare and EGit
Modeling in a Team Environment with EMF Compare and EGit
 
Eclipse simultaneous release in a nutshell
Eclipse simultaneous release in a nutshellEclipse simultaneous release in a nutshell
Eclipse simultaneous release in a nutshell
 
OSGi: Don't let me be Misunderstood
OSGi: Don't let me be MisunderstoodOSGi: Don't let me be Misunderstood
OSGi: Don't let me be Misunderstood
 
EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)EMF Compare 2.0: Scaling to Millions (updated)
EMF Compare 2.0: Scaling to Millions (updated)
 
EMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to MillionsEMFCompare 2.0: Scaling to Millions
EMFCompare 2.0: Scaling to Millions
 
3mf infinity-and-beyond
3mf infinity-and-beyond3mf infinity-and-beyond
3mf infinity-and-beyond
 
Eclipseconeurope 2011 - EMFCompare Improvements
Eclipseconeurope 2011 - EMFCompare ImprovementsEclipseconeurope 2011 - EMFCompare Improvements
Eclipseconeurope 2011 - EMFCompare Improvements
 
Google Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG NantesGoogle Guava & EMF @ GTUG Nantes
Google Guava & EMF @ GTUG Nantes
 
5M lines of code migration
5M lines of code migration5M lines of code migration
5M lines of code migration
 
EMFPath
EMFPathEMFPath
EMFPath
 
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
Generating an Android App with Acceleo (Eclipse Summit Europe 2010)
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Dernier (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
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
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
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
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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
 

EMF.Edit: a Story of Adapters