I'm developing Eclipse plugin which works with Debugger Services Framework (DSF). The goal I'm trying to achieve is to map IBreakpointsExtension.IBreakpointHitDMEvent
to platform breakpoint org.eclipse.debug.core.model.IBreakpoint
. There is service and function which can do exactly what I need: org.eclipse.cdt.dsf.debug.service.BreakpointsMediator2#getPlatformBreakpoint
.
The question is how to get/create org.eclipse.cdt.dsf.debug.service.BreakpointsMediator2
?
I tried to call DsfServicesTracker#getService(BreakpointsMediator2.class)
but it returns null
.
There is another option (I guess) to create BreakpointsMediator2
instance right in the place where it is going to be used. In that case we need instance of org.eclipse.cdt.dsf.debug.service.IBreakpointAttributeTranslator2
. But DsfServicesTracker#getService(IBreakpointAttributeTranslator2.class)
is also returns null
.
It is not possible because eclipse-dsf-cdt project simply doesn't implement org.eclipse.cdt.dsf.debug.service.BreakpointsMediator2
and org.eclipse.cdt.dsf.debug.service.IBreakpointAttributeTranslator2
interfaces. There are request though for implementation. Check https://bugs.eclipse.org/bugs/show_bug.cgi?id=478454.
Another possible solution is to use MIBreakpointsManager. Keep in mind that in this case your code depends on org.eclipse.cdt.dsf.mi.service
.