Bug 208901 - Make it easier to create watch expressions from Inspect command
Summary: Make it easier to create watch expressions from Inspect command
Status: ASSIGNED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.2.2   Edit
Hardware: PC Windows XP
: P3 enhancement with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords: bugday
Depends on:
Blocks:
 
Reported: 2007-11-06 10:34 EST by Curtis Windatt CLA
Modified: 2007-11-15 10:30 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 Curtis Windatt CLA 2007-11-06 10:34:38 EST
Separated from bug 208888.

In Edit View or Display View, we can use Ctrl-Shift-I to inspect a variable
or an expression, then hit Ctrl-Shift-I again to add it to "Expressions View",
but the added item is in "Inspection Mode", we have to use context menu
"Convert to Watch Expression" to make it changable as we step through the code.
This is not convenient and not a common habit compare to other IDE. Why don't
make it "Watch" as soon as the inspection expression is added into Expressions
view? Who need the inspection item in Expression View? If there is a reason of
needing it. Can we have an option to change the default status?
Comment 1 Curtis Windatt CLA 2007-11-14 15:17:07 EST
A workaround is to select the text for the expression and drag the text to the expressions view, where a new watch expression will be created.

Bug 199288 will add paste functionality to the view.  With copy/paste you can create watch expressions just using the keyboard.  I'll leave this bug open in case we can find a good way of creating a watch expression from the inspect popup.
	

Comment 2 orientphoebus CLA 2007-11-15 09:30:28 EST
> A workaround is to select the text for the expression and drag the text to the
expressions view, where a new watch expression will be created.
Is drag&drop only supported on 3.4? I'd like wait for 3.4 stable to use it.

On the other hand, can you tell me why we need the expression been added to Expressions View from Inspection keep the "Inspection" mode? Who will need the "Inspection" mode again in Expressions View? I think in the Expressions View, people only need the expressions to be watchable.
Comment 3 Darin Wright CLA 2007-11-15 10:18:24 EST
Perhaps we need to options to persist/save an object in the inspect popup - i.e. one to save the expression (to be re-evaluated), and one to save the object. Currently, the popup only has support for one key-binding/command for handling the "close" behvaior. 

Marking as bugday for anyone who wants to take a stab at it.
Comment 4 Curtis Windatt CLA 2007-11-15 10:30:03 EST
(In reply to comment #2)
> On the other hand, can you tell me why we need the expression been added to
> Expressions View from Inspection keep the "Inspection" mode? Who will need the
> "Inspection" mode again in Expressions View? I think in the Expressions View,
> people only need the expressions to be watchable.

The benefit of creating an inspection entry in the expressions view (rather than a watch expression) is that the inspection is just an object, it does not have to be re-evaluated on every step.  Some inspections cannot be re-evaluated while others cause performance problems.  For example, the All References command collects all references to an object in an array.  This array can be persisted to the expressions view as an inspection entry.  Converting it to a watch expression will result in errors as it is not an expression.