bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(line) {
			// Find any existing annotation
			var annotationModel = this.getAnnotationModel();
			var textModel = this.getModel();
			if (textModel.getBaseModel) {
				textModel = textModel.getBaseModel();
			}
			var type = AT.ANNOTATION_HIGHLIGHTED_LINE;
			var annotations = annotationModel.getAnnotations(0, textModel.getCharCount());
			var remove = null;
			while (annotations.hasNext()) {
				var annotation = annotations.next();
				if (annotation.type === type) {
					remove = annotation;
					break;
				}
			}
			var lineStart = textModel.getLineStart(line);
			var lineEnd = textModel.getLineEnd(line);
			var add = AT.createAnnotation(type, lineStart, lineEnd);
			// Replace to or add the new annotation
			if (remove) {
				annotationModel.replaceAnnotations([remove], [add]);
			} else {
				annotationModel.addAnnotation(add);
			}
		}
function(line) {
			// Find any existing annotation
			var annotationModel = this.getAnnotationModel();
			var textModel = this.getModel();
			if (textModel.getBaseModel) {
				textModel = textModel.getBaseModel();
			}
			var type = AT.ANNOTATION_HIGHLIGHTED_LINE;
			var annotations = annotationModel.getAnnotations(0, textModel.getCharCount());
			var remove = null;
			while (annotations.hasNext()) {
				var annotation = annotations.next();
				if (annotation.type === type) {
					remove = annotation;
					break;
				}
			}
			var lineStart = textModel.getLineStart(line);
			var lineEnd = textModel.getLineEnd(line);
			var add = AT.createAnnotation(type, lineStart, lineEnd);
			// Replace to or add the new annotation
			if (remove) {
				annotationModel.replaceAnnotations([remove], [add]);
			} else {
				annotationModel.addAnnotation(add);
			}
		}
function ( line ) { // Find any existing annotation var annotationModel = this . getAnnotationModel ( ) ; var textModel = this . getModel ( ) ; if ( textModel . getBaseModel ) { textModel = textModel . getBaseModel ( ) ; } var type = AT . ANNOTATION_HIGHLIGHTED_LINE ; var annotations = annotationModel . getAnnotations ( 0 , textModel . getCharCount ( ) ) ; var remove = null ; while ( annotations . hasNext ( ) ) { var annotation = annotations . next ( ) ; if ( annotation . type === type ) { remove = annotation ; break ; } } var lineStart = textModel . getLineStart ( line ) ; var lineEnd = textModel . getLineEnd ( line ) ; var add = AT . createAnnotation ( type , lineStart , lineEnd ) ; // Replace to or add the new annotation if ( remove ) { annotationModel . replaceAnnotations ( [ remove ] , [ add ] ) ; } else { annotationModel . addAnnotation ( add ) ; } }
Highlight a line.
@param {number} line
Highlight a line .