15 minutes to learn Eclipse GMF

Source: Internet
Author: User

Background

Frankly speaking, using the graphical Editor Framework (GEF) to create graphical editors in Eclipse was slow and painful in the past. This process involves understanding complex frameworks and a large number of redundant code. But it also shows that GEF is the best framework to create a graphical editor, because it has nothing to do with the model. On the other hand, there are some problems with model-independent itself.

A GMF of the gossip

GMF's run-time component is IBM® for use with Eclipse Foundation, which was previously supported by IBM rational® modeling products.

GEF is the essence of the Model-view-controller (MVC) mechanism, which allows you to introduce your own model into the table. In the early days of using GEF, most people also used custom models (consider traditional Java objects [Plain old Java™object, POJO]). You will find that the problem with your custom model is that you need to write your own generic code to support the model, such as serialization and listening for model changes.

The next logical step in using the model in GEF is to use the Eclipse Modeling Framework (EMF), which provides the tools to serialize the model in various forms and the ability to listen for changes to the default values of the model.

However, integrating the EMF model with the GEF framework has some technical difficulty (such as different command stacks), leading to the EMF model not being accepted quickly by the GEF based editor. Eventually, the GMF project came into being in this adversity and wanted to introduce a quick way to generate graphical editors. In a similar way, EMF generates a basic editor for the EMF model.

Creating an EMF Model

The first step in creating a model is to define the collaboration object for the EMF model. The purpose of my writing this article is simply to illustrate the process of defining the model, not to delve into the usage of the model-processing tools that EMF provides. The model to be used in this example is a simple graphical model. I'll use a diagram to help me explain how the model looks.

Figure 1. A visual graphical model

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.