Community
Participate
Working Groups
I've recently noticed that while Mylyn is very good for keeping notifications and discussions under control when dealing with a large number of tasks, it is not so when dealing with a conversation-style of flow, e.g. a small number of participants posting comments in rapid succession. In this case Mylyn seems to break the flow, since the query synchronisation interval is quite large. And I don't think that either synchronising all queries every 1 minute - which is still slow - is the answer. Neither is manually refreshing the task periodically. Mylyn should provide a way to receive updates for faster for tasks which have a task editor is open.
This could be implemented as an additional task repository setting, false by default, with a name similar to 'Refresh tasks with open editors more often'. If this setting is active, then the tasks could then be refreshed every minute, which would be acceptable. There would be no change to existing task repositories and users which do not need it would not be bothered one bit. And perhaps the open task refresh interval could be a user preference - I don't think it makes sense to make it per-repository. I would also be willing to try and contribute a patch for this, given a little guidance.
Looking at the callers of TasksUiInternal.synchronizeTask() would probably be a good way to get started on this. The current API does not support this very well though as it does not provide a mechanism for push notifications or a lightweight way of checking if a task has changed on the repository. It would certainly be an interesting enhancement to the framework but would require some API design and effort to implement it. On a high-level I am thinking of a connector specific per repository refresh session that is managed by the framework. It could eventually replace the pre/post synchronization hooks and hold the state of what is being monitored in the repository. All refresh requests would go through the session to allow a connector to handle them in the most efficient way and also provide hooks to notify the framework if a task has changed.
One approach to allow connector to push change notifications would be to pass a callback to the AbstractRepositoryConnector: bc. public void setTaskChangeCallback(TaskChangeCallback callback) { // empty default implementation } bc. public interface TaskChangeCallback() { void tasksChanged(Set<String> changedTaskIds); } The connector would then be able to notify the framework of changes.
I think making this work well would also require being able to refresh the task editor without disrupting the user, i.e. without changing the scrolling, expansion, or selection state of any of the controls and without disabling the task editor during the refresh. But it would be useful even without that as long as it just set a message informing the user that there were incomings and didn't force a refresh of the task editor. It seems like it would be quite simple, and useful, to make this work without doing it the "right" way, i.e. without trying to make it efficient or creating an API or involving the connectors at all. You would just need a job that would periodically refresh all open tasks from configured repositories.
I think I may have a POC of this somewhere.
*** This bug has been marked as a duplicate of bug 502035 ***