Community
Participate
Working Groups
The CVS annotation hover can now be enriched by moving the mouse into it. It would be cool to add a toolbar with some actions/buttons, e.g. 'Compare with Previous', 'Show in History', 'Next' and 'Previous'. For inspiration look at the JDT problem hover.
This bug is for the Git hover (bug 229255 is the request for CVS).
Yes, this would be so cool :) (FWIW, I came here from bug 356313).
Please ping me if you have questions about the implementation. It should be as simple as adding a new constructor to BlameInformationControl that passes on a new ToolBarManager(SWT.FLAT) to the super class. What's a bit hairy is that you have to pass the AbstractInformationControl to the tool bar actions, so that their run method can call infoControl.dispose() to close the hover. See e.g. JavadocHover.ShowInJavadocViewAction in o.e.jdt.ui.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/183574
(In reply to Eclipse Genie from comment #4) > New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/183574 Looks like this was only halfway implemented. The above change now completes that implementation and adds two actions to the toolbar to open the commit in the commit viewer, or to show it in the history view. That duplicates the functionality of the two links at the top. "Compare with previous" is available in the links on the hunk header (hover over the line numbers); it could perhaps be made more prominent by also adding it to the toolbar. It's unclear to me what "next"/"previous" should do: 1. navigate to the revision shown in the ruler above/below the currently selected one? I don't think the revision framework in JFace supports that. 2. show the diff from the next/previous commit that touched the line? (Might be difficult; basically requires running blame from the parent revision, and gives an inconsistent display: the ruler would still show the original blame, but the pop-up would display the diff from some other commit.) And what diff should be shown then: the one from the file to that older commit, or the one determined by blame (from the parent commit to that older commit)? 3. behave similar to "go to last (edit) location" and navigate to the last shown revision and its line? Would require a history of revision having been shown.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/184035
(In reply to Thomas Wolf from comment #5) > (In reply to Eclipse Genie from comment #4) > > New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/183574 > > Looks like this was only halfway implemented. The above change now completes > that implementation and adds two actions to the toolbar to open the commit > in the commit viewer, or to show it in the history view. That duplicates the > functionality of the two links at the top. > > "Compare with previous" is available in the links on the hunk header (hover > over the line numbers); it could perhaps be made more prominent by also > adding it to the toolbar. > > It's unclear to me what "next"/"previous" should do: > > 1. navigate to the revision shown in the ruler above/below the currently > selected one? I don't think the revision framework in JFace supports that. > 2. show the diff from the next/previous commit that touched the line? (Might > be > difficult; basically requires running blame from the parent revision, and > gives an inconsistent display: the ruler would still show the original > blame, > but the pop-up would display the diff from some other commit.) And what > diff > should be shown then: the one from the file to that older commit, or the > one > determined by blame (from the parent commit to that older commit)? > 3. behave similar to "go to last (edit) location" and navigate to the last > shown > revision and its line? Would require a history of revision having been > shown. I think 2. would be most useful, something like time travel on the file. Would require to compute blame on the previous/next revision of the same file, update the file content to the previous/next revision of the file, update the blame info in the ruler and update the hunks blame diff shown in the pop-up accordingly
(In reply to Matthias Sohn from comment #7) > I think 2. would be most useful, something like time travel on the file. > Would require to compute blame on the previous/next revision of the same > file, update the file content to the previous/next revision of the file, > update the blame info in the ruler and update the hunks blame diff shown in > the pop-up accordingly Very complicated. The functionality already exists via the link on the diff, but it opens a new editor. (It does scroll that new editor to the correct line.)
(In reply to Thomas Wolf from comment #8) > (In reply to Matthias Sohn from comment #7) > > I think 2. would be most useful, something like time travel on the file. > > Would require to compute blame on the previous/next revision of the same > > file, update the file content to the previous/next revision of the file, > > update the blame info in the ruler and update the hunks blame diff shown in > > the pop-up accordingly > > Very complicated. The functionality already exists via the link on the diff, > but it opens a new editor. (It does scroll that new editor to the correct > line.) I agree this sounds complicated. Add a toolbar entry "previous" to do the same what the link does ? And another one "next" to travel in the opposite direction ?
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/184035 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=9ed9eb612fb2f7077b908c04a8e8d8994b55fda3