Community
Participate
Working Groups
If you accidently mark a query or date bin as read, you have no easy way to find out what had changed. If you mark the incoming bin as read, it empties and then there's no way of finding out what was there, short of examining every task in your task list. There should be an "undo mark as read" command.
+1 That would be very useful.
Created attachment 190020 [details] patch
Created attachment 190021 [details] mylyn/context/zip
That looks like a good start. Could you try using the regular workbench operation history to make this work through Edit > Undo (http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.platform.doc.isv/guide/wrkAdv_undo_ide.htm )?
That seems like overkill to me - I can't really imagine needing multiple undo, or redo mark as read, and I wouldn't expect it to be in the edit menu. Maybe you should create a bug for turning all task list operations (DND, delete, etc.) into undoable operations. :)
Any chance to get this implemented using the given patch?
The patch is a good start but we'll need to take another pass at this to integrate the implementation with the standard platform mechanism.
Sam's patch on Gerrit: https://git.eclipse.org/r/#/c/13819/
In addition to using the platform undo/redo mechanism, I think we should probably show the undo mark as read command in the mark as menu as well to make it more discoverable. Thoughts?
In case of a task, which has just been marked as read, should the "Undo" command replace the "Mark as Unread" one in the "Mark as" menu? Showing them both may be confusing.
(In reply to comment #10) > In case of a task, which has just been marked as read, should the "Undo" > command replace the "Mark as Unread" one in the "Mark as" menu? Showing them > both may be confusing. How about "Undo mark as read"?
But doesn't the undo operation undo marking multiple tasks read, not just the selected task? Maybe it should be called "Undo mark tasks read."
In the latest patch set [1], Ctrl+Z and Ctrl+Y work but: * only when Task List or Task Editor is active * after marking tasks as read/unread in bulk, undo/redo needs to be done for each task individually * comment 9 not implemented (yet) [1] https://git.eclipse.org/r/#/c/13819/3
https://git.eclipse.org/r/#/c/13819/4 : * Undo/Redo available only when Task List or Task Editor is active * after marking tasks as read/unread in bulk, Undo/Redo needs to be done for each task individually * -comment 9 not implemented (yet)- * no keybindings in the context menu
(In reply to comment #14) > https://git.eclipse.org/r/#/c/13819/4 : > * Undo/Redo available only when Task List or Task Editor is active I think that's the desired behaviour but currently it works when the package explorer is active. It seems the commands get added to the global history so if you mark a task and then rename a resource in the package explorer, you have to undo the latter before undoing the first. I think if possible they should have separate undo/redo histories. > * after marking tasks as read/unread in bulk, Undo/Redo needs to be done for > each task individually We should fix this. I think you can just override execute(ExecutionEvent event, ITaskContainer item). You might have to duplicate or refactor some of the logic in process. I wonder if the undo/redo commands should show in the mark as menu instead of at the top level?
(In reply to comment #15) > I wonder if the undo/redo commands should show in the mark as menu instead of at > the top level? I agree, but I failed to implement it without a hack [1], so the latest patch set [2] doesn't display Undo/Redo actions in the context menu (they are available in the main menu and via shortcuts). Other than that, the change is ready to review. [1] https://git.eclipse.org/r/#/c/13819/5/org.eclipse.mylyn.tasks.ui/src/org/eclipse/mylyn/internal/tasks/ui/actions/TaskListViewActionGroup.java [2] https://git.eclipse.org/r/#/c/13819/6
I think we shouldn't have the undo/redo commands in the task editor since they prevent using undo/redo when typing in attribute editors.
Tomek's change has been merged. When the task list is active, users can undo/redo marking tasks (un)read from the Edit menu or using the keyboard shortcuts. Thanks very much for the contribution!
I have an API tooling error in my workspace for TasksUiUtil.getUndoContext() which is missing an @since tag. This bug is not tagged as [api] and I don't see discussion around exposing the undo context as API. Is that needed? I wonder if the method could be moved to TasksUiInternal instead. Tomek, Sam, please set up an API baseline against Mylyn 3.9 to detect those problems: http://wiki.eclipse.org/Mylyn/Contributor_Reference#API_Baseline.
(In reply to comment #19) > I wonder if the method could be moved to TasksUiInternal instead. https://git.eclipse.org/r/15961 > Tomek, Sam, please set up an API baseline against Mylyn 3.9 to detect those > problems: http://wiki.eclipse.org/Mylyn/Contributor_Reference#API_Baseline. I did that, but didn't notice that extracting the Mylyn API zip to the plugins folder doesn't make it appear in the baseline. I fixed that and now see the error. Sorry for the trouble.
Fixed the issue with TasksUiUtil.getUndoContext() in 0ec9ad415a5605216ac532ab1afd2fe1085ade96