Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » [Transaction] Command is not executed
[Transaction] Command is not executed [message #596229] Mon, 27 November 2006 15:47
Michael Wahler is currently offline Michael WahlerFriend
Messages: 14
Registered: July 2009
Junior Member
Hi,

I would like to add a constraint to a UML class. However, I have not
found a tutorial on the transaction API, so I've done some
trial-and-error. Sadly, I stopped with an error.

Here's my code. The problem is that the execute() method is never invoked.

Any help appreciated!

Michael

--

TransactionalEditingDomain editDomain =
TransactionUtil.getEditingDomain(targetClass);

editDomain.getCommandStack().execute(new
org.eclipse.emf.common.command.AbstractCommand() {

public void execute() {
targetClass.getOwnedRules().add(constraint);
}

public void redo() {
// TODO
}
});

editDomain.getCommandStack().flush();
Previous Topic:Strange DuplicateMappingException with Teneo
Next Topic:[Transaction] Command is not executed
Goto Forum:
  


Current Time: Fri Apr 26 10:08:25 GMT 2024

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

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

Back to the top