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

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 

Dernier (20)

Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
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
 
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...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
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
 

EMF.Edit: a Story of Adapters