ArticleslgStudy

computer science

Graphical Editing Framework

Graphical Editing Framework is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Graphical Editing Framework rather than just read about it. In short: The Graphical Editing Framework (GEF) is an Eclipse project that provides framework and end-user components related to graphical applications. History GEF was initially developed as part of IBM's etools (com.ibm.etools.gef) and was contributed to Eclipse in 2002 in version 2.0.0, consisting then of two components: Draw2d, a 2D visualization component based on the Standard Widget Toolkit (SWT) and GEF (MVC), a relate…

Key takeaways

  • Graphical Editing Framework belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Graphical Editing Framework to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Graphical Editing Framework from memory before moving on to harder problems.

Reference excerpt

The Graphical Editing Framework (GEF) is an Eclipse project that provides framework and end-user components related to graphical applications.

History GEF was initially developed as part of IBM's etools (com.ibm.etools.gef) and was contributed to Eclipse in 2002 in version 2.0.0, consisting then of two components: Draw2d, a 2D visualization component based on the Standard Widget Toolkit (SWT) and GEF (MVC), a related model-view-controller framework that can be used to realize graphical editors as part of Eclipse Rich Client Platform (RCP) applications. The first release at Eclipse was GEF 2.1.0 in March 2003. The next major version, GEF 3.0.0, was released in June 2004, providing many new features like support for rules and guides. Zest was added as a third project component in 2007 in version 1.0.0 as part of the GEF 3.4.0 release. Since 2004, when GEF 3.0.0 was released, only compatible changes have been applied to the framework's application programming interface (API). 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 Rich Client Platform (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 built on top of the GEF 3.x components directly, Draw2d and GEF (MVC) are also used by the Graphical Modeling Framework (GMF), which combines them with the Eclipse Modeling Framework (EMF) to create the code for both the data model and the graphical editor.

Architecture Editors created with GEF (MVC) consist of the following components:

The diagram editor including tool palette Figures which graphically represent the underlying data model elements EditParts which match figures and their respective model elements Request objects for user input EditPolicy objects which evaluate the requests and create appropriate command objects Command objects that edit the model and provide undo-redo

Design pattern usage GEF makes heavy use of design patterns. These patterns are often mandatory under GEF and developers are required to understand them.

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. View: For each element within the model, including connections, a figure has to be implemented using the Draw2d framework. Oftentimes the figure is some geometrical drawing. Factory: Creating models from palette, creating EditParts and creating Figures Observer: Typically a controller (EditPart) listening on Model and View Command: To implement Undo and Redo functions Strategy: EditParts can install and remove EditPolicies dynamically Chain of responsibility: To decide which EditPolicy should handle a Request

Request and response mechanism 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 mechanism over Editpolicies. The editpolicies determine if they can handle the request, otherwise they 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).

References

External links GEF Source Repository

Worked examples

Example 1 — a first encounter with Graphical Editing Framework

Start with the simplest possible case. Write down what Graphical Editing Framework claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Graphical Editing Framework before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Graphical Editing Framework ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Graphical Editing Framework

In research
Graphical Editing Framework appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Graphical Editing Framework in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Graphical Editing Framework is common in secondary-school and first-year university syllabi. It links to neighbouring topics Eclipse (software), Graphics software, so understanding it makes those chapters shorter.
In everyday life
Look for Graphical Editing Framework outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Graphical Editing Framework” →

How to study Graphical Editing Framework in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Graphical Editing Framework means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Graphical Editing Framework out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Graphical Editing Framework in simple terms?

The Graphical Editing Framework (GEF) is an Eclipse project that provides framework and end-user components related to graphical applications. History GEF was initially developed as part of IBM's etools (com.ibm.etools.gef) and was contributed to Eclipse in 2002 in version 2.0.0, consisting then of…

Why does Graphical Editing Framework matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Graphical Editing Framework?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Graphical Editing Framework.

Tags

  • Eclipse (software)
  • Graphics software

Keep exploring