[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.modeling.gmf] Re: Unhandled event loop exception (problem with read-only transaction context)

Is it necessary to use the EMF command? GMF provides an alternative
ICommand called AbstractTransactionalCommand that can wrap code that
changes the emf model. If you look in its class hierarchy you will see the
following command already exists: SetValueCommand so you could use that
one instead.

vlad

 On Thu, 22 Feb
2007 18:29:30 +0100, Jiri Semecky wrote:

>  installEditPolicy(EditPolicyRoles.OPEN_ROLE, new OpenEditPolicy() {
>>>    protected Command getOpenCommand(Request request) {
>>>       getEditingDomain().getCommandStack().execute(
>>>          SetCommand.create(
>>> 	     getEditingDomain(),
>>>               ((Node)getModel()).getElement(),
>>>               XXXPackage.eINSTANCE.getYYYType_ZZZ(),
>>>               "new_src_value" ) );
>>>       return null;