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: Sun Feb 28 08:04:09 GMT 2021

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

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

Back to the top