Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 333612

Summary: add support for IAdaptable to drop adapter in task list view
Product: z_Archived Reporter: Doug Janzen <doug.janzen>
Component: MylynAssignee: Doug Janzen <doug.janzen>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: steffen.pingel
Version: unspecified   
Target Milestone: 3.5   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:
Attachments:
Description Flags
Patch that adds support for IAdaptable to the drop adapter.
none
Patch with changes to getTasksFromSelection()
steffen.pingel: iplog+
mylyn/context/zip none

Description Doug Janzen CLA 2011-01-05 19:14:07 EST
When dropping items in the task list view the TaskListDropAdapter currently expects dropped object to be ITasks.  It would be helpful if the drop adapter could check for IAdaptables that provide ITasks as well.  This would make the view more flexible in supporting other components that work with tasks.
Comment 1 Doug Janzen CLA 2011-01-05 19:15:44 EST
Created attachment 186137 [details]
Patch that adds support for IAdaptable to the drop adapter.
Comment 2 Steffen Pingel CLA 2011-01-06 15:00:48 EST
Thanks for the patch! The proposed change looks great. To simplify it a bit, could you merge both getTasksFromSelection() methods into a single method and move it to TasksUiInternal? TasksUiUtil is an API class and unless the method is used by clients I would prefer not to expose it. If you setup an API baseline you can detect (unintentional) API changes easily: http://wiki.eclipse.org/Mylyn/Contributor_Reference#API_Baseline . On a very minor style note, it would be nice if you could remove the blank lines in getTasksFromSelection() to match the standard coding conventions.
Comment 3 Doug Janzen CLA 2011-01-06 16:24:20 EST
Created attachment 186226 [details]
Patch with changes to getTasksFromSelection()
Comment 4 Doug Janzen CLA 2011-01-06 16:24:22 EST
Created attachment 186227 [details]
mylyn/context/zip
Comment 5 Doug Janzen CLA 2011-01-06 16:26:00 EST
Thanks for the comments and suggestions Steffen.  I've attached a patch with the requested changes.
Comment 6 Steffen Pingel CLA 2011-01-06 16:32:06 EST
Excellent! I have applied the updated patch to head.