/** * Returns any problem for the top stack frame in the given thread, or * <code>null</code> if none. * * @param thread thread to look for a compilation problem in * @return problem or <code>null</code> * @throws DebugException if an exception occurrs retrieveing the problem */ private IMarker getProblem(IJavaThread thread) throws DebugException { IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame(); if (frame != null) { return getProblem(frame); } return null; }
try { IBreakpoint[] breakpoints= thread.getBreakpoints(); IJavaStackFrame frame= (IJavaStackFrame)thread.getTopStackFrame(); String newFilter= frame.getDeclaringTypeName(); int index = newFilter.indexOf(Signature.C_GENERIC_START);
public void run() { getStructuredViewer().refresh(); if (select) { Object tos; try { tos = thread.getTopStackFrame(); if (tos != null) { getStructuredViewer().setSelection(new StructuredSelection(tos)); } } catch (DebugException e) { } } } };
protected boolean handlesEvent(DebugEvent event) { if (super.handlesEvent(event)) { Object source = event.getSource(); if (source instanceof IJavaThread) { IJavaThread thread = (IJavaThread) source; ILaunch launch = thread.getLaunch(); if (launch != null) { if (launch.getAttribute(ScrapbookLauncher.SCRAPBOOK_LAUNCH) != null) { if (event.getKind() == DebugEvent.SUSPEND) { try { IJavaStackFrame frame = (IJavaStackFrame) thread.getTopStackFrame(); if (frame.getDeclaringTypeName().startsWith("org.eclipse.jdt.internal.debug.ui.snippeteditor.ScrapbookMain")) { //$NON-NLS-1$ return false; } } catch (DebugException e) { } } } } } } else { return false; } return true; }
/** * Listen for the completion of the "run to line." When the thread * suspends at the correct location, perform a "step into selection" * @param event the debug event */ private void handleSuspendEvent(DebugEvent event) { Object source = event.getSource(); if (source instanceof IJavaThread) { try { final IJavaStackFrame frame= (IJavaStackFrame) ((IJavaThread) source).getTopStackFrame(); if (isExpectedFrame(frame)) { DebugPlugin plugin = DebugPlugin.getDefault(); plugin.removeDebugEventListener(listener); plugin.asyncExec(new Runnable() { public void run() { try { doStepIn(frame, method); } catch (DebugException e) { showErrorMessage(e.getStatus().getMessage()); } } }); } } catch (DebugException e) { return; } } } /**
IJavaStackFrame frame = (IJavaStackFrame)thread.getTopStackFrame(); IMarker problem = null; if (frame != null) {
return null; IJavaStackFrame f= (IJavaStackFrame)jt.getTopStackFrame(); if (f != null) { IJavaDebugTarget target = (IJavaDebugTarget) f.getDebugTarget();
final IJavaStackFrame frame = (IJavaStackFrame)getThread().getTopStackFrame(); int stackDepth = frame.getThread().getStackFrames().length; String name = null;
IJavaDebugTarget target = (IJavaDebugTarget)javaValue.getDebugTarget().getAdapter(IJavaDebugTarget.class); if (target != null) { stackFrame= thread.getTopStackFrame(); if (stackFrame != null && !stackFrame.getDebugTarget().equals(target)) { stackFrame= null;
IJavaThread thread = (IJavaThread)frame.getThread(); try { if (frame.equals(thread.getTopStackFrame())) { IBreakpoint[] breakpoints = thread.getBreakpoints(); if (breakpoints.length == 1) {