private void stackToCLBD(List<JPDAThread> threads) { StringBuffer frameStr = new StringBuffer(512); for (JPDAThread t : threads) { if (frameStr.length() > 0) { frameStr.append('\n'); } frameStr.append("\""); frameStr.append(t.getName()); frameStr.append("\"\n"); appendStackInfo(frameStr, t); } Clipboard systemClipboard = getClipboard(); Transferable transferableText = new StringSelection(frameStr.toString()); systemClipboard.setContents( transferableText, null); }
String stratumn ) { int lineNumber = t.getLineNumber (stratumn); if (lineNumber < 1) return null; Operation operation = t.getCurrentOperation(); String url; try { url = getURL (convertSlash (t.getSourcePath (stratumn)), true); } catch (AbsentInformationException e) { url = getURL (convertClassNameToRelativePath (t.getClassName ()), true); List operationsAnn = annotateOperations(debugger, url, operation, t.getLastOperations(), lineNumber); if (operation == null) { if (operationsAnn.size() == 0) {
public static String getRelativePath ( JPDAThread thread, String stratumn ) { try { return convertSlash (thread.getSourcePath (stratumn)); } catch (AbsentInformationException e) { return getRelativePath (thread.getClassName ()); } }
if (d == null) return; JPDAThread t = d.getCurrentThread(); if (t == null || !t.isSuspended()) return ; String toolTipText = null; try { Variable v = null; List<Operation> operations = t.getLastOperations(); if (operations != null) { for (Operation operation: operations) {
CallStackFrame frame; try { CallStackFrame[] callStack = event.getThread().getCallStack(0, 1); if (callStack.length > 0) { frame = callStack[0];
public boolean showSource ( JPDAThread t, String stratumn ) { int lineNumber = t.getLineNumber (stratumn); if (lineNumber < 1) lineNumber = 1; try { return EditorContextBridge.getContext().showSource ( getURL (convertSlash (t.getSourcePath (stratumn)), true), lineNumber, debugger ); } catch (AbsentInformationException e) { return EditorContextBridge.getContext().showSource ( getURL ( convertClassNameToRelativePath (t.getClassName ()), true ), lineNumber, debugger ); } }
if (t == null || !t.isSuspended()) { return; try { Variable v = null; List<Operation> operations = t.getLastOperations(); if (operations != null) { for (Operation operation: operations) {
CallStackFrame[] stack; try { stack = t.getCallStack (); } catch (AbsentInformationException ex) { frameStr.append(Bundle.MSG_NoSourceInfo());
public boolean sourceAvailable ( JPDAThread t, String stratumn, boolean global ) { try { return sourceAvailable ( convertSlash (t.getSourcePath (stratumn)), global ); } catch (AbsentInformationException e) { return sourceAvailable ( convertClassNameToRelativePath (t.getClassName ()), global ); } }
if (t == null || !t.isSuspended()) { return; try { Variable v = null; List<Operation> operations = t.getLastOperations(); if (operations != null) { for (Operation operation: operations) {
private void stackToCLBD(List<JPDAThread> threads) { StringBuffer frameStr = new StringBuffer(512); for (JPDAThread t : threads) { if (frameStr.length() > 0) { frameStr.append('\n'); } frameStr.append("\""); frameStr.append(t.getName()); frameStr.append("\"\n"); appendStackInfo(frameStr, t); } Clipboard systemClipboard = getClipboard(); Transferable transferableText = new StringSelection(frameStr.toString()); systemClipboard.setContents( transferableText, null); }
CallStackFrame[] stack; try { stack = t.getCallStack (); } catch (AbsentInformationException ex) { frameStr.append(Bundle.MSG_NoSourceInfo());
public String getShortDescription () { if (type == EditorContext.CURRENT_LINE_ANNOTATION_TYPE) return NbBundle.getMessage (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC"); // NOI18N if (type == EditorContext.CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE) return NbBundle.getMessage (DebuggerAnnotation.class, "TOOLTIP_CURRENT_EXP_LINE"); // NOI18N else if (type == EditorContext.CALL_STACK_FRAME_ANNOTATION_TYPE) return NbBundle.getBundle (DebuggerAnnotation.class).getString ("TOOLTIP_CALLSITE"); // NOI18N if (type == EditorContext.OTHER_THREAD_ANNOTATION_TYPE) { return NbBundle.getMessage(DebuggerAnnotation.class, "TOOLTIP_OTHER_THREAD", thread.getName()); } ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, new IllegalStateException("Unknown annotation type '"+type+"'.")); return null; }
Variable scriptClass = null; try { CallStackFrame csf = event.getThread().getCallStack(0, 1)[0]; LocalVariable[] localVariables = csf.getLocalVariables(); for (LocalVariable lv : localVariables) {
@Override public String getShortDescription () { if (type == EditorContext.CURRENT_LINE_ANNOTATION_TYPE) { return NbBundle.getMessage (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC"); // NOI18N } if (type == EditorContext.CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE) { return NbBundle.getMessage (DebuggerAnnotation.class, "TOOLTIP_CURRENT_EXP_LINE"); // NOI18N } else if (type == EditorContext.CALL_STACK_FRAME_ANNOTATION_TYPE) { return NbBundle.getBundle (DebuggerAnnotation.class).getString ("TOOLTIP_CALLSITE"); // NOI18N } if (type == EditorContext.OTHER_THREAD_ANNOTATION_TYPE) { return NbBundle.getMessage(DebuggerAnnotation.class, "TOOLTIP_OTHER_THREAD", thread.getName()); } ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, new IllegalStateException("Unknown annotation type '"+type+"'.")); return null; }
@Override public String getShortDescription () { if (type == EditorContext.CURRENT_LINE_ANNOTATION_TYPE) { return NbBundle.getMessage (DebuggerAnnotation.class, "TOOLTIP_CURRENT_PC"); // NOI18N } if (type == EditorContext.CURRENT_EXPRESSION_CURRENT_LINE_ANNOTATION_TYPE) { return NbBundle.getMessage (DebuggerAnnotation.class, "TOOLTIP_CURRENT_EXP_LINE"); // NOI18N } else if (type == EditorContext.CALL_STACK_FRAME_ANNOTATION_TYPE) { return NbBundle.getBundle (DebuggerAnnotation.class).getString ("TOOLTIP_CALLSITE"); // NOI18N } if (type == EditorContext.OTHER_THREAD_ANNOTATION_TYPE) { return NbBundle.getMessage(DebuggerAnnotation.class, "TOOLTIP_OTHER_THREAD", thread.getName()); } ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, new IllegalStateException("Unknown annotation type '"+type+"'.")); return null; }