[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.modeling.gmf] Unhandled event loop exception (problem with read-only transaction context)
|
I'm trying to set the model attribute when an editpart is double-clicked.
The scenario follows:
1. in en EditPart I install an OpenEditPolicy
2. in getOpenCommand execute EMF command and return null for the GEF command
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;
}
};
3. I get "Unhandled event loop exception:"
java.lang.IllegalStateException: Cannot activate read/write transaction
in read-only transaction context
What is the problem?
Could the EMF command (org.eclipse.emf.common.command.Command) be
somehow encapsulated into a GEF command (org.eclipse.gef.commands.Command)
Thanks for any hint,
--Jirka