Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to get the editor TransactionalEditingDomain
How to get the editor TransactionalEditingDomain [message #655121] Fri, 18 February 2011 12:10 Go to next message
Wladimir Schamai is currently offline Wladimir SchamaiFriend
Messages: 53
Registered: May 2010
Member
Hi all,

the EditorUtils.getTransactionalEditingDomain() appears as being deprecated. Is that correct? Should we use somthing else?

Wladimir
Re: How to get the editor TransactionalEditingDomain [message #656739 is a reply to message #655121] Mon, 28 February 2011 11:44 Go to previous messageGo to next message
--alex--  is currently offline --alex-- Friend
Messages: 26
Registered: October 2009
Junior Member
Hi,
if you are sure that you can get the current IEditorPart, (for example when you are implementing a GUI command, you can use HandlerUtil.getActiveEditor(event)), then you can grab the TransactionalEditingDomain with the following code

DiResourceSet resourceSet = (DiResourceSet)((ServicesRegistry)editor.getAdapter(Services Registry.class)).getService(DiResourceSet.class);
TransactionalEditingDomain ted = resourceSet.getTransactionalEditingDomain();
Re: How to get the editor TransactionalEditingDomain [message #659946 is a reply to message #655121] Wed, 16 March 2011 09:39 Go to previous message
Cedric Dumoulin is currently offline Cedric DumoulinFriend
Messages: 51
Registered: July 2009
Member
Hi,

The right way to get the TransactionalEditingDomain in Papyrus is
explained in the wiki:
http://wiki.eclipse.org/Papyrus_Developer_Guide/Editing_Doma ins_and_Commands#Initialize_a_new_command_with_an_editing_do main

Hope this help,

Cedric

Wladimir wrote:
> Hi all,
>
> the EditorUtils.getTransactionalEditingDomain() appears as being
> deprecated. Is that correct? Should we use somthing else?
> Wladimir
Previous Topic:install MARTE profile
Next Topic:[Papyrus] Modeling a template class
Goto Forum:
  


Current Time: Fri Apr 19 19:33:12 GMT 2024

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

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

Back to the top