Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [mylyn-integrators] Force synchronization?

> How can I force a synchronization in my code? I make some changes and I
> write them back to the server right away (I do not store these changes
> locally). At this point I would like to synchronize my task so that it gets
> the new changed data from the server. What is the synchronization-method?
> and in which class is it declared?

You probably want to synchronously update the task after submission. Take a 
look at SubmitTaskJob.run():

 TaskData updatedTaskData = connector.getTaskData(taskRepository, taskId, 	
	Policy.subMonitorFor(monitor, 100));
 task = createTask(monitor, updatedTaskData);
 taskDataManager.putSubmittedTaskData(task, updatedTaskData);

If you want to update the task in the background you can invoke 
TasksUiInternal.synchronizeTask().

Steffen

-- 
Steffen Pingel - steffenp@xxxxxx - http://steffenpingel.de


Back to the top