Your SlideShare is downloading. ×
0
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

GEF SVG export in JWT: a newcomer’s rocky ride to Eclipse

1,223

Published on

A walkthrough about a pragmatic bug resolution by a junior Eclipse contributor: SVG diagram export in Java Workflow Tooling. …

A walkthrough about a pragmatic bug resolution by a junior Eclipse contributor: SVG diagram export in Java Workflow Tooling.

First presented in the Eclipse Juno Democamp in Grenoble, on the 13th ofJuno, 2012.

Published in: Technology, Art & Photos
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,223
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. GEF SVG export in JWTA newcomer’s rocky ride to EclipseEclipse DemoCamp Grenoble 2012 Yoann Rodière (Open Wide, FR) thanks to Marc Dutoo (Open Wide, FR) Confidential | Date | Other Information, if necessary © 2002 IBM Corporation
  • 2. SVG export in JWT • Bug #327563 (since 2010) • Why export? – JWT (Java Workflow Tooling) is all about modeling – Modeling is all about communication – Diagram export, i.e. communicating ones work, is unavoidable! • Why SVG? – (besides throwing a poor newbie in heavily mined territory) – Indeed, JWT already has image export : PNG, JPG – … but tell that to an image professional and hell laugh! – Users need a scalable, “zoom-able”, vector formatEclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 2
  • 3. License headaches ahead • Obviously, well need a library • Unfortunately, no such feature in GEF • Image Export Plugin - Thomas Mayer – Supports PDF, EPS, … SVG! – GPLd “The Eclipse Public License is similar to the Common Public License” “[...] its weak copyleft and choice of law clause make it incompatible with the GNU GPL” Copyright © 2011 Free Software Foundation, Inc. http://www.gnu.org/licenses/license-list.html#SoftwareLicenses Well, theres always a way to argue, but... Lawyers are dangerous!Eclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 3
  • 4. And now what? • Lets get back to basics • How to create SVG files? – Apache Batik – Already in Orbit! => Faster CQ re-approval by the IP team • Problem: Batik targets AWT – Eclipse => SWT – We need a bridge!Eclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 4
  • 5. Software from the back of the attic • Holongate: a bridge between Java2D (AWT) and Draw2D (SWT) – Not in Orbit – Some strange JNI, system-dependent code in their repo – Old • Started in 2004 • Last updated in 2007, Eclipse 3.1 (is it still alive?) Whats unknown is dangerous! – Lawyers ahead! – Compatibility issues (OS, Eclipse 3.8 vs 3.1) – Old dependencies • Obsolete versions? • Version conflicts? – … with Juno release ever closer (and IP Team ever busier)!Eclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 5
  • 6. Getting around APIs (1) • Another bridge: GMF (ever heard about GMF?) – Class GraphicsToGraphics2DAdaptor – But... • Aims at implementing SVG export for GMF only • Therefore internal... how selfish! What you cant control is dangerous! – Relying on private APIs is relying on chance – Know about Murphys Law? ;) • As Einstein said, “**Yearly releases** dont play dice”Eclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 6
  • 7. Getting around APIs (2) • So, game over? • No! We could go the strict, right way... – Use the public API where it exposes SVG export services – Which would mean using GMF and not only GEF • … or the quick, practical way – Copy/paste what we need – Add comments to point to the original code – Keep all copyright notices – File a CQ What does not change... is quite safe! – Code is known & already running – No API change to fear – Complete control over the code to fix bugs • e.g. implement unsupported operations such as setTextAntialias – Switch to GMF API is straightforward if the classes are ever made publicEclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 7
  • 8. Whats next? • Clean up the mess – “Solution” doesnt mean “definitive”; ours was quick but not perfect – Assess Holongate (now weve got the time) – Ask GMF for an API extension • Provide other exports...? – See later with Marc ;)Eclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 8
  • 9. Conclusion • For a junior Eclipse contributor – Beware of licenses – Beware of unknown software – Beware of unstable APIs (internal... or not) – Believe in iterative development ;) • For a senior Eclipse contributor – Beware of junior Eclipse contributors!Eclipse Foundation, Inc. | © 2012 by the Open Wide. Made available under the EPL v1.0 9

×