Bug 385089 - activating task should restore its task editor
Summary: activating task should restore its task editor
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.16   Edit
Assignee: Chris Poon CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed, noteworthy
Depends on:
Blocks:
 
Reported: 2012-07-13 17:33 EDT by Sam Davis CLA
Modified: 2015-05-20 16:45 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2012-07-13 17:33:05 EDT
I understand that there's been discussion in the past about whether or not to include task editors in the context editor memento, but it seems that it would at least make sense to include the editor of the active task in its own memento if it's open. If I am in the middle of writing a comment on a task when I deactivate it, it would be nice for the task editor to be opened again when I activate the task again.
Comment 1 Steffen Pingel CLA 2012-10-25 15:07:18 EDT
Sounds reasonable.You can also press shift during task activation to open the task editor of the activated task on activation.
Comment 2 Sam Davis CLA 2013-07-12 16:39:44 EDT
Let's see if we can resolve this in 3.10.
Comment 3 Sam Davis CLA 2013-08-21 13:19:21 EDT
Postponing since there's a simple workaround mentioned in comment 1.
Comment 4 Sam Davis CLA 2015-05-07 14:24:18 EDT
This appears to be a regression.

* activate a task
* open the task editor
* deactivate the task
* activate the task
* the task editor is not reopened

This is caused by a bug in ContextStateManager which sets the context handle of the ContextState to "UTF-8" when saving it. This bogus handle is then passed to closeContextAwareEditors which closes the active task editor, preventing it from being added to the editor memento.
Comment 5 Sam Davis CLA 2015-05-07 14:30:04 EDT
I think the only other significant affect of this bug is that the workaround in EditorStateParticipant.saveState(ContextState, boolean) to "retain the state in case editor save/restore fails on e4" was never getting invoked.
Comment 6 Sam Davis CLA 2015-05-20 16:45:18 EDT
Fixed with https://git.eclipse.org/r/#/c/47933/. Thanks very much for the contribution, Chris!