Content deleted Content added
Added history section. |
Link suggestions feature: 3 links added. |
||
(7 intermediate revisions by 6 users not shown) | |||
Line 1:
{{More citations needed|date=January 2024}}
The '''Graphical Editing Framework''' '''(GEF)''' is an [[Eclipse (software)|Eclipse]] project that provides framework and end-user components related to graphical applications.<ref>{{Cite web |last=Web |first=Eclipse |date=2013-01-31 |title=Eclipse Graphical Editing Framework (GEF) |url=https://projects.eclipse.org/projects/tools.gef |access-date=2024-01-12 |website=projects.eclipse.org |language=en}}</ref>
== History ==
GEF was initially developed as part of IBM's etools (<code>com.ibm.etools.gef</code>) and was contributed to [[Eclipse (software)|Eclipse]] in 2002 in version 2.0.0, consisting then of two components: Draw2d, a 2D visualization component based on the [[Standard Widget Toolkit|Standard Widget Toolkit (SWT)]] and GEF (MVC), a related model-view-controller framework that can be used to
A new major revision of the framework has been developed in parallel to the maintenance of the GEF 3.x components by the project team since 2010. It is a complete redesign that is much more modular, uses JavaFX instead of SWT as underlying rendering framework, and can be used also independently of Eclipse RCP applications. Commonly referred to as GEF4, its components were initially released in version 0.1.0 (with still provisional API) in June 2015 as part of the GEF 3.10.0 (Mars) release. The GEF4 components are to be published in version 1.0.0 as part of the GEF 4.0.0 (Neon) release in June 2016.
== GEF 3.x ==
GEF 3.x provides framework technology to realize graphical editors and views as part of [[Eclipse (software)#Rich Client Platform|Eclipse Rich Client Platform (RCP)]] applications. It is internally decomposed into three components:
* Draw2d
▲GEF 3.x provides framework technology to realize graphical editors and views as part of Eclipse RCP applications. It is internally decomposed into three components:
▲* Draw2d - A 2D visualization component based on the Standard Widget Toolkit (SWT)
* GEF (MVC) - A model-view-controller component that can be used to realize graphical editors as part of Eclipse Rich Client Product (RCP) applications
* Zest - A graph-based visualization toolkit that can be used to realize views for visualization of graph-like data structures as part of Eclipse RCP applications
While graphical applications can be
=== Architecture
Editors created with GEF (MVC) consist of the following components:
* The diagram editor including tool palette
Line 25 ⟶ 24:
* Command objects that edit the model and provide [[undo]]-redo
==== Design
GEF makes heavy use of [[design pattern
* [[Model-View-Controller]] is an architectural design pattern which divides an application into separate parts which communicate with each other in a specific way. The goal is to separate data model (model), [[graphical user interface]] (view) and [[business logic]] (controller). GEF uses the MVC pattern extensively.▼
▲* [[Model-View-Controller]] is an architectural design pattern which divides an application into separate parts which communicate with each other in a specific way. The goal is to separate data model (model), graphical user interface (view) and business logic (controller). GEF uses the MVC pattern extensively.
** Model: The data model can either be generated using EMF, self-implemented by the user or it may already exist in case of a legacy software.
** Controller: The EditParts act as controllers. Typically, each model element has its matching EditPart. EditParts may contain other EditParts thereby matching model elements containing other model elements. EditParts also have a reference to the figure which graphically represents the model element. Finally, EditParts evaluate requests and create the appropriate command to edit the underlying model.
Line 38 ⟶ 36:
* [[Chain-of-responsibility pattern|Chain of responsibility]]: To decide which EditPolicy should handle a Request
==== Request and
Any user action with the editor can generate a request. The nature of the request is understood by the context of invocation. The context is determined by the EditPart the user interacts with and the active tool. The tool can be any selected entry in a tool palette. The request is handed over to the selected EditPart, which in turn returns a Command.
This is achieved using the [[Chain-of-responsibility pattern|
==References==
{{Reflist}}
==External links==
* [
{{Eclipse Foundation}}
|