Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 333517 - The Breakpoints view standard content provider does not allow filtering for non-standard debug models.
Summary: The Breakpoints view standard content provider does not allow filtering for n...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 3.6.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M7   Edit
Assignee: Pawel Piech CLA
QA Contact:
URL:
Whiteboard:
Keywords: contributed
Depends on:
Blocks:
 
Reported: 2011-01-04 16:33 EST by Randy Rohrbach CLA
Modified: 2011-05-26 14:26 EDT (History)
3 users (show)

See Also:
Michael_Rennie: review+


Attachments
Changes getDebugTargets to look for an associated ILaunch from an element which is not a classical Debug Model element. (1.71 KB, patch)
2011-01-04 16:33 EST, Randy Rohrbach CLA
pawel.1.piech: iplog+
Details | Diff
Alternative fix. (1.35 KB, patch)
2011-03-17 13:02 EDT, Pawel Piech CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.