Bug 433790 - [regression] next/previous comment buttons disappear when second compare editor opened
Summary: [regression] next/previous comment buttons disappear when second compare edit...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Mylyn (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 major (vote)
Target Milestone: 2.3   Edit
Assignee: Leo Dos Santos CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2014-04-29 14:55 EDT by Sam Davis CLA
Modified: 2014-05-22 16:05 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Davis CLA 2014-04-29 14:55:42 EDT
* open a review
* double click a file - a compare editor opens with next/prev comment buttons
* double click another file - another compare editor opens but without comment buttons
* switch back to the first file - the comment buttons are gone!
Comment 1 Sam Davis CLA 2014-04-29 15:01:28 EDT
This was introduced by the fix for 431795: Next/previous comment buttons in compare editor not available on kepler
https://bugs.eclipse.org/bugs/show_bug.cgi?id=431795

If I revert to using the location service to get the handler service, this bug goes away.
Comment 2 Sam Davis CLA 2014-04-29 16:10:17 EDT
Here's a change that fixes the issue for me:

25757: [WIP] 433790: [regression] next/previous comment buttons disappear when second compare editor opened [I766b01a4]
https://git.eclipse.org/r/#/c/25757/

If this actually breaks the comment buttons on Kepler we should consider how we can resolve that. It may be that we need to use a different service locator depending on the platform but I'd like to understand what is going on here and hopefully come up with a better solution.
Comment 3 Jacques Bouthillier CLA 2014-05-05 10:16:12 EDT
I tested on window 7 environment ( https://git.eclipse.org/r/#/c/25757/1) and the next/previous buttons don't even show in the compare navigator window. Tested on ubuntu and same thing, the next/previous buttons don't show on the compare navigator toolbar when using kepler configuration.
I also observed that all buttons on the compare navigator window toolbar gets de-activated as well on the second compare window.
I also observed this behavior when testing bug 423242  On the patchset 17 (https://git.eclipse.org/r/#/c/23534/17), a fix was provided to solved the issue. The next/previous buttons shows, the navigation works well and when you change your  compare navigator, the next/previous buttons reacts on the proper compare navigator. No more traces as a "null pointer" or "invalid arguments" shows  on the error log when using the compare navigator view with Kepler.
Comment 4 Sam Davis CLA 2014-05-05 14:28:06 EDT
I assume you are testing only on Kepler? This has to work on older versions too.
Comment 5 Jacques Bouthillier CLA 2014-05-05 15:11:29 EDT
- Tested on window 3.8.2 : the next/previous buttons show but not on eclipse 4.3.2. As you mentioned, it has to work on more than one eclipse platform . And if ever it has to work on a limited set of eclipse, the newer version of eclipse should be considered first for new functionality !
Comment 6 Leo Dos Santos CLA 2014-05-12 19:38:34 EDT
I've posted a review that works for me with Eclipse 3.8 and 4.3

26411: 433790: [regression] next/previous comment buttons disappear when second compare editor opened [I63ed4235]
https://git.eclipse.org/r/#/c/26411/
Comment 7 Leo Dos Santos CLA 2014-05-13 16:39:14 EDT
One thing I just noticed is that I get a message about "Conflicting handlers for org.eclipse.mylyn.reviews.ui.commands.navigate.comment.previous/next". Not sure I noticed these before yesterday, but could just be I wasn't paying attention to my error log. Reverting my change still gives the conflicting handlers warning.
Comment 8 Leo Dos Santos CLA 2014-05-13 18:05:34 EDT
I've updated review 26411 to contribute the next/previous buttons as actions instead of commands with command handlers. This should fix a few issues we're seeing across different Eclipse versions, and should fix bug 428038 as well.
Comment 9 Sam Davis CLA 2014-05-14 10:34:36 EDT
That seems like a good solution for now. The only benefit I can see to contributing them as commands is that it could allow a key binding to be set, but that currently doesn't work anyway because of the way they are contributed, and it's not clear it's even possible.
Comment 10 Sam Davis CLA 2014-05-22 16:05:47 EDT
The changes have been merged. We should fastforward the 3.12 branch to include this fix.