bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
function(start, end, line, offset, len) {
			// We use typeof because we need to distinguish the number 0 from an undefined or null parameter
			if (typeof(start) === "number") { //$NON-NLS-0$
				if (typeof(end) !== "number") { //$NON-NLS-0$
					end = start;
				}
				this.moveSelection(start, end);
				return true;
			} else if (typeof(line) === "number") { //$NON-NLS-0$
				var model = this.getModel();
				var pos = model.getLineStart(line-1);
				if (typeof(offset) === "number") { //$NON-NLS-0$
					pos = pos + offset;
				}
				if (typeof(len) !== "number") { //$NON-NLS-0$
					len = 0;
				}
				this.moveSelection(pos, pos+len);
				return true;
			}
			return false;
		}
function(start, end, line, offset, len) {
			// We use typeof because we need to distinguish the number 0 from an undefined or null parameter
			if (typeof(start) === "number") { //$NON-NLS-0$
				if (typeof(end) !== "number") { //$NON-NLS-0$
					end = start;
				}
				this.moveSelection(start, end);
				return true;
			} else if (typeof(line) === "number") { //$NON-NLS-0$
				var model = this.getModel();
				var pos = model.getLineStart(line-1);
				if (typeof(offset) === "number") { //$NON-NLS-0$
					pos = pos + offset;
				}
				if (typeof(len) !== "number") { //$NON-NLS-0$
					len = 0;
				}
				this.moveSelection(pos, pos+len);
				return true;
			}
			return false;
		}
function ( start , end , line , offset , len ) { // We use typeof because we need to distinguish the number 0 from an undefined or null parameter if ( typeof ( start ) === "number" ) { //$NON-NLS-0$ if ( typeof ( end ) !== "number" ) { //$NON-NLS-0$ end = start ; } this . moveSelection ( start , end ) ; return true ; } else if ( typeof ( line ) === "number" ) { //$NON-NLS-0$ var model = this . getModel ( ) ; var pos = model . getLineStart ( line - 1 ) ; if ( typeof ( offset ) === "number" ) { //$NON-NLS-0$ pos = pos + offset ; } if ( typeof ( len ) !== "number" ) { //$NON-NLS-0$ len = 0 ; } this . moveSelection ( pos , pos + len ) ; return true ; } return false ; }
Reveals and selects a portion of text.
@param {Number} start
@param {Number} end
@param {Number} line
@param {Number} offset
@param {Number} length
Reveals and selects a portion of text .