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

Bug 300849

Summary: Selection changes in Breakpoints View unexpectedly when a context menu is clicked
Product: [Eclipse Project] Platform Reporter: Szymon Brandys <Szymon.Brandys>
Component: DebugAssignee: Darin Wright <darin.eclipse>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: darin.eclipse, pawel.1.piech
Version: 3.6Flags: darin.eclipse: review? (pawel.1.piech)
Target Milestone: 3.6 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Selection before 'Enable' is clicked in the context menu
none
... and after 'Enabled' is clicked
none
patch none

Description Szymon Brandys CLA 2010-01-26 10:57:16 EST
Build id: I20100126-0100

Steps:
1) Add breakpoints in couple projects
2) Open Breakpoints View and use 'Group By > Projects'
3) Select couple breakpoints in the view, but from different projects
4) Open the context menu and click 'Disable'
5) Selection is changed and contains only one breakpoint now
Comment 1 Szymon Brandys CLA 2010-01-26 10:59:49 EST
Created attachment 157277 [details]
Selection before 'Enable' is clicked in the context menu
Comment 2 Szymon Brandys CLA 2010-01-26 11:01:01 EST
Created attachment 157278 [details]
... and after 'Enabled' is clicked
Comment 3 Darin Wright CLA 2010-01-26 11:16:03 EST
Mulit-selection becomes single selection after any modification to breakpoints via the context menu.
Comment 4 Darin Wright CLA 2010-01-27 11:28:56 EST
Created attachment 157413 [details]
patch

Problem only occurred when grouping by something. A content delta was being fired for each container, which caused refresh, messing with selection. Fix is to only fire STATE delta for the containers, and STATE | CONTENT for the (leaf nodes) breakpoints.
Comment 5 Darin Wright CLA 2010-01-27 11:33:11 EST
*** Bug 300854 has been marked as a duplicate of this bug. ***
Comment 6 Pawel Piech CLA 2010-01-27 11:37:03 EST
(In reply to comment #4)
> Created an attachment (id=157413) [details]
> patch
> 
> Problem only occurred when grouping by something. A content delta was being
> fired for each container, which caused refresh, messing with selection. Fix is
> to only fire STATE delta for the containers, and STATE | CONTENT for the (leaf
> nodes) breakpoints.

I think this is a regression from fixing bug 291267.  Mult-selection should not be lost simply because of a content update.  This is a reasonable workaround, but I think we'll need to address the underlying problem in the viewer after M5.
Comment 7 Darin Wright CLA 2010-01-27 11:39:21 EST
Applied. Fixed. Please verify, Pawel.
Comment 8 Darin Wright CLA 2010-01-27 15:12:17 EST
*** Bug 300915 has been marked as a duplicate of this bug. ***
Comment 9 Pawel Piech CLA 2010-02-02 15:03:52 EST
(In reply to comment #7)
> Applied. Fixed. Please verify, Pawel.

The fix only works when there is only a single-level grouping.  If user has multiple levels of groups (using Group By -> Advanced) then the selection problem re-appears.

We'll have to fix the underlying problem of maintaining multi-selection properly.

*** This bug has been marked as a duplicate of bug 299958 ***