[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform] Re: "Listening" to Team Actions (Commit/Update/...) (i.e. ISubscriberChangeListener)

Hi Michael,

thanks for the information.

Do you know whether any API for this is on the todo list for a future
Eclipse version? I wasn't able to find anything related on the Eclipse
Bugzilla.
This seems like a serious shortcoming of the existing team APIs to me.

It seems as if it is possible to work around this issue by registering a
ISubscriberChangeListener and IJobChangeListener. The IJobChangeListener
can then look for the "typical" Eclipse CVS team provider job names
and/or use reflection to identify the beginning and end of a CVS
commit/update action. During callbacks to the ISubscriberChangeListener
which occur while a CVS commit or update job is running, the type of the
active job can be used to guess at the type of CVS action (commit/update).
I haven't had enough time to test this thoroughly yet, but it seems to
work. Concurrent team actions would probably be a real problem though.

This is clearly a very bad solution and could break in many ways if the
behaviour of the CVS team provider or Eclipse changes in the future. So
I am quite unhappy with it :|

Greetings
Hans Meyer

Michael Valenta wrote:
> Hans,
> 
> There is currently isn't any repository independent API for
> commit/update/merge notification and there no way to do what you are
> asking with the CVS client. I'm not sure you would be able to
> differentiate a commit/update/merge using sync info changes since, in
> all cases, the revision number would increment.
> 
> Michael