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

Bug 217344

Summary: open task dialog should filter according to the currently active task working set
Product: z_Archived Reporter: Eugene Kuleshov <ekuleshov>
Component: MylynAssignee: Willian Mitsuda <wmitsuda>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P4 CC: mik.kersten, steffen.pingel, wmitsuda
Version: unspecifiedKeywords: helpwanted, noteworthy
Target Milestone: 2.3   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Initial patch for testing purposes
none
mylyn/context/zip
none
Patch
none
mylyn/context/zip none

Description Eugene Kuleshov CLA 2008-01-31 16:42:48 EST
The "Open Task" dialog should have option to respect currently active task working set. It should work for "Open Task", "Activate Task" and "Copy context to..."
Comment 1 Mik Kersten CLA 2008-01-31 20:04:55 EST
Willian: any interest in this?  Working set filtering is pretty straightforward, let me know if you want a pointer.
Comment 2 Willian Mitsuda CLA 2008-02-01 14:21:33 EST
OK, I can take a look. I recently decided to give another try to working sets.
Comment 3 Willian Mitsuda CLA 2008-02-01 17:42:54 EST
Some quick questions, just to confirm:

1 - Can I rely on TaskListView.getActiveWorkingSets() as a central point to obtain the set of task working sets?

2 - Can I assume that if the returned value is empty, there are no working sets selected?
Comment 4 Eugene Kuleshov CLA 2008-02-01 18:47:51 EST
Can you please also allow to turn off and/or manually select working set similarly how it is done by the Open Type dialog.

I think it is safe to assume that TaskListView.getActiveWorkingSets() as an access point for an active working set info. You can look at the implementation to see where the working sets came from and how it is calculated. So yes, if returned collection is empty there is no task working set selected.
Comment 5 Willian Mitsuda CLA 2008-02-01 19:30:51 EST
Created attachment 88642 [details]
Initial patch for testing purposes

Thanks Eugene. Can you experiment with this patch and see if it looks like what you wanted?

I included a check action (enabled by default) to filter according to the task working set configuration. It is possible to turn off, and the configuration is sticky and shared among the dialog instances, so it will work for open, activate and copy context.

I'm not sure if it is worth to mimic the open type dialog, letting the user choose working sets other than the window working set. I find it particularly too much complex.
Comment 6 Willian Mitsuda CLA 2008-02-01 19:30:54 EST
Created attachment 88643 [details]
mylyn/context/zip
Comment 7 Eugene Kuleshov CLA 2008-02-03 00:14:53 EST
This look great. I'd suggest to rename "Filter by Active Working Set" to just "Active Working Set", maybe add working set icon and put a menu separator before it (so it will look similar to what "Open Type" dialog has)

Another thing that would be handy is to show existing task working sets in the dialog menu to quickly flip between them. Maybe you could reuse code from TaskWorkingSetAction.addActionsToMenu()
Comment 8 Willian Mitsuda CLA 2008-02-04 21:52:58 EST
 (In reply to comment #7)
> Another thing that would be handy is to show existing task working sets in the
> dialog menu to quickly flip between them. Maybe you could reuse code from
> TaskWorkingSetAction.addActionsToMenu()

Do you think it is better to make the dialog selection update the window working set, like in task list view, or just populate the working set list on dialog opening and have the menu operate on this temporary list?
Comment 9 Eugene Kuleshov CLA 2008-02-04 22:40:43 EST
(In reply to comment #8)
> Do you think it is better to make the dialog selection update the window working
> set, like in task list view, or just populate the working set list on dialog
> opening and have the menu operate on this temporary list?

I would say that open task dialog should not change global active working set. That is how "Open Type" dialog works and it seem a good idea to use it as reference.
Comment 10 Willian Mitsuda CLA 2008-02-06 15:45:13 EST
Created attachment 89058 [details]
Patch

Complete implementation.

I decided it's better to mimic the open type/resource dialog, since it would be more familiar for users.
Comment 11 Willian Mitsuda CLA 2008-02-06 15:45:16 EST
Created attachment 89059 [details]
mylyn/context/zip
Comment 12 Willian Mitsuda CLA 2008-02-20 14:15:29 EST
Mik, please consider this for 2.3.
Comment 13 Steffen Pingel CLA 2008-02-21 21:38:52 EST
Great work, thanks Willian! I merged the patch and updated the IP log. Strictly speaking we are passed the feature dead line but I have been running with the patch for a while and not encountered any problems. It's a useful addition and makes the functionality of the open task dialog consistent with similar dialogs in platform. 

Willian, it would be great if you could respond to bugs in case any problems are discovered with the working set selection before the 2.3 release.
Comment 14 Willian Mitsuda CLA 2008-02-21 23:54:25 EST
OK, thanks for applying!