IDEA-128124 Debugger: Force Run to Cursor on empty line ignores following breakpoint - fix reverted

This commit is contained in:
Egor.Ushakov
2014-08-04 18:43:55 +04:00
parent 73076e9630
commit ea6ee883e1
@@ -15,7 +15,6 @@
*/
package com.intellij.xdebugger.impl.actions.handlers;
import com.intellij.xdebugger.XDebuggerUtil;
import com.intellij.xdebugger.impl.actions.XDebuggerSuspendedActionHandler;
import com.intellij.xdebugger.impl.XDebuggerUtilImpl;
import com.intellij.xdebugger.XDebugSession;
@@ -34,9 +33,7 @@ public class XDebuggerRunToCursorActionHandler extends XDebuggerSuspendedActionH
}
protected boolean isEnabled(final @NotNull XDebugSession session, final DataContext dataContext) {
if (!super.isEnabled(session, dataContext)) return false;
XSourcePosition position = XDebuggerUtilImpl.getCaretPosition(session.getProject(), dataContext);
return position != null && XDebuggerUtil.getInstance().canPutBreakpointAt(session.getProject(), position.getFile(), position.getLine());
return super.isEnabled(session, dataContext) && XDebuggerUtilImpl.getCaretPosition(session.getProject(), dataContext) != null;
}
protected void perform(@NotNull final XDebugSession session, final DataContext dataContext) {