Skip to main content



      Home
Home » Modeling » GMF (Graphical Modeling Framework) » Request/Command infrastructure
Request/Command infrastructure [message #157552] Mon, 29 October 2007 13:50
Eclipse UserFriend
Originally posted by: mexboss82.hotmail.com

Hallo everybody,
I am a newby about GMF. I've been working on a thesis project and i have a
little bit problem about understanding the Request/Command infrastructure
of GMF. What i have to do is programmatically create a new link (edge in
the notation model) when the user change a EReference property of my
semantic model by the property view.
I thought to intercept the notification of change in my EditPart's
handleNotificationEvent method. In this method i think i need to create a
new Request CreateConnectionViewAndElementRequest. I have already created
a link element (a polyline) by the GMF generation tool (in gmfgraph e
gmfmap files, not in gmftool cause i want to generate it programmatically
after the notification event). In this case GMF has already generated for
me the related EditPart and EditPolicy class (only the
xxxItemSemanticEditPolicy). So my questions is:

- How do i create a new Request?
- How should I pass it to the right EditPart?
- Which method of the right EditPart i have to call for asking the
EditPolicy to return me the Command?
- How the EditPolicy creates a new Command related to the request and in
which method i have to put the code to do this?
- Maybe i need a further EditPolicy?
- In some example some people use an EditHelper to create the command,
what's this and I need it in my case?
- How could I interact with my semantic model from the code of the
command? There is some GMF API or I have to use the pure EMF API?

If it's not a problem can you give me some code examples?

Thanks a lot for your help!

Max
Previous Topic:Timing for PopupBar of ModelingAssistantProvider
Next Topic:from emf model to GMF Edit part
Goto Forum:
  


Current Time: Tue Jul 22 15:44:36 EDT 2025

Powered by FUDForum. Page generated in 0.03477 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top