Undo event - ILocalChangeEvent ?
Hello to the forum members,
I want to recognize undo operations in order to reload the related files in another application. I see that ILocalChangeEvent is being thrown when undo is performed and the file is marked as ILocalChangeEvent.CANCELED. However, this happens also when I save file (and it becomes unresolved) - this event is being thrown for other unresolved files in my sandbox and they are marked as ILocalChangeEvent.CANCELED.
How can I recognize only the files related to the undo operation ?
Thanks,
Gidi
I want to recognize undo operations in order to reload the related files in another application. I see that ILocalChangeEvent is being thrown when undo is performed and the file is marked as ILocalChangeEvent.CANCELED. However, this happens also when I save file (and it becomes unresolved) - this event is being thrown for other unresolved files in my sandbox and they are marked as ILocalChangeEvent.CANCELED.
How can I recognize only the files related to the undo operation ?
Thanks,
Gidi
Comments
David Lafreniere
FORUM MODERATOR / JAZZ DEVELOPER Sep 09 '16, 3:53 p.m.To clarify, are you asking about an 'Undo' on a pending local change (i.e. a change in the "Unresolved" folder in the Pending Changes view) or an 'Undo' on a change in an active change set in the Pending Changes view? Either way, I don't think there's a specific undo event, but it would be good to clarify which undo you are talking about since they are different.
Gidi Gal
Sep 11 '16, 4:45 a.m.Hello David,
Thanks for your reply. I need to catch both events. My general target is to recognize events that change local files on the disk. As far as I understand the following events change local files (if you know of additional ones, I'll be grateful if you share them here):
- User accepts changes of incoming change sets. I use IChangeHistoryEvent.ACCEPT_CHANGESETS and IChangeHistoryEvent.ACCEPT_COMBINED to recognize this event.
- User discards outgoing changet sets. I use IChangeHistoryEvent.DISCARD_CHANGE_SETS to recognize this event.
Now that I think of it, there's another event - load - which changes local files on the disk. If there's event related to it, I'll be grateful for a pointer.
Regarding the undo operation, I understand that in the case of undo for an active change set, there is a possibility that it will not change the local file on the disk (in case there is an unresolved copy of the file), I will need to recognize these two scenarios.
Thanks,
Gidi