1 11 package org.eclipse.jdt.internal.debug.ui; 12 13 import org.eclipse.core.runtime.IStatus; 14 import org.eclipse.debug.core.IStatusHandler; 15 import org.eclipse.debug.core.model.IDebugElement; 16 import org.eclipse.jdt.debug.core.IJavaDebugTarget; 17 import org.eclipse.jdt.debug.core.IJavaStackFrame; 18 import org.eclipse.ui.IWorkbenchWindow; 19 20 26 public class EvaluationStackFrameContextStatusHandler implements IStatusHandler { 27 28 31 public Object handleStatus(IStatus status, Object source) { 32 if (source instanceof IDebugElement) { 33 IDebugElement element = (IDebugElement) source; 34 IJavaDebugTarget target = (IJavaDebugTarget) element.getDebugTarget().getAdapter(IJavaDebugTarget.class); 35 if (target != null) { 36 IJavaStackFrame frame = EvaluationContextManager.getEvaluationContext((IWorkbenchWindow)null); 37 if (frame != null && frame.getDebugTarget().equals(target)) { 38 return frame; 39 } 40 } 41 } 42 return null; 43 } 44 45 } 46 | Popular Tags |