Bug 575197 - Sticky hovers are resized on F2
Summary: Sticky hovers are resized on F2
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 4.20   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Platform-Text-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-08-02 12:35 EDT by Thomas Wolf CLA
Modified: 2021-08-02 12:35 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 Thomas Wolf CLA 2021-08-02 12:35:03 EDT
I recently implemented proper sticky hovers for EGit's "Show Revision Information" command. (Revision annotations in the ruler; they show per-line revision information in a hover when a revision is moused-over in the ruler.)

That works beautifully when the hover is made sticky and enriched by moving the mouse cursor into it. However, when the user hits F2 to make the hover sticky and focus it, a completely different code path is taken and the hover is not only made sticky and enriched, but is also resized. The FocusedInformationPresenter enforces a maximum and minimum size of 100 * 12 "characters", and this size is not customizeable in any way.

The effect is also visible in the Javadoc hovers, but is less pronounced there because the initial non-sticky hover usually is small. Revision hovers, however, can be large -- they show information about the commit, the commit message, and a diff. With large commit messages or long diffs, the hover can rather tall. Resizing it on F2 is then very annoying (and surprising) for the user: the hover becomes sticky, but most of the useful information is no longer visible. The user either has to scroll in the now small hover, or resize it again manually.

There should be API by which this maximum size can be overridden by the IInformationControl. There is already API for it to tell its preferred size, but that gets then constrained by this minimum and maximum size imposed by FocusedInformationPresenter. See AbstractInformationControlManager.internalShowInformationControl().