Tooltip which shows variable value during debugging no longer hides automatically after variable loses focus#8961
Conversation
…utomatically after variable loses focus
…utomatically after variable loses focus
|
@mbien can I please ask for review of this PR? Thanks |
ide/spi.debugger.ui/src/org/netbeans/spi/debugger/ui/ToolTipUI.java
Outdated
Show resolved
Hide resolved
|
I agree, that the tooltip is figgly and has a tendency to close to fast, but his change has a drawback: Inspecting multiple "trivial" variables is now harder. (I tested with the inline suggested fix) Before this change you could move the mouse to all variables hover and see the value, that does not work anymore, the first value stays visible and that is it. I would suggest to see if the transition from "mouse cursor" to "mouse cursor in tooltip" can be stabilized. |
|
try the following: when trying to reach the pin, move the mouse straight up first then go right. Don't take the diagonal/shortest shortuct. This seems to always work for me. This could be a good indication that this is indeed a bounding box/positioning issue. |
….java Co-authored-by: Matthias Bläsing <mblaesing@doppel-helix.eu>
|
@mbien moving mouse straight up works most of the time. If popup is large and spans both to the right and to the left of your variable in the editor sometimes it does not work for me as well. And I need to repeat. And you can really view only primitive property values in popup. If it is an issuance of the class - most of the time you need click "expand" icon to see individual properties. And this is tricky with current behavior. Different IDEs handle this differently:
So depending on what behavior your prefer you may call it "workaround" or not. As for me - behavior identical to idea is absolutely fine and I do not consider this as a workaround. But how we call it - this is not that important as for me. There are screen recording and you can see that current behavior is not ideal. And even recommendation to move mouse straight up is also not ideal as for me - sometimes popup is positioned to the right of the cursor and moving it straight up is really not obvious. I'd really like to have some improvement here and any approach which will improve this is very welcomed as for me. |
|
The bug does annoy me too but we shouldn't fix it by simply switching all editor tooltips heavyweight. I will look into this later, the code already computes mouse motion ignore areas. |
|
please take a look at #9028 (PR produces a dev-build for testing purposes) |
Any improvement of debug tool tip behavior is very welcomed. If you feel more comfortable increasing area size instead of making tool tip "sticky" - great, any improvement will be good. |
|
@s4gh You can find by clicking through to the checks tab on the pull request, under artefacts at the top. It's also under artefacts on the workflow overview for that PR run eg. https://github.com/apache/netbeans/actions/runs/19560221408 |
|
@s4gh thanks for testing! |


Tooltip which shows variable value during debugging no longer hides automatically after variable loses focus
When you are in debug mode and want to see value for some variable you can find this in "variables" view. Alternatively you can hover over a variable and tooltip is displayed. Which is more convenient for some quick checks. However, if the variable is not of primitive type you need to click "expand" icon in tooltip to see any data. For example, if you variable is instance of a class - you will see has code in popup and to see any property defined for this class instance you need to click that expand icon.
Unfortunately in NetBeans sometimes it is quite tricky to put your mouse into popup before it is automatically closed. This popup is automatically closed when variable for which it is display looses focus. See attached video.
https://github.com/user-attachments/assets/ef11db79-794b-4788-bc75-7c9cb03cfa3f
Sometimes this behavior is really annoying because you can't catch popup before it is closed.
This change makes popup "heavy" or "sticky" so it does not close automatically depending on focus or mouse movement. There are two ways to close it:
As for me this behavior is much more convenient. I've checked idea ide - and they have very similar behavior.
Also this behavior is aligned with other "mode" of this popup - when you expend popup to see details - there is popup window which also does not close depending on focus or mouse movement - but closes if you "click outside" or press "esc".
Video with behavior after the change:
https://github.com/user-attachments/assets/185b0ca7-9356-4a9e-baee-377883d82844
So as for me this is a good change - imho it makes this functionality more convenient to use and it makes it consistent with other "mode" for same popup.