SlideShare a Scribd company logo
1 of 26
Download to read offline
Share and Enjoy!
Alexander Nyßen
itemis AG
4
Continue to
GEF 3.x / Zest 1.x
• Mature project with quite long history
• Base technology with lot's of users (direct & indirect through
GMF/Graphiti)
• Stable API, no breaking API changes since 2004 (GEF 3.0)
• Ready for CBI (migration to Git, Maven/Tycho completed)
• But API is organically evolved and there are ~400
bugzillas, out of which several require to break it
SomeTopics for a Renewal
• Re-thinking current componentization
• Support for the E4 application model
• Support for rotation and other transformations
• Support for curved connections
• Support for other rendering platforms than SWT
• Multi-touch gestures support
• Revision of the command framework
• Revision of connection handling (clipping container)
• Various renamings and restructurings on the detail level...
Zest 2 (since 2010)
• A provisional Zest 2 component was initiated in 2010, to
develop the next generation Zest API.
• Goal was to develop a new version of Zest in parallel to the
maintenance of Zest 1.x., with an - up to the final
graduation - provisional API
• Sources were intended to be placed in its own Zest2 Git
repository, results were published separately via Eclipse
Marketplace.
GEF4 (since 2011)
• GEF4 was initiated - in analogy to Zest 2 - to develop the next
generation Draw2d and GEF (MVC) API.
• Similar to Zest2, development was intended to take place in
parallel to maintenance of Draw2d / GEF (MVC) 3.x
• Initial plans (prior to 3.8):
• Create new double-precision Geometry API before Juno
release.
• Start to migrate the Draw2d and GEF (MVC) code base on a
step-by-step basis afterwards.
GEF4 + Zest 2 = GEF4
Modified plan: 

Unification of both approaches after Juno!
GEF4 - A Unified Approach
• A unified approach with a shared code base and a
common namespace (org.eclipse.gef4) for all plug-ins.
• Advantages:
• Clear distinction between GEF proper as the production
component and GEF4 as the provisional one
• Chance to not only refactor GEF components but the
componentization itself, which is only "historically" justified.
GEF4 - Status Quo
• GEF4 Geometry component was initiated in 2011, work has been
finalized with the Juno release:
• Functionally complete (at least for now)
• 344 JUnit tests, ~77% instruction coverage
• GEF4 Graphics component was initiated directly after Juno and is
currently under work:
• Functionally nearly complete for SWT/AWT, intended JavaFX adoption
about to start
• Still limited tests and quite a bit of adjustment needed w.r.t. "platform-
specific" issues of SWT
GEF4 - Status Quo (continued)
• GEF4 Zest was transferred to Git repository (and update-
site) but not yet adopted:
• Zest2 plug-ins were renamed to org.eclipse.gef4.zest.*
• Dependencies on Draw2d 3.x still have to be factored out
GEF4 Geometry
• No distinction in low and high precision, but just a single double-precision
API (with built-in imprecision for comparisons).
• Different geometric abstractions for different purposes:
• Euclidean (Vector, Straight,Angle)
• Projective (Vector3D, Straight3D)
• Planar (Point, Dimension, Line, QuadraticCurve, CubicCurve,
BezierCurve, Polyline, PolyBezier, Ellipse, Rectangle, Pie,Arc, Polygon,
CurvedPolygon, RoundedRectangle, Ring, Region, Path)
• Conversions to/from AWT and SWT (and between them)
GEF4 Planar Geometry - Features
• Support for "non-standard" geometries:
• Arbitrary Bezier curves, curved polygons
• Approximation via BezierCurves & Interpolation via PolyBeziers
• Characteristics-related core abstractions (IGeometry, ICurve, IShape,
IMultiShape)
• Construction-related base-classes (AbstractRectangleBased-
Geometry,AbstractPointListBasedGeometry,...)
• Direct support for affine transformations (ITranslatable, IScalable,
IRotatable)
• No direct SWT dependencies (SWT-related conversions bundled in
optional plug-in)
GEF4 Planar Geometry - Overview
GEF4 Planar Geometry - Abstractions
GEF4 Planar Geometry - Base Classes
GEF4 Geometry - Examples
GEF4 Geometry - Sample Code
// Bezier approximation of curves
BezierCurve[] fromCurve = curve.toBezier();
BezierCurve[] fromShape = shape.getOutline().toBezier();
ICurve[] fromPolyShape = polyShape.getOutlineSegments();
List<BezierCurve> beziers = new ArrayList<BezierCurve>();
for (ICurve c : fromPolyShape)
beziers.addAll(Arrays.asList(c.toBezier()));
// PolyBezier interpolation
PolyBezier interpolation = PolyBezier.interpolateCubic(p0, p1, p2, p3, ...);
// support for affine transformations
Polygon rhomb = new Rectangle(10, 10, 10, 10).getRotatedCCW(Angle.fromDeg(45));
PolyBezier slanted = new Ellipse(100, 100, 100, 50).getRotatedCCW(Angle.fromDeg(30));
Ring rotatedClippingArea = region.getRotatedCCW(Angle.fromDeg(300));
GEF4 Graphics
• Support for rendering (planar) geometries, images, and text
on an underlying Canvas/Graphics
• Key abstractions (Font, Image, Color) and transparent
support for multiple widget toolkits (SWT,AWT, JavaFX*)
• Save push/pop/restore and get/set of graphics state
• Combinations of advanced graphics features like xor-mode,
patterns (color, gradient, image), affine transformations, etc.
• Extensible image processing support (Pixel-Filter, Channel-
Filter, Convolution-Filter)
*) Graphics based on JavaFX Canvas API already prototyped byTom Schindl
GEF4 Graphics - Features
GEF4 Graphics - Overview
GEF4 Graphics - Examples
GEF4 Graphics - Sample Code
// prepare geometries
final Ellipse ellipse = new Ellipse(50, 50, 350, 200);
final Rectangle rectangle = new Rectangle(100, 160, 125, 220);
final Polygon triangle = new Polygon(260, 170, 190, 300, 330, 300);
// prepare colors
final Color red = new Color(255, 0, 0);
final Color darkRed = new Color(128, 0, 0);
final Color blue = new Color(0, 0, 255);
final Color green = new Color(0, 255, 0);
final Color darkGreen = new Color(0, 128, 0);
g.setLineWidth(4);
g.pushState(); // save the current set of properties on the stack
g.setFill(red).setDraw(darkRed).setDashArray(25, 10);
g.fill(ellipse).draw(ellipse.getOutline());
g.restoreState(); // restore the previously saved properties
g.setFill(blue).setLineJoin(LineJoin.ROUND).setLineCap(LineCap.ROUND);
g.fill(rectangle).draw(rectangle.getOutline());
g.popState(); // removes the previously saved properties from the stack
// and enables the properties that were set in advance
g.setFill(green).setDraw(darkGreen).setLineJoin(LineJoin.MITER);
g.fill(triangle).draw(triangle.getOutline());
GEF4 Graphics - More Sample Code
• Java2D:
• GEF4 Graphics (Java2D & SWT):
g2d.translate(50, 50);
g2d.setPaint(new RadialGradientPaint(new Point(50, 50), 50, new Point(
40, 40), new float[] { 0, .5f, 1 }, new Color[] {
new Color(255, 255, 255), new Color(255, 0, 0),
new Color(0, 0, 0) }, CycleMethod.REFLECT));
g2d.fill(new Rectangle(0, 0, 200, 200));
g.translate(50, 50);
Ellipse ellipse = new Ellipse(0, 0, 100, 100);
g.setFill(new Gradient.Radial(ellipse, ellipse
.getCenter().translate(-10, -10), CycleMode.REFLECT)
.addStop(0.0, new Color(255, 255, 255))
.addStop(0.5, new Color(255, 0, 0))
.addStop(1.0, new Color(0, 0, 0)));
g.fill(new Rectangle(0, 0, 200, 200));
GEF4 - Outlook (Mid-Term)
• GEF4 Layouts is planned:
• Data model for layout computations (based on Draw2d/
Zest DirectedGraphLayout)
• Set of layout algorithms based on it (Draw2d & Zest)
• GEF4 'Glyphs' is planned:
• Figures/Shapes abstractions inspired by Draw2d, SVG, and
JavaFX (SceneGraph)
• Intended as replacement of Draw2d 'core'
GEF4 - Outlook (Long-Term)
• Adoption of migrated Zest components to new GEF4
Geometry, Graphics, Canvas, Layouts components
• Migration of remaining Draw2d/GEF (MVC) code base,
including re-modularization and adoption
Share & Enjoy - Please get involved!
• Evaluate and Provide Feedback!
• Try out early snapshots!
• Report bugs, report enhancement requests!
• Contribute!
• Participate in discussions (bugzilla, mailing list)
• Supply patches
ThankYou! Questions?
http://wiki.eclipse.org/GEF/GEF4

More Related Content

Similar to GEF4 - Continue to Share and Enjoy!

The Next Generation Eclipse Graphical Editing Framework
The Next Generation Eclipse Graphical Editing FrameworkThe Next Generation Eclipse Graphical Editing Framework
The Next Generation Eclipse Graphical Editing FrameworkAlexander Nyßen
 
Introduction to Griffon
Introduction to GriffonIntroduction to Griffon
Introduction to GriffonJames Williams
 
dojox.gfx : the foundation for your crossbrowser advanced visualization.
dojox.gfx : the foundation for your crossbrowser advanced visualization.dojox.gfx : the foundation for your crossbrowser advanced visualization.
dojox.gfx : the foundation for your crossbrowser advanced visualization.pruzand
 
Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization releaseESUG
 
Porting legacy apps to Griffon
Porting legacy apps to GriffonPorting legacy apps to Griffon
Porting legacy apps to GriffonJames Williams
 
State of GeoServer 2015
State of GeoServer 2015State of GeoServer 2015
State of GeoServer 2015Jody Garnett
 
Creating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartCreating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartDavid Keener
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesBryan Duggan
 
Decentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsDecentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsAksw Group
 
SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSébastien Levert
 
Fortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASFortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASJongsu "Liam" Kim
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech ProjectsJody Garnett
 
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...eCommConf
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9Ivan Krylov
 

Similar to GEF4 - Continue to Share and Enjoy! (20)

The Next Generation Eclipse Graphical Editing Framework
The Next Generation Eclipse Graphical Editing FrameworkThe Next Generation Eclipse Graphical Editing Framework
The Next Generation Eclipse Graphical Editing Framework
 
Gephi Toolkit Tutorial
Gephi Toolkit TutorialGephi Toolkit Tutorial
Gephi Toolkit Tutorial
 
Introduction to Griffon
Introduction to GriffonIntroduction to Griffon
Introduction to Griffon
 
dojox.gfx : the foundation for your crossbrowser advanced visualization.
dojox.gfx : the foundation for your crossbrowser advanced visualization.dojox.gfx : the foundation for your crossbrowser advanced visualization.
dojox.gfx : the foundation for your crossbrowser advanced visualization.
 
Griffon Presentation
Griffon PresentationGriffon Presentation
Griffon Presentation
 
Pharo 11: A stabilization release
Pharo 11: A stabilization releasePharo 11: A stabilization release
Pharo 11: A stabilization release
 
Porting legacy apps to Griffon
Porting legacy apps to GriffonPorting legacy apps to Griffon
Porting legacy apps to Griffon
 
State of GeoServer 2015
State of GeoServer 2015State of GeoServer 2015
State of GeoServer 2015
 
Creating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChartCreating Dynamic Charts With JFreeChart
Creating Dynamic Charts With JFreeChart
 
JS Essence
JS EssenceJS Essence
JS Essence
 
Scene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game EnginesScene Graphs & Component Based Game Engines
Scene Graphs & Component Based Game Engines
 
Decentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF GraphsDecentralized Evolution and Consolidation of RDF Graphs
Decentralized Evolution and Consolidation of RDF Graphs
 
SharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure FunctionsSharePoint Framework, Angular and Azure Functions
SharePoint Framework, Angular and Azure Functions
 
Advanced Java Testing
Advanced Java TestingAdvanced Java Testing
Advanced Java Testing
 
Fortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLASFortran & Link with Library & Brief Explanation of MKL BLAS
Fortran & Link with Library & Brief Explanation of MKL BLAS
 
LocationTech Projects
LocationTech ProjectsLocationTech Projects
LocationTech Projects
 
JSF2
JSF2JSF2
JSF2
 
Introducing E-Cell 3.2
Introducing E-Cell 3.2Introducing E-Cell 3.2
Introducing E-Cell 3.2
 
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
Tim Panton - Presentation at Emerging Communications Conference & Awards (eCo...
 
What to expect from Java 9
What to expect from Java 9What to expect from Java 9
What to expect from Java 9
 

Recently uploaded

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf31events.com
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsChristian Birchler
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentationvaddepallysandeep122
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 

Recently uploaded (20)

Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Sending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdfSending Calendar Invites on SES and Calendarsnack.pdf
Sending Calendar Invites on SES and Calendarsnack.pdf
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving CarsSensoDat: Simulation-based Sensor Dataset of Self-driving Cars
SensoDat: Simulation-based Sensor Dataset of Self-driving Cars
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
PREDICTING RIVER WATER QUALITY ppt presentation
PREDICTING  RIVER  WATER QUALITY  ppt presentationPREDICTING  RIVER  WATER QUALITY  ppt presentation
PREDICTING RIVER WATER QUALITY ppt presentation
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 

GEF4 - Continue to Share and Enjoy!

  • 1. Share and Enjoy! Alexander Nyßen itemis AG 4 Continue to
  • 2. GEF 3.x / Zest 1.x • Mature project with quite long history • Base technology with lot's of users (direct & indirect through GMF/Graphiti) • Stable API, no breaking API changes since 2004 (GEF 3.0) • Ready for CBI (migration to Git, Maven/Tycho completed) • But API is organically evolved and there are ~400 bugzillas, out of which several require to break it
  • 3. SomeTopics for a Renewal • Re-thinking current componentization • Support for the E4 application model • Support for rotation and other transformations • Support for curved connections • Support for other rendering platforms than SWT • Multi-touch gestures support • Revision of the command framework • Revision of connection handling (clipping container) • Various renamings and restructurings on the detail level...
  • 4. Zest 2 (since 2010) • A provisional Zest 2 component was initiated in 2010, to develop the next generation Zest API. • Goal was to develop a new version of Zest in parallel to the maintenance of Zest 1.x., with an - up to the final graduation - provisional API • Sources were intended to be placed in its own Zest2 Git repository, results were published separately via Eclipse Marketplace.
  • 5. GEF4 (since 2011) • GEF4 was initiated - in analogy to Zest 2 - to develop the next generation Draw2d and GEF (MVC) API. • Similar to Zest2, development was intended to take place in parallel to maintenance of Draw2d / GEF (MVC) 3.x • Initial plans (prior to 3.8): • Create new double-precision Geometry API before Juno release. • Start to migrate the Draw2d and GEF (MVC) code base on a step-by-step basis afterwards.
  • 6. GEF4 + Zest 2 = GEF4 Modified plan: 
 Unification of both approaches after Juno!
  • 7. GEF4 - A Unified Approach • A unified approach with a shared code base and a common namespace (org.eclipse.gef4) for all plug-ins. • Advantages: • Clear distinction between GEF proper as the production component and GEF4 as the provisional one • Chance to not only refactor GEF components but the componentization itself, which is only "historically" justified.
  • 8. GEF4 - Status Quo • GEF4 Geometry component was initiated in 2011, work has been finalized with the Juno release: • Functionally complete (at least for now) • 344 JUnit tests, ~77% instruction coverage • GEF4 Graphics component was initiated directly after Juno and is currently under work: • Functionally nearly complete for SWT/AWT, intended JavaFX adoption about to start • Still limited tests and quite a bit of adjustment needed w.r.t. "platform- specific" issues of SWT
  • 9. GEF4 - Status Quo (continued) • GEF4 Zest was transferred to Git repository (and update- site) but not yet adopted: • Zest2 plug-ins were renamed to org.eclipse.gef4.zest.* • Dependencies on Draw2d 3.x still have to be factored out
  • 10. GEF4 Geometry • No distinction in low and high precision, but just a single double-precision API (with built-in imprecision for comparisons). • Different geometric abstractions for different purposes: • Euclidean (Vector, Straight,Angle) • Projective (Vector3D, Straight3D) • Planar (Point, Dimension, Line, QuadraticCurve, CubicCurve, BezierCurve, Polyline, PolyBezier, Ellipse, Rectangle, Pie,Arc, Polygon, CurvedPolygon, RoundedRectangle, Ring, Region, Path) • Conversions to/from AWT and SWT (and between them)
  • 11. GEF4 Planar Geometry - Features • Support for "non-standard" geometries: • Arbitrary Bezier curves, curved polygons • Approximation via BezierCurves & Interpolation via PolyBeziers • Characteristics-related core abstractions (IGeometry, ICurve, IShape, IMultiShape) • Construction-related base-classes (AbstractRectangleBased- Geometry,AbstractPointListBasedGeometry,...) • Direct support for affine transformations (ITranslatable, IScalable, IRotatable) • No direct SWT dependencies (SWT-related conversions bundled in optional plug-in)
  • 12. GEF4 Planar Geometry - Overview
  • 13. GEF4 Planar Geometry - Abstractions
  • 14. GEF4 Planar Geometry - Base Classes
  • 15. GEF4 Geometry - Examples
  • 16. GEF4 Geometry - Sample Code // Bezier approximation of curves BezierCurve[] fromCurve = curve.toBezier(); BezierCurve[] fromShape = shape.getOutline().toBezier(); ICurve[] fromPolyShape = polyShape.getOutlineSegments(); List<BezierCurve> beziers = new ArrayList<BezierCurve>(); for (ICurve c : fromPolyShape) beziers.addAll(Arrays.asList(c.toBezier())); // PolyBezier interpolation PolyBezier interpolation = PolyBezier.interpolateCubic(p0, p1, p2, p3, ...); // support for affine transformations Polygon rhomb = new Rectangle(10, 10, 10, 10).getRotatedCCW(Angle.fromDeg(45)); PolyBezier slanted = new Ellipse(100, 100, 100, 50).getRotatedCCW(Angle.fromDeg(30)); Ring rotatedClippingArea = region.getRotatedCCW(Angle.fromDeg(300));
  • 17. GEF4 Graphics • Support for rendering (planar) geometries, images, and text on an underlying Canvas/Graphics • Key abstractions (Font, Image, Color) and transparent support for multiple widget toolkits (SWT,AWT, JavaFX*) • Save push/pop/restore and get/set of graphics state • Combinations of advanced graphics features like xor-mode, patterns (color, gradient, image), affine transformations, etc. • Extensible image processing support (Pixel-Filter, Channel- Filter, Convolution-Filter) *) Graphics based on JavaFX Canvas API already prototyped byTom Schindl
  • 18. GEF4 Graphics - Features
  • 19. GEF4 Graphics - Overview
  • 20. GEF4 Graphics - Examples
  • 21. GEF4 Graphics - Sample Code // prepare geometries final Ellipse ellipse = new Ellipse(50, 50, 350, 200); final Rectangle rectangle = new Rectangle(100, 160, 125, 220); final Polygon triangle = new Polygon(260, 170, 190, 300, 330, 300); // prepare colors final Color red = new Color(255, 0, 0); final Color darkRed = new Color(128, 0, 0); final Color blue = new Color(0, 0, 255); final Color green = new Color(0, 255, 0); final Color darkGreen = new Color(0, 128, 0); g.setLineWidth(4); g.pushState(); // save the current set of properties on the stack g.setFill(red).setDraw(darkRed).setDashArray(25, 10); g.fill(ellipse).draw(ellipse.getOutline()); g.restoreState(); // restore the previously saved properties g.setFill(blue).setLineJoin(LineJoin.ROUND).setLineCap(LineCap.ROUND); g.fill(rectangle).draw(rectangle.getOutline()); g.popState(); // removes the previously saved properties from the stack // and enables the properties that were set in advance g.setFill(green).setDraw(darkGreen).setLineJoin(LineJoin.MITER); g.fill(triangle).draw(triangle.getOutline());
  • 22. GEF4 Graphics - More Sample Code • Java2D: • GEF4 Graphics (Java2D & SWT): g2d.translate(50, 50); g2d.setPaint(new RadialGradientPaint(new Point(50, 50), 50, new Point( 40, 40), new float[] { 0, .5f, 1 }, new Color[] { new Color(255, 255, 255), new Color(255, 0, 0), new Color(0, 0, 0) }, CycleMethod.REFLECT)); g2d.fill(new Rectangle(0, 0, 200, 200)); g.translate(50, 50); Ellipse ellipse = new Ellipse(0, 0, 100, 100); g.setFill(new Gradient.Radial(ellipse, ellipse .getCenter().translate(-10, -10), CycleMode.REFLECT) .addStop(0.0, new Color(255, 255, 255)) .addStop(0.5, new Color(255, 0, 0)) .addStop(1.0, new Color(0, 0, 0))); g.fill(new Rectangle(0, 0, 200, 200));
  • 23. GEF4 - Outlook (Mid-Term) • GEF4 Layouts is planned: • Data model for layout computations (based on Draw2d/ Zest DirectedGraphLayout) • Set of layout algorithms based on it (Draw2d & Zest) • GEF4 'Glyphs' is planned: • Figures/Shapes abstractions inspired by Draw2d, SVG, and JavaFX (SceneGraph) • Intended as replacement of Draw2d 'core'
  • 24. GEF4 - Outlook (Long-Term) • Adoption of migrated Zest components to new GEF4 Geometry, Graphics, Canvas, Layouts components • Migration of remaining Draw2d/GEF (MVC) code base, including re-modularization and adoption
  • 25. Share & Enjoy - Please get involved! • Evaluate and Provide Feedback! • Try out early snapshots! • Report bugs, report enhancement requests! • Contribute! • Participate in discussions (bugzilla, mailing list) • Supply patches