Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 342503

Summary: 'Inspect' should also work on zero selection in the Display view
Product: [Eclipse Project] JDT Reporter: Deepak Azad <deepakazad>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3 CC: curtis.windatt.public, daniel_megert, markus.kell.r, Michael_Rennie
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Deepak Azad CLA 2011-04-11 21:42:00 EDT
In the Display view if you have to evaluate an expression (e.g. A.foo()) the following steps are needed
- Type 'A.foo()'
- Select 'A.foo()'
- Inspect

Can we reduce the number of steps ? For example by making Inspect command work to on the expression on the current line even if there is no selection, so that the following steps are needed
- Type 'A.foo()'
- Press Ctrl+Shift+I (Inspect)
Comment 1 Dani Megert CLA 2011-04-12 01:58:42 EDT
(In reply to comment #0)
> In the Display view if you have to evaluate an expression (e.g. A.foo()) the
> following steps are needed
> - Type 'A.foo()'
> - Select 'A.foo()'
> - Inspect
> 
> Can we reduce the number of steps ? For example by making Inspect command work
> to on the expression on the current line even if there is no selection, so that
> the following steps are needed
> - Type 'A.foo()'
> - Press Ctrl+Shift+I (Inspect)

-1. I think this would be misleading. The only thing I could imagine is to use the caret location and then use/evaluate whet F3 would open, e.g. if the caret is inside "foo" it would evalate A.foo().
Comment 2 Deepak Azad CLA 2011-04-12 02:29:12 EDT
(In reply to comment #1)
> -1. I think this would be misleading. The only thing I could imagine is to use
> the caret location and then use/evaluate whet F3 would open, e.g. if the caret
> is inside "foo" it would evalate A.foo().

This would also work for me.
Comment 3 Michael Rennie CLA 2011-04-12 10:26:48 EDT
I have to agree with Dani on this one, it would be confusing to understand what is being inspected in the empty selection case. I do like the carat location idea though.
Comment 4 Deepak Azad CLA 2011-04-12 10:50:29 EDT
I assume the caret location idea will be applied to the Java Editor as well and not just to display view.
Comment 5 Curtis Windatt CLA 2011-04-12 11:53:21 EDT
(In reply to comment #4)
> I assume the caret location idea will be applied to the Java Editor as well and
> not just to display view.

This already exists in the java editor.  If the caret is inside of a variable or method and Inspect or Display is run, the containing member will be inspected.  The only limitation I currently see is when the caret is at the end of the line (before or after a semicolon) the inspect does not find the previous member.