protected IJavaType getTypeToOpen(IDebugElement element) throws CoreException { if (element instanceof IJavaStackFrame) { IJavaStackFrame frame = (IJavaStackFrame) element; return frame.getReferenceType(); } return null; }
if (element instanceof IJavaStackFrame) { IJavaStackFrame stackFrame = (IJavaStackFrame) element; declaringType = stackFrame.getReferenceType(); } else if (element instanceof IJavaObject) { IJavaType javaType = ((IJavaObject) element).getJavaType();
protected IJavaType getTypeToOpen(IDebugElement element) throws CoreException { if (element instanceof IJavaStackFrame) { IJavaStackFrame frame = (IJavaStackFrame) element; if (frame.isStatic()) { return frame.getReferenceType(); } return frame.getThis().getJavaType(); } return null; } }
javaStratum = frame.getReferenceType().getDefaultStratum().equals("Java"); //$NON-NLS-1$ } catch (DebugException e) {
declaringType = stackFrame.getReferenceType(); } else if (element instanceof IJavaObject) { IJavaType javaType = ((IJavaObject) element).getJavaType();
/** * Fills the given menu with available stratum. * * @param m */ private void fillMenu(Menu m) { IStackFrame frame = (IStackFrame) fSelection.getFirstElement(); final IJavaStackFrame javaStackFrame = (IJavaStackFrame) frame.getAdapter(IJavaStackFrame.class); try { IJavaReferenceType declaringType = javaStackFrame.getReferenceType(); final IJavaDebugTarget target = (IJavaDebugTarget) javaStackFrame.getDebugTarget(); String currentStratum = target.getDefaultStratum(); String[] strata = declaringType.getAvailableStrata(); for (int i = 0; i < strata.length; i++) { final String stratum = strata[i]; MenuItem item = createMenuItem(m, stratum, javaStackFrame, target); item.setSelection(stratum.equals(currentStratum)); } MenuItem item = createMenuItem(m, null, javaStackFrame, target); item.setSelection(currentStratum == null); } catch (DebugException e) { } }
if (fElement instanceof IJavaStackFrame) { IJavaStackFrame stackFrame = (IJavaStackFrame) fElement; declaringType = stackFrame.getReferenceType();
IJavaReferenceType type = frame.getReferenceType(); Object cachedSource = getSourceElement(type); if (cachedSource != null) {