mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
EA-58590 - CME: XDebugSessionImpl.a
This commit is contained in:
@@ -91,7 +91,7 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
private XDebugProcess myDebugProcess;
|
||||
private final Map<XBreakpoint<?>, CustomizedBreakpointPresentation> myRegisteredBreakpoints =
|
||||
new THashMap<XBreakpoint<?>, CustomizedBreakpointPresentation>();
|
||||
private final Set<XBreakpoint<?>> myInactiveSlaveBreakpoints = new SmartHashSet<XBreakpoint<?>>();
|
||||
private final Set<XBreakpoint<?>> myInactiveSlaveBreakpoints = Collections.synchronizedSet(new SmartHashSet<XBreakpoint<?>>());
|
||||
private boolean myBreakpointsDisabled;
|
||||
private final XDebuggerManagerImpl myDebuggerManager;
|
||||
private MyBreakpointListener myBreakpointListener;
|
||||
@@ -295,12 +295,15 @@ public class XDebugSessionImpl implements XDebugSession {
|
||||
XBreakpointManagerImpl breakpointManager = myDebuggerManager.getBreakpointManager();
|
||||
XDependentBreakpointManager dependentBreakpointManager = breakpointManager.getDependentBreakpointManager();
|
||||
disableSlaveBreakpoints(dependentBreakpointManager);
|
||||
processAllBreakpoints(true, false);
|
||||
|
||||
// listeners have to be applied before processing all existing breakpoints,
|
||||
// otherwise we may not process breakpoints added during the processing
|
||||
myBreakpointListener = new MyBreakpointListener();
|
||||
breakpointManager.addBreakpointListener(myBreakpointListener);
|
||||
myDependentBreakpointListener = new MyDependentBreakpointListener();
|
||||
dependentBreakpointManager.addListener(myDependentBreakpointListener);
|
||||
|
||||
processAllBreakpoints(true, false);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+8
-7
@@ -240,14 +240,15 @@ public class XBreakpointManagerImpl implements XBreakpointManager, PersistentSta
|
||||
@NotNull
|
||||
public <B extends XBreakpoint<?>> Collection<? extends B> getBreakpoints(@NotNull final XBreakpointType<B,?> type) {
|
||||
ApplicationManager.getApplication().assertReadAccessAllowed();
|
||||
Collection<? extends XBreakpointBase<?,?,?>> breakpoints = myBreakpoints.get(type);
|
||||
Collection<? extends B> regular = breakpoints != null ? Collections.unmodifiableCollection((Collection<? extends B>)breakpoints) : Collections.<B>emptyList();
|
||||
|
||||
final XBreakpointBase<?, ?, ?> defaultBreakpoint = myDefaultBreakpoints.get(type);
|
||||
if (defaultBreakpoint == null) return regular;
|
||||
List<B> result = new ArrayList<B>();
|
||||
result.add((B)defaultBreakpoint);
|
||||
result.addAll(regular);
|
||||
B defaultBreakpoint = getDefaultBreakpoint(type);
|
||||
if (defaultBreakpoint != null) {
|
||||
result.add(defaultBreakpoint);
|
||||
}
|
||||
Collection<XBreakpointBase<?, ?, ?>> breakpoints = myBreakpoints.get(type);
|
||||
if (breakpoints != null) {
|
||||
result.addAll((Collection<? extends B>)breakpoints);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user