[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [mylyn-integrators] Handling synchronization in a connector
|
Tom Bryan (tombry) wrote:
Tom Bryan (tombry) wrote on Tuesday, April 29, 2008 2:36 PM:
The wiki says: "If your first basic plugin works, you should handle
synchronization. Please note that the method for synchronization is
called updateOfflineState (AbstractRepositoryConnector) instead of
just synchronize()."
I'm not sure whether that's a 3.0 change. I see no updateOfflineState
method in 2.3.
Any hints for those of us still integrating with the 2.3?
For this part of my question, it appears that in Mylyn 2.3 uses the
RepositorySynchronizationManager.synchronize(AbstractRepositoryConnector
,Set<AbstractTask>) method to handle the synchronization logic. So, it
looks like we get synchronization for free once we implement methods,
such as updateTaskFromRepository, in our
RepositorySychronizationManager. But that's not the whole answer since,
if TaskDataHandler.canGetMultiTaskData() returns true, a multi-sync is
triggered. I assume that this really requires some other things to be
implemented in the RepositoryConnector or the TaskDataHandler for my
connector, but I'm still tracing through some of this code at the
moment.
I didn't implement such a method "updateOfflineState" in my 2.3
compliant connector. Also if the default sync behavior is fine I don't
think you need to do anything with RepositorySychronizationManager (at
least I didn't). According to the api contract you don't need to
implement updateTaskFromRepository if you use task data - but you should
override updateTaskFromTaskData in the connector in any case. If you
would like you can have a look at my rather small (compared to
bugzilla/trac) but (almost*) fully functional 2.3 connector at
https://svn.origo.ethz.ch/origo/ide/trunk/MylynIntegration/
regards,
Dennis
(*) attachment handling has not been implemented