本文整理汇总了Java中org.eclipse.debug.core.DebugEvent.CLIENT_REQUEST属性的典型用法代码示例。如果您正苦于以下问题:Java DebugEvent.CLIENT_REQUEST属性的具体用法?Java DebugEvent.CLIENT_REQUEST怎么用?Java DebugEvent.CLIENT_REQUEST使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.debug.core.DebugEvent
的用法示例。
在下文中一共展示了DebugEvent.CLIENT_REQUEST属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: handleSuspendEvent
private void handleSuspendEvent(DebugEvent event) {
switch (event.getDetail()) {
case DebugEvent.BREAKPOINT:
TrackingEventManager.addEvent(new DebugEventBase(
TrackingEventType.SUSPEND_BREAKPOINT, new Date()));
break;
case DebugEvent.CLIENT_REQUEST:
TrackingEventManager.addEvent(new DebugEventBase(
TrackingEventType.SUSPEND_CLIENT, new Date()));
break;
case DebugEvent.EVALUATION:
TrackingEventManager.addEvent(new DebugEventBase(
TrackingEventType.INSPECT_VARIABLE, new Date()));
break;
}
}
示例2: handleResumeEvent
private void handleResumeEvent(DebugEvent event) {
switch (event.getDetail()) {
case DebugEvent.STEP_INTO:
TrackingEventManager.addEvent(
new DebugEventBase(TrackingEventType.STEP_INTO, new Date()));
break;
case DebugEvent.STEP_OVER:
TrackingEventManager.addEvent(
new DebugEventBase(TrackingEventType.STEP_OVER, new Date()));
break;
case DebugEvent.STEP_RETURN:
TrackingEventManager.addEvent(
new DebugEventBase(TrackingEventType.STEP_OUT, new Date()));
break;
case DebugEvent.CLIENT_REQUEST:
TrackingEventManager.addEvent(new DebugEventBase(
TrackingEventType.RESUME_CLIENT, new Date()));
break;
}
}
示例3: calcDetail
private int calcDetail(String reason) {
if (reason.equals("breakpoint")) { //$NON-NLS-1$
return DebugEvent.BREAKPOINT;
} else if (reason.equals("step")) { //$NON-NLS-1$
return DebugEvent.STEP_OVER;
// } else if (reason.equals("exception")) { //$NON-NLS-1$
// return DebugEvent.STEP_RETURN;
} else if (reason.equals("pause")) { //$NON-NLS-1$
return DebugEvent.CLIENT_REQUEST;
// } else if (reason.equals("event")) { //$NON-NLS-1$
// return DebugEvent.BREAKPOINT;
} else {
return DebugEvent.UNSPECIFIED;
}
}
示例4: processThreadSuspended
private void processThreadSuspended(String payload) {
StoppedStack threadNstack;
try {
threadNstack = XMLUtils.XMLToStack(this, payload);
} catch (CoreException e) {
PydevDebugPlugin.errorDialog("Error reading ThreadSuspended", e);
return;
}
PyThread t = threadNstack.thread;
int reason = DebugEvent.UNSPECIFIED;
String stopReason = threadNstack.stopReason;
if (stopReason != null) {
int stopReason_i = Integer.parseInt(stopReason);
if (stopReason_i == AbstractDebuggerCommand.CMD_STEP_OVER
|| stopReason_i == AbstractDebuggerCommand.CMD_STEP_INTO
|| stopReason_i == AbstractDebuggerCommand.CMD_STEP_CAUGHT_EXCEPTION
|| stopReason_i == AbstractDebuggerCommand.CMD_STEP_RETURN
|| stopReason_i == AbstractDebuggerCommand.CMD_RUN_TO_LINE
|| stopReason_i == AbstractDebuggerCommand.CMD_SET_NEXT_STATEMENT) {
//Code which could be used to know where a caught exception broke the debugger.
//if (stopReason_i == AbstractDebuggerCommand.CMD_STEP_CAUGHT_EXCEPTION) {
// System.out.println("Stopped: caught exception");
// IStackFrame stackFrame[] = (IStackFrame[]) threadNstack[2];
// if (stackFrame.length > 0) {
// IStackFrame currStack = stackFrame[0];
// if (currStack instanceof PyStackFrame) {
// PyStackFrame pyStackFrame = (PyStackFrame) currStack;
// try {
// System.out.println(pyStackFrame.getPath() + " " + pyStackFrame.getLineNumber());
// } catch (DebugException e) {
// Log.log(e);
// }
// }
// }
//
//}
reason = DebugEvent.STEP_END;
} else if (stopReason_i == AbstractDebuggerCommand.CMD_THREAD_SUSPEND) {
reason = DebugEvent.CLIENT_REQUEST;
} else if (stopReason_i == AbstractDebuggerCommand.CMD_SET_BREAK) {
reason = DebugEvent.BREAKPOINT;
} else {
PydevDebugPlugin.log(IStatus.ERROR, "Unexpected reason for suspension", null);
reason = DebugEvent.UNSPECIFIED;
}
}
if (t != null) {
IStackFrame stackFrame[] = threadNstack.stack;
t.setSuspended(true, stackFrame);
fireEvent(new DebugEvent(t, DebugEvent.SUSPEND, reason));
}
}
示例5: processThreadRun
/**
* ThreadRun event processing
*/
private void processThreadRun(String payload) {
try {
Tuple<String, String> threadIdAndReason = getThreadIdAndReason(payload);
int resumeReason = DebugEvent.UNSPECIFIED;
try {
int raw_reason = Integer.parseInt(threadIdAndReason.o2);
if (raw_reason == AbstractDebuggerCommand.CMD_STEP_OVER) {
resumeReason = DebugEvent.STEP_OVER;
} else if (raw_reason == AbstractDebuggerCommand.CMD_STEP_RETURN) {
resumeReason = DebugEvent.STEP_RETURN;
} else if (raw_reason == AbstractDebuggerCommand.CMD_STEP_INTO
|| raw_reason == AbstractDebuggerCommand.CMD_STEP_CAUGHT_EXCEPTION) {
resumeReason = DebugEvent.STEP_INTO;
} else if (raw_reason == AbstractDebuggerCommand.CMD_RUN_TO_LINE) {
resumeReason = DebugEvent.UNSPECIFIED;
} else if (raw_reason == AbstractDebuggerCommand.CMD_SET_NEXT_STATEMENT) {
resumeReason = DebugEvent.UNSPECIFIED;
} else if (raw_reason == AbstractDebuggerCommand.CMD_THREAD_RUN || raw_reason == -1) {
resumeReason = DebugEvent.CLIENT_REQUEST;
} else {
PydevDebugPlugin.log(IStatus.ERROR,
"Unexpected resume reason code: " + raw_reason + " payload: " + payload, null);
resumeReason = DebugEvent.UNSPECIFIED;
}
} catch (NumberFormatException e) {
// expected, when pydevd reports "None"
resumeReason = DebugEvent.UNSPECIFIED;
}
String threadID = threadIdAndReason.o1;
PyThread t = findThreadByID(threadID);
if (t != null) {
t.setSuspended(false, null);
fireEvent(new DebugEvent(t, DebugEvent.RESUME, resumeReason));
} else {
FastStringBuffer buf = new FastStringBuffer();
for (PyThread thread : threads) {
if (buf.length() > 0) {
buf.append(", ");
}
buf.append("id: " + thread.getId());
}
String msg = "Unable to find thread: " + threadID +
" available: " + buf;
PydevDebugPlugin.log(IStatus.ERROR, msg, new RuntimeException(msg));
}
} catch (CoreException e1) {
Log.log(e1);
}
}