Bug 529036 - Evaluate expression value on hover
Summary: Evaluate expression value on hover
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.7.1a   Edit
Hardware: PC Windows 10
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-12-20 15:18 EST by Alexander Ilyin CLA
Modified: 2018-02-26 08:48 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Ilyin CLA 2017-12-20 15:18:28 EST
Currently in Eclipse you can just see the variable value on hover.

I remember it was possible to hover the selected expression and see its value in the hint in the old Eclipse versions. And then this feature has been dropped.

Is it possible to return this behavior? Sure I can Inspect selection using the keyboard or menu. However I prefer more easy and quick way using just mouse hovering.

Also please consider another way to do almost the same which is available in Android Studio(Idea)

User can hold Alt and IDE guess the expression under the mouse pointer which user wants to evaluate. User can move the mouse to change the expression boundaries (underlined font is used instead of selection). And when the user see the appropriated expression boundaries she/he clicks on it and see the expression value in the showed up hint.

E.g. the expression:

if(methog1().method2(m + 130).isGood()) {

So user can select(or hold Alt and move the mouse) see the return value of:
method1()
method1().method2(m + 130)
m + 130
methog1().method2(m + 130).isGood()
Comment 1 Sarika Sinha CLA 2017-12-20 23:16:36 EST
Similar stuff is in agenda for Bug 526969.

When did you see the behavior on hover, if you can give some time frame it will help as I am not aware of that.
Comment 2 Alexander Ilyin CLA 2017-12-20 23:50:03 EST
Saw the behavior on hover many years ago. It seems to me it was Eclipse 2.x
And the Eclipse 3.0 has been changed significantly and replaced this feature with the JavaDoc instead. Later it was partially fixed for variables only. Although I could be wrong on it. 
I just definitely remember how I was happy when there was appeared the feature when you select the expression and you can inspect its value and was disappointed when it was dropped. Although JavaDoc hint is useful as well.
Now it is working pretty smart for variables but could be nice if it will support more complicated expression as well.

Found nice demo gif how does it works in Idea.
It seems it could guess the user want to Inspect the expression value even without Alt modifier when user hovers over some expression operator.


https://d3nmt5vlzunoa1.cloudfront.net/idea/files/2014/08/instant_evaluation.gif