Refactoring in GMF editor [message #656403] |
Fri, 25 February 2011 08:00  |
Eclipse User |
|
|
|
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 03:11  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03895 seconds