@Override public Object annotate(String url, int lineNumber, String annotationType, Object timeStamp, JPDAThread thread) { CompoundAnnotation ca = new CompoundAnnotation (); ca.annotation1 = cp1.annotate (url, lineNumber, annotationType, timeStamp, thread); ca.annotation2 = cp2.annotate (url, lineNumber, annotationType, timeStamp, thread); if (ca.annotation1 != null || ca.annotation2 != null) { return ca; } else { return null; } }
@Override public Object annotate(String url, int startPosition, int endPosition, String annotationType, Object timeStamp) { CompoundAnnotation ca = new CompoundAnnotation (); ca.annotation1 = cp1.annotate (url, startPosition, endPosition, annotationType, timeStamp); ca.annotation2 = cp2.annotate (url, startPosition, endPosition, annotationType, timeStamp); if (ca.annotation1 != null || ca.annotation2 != null) { return ca; } else { return null; } }
public Object annotate ( String sourceName, int lineNumber, String annotationType, Object timeStamp ) { CompoundAnnotation ca = new CompoundAnnotation (); ca.annotation1 = cp1.annotate (sourceName, lineNumber, annotationType, timeStamp); ca.annotation2 = cp2.annotate (sourceName, lineNumber, annotationType, timeStamp); if (ca.annotation1 != null || ca.annotation2 != null) { return ca; } else { return null; } }
/** * Adds annotation to given url on given line. * * @param url a url of source annotation should be set into * @param lineNumber a number of line annotation should be set into * @param annotationType a type of annotation to be set * * @return annotation or <code>null</code>, when the annotation can not be * created at the given URL or line number. */ public static Object annotate(String url, int lineNumber, String annotationType, Object timeStamp) { return getContext().annotate(url, lineNumber, annotationType, timeStamp); }
/** * Adds annotation to given url on given line. * * @param url a url of source annotation should be set into * @param lineNumber a number of line annotation should be set into * @param annotationType a type of annotation to be set * * @return annotation or <code>null</code>, when the annotation can not be * created at the given URL or line number. */ public static Object annotate ( String url, int lineNumber, String annotationType, Object timeStamp ) { return getContext ().annotate (url, lineNumber, annotationType, timeStamp); }
lineNumber = currentOperation.getStartPosition().getLine(); annotations.add(EditorContextBridge.getContext().annotate ( url, lineNumber, false)); int lineNumber = lastOperation.getEndPosition().getLine(); annotations.add(EditorContextBridge.getContext().annotate ( url, lineNumber, annotations.add(EditorContextBridge.getContext().annotate ( url, locLineNumber,
public static Object annotate ( LineBreakpoint b ) { String url = b.getURL (); int lineNumber = b.getLineNumber (); if (lineNumber < 1) return null; String condition = b.getCondition (); boolean isConditional = (condition != null) && !"".equals (condition.trim ()); // NOI18N boolean isInvalid = b.getValidity() == VALIDITY.INVALID; String annotationType = b.isEnabled () ? (isConditional ? EditorContext.CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE : EditorContext.BREAKPOINT_ANNOTATION_TYPE) : (isConditional ? EditorContext.DISABLED_CONDITIONAL_BREAKPOINT_ANNOTATION_TYPE : EditorContext.DISABLED_BREAKPOINT_ANNOTATION_TYPE); if (isInvalid && b.isEnabled ()) annotationType += "_broken"; return getContext().annotate ( url, lineNumber, annotationType, null ); }
for (int i = 0; i < URLs.length; i++) { if (lineNumbers[i] >= 1) { Object annotation = getContext().annotate (URLs[i], lineNumbers[i], annotationType, null); if (annotation != null) { annotations.add(annotation);
if (operation == null) { if (operationsAnn.size() == 0) { return EditorContextBridge.getContext().annotate ( url, lineNumber,
private static Object createAnnotation(JPDADebugger debugger, String url, Operation operation, String type, boolean method) { int startOffset; int endOffset; if (method && operation.getMethodName() != null) { startOffset = operation.getMethodStartPosition().getOffset(); endOffset = operation.getMethodEndPosition().getOffset(); } else { startOffset = operation.getStartPosition().getOffset(); endOffset = operation.getEndPosition().getOffset(); } return EditorContextBridge.getContext().annotate ( url, startOffset, endOffset, type, debugger ); }
endOffset = operation.getEndPosition().getOffset(); return EditorContextBridge.getContext().annotate ( getURL (convertSlash (csf.getSourcePath (stratumn)), true), startOffset, ); } else { return EditorContextBridge.getContext().annotate ( getURL (convertSlash (csf.getSourcePath (stratumn)), true), lineNumber, return EditorContextBridge.getContext().annotate ( getURL ( convertClassNameToRelativePath (csf.getClassName ()), true