Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gef-dev] GEF 3.x - GEF (MVC) Component refactoring proposal

Good afternoon,

I'm a GEF developer since 2005 and in the past 9 years I've acquired a deep understanding of both its architecture and features. After the introduction of the Eclipse 4 SDK and the E4 Tools libraries I started to port the Whole Platform, an open source project that uses GEF, to the new E4 API, with the aim to eventually remove all of the org.eclipse.ui dependencies and create an E4 product.

Eventually, I succeeded in the complete removal of all the org.eclipse.ui dependencies from the target project, but I'm stuck with the GEF (MVC) bundle not providing a clean separation of the older UI dependencies.

More specifically, even if I use only the lightweight API (the part of GEF that actually doesn't depend on the org.eclipse.ui) I still have many E3.x workbench dependencies due to the monolithic nature of the org.eclipse.gef bundle.

Last week I tried to move the lightweight part of GEF (MVC) in a separate bundle (calling it org.eclipse.gef.lightweight) and making it a dependency of the base org.eclipse.gef plugin. The newly introduced bundle (org.eclipse.gef.lightweight) depends only on Draw2d, JFace and Core Runtime, while the original one (org.eclipse.gef) maintains the same dependencies while adding and reexporting  the new lightweight bundle.

Basically, the original org.eclipse.gef contains all the E3.x Workbench dependent  stuff (including the GraphicalEditor, PaletteView, ConsoleView, ...) while the lightweight one contains all of the lightweight API (including EditPart, EditPolicy, Requests, ...)

To perform this clean separation I had only to extract a new super class from EditDomain, called LightweightEditDomain, which actually contains all of the EditDomain behavior but the parts pertaining to the PaletteViewer.

The following resources should help the community try and review these developments:

1. The topic branch I started to track the changes from the GitHub fork:

https://github.com/enricopersiani/gef/tree/e4-friendly

2. A prebuilt P2 repository:

http://whole.sourceforge.net/gef-updates

3. The Whole Platform GitHub repository that actually depends only on the GEF Lightweight bundle:

https://github.com/wholeplatform/whole

Best Regards,
Enrico


--
Enrico Persiani
Software Engineer
F: +39 051 19902276
http://www.metatis.com/



Back to the top