|
|
|
|
|
|
Re: [EMFStore] Detecting changes of operations [message #1695722 is a reply to message #1695300] |
Mon, 18 May 2015 15:42 |
Edgar Mueller Messages: 89 Registered: March 2011 |
Member |
|
|
Yuriy,
thanks for the info.
The reason for getDeletedModelElement returning null during an undo of a
reversed create (that is, a delete) is a current limitation of our API,
since we always clear our internal deleted element caches when a delete
operation has been applied, which causes the getDeletedModelElement to
find nothing. Please file a bug for this issue.
Depending on what you are trying to do with the deleted element, a
possible workaround might be to check if you have a
CreateDeleteOperation in the operationUndone method of your observer.
If it returns true for isDelete() you can obtain the deleted element via
getModelElement(). Note though, that this might not cover all your use
cases, since getModelElement returns a copy of the deleted element.
Thanks,
Edgar
Am 13.05.2015 13:54, schrieb Yuriy Flyud:
> Edgar,
>
> Here is the undo sample:
> new UIUndoLastOperationController(getShell(),
> requireSelection(ESLocalProjectImpl.class))
> .execute();
> I register observer via:
> ((ESLocalProjectImpl)
> esLocalProject).toInternalAPI().getOperationManager().addOperationObserver(observer);
>
>
> Regarding internal API - I will try. I will create the issue as well
> after some additional investigation.
> Thanks!
>
> Best regards,
> Yuriy
--
Edgar Mueller
Get Professional Eclipse Support: http://eclipsesource.com/munich
|
|
|
|
Powered by
FUDForum. Page generated in 0.04619 seconds