final Runnable runnable = new Runnable() {
@Override
public void run() {
Transaction parentTx;
if (editingDomain != null
&& (parentTx = ((TransactionalEditingDomainImpl) editingDomain).getActiveTransaction()) != null) {
do {
if (!parentTx.isReadOnly()) {
throw new IllegalStateException(
"FileService.save() called from within a command (likely produces a deadlock)"); //$NON-NLS-1$
}
} while ((parentTx = ((TransactionalEditingDomainImpl) editingDomain)
.getActiveTransaction().getParent()) != null);