[Short Version]
How can one be notified about local files which were part of
Team/Repository Provider actions like Commit or Update?
Preferably in a repository provider independent manner.
[Purpose]
My plugin needs to execute some specific actions for each file that was
synchronised with a remote repository. The actions differ, depending on
the direction of the synchronisation (committed/updated).
(i.e. data is being inserted into a remote SQL database)
[Long Version]
Hi,
I am looking for a way to be notified about Team/Repository Provider
actions. Specifically, I need to know which files were just
Committed/Updated/Merged.
Preferably in a non repository provider specific way. However, if this
isn't possible, a way which works only for the Eclipse CVS repository
provider would also be helpful. If needed, even using internal classes.
Registering an ISubscriberChangeListener does seem to provide a
notification whenever a file is committed or updated using the Eclipse
CVS provider. However, there seems to be no way to detect whether this
was caused by a commit or update action.
Furthermore, ISubscriberChangeEvents are triggered during other actions
too, i.e. when opening the Synchronise Perspective.
One possible approach would seem to be to cache a part of the old
SyncInfo for each file as a session property of that file. It would then
be possible to compare the SyncInfo revision data of a
ISubscriberChangeEvent with the old data to gain some more insight into
the nature of the event.
However, this seems to be an extremely cumbersome approach. Especially
because of the additional runtime/performance overhead it would entail
(i.e. The plugin would have to retrieve and store the SyncInfo for all
files in the workspace at startup).
Is there any better way to do this?
Thanks a lot.
Greetings,
Hans Meyer