How to build a simple Editor with GEF 4 MVC [message #1701536] |
Tue, 14 July 2015 02:07 |
Patrik Suzzi Messages: 2 Registered: February 2018 |
Junior Member |
|
|
Hallo,
I have Experience with GEF 3.x graphical editors, and I would like to make experiments with GEF4 MVC in an Eclipse E4 Application.
Below there is a schema representing the basic architecture of a GEF 3.x MVC Editor :
The base Ideas in GEF 3.x are :
- There is an Editor class containing a Graphical Viewer.
- There are a Root Edit Part and an Edit Part Factory to initialize the Controllers (EditParts)
- There are Views (Figures) and Models (POJO), independent each other, and controlled by the Controllers.
The GEF4 MVC Technology is quite powerful - because one can build Standalone, Eclipse RCP and Web applications.
Anyway it is not perfectly clear to me - yet , how to implement a Simple GEF4 Editor on E4 Application.
So, this is what I understood :
- No more Draw2D in GEF4 - it uses JavaFx Scene and Parent
- In a Scene graph we can put SWTControls (heavyweight) and Figures (lightweight)
- a Canvas (heaviweight) will contain the JavaFX Figures and also possibly a CanvasFigure (lightweight)
So, if I build an Eclipse E4 application with one ViewPart containing a GEF 4 Editor, I suppose the setup of my application will be as follows:
1. Create An Eclipse E4 Application with JavaFx support
2. Add a ViewPart that contains a Canvas
3. Use GEF4 MVC to Create / Edit my MVC tree.
At this point, it is not very clear to me how to implement the real MVC Architecture in GEF 4.
I expect GEF4 MVC will work in some way like the GEF 3.x - as visible in the top image - but I'm not clear on that.
Therefore, these are questions:
- Is the GEF 4 MVC architecture somewhat equivalent to the GEF 3.x one ?
- Where I can find details on the MVC implementation of GEF 4 ?
- Is there any component to provide - out of the box - a Flyout Palette, like it is available in GEF 3.x ?
Thank you for providing this very powerful library and for spending time on this post.
By the way, I'm available to contribute the project.
Kind Regards.
Patrik
|
|
|
Re: How to build a simple Editor with GEF 4 MVC [message #1701646 is a reply to message #1701536] |
Tue, 14 July 2015 16:11 |
|
[quote title=Patrik Suzzi wrote on Tue, 14 July 2015 04:07]Hallo,
Therefore, these are questions:
- Is the GEF 4 MVC architecture somewhat equivalent to the GEF 3.x one ?
- Where I can find details on the MVC implementation of GEF 4 ?
It is quite comparable in general but has some significant differences in detail. The best entry points for learning about GEF4 MVC is the reference documentation at https://wiki.eclipse.org/GEF/GEF4/MVC. It also provides some information about differences between GEF (MVC) 3.x and GEF4 MVC (last section about migration). The slides provided at http://de.slideshare.net/AlexanderNyssen/gef4-our-mission-to-mars explain some of the concepts (unfortunately the interesting slides concerning MVC seem to have been messed up when uploading the slides; I will try to update them).
- Is there any component to provide - out of the box - a Flyout Palette, like it is available in GEF 3.x ?
No, not yet. I was thinking to integrate it into one of our examples after the Mars SR1 release.
|
|
|
Powered by
FUDForum. Page generated in 0.02361 seconds