|Moving GMF-independent code to GEF? [message #891546]
||Mon, 25 June 2012 04:17
| Yoann Rodiere
Registered: October 2011
I heard on June 13th at the Eclipse Democamp Grenoble (France) that some portions of the GMF code which rely only on GEF might be moved to GEF in the future, if it proved useful. And I'd like to say that there is people which might benefit from this. Because, yes, there's still some people using raw GEF
We -- at Eclipse SOA JWT -- just tried to implement SVG export for our (GEF) diagrams, and we finally decided to copy your very useful utilities in our project to do so. This includes in particular the "org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.svg.export.GraphicsSVG" and "org.eclipse.gmf.runtime.draw2d.ui.render.awt.internal.graphics.GraphicsToGraphics2DAdaptor" classes. As Mickaël Istria and Aurélien Pupier saw when we met, that was our "less bad" solution at the moment: the core of these utilities is more or less GMF-independent, but unfortunately the public API to use them is not. Obviously we kept the copyright notices and released everything under the same EPL license. For the record, the corresponding bug report is #327563.
So here are my two cents: if you can contribute these classes to the GEF project, this could benefit to people using it (at least to JWT ). Regarding the workload, all I can say is that I spent approximately 2 days studying the code, moving it to JWT (including internal dependencies) and integrating it to our project -- keeping in mind that I am (was?) new to both Eclipse and GMF. I chose to comment out SVGImage support in SVG export, though, since we do not use this class internally.
Here is what I learned about GraphicsSVG internal dependency tree, taken from the JWT bug report. This excludes classes available in the GMF public API.
GraphicsSVG itself (the class providing an adaptor between draw2D and Java2D
and returning a SVG dom) has 5 internal dependencies:
GraphicsToGraphics2DAdaptor, its parent class, has 2 more internal dependencies:
And SVGImage needs 5 other internal classes:
I hope this will help taking a decision!