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

Bug 316514

Summary: Debug context activation causes expressions view updates when hidden if selection is empty
Product: [Eclipse Project] Platform Reporter: Natasha D'Silva <ndsilva>
Component: DebugAssignee: Platform-Debug-Inbox <platform-debug-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: major    
Priority: P3 CC: darin.eclipse, pawel.1.piech
Version: 3.4.2   
Target Milestone: 3.4.2+   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch
none
patch for 3.4.x
none
patch for 3.5.x none

Description Natasha D'Silva CLA 2010-06-10 14:26:38 EDT
Build Identifier: 

The expressions view overrides the variables view's contextActivated() method, and usually delegates these events to the parent.  However, if the selection is empty (such as when a suspended thread with its top stack frame selected is collapsed) the view does not check to see if it is visible, but goes ahead and sets the input.  This triggers the installation of the DefaultWatchExpressionModelProxy, (one per expression in the view), which, in turn, causes the expressions to be evaluated on suspend when the view is NOT visible. 

I'm not sure what the rationale behind this behaviour is, is there any specific reason why the view handles empty selections differently, or at all, when it is hidden?

Reproducible: Always
Comment 1 Darin Wright CLA 2010-06-10 14:43:59 EDT
Created attachment 171663 [details]
patch
Comment 2 Darin Wright CLA 2010-06-10 14:44:19 EDT
Created attachment 171664 [details]
patch for 3.4.x
Comment 3 Darin Wright CLA 2010-06-10 15:05:03 EDT
Fixed in HEAD (3.7) and 3.6 maintenance branch. I have not released this to the maps yet as 3.6 is not yet complete.
Comment 4 Darin Wright CLA 2010-06-11 10:24:04 EDT
Created attachment 171726 [details]
patch for 3.5.x
Comment 5 Darin Wright CLA 2010-06-11 10:31:38 EDT
Released the fix to 3.4.2+, 3.5.2+. Also in 3.6 maintenance and HEAD, but not yet released to a build. I will open new bugs to track all the releases this fix is in.
Comment 6 Natasha D'Silva CLA 2010-06-18 15:57:13 EDT
Just to clarify - this fix is not going to make it into the 3.6 GA?
Comment 7 Darin Wright CLA 2010-06-18 16:01:53 EDT
(In reply to comment #6)
> Just to clarify - this fix is not going to make it into the 3.6 GA?

The fix is not in 3.6. The fix will be in 3.6.1.
Comment 8 Pawel Piech CLA 2010-06-18 17:09:05 EDT
I don't think this bug applies to 3.6 anyway because we got rid of the direct call to setViewerInput().  The additional test that was added is unnecessary.