SlideShare une entreprise Scribd logo
1  sur  15
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
Compare Framework Basics
Tomasz Zarna
IBM Krakow Software Lab
tomasz.zarna@pl.ibm.com
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
2
Agenda
• Quick introduction
• Simple editor
• News
• Links
• Questions
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
3
The Compare Framework
• What is the purpose of the Compare framework?
 Support comparison of alternate states of a file system or
data store
• What does the Compare framework provide?
 API to define the input to a comparison
 Extensions for associating viewers with input types
 Containers to host comparisons in the UI
 A differencing engine
 API and actions related to file system resources
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
4
Overview of Compare Architecture
Compare Container
File System Repository Database
Compare Input
Compare Viewers
JDT
rightleft
ancestor
Clients
EMF
Model Providers
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
5
Compare/Merge viewers
• A simple text merge viewer and the JDT merge viewer
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
6
How to create the simplest Compare Editor?
• Ingredients:
 A CompareItem that implements
 ITypedElement for name, image and content type of the object
 IModificationDate for timestamp
 IStreamContentAccessor to supply the content
 CompareEditorInput subclass
 DiffNode computed in a CompareEditorInput subclass
 To specify which of the panes is editable use
CompareConfiguration
 An action to open the editor
 A contribution in org.eclipse.ui.popupMenus extension point
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
7
The input and the item
© Copyright 2008 IBM Corp. All rights reserved. This source code is
made available under the terms of the Eclipse Public License, v1.0.
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
8
The action and the popup menu entry
© Copyright 2008 IBM Corp. All rights reserved. This source code is
made available under the terms of the Eclipse Public License, v1.0.
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
9
The result
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
10
The panes of a Compare Editor
contentMergeViewers JavaContentViewerCreator
structureCreators
structureMergeViewers
ZipFileStructureCreator
JavaStructureDiffViewerCreator
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
11
News
• Richer Compare Editor
• Local diff
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
12
IRC, newsgroups and bugzilla
• IRC:
 Freenode: irc.freenode.net
 #eclipse, #eclipse-dev
 SzymonB, z4z4
 http://wiki.eclipse.org/IRC
• Newsgroups
 eclipse.platform
 More info: http://www.eclipse.org/newsgroups/
• Bugzilla
 https://bugs.eclipse.org
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
13
Web and mail
• Web
 http://www.eclipse.org
 http://wiki.eclipse.org/Workspace_Team
 http://planeteclipse.org
 http://polishineclipse.blogspot.com
• Mail
 Tomasz.Zarna@pl.ibm.com
 Szymon.Brandys@pl.ibm.com
 Pawel.Pogorzelski@pl.ibm.com
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
14
Questions
Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under
the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15
Eclipse Demo Camp 2008
15
Legal Notices
• Java and all Java-based trademarks are trademarks
of Sun Microsystems, Inc. in the United States, other
countries, or both
• Other company, product, or service names may be
trademarks or service marks of others
• Question mark graphic is taken from Wikimedia
Commons and is part of the public domain

Contenu connexe

Tendances

codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010
Intland Software GmbH
 
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Open Source Experience
 

Tendances (20)

Modular Web Applications based on OSGi - Jochen Hiller
Modular Web Applications based on OSGi - Jochen HillerModular Web Applications based on OSGi - Jochen Hiller
Modular Web Applications based on OSGi - Jochen Hiller
 
Update on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert GroupUpdate on the OSGi Enterprise Expert Group
Update on the OSGi Enterprise Expert Group
 
Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)Tycho Tutorial (EclipseCon 2012)
Tycho Tutorial (EclipseCon 2012)
 
Linking
LinkingLinking
Linking
 
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinarMove Desktop Apps to the Cloud - RollApp & Embarcadero webinar
Move Desktop Apps to the Cloud - RollApp & Embarcadero webinar
 
Eclipse
EclipseEclipse
Eclipse
 
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
swampUP: Over-The-Air (OTA) firmware upgrades for Internet of Things devices ...
 
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
INF104 - HCL Domino AppDev Pack – The Future of Domino App Dev Nobody Knows A...
 
Seattle Cassandra Users: An OSS Java Abstraction Layer for Cassandra
Seattle Cassandra Users: An OSS Java Abstraction Layer for CassandraSeattle Cassandra Users: An OSS Java Abstraction Layer for Cassandra
Seattle Cassandra Users: An OSS Java Abstraction Layer for Cassandra
 
Building Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applicationsBuilding Server-Side Eclipse based web applications
Building Server-Side Eclipse based web applications
 
Getting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in AdaGetting started with IBM Rational Rhapsody in Ada
Getting started with IBM Rational Rhapsody in Ada
 
ADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized worldADDO 2019 DevOps in a containerized world
ADDO 2019 DevOps in a containerized world
 
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
APIdays Paris 2019 - Real World Graphene: Lessons Learned from Building a Gra...
 
codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010codeBeamer Eclipse DemoCamp-23.11.2010
codeBeamer Eclipse DemoCamp-23.11.2010
 
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
 
Overview
OverviewOverview
Overview
 
PHP And Silverlight - DevDays session
PHP And Silverlight - DevDays sessionPHP And Silverlight - DevDays session
PHP And Silverlight - DevDays session
 
“Full-stack developer: з чого розпочати кар’єру?”
 “Full-stack developer: з чого розпочати кар’єру?”  “Full-stack developer: з чого розпочати кар’єру?”
“Full-stack developer: з чого розпочати кар’єру?”
 
An introduction to papyrus
An introduction to papyrusAn introduction to papyrus
An introduction to papyrus
 
Asp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech SoftwareAsp.NETZERO - A Workshop Presentation by Citytech Software
Asp.NETZERO - A Workshop Presentation by Citytech Software
 

En vedette (6)

What is new in Helios
What is new in HeliosWhat is new in Helios
What is new in Helios
 
Equinox/p2 - Getting started with Equinox/p2
Equinox/p2 - Getting started with Equinox/p2Equinox/p2 - Getting started with Equinox/p2
Equinox/p2 - Getting started with Equinox/p2
 
המלצות
המלצותהמלצות
המלצות
 
Orion Introduction
Orion IntroductionOrion Introduction
Orion Introduction
 
Creative Commons และแนวคิดลิขสิทธิ์
Creative Commons และแนวคิดลิขสิทธิ์Creative Commons และแนวคิดลิขสิทธิ์
Creative Commons และแนวคิดลิขสิทธิ์
 
Git migration - Lessons learned
Git migration - Lessons learnedGit migration - Lessons learned
Git migration - Lessons learned
 

Similaire à Compare framework

Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...
Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...
Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...
bethtib
 
2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
Etienne Juliot
 

Similaire à Compare framework (20)

ABC of Platform Workspace
ABC of Platform WorkspaceABC of Platform Workspace
ABC of Platform Workspace
 
Android and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
Android and OSGi Can They Work Together - BJ Hargrave & Neil BartlettAndroid and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
Android and OSGi Can They Work Together - BJ Hargrave & Neil Bartlett
 
Whats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ HargraveWhats Next for OSGi? - BJ Hargrave
Whats Next for OSGi? - BJ Hargrave
 
Eclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricksEclipse 3.7 : Tips and tricks
Eclipse 3.7 : Tips and tricks
 
QVT & MTL In Eclipse
QVT & MTL In EclipseQVT & MTL In Eclipse
QVT & MTL In Eclipse
 
Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...
Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...
Make Me an Eclipse View (with less Plumbing): The PTP External Tools Framewor...
 
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
 
What's new in Juno
What's new in JunoWhat's new in Juno
What's new in Juno
 
Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010Building Server-Side Eclipse based web applications 2010
Building Server-Side Eclipse based web applications 2010
 
javagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platformjavagruppen.dk - e4, the next generation Eclipse platform
javagruppen.dk - e4, the next generation Eclipse platform
 
2010 06 22 omg - obeo
2010 06 22   omg - obeo2010 06 22   omg - obeo
2010 06 22 omg - obeo
 
Developer-Friendly CI / CD for Kubernetes
Developer-Friendly CI / CD for KubernetesDeveloper-Friendly CI / CD for Kubernetes
Developer-Friendly CI / CD for Kubernetes
 
E4 UI Demos
E4 UI DemosE4 UI Demos
E4 UI Demos
 
Orion RESTful git API
Orion RESTful git APIOrion RESTful git API
Orion RESTful git API
 
Eclipse Plug-in Develompent Tips And Tricks
Eclipse Plug-in Develompent Tips And TricksEclipse Plug-in Develompent Tips And Tricks
Eclipse Plug-in Develompent Tips And Tricks
 
Flex360 Milan 2008 - Flex & Webservices
Flex360 Milan 2008 - Flex & WebservicesFlex360 Milan 2008 - Flex & Webservices
Flex360 Milan 2008 - Flex & Webservices
 
Red5 Open Source Flash Server
Red5 Open Source Flash ServerRed5 Open Source Flash Server
Red5 Open Source Flash Server
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejenIDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
 
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
Building Eclipse Plugins and RCP Applications with Tycho - ECE 2012
 
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the FutureEclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
Eclipse Demo Camp 2010 - Eclipse e4 – The Status and the Future
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Dernier (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
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
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
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
 
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
 
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
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
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...
 
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...
 
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?
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 

Compare framework

  • 1. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 Compare Framework Basics Tomasz Zarna IBM Krakow Software Lab tomasz.zarna@pl.ibm.com
  • 2. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 2 Agenda • Quick introduction • Simple editor • News • Links • Questions
  • 3. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 3 The Compare Framework • What is the purpose of the Compare framework?  Support comparison of alternate states of a file system or data store • What does the Compare framework provide?  API to define the input to a comparison  Extensions for associating viewers with input types  Containers to host comparisons in the UI  A differencing engine  API and actions related to file system resources
  • 4. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 4 Overview of Compare Architecture Compare Container File System Repository Database Compare Input Compare Viewers JDT rightleft ancestor Clients EMF Model Providers
  • 5. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 5 Compare/Merge viewers • A simple text merge viewer and the JDT merge viewer
  • 6. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 6 How to create the simplest Compare Editor? • Ingredients:  A CompareItem that implements  ITypedElement for name, image and content type of the object  IModificationDate for timestamp  IStreamContentAccessor to supply the content  CompareEditorInput subclass  DiffNode computed in a CompareEditorInput subclass  To specify which of the panes is editable use CompareConfiguration  An action to open the editor  A contribution in org.eclipse.ui.popupMenus extension point
  • 7. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 7 The input and the item © Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0.
  • 8. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 8 The action and the popup menu entry © Copyright 2008 IBM Corp. All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0.
  • 9. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 9 The result
  • 10. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 10 The panes of a Compare Editor contentMergeViewers JavaContentViewerCreator structureCreators structureMergeViewers ZipFileStructureCreator JavaStructureDiffViewerCreator
  • 11. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 11 News • Richer Compare Editor • Local diff
  • 12. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 12 IRC, newsgroups and bugzilla • IRC:  Freenode: irc.freenode.net  #eclipse, #eclipse-dev  SzymonB, z4z4  http://wiki.eclipse.org/IRC • Newsgroups  eclipse.platform  More info: http://www.eclipse.org/newsgroups/ • Bugzilla  https://bugs.eclipse.org
  • 13. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 13 Web and mail • Web  http://www.eclipse.org  http://wiki.eclipse.org/Workspace_Team  http://planeteclipse.org  http://polishineclipse.blogspot.com • Mail  Tomasz.Zarna@pl.ibm.com  Szymon.Brandys@pl.ibm.com  Pawel.Pogorzelski@pl.ibm.com
  • 14. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 14 Questions
  • 15. Compare Framework | Copyright © IBM Corp., 2008. All rights reserved. Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. | 2008-11-15 Eclipse Demo Camp 2008 15 Legal Notices • Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both • Other company, product, or service names may be trademarks or service marks of others • Question mark graphic is taken from Wikimedia Commons and is part of the public domain

Notes de l'éditeur

  1. Tomasz Zarna, IBM KSL since 2 years, 1 year eclipse committer in Compare, Team, CVS
  2. The Compare Framework allows to compare alternate states of a file system, or in the simplest case: two files or two different versions of the same file. In some cases we’re comparing 3 files at the same time but I’ll talk about it in a minute. What does the framework provide? It gives us the API to define the input to a comparison because we need a way to point what to compare. It gives as extensions for associating viewers with input types because sometimes we want to compare different types of inputs in a different way (using different viewers). And finally it gives us containers to display the result in the UI, so we don’t need to the UI part from the scratch. Diff engine: For tree or range based differences , API and action: Compare with Each Other, Local History, Apply Patch
  3. Here is a quick view on the compare architecture. As I said we usually compare two states of a file, named „left” and „right” here. If there is a third one it’s treated as a common ancestor of the previous two. Comparison result is displayed in compare viewers, which can support specific model providers like JDT or EMF. There are many clients of the compare framework, some of the are shown at the top.
  4. What do we need to create the simplest compare editor? First we will need a CompareItem that represents a resource we are going to compare. Then we will need a CompareEditorInput class that manages the panes of the comparison. Diff nodes are used as the compare result of the differencing engine. With CompareConfiguration we can set details of the comparison, like which of the panes is editable or set lables for panes.
  5. Let’s take a look at the code. As mentioned before we need to subclass the CompareEditorInput. In the simplest example we will only implement the prepareInput method. Inside we will create 3 CompareItems, set lables for compare panes and create the DiffNode. In the action class all we need to do is open a compare editor and pass our compare input as an argument.
  6. Now let’s have a look at the CompareItem class. It implements 3 interfaces, but because we want to keep it as simple as possible the implementation is rather straightforward. Definition of the popupMenus extension point is also trivial.
  7. And here is the result!
  8. Here you can see how structure viewers can be used. This is a result of comparing two zip archives. There is a change in the Three.java file. We can see where is it located by looking at the „Zip Archive Compare” pane, on the right in the „Java Structure Compare” pane we can see what parts of the java files has been changed. Below we can see what exactly happened.
  9. Some of you have probably noticed that when comparing Java files, the Compare Editor doesn’t give us many Java Editor editor as it could. We’re working on making these diffs less visible, by adding more Java features to Compare Editor. Some of the bugs are even 7 years old, but that’s a good thing because if the bug is older more people will be happy when it’s finally fixed :)