Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Refactoring in GMF editor(How to intercept all commands and react ?)
Refactoring in GMF editor [message #656403] Fri, 25 February 2011 13:00 Go to next message
Missing name Missing name is currently offline Missing name Missing nameFriend
Messages: 13
Registered: October 2010
Junior Member
Hello GMF experts,

We are building a graphical model editor based on GMF. Using the editor a user should be able to create elements, set and change their properties via property sections and link different elements.
Often, elements from one model can refer to elements in other models. When a referred element changes, all elements that refer to this element in all other models must be updated to reflect the new change.
Obviously, this requires that the graphical editor provides refactoring capabilities.

I have decided to use the Eclipse LTK framework to implement the desired refactoring capabilities. Most of the work is done, except for hooking the refactoring framework into the editor. The naive approach to achieve this would be to rewrite most of the editor commands to trigger the refactoring process. However, I'm trying to do this in a more general way, i.e., intercepting a command, introspecting it and producing all required refactoring changes.

My problem is that I cannot find the right place to intercept this command regardless of whether it comes from the canvas (GEF direct edit of semantic properties) or the property sheets (EMF transactional editing domain).

Does anyone has implemented something similar? In general, what is the best way to intercept all command in a GMF editor regardless from where they come?

Any help will be appreciated,
Stanislav
Re: Refactoring in GMF editor [message #699711 is a reply to message #656403] Fri, 22 July 2011 07:11 Go to previous message
Volker Stolz is currently offline Volker StolzFriend
Messages: 63
Registered: July 2009
Member
Stanislav, I guess that would either be wrapping the command stack, or adding a CommandStackListener. Both would require subclassing an existing editor. I'm not aware that there's an extension point for this to do it in a plugin.

-Volker
Previous Topic:Diagram partitionning
Next Topic:Where to get gmf runtime for indigo???
Goto Forum:
  


Current Time: Thu Mar 04 01:01:41 GMT 2021

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

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

Back to the top