use of com.intellij.debugger.DebuggerManagerEx in project intellij-community by JetBrains.
the class ToggleMethodBreakpointAction method actionPerformed.
public void actionPerformed(AnActionEvent e) {
Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) {
return;
}
DebuggerManagerEx debugManager = DebuggerManagerEx.getInstanceEx(project);
if (debugManager == null) {
return;
}
final BreakpointManager manager = debugManager.getBreakpointManager();
final PlaceInDocument place = getPlace(e);
if (place != null && DocumentUtil.isValidOffset(place.getOffset(), place.getDocument())) {
Breakpoint breakpoint = manager.findBreakpoint(place.getDocument(), place.getOffset(), MethodBreakpoint.CATEGORY);
if (breakpoint == null) {
manager.addMethodBreakpoint(place.getDocument(), place.getDocument().getLineNumber(place.getOffset()));
} else {
manager.removeBreakpoint(breakpoint);
}
}
}
use of com.intellij.debugger.DebuggerManagerEx in project intellij-community by JetBrains.
the class JavaAwareTestConsoleProperties method getDebugSession.
@Nullable
public DebuggerSession getDebugSession() {
final DebuggerManagerEx debuggerManager = DebuggerManagerEx.getInstanceEx(getProject());
if (debuggerManager == null)
return null;
final Collection<DebuggerSession> sessions = debuggerManager.getSessions();
for (final DebuggerSession debuggerSession : sessions) {
if (getConsole() == debuggerSession.getProcess().getExecutionResult().getExecutionConsole())
return debuggerSession;
}
return null;
}
Aggregations