Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 165880 - [api] Listeners API should allow to pass multiple events in one call
Summary: [api] Listeners API should allow to pass multiple events in one call
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.0   Edit
Assignee: Mik Kersten CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-27 00:16 EST by Eugene Kuleshov CLA
Modified: 2007-06-14 09:34 EDT (History)
2 users (show)

See Also:


Attachments
mylar/context/zip (41.87 KB, application/octet-stream)
2007-06-13 23:35 EDT, Mik Kersten CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Eugene Kuleshov CLA 2006-11-27 00:16:31 EST
Listeners API, such as ITaskListChangeListener and ITaskActivityListener, should allow to pass multiple events in one call. So, actions on multple elements in Task List view, like delete, mark read, shedule..., etc would be actually usable.
Comment 1 Robert Elves CLA 2007-06-05 12:19:57 EDT
Eugene,  do you want to supply a patch for this, minimally adding the api so that we can improve implementation later?
Comment 2 Eugene Kuleshov CLA 2007-06-05 12:35:35 EDT
(In reply to comment #1)
> Eugene,  do you want to supply a patch for this, minimally adding the api so
> that we can improve implementation later?

I think that impact of such change is to high for making it using patch.
Comment 3 Mik Kersten CLA 2007-06-05 13:00:47 EDT
 (In reply to comment #2)
> I think that impact of such change is to high for making it using patch.

Agreed. There is no critical driver for this so lowering priority, but let's still consider it for RC0.
Comment 4 Eugene Kuleshov CLA 2007-06-05 13:06:12 EDT
(In reply to comment #3)
> Agreed. There is no critical driver for this so lowering priority, but let's
> still consider it for RC0.

I just meant that it would be easier such refactoring for someone with full commit access.
Comment 5 Mik Kersten CLA 2007-06-13 23:35:01 EDT
Done.  Changes are now entirely handled by:

	ITaskListChangeListener.containersChanged(Set<TaskContainerDelta> containers);

I have updated some of the client code to batch updates when necessary.  This has changed a lot in terms of Task List refresh, and we still have some related failing tests to addres.
Comment 6 Mik Kersten CLA 2007-06-13 23:35:03 EDT
Created attachment 71260 [details]
mylar/context/zip
Comment 7 Steffen Pingel CLA 2007-06-14 03:43:29 EDT
I get multiple errors similar to this one in the log when passing null to notifyContainersUpdated():

java.lang.NullPointerException
	at org.eclipse.mylyn.tasks.ui.TaskListManager$2.containersChanged(TaskListManager.java:212)
	at org.eclipse.mylyn.tasks.core.TaskList.notifyContainersUpdated(TaskList.java:618)
	at org.eclipse.mylyn.tasks.ui.SynchronizeQueryJob.run(SynchronizeQueryJob.java:154)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 8 Steffen Pingel CLA 2007-06-14 03:46:07 EDT
Possible also related to this change:

java.util.NoSuchElementException
	at java.util.HashMap$HashIterator.nextEntry(HashMap.java:844)
	at java.util.HashMap$KeyIterator.next(HashMap.java:877)
	at org.eclipse.mylyn.tasks.core.DelegatingTaskExternalizer.createTaskElement(DelegatingTaskExternalizer.java:170)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter.createTaskElement(TaskListWriter.java:176)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListWriter.writeTaskList(TaskListWriter.java:147)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager.internalSaveTaskList(TaskListSaveManager.java:129)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager.access$0(TaskListSaveManager.java:127)
	at org.eclipse.mylyn.internal.tasks.ui.util.TaskListSaveManager$TaskListSaverJob.run(TaskListSaveManager.java:275)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 9 Mik Kersten CLA 2007-06-14 04:37:59 EDT
Fixing now...
Comment 10 Mik Kersten CLA 2007-06-14 04:42:24 EDT
Comment#7 problem fixed.  We might still have a problem related to comment#8.
Comment 11 Steffen Pingel CLA 2007-06-14 09:34:19 EDT
java.lang.NullPointerException
	at org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditor$2.containersChanged(AbstractTaskEditor.java:294)
	at org.eclipse.mylyn.tasks.core.TaskList.notifyContainersUpdated(TaskList.java:623)
	at org.eclipse.mylyn.tasks.ui.SynchronizeQueryJob.run(SynchronizeQueryJob.java:154)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

java.lang.NullPointerException
	at org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor$1.containersChanged(TaskPlanningEditor.java:139)
	at org.eclipse.mylyn.tasks.core.TaskList.notifyContainersUpdated(TaskList.java:623)
	at org.eclipse.mylyn.tasks.ui.SynchronizeQueryJob.run(SynchronizeQueryJob.java:154)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)