diff --git a/platform/xdebugger-api/src/com/intellij/xdebugger/breakpoints/XBreakpointType.java b/platform/xdebugger-api/src/com/intellij/xdebugger/breakpoints/XBreakpointType.java index a41635140e74..22fc25df8021 100644 --- a/platform/xdebugger-api/src/com/intellij/xdebugger/breakpoints/XBreakpointType.java +++ b/platform/xdebugger-api/src/com/intellij/xdebugger/breakpoints/XBreakpointType.java @@ -49,6 +49,7 @@ import java.util.List; */ public abstract class XBreakpointType, P extends XBreakpointProperties> { public static final ExtensionPointName EXTENSION_POINT_NAME = ExtensionPointName.create("com.intellij.xdebugger.breakpointType"); + public static final SuspendPolicy DEFAULT_SUSPEND_POLICY = SuspendPolicy.ALL; private final @NonNls @NotNull String myId; private final @Nls @NotNull String myTitle; private final boolean mySuspendThreadSupported; @@ -84,6 +85,10 @@ public abstract class XBreakpointType, P extends XBreak return mySuspendThreadSupported; } + public SuspendPolicy getDefaultSuspendPolicy() { + return DEFAULT_SUSPEND_POLICY; + } + public enum StandardPanels {SUSPEND_POLICY, ACTIONS, DEPENDENCY} public EnumSet getVisibleStandardPanels() { diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/BreakpointState.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/BreakpointState.java index 8631b8fc901b..fa2547de63e5 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/BreakpointState.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/BreakpointState.java @@ -37,7 +37,7 @@ public class BreakpointState, P extends XBreakpointProp private String myTypeId; private boolean myEnabled; private Element myPropertiesElement; - private SuspendPolicy mySuspendPolicy = SuspendPolicy.ALL; + private SuspendPolicy mySuspendPolicy = XBreakpointType.DEFAULT_SUSPEND_POLICY; private boolean myLogMessage; private LogExpression myLogExpression; private Condition myCondition; @@ -53,10 +53,11 @@ public class BreakpointState, P extends XBreakpointProp public BreakpointState() { } - public BreakpointState(final boolean enabled, final String typeId, final long timeStamp) { + public BreakpointState(final boolean enabled, final String typeId, final long timeStamp, final SuspendPolicy suspendPolicy) { myEnabled = enabled; myTypeId = typeId; myTimeStamp = timeStamp; + mySuspendPolicy = suspendPolicy; } @Attribute("enabled") diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/LineBreakpointState.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/LineBreakpointState.java index c843d9ef53c1..534db7761a79 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/LineBreakpointState.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/LineBreakpointState.java @@ -16,6 +16,7 @@ package com.intellij.xdebugger.impl.breakpoints; import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.xdebugger.breakpoints.SuspendPolicy; import com.intellij.xdebugger.breakpoints.XBreakpointProperties; import com.intellij.xdebugger.breakpoints.XLineBreakpoint; import com.intellij.xdebugger.breakpoints.XLineBreakpointType; @@ -33,8 +34,9 @@ public class LineBreakpointState

extends Breakp public LineBreakpointState() { } - public LineBreakpointState(final boolean enabled, final String typeId, final String fileUrl, final int line, boolean temporary, final long timeStamp) { - super(enabled, typeId, timeStamp); + public LineBreakpointState(final boolean enabled, final String typeId, final String fileUrl, final int line, boolean temporary, + final long timeStamp, final SuspendPolicy suspendPolicy) { + super(enabled, typeId, timeStamp, suspendPolicy); myFileUrl = fileUrl; myLine = line; myTemporary = temporary; diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java index 0c9f0bdd806c..f6038c693eb2 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/XBreakpointManagerImpl.java @@ -121,7 +121,7 @@ public class XBreakpointManagerImpl implements XBreakpointManager, PersistentSta boolean defaultBreakpoint) { BreakpointState state = new BreakpointState<>(enabled, type.getId(), - defaultBreakpoint ? 0 : myTime++); + defaultBreakpoint ? 0 : myTime++, type.getDefaultSuspendPolicy()); getBreakpointDefaults(type).applyDefaults(state); state.setGroup(myDefaultGroup); return new XBreakpointBase,T, BreakpointState>(type, this, properties, state); @@ -217,7 +217,7 @@ public class XBreakpointManagerImpl implements XBreakpointManager, PersistentSta boolean temporary) { ApplicationManager.getApplication().assertWriteAccessAllowed(); LineBreakpointState state = new LineBreakpointState<>(true, type.getId(), fileUrl, line, temporary, - myTime++); + myTime++, type.getDefaultSuspendPolicy()); getBreakpointDefaults(type).applyDefaults(state); state.setGroup(myDefaultGroup); XLineBreakpointImpl breakpoint = new XLineBreakpointImpl<>(type, this, properties, @@ -508,6 +508,7 @@ public class XBreakpointManagerImpl implements XBreakpointManager, PersistentSta private static BreakpointState createBreakpointDefaults(@NotNull XBreakpointType type) { BreakpointState state = new BreakpointState(); state.setTypeId(type.getId()); + state.setSuspendPolicy(type.getDefaultSuspendPolicy()); return state; }