Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jdt-debug-dev] How can I invoke IBreakpoint.setEnabled(doEnable) without firing change event?

Hi.
I want to prevent from firing of org.eclipse.debug.internal.core.BreakpointManager.fireUpdate(List breakpoints, List deltas, int update)
in "response" to ...

org.eclipse.debug.internal.core.BreakpointManager.resourceChanged(IResourceChangeEvent event) in response to  

org.eclipse.core.internal.events.NotificationManager.notify(ListenerEntry[] resourceListeners, IResourceChangeEvent event, boolean lockTree)

as result of invoking of JavaLineBreakpoint.setEnabled(boolean) as Object in varaible of type IBreakpoint.

I call this in a SWT worker thread. I assumed this way, that the IResourceChangeEvent is generated and consumed in whole in the current Thread. I need to prevent from firing of ChangeEvent, because I use a IBreakpointListener which sends its local generated BreakpointEvents to peers and receives others from them. The received ones must be replayed and these must be prevented from generating new outgoing Breakpoint events, because they are not origin from the local user. I hope you understand what I mean.

Just keep in mind: Is there a way from preventing update firing?


How can I reach the same as this code does when  isChangeSuppressed(breakpoint) would return true:

protected void handleChangeBreakpoint(IMarker marker, IMarkerDelta delta) {
            IBreakpoint breakpoint= getBreakpoint(marker);
            if (breakpoint != null && isRegistered(breakpoint) && !isChangeSuppressed(breakpoint)) {
                fChanged.add(breakpoint);
                fChangedDeltas.add(delta);
            }
        }


-----------------------------------------------------------------------------------
A side issue is about
org.eclipse.debug.internal.core.BreakpointManager.PostChangeVisitor.visit(IResourceDelta delta). Which of this BreakpointManager visitors are in play when I make IBreakpoint.setEnabled(boolean).
------------------------------------------------------------------------------------



Kind regards.

Frank E.


Back to the top