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

Bug 333517

Summary: The Breakpoints view standard content provider does not allow filtering for non-standard debug models.
Product: [Eclipse Project] Platform Reporter: Randy Rohrbach <Randy.Rohrbach>
Component: DebugAssignee: Pawel Piech <pawel.1.piech>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aleherb+eclipse, Michael_Rennie, pawel.1.piech
Version: 3.6.1Keywords: contributed
Target Milestone: 3.7 M7Flags: Michael_Rennie: review+
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Changes getDebugTargets to look for an associated ILaunch from an element which is not a classical Debug Model element.
pawel.1.piech: iplog+
Alternative fix. none

Description Randy Rohrbach CLA 2011-01-04 16:33:46 EST
Created attachment 186052 [details]
Changes getDebugTargets to look for an associated ILaunch from an element which is not a classical Debug Model element.

The BreakpointManagerContentProvider does not allow for Debug selections which are not from the Debug Model. With our Wind River product we are using a Debug 
View which is based on a DSF View Model Provider. So the selected elements are 
not IDebugElement or IProcess. The code needs to look for an adapter which can
return Debug Model elements from the sleection, even though it does not conform 
to the classical element.
Comment 1 Pawel Piech CLA 2011-03-16 18:02:13 EDT
This minor change allows debugger that don't use the standard debug model interfaces in Debug view to return a dummy IDebugTarget object which can then be used by the breakpoints view to implement breakpoints filtering... without doing a full re-implementation of breakpoints view model.

I committed the change.  Mike please have a look.
Comment 2 Michael Rennie CLA 2011-03-17 11:21:34 EDT
The addition of asking for an adapter makes perfect sense, but would it not be better to ask for an IDebugElement adapter rather than an ILaunch adapter? Or even better, perhaps ask for adapters for the same classes we do the instanceof checks for?
Comment 3 Pawel Piech CLA 2011-03-17 13:01:19 EDT
Thinking about it a bit, it does seem a little round about to ask for an ILaunch when we're searching for the IDebugTarget.
Comment 4 Pawel Piech CLA 2011-03-17 13:02:14 EDT
Created attachment 191444 [details]
Alternative fix.

How about this more generic solution where the IAdaptable is the last fallback but the IDebugTarget is retrieved directly?
Comment 5 Pawel Piech CLA 2011-03-18 00:27:45 EDT
I talked it over with Randy and he thought it was an improvement as well, so I committed in the alternative fix.
Comment 6 Michael Rennie CLA 2011-03-18 10:10:13 EDT
This change looks good to me.
Comment 7 Anton Leherbauer CLA 2011-05-23 03:41:32 EDT
I think the target milestone (3.6 M7) is not correct.