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

Bug 220080

Summary: selected category should come checked in "Move to" context menu
Product: z_Archived Reporter: Willian Mitsuda <wmitsuda>
Component: MylynAssignee: Willian Mitsuda <wmitsuda>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: P4 CC: steffen.pingel
Version: devKeywords: helpwanted
Target Milestone: 3.0   
Hardware: PC   
OS: Windows Vista   
Whiteboard:
Attachments:
Description Flags
Patch
none
mylyn/context/zip none

Description Willian Mitsuda CLA 2008-02-23 16:20:11 EST
I use "Move to" context menu to move tasks between categories as I work on them (working, wait feedback, etc.).

Often, when reading some task I don't remember if I moved it to corresponding category yet, so I have to go to task list and check if it is in there.

It would make my life easier if the "Move to" submenu presented the current category checked.
Comment 1 Mik Kersten CLA 2008-02-28 16:00:41 EST
Good idea.  Interested in a patch?
Comment 2 Willian Mitsuda CLA 2008-02-29 02:39:34 EST
Sure. This would be an easy one.
Comment 3 Willian Mitsuda CLA 2008-03-09 20:44:35 EDT
Created attachment 92000 [details]
Patch

This patch turns the category actions into radio-type, and it cames pre-selected with the current category from selected task.

If there are more than 1 selected task (when this menu is triggered from task list this is possible), it does not pre-selects anything.

The current API makes it possible to a task to have more than 1 category, but I'm not handling this case since all the current UI does not permit this situation.

I made manual tests and it seems to work fine.
Comment 4 Willian Mitsuda CLA 2008-03-09 20:44:41 EDT
Created attachment 92001 [details]
mylyn/context/zip
Comment 5 Willian Mitsuda CLA 2008-03-09 20:47:08 EDT
BTW, just for curiosity: you use an custom extension org.eclipse.mylyn.tasks.ui.actions/dynamicPopupMenu.

What feature this extension provides that the standard menu extension mechanism from platform does not provide?
Comment 6 Mik Kersten CLA 2008-03-11 12:56:33 EDT
 (In reply to comment #5)
> BTW, just for curiosity: you use an custom extension
> org.eclipse.mylyn.tasks.ui.actions/dynamicPopupMenu.
> 
> What feature this extension provides that the standard menu extension mechanism
> from platform does not provide?

It provides dynamic menu population that's used by higlighters and the Schedule menu.  We added that before Eclipse had an extension point for this, but I believe that as of 3.3 dynamic menu population is possible, right?
Comment 7 Mik Kersten CLA 2008-04-08 11:16:05 EDT
Patch applied and verified.  Thanks Willian!
Comment 8 Willian Mitsuda CLA 2008-04-11 16:38:37 EDT
Mik, just 1 minor typo in MoveToCategoryMenuContributor: you renamed "elem" to "elemement".
Comment 9 Mik Kersten CLA 2008-04-17 17:59:23 EDT
Oops, thanks, fixed.