Ideas: Improving the GEF Tutorials [message #206528] |
Mon, 02 January 2006 21:20  |
Eclipse User |
|
|
|
Being completely new to GEF, I've found it a bit difficult to get started.
Still, the following two articles from the GEF web site helped
tremendously:
(1) "Create an Eclipse-based application using the Graphical Editing
Framework"
(2) "Building a Database Schema Diagram Editor with GEF"
In my taste, though, there is one thing that could be improved about them:
- Motivation: I like direct manipulation, having things work right away so
that I only incrementally have to change and/or add something to move
everything in the direction I want.
- Difficulty: Starting with an Eclipse editor as the foundation of the
tutorials forces both the details of the Eclipse Rich Client Platform and
of GEF on the poor newbie. Add to that commands, edit policies etc. and
things become very complex.
- Solution: I reduced GraphicalEditor to (what I could make out as) its
core: just a Composite that displays figures. That way, I could start
experimenting right away, with a stand-alone SWT application and just try
out graph drawing. Start-up times are much faster than with the RCP and I
can more easily tweak the basic stuff (i.e., displaying and layouting
graphs, not editing them). This is all I initially need, but now I can add
(and find out about) the more complicated features in a stepwise fashion.
If you are interested in the stripped-down version of GraphicalEditor, let
me know. Be warned though, that I performed the changes from a perspective
that is very uninformed about how things work with GEF.
Axel
|
|
|
|
|
|
Re: Ideas: Improving the GEF Tutorials [message #208302 is a reply to message #207855] |
Mon, 30 January 2006 22:15  |
Eclipse User |
|
|
|
There are some very simple and the best examples in japanese at http://www13.plala.or.jp/observe/index.html#draw2d
Though source-code is good enough to understand those tutorials, someone can put in efforts to translate to english with permission from japanese site.
One more big problem in understanding GEF is ...
1. There are a while lot of interfaces forming the GEF framework. But there are default implementations of those interfaces to serve most of the requirements. Using those default implementations will hide much of the framework from the developer. Though this is pretty good, but developer will never clearly get to know about the behind-scenes. Unless we get to know what's happening, it is always a maze. So atleast one GEF tutorial should cater to building a sample without using most of the defaults. Like ...
1. Create a new tool (extend TargetingTool)
2. Create a new tool-entry (implement ToolEntry)
3. Create a new request (extend Request)
4. Create a new Editpolicy (extend AbstractEditPolicy)
I think if one gets to know about the behind-scenes stuff going on in the path
Tool->Request->EditPart->EditPolicy->
Command->Model->EditPart->Figure, that will be a great help..believe me :-)
I had written a small line-drawing tool to understand the maze. I think some such tutorial is needed, may be at advanced level, but I think GEF development is supposed to be for advanced-users.
Someone had asked for help sometime back on GEF forum to know some low level details. My reply at http://www.eclipsezone.com/eclipse/forums/t62118.html will also help to prepare some appropriate tutorials.
Thanks
~Venkat
|
|
|
Powered by
FUDForum. Page generated in 0.27904 seconds