Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » GMF (Graphical Modeling Framework) » Getting editing domain from a menu
Getting editing domain from a menu [message #122369] Fri, 27 April 2007 15:30 Go to next message
Youmm P. is currently offline Youmm P.Friend
Messages: 140
Registered: July 2009
Senior Member
Hello,

I think the answer is obvious but I can't find it in the documentation.

How can I get the editing domain and the commands stack from the run
method of an IEditorActionDelegate / ActionDeletage ?

Thanks in advance!
Re: Getting editing domain from a menu [message #122445 is a reply to message #122369] Sat, 28 April 2007 13:06 Go to previous message
Eclipse UserFriend
Originally posted by: newsgroups.elmarweber.org

Hello,

Youmm P. wrote:
> How can I get the editing domain and the commands stack from the run
> method of an IEditorActionDelegate / ActionDeletage ?

it's in the IEditorActionDelegate javadoc:

/**
* Sets the active editor for the delegate.
* Implementors should disconnect from the old editor, connect to the
* new editor, and update the action to reflect the new editor.
*
* @param action the action proxy that handles presentation portion of
* the action
* @param targetEditor the new editor target
*/
public void setActiveEditor(IAction action, IEditorPart targetEditor);


here you can check if targetEditor is of type *DiagramEditor and then
use the #getEditingDomain() method on it.


ciao,
elm
Previous Topic:One model and multiple diagram editors
Next Topic:Accessing programatically a property of a model element ??
Goto Forum:
  


Current Time: Fri Aug 16 21:35:32 GMT 2024

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

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

Back to the top