Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333612 - add support for IAdaptable to drop adapter in task list view
Summary: add support for IAdaptable to drop adapter in task list view
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X
: P3 enhancement (vote)
Target Milestone: 3.5   Edit
Assignee: Doug Janzen CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 19:14 EST by Doug Janzen CLA
Modified: 2011-01-13 23:31 EST (History)
1 user (show)

See Also:


Attachments
Patch that adds support for IAdaptable to the drop adapter. (3.52 KB, patch)
2011-01-05 19:15 EST, Doug Janzen CLA
no flags Details | Diff
Patch with changes to getTasksFromSelection() (3.05 KB, patch)
2011-01-06 16:24 EST, Doug Janzen CLA
steffen.pingel: iplog+
Details | Diff
mylyn/context/zip (32.80 KB, application/octet-stream)
2011-01-06 16:24 EST, Doug Janzen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.