|Re: read-only transaction context problem [message #486478 is a reply to message #484916]
||Thu, 17 September 2009 19:08
| Hauke Fuhrmann
Registered: July 2009
Sascha, thanks for your answer. However, it is not exactly working. See |
Sascha Geßler schrieb:
>> However, the following code results in a
>> java.lang.IllegalStateException: Cannot activate read/write
>> transaction in read-only transaction context
> Please note that the constructor of a RecordingCommand needs an
> TransactionalEditingDomain (which can be acquired from many GMF
> elements, for example by IGraphicalEditPart.getEditingDomain()).The
> editing domain also provides access to the command stack that should be
> used to execute the command.
> Executing your RecordingCommand on this CommandStack should provide you
> with an valid read/write transaction.
Whatever command I use, the problem is always the same. I tried a
SetCommand, a RecordingCommand or a custom command.
The problem is, that in my situation, the CommandStack I get from the
corresponding EObject is in a read-only state, i.e. the EditingDomain
has an active read-only transaction. So my write command triggers that
The thing is, that I want to tell the CommandStack then to execute the
command *after* the read-only transaction has been run through... How
can I do that? There must be a way...
Powered by FUDForum
. Page generated in 0.01812 seconds