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

Bug 215457

Summary: Assign Value in Variables view should evaluate on selection
Product: [Eclipse Project] JDT Reporter: Markus Keller <markus.kell.r>
Component: DebugAssignee: JDT-Debug-Inbox <jdt-debug-inbox>
Status: CLOSED WONTFIX QA Contact:
Severity: minor    
Priority: P3    
Version: 3.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard: stalebug

Description Markus Keller CLA 2008-01-16 04:47:48 EST
I20080115-0800

Assign Value in Variables view should evaluate on selection, not on 'this'.

Steps:

public class Try {
	Object[] fElements;
	
	public static void main(String[] args) {
		new Try().doit(new Object[] { 42 });
	}

	private void doit(Object[] elements) {
		fElements= elements;
		System.out.println(elements[0]); // breakpoint
	}
}

- debug to breakpoint
- in Variables view, select elements > [0] or this > fElements > [0]
- in details pane, enter:
    "answer: " + shortValue()
- select the snipped and choose context menu > Inspect
=> evaluates fine and returns string "answer: 42" (expected)

- enter snippet again but now choose context menu > Assign Value
=> error dialog: "The method shortValue() is undefined for type Try".
=> expected: snipped should be evaluated in same context as for Inspect action
Comment 1 Eclipse Genie CLA 2019-09-03 04:15:42 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.