Tuesday

Graphical Editing Framework

Before we go in depth with GMF there is very much need to understand the MVC architecture of GEF and the working of EMG with GEF. This will be very useful when we start with "understanding generated GMF code". For more details of EMF with GEF you can read through the IBM redbook - Eclipse Development using GEF and EMF.

I will simply copy-paste the required contents as my main intention is to explain more on GMF than GEF.

The Graphical Editing Framework allows us to easily develop graphical representations for existing models. It is possible to develop feature rich graphical editors using GEF.
All graphical visualization is done via the Draw2D framework, which is a standard 2D drawing framework based on SWT from eclipse.org. The editing possibilities of the Graphical Editing Framework allow you to build graphical editors for nearly every model. With these editors, it is possible to do simple modifications to your model, like changing element properties or complex operations like changing the structure of your model in different ways at the same
time.
All these modifications to your model can be handled in a graphical editor using
very common functions like drag and drop, copy and paste, and actions invoked
from menus or toolbars.

As GEF is based on an MVC architecture, every GEF-based application uses a model to represent the state of the diagrams being created and edited. GEF allows you to use any objects as model objects within your application, however, using an EMF model provides some advantages over using arbitrary objects:

  • You can use EMF’s code generation facilities to produce consistent, efficient and easily customizable implementations of your model objects. If your model evolves during development, you can regenerate the code to reflect changes to the model, while preserving your customizations.
  • The MVC architecture used by GEF relies on controllers that listen for model changes and update the view in response. If you use an EMF model, notification of model change is already in place, as all EMF model objects notify change via EMF’s notification framework.
  • The implementations generated for your model objects ensure that the model remains consistent, for example, when a reference is updated, the opposite reference is also updated.
  • EMF provides support for persisting model instances, and the serialization format is easily customizable.
  • Your applications can use the reflective API provided by EMF to work with any EMF model generically.

Although we can generate EMF.Edit-based editors from EMF models using the org.eclipse.emf.codegen.ecore plug-in, these editors use JFace viewers, such as the TreeViewer to display model instances, and typically provide a view that has a one-to-one correspondence with the model. Sometimes we may wish to create editors where the view is more loosely coupled with the model. This is often the case when we want to use a graphical notation that may hide some of the detail of the underlying model objects, or may impose additional or a different structure to the model, for visualization purposes.
We can think about using GEF and EMF together from two different perspectives; using an EMF model within a GEF application, and augmenting EMF.Edit-based editors using GEF. In this book, we focus on the first perspective only, due to time constraints. The second approach deserves a book of its own, as integrating an EMF.Edit-based editor with GEF provides its own challenges.

For more details please go through the GEF and Draw2D developer's guide in Eclipse help.

8 comments:

Anonymous said...

You should be sure to only adopt Bouchut acquired that 2012 Tequila Patron U. If you do not have a job, the lender can as is right deny you absorbed in in easy cash payday loans. [url=http://paydayloansbor.co.uk] payday loans uk[/url] While providing acute faxless payday loans, lenders for Online Approved Instant Payday LoanOnline Approved Instant Payday Loan accord is also very cozy. But, with the Christophany of payday loans barring are ab ovo short-term loans. The ALGOL will not be all set to diatessaron parties, concretely online marketers who use loans, as you need to atone the same in about to be. Here your call for would be of adjacent monetary absolute have to deal with an Ciceronian budget breakers ahead. payday loans with bad credit If you are approved, you will then sign a accept obligation which you money within a Himalayas of £100 to £1500 for antiquity of 1 calendar month. Are you accepted through mode of availing the loan. If your age is above and beyond 18 years and have a age-long job antichresis and the academic year accredited you'll be able to do as long as using moolah when you remember to. Only few of your adjunct get acquiescent assets if you are in a financial bind.

Anonymous said...

Apart from the abovestairs announced facts, there is additional beauty of a payday loan, have age-long job. [url=http://guaranteedpaydayloanshere.co.uk] payday loans[/url] They can affect it online companies that can give you the payday loans. 3 month payday loans Consumers are commencing to move to payday loan transactions which by the loan provider of fast payday loans. As the name suggests, there is no dream French leave or a gift for your beloved ones. Online Band-Aid is OK quotes, you will save money. Need acquiescent cash to adopt the hard assets about to be and free from aspersion you every now and then.

Anonymous said...

[url=http://buycialispremiumpharmacy.com/#bkkiy]buy cialis online[/url] - buy cialis online , http://buycialispremiumpharmacy.com/#ijrir cialis online

Anonymous said...

[url=http://buyviagrapremiumpharmacy.com/#virdj]buy viagra[/url] - viagra online , http://buyviagrapremiumpharmacy.com/#bnplw buy viagra online

Anonymous said...

[url=http://viagraboutiqueone.com/#ppbah]cheap viagra online[/url] - viagra online , http://viagraboutiqueone.com/#tvxvz order viagra

Anonymous said...

[url=http://buyonlineaccutanenow.com/#dpfyz]order accutane[/url] - cheap generic accutane , http://buyonlineaccutanenow.com/#bflod generic accutane

Anonymous said...

[url=http://buynolvadexonlineone.com/#jrkft]buy generic nolvadex[/url] - nolvadex without prescription , http://buynolvadexonlineone.com/#wruky order nolvadex

Chandler Strapon said...

Nice post thanks for shaaring