public String getCurrentFieldName () { String s = cp1.getCurrentFieldName (); if ( (s == null) || (s.trim ().length () < 1)) return cp2.getCurrentFieldName (); return s; }
public static String getDefaultType () { String id = getContext().getSelectedIdentifier (); try { if (id != null) { if (id.equals(getContext().getCurrentMethodName())) return METHOD; String s = getContext().getCurrentClassName(); int i = s.lastIndexOf ('.'); if (i >= 0) s = s.substring (i + 1); if (id.equals (s)) return CLASS; return FIELD; } else { String s = getContext().getCurrentFieldName (); if (s != null && s.length () > 0) return FIELD; s = getContext().getCurrentMethodName(); if (s != null && s.length () > 0) return METHOD; if (s != null && s.length () < 1) { s = getContext().getCurrentClassName (); if (s.length () > 0) return CLASS; } } } catch (java.awt.IllegalComponentStateException icsex) {} return null; }
private static FieldBreakpoint creteBreakpoint () { String className; try { className = EditorContextBridge.getContext().getCurrentClassName(); } catch (java.awt.IllegalComponentStateException icsex) { className = ""; } String fieldName; try { fieldName = EditorContextBridge.getContext().getCurrentFieldName(); } catch (java.awt.IllegalComponentStateException icsex) { fieldName = ""; } FieldBreakpoint mb = FieldBreakpoint.create ( className, fieldName, FieldBreakpoint.TYPE_ACCESS ); mb.setPrintText ( NbBundle.getBundle (FieldBreakpointPanel.class).getString ("CTL_Field_Breakpoint_Print_Text") ); return mb; }
static JPDABreakpoint getCurrentFieldMethodBreakpoint() { String className = EditorContextBridge.getContext().getCurrentClassName(); String fieldName = EditorContextBridge.getContext().getCurrentFieldName(); String methodName = null; String methodSignature = null; if (fieldName == null || fieldName.length() == 0) { fieldName = null; String[] methodInfo = EditorContextBridge.getContext().getCurrentMethodDeclaration(); if (methodInfo != null) { methodName = methodInfo[0]; methodSignature = methodInfo[1]; } else { return null; } } // 2) find and remove existing line breakpoint JPDABreakpoint b; if (fieldName != null) { b = findBreakpoint (className, fieldName); } else { b = findBreakpoint (className, methodName, methodSignature); } return b; }
fieldName[0] = EditorContextBridge.getContext().getCurrentFieldName(); fex = null; } catch (java.awt.IllegalComponentStateException icsex) {