Bug 342503 - 'Inspect' should also work on zero selection in the Display view
Summary: 'Inspect' should also work on zero selection in the Display view
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-11 21:42 EDT by Deepak Azad CLA
Modified: 2011-04-12 11:53 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.