Community
Participate
Working Groups
Steps: 1. Activate task and open editors 2. Deactivate task 3. Clear Context 4. Reactivate context The editors are restored since step 3 does not remove the editor memento if the task is not active when clearing the context.
The underlying problem is that context is null in the delete event if a context other than the active context is deleted.
Shawn, let's touch base how to change AbstractContextListener to support this case better.
Initial thoughts on new API so we can fix this bug: enum Kind{ CLEARED, LANDMARK_ADDED; } ContextChangeEvent{ String contextHandle; Context context; Kind eventKind; List<IInteractionElement> elements; } add AbstractContextListener.contextUpdated(ContextChangeEvent event){ // switch and call the old listeners by default } Steffen, what do you think?
Looks good to me.
Created attachment 134129 [details] patch I updated the AbstractContextListener API as per comment #3 which has allowed me to be able to recognize the context that is cleared to clear the memento.
Created attachment 134130 [details] mylyn/context/zip
committed.