Content deleted Content added
m {{cleanup}} |
Date/fix the maintenance tags or gen fixes |
||
Line 1:
{{Cleanup|date=September 2007}}
'''Graphical Editing Framework''' '''(GEF)''' is a framework that was developed for the [[Eclipse (software)|Eclipse]] platform. It is known as a framework with a very steep learning curve, but it offers some benefits.
Line 31:
=== Request, Response in GEF ===
Any user action can be seen as an example of request. The nature of request is understood by the context of invocation. For the discussion, one can safely say that the "context" is determined by the active "tool". Tool can be any entry in palette that is selected by user. We can say that, user using a tool, generates "Requests". The request is handed over to selected editpart, which inturn returns an "Command".
Line 37:
This is achieved using [[Chain-of-responsibility pattern|Chain of responsibility]] over Editpolicies, the editpolicies determine if they can handle the request, else pass on to the next editpolicy. The order of declaration of editpolicies determine the order in which the request is passed around. The capable editpolicy creates a command. This command is handed back to the tool which initiated the "Request". Execution of the command causes the model to be modified (Response).
One another mechanism to achieve the same is to create Requests programatically and hand them over to Editparts. The command generated can be subsequently executed on the "CommandStack".
== GEF Design patterns ==
In addition to MVC, GEF developers/enthusiasts need to have a good under standing of [[Design Patterns]]. The most recurring design patterns under GEF are [[
* Factory : Creating models from palette, creating
* Observer : Typically a controller (read
* Chain of Responsibility : To decide which
* State pattern: A typical example of which is opening editors for an input model .
|