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

Bug 67888

Summary: [accessibility] Go To Next Difference stops working on reuse of editor
Product: [Eclipse Project] Platform Reporter: Randy Hudson <hudsonr>
Component: CompareAssignee: Andre Weinand <andre_weinand>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P2 Keywords: accessibility, usability
Version: 3.0   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Randy Hudson CLA 2004-06-18 15:41:41 EDT
Open an incoming/outgoing change and note that CTRL+PERIOD works to navigate 
among the changes.  Select on another change such that the compare editor is 
reused to show the second resources structured compare.

The commands are now broken.  Perhaps they are bound to the old document which 
was closed.  CTRL+PERIOD and CTRL+COMMA stop working.
Comment 1 Randy Hudson CLA 2004-09-08 16:15:15 EDT
*** Bug 73407 has been marked as a duplicate of this bug. ***
Comment 2 Randy Hudson CLA 2004-09-08 16:15:41 EDT
Reproduced in 3.0.1 build
Comment 3 Randy Hudson CLA 2004-09-08 16:17:08 EDT
The toolbar button is not working either.  The message is:
"Last Difference Reached" when clearly there are more differences.
Comment 4 Randy Hudson CLA 2004-09-08 17:02:23 EDT
The problem is caused by CompareUIPlugin.openCompareEditor.
If an editor is reused, it does not go through normal initialization, which 
means that the EditorActionBarContributor does not reset for the new editor 
input.

NavigateAction is still holding onto the old editor input, which has been 
disposed at this point. One possible fix might be to not hold onto anything 
other than the current editor, and obtain everything dynamically when the 
action is run(). The other workaround which I made was to set the active editor 
to NULL and then back to the reused editor again:

In CompareEditor:
public void setInput(IEditorInput input) {
    try {
        doSetInput(input);
+       //Need to refresh the contributor
+       getEditorSite().getActionBarContributor()
+           .setActiveEditor(null);
+       getEditorSite().getActionBarContributor()
+           .setActiveEditor(this);
Comment 5 Randy Hudson CLA 2004-09-08 17:04:46 EDT
Any possibilities for 3.0.x?
Comment 6 Randy Hudson CLA 2004-11-08 11:42:40 EST
Please raise priority now that the problem has been identified for you and a 
possible workaround provided.
Comment 7 Randy Hudson CLA 2005-05-27 14:40:59 EDT
This bug has been ignored for a long time now. It affects the entire action bar 
of the compare editor. Just today, I was trying to toggle "Ignore White Space", 
and doesn't work either.
Comment 8 Andre Weinand CLA 2005-06-07 17:15:01 EDT
fixed for N20050608
Comment 9 David Saff CLA 2005-06-13 04:56:47 EDT
Verifying...
Comment 10 David Saff CLA 2005-06-13 05:03:16 EDT
Verified in RC2
Comment 11 David Saff CLA 2005-06-13 05:11:10 EDT
Andre,

Please update state to VERIFIED (I don't have such rights).  Thanks.
Comment 12 Andre Weinand CLA 2005-06-13 05:57:04 EDT
Thanks for verifying.