Merge branch 'master' of ssh://git.eclipse.org/gitroot/orion/org.eclipse.orion.client
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/form.js b/bundles/org.eclipse.orion.client.core/web/orion/form.js
new file mode 100644
index 0000000..a3a6591
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.core/web/orion/form.js
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * @license
+ * Copyright (c) 2012, 2013 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+/*global define escape*/
+define([], function() {
+	function x_www_form_urlencode(value) {
+		return encodeURIComponent(value).replace(/[!'()*]/g, escape).replace('%20', '+'); //$NON-NLS-0$ //$NON-NLS-1$
+	}
+
+	/**
+	 * @name orion.form
+	 * @class Utilities for handling HTML form encoding.
+	 */
+	return /** @lends orion.form */ {
+		/**
+		 * Encodes an object of form fields and values into an <code>application/x-www-form-urlencoded</code> string.
+		 * @static
+		 * @param {Object} data The form data to encode.
+		 * @returns {String} The <code>x-www-form-urlencoded</code> string.
+		 */
+		encodeFormData: function(data) {
+			data = data || {};
+			var paramNames = Object.keys(data);
+			var buf = [];
+			for (var i=0; i < paramNames.length; i++) {
+				var param = paramNames[i], value = data[param];
+				buf.push(x_www_form_urlencode(param) + '=' + x_www_form_urlencode(value)); //$NON-NLS-0$
+			}
+			return buf.join('&'); //$NON-NLS-0$
+		}
+	};
+});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/operation.js b/bundles/org.eclipse.orion.client.core/web/orion/operation.js
index 1f693da..09ee5e2 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/operation.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/operation.js
@@ -35,6 +35,18 @@
 		});

 	}

 

+	function _cancelOperation(operationLocation){

+		xhr("PUT", operationLocation, {

+			headers: {

+				"Orion-Version": "1"

+			},

+			data: JSON.stringify({

+				abort: true

+			}),

+			timeout: 15000

+		});

+	}

+	

 	function _getOperation(operationLocation, deferred) {

 		xhr("GET", operationLocation, {

 			headers: {

@@ -50,7 +62,7 @@
 				}, 2000);

 				return;

 			}

-			if(operationJson.type=="error"){

+			if(operationJson.type=="error" || operationJson.type=="abort"){

 				deferred.reject(operationJson.Result);

 			} else {

 				deferred.resolve(operationJson.Result.JsonData);

@@ -74,8 +86,18 @@
 				deferred.reject({Severity: "Error", Message: error});

 		});

 	}

+	

+	function _trackCancel(operationLocation, deferred){

+		deferred.then(null, function(error){

+			if(error.canceled){

+				_cancelOperation(operationLocation);

+			}

+		});

+	}

+	

 	function handle(operationLocation){

 		var def = new Deferred();

+		_trackCancel(operationLocation, def);

 		_getOperation(operationLocation, def);

 		return def;

 	}

diff --git a/bundles/org.eclipse.orion.client.core/web/orion/operationsClient.js b/bundles/org.eclipse.orion.client.core/web/orion/operationsClient.js
index 4a6339c..40f41c1 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/operationsClient.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/operationsClient.js
@@ -13,22 +13,7 @@
 define(['i18n!orion/operations/nls/messages', "orion/Deferred"], function(messages, Deferred){
 	
 	function _doServiceCall(operationsService, funcName, funcArgs) {
-		var clientDeferred = new Deferred();
-		operationsService[funcName].apply(operationsService, funcArgs).then(
-			//on success, just forward the result to the client
-			function(result) {
-				clientDeferred.resolve(result);
-			},
-			//on failure we might need to retry
-			function(error) {
-				//forward other errors to client
-				clientDeferred.reject(error);
-			},
-			function(progress) {
-				clientDeferred.progress(progress);
-			}
-		);
-		return clientDeferred;
+		return operationsService[funcName].apply(operationsService, funcArgs);
 	}
 	
 	function _getOperations(operationsService, options){
@@ -95,32 +80,6 @@
 		return result;
 	}
 	
-	function _registerOperationChangeListener(service, listener, longpollingId){
-		var that = this;
-		var args = {Longpolling: true};
-		if(longpollingId){
-			args.LongpollingId = longpollingId;
-		}
-		_doServiceCall(service, "getOperations", [args]).then(function(result){ //$NON-NLS-0$
-			if(longpollingId && that._currentLongpollingIds.indexOf(longpollingId)<0){
-				return;
-			}
-			listener(result, longpollingId);
-			if(result.LongpollingId){
-				that._currentLongpollingIds.push(result.LongpollingId);
-				_registerOperationChangeListener.bind(that)(service, listener, result.LongpollingId);
-			} else {
-				_registerOperationChangeListener.bind(that)(service, listener, longpollingId);
-			}
-			
-		}, function(error){
-			if(longpollingId && that._currentLongpollingIds.indexOf(longpollingId)<0){
-				return;
-			}
-			setTimeout(function(){_registerOperationChangeListener.bind(that)(service, listener, longpollingId);}, 2000); //TODO display error and ask user to retry rather than retry every 2 sec
-		});
-	}
-	
 	function _notifyChangeListeners(result){
 		for(var i=0; i<this._operationListeners.length; i++){
 			this._operationListeners[i](result);
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/urlencode.js b/bundles/org.eclipse.orion.client.core/web/orion/urlencode.js
deleted file mode 100644
index 59aa65b..0000000
--- a/bundles/org.eclipse.orion.client.core/web/orion/urlencode.js
+++ /dev/null
@@ -1,74 +0,0 @@
-/*******************************************************************************
- * @license
- * Copyright (c) 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- *
- * Contributors:
- *     IBM Corporation - initial API and implementation
- *******************************************************************************/
-/*global define escape*/
-define([], function() {
-	function urlencode(value) {
-		return encodeURIComponent(value).replace(/[!'()*]/g, function(str) {
-			return '%' + str.charCodeAt(0).toString(16).toUpperCase(); //$NON-NLS-0$
-		});
-	}
-
-	function x_www_form_urlencode(value) {
-		return encodeURIComponent(value).replace(/[!'()*]/g, escape).replace('%20', '+'); //$NON-NLS-0$ //$NON-NLS-1$
-	}
-
-	function encodeObject(object, func) {
-		object = object || {};
-		var paramNames = Object.keys(object);
-		var buf = [];
-		for (var i=0; i < paramNames.length; i++) {
-			var param = paramNames[i], value = object[param];
-			buf.push(func(param) + '=' + func(value)); //$NON-NLS-0$
-		}
-		return buf.join('&'); //$NON-NLS-0$
-	}
-
-	/**
-	 * @name orion.urlencode
-	 * @class Utilities for dealing with URL and form encoding.
-	 */
-	return /** @lends orion.urlencode */ {
-		/**
-		 * Encodes an object of key-value pairs as a string suitable for the query component of a URI.
-		 * @static
-		 * @param {Object} data The parameters to encode.
-		 * @returns {String} The URL-encoded string.
-		 */
-		encodeQuery: function(params) {
-			return encodeObject(params, urlencode);
-		},
-		/**
-		 * Encodes an object of form fields and values as an <code>application/x-www-form-urlencoded</code> string.
-		 * @static
-		 * @param {Object} data The form data to encode.
-		 * @returns {String} The <code>x-www-form-urlencoded</code> string.
-		 */
-		encodeFormData: function(data) {
-			return encodeObject(data, x_www_form_urlencode);
-		},
-		/**
-		 * Returns a URL with the given queryString in its query component.
-		 * @param {String} url The URL.
-		 * @param {String} queryString The query string to incorporate into <code>url</code>.
-		 * @returns {String} The URL with <code>queryString</code> appended to its query component.
-		 * @static
-		 */
-		appendQuery: function(url, queryString) {
-			if (typeof queryString === 'string' && queryString) { //$NON-NLS-0$
-				var urlComponents = url.split('#'); //$NON-NLS-0$
-				urlComponents[0] += (urlComponents[0].indexOf('?') === -1 ? '?' : '&') + queryString; //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-				url = urlComponents.join('#'); //$NON-NLS-0$
-			}
-			return url;
-		}
-	};
-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/xhr.js b/bundles/org.eclipse.orion.client.core/web/orion/xhr.js
index b2ed93a..bce8c49 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/xhr.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/xhr.js
@@ -15,7 +15,7 @@
  * @name orion.xhr
  * @namespace Provides a promise-based API to {@link XMLHttpRequest}.
  */
-define(['orion/Deferred', 'orion/urlencode'], function(Deferred, urlencode) {
+define(['orion/Deferred'], function(Deferred) {
 
 	/**
 	 * @name orion.xhr.Result
@@ -65,7 +65,6 @@
 	 * @param {Object|ArrayBuffer|Blob|Document} [options.data] The raw data to send as the request body. (Only allowed for POST and PUT).
 	 * @param {Object} [options.headers] A map of header names and values to set on the request.
 	 * @param {Boolean} [options.log=false] If <code>true</code>, failed requests will be logged to the JavaScript console.
-	 * @param {Object} [options.query] A map giving the query parameters to add to the URL.
 	 * @param {String} [options.responseType=''] Determines the type of the response object returned. Value must be one of the following:
 	 * <ul><li><code>'arraybuffer'</code>
 	 * <li><code>'blob'</code>
@@ -88,10 +87,6 @@
 		if (typeof headers['X-Requested-With'] === 'undefined') { //$NON-NLS-1$ //$NON-NLS-0$
 			headers['X-Requested-With'] = 'XMLHttpRequest'; //$NON-NLS-1$ //$NON-NLS-0$
 		}
-		if (options.query && typeof options.query === 'object') { //$NON-NLS-0$
-			var queryString = urlencode.encodeQuery(options.query);
-			url = urlencode.appendQuery(url, queryString);
-		}
 		if (typeof options.data !== 'undefined' && (method === 'POST' || method === 'PUT')) { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 			data = options.data;
 		}
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.css b/bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.css
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.css
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.css
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.html b/bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.html
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.html
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.html
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.js b/bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.js
similarity index 95%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.js
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.js
index e3fb400..313edec 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demo.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/demo.js
@@ -13,7 +13,7 @@
  
 /*globals define window */
 
-define(['examples/textview/demoSetup', 'tests/textview/test-performance', 'orion/textview/util'],   
+define(['examples/editor/demoSetup', 'tests/editor/test-performance', 'orion/editor/util'],   
  
 function(mSetup, mTestPerformance, util) {
 	
@@ -125,11 +125,11 @@
 	}
 	
 	function createJavaScriptSample() {
-		return setupView(mSetup.getFile("/orion/textview/textView.js"), "js"); //$NON-NLS-1$ //$NON-NLS-0$
+		return setupView(mSetup.getFile("/orion/editor/textView.js"), "js"); //$NON-NLS-1$ //$NON-NLS-0$
 	}
 
 	function createHtmlSample() {
-		return setupView(mSetup.getFile("/examples/textview/demo.html"), "html"); //$NON-NLS-1$ //$NON-NLS-0$
+		return setupView(mSetup.getFile("/examples/editor/demo.html"), "html"); //$NON-NLS-1$ //$NON-NLS-0$
 	}
 	
 	function createPlainTextSample() {
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js b/bundles/org.eclipse.orion.client.editor/web/examples/editor/demoSetup.js
similarity index 94%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/demoSetup.js
index 274fde5..037abce 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/demoSetup.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/demoSetup.js
@@ -1,251 +1,251 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2011, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

- 

-/*globals define XMLHttpRequest log */

- 

-define(["require", 

-		"orion/textview/keyBinding",

-		"orion/textview/textModel",

-		"orion/textview/annotations", 

-		"orion/textview/projectionTextModel", 

-		"orion/textview/textView", 

-		"orion/textview/textDND", 

-		"orion/textview/rulers",

-		"orion/textview/undoStack",

-		"orion/textview/eventTarget",

-		"orion/editor/textMateStyler",

-		"orion/editor/htmlGrammar",

-		"examples/textview/textStyler",

-		"orion/textview/util"

-], function(require, mKeyBinding, mTextModel, mAnnotations, mProjectionTextModel, mTextView, mTextDND, mRulers, mUndoStack, mEventTarget, mTextMateStyler, mHtmlGrammar, mTextStyler, util) {

-

-	var exports = {};

-	var view = null;

-	var styler = null;

-	var annotationStyler = null;

-	var loadedThemes = [];

-	

-	var AnnotationType = mAnnotations.AnnotationType;

-		

-	function getFile(file) {

-		try {

-			var objXml = new XMLHttpRequest();

-			objXml.open("GET",file,false); //$NON-NLS-0$

-			objXml.send(null);

-			return objXml.responseText;

-		} catch (e) {

-			return null;

-		}

-	}

-	exports.getFile = getFile;

-	

-	function loadTheme(theme) {

-		if (theme) {

-			for (var i=0; i<loadedThemes.length; i++) {

-				if (theme === loadedThemes[i]) {

-					return;

-				}

-			}

-			loadedThemes.push(theme);

-			require(["text!examples/textview/themes/" + theme + ".css"], function(cssText) { //$NON-NLS-1$ //$NON-NLS-0$

-				var stylesheet;

-				var document = view.getOptions("parent").ownerDocument; //$NON-NLS-0$

-				if (document.createStyleSheet) {

-					stylesheet = document.createStyleSheet();

-					stylesheet.cssText = cssText;

-				} else {

-					stylesheet = util.createElement(document, "style"); //$NON-NLS-0$

-					var head = document.getElementsByTagName("head")[0] || document.documentElement; //$NON-NLS-0$

-					stylesheet.appendChild(document.createTextNode(cssText));

-					head.appendChild(stylesheet);

-				}

-				view.update(true);

-			});

-		}

-	}

-	

-	function checkView(options) {

-		if (view) {

-			if (options) {

-				loadTheme(options.themeClass);

-				view.setOptions(options);

-			}

-			return view;

-		}

-		

-		var baseModel =  new mTextModel.TextModel(), viewModel = baseModel;

-		var foldingEnabled = true;

-		if (foldingEnabled) {

-			viewModel = new mProjectionTextModel.ProjectionTextModel(baseModel);

-		}

-		options = options || {};

-		loadTheme(options.themeClass);

-		options.parent = options.parent || "divParent"; //$NON-NLS-0$

-		options.model = viewModel;

-		exports.view = view = new mTextView.TextView(options);

-		

-		/* Undo stack */

-		var undoStack = exports.undoStack = new mUndoStack.UndoStack(view, 200);

-		exports.textDND = new mTextDND.TextDND(view, undoStack);

-		view.setAction("undo", function() { //$NON-NLS-0$

-			undoStack.undo();

-			return true;

-		});

-		view.setAction("redo", function() { //$NON-NLS-0$

-			undoStack.redo();

-			return true;

-		});

-

-		view.setKeyBinding(new mKeyBinding.KeyBinding('s', true), "save"); //$NON-NLS-1$ //$NON-NLS-0$

-		view.setAction("save", function() { //$NON-NLS-0$

-			log("*****************SAVE"); //$NON-NLS-0$

-			return true;

-		});

-		

-		view.setKeyBinding(new mKeyBinding.KeyBinding('w', true, false, true), "toggleWrapMode"); //$NON-NLS-1$ //$NON-NLS-0$

-

-		var annotationModel = view.annotationModel = new mAnnotations.AnnotationModel(baseModel);

-		/* Example: Adding a keyBinding and action*/

-		view.setKeyBinding(new mKeyBinding.KeyBinding('h', true), "collapseAll"); //$NON-NLS-1$ //$NON-NLS-0$

-		view.setAction("collapseAll", function() { //$NON-NLS-0$

-			log("*****************COLLAPSE"); //$NON-NLS-0$

-			var iter = annotationModel.getAnnotations(0, baseModel.getCharCount());

-			view.setRedraw(false);

-			while (iter.hasNext()) {

-				var a = iter.next();

-				if (a.type === AnnotationType.ANNOTATION_FOLDING) {

-					a.collapse();

-					annotationModel.modifyAnnotation(a);

-				}

-			}

-			view.setRedraw(true);

-			return true;

-		});

-		/* Example: Adding a keyBinding and action*/

-		view.setKeyBinding(new mKeyBinding.KeyBinding('j', true), "expandAll"); //$NON-NLS-1$ //$NON-NLS-0$

-		view.setAction("expandAll", function() { //$NON-NLS-0$

-			log("*****************EXPAND"); //$NON-NLS-0$

-			var iter = annotationModel.getAnnotations(0, baseModel.getCharCount());

-			view.setRedraw(false);

-			while (iter.hasNext()) {

-				var a = iter.next();

-				if (a.type === AnnotationType.ANNOTATION_FOLDING) {

-					a.expand();

-					annotationModel.modifyAnnotation(a);

-				}

-			}

-			view.setRedraw(true);

-			return true;

-		});

-		

-

-		/* Adding the Rulers */

-		var annotationRuler = view.annotationRuler = new mRulers.AnnotationRuler(annotationModel, "left", {styleClass: "ruler annotations"}); //$NON-NLS-1$ //$NON-NLS-0$

-		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_BREAKPOINT);

-		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_BOOKMARK);

-		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_ERROR);

-		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_WARNING);

-		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_TASK);

-		annotationRuler.setMultiAnnotation({html: "<div class='annotationHTML multiple'></div>"}); //$NON-NLS-0$

-		annotationRuler.setMultiAnnotationOverlay({html: "<div class='annotationHTML overlay'></div>"}); //$NON-NLS-0$

-		annotationRuler.onDblClick =  function(lineIndex, e) {

-			if (lineIndex === undefined) { return; }

-			var model = this._view.getModel();

-			var start = model.getLineStart(lineIndex);

-			var end = model.getLineEnd(lineIndex, true);

-			if (model.getBaseModel) {

-				start = model.mapOffset(start);

-				end = model.mapOffset(end);

-			}

-			var type;

-			if (util.isMac ? e.metaKey : e.ctrlKey) {

-				if (e.shiftKey && e.altKey) {

-					type = AnnotationType.ANNOTATION_WARNING;

-				} else if (e.altKey) {

-					type = AnnotationType.ANNOTATION_ERROR;

-				} else if (e.shiftKey) {

-					type = AnnotationType.ANNOTATION_BOOKMARK;

-				} else {

-					type = AnnotationType.ANNOTATION_TASK;

-				}

-			} else {

-				type = AnnotationType.ANNOTATION_BREAKPOINT;

-			}

-			var annotations = annotationModel.getAnnotations(start, end);

-			var annotation, temp;

-			while ((temp = annotations.next()) !== null) {

-				if (temp.type === type) {

-					annotation = temp;

-					break;

-				}

-			}

-			if (annotation) {

-				annotationModel.removeAnnotation(annotation);

-			} else {

-				annotation = AnnotationType.createAnnotation(type, start, end);

-				annotation.title += ": " + model.getLine(lineIndex); //$NON-NLS-0$

-				annotationModel.addAnnotation(annotation);

-			}

-		};

-		var linesRuler = view.lines = new mRulers.LineNumberRuler(annotationModel, "left", {styleClass: "ruler lines"}, {styleClass: "rulerLines odd"}, {styleClass: "rulerLines even"}); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-		linesRuler.onDblClick = annotationRuler.onDblClick;

-		var overviewRuler = new mRulers.OverviewRuler(annotationModel, "right", {styleClass: "ruler overview"}); //$NON-NLS-1$ //$NON-NLS-0$

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_BREAKPOINT);

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_BOOKMARK);

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_ERROR);

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_WARNING);

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_TASK);

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_MATCHING_BRACKET);

-		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_CURRENT_BRACKET);

-		

-		view.addRuler(annotationRuler);

-		view.addRuler(linesRuler);

-		if (foldingEnabled) {

-			var foldingRuler = view.folding = new mRulers.FoldingRuler(annotationModel, "left", {styleClass: "ruler folding"}); //$NON-NLS-1$ //$NON-NLS-0$

-			foldingRuler.addAnnotationType(AnnotationType.ANNOTATION_FOLDING);

-			view.addRuler(foldingRuler);

-		}

-		view.addRuler(overviewRuler);

-		return view;

-	}

-	exports.checkView = checkView;

-	

-	function setupView(text, lang, options) {

-		checkView(options);

-		if (styler) {

-			styler.destroy();

-			styler = null;

-			annotationStyler.destroy();

-			annotationStyler = null;

-		}

-		switch (lang) {

-			case "js": //$NON-NLS-0$

-			case "java": //$NON-NLS-0$

-			case "css": //$NON-NLS-0$

-				styler = new mTextStyler.TextStyler(view, lang, view.annotationModel);

-				styler.setHighlightCaretLine(true);

-				break;

-			case "html": //$NON-NLS-0$

-				styler = new mTextMateStyler.TextMateStyler(view, new mHtmlGrammar.HtmlGrammar());

-				break;

-		}

-		annotationStyler = new mAnnotations.AnnotationStyler(view, view.annotationModel);

-		annotationStyler.addAnnotationType(AnnotationType.ANNOTATION_TASK);

-		annotationStyler.addAnnotationType(AnnotationType.ANNOTATION_MATCHING_BRACKET);

-		annotationStyler.addAnnotationType(AnnotationType.ANNOTATION_CURRENT_BRACKET);

-		view.setText(text);

-		return view;

-	}

-	exports.setupView = setupView;

-

-	return exports;

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2011, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+ 
+/*globals define XMLHttpRequest log */
+ 
+define(["require", 
+		"orion/editor/keyBinding",
+		"orion/editor/textModel",
+		"orion/editor/annotations", 
+		"orion/editor/projectionTextModel", 
+		"orion/editor/textView", 
+		"orion/editor/textDND", 
+		"orion/editor/rulers",
+		"orion/editor/undoStack",
+		"orion/editor/eventTarget",
+		"orion/editor/textMateStyler",
+		"orion/editor/htmlGrammar",
+		"examples/editor/textStyler",
+		"orion/editor/util"
+], function(require, mKeyBinding, mTextModel, mAnnotations, mProjectionTextModel, mTextView, mTextDND, mRulers, mUndoStack, mEventTarget, mTextMateStyler, mHtmlGrammar, mTextStyler, util) {
+
+	var exports = {};
+	var view = null;
+	var styler = null;
+	var annotationStyler = null;
+	var loadedThemes = [];
+	
+	var AnnotationType = mAnnotations.AnnotationType;
+		
+	function getFile(file) {
+		try {
+			var objXml = new XMLHttpRequest();
+			objXml.open("GET",file,false); //$NON-NLS-0$
+			objXml.send(null);
+			return objXml.responseText;
+		} catch (e) {
+			return null;
+		}
+	}
+	exports.getFile = getFile;
+	
+	function loadTheme(theme) {
+		if (theme) {
+			for (var i=0; i<loadedThemes.length; i++) {
+				if (theme === loadedThemes[i]) {
+					return;
+				}
+			}
+			loadedThemes.push(theme);
+			require(["text!examples/editor/themes/" + theme + ".css"], function(cssText) { //$NON-NLS-1$ //$NON-NLS-0$
+				var stylesheet;
+				var document = view.getOptions("parent").ownerDocument; //$NON-NLS-0$
+				if (document.createStyleSheet) {
+					stylesheet = document.createStyleSheet();
+					stylesheet.cssText = cssText;
+				} else {
+					stylesheet = util.createElement(document, "style"); //$NON-NLS-0$
+					var head = document.getElementsByTagName("head")[0] || document.documentElement; //$NON-NLS-0$
+					stylesheet.appendChild(document.createTextNode(cssText));
+					head.appendChild(stylesheet);
+				}
+				view.update(true);
+			});
+		}
+	}
+	
+	function checkView(options) {
+		if (view) {
+			if (options) {
+				loadTheme(options.themeClass);
+				view.setOptions(options);
+			}
+			return view;
+		}
+		
+		var baseModel =  new mTextModel.TextModel(), viewModel = baseModel;
+		var foldingEnabled = true;
+		if (foldingEnabled) {
+			viewModel = new mProjectionTextModel.ProjectionTextModel(baseModel);
+		}
+		options = options || {};
+		loadTheme(options.themeClass);
+		options.parent = options.parent || "divParent"; //$NON-NLS-0$
+		options.model = viewModel;
+		exports.view = view = new mTextView.TextView(options);
+		
+		/* Undo stack */
+		var undoStack = exports.undoStack = new mUndoStack.UndoStack(view, 200);
+		exports.textDND = new mTextDND.TextDND(view, undoStack);
+		view.setAction("undo", function() { //$NON-NLS-0$
+			undoStack.undo();
+			return true;
+		});
+		view.setAction("redo", function() { //$NON-NLS-0$
+			undoStack.redo();
+			return true;
+		});
+
+		view.setKeyBinding(new mKeyBinding.KeyBinding('s', true), "save"); //$NON-NLS-1$ //$NON-NLS-0$
+		view.setAction("save", function() { //$NON-NLS-0$
+			log("*****************SAVE"); //$NON-NLS-0$
+			return true;
+		});
+		
+		view.setKeyBinding(new mKeyBinding.KeyBinding('w', true, false, true), "toggleWrapMode"); //$NON-NLS-1$ //$NON-NLS-0$
+
+		var annotationModel = view.annotationModel = new mAnnotations.AnnotationModel(baseModel);
+		/* Example: Adding a keyBinding and action*/
+		view.setKeyBinding(new mKeyBinding.KeyBinding('h', true), "collapseAll"); //$NON-NLS-1$ //$NON-NLS-0$
+		view.setAction("collapseAll", function() { //$NON-NLS-0$
+			log("*****************COLLAPSE"); //$NON-NLS-0$
+			var iter = annotationModel.getAnnotations(0, baseModel.getCharCount());
+			view.setRedraw(false);
+			while (iter.hasNext()) {
+				var a = iter.next();
+				if (a.type === AnnotationType.ANNOTATION_FOLDING) {
+					a.collapse();
+					annotationModel.modifyAnnotation(a);
+				}
+			}
+			view.setRedraw(true);
+			return true;
+		});
+		/* Example: Adding a keyBinding and action*/
+		view.setKeyBinding(new mKeyBinding.KeyBinding('j', true), "expandAll"); //$NON-NLS-1$ //$NON-NLS-0$
+		view.setAction("expandAll", function() { //$NON-NLS-0$
+			log("*****************EXPAND"); //$NON-NLS-0$
+			var iter = annotationModel.getAnnotations(0, baseModel.getCharCount());
+			view.setRedraw(false);
+			while (iter.hasNext()) {
+				var a = iter.next();
+				if (a.type === AnnotationType.ANNOTATION_FOLDING) {
+					a.expand();
+					annotationModel.modifyAnnotation(a);
+				}
+			}
+			view.setRedraw(true);
+			return true;
+		});
+		
+
+		/* Adding the Rulers */
+		var annotationRuler = view.annotationRuler = new mRulers.AnnotationRuler(annotationModel, "left", {styleClass: "ruler annotations"}); //$NON-NLS-1$ //$NON-NLS-0$
+		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_BREAKPOINT);
+		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_BOOKMARK);
+		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_ERROR);
+		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_WARNING);
+		annotationRuler.addAnnotationType(AnnotationType.ANNOTATION_TASK);
+		annotationRuler.setMultiAnnotation({html: "<div class='annotationHTML multiple'></div>"}); //$NON-NLS-0$
+		annotationRuler.setMultiAnnotationOverlay({html: "<div class='annotationHTML overlay'></div>"}); //$NON-NLS-0$
+		annotationRuler.onDblClick =  function(lineIndex, e) {
+			if (lineIndex === undefined) { return; }
+			var model = this._view.getModel();
+			var start = model.getLineStart(lineIndex);
+			var end = model.getLineEnd(lineIndex, true);
+			if (model.getBaseModel) {
+				start = model.mapOffset(start);
+				end = model.mapOffset(end);
+			}
+			var type;
+			if (util.isMac ? e.metaKey : e.ctrlKey) {
+				if (e.shiftKey && e.altKey) {
+					type = AnnotationType.ANNOTATION_WARNING;
+				} else if (e.altKey) {
+					type = AnnotationType.ANNOTATION_ERROR;
+				} else if (e.shiftKey) {
+					type = AnnotationType.ANNOTATION_BOOKMARK;
+				} else {
+					type = AnnotationType.ANNOTATION_TASK;
+				}
+			} else {
+				type = AnnotationType.ANNOTATION_BREAKPOINT;
+			}
+			var annotations = annotationModel.getAnnotations(start, end);
+			var annotation, temp;
+			while ((temp = annotations.next()) !== null) {
+				if (temp.type === type) {
+					annotation = temp;
+					break;
+				}
+			}
+			if (annotation) {
+				annotationModel.removeAnnotation(annotation);
+			} else {
+				annotation = AnnotationType.createAnnotation(type, start, end);
+				annotation.title += ": " + model.getLine(lineIndex); //$NON-NLS-0$
+				annotationModel.addAnnotation(annotation);
+			}
+		};
+		var linesRuler = view.lines = new mRulers.LineNumberRuler(annotationModel, "left", {styleClass: "ruler lines"}, {styleClass: "rulerLines odd"}, {styleClass: "rulerLines even"}); //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+		linesRuler.onDblClick = annotationRuler.onDblClick;
+		var overviewRuler = new mRulers.OverviewRuler(annotationModel, "right", {styleClass: "ruler overview"}); //$NON-NLS-1$ //$NON-NLS-0$
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_BREAKPOINT);
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_BOOKMARK);
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_ERROR);
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_WARNING);
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_TASK);
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_MATCHING_BRACKET);
+		overviewRuler.addAnnotationType(AnnotationType.ANNOTATION_CURRENT_BRACKET);
+		
+		view.addRuler(annotationRuler);
+		view.addRuler(linesRuler);
+		if (foldingEnabled) {
+			var foldingRuler = view.folding = new mRulers.FoldingRuler(annotationModel, "left", {styleClass: "ruler folding"}); //$NON-NLS-1$ //$NON-NLS-0$
+			foldingRuler.addAnnotationType(AnnotationType.ANNOTATION_FOLDING);
+			view.addRuler(foldingRuler);
+		}
+		view.addRuler(overviewRuler);
+		return view;
+	}
+	exports.checkView = checkView;
+	
+	function setupView(text, lang, options) {
+		checkView(options);
+		if (styler) {
+			styler.destroy();
+			styler = null;
+			annotationStyler.destroy();
+			annotationStyler = null;
+		}
+		switch (lang) {
+			case "js": //$NON-NLS-0$
+			case "java": //$NON-NLS-0$
+			case "css": //$NON-NLS-0$
+				styler = new mTextStyler.TextStyler(view, lang, view.annotationModel);
+				styler.setHighlightCaretLine(true);
+				break;
+			case "html": //$NON-NLS-0$
+				styler = new mTextMateStyler.TextMateStyler(view, new mHtmlGrammar.HtmlGrammar());
+				break;
+		}
+		annotationStyler = new mAnnotations.AnnotationStyler(view, view.annotationModel);
+		annotationStyler.addAnnotationType(AnnotationType.ANNOTATION_TASK);
+		annotationStyler.addAnnotationType(AnnotationType.ANNOTATION_MATCHING_BRACKET);
+		annotationStyler.addAnnotationType(AnnotationType.ANNOTATION_CURRENT_BRACKET);
+		view.setText(text);
+		return view;
+	}
+	exports.setupView = setupView;
+
+	return exports;
 });
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/editor/embeddededitor.js b/bundles/org.eclipse.orion.client.editor/web/examples/editor/embeddededitor.js
index 264cecc..efad038 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/editor/embeddededitor.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/embeddededitor.js
@@ -16,9 +16,9 @@
 
 define([
 	"require", 
-	"orion/textview/textView",
-	"orion/textview/keyBinding",
-	"examples/textview/textStyler",
+	"orion/editor/textView",
+	"orion/editor/keyBinding",
+	"examples/editor/textStyler",
 	"orion/editor/textMateStyler",
 	"orion/editor/htmlGrammar",
 	"orion/editor/editor",
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/logo.png b/bundles/org.eclipse.orion.client.editor/web/examples/editor/logo.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/logo.png
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/logo.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/editor/minimaleditor.js b/bundles/org.eclipse.orion.client.editor/web/examples/editor/minimaleditor.js
index 8110f45..d42a04f 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/editor/minimaleditor.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/minimaleditor.js
@@ -13,7 +13,7 @@
 /*jslint browser:true devel:true*/
 
 
-define(["require", "orion/textview/textView", "orion/textview/keyBinding", "orion/editor/editor", "orion/editor/editorFeatures"],
+define(["require", "orion/editor/textView", "orion/editor/keyBinding", "orion/editor/editor", "orion/editor/editorFeatures"],
 
 function(require, mTextView, mKeyBinding, mEditor, mEditorFeatures){
 	
@@ -44,10 +44,11 @@
 				editor.setInput(null, null, null, true);
 				var text = editor.getTextView().getText();
 				var problems = [];
+				var line, character;
 				for (var i=0; i<text.length; i++) {
 					if (text.charAt(i) === 'z') {
-						var line = editor.getTextView().getModel().getLineAtOffset(i) + 1;
-						var character = i - editor.getTextView().getModel().getLineStart(line);
+						line = editor.getTextView().getModel().getLineAtOffset(i) + 1;
+						character = i - editor.getTextView().getModel().getLineStart(line);
 						problems.push({
 							start: character + 1,
 							end: character + 1,
@@ -57,6 +58,30 @@
 					}
 				}
 				editor.showProblems(problems);
+				
+				var occurrences = [];
+				var sel = editor.getTextView().getSelection();
+				var word = editor.getTextView().getText(sel.start, sel.end);
+				var index = text.indexOf(word);
+				if (index !== -1) {
+					for (i = index; i < text.length - word.length; i++) {
+						var w = '';
+						for (var j = 0; j < word.length; j++) {
+							w = w + text.charAt (i + j);
+						}
+						if (w === word) {
+							line = editor.getTextView().getModel().getLineAtOffset(i) + 1;
+							character = i - editor.getTextView().getModel().getLineStart(line);
+							occurrences.push({
+							readAccess: (line % 2) === 0 ? false : true,
+							line: line + 1,
+							start: character + 1,
+							end: character + word.length,
+							description: ((line % 2) === 0 ? "write occurrence of " : "occurrence of ") + w });
+						} 
+					}
+				} 
+				editor.showOccurrences(occurrences);
 				return true;
 		});
 	};
@@ -101,4 +126,4 @@
 			 return "There are unsaved changes.";
 		}
 	};
-});
+});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/text.txt b/bundles/org.eclipse.orion.client.editor/web/examples/editor/text.txt
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/text.txt
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/text.txt
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStyler.js b/bundles/org.eclipse.orion.client.editor/web/examples/editor/textStyler.js
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/textStyler.js
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/textStyler.js
index e198735..c2c86dd 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStyler.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/textStyler.js
@@ -12,7 +12,7 @@
 
 /*global define */
 
-define("examples/textview/textStyler", ['orion/textview/annotations'], function(mAnnotations) {
+define("examples/editor/textStyler", ['orion/editor/annotations'], function(mAnnotations) {
 
 	var JS_KEYWORDS =
 		["break",
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js b/bundles/org.eclipse.orion.client.editor/web/examples/editor/textStylerOptions.js
similarity index 96%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/textStylerOptions.js
index 1edb4ef..f06467c 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textStylerOptions.js
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/textStylerOptions.js
@@ -1,200 +1,200 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: 

- *		Anton McConville (IBM Corporation) - initial API and implementation

- *		Felipe Heidrich (IBM Corporation) - initial API and implementation 

- ******************************************************************************/

-

-/*global define*/

-

-define("examples/textview/textStylerOptions", ['orion/bootstrap', 'orion/textview/util'], function(mBootstrap, util) {

-

-	var CATEGORY = "JavaScript Editor";

-	var USER_THEME = "userTheme";

-	

-	var preferences;

-

-	/**

-	 * Constructs ...

-	 * 

-	 * Working with local storage for initial settings proof of concept

-	 */

-	function TextStylerOptions (styler) {

-	

-		this._styler = styler;

-		this._view = this._styler.view;

-		this._view.stylerOptions = this;

-		var self = this;

-		this._listener = {

-			onStorage: function(e) {

-				self._onStorage(e);

-			}

-		};

-		

-		var stylerOptions = this;

-		

-		if (this._view) {

-			mBootstrap.startup().then(function(core ) {

-				preferences = core.preferences;

-				stylerOptions.preferences = preferences;

-				stylerOptions._updateStylesheet(preferences);

-				stylerOptions.storageKey = preferences.listenForChangedSettings( stylerOptions._listener.onStorage );

-			});

-		}

-	}

-	

-	TextStylerOptions.prototype = /** @lends examples.textview.TextStylerOptions.prototype */ {

-		_getSetting: function(subcategories, subcategory, element){

-			var value;

-			for(var sub = 0; sub < subcategories.length; sub++){

-				if(subcategories[sub].label === subcategory){

-					for(var item = 0; item < subcategories[sub].data.length; item++){

-						if(subcategories[sub].data[item].label === element){

-							value = subcategories[sub].data[item].value;

-							break;

-						}

-					}

-				}

-			}

-			return value;

-		}, 

-		

-		_styleSheet: function( settings, theme ){

-		

-			var elements = [];

-		

-			for( var count = 0; count < settings.length; count++ ){

-				elements[settings[count].element] = settings[count].value;

-			}

-			

-			var result = [];

-			result.push("");

-			

-			//view container

-			var family = elements['fontFamily'];

-			if(family === "sans serif"){

-				family = '"Menlo", "Consolas", "Vera Mono", "monospace"';

-			}else{

-				family = 'monospace';

-			}	

-			

-			result.push("." + theme + " {");

-			result.push("\tfont-family: " + family + ";");

-			result.push("\tfont-size: " + elements['fontSize'] + ";");

-			

-			result.push("\tcolor: " + elements['text'] + ";");

-			result.push("}");

-			

-			result.push("." + theme + " .textview {");

-			result.push("\tbackground-color: " + elements['background'] + ";");

-			result.push("}");

-			

-			result.push("." + theme + ".ruler.annotations{");

-			result.push("\tbackground-color: " + 'red' + ";");

-			result.push("}");

-			

-			result.push("." + theme + " .ruler {");

-			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");

-			result.push("}");

-			

-			result.push("." + theme + " .rulerLines {");

-			result.push("\tcolor: " + elements['lineNumber'] + ";");

-			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");

-			result.push("}");

-			

-			result.push("." + theme + " .rulerLines.even {");

-			result.push("\tcolor: " + elements['lineNumber'] + ";");

-			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");

-			result.push("}");

-

-			result.push("." + theme + " .rulerLines.odd {");

-			result.push("\tcolor: " + elements['lineNumber'] + ";");

-			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");

-			result.push("}");

-			

-			result.push("." + theme + " .annotationLine.currentLine {");

-			result.push("\tbackground-color: " + elements['currentLine'] + ";");

-			result.push("}");

-			

-			var _this = this;

-			var styler = this._styler;

-			function defineRule(token, settingName) {

-				var className = styler.getClassNameForToken(token);

-				

-				if (className) {

-					var color = elements[settingName];

-					result.push("." + theme + " ." + className +  " {");

-					result.push("\tcolor: " + color + ";");

-					result.push("}");

-				}

-			}

-			if (styler.getClassNameForToken) {

-				defineRule("keyword", "keyword");

-				defineRule("string", "string");

-				defineRule("singleLineComment", "comment");

-				defineRule("multiLineComment", "comment");

-				defineRule("docComment", "comment");

-				defineRule("docHtmlComment", "comment");

-			}							

-			

-			return result.join("\n");

-		},

-		_onStorage: function (e) {

-			if( e.key === this.storageKey ){

-				this._updateStylesheet( this.preferences );

-			}

-		},

-		_update:function(storage, stylerOptions, sUtil ){

-				

-			if (storage){

-				if (stylerOptions._stylesheet) {

-					stylerOptions._stylesheet.parentNode.removeChild(stylerOptions._stylesheet);

-					stylerOptions._stylesheet = null;

-				}

-

-				var view = stylerOptions._view;

-				var parent = view.getOptions("parent");

-				var document = parent.ownerDocument;

-				var stylesheet = stylerOptions._stylesheet = util.createElement(document, "style");

-				stylesheet.appendChild(document.createTextNode(stylerOptions._styleSheet( storage, USER_THEME, sUtil)));

-				var head = document.getElementsByTagName("head")[0] || document.documentElement;

-				head.appendChild(stylesheet);

-				var options = {themeClass:null};

-				view.getOptions(options);

-				var theme = options.themeClass;

-				if (theme) {

-					theme = theme.replace(USER_THEME, "");

-					if (theme) { theme += " "; }

-					theme += USER_THEME;

-				} else {

-					theme = USER_THEME;

-				}

-				options.themeClass = theme;

-				view.setOptions(options);

-				view.update(true);

-			}

-		},

-		_updateStylesheet: function (preferences, sUtil) {

-

-			var storage;

-			var stylerOptions = this;

-			

-			preferences.getPreferences('/settings', 2).then( function(prefs){	

-			

-				var data = prefs.get(CATEGORY);

-				

-				if( data !== undefined ){

-					storage = JSON.parse( prefs.get(CATEGORY) );	

-					stylerOptions._update(storage, stylerOptions, sUtil );

-				}

-			} );

-		}

-	};

-	return {TextStylerOptions: TextStylerOptions};

-});

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: 
+ *		Anton McConville (IBM Corporation) - initial API and implementation
+ *		Felipe Heidrich (IBM Corporation) - initial API and implementation 
+ ******************************************************************************/
+
+/*global define*/
+
+define("examples/editor/textStylerOptions", ['orion/bootstrap', 'orion/editor/util'], function(mBootstrap, util) {
+
+	var CATEGORY = "JavaScript Editor";
+	var USER_THEME = "userTheme";
+	
+	var preferences;
+
+	/**
+	 * Constructs ...
+	 * 
+	 * Working with local storage for initial settings proof of concept
+	 */
+	function TextStylerOptions (styler) {
+	
+		this._styler = styler;
+		this._view = this._styler.view;
+		this._view.stylerOptions = this;
+		var self = this;
+		this._listener = {
+			onStorage: function(e) {
+				self._onStorage(e);
+			}
+		};
+		
+		var stylerOptions = this;
+		
+		if (this._view) {
+			mBootstrap.startup().then(function(core ) {
+				preferences = core.preferences;
+				stylerOptions.preferences = preferences;
+				stylerOptions._updateStylesheet(preferences);
+				stylerOptions.storageKey = preferences.listenForChangedSettings( stylerOptions._listener.onStorage );
+			});
+		}
+	}
+	
+	TextStylerOptions.prototype = /** @lends examples.editor.TextStylerOptions.prototype */ {
+		_getSetting: function(subcategories, subcategory, element){
+			var value;
+			for(var sub = 0; sub < subcategories.length; sub++){
+				if(subcategories[sub].label === subcategory){
+					for(var item = 0; item < subcategories[sub].data.length; item++){
+						if(subcategories[sub].data[item].label === element){
+							value = subcategories[sub].data[item].value;
+							break;
+						}
+					}
+				}
+			}
+			return value;
+		}, 
+		
+		_styleSheet: function( settings, theme ){
+		
+			var elements = [];
+		
+			for( var count = 0; count < settings.length; count++ ){
+				elements[settings[count].element] = settings[count].value;
+			}
+			
+			var result = [];
+			result.push("");
+			
+			//view container
+			var family = elements['fontFamily'];
+			if(family === "sans serif"){
+				family = '"Menlo", "Consolas", "Vera Mono", "monospace"';
+			}else{
+				family = 'monospace';
+			}	
+			
+			result.push("." + theme + " {");
+			result.push("\tfont-family: " + family + ";");
+			result.push("\tfont-size: " + elements['fontSize'] + ";");
+			
+			result.push("\tcolor: " + elements['text'] + ";");
+			result.push("}");
+			
+			result.push("." + theme + " .textview {");
+			result.push("\tbackground-color: " + elements['background'] + ";");
+			result.push("}");
+			
+			result.push("." + theme + ".ruler.annotations{");
+			result.push("\tbackground-color: " + 'red' + ";");
+			result.push("}");
+			
+			result.push("." + theme + " .ruler {");
+			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");
+			result.push("}");
+			
+			result.push("." + theme + " .rulerLines {");
+			result.push("\tcolor: " + elements['lineNumber'] + ";");
+			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");
+			result.push("}");
+			
+			result.push("." + theme + " .rulerLines.even {");
+			result.push("\tcolor: " + elements['lineNumber'] + ";");
+			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");
+			result.push("}");
+
+			result.push("." + theme + " .rulerLines.odd {");
+			result.push("\tcolor: " + elements['lineNumber'] + ";");
+			result.push("\tbackground-color: " + elements['annotationRuler'] + ";");
+			result.push("}");
+			
+			result.push("." + theme + " .annotationLine.currentLine {");
+			result.push("\tbackground-color: " + elements['currentLine'] + ";");
+			result.push("}");
+			
+			var _this = this;
+			var styler = this._styler;
+			function defineRule(token, settingName) {
+				var className = styler.getClassNameForToken(token);
+				
+				if (className) {
+					var color = elements[settingName];
+					result.push("." + theme + " ." + className +  " {");
+					result.push("\tcolor: " + color + ";");
+					result.push("}");
+				}
+			}
+			if (styler.getClassNameForToken) {
+				defineRule("keyword", "keyword");
+				defineRule("string", "string");
+				defineRule("singleLineComment", "comment");
+				defineRule("multiLineComment", "comment");
+				defineRule("docComment", "comment");
+				defineRule("docHtmlComment", "comment");
+			}							
+			
+			return result.join("\n");
+		},
+		_onStorage: function (e) {
+			if( e.key === this.storageKey ){
+				this._updateStylesheet( this.preferences );
+			}
+		},
+		_update:function(storage, stylerOptions, sUtil ){
+				
+			if (storage){
+				if (stylerOptions._stylesheet) {
+					stylerOptions._stylesheet.parentNode.removeChild(stylerOptions._stylesheet);
+					stylerOptions._stylesheet = null;
+				}
+
+				var view = stylerOptions._view;
+				var parent = view.getOptions("parent");
+				var document = parent.ownerDocument;
+				var stylesheet = stylerOptions._stylesheet = util.createElement(document, "style");
+				stylesheet.appendChild(document.createTextNode(stylerOptions._styleSheet( storage, USER_THEME, sUtil)));
+				var head = document.getElementsByTagName("head")[0] || document.documentElement;
+				head.appendChild(stylesheet);
+				var options = {themeClass:null};
+				view.getOptions(options);
+				var theme = options.themeClass;
+				if (theme) {
+					theme = theme.replace(USER_THEME, "");
+					if (theme) { theme += " "; }
+					theme += USER_THEME;
+				} else {
+					theme = USER_THEME;
+				}
+				options.themeClass = theme;
+				view.setOptions(options);
+				view.update(true);
+			}
+		},
+		_updateStylesheet: function (preferences, sUtil) {
+
+			var storage;
+			var stylerOptions = this;
+			
+			preferences.getPreferences('/settings', 2).then( function(prefs){	
+			
+				var data = prefs.get(CATEGORY);
+				
+				if( data !== undefined ){
+					storage = JSON.parse( prefs.get(CATEGORY) );	
+					stylerOptions._update(storage, stylerOptions, sUtil );
+				}
+			} );
+		}
+	};
+	return {TextStylerOptions: TextStylerOptions};
+});
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/textstyler.css b/bundles/org.eclipse.orion.client.editor/web/examples/editor/textstyler.css
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/textstyler.css
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/textstyler.css
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/dark.css b/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/dark.css
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/dark.css
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/dark.css
index 8e6da59..a4c7d99 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/dark.css
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/dark.css
@@ -1,29 +1,29 @@
-.dark {

-	color: gray;

-	font-size: 12pt;

-}

-

-.dark .textview {

-	background-color: #202020;

-}

-

-.dark .ruler {

-	color: white;

-	background-color: #505050;

-}

-

-.dark .token_doc_comment {

-	color: magenta;

-}

-

-.dark .line_caret {

-	background-color: #fefefe;

-}

-

-.dark .annotationLine.currentLine {

-	background-color: #fefefe;

-}

-

-.dark .annotationRange.task {

-	color: magenta;

+.dark {
+	color: gray;
+	font-size: 12pt;
+}
+
+.dark .textview {
+	background-color: #202020;
+}
+
+.dark .ruler {
+	color: white;
+	background-color: #505050;
+}
+
+.dark .token_doc_comment {
+	color: magenta;
+}
+
+.dark .line_caret {
+	background-color: #fefefe;
+}
+
+.dark .annotationLine.currentLine {
+	background-color: #fefefe;
+}
+
+.dark .annotationRange.task {
+	color: magenta;
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/default.css b/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/default.css
new file mode 100644
index 0000000..2cdde98
--- /dev/null
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/default.css
@@ -0,0 +1,6 @@
+@import "../../../orion/editor/textview.css";
+@import "../../../orion/editor/rulers.css";
+@import "../../../orion/editor/annotations.css";
+@import "../../../orion/editor/tooltip.css";
+@import "../textstyler.css";
+@import "../../editor/htmlStyles.css";
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/orion.css b/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/orion.css
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/orion.css
rename to bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/orion.css
index b65c85e..d932bd0 100644
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/orion.css
+++ b/bundles/org.eclipse.orion.client.editor/web/examples/editor/themes/orion.css
@@ -1,19 +1,19 @@
-.orion {

-	color: black;

-}

-

-.orion .textview {

-	background-color: #ffd400;

-}

-

-.orion .ruler {

-	background-color: #ededed;

-}

-

-.orion .line_caret {

-	background-color: #fcffca;

-}

-

-.orion .annotationLine.currentLine {

-	background-color: #fcffca;

+.orion {
+	color: black;
+}
+
+.orion .textview {
+	background-color: #ffd400;
+}
+
+.orion .ruler {
+	background-color: #ededed;
+}
+
+.orion .line_caret {
+	background-color: #fcffca;
+}
+
+.orion .annotationLine.currentLine {
+	background-color: #fcffca;
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/default.css b/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/default.css
deleted file mode 100644
index 101c221..0000000
--- a/bundles/org.eclipse.orion.client.editor/web/examples/textview/themes/default.css
+++ /dev/null
@@ -1,6 +0,0 @@
-@import "../../../orion/textview/textview.css";

-@import "../../../orion/textview/rulers.css";

-@import "../../../orion/textview/annotations.css";

-@import "../../../orion/textview/tooltip.css";

-@import "../textstyler.css";

-@import "../../editor/htmlStyles.css";

diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/contentAssist/testcase.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/contentAssist/testcase.js
index 09574d9..9cadd82 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/contentAssist/testcase.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/contentAssist/testcase.js
@@ -9,7 +9,7 @@
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
 /*global define setTimeout*/
-define(['orion/Deferred', 'orion/assert', 'orion/textview/textModel', 'js-tests/editor/mockTextView', 'orion/editor/contentAssist'],
+define(['orion/Deferred', 'orion/assert', 'orion/editor/textModel', 'js-tests/editor/mockTextView', 'orion/editor/contentAssist'],
 		function(Deferred, assert, mTextModel, mMockTextView, mContentAssist) {
 	var ContentAssist = mContentAssist.ContentAssist,
 	    TextModel = mTextModel.TextModel,
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/mockTextView.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/mockTextView.js
index 619c627..7e9dd3c 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/mockTextView.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/mockTextView.js
@@ -12,7 +12,7 @@
 /*jslint browser:true */
 /*global define*/
 
-define(["orion/assert", "orion/textview/eventTarget", "orion/textview/textModel", "orion/textview/annotations", "orion/editor/mirror"],
+define(["orion/assert", "orion/editor/eventTarget", "orion/editor/textModel", "orion/editor/annotations", "orion/editor/mirror"],
 		function(assert, mEventTarget, mTextModel) {
 	var EventTarget = mEventTarget.EventTarget;
 
@@ -67,8 +67,8 @@
 	/**
 	 * @private
 	 * @name orion.test.editor.MockTextView
-	 * @class Mock {@link orion.textview.TextView} that does not depend on the DOM.
-	 * @description Fake version of {@link orion.textview.TextView} for testing stylers in headless (no DOM) scenarios.
+	 * @class Mock {@link orion.editor.TextView} that does not depend on the DOM.
+	 * @description Fake version of {@link orion.editor.TextView} for testing stylers in headless (no DOM) scenarios.
 	 * Dispatches these event types: Changing, Changed, LineStyle, Verify
 	 */
 	function MockTextView(options) {
@@ -108,8 +108,8 @@
 		 * @returns {Object} The output argument from onLineStyle for the given line, or <code>null</code>. When an object is 
 		 * returned, it will have one of the following properties:
 		 * <dl>
-		 * <dt><code>ranges</code></dt><dd>{@link orion.textview.StyleRange[]}</dd>
-		 * <dt><code>style</code></dt><dd>{@link orion.textview.Style}</dd>
+		 * <dt><code>ranges</code></dt><dd>{@link orion.editor.StyleRange[]}</dd>
+		 * <dt><code>style</code></dt><dd>{@link orion.editor.Style}</dd>
 		 * </dl>
 		 */
 		_getLineStyle: function(lineIndex) {
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-annotationModel.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-annotationModel.js
similarity index 98%
rename from bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-annotationModel.js
rename to bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-annotationModel.js
index 3d457ce..f8431d1 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-annotationModel.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-annotationModel.js
@@ -1,382 +1,382 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: IBM Corporation - initial API and implementation

- ******************************************************************************/

-

-/*global define */

-

-define(["orion/assert", 'orion/textview/textModel', 'orion/textview/annotations'], function(assert, mTextModel, mAnnotations) {

-

-	var tests = {};

-	

-	tests.testAnnotationModel1 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 0, end: 5};

-		var annotation2 = {start: 10, end: 15};

-		var annotation3 = {start: 20, end: 30};

-		var annotation4 = {start: 25, end: 35};

-		var annotation5 = {start: 40, end: 60};

-		var annotation6 = {start: 35, end: 45};

-		var annotation7 = {start: 35, end: 65};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		annotationModel.addAnnotation(annotation4);

-		annotationModel.addAnnotation(annotation5);

-		annotationModel.addAnnotation(annotation6);

-		annotationModel.addAnnotation(annotation7);

-		var iter;

-		

-		iter = annotationModel.getAnnotations(0, 30);

-		assert.equal(iter.hasNext(), true);

-		assert.equal(iter.next(), annotation1);

-		assert.equal(iter.hasNext(), true);

-		assert.equal(iter.next(), annotation2);

-		assert.equal(iter.hasNext(), true);

-		assert.equal(iter.next(), annotation3);

-		assert.equal(iter.hasNext(), true);

-		assert.equal(iter.next(), annotation4);

-		assert.equal(iter.hasNext(), false);

-	};

-	

-	tests.testAnnotationModel2 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 1, end: 70};

-		var annotation2 = {start: 30, end: 40};

-		var annotation3 = {start: 50, end: 60};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		var iter;

-		

-		iter = annotationModel.getAnnotations(65, 67);

-		assert.equal(iter.hasNext(), true, "a1");

-		assert.equal(iter.next(), annotation1, "a2");

-		assert.equal(iter.hasNext(), false, "a3");

-		

-		iter = annotationModel.getAnnotations(40, 41);

-		assert.equal(iter.hasNext(), true, "b1");

-		assert.equal(iter.next(), annotation1, "b2");

-		assert.equal(iter.hasNext(), false, "b3");

-		

-		iter = annotationModel.getAnnotations(70, 71);

-		assert.equal(iter.hasNext(), false, "c3");

-		

-		iter = annotationModel.getAnnotations(0, 1);

-		assert.equal(iter.hasNext(), false, "d3");

-		

-		iter = annotationModel.getAnnotations(28, 30);

-		assert.equal(iter.hasNext(), true, "e1");

-		assert.equal(iter.next(), annotation1, "e2");

-		assert.equal(iter.hasNext(), false, "e3");

-		

-		iter = annotationModel.getAnnotations(48, 50);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation1, "f2");

-		assert.equal(iter.hasNext(), false, "f3");

-		

-		iter = annotationModel.getAnnotations(30, 40);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation1, "f2");

-		assert.equal(iter.hasNext(), true, "f3");

-		assert.equal(iter.next(), annotation2, "f4");

-		assert.equal(iter.hasNext(), false, "f5");

-		

-		iter = annotationModel.getAnnotations(50, 60);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation1, "f2");

-		assert.equal(iter.hasNext(), true, "f3");

-		assert.equal(iter.next(), annotation3, "f4");

-		assert.equal(iter.hasNext(), false, "f5");

-		

-		iter = annotationModel.getAnnotations(0, 70);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation1, "f2");

-		assert.equal(iter.hasNext(), true, "f3");

-		assert.equal(iter.next(), annotation2, "f4");

-		assert.equal(iter.hasNext(), true, "f5");

-		assert.equal(iter.next(), annotation3, "f6");

-		assert.equal(iter.hasNext(), false, "f7");

-	};

-	

-	tests.testAnnotationModel2 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 1, end: 70};

-		var annotation2 = {start: 30, end: 40};

-		var annotation3 = {start: 50, end: 60};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		var iter;

-		

-		annotationModel.removeAnnotation(annotation1);

-		iter = annotationModel.getAnnotations(0, 80);

-		assert.equal(iter.hasNext(), true, "a1");

-		assert.equal(iter.next(), annotation2, "a2");

-		assert.equal(iter.hasNext(), true, "a3");

-		assert.equal(iter.next(), annotation3, "a3");

-		assert.equal(iter.hasNext(), false, "a4");

-	};

-	

-	tests.testAnnotationModel3 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 1, end: 70};

-		var annotation2 = {start: 30, end: 40};

-		var annotation3 = {start: 50, end: 60};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 1, "a1");

-			assert.equal(e.changed.length, 2, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation2, "a4");

-			assert.equal(e.changed[0], annotation1, "a5");

-			assert.equal(e.changed[1], annotation3, "a6");

-		});

-		textModel.setText("", 30, 40);

-	};

-	

-	tests.testAnnotationModel4 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 1, end: 70};

-		var annotation2 = {start: 30, end: 40};

-		var annotation3 = {start: 50, end: 60};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 1, "a1");

-			assert.equal(e.changed.length, 2, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation2, "a4");

-			assert.equal(e.changed[0], annotation1, "a5");

-			assert.equal(e.changed[1], annotation3, "a6");

-		});

-		textModel.setText("", 35, 40);

-	};

-	

-	tests.testAnnotationModel5 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 1, end: 70};

-		var annotation2 = {start: 30, end: 40};

-		var annotation3 = {start: 50, end: 60};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 1, "a1");

-			assert.equal(e.changed.length, 2, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation2, "a4");

-			assert.equal(e.changed[0], annotation1, "a5");

-			assert.equal(e.changed[1], annotation3, "a6");

-		});

-		textModel.setText("", 25, 35);

-	};

-	

-	tests.testAnnotationModel6 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation1 = {start: 1, end: 70};

-		var annotation2 = {start: 30, end: 40};

-		var annotation3 = {start: 50, end: 60};

-		annotationModel.addAnnotation(annotation1);

-		annotationModel.addAnnotation(annotation2);

-		annotationModel.addAnnotation(annotation3);

-		

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 2, "a1");

-			assert.equal(e.changed.length, 1, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation2, "a4");

-			assert.equal(e.removed[1], annotation3, "a6");

-			assert.equal(e.changed[0], annotation1, "a5");

-		});

-		textModel.setText("", 25, 55);

-	};

-	

-	//test annotation before range

-	tests.testAnnotationModel7 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 10, end: 20};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.fail("f0");

-		});

-		textModel.setText("", 25, 55);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation, "f2");

-		assert.equal(iter.hasNext(), false, "f3");

-		assert.equal(iter.next(), null, "f4");

-	};

-	

-	

-	//test range at annotation start 

-	tests.testAnnotationModel8 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 60, end: 70};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 0, "a1");

-			assert.equal(e.changed.length, 1, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.changed[0], annotation, "a4");

-			assert.equal(e.changed[0].start, 61, "a5");

-			assert.equal(e.changed[0].end, 71, "a6");

-		});

-		textModel.setText("a", 60, 60);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation, "f2");

-		assert.equal(iter.hasNext(), false, "f3");

-		assert.equal(iter.next(), null, "f4");

-	};

-	

-	//test annotation after range

-	tests.testAnnotationModel9 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 60, end: 70};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 0, "a1");

-			assert.equal(e.changed.length, 1, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.changed[0], annotation, "a4");

-			assert.equal(e.changed[0].start, 51, "a5");

-			assert.equal(e.changed[0].end, 61, "a6");

-		});

-		textModel.setText("a", 30, 40);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation, "f2");

-		assert.equal(iter.hasNext(), false, "f3");

-		assert.equal(iter.next(), null, "f4");

-	};

-	

-	//test range includes annotation

-	tests.testAnnotationModel10 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 30, end: 40};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 1, "a1");

-			assert.equal(e.changed.length, 0, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation, "a4");

-		});

-		textModel.setText("a", 10, 60);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), false, "f1");

-		assert.equal(iter.next(), null, "f2");

-	};

-	

-	//test annotation includes range 

-	tests.testAnnotationModel11 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 20, end: 60};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 0, "a1");

-			assert.equal(e.changed.length, 1, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.changed[0], annotation, "a4");

-			assert.equal(e.changed[0].start, 20, "a5");

-			assert.equal(e.changed[0].end, 64, "a5");			

-		});

-		textModel.setText("abcd", 30, 30);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), true, "f1");

-		assert.equal(iter.next(), annotation, "f2");

-		assert.equal(iter.hasNext(), false, "f3");

-		assert.equal(iter.next(), null, "f4");

-	};

-	

-	//test annotation intersects range start

-	tests.testAnnotationModel12 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 20, end: 40};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 1, "a1");

-			assert.equal(e.changed.length, 0, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation, "a4");

-		});

-		textModel.setText("a", 30, 60);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), false, "f1");

-		assert.equal(iter.next(), null, "f2");

-	};

-	

-	//test annotation intersects range end

-	tests.testAnnotationModel13 = function () {

-//		                      1         2         3         4         5         6         7	

-		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";

-		var textModel = new mTextModel.TextModel(text, "\n");

-		var annotationModel = new mAnnotations.AnnotationModel(textModel);

-		var annotation = {start: 30, end: 60};

-		annotationModel.addAnnotation(annotation);

-		annotationModel.addEventListener("Changed", function(e) {

-			assert.equal(e.removed.length, 1, "a1");

-			assert.equal(e.changed.length, 0, "a2");

-			assert.equal(e.added.length, 0, "a3");

-			assert.equal(e.removed[0], annotation, "a4");

-		});

-		textModel.setText("a", 20, 40);

-		var iter = annotationModel.getAnnotations(0, text.length);

-		assert.equal(iter.hasNext(), false, "f1");

-		assert.equal(iter.next(), null, "f2");

-	};

-	

-	return tests;

-

-});

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+/*global define */
+
+define(["orion/assert", 'orion/editor/textModel', 'orion/editor/annotations'], function(assert, mTextModel, mAnnotations) {
+
+	var tests = {};
+	
+	tests.testAnnotationModel1 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 0, end: 5};
+		var annotation2 = {start: 10, end: 15};
+		var annotation3 = {start: 20, end: 30};
+		var annotation4 = {start: 25, end: 35};
+		var annotation5 = {start: 40, end: 60};
+		var annotation6 = {start: 35, end: 45};
+		var annotation7 = {start: 35, end: 65};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		annotationModel.addAnnotation(annotation4);
+		annotationModel.addAnnotation(annotation5);
+		annotationModel.addAnnotation(annotation6);
+		annotationModel.addAnnotation(annotation7);
+		var iter;
+		
+		iter = annotationModel.getAnnotations(0, 30);
+		assert.equal(iter.hasNext(), true);
+		assert.equal(iter.next(), annotation1);
+		assert.equal(iter.hasNext(), true);
+		assert.equal(iter.next(), annotation2);
+		assert.equal(iter.hasNext(), true);
+		assert.equal(iter.next(), annotation3);
+		assert.equal(iter.hasNext(), true);
+		assert.equal(iter.next(), annotation4);
+		assert.equal(iter.hasNext(), false);
+	};
+	
+	tests.testAnnotationModel2 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 1, end: 70};
+		var annotation2 = {start: 30, end: 40};
+		var annotation3 = {start: 50, end: 60};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		var iter;
+		
+		iter = annotationModel.getAnnotations(65, 67);
+		assert.equal(iter.hasNext(), true, "a1");
+		assert.equal(iter.next(), annotation1, "a2");
+		assert.equal(iter.hasNext(), false, "a3");
+		
+		iter = annotationModel.getAnnotations(40, 41);
+		assert.equal(iter.hasNext(), true, "b1");
+		assert.equal(iter.next(), annotation1, "b2");
+		assert.equal(iter.hasNext(), false, "b3");
+		
+		iter = annotationModel.getAnnotations(70, 71);
+		assert.equal(iter.hasNext(), false, "c3");
+		
+		iter = annotationModel.getAnnotations(0, 1);
+		assert.equal(iter.hasNext(), false, "d3");
+		
+		iter = annotationModel.getAnnotations(28, 30);
+		assert.equal(iter.hasNext(), true, "e1");
+		assert.equal(iter.next(), annotation1, "e2");
+		assert.equal(iter.hasNext(), false, "e3");
+		
+		iter = annotationModel.getAnnotations(48, 50);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation1, "f2");
+		assert.equal(iter.hasNext(), false, "f3");
+		
+		iter = annotationModel.getAnnotations(30, 40);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation1, "f2");
+		assert.equal(iter.hasNext(), true, "f3");
+		assert.equal(iter.next(), annotation2, "f4");
+		assert.equal(iter.hasNext(), false, "f5");
+		
+		iter = annotationModel.getAnnotations(50, 60);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation1, "f2");
+		assert.equal(iter.hasNext(), true, "f3");
+		assert.equal(iter.next(), annotation3, "f4");
+		assert.equal(iter.hasNext(), false, "f5");
+		
+		iter = annotationModel.getAnnotations(0, 70);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation1, "f2");
+		assert.equal(iter.hasNext(), true, "f3");
+		assert.equal(iter.next(), annotation2, "f4");
+		assert.equal(iter.hasNext(), true, "f5");
+		assert.equal(iter.next(), annotation3, "f6");
+		assert.equal(iter.hasNext(), false, "f7");
+	};
+	
+	tests.testAnnotationModel2 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 1, end: 70};
+		var annotation2 = {start: 30, end: 40};
+		var annotation3 = {start: 50, end: 60};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		var iter;
+		
+		annotationModel.removeAnnotation(annotation1);
+		iter = annotationModel.getAnnotations(0, 80);
+		assert.equal(iter.hasNext(), true, "a1");
+		assert.equal(iter.next(), annotation2, "a2");
+		assert.equal(iter.hasNext(), true, "a3");
+		assert.equal(iter.next(), annotation3, "a3");
+		assert.equal(iter.hasNext(), false, "a4");
+	};
+	
+	tests.testAnnotationModel3 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 1, end: 70};
+		var annotation2 = {start: 30, end: 40};
+		var annotation3 = {start: 50, end: 60};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 1, "a1");
+			assert.equal(e.changed.length, 2, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation2, "a4");
+			assert.equal(e.changed[0], annotation1, "a5");
+			assert.equal(e.changed[1], annotation3, "a6");
+		});
+		textModel.setText("", 30, 40);
+	};
+	
+	tests.testAnnotationModel4 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 1, end: 70};
+		var annotation2 = {start: 30, end: 40};
+		var annotation3 = {start: 50, end: 60};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 1, "a1");
+			assert.equal(e.changed.length, 2, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation2, "a4");
+			assert.equal(e.changed[0], annotation1, "a5");
+			assert.equal(e.changed[1], annotation3, "a6");
+		});
+		textModel.setText("", 35, 40);
+	};
+	
+	tests.testAnnotationModel5 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 1, end: 70};
+		var annotation2 = {start: 30, end: 40};
+		var annotation3 = {start: 50, end: 60};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 1, "a1");
+			assert.equal(e.changed.length, 2, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation2, "a4");
+			assert.equal(e.changed[0], annotation1, "a5");
+			assert.equal(e.changed[1], annotation3, "a6");
+		});
+		textModel.setText("", 25, 35);
+	};
+	
+	tests.testAnnotationModel6 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation1 = {start: 1, end: 70};
+		var annotation2 = {start: 30, end: 40};
+		var annotation3 = {start: 50, end: 60};
+		annotationModel.addAnnotation(annotation1);
+		annotationModel.addAnnotation(annotation2);
+		annotationModel.addAnnotation(annotation3);
+		
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 2, "a1");
+			assert.equal(e.changed.length, 1, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation2, "a4");
+			assert.equal(e.removed[1], annotation3, "a6");
+			assert.equal(e.changed[0], annotation1, "a5");
+		});
+		textModel.setText("", 25, 55);
+	};
+	
+	//test annotation before range
+	tests.testAnnotationModel7 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 10, end: 20};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.fail("f0");
+		});
+		textModel.setText("", 25, 55);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation, "f2");
+		assert.equal(iter.hasNext(), false, "f3");
+		assert.equal(iter.next(), null, "f4");
+	};
+	
+	
+	//test range at annotation start 
+	tests.testAnnotationModel8 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 60, end: 70};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 0, "a1");
+			assert.equal(e.changed.length, 1, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.changed[0], annotation, "a4");
+			assert.equal(e.changed[0].start, 61, "a5");
+			assert.equal(e.changed[0].end, 71, "a6");
+		});
+		textModel.setText("a", 60, 60);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation, "f2");
+		assert.equal(iter.hasNext(), false, "f3");
+		assert.equal(iter.next(), null, "f4");
+	};
+	
+	//test annotation after range
+	tests.testAnnotationModel9 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 60, end: 70};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 0, "a1");
+			assert.equal(e.changed.length, 1, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.changed[0], annotation, "a4");
+			assert.equal(e.changed[0].start, 51, "a5");
+			assert.equal(e.changed[0].end, 61, "a6");
+		});
+		textModel.setText("a", 30, 40);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation, "f2");
+		assert.equal(iter.hasNext(), false, "f3");
+		assert.equal(iter.next(), null, "f4");
+	};
+	
+	//test range includes annotation
+	tests.testAnnotationModel10 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 30, end: 40};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 1, "a1");
+			assert.equal(e.changed.length, 0, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation, "a4");
+		});
+		textModel.setText("a", 10, 60);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), false, "f1");
+		assert.equal(iter.next(), null, "f2");
+	};
+	
+	//test annotation includes range 
+	tests.testAnnotationModel11 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 20, end: 60};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 0, "a1");
+			assert.equal(e.changed.length, 1, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.changed[0], annotation, "a4");
+			assert.equal(e.changed[0].start, 20, "a5");
+			assert.equal(e.changed[0].end, 64, "a5");			
+		});
+		textModel.setText("abcd", 30, 30);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), true, "f1");
+		assert.equal(iter.next(), annotation, "f2");
+		assert.equal(iter.hasNext(), false, "f3");
+		assert.equal(iter.next(), null, "f4");
+	};
+	
+	//test annotation intersects range start
+	tests.testAnnotationModel12 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 20, end: 40};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 1, "a1");
+			assert.equal(e.changed.length, 0, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation, "a4");
+		});
+		textModel.setText("a", 30, 60);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), false, "f1");
+		assert.equal(iter.next(), null, "f2");
+	};
+	
+	//test annotation intersects range end
+	tests.testAnnotationModel13 = function () {
+//		                      1         2         3         4         5         6         7	
+		var text = "01234567890123456789012345678901234567890123456789012345678901234567890123456789";
+		var textModel = new mTextModel.TextModel(text, "\n");
+		var annotationModel = new mAnnotations.AnnotationModel(textModel);
+		var annotation = {start: 30, end: 60};
+		annotationModel.addAnnotation(annotation);
+		annotationModel.addEventListener("Changed", function(e) {
+			assert.equal(e.removed.length, 1, "a1");
+			assert.equal(e.changed.length, 0, "a2");
+			assert.equal(e.added.length, 0, "a3");
+			assert.equal(e.removed[0], annotation, "a4");
+		});
+		textModel.setText("a", 20, 40);
+		var iter = annotationModel.getAnnotations(0, text.length);
+		assert.equal(iter.hasNext(), false, "f1");
+		assert.equal(iter.next(), null, "f2");
+	};
+	
+	return tests;
+
+});
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-model.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-model.js
similarity index 98%
rename from bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-model.js
rename to bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-model.js
index 69bdda9..980226c 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-model.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-model.js
@@ -11,7 +11,7 @@
 
 /*global define */
 
-define(["orion/assert", 'orion/textview/textModel', 'orion/textview/annotations'], function(assert, mTextModel) {
+define(["orion/assert", 'orion/editor/textModel', 'orion/editor/annotations'], function(assert, mTextModel) {
 
 	var tests = {};
 	
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test.html b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-models.html
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test.html
rename to bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-models.html
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-performance.html b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-performance.html
similarity index 87%
rename from bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-performance.html
rename to bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-performance.html
index 740ecd9..b0e70cb 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-performance.html
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-performance.html
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
-	<link rel="stylesheet" type="text/css" href="../../examples/textview/themes/default.css" />
+	<link rel="stylesheet" type="text/css" href="../../examples/editor/themes/default.css" />
 	<script src="../../orion/plugin.js"></script>
 	<script src="../../requirejs/require.js"></script>
 	<script type="text/javascript">
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-performance.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-performance.js
similarity index 98%
rename from bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-performance.js
rename to bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-performance.js
index 1c7817e..2c7c07e 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-performance.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-performance.js
@@ -11,7 +11,7 @@
 
 /*global define require setTimeout window */
 
-define(['examples/textview/demoSetup', 'orion/Deferred'], function(mSetup, Deferred) {
+define(['examples/editor/demoSetup', 'orion/Deferred'], function(mSetup, Deferred) {
 
 	var tests = {};
 	
@@ -34,7 +34,7 @@
 	
 	function doAction(action, max) {
 		var d = new Deferred();
-		var view = mSetup.view || setupView(mSetup.getFile("/examples/textview/text.txt"), "java");
+		var view = mSetup.view || setupView(mSetup.getFile("/examples/editor/text.txt"), "java");
 		var model = view.getModel();
 		if (action.toLowerCase().indexOf("down") !== -1) {
 			view.setSelection(0, 0);
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-projectionModel.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-projectionModel.js
similarity index 98%
rename from bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-projectionModel.js
rename to bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-projectionModel.js
index 024dc0a..0cd7f48 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/textview/test-projectionModel.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/test-projectionModel.js
@@ -11,7 +11,7 @@
 
 /*global define */
 
-define(["orion/assert", 'orion/textview/textModel', 'orion/textview/projectionTextModel'], function(assert, mTextModel, mProjectionTextModel) {
+define(["orion/assert", 'orion/editor/textModel', 'orion/editor/projectionTextModel'], function(assert, mTextModel, mProjectionTextModel) {
 
 	var tests = {};
 	
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/testcase-codemirror.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/testcase-codemirror.js
index f15db67..80c230a 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/testcase-codemirror.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/testcase-codemirror.js
@@ -12,14 +12,14 @@
 /*jslint */
 /*global define*/
 
-define(["orion/assert", "orion/textview/eventTarget", "orion/textview/textModel", "orion/textview/annotations", "orion/editor/mirror"],
+define(["orion/assert", "orion/editor/eventTarget", "orion/editor/textModel", "orion/editor/annotations", "orion/editor/mirror"],
 		function(assert, mEventTarget, mTextModel, mAnnotations, mMirror) {
 	var tests = {};
 	
 	function SampleMode(codeMirror) {
 	}
 	
-	// Fake version of orion.textview.TextView for testing. Just dispatches events, doesn't touch the DOM.
+	// Fake version of orion.editor.TextView for testing. Just dispatches events, doesn't touch the DOM.
 	function MockTextView() {
 		this.model = new mTextModel.TextModel();
 	}
diff --git a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/textMateStyler/testcase.js b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/textMateStyler/testcase.js
index a57f058..6d35d0f 100644
--- a/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/textMateStyler/testcase.js
+++ b/bundles/org.eclipse.orion.client.editor/web/js-tests/editor/textMateStyler/testcase.js
@@ -93,7 +93,7 @@
 	
 	/**
 	 * Helper
-	 * @param {orion.textview.StyleRange[]} styleRanges
+	 * @param {orion.editor.StyleRange[]} styleRanges
 	 * @param {Array} scopeRegions
 	 */
 	function assertStylesMatchScopes(view, styler, lineIndex, styleRanges, /**Array*/ scopeRegions) {
@@ -128,7 +128,7 @@
 	}
 	
 //	/**
-//	 * Fails if the {@link orion.textview.StyleRange[]} ranges returned by running the styler on the line number
+//	 * Fails if the {@link orion.editor.StyleRange[]} ranges returned by running the styler on the line number
 //	 * <tt>lineIndex</tt> do not exactly match the expected result given in <tt>scopeRegions</tt>.
 //	 * @see #assertDisplayedLineScope
 //	 */
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/AsyncStyler.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/AsyncStyler.js
index 2e9a58d..dbadb0c 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/AsyncStyler.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/AsyncStyler.js
@@ -10,7 +10,7 @@
  ******************************************************************************/
 /*jslint browser:true regexp:true*/
 /*global console define*/
-define("orion/editor/AsyncStyler", ['i18n!orion/editor/nls/messages', 'orion/textview/annotations'], function(messages, mAnnotations) {
+define("orion/editor/AsyncStyler", ['i18n!orion/editor/nls/messages', 'orion/editor/annotations'], function(messages, mAnnotations) {
 	var SERVICE_NAME = "orion.edit.highlighter";
 	var HIGHLIGHT_ERROR_ANNOTATION = "orion.annotation.highlightError";
 	var badServiceError = SERVICE_NAME + " service must be an event emitter";
@@ -35,16 +35,16 @@
 	 * <p>A style provider monitors changes to the TextView (typically using an <code>orion.edit.model</code> service) and 
 	 * dispatches a service event of type <code>'orion.edit.highlighter.styleReady'</code> when it has style information to send.
 	 * The event carries a payload of style information for one or more lines in the TextView. The AsyncStyler then applies
-	 * the style information fron the event to the TextView using the {@link orion.textview.TextView#event:onLineStyle} API.
+	 * the style information fron the event to the TextView using the {@link orion.editor.TextView#event:onLineStyle} API.
 	 * </p>
 	 *
 	 * <p>Applying style information may cause the TextView to be redrawn, which is potentially expensive. To minimize the 
 	 * number of redraws, a provider should provide style for many lines in a single StyleReadyEvent.
 	 * </p>
 	 *
-	 * @param {orion.textview.TextView} textView The TextView to style.
+	 * @param {orion.editor.TextView} textView The TextView to style.
 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry The ServiceRegistry to monitor for highlighter services.
-	 * @param {orion.textview.AnnotationModel} [annotationModel] The Annotation Model to use for creating error and warning annotations.
+	 * @param {orion.editor.AnnotationModel} [annotationModel] The Annotation Model to use for creating error and warning annotations.
 	 * @see orion.editor.StyleReadyEvent
 	 */
 	function AsyncStyler(textView, serviceRegistry, annotationModel) {
@@ -194,7 +194,7 @@
 			}
 			var style = this.lineStyles[e.lineIndex];
 			if (style) {
-				// The 'ranges', 'errors' are of type {@link orion.textview.LineStyleEvent#ranges}, except the 
+				// The 'ranges', 'errors' are of type {@link orion.editor.LineStyleEvent#ranges}, except the 
 				// start and end indices are line-relative offsets, not document-relative.
 				if (style.ranges) { e.ranges = _toDocumentOffset(style.ranges, e.lineStart); }
 				else if (style.style) { e.style = style.style; }
@@ -293,8 +293,8 @@
 	 * @description Represents style information for a line.
 	 * <p>Note that the offsets given in the {@link #ranges} and {@link #errors} properties are relative to the start of the
 	 * line that this LineStyle is associated with, not the start of the document.</p>
-	 * @property {orion.textview.StyleRange[]} ranges Optional; Gives the styles for this line.
-	 * @property {orion.textview.StyleRange[]} errors Optional; Gives the error styles for this line. Error styles will be 
+	 * @property {orion.editor.StyleRange[]} ranges Optional; Gives the styles for this line.
+	 * @property {orion.editor.StyleRange[]} errors Optional; Gives the error styles for this line. Error styles will be 
 	 * presented as annotations in the UI.
 	 */
 
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/annotations.css b/bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.css
similarity index 96%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/annotations.css
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.css
index 140c5d9..4bf8f89 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/annotations.css
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.css
@@ -1,186 +1,202 @@
-/* Styles for the annotation ruler (all lines) */

-.annotation {

-}

-.annotation.error,

-.annotation.warning,

-.annotation.task,

-.annotation.bookmark,

-.annotation.breakpoint,

-.annotation.collapsed,

-.annotation.expanded, 

-.annotation.currentBracket, 

-.annotation.matchingBracket, 

-.annotation.currentLine, 

-.annotation.matchingSearch,  

-.annotation.currentSearch {

-}

-

-/* Styles for the annotation ruler (first line) */

-.annotationHTML {

-	cursor: pointer;

-	width: 16px;

-	height: 16px;

-	display: inline-block;

-	vertical-align: middle;

-	background-position: center;

-	background-repeat: no-repeat;

-}

-.annotationHTML.error {

-	/* images/error.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAPVvcvWHiPVucvRuc+ttcfV6f91KVN5LU99PV/FZY/JhaM4oN84pONE4Rd1ATfJLWutVYPRgbdxpcsgWKMgZKs4lNfE/UvE/U+artcpdSc5uXveimslHPuBhW/eJhfV5efaCgO2CgP+/v+PExP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACUALAAAAAAQABAAAAZ+wJJwSCwaScgkySgkjTQZTkYzWhadnE5oE+pwqkSshwQqkzxfa4kkQXxEpA9J9EFI1KQGQQBAigYCBA14ExEWF0gXihETeA0QD3AkD5QQg0NsDnAJmwkOd5gYFSQKpXAFDBhqaxgLBwQBBAapq00YEg0UDRKqTGtKSL7Cw8JBADs=");

-}

-.annotationHTML.warning {

-	/* images/warning.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAP7bc//egf/ij/7ijv/jl/7kl//mnv7lnv/uwf7CTP7DTf7DT/7IW//Na/7Na//NbP7QdP/dmbltAIJNAF03AMSAJMSCLKqASa2DS6uBSquCSrGHTq6ETbCHT7WKUrKIUcCVXL+UXMOYX8GWXsSZYMiib6+ETbOIUcOXX86uhd3Muf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACsALAAAAAAQABAAAAZowJVwSCwaj0ihikRSJYcoBEL0XKlGkcjImQQhJBREKFnyICoThKeE/AAW6AXgdPyUAgrLJBEo0YsbAQyDhAEdRRwDDw8OaA4NDQImRBgFEJdglxAEGEQZKQcHBqOkKRpFF6mqq1WtrUEAOw==");

-}

-.annotationHTML.task {

-	/* images/task.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQAAN7s4uTy6ICvY423c2WdP2ugR3mqWYeza2ejOl6VNVqPM1aJMURsJ2GaOnKlT8PbsbPDqGmmO1OCLk98LEhxKGWfOWKaN0t2KkJoJf///////wAAAAAAAAAAAAAAAAAAACH5BAEAABoALAAAAAAQABAAAAVmoCaOZDk+UaquDxkNcCxHJHLceI6QleD/vkCmQrIYjkiDMGAhJRzQ6NKRICkKgYJ2qVWQFktCmEBYkCSNZSbQaDckpAl5TCZMSBdtAaDXX0gUUYJRFCQMSYgGDCQQGI6PkBAmkyUhADs=");

-}

-.annotationHTML.bookmark {

-	/* images/bookmark.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQALMAAP7//+/VNPzZS/vifeumAPrBOOSlHOSuRP///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAARLEMlJq5Xn3EvIrkenfRIhCB5pmKhRdbAJAGhssuc8n6eJoAKdkOaTAIdEQeWoA1oGsiZhYAnIcqiApVPjElyUbkFSgCkn5XElLYkAADs=");

-}

-.annotationHTML.breakpoint {

-	/* images/breakpoint.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAFheoFxkoFxnpmt0pmZxpnF7rYyWwmJwpnaFs3aDrWt8rXGBrYycwmZ3mXuNs42cu77F03GIs3aJrYGVu2J5oKCuxeDj6LK/03GLrYieu3aIoIygu6m4zcLN3MTM1m6Rs2aLriRgkSZilXGXtoGcs7LD0QBLhSZikihol3ScubrO2Yaqu5q4xpO0wpm7yabF0ZO9yaXI0r3X3tHj6P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADQALAAAAAAQABAAAAafQJpwSCwWLYZBIDAwWIw0A+FFpW6aRUPCxe1yE4ahhdCCxWSzmSwGgxGeUceKpUqhUCkVa7UK0wgkJCUjJoUmIyWBBEIEGhoeJ4YmJx6OAUIADQ0QIZIhEJoAQgEUFBUgkiAVpZdRCxIPFx8iIh8XDw4FfhYHDhgZHB0dHBkYEwdwUQoTEc3OEwp+QwYHCBMMDBMIB9JESAJLAk5Q5EVBADs=");

-}

-.annotationHTML.collapsed {

-	/* images/collapsed.png */

-	width: 14px;

-	height: 14px;

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWBJREFUeNpi/P//PwMlgImBQkCxASzoAp++fo+6de+Z+fXbD/Jev/nAICoiwKCpqrBBTUlqNR835zJ09YzIYfDxy7eo/cevLmXlYGNQUJAEahZieP3mHcODB08Zfv/4w+BoqR3Nz8O1DKcXzt94HPqXmZlBU1+LgZNfkMHazIOBA0hr6uswgMTP33gYijcMLlx/EMAnLs7w7sc/hg9AG0HgPZB+B8S84hJA+UcBeMPg+at3DJIMnAxZzt5wsUhnXzDdsmIVWB6vAcLCfAys3z4wzN64huEfkJ/uH8IwexOQDQymD2/fgeXxekFLRWHD51evGDhZGRi4WSFSnCwgNjB2Xr1m0AbK4zXAQkdhNdPf3wx3r91g+PruLcOqnasYvn54x3Dv2k0G5r+/GMyB8nijEQTefvoadeH6w9Cbtx8GvH//kUFQkJ9BQ1V+g76m/GphPu5lBA0YenmBYgMAAgwA34GIKjmLxOUAAAAASUVORK5CYII=");

-}

-.annotationHTML.expanded {

-	/* images/expanded.png */

-	width: 14px;

-	height: 14px;	

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNrUksFKw0AURW+mTWw67SSEiG209U90r4jddFO34l+5U0HdZCHiFwiCOz9AlMSmGEpMOqk1TWJSFGyFbATR2dyZd+Dw3mOENE3xkyP8PYHrBT3OX7uW43ZefA6FUaw1dJPSyrmu1k8KBYOh37Od4XFZLEPXFdRrFMGIw3U9TKMYqw1tb0VjcxLy9eEF425CCIxWE5JcxSQGxCyNloG87gXhwWIHc4J767lTZQw8ShFGSZbxRyaQmZJxd3NRUJ6ffwQNEi6PzG/L2tjdmvFCgcKqKL2F2Olu43MzggDka+IjPuOFI7Sbujn2fUglYKkkzFIi+R0I/QDrGS8UqDX5QkhiOHYfE84hkhSTkGNgOyDJFCzjhYLTq+vDtrG8r1LZtB6fcHtzB+uhD5VWzLx+lvF/8JV/XfAuwADsrJbMGG4l4AAAAABJRU5ErkJggg==");

-}

-.annotationHTML.multiple {

-	/* images/multiple.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAOdpa+yJiuFYXOFYXeBYXONwded8f+NwdmhwkHB4iPr7/ezx+fP2+2h4kOzy+Wh4iPr8/gCBwTaczjaXyjaYyjaXyTaYyfr8/QCMzQCMzACHxzao2jal2Dak1zag03iAgI/Ckn64fZrHmX+4fZLCianPopPCiarOoqbLlafLlbnXq7nWq6fLlMTcsoCIeJCQcIiIeKCYaJiQcO16ee16evGVlfGWlfahn/ahoPWhn/WhoPe1tP///////wAAAAAAACH5BAEAAD0ALAAAAAAQABAAAAaRwJ5wSCwaj8WYcslcDmObaDTGq1Zjzw4mk+FQIRcFTzaUeTRoj4zHaI+HL0lkLnnxFgsH7zWEWSoTFBMwVlUwQy6JMDCJjYwuQx8tk5MfOzk4OjcfkSssKCkqHzY0MzQ1nEIJJSYkJCcJAQCzAQlDDyIjISMiCQYEAgMGD0MNIMfHDQUHBc3EQgjR0tPSSNY9QQA7");

-}

-.annotationHTML.overlay {

-	/* images/plus.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEAQvB2JVdrAAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAD1JREFUCNdtjkESADAEAzemf69f66HMqGlOIhYiFRFRtSQBWAY7mzx+EDTL6sSgb1jTk7Q87rxyqe37fXsAa78gLyZnRgEAAAAASUVORK5CYII=");

-	background-position: right bottom;

-	position: relative;

-	top: -16px;

-}

-.annotationHTML.currentBracket {

-	/* images/currentBracket.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLEBULCGQmEKAAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAnklEQVQ4y7VTsRHDIBATJg1HCUzAHEzFBExAzwZsRMkE9gifKhc72ODYibr/+xcnoQdugq0LAujEwmbn0UxQh4OxpjX1XgshwFqLnPM5PQTQGlprWpbl3RhJ/CSQUm7qPYLp7i8cEpRSoJT6ju0lIaVEQgiKMQ4lHHpQayVjzHWCn5jIOcc8z9dMBADvPZxz3SC1tzCI8vgWdvL+VzwB8JSj2GFTyxIAAAAASUVORK5CYII=");

-}

-.annotationHTML.matchingBracket {

-	/* images/matchingBracket.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLEBUMAsuyb3kAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAoklEQVQ4y61TsQ3EIAw80DcI0USKGIApWIsB2IGGKbJPugxBR3VfvfRRCOSTvw7LPuPzGXgI8f0gwAsFu5rXIYMdDiEOIdnKW5YFzjnEGH+bhwA/KKVwmibu0BhRnpEZY1BrHTaVT7fQJZjnGeu63tOAJFNKVEox53yqQZfAWstt27oidgm01ve3UEqBaBjnspG89wgh3LiFgZXHt3Dh23/FGxKViehm0X85AAAAAElFTkSuQmCC");

-}

-.annotationHTML.currentLine {

-	/* images/currentLine.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQAALxe0bNWzbdZzrlb0KpPx61RybBTy6VLxadNxZGctIeUroyYsG92hHyMqIKRq2l9nmyAoHGDonaIpStXj6q80k1aXf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABYALAAAAAAQABAAAAVCoCWOZGmeKDql5ppOMGXBk/zOoltSNO6XrlXwxIPNYiMGq8SoLC2MaNPygEQkDYdikUg6LQcEoWAICAaA5HPNLoUAADs=");

-}

-.annotationHTML.matchingSearch {

-	/* images/search.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAALClrLu1ubOpsKqdp6eapKufqMTAw7attLSrsrGnr62jq8C7v765vaebpb22vLmyuMbCxsnGycfEx8G+wcrIysTBxUltof//yf///v70jergpPvws+nWc/npqvrpqvrpq/raffffnvXVkfTVkvXUkd+9f+SiOemvV+uyXa2OX7mYZqeIXKuNX/ClO7KQYqiIXJ59Vp19VpFvTo9uTZBvTpNyUJNyUf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADgALAAAAAAQABAAAAZ4QJxwSCwajS2aS1U6DlunzcagcuKgG4sn5HJiLZ2QiHbEbj6hEapVTKVYr3OItG5TIhVGLF0npigUEAsPAjV9Q24pEhMBCAoybEUmGRcrDgcAAzNGkxcYNzAJBQSbRJ0YqBc2DaVEHJ6pGTStRBqfGBcZILRWvThBADs=");

-}

-.annotationHTML.currentSearch {

-	/* images/search.gif */

-	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAALClrLu1ubOpsKqdp6eapKufqMTAw7attLSrsrGnr62jq8C7v765vaebpb22vLmyuMbCxsnGycfEx8G+wcrIysTBxUltof//yf///v70jergpPvws+nWc/npqvrpqvrpq/raffffnvXVkfTVkvXUkd+9f+SiOemvV+uyXa2OX7mYZqeIXKuNX/ClO7KQYqiIXJ59Vp19VpFvTo9uTZBvTpNyUJNyUf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADgALAAAAAAQABAAAAZ4QJxwSCwajS2aS1U6DlunzcagcuKgG4sn5HJiLZ2QiHbEbj6hEapVTKVYr3OItG5TIhVGLF0npigUEAsPAjV9Q24pEhMBCAoybEUmGRcrDgcAAzNGkxcYNzAJBQSbRJ0YqBc2DaVEHJ6pGTStRBqfGBcZILRWvThBADs=");

-}

-

-/* Styles for the overview ruler  */

-.annotationOverview {

-	cursor: pointer;

-	border-radius: 2px;

-	left: 2px;

-	width: 8px;

-}

-.annotationOverview.task {

-	background-color: lightgreen;

-	border: 1px solid green;

-}

-.annotationOverview.breakpoint {

-	background-color: lightblue;

-	border: 1px solid blue;

-}

-.annotationOverview.bookmark {

-	background-color: yellow;

-	border: 1px solid orange;

-}

-.annotationOverview.error {

-	background-color: lightcoral;

-	border: 1px solid darkred;

-}

-.annotationOverview.warning {

-	background-color: Gold;

-	border: 1px solid black;

-}

-.annotationOverview.currentBracket {

-	background-color: lightgray;

-	border: 1px solid red;

-}

-.annotationOverview.matchingBracket {

-	background-color: lightgray;

-	border: 1px solid red;

-}

-.annotationOverview.currentLine {

-	background-color: #EAF2FE;

-	border: 1px solid black;

-}

-.annotationOverview.matchingSearch {

-	background-color: #C3E1FF;

-	border: 1px solid black;

-}

-.annotationOverview.currentSearch {

-	background-color: #53D1FF;

-	border: 1px solid black;

-}

-

-/* Styles for text range */

-.annotationRange {

-	background-repeat: repeat-x;

- 	background-position: left bottom;

-}

-.annotationRange.task {

-	/* images/squiggly_task.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLDhEoIrb7JmcAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAGUlEQVQI12NggIH/DGdhDCM45z/DfyiBAADgdQjGhI/4DAAAAABJRU5ErkJggg==");

-}

-.annotationRange.breakpoint {

-	/* images/squiggly_breakpoint.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLDhEqHTKradgAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAIklEQVQI11XJMQ0AMAzAMGMafwrFlD19+sUKIJTFo9k+B/kQ+Qr2bIVKOgAAAABJRU5ErkJggg==");

-}

-.annotationRange.bookmark {

-	/* images/squiggly_bookmark.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");

-}

-.annotationRange.error {

-	/* images/squiggly_error.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");

-}

-.annotationRange.warning {

-	/* images/squiggly_warning.png */

-	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");

-}

-.annotationRange.currentBracket {

-}

-.annotationRange.matchingBracket {

-	outline: 1px solid red;

-}

-.annotationRange.currentSearch {

-	background-color: #53D1FF;

-}

-.annotationRange.matchingSearch {

-	background-color: #C3E1FF;

-}

-.annotationRange.currentSearch {

-	background-color: #53D1FF;

-}

-

-/* Styles for lines of text */

-.annotationLine {

-}

-.annotationLine.currentLine {

-	background-color: #EAF2FE;

-}

-

+/* Styles for the annotation ruler (all lines) */
+.annotation {
+}
+.annotation.error,
+.annotation.warning,
+.annotation.task,
+.annotation.bookmark,
+.annotation.breakpoint,
+.annotation.collapsed,
+.annotation.expanded, 
+.annotation.currentBracket, 
+.annotation.matchingBracket, 
+.annotation.currentLine, 
+.annotation.matchingSearch,  
+.annotation.readOccurrence,
+.annotation.writeOccurrence, 
+.annotation.currentSearch {
+}
+
+/* Styles for the annotation ruler (first line) */
+.annotationHTML {
+	cursor: pointer;
+	width: 16px;
+	height: 16px;
+	display: inline-block;
+	vertical-align: middle;
+	background-position: center;
+	background-repeat: no-repeat;
+}
+.annotationHTML.error {
+	/* images/error.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAPVvcvWHiPVucvRuc+ttcfV6f91KVN5LU99PV/FZY/JhaM4oN84pONE4Rd1ATfJLWutVYPRgbdxpcsgWKMgZKs4lNfE/UvE/U+artcpdSc5uXveimslHPuBhW/eJhfV5efaCgO2CgP+/v+PExP///////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACUALAAAAAAQABAAAAZ+wJJwSCwaScgkySgkjTQZTkYzWhadnE5oE+pwqkSshwQqkzxfa4kkQXxEpA9J9EFI1KQGQQBAigYCBA14ExEWF0gXihETeA0QD3AkD5QQg0NsDnAJmwkOd5gYFSQKpXAFDBhqaxgLBwQBBAapq00YEg0UDRKqTGtKSL7Cw8JBADs=");
+}
+.annotationHTML.warning {
+	/* images/warning.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAP7bc//egf/ij/7ijv/jl/7kl//mnv7lnv/uwf7CTP7DTf7DT/7IW//Na/7Na//NbP7QdP/dmbltAIJNAF03AMSAJMSCLKqASa2DS6uBSquCSrGHTq6ETbCHT7WKUrKIUcCVXL+UXMOYX8GWXsSZYMiib6+ETbOIUcOXX86uhd3Muf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAACsALAAAAAAQABAAAAZowJVwSCwaj0ihikRSJYcoBEL0XKlGkcjImQQhJBREKFnyICoThKeE/AAW6AXgdPyUAgrLJBEo0YsbAQyDhAEdRRwDDw8OaA4NDQImRBgFEJdglxAEGEQZKQcHBqOkKRpFF6mqq1WtrUEAOw==");
+}
+.annotationHTML.task {
+	/* images/task.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQAAN7s4uTy6ICvY423c2WdP2ugR3mqWYeza2ejOl6VNVqPM1aJMURsJ2GaOnKlT8PbsbPDqGmmO1OCLk98LEhxKGWfOWKaN0t2KkJoJf///////wAAAAAAAAAAAAAAAAAAACH5BAEAABoALAAAAAAQABAAAAVmoCaOZDk+UaquDxkNcCxHJHLceI6QleD/vkCmQrIYjkiDMGAhJRzQ6NKRICkKgYJ2qVWQFktCmEBYkCSNZSbQaDckpAl5TCZMSBdtAaDXX0gUUYJRFCQMSYgGDCQQGI6PkBAmkyUhADs=");
+}
+.annotationHTML.bookmark {
+	/* images/bookmark.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQALMAAP7//+/VNPzZS/vifeumAPrBOOSlHOSuRP///wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAQABAAAARLEMlJq5Xn3EvIrkenfRIhCB5pmKhRdbAJAGhssuc8n6eJoAKdkOaTAIdEQeWoA1oGsiZhYAnIcqiApVPjElyUbkFSgCkn5XElLYkAADs=");
+}
+.annotationHTML.breakpoint {
+	/* images/breakpoint.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAFheoFxkoFxnpmt0pmZxpnF7rYyWwmJwpnaFs3aDrWt8rXGBrYycwmZ3mXuNs42cu77F03GIs3aJrYGVu2J5oKCuxeDj6LK/03GLrYieu3aIoIygu6m4zcLN3MTM1m6Rs2aLriRgkSZilXGXtoGcs7LD0QBLhSZikihol3ScubrO2Yaqu5q4xpO0wpm7yabF0ZO9yaXI0r3X3tHj6P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADQALAAAAAAQABAAAAafQJpwSCwWLYZBIDAwWIw0A+FFpW6aRUPCxe1yE4ahhdCCxWSzmSwGgxGeUceKpUqhUCkVa7UK0wgkJCUjJoUmIyWBBEIEGhoeJ4YmJx6OAUIADQ0QIZIhEJoAQgEUFBUgkiAVpZdRCxIPFx8iIh8XDw4FfhYHDhgZHB0dHBkYEwdwUQoTEc3OEwp+QwYHCBMMDBMIB9JESAJLAk5Q5EVBADs=");
+}
+.annotationHTML.collapsed {
+	/* images/collapsed.png */
+	width: 14px;
+	height: 14px;
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAWBJREFUeNpi/P//PwMlgImBQkCxASzoAp++fo+6de+Z+fXbD/Jev/nAICoiwKCpqrBBTUlqNR835zJ09YzIYfDxy7eo/cevLmXlYGNQUJAEahZieP3mHcODB08Zfv/4w+BoqR3Nz8O1DKcXzt94HPqXmZlBU1+LgZNfkMHazIOBA0hr6uswgMTP33gYijcMLlx/EMAnLs7w7sc/hg9AG0HgPZB+B8S84hJA+UcBeMPg+at3DJIMnAxZzt5wsUhnXzDdsmIVWB6vAcLCfAys3z4wzN64huEfkJ/uH8IwexOQDQymD2/fgeXxekFLRWHD51evGDhZGRi4WSFSnCwgNjB2Xr1m0AbK4zXAQkdhNdPf3wx3r91g+PruLcOqnasYvn54x3Dv2k0G5r+/GMyB8nijEQTefvoadeH6w9Cbtx8GvH//kUFQkJ9BQ1V+g76m/GphPu5lBA0YenmBYgMAAgwA34GIKjmLxOUAAAAASUVORK5CYII=");
+}
+.annotationHTML.expanded {
+	/* images/expanded.png */
+	width: 14px;
+	height: 14px;	
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAT5JREFUeNrUksFKw0AURW+mTWw67SSEiG209U90r4jddFO34l+5U0HdZCHiFwiCOz9AlMSmGEpMOqk1TWJSFGyFbATR2dyZd+Dw3mOENE3xkyP8PYHrBT3OX7uW43ZefA6FUaw1dJPSyrmu1k8KBYOh37Od4XFZLEPXFdRrFMGIw3U9TKMYqw1tb0VjcxLy9eEF425CCIxWE5JcxSQGxCyNloG87gXhwWIHc4J767lTZQw8ShFGSZbxRyaQmZJxd3NRUJ6ffwQNEi6PzG/L2tjdmvFCgcKqKL2F2Olu43MzggDka+IjPuOFI7Sbujn2fUglYKkkzFIi+R0I/QDrGS8UqDX5QkhiOHYfE84hkhSTkGNgOyDJFCzjhYLTq+vDtrG8r1LZtB6fcHtzB+uhD5VWzLx+lvF/8JV/XfAuwADsrJbMGG4l4AAAAABJRU5ErkJggg==");
+}
+.annotationHTML.multiple {
+	/* images/multiple.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAAOdpa+yJiuFYXOFYXeBYXONwded8f+NwdmhwkHB4iPr7/ezx+fP2+2h4kOzy+Wh4iPr8/gCBwTaczjaXyjaYyjaXyTaYyfr8/QCMzQCMzACHxzao2jal2Dak1zag03iAgI/Ckn64fZrHmX+4fZLCianPopPCiarOoqbLlafLlbnXq7nWq6fLlMTcsoCIeJCQcIiIeKCYaJiQcO16ee16evGVlfGWlfahn/ahoPWhn/WhoPe1tP///////wAAAAAAACH5BAEAAD0ALAAAAAAQABAAAAaRwJ5wSCwaj8WYcslcDmObaDTGq1Zjzw4mk+FQIRcFTzaUeTRoj4zHaI+HL0lkLnnxFgsH7zWEWSoTFBMwVlUwQy6JMDCJjYwuQx8tk5MfOzk4OjcfkSssKCkqHzY0MzQ1nEIJJSYkJCcJAQCzAQlDDyIjISMiCQYEAgMGD0MNIMfHDQUHBc3EQgjR0tPSSNY9QQA7");
+}
+.annotationHTML.overlay {
+	/* images/plus.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAHCAYAAADEUlfTAAAAAXNSR0IArs4c6QAAAAZiS0dEAAAAAAAA+UO7fwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEAQvB2JVdrAAAAAdaVRYdENvbW1lbnQAAAAAAENyZWF0ZWQgd2l0aCBHSU1QZC5lBwAAAD1JREFUCNdtjkESADAEAzemf69f66HMqGlOIhYiFRFRtSQBWAY7mzx+EDTL6sSgb1jTk7Q87rxyqe37fXsAa78gLyZnRgEAAAAASUVORK5CYII=");
+	background-position: right bottom;
+	position: relative;
+	top: -16px;
+}
+.annotationHTML.currentBracket {
+	/* images/currentBracket.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLEBULCGQmEKAAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAnklEQVQ4y7VTsRHDIBATJg1HCUzAHEzFBExAzwZsRMkE9gifKhc72ODYibr/+xcnoQdugq0LAujEwmbn0UxQh4OxpjX1XgshwFqLnPM5PQTQGlprWpbl3RhJ/CSQUm7qPYLp7i8cEpRSoJT6ju0lIaVEQgiKMQ4lHHpQayVjzHWCn5jIOcc8z9dMBADvPZxz3SC1tzCI8vgWdvL+VzwB8JSj2GFTyxIAAAAASUVORK5CYII=");
+}
+.annotationHTML.matchingBracket {
+	/* images/matchingBracket.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLEBUMAsuyb3kAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAoklEQVQ4y61TsQ3EIAw80DcI0USKGIApWIsB2IGGKbJPugxBR3VfvfRRCOSTvw7LPuPzGXgI8f0gwAsFu5rXIYMdDiEOIdnKW5YFzjnEGH+bhwA/KKVwmibu0BhRnpEZY1BrHTaVT7fQJZjnGeu63tOAJFNKVEox53yqQZfAWstt27oidgm01ve3UEqBaBjnspG89wgh3LiFgZXHt3Dh23/FGxKViehm0X85AAAAAElFTkSuQmCC");
+}
+.annotationHTML.currentLine {
+	/* images/currentLine.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQAMQAALxe0bNWzbdZzrlb0KpPx61RybBTy6VLxadNxZGctIeUroyYsG92hHyMqIKRq2l9nmyAoHGDonaIpStXj6q80k1aXf///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABYALAAAAAAQABAAAAVCoCWOZGmeKDql5ppOMGXBk/zOoltSNO6XrlXwxIPNYiMGq8SoLC2MaNPygEQkDYdikUg6LQcEoWAICAaA5HPNLoUAADs=");
+}
+.annotationHTML.matchingSearch {
+	/* images/search.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAALClrLu1ubOpsKqdp6eapKufqMTAw7attLSrsrGnr62jq8C7v765vaebpb22vLmyuMbCxsnGycfEx8G+wcrIysTBxUltof//yf///v70jergpPvws+nWc/npqvrpqvrpq/raffffnvXVkfTVkvXUkd+9f+SiOemvV+uyXa2OX7mYZqeIXKuNX/ClO7KQYqiIXJ59Vp19VpFvTo9uTZBvTpNyUJNyUf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADgALAAAAAAQABAAAAZ4QJxwSCwajS2aS1U6DlunzcagcuKgG4sn5HJiLZ2QiHbEbj6hEapVTKVYr3OItG5TIhVGLF0npigUEAsPAjV9Q24pEhMBCAoybEUmGRcrDgcAAzNGkxcYNzAJBQSbRJ0YqBc2DaVEHJ6pGTStRBqfGBcZILRWvThBADs=");
+}
+.annotationHTML.currentSearch {
+	/* images/search.gif */
+	background-image: url("data:image/gif;base64,R0lGODlhEAAQANUAALClrLu1ubOpsKqdp6eapKufqMTAw7attLSrsrGnr62jq8C7v765vaebpb22vLmyuMbCxsnGycfEx8G+wcrIysTBxUltof//yf///v70jergpPvws+nWc/npqvrpqvrpq/raffffnvXVkfTVkvXUkd+9f+SiOemvV+uyXa2OX7mYZqeIXKuNX/ClO7KQYqiIXJ59Vp19VpFvTo9uTZBvTpNyUJNyUf///////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAADgALAAAAAAQABAAAAZ4QJxwSCwajS2aS1U6DlunzcagcuKgG4sn5HJiLZ2QiHbEbj6hEapVTKVYr3OItG5TIhVGLF0npigUEAsPAjV9Q24pEhMBCAoybEUmGRcrDgcAAzNGkxcYNzAJBQSbRJ0YqBc2DaVEHJ6pGTStRBqfGBcZILRWvThBADs=");
+}
+
+/* Styles for the overview ruler  */
+.annotationOverview {
+	cursor: pointer;
+	border-radius: 2px;
+	left: 2px;
+	width: 8px;
+}
+.annotationOverview.task {
+	background-color: lightgreen;
+	border: 1px solid green;
+}
+.annotationOverview.breakpoint {
+	background-color: lightblue;
+	border: 1px solid blue;
+}
+.annotationOverview.bookmark {
+	background-color: yellow;
+	border: 1px solid orange;
+}
+.annotationOverview.error {
+	background-color: lightcoral;
+	border: 1px solid darkred;
+}
+.annotationOverview.warning {
+	background-color: Gold;
+	border: 1px solid black;
+}
+.annotationOverview.currentBracket {
+	background-color: lightgray;
+	border: 1px solid red;
+}
+.annotationOverview.matchingBracket {
+	background-color: lightgray;
+	border: 1px solid red;
+}
+.annotationOverview.currentLine {
+	background-color: #EAF2FE;
+	border: 1px solid black;
+}
+.annotationOverview.matchingSearch {
+	background-color: #C3E1FF;
+	border: 1px solid black;
+}
+.annotationOverview.currentSearch {
+	background-color: #53D1FF;
+	border: 1px solid black;
+}
+.annotationOverview.readOccurrence {
+	background-color: lightgray;
+	border: 1px solid black;
+}
+.annotationOverview.writeOccurrence {
+	background-color: Gold;
+	border: 1px solid darkred;
+}
+
+/* Styles for text range */
+.annotationRange {
+	background-repeat: repeat-x;
+ 	background-position: left bottom;
+}
+.annotationRange.task {
+	/* images/squiggly_task.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLDhEoIrb7JmcAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAGUlEQVQI12NggIH/DGdhDCM45z/DfyiBAADgdQjGhI/4DAAAAABJRU5ErkJggg==");
+}
+.annotationRange.breakpoint {
+	/* images/squiggly_breakpoint.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sLDhEqHTKradgAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAIklEQVQI11XJMQ0AMAzAMGMafwrFlD19+sUKIJTFo9k+B/kQ+Qr2bIVKOgAAAABJRU5ErkJggg==");
+}
+.annotationRange.bookmark {
+	/* images/squiggly_bookmark.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
+}
+.annotationRange.error {
+	/* images/squiggly_error.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJDw4cOCW1/KIAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAHElEQVQI12NggIL/DAz/GdA5/xkY/qPKMDAwAADLZwf5rvm+LQAAAABJRU5ErkJggg==");
+}
+.annotationRange.warning {
+	/* images/squiggly_warning.png */
+	background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAADCAYAAAC09K7GAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJFhQXEbhTg7YAAAAZdEVYdENvbW1lbnQAQ3JlYXRlZCB3aXRoIEdJTVBXgQ4XAAAAMklEQVQI12NkgIIvJ3QXMjAwdDN+OaEbysDA4MPAwNDNwMCwiOHLCd1zX07o6kBVGQEAKBANtobskNMAAAAASUVORK5CYII=");
+}
+.annotationRange.currentBracket {
+}
+.annotationRange.matchingBracket {
+	outline: 1px solid red;
+}
+.annotationRange.currentSearch {
+	background-color: #53D1FF;
+}
+.annotationRange.matchingSearch {
+	background-color: #C3E1FF;
+}
+.annotationRange.currentSearch {
+	background-color: #53D1FF;
+}
+.annotationRange.readOccurrence {
+	background-color: lightgray;
+}
+.annotationRange.writeOccurrence {
+	background-color: yellow;
+}
+
+/* Styles for lines of text */
+.annotationLine {
+}
+.annotationLine.currentLine {
+	background-color: #EAF2FE;
+}
+
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/annotations.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.js
similarity index 86%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/annotations.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.js
index d6e5271..4354f5f 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/annotations.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/annotations.js
@@ -1,831 +1,841 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: 

- *		Felipe Heidrich (IBM Corporation) - initial API and implementation

- *		Silenio Quarti (IBM Corporation) - initial API and implementation

- ******************************************************************************/

-

-/*global define */

-

-define("orion/textview/annotations", ['i18n!orion/textview/nls/messages', 'orion/textview/eventTarget'], function(messages, mEventTarget) { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-	/**

-	 * @class This object represents a decoration attached to a range of text. Annotations are added to a

-	 * <code>AnnotationModel</code> which is attached to a <code>TextModel</code>.

-	 * <p>

-	 * <b>See:</b><br/>

-	 * {@link orion.textview.AnnotationModel}<br/>

-	 * {@link orion.textview.Ruler}<br/>

-	 * </p>		 

-	 * @name orion.textview.Annotation

-	 * 

-	 * @property {String} type The annotation type (for example, orion.annotation.error).

-	 * @property {Number} start The start offset of the annotation in the text model.

-	 * @property {Number} end The end offset of the annotation in the text model.

-	 * @property {String} html The HTML displayed for the annotation.

-	 * @property {String} title The text description for the annotation.

-	 * @property {orion.textview.Style} style The style information for the annotation used in the annotations ruler and tooltips.

-	 * @property {orion.textview.Style} overviewStyle The style information for the annotation used in the overview ruler.

-	 * @property {orion.textview.Style} rangeStyle The style information for the annotation used in the text view to decorate a range of text.

-	 * @property {orion.textview.Style} lineStyle The style information for the annotation used in the text view to decorate a line of text.

-	 */

-	/**

-	 * Constructs a new folding annotation.

-	 * 

-	 * @param {Number} start The start offset of the annotation in the text model.

-	 * @param {Number} end The end offset of the annotation in the text model.

-	 * @param {orion.textview.ProjectionTextModel} projectionModel The projection text model.

-	 * 

-	 * @class This object represents a folding annotation.

-	 * @name orion.textview.FoldingAnnotation

-	 */

-	function FoldingAnnotation (start, end, projectionModel) {

-		this.start = start;

-		this.end = end;

-		this._projectionModel = projectionModel;

-		this.html = this._expandedHTML;

-		this.style = this._expandedStyle;

-		this.expanded = true;

-	}

-	

-	FoldingAnnotation.prototype = /** @lends orion.textview.FoldingAnnotation.prototype */ {

-		_expandedHTML: "<div class='annotationHTML expanded'></div>", //$NON-NLS-0$

-		_expandedStyle: {styleClass: "annotation expanded"}, //$NON-NLS-0$

-		_collapsedHTML: "<div class='annotationHTML collapsed'></div>", //$NON-NLS-0$

-		_collapsedStyle: {styleClass: "annotation collapsed"}, //$NON-NLS-0$

-		/**

-		 * Collapses the annotation.

-		 */

-		collapse: function () {

-			if (!this.expanded) { return; }

-			this.expanded = false;

-			this.html = this._collapsedHTML;

-			this.style = this._collapsedStyle;

-			var projectionModel = this._projectionModel;

-			var baseModel = projectionModel.getBaseModel();

-			this._projection = {

-				start: baseModel.getLineStart(baseModel.getLineAtOffset(this.start) + 1),

-				end: baseModel.getLineEnd(baseModel.getLineAtOffset(this.end), true)

-			};

-			projectionModel.addProjection(this._projection);

-		},

-		/**

-		 * Expands the annotation.

-		 */

-		expand: function () {

-			if (this.expanded) { return; }

-			this.expanded = true;

-			this.html = this._expandedHTML;

-			this.style = this._expandedStyle;

-			this._projectionModel.removeProjection(this._projection);

-		}

-	};

-	 

-	/**

-	 * @class This object represents a regitry of annotation types.

-	 * @name orion.textview.AnnotationType

-	 */

-	function AnnotationType() {

-	}

-	

-	/**

-	 * Error annotation type.

-	 */

-	AnnotationType.ANNOTATION_ERROR = "orion.annotation.error"; //$NON-NLS-0$

-	/**

-	 * Warning annotation type.

-	 */

-	AnnotationType.ANNOTATION_WARNING = "orion.annotation.warning"; //$NON-NLS-0$

-	/**

-	 * Task annotation type.

-	 */

-	AnnotationType.ANNOTATION_TASK = "orion.annotation.task"; //$NON-NLS-0$

-	/**

-	 * Breakpoint annotation type.

-	 */

-	AnnotationType.ANNOTATION_BREAKPOINT = "orion.annotation.breakpoint"; //$NON-NLS-0$

-	/**

-	 * Bookmark annotation type.

-	 */

-	AnnotationType.ANNOTATION_BOOKMARK = "orion.annotation.bookmark"; //$NON-NLS-0$

-	/**

-	 * Folding annotation type.

-	 */

-	AnnotationType.ANNOTATION_FOLDING = "orion.annotation.folding"; //$NON-NLS-0$

-	/**

-	 * Curent bracket annotation type.

-	 */

-	AnnotationType.ANNOTATION_CURRENT_BRACKET = "orion.annotation.currentBracket"; //$NON-NLS-0$

-	/**

-	 * Matching bracket annotation type.

-	 */

-	AnnotationType.ANNOTATION_MATCHING_BRACKET = "orion.annotation.matchingBracket"; //$NON-NLS-0$

-	/**

-	 * Current line annotation type.

-	 */

-	AnnotationType.ANNOTATION_CURRENT_LINE = "orion.annotation.currentLine"; //$NON-NLS-0$

-	/**

-	 * Current search annotation type.

-	 */

-	AnnotationType.ANNOTATION_CURRENT_SEARCH = "orion.annotation.currentSearch"; //$NON-NLS-0$

-	/**

-	 * Matching search annotation type.

-	 */

-	AnnotationType.ANNOTATION_MATCHING_SEARCH = "orion.annotation.matchingSearch"; //$NON-NLS-0$

-	

-	/** @private */

-	var annotationTypes = {};

-	

-	/**

-	 * Register an annotation type.

-	 *

-	 * @param {String} type The annotation type (for example, orion.annotation.error).

-	 * @param {Object|Function} properties The common annotation properties of the registered

-	 *		annotation type. All annotations create with this annotation type will expose these

-	 *		properties.

-	 */

-	AnnotationType.registerType = function(type, properties) {

-		var constructor = properties;

-		if (typeof constructor !== "function") { //$NON-NLS-0$

-			constructor = function(start, end, title) {

-				this.start = start;

-				this.end = end;

-				if (title) { this.title = title; }

-			};

-			constructor.prototype = properties;

-		}

-		constructor.prototype.type = type;

-		annotationTypes[type] = constructor;

-		return type;

-	};

-	

-	/**

-	 * Creates an annotation of a given type with the specified start end end offsets.

-	 *

-	 * @param {String} type The annotation type (for example, orion.annotation.error).

-	 * @param {Number} start The start offset of the annotation in the text model.

-	 * @param {Number} end The end offset of the annotation in the text model.

-	 * @param {String} [title] The text description for the annotation if different then the type description.

-	 * @return {orion.textview.Annotation} the new annotation

-	 */

-	AnnotationType.createAnnotation = function(type, start, end, title) {

-		return new (this.getType(type))(start, end, title);

-	};

-	

-	/**

-	 * Gets the registered annotation type with specified type. The returned

-	 * value is a constructor that can be used to create annotations of the

-	 * speficied type.  The constructor takes the start and end offsets of

-	 * the annotation.

-	 *

-	 * @param {String} type The annotation type (for example, orion.annotation.error).

-	 * @return {Function} The annotation type constructor ( i.e function(start, end, title) ).

-	 */

-	AnnotationType.getType = function(type) {

-		return annotationTypes[type];

-	};

-	

-	/** @private */

-	function registerType(type, lineStyling) {

-		var index = type.lastIndexOf('.'); //$NON-NLS-0$

-		var suffix = type.substring(index + 1);

-		var properties = {

-			title: messages[suffix],

-			style: {styleClass: "annotation " + suffix}, //$NON-NLS-0$

-			html: "<div class='annotationHTML " + suffix + "'></div>", //$NON-NLS-1$ //$NON-NLS-0$

-			overviewStyle: {styleClass: "annotationOverview " + suffix} //$NON-NLS-0$

-		};

-		if (lineStyling) {

-			properties.lineStyle = {styleClass: "annotationLine " + suffix}; //$NON-NLS-0$

-		} else {

-			properties.rangeStyle = {styleClass: "annotationRange " + suffix}; //$NON-NLS-0$

-		}

-		AnnotationType.registerType(type, properties);

-	}

-	registerType(AnnotationType.ANNOTATION_ERROR);

-	registerType(AnnotationType.ANNOTATION_WARNING);

-	registerType(AnnotationType.ANNOTATION_TASK);

-	registerType(AnnotationType.ANNOTATION_BREAKPOINT);

-	registerType(AnnotationType.ANNOTATION_BOOKMARK);

-	registerType(AnnotationType.ANNOTATION_CURRENT_BRACKET);

-	registerType(AnnotationType.ANNOTATION_MATCHING_BRACKET);

-	registerType(AnnotationType.ANNOTATION_CURRENT_SEARCH);

-	registerType(AnnotationType.ANNOTATION_MATCHING_SEARCH);

-	registerType(AnnotationType.ANNOTATION_CURRENT_LINE, true);

-	AnnotationType.registerType(AnnotationType.ANNOTATION_FOLDING, FoldingAnnotation);

-	

-	/** 

-	 * Constructs a new AnnotationTypeList object.

-	 * 

-	 * @class This represents an interface of prioritized annotation types.

-	 * @name orion.textview.AnnotationTypeList

-	 */

-	function AnnotationTypeList () {

-	}

-	/**

-	 * Adds in the annotation type interface into the specified object.

-	 *

-	 * @param {Object} object The object to add in the annotation type interface.

-	 */

-	AnnotationTypeList.addMixin = function(object) {

-		var proto = AnnotationTypeList.prototype;

-		for (var p in proto) {

-			if (proto.hasOwnProperty(p)) {

-				object[p] = proto[p];

-			}

-		}

-	};	

-	AnnotationTypeList.prototype = /** @lends orion.textview.AnnotationTypeList.prototype */ {

-		/**

-		 * Adds an annotation type to the receiver.

-		 * <p>

-		 * Only annotations of the specified types will be shown by

-		 * the receiver.

-		 * </p>

-		 *

-		 * @param {Object} type the annotation type to be shown

-		 * 

-		 * @see #removeAnnotationType

-		 * @see #isAnnotationTypeVisible

-		 */

-		addAnnotationType: function(type) {

-			if (!this._annotationTypes) { this._annotationTypes = []; }

-			this._annotationTypes.push(type);

-		},

-		/**

-		 * Gets the annotation type priority.  The priority is determined by the

-		 * order the annotation type is added to the receiver.  Annotation types

-		 * added first have higher priority.

-		 * <p>

-		 * Returns <code>0</code> if the annotation type is not added.

-		 * </p>

-		 *

-		 * @param {Object} type the annotation type

-		 * 

-		 * @see #addAnnotationType

-		 * @see #removeAnnotationType

-		 * @see #isAnnotationTypeVisible

-		 */

-		getAnnotationTypePriority: function(type) {

-			if (this._annotationTypes) { 

-				for (var i = 0; i < this._annotationTypes.length; i++) {

-					if (this._annotationTypes[i] === type) {

-						return i + 1;

-					}

-				}

-			}

-			return 0;

-		},

-		/**

-		 * Returns an array of annotations in the specified annotation model for the given range of text sorted by type.

-		 *

-		 * @param {orion.textview.AnnotationModel} annotationModel the annotation model.

-		 * @param {Number} start the start offset of the range.

-		 * @param {Number} end the end offset of the range.

-		 * @return {orion.textview.Annotation[]} an annotation array.

-		 */

-		getAnnotationsByType: function(annotationModel, start, end) {

-			var iter = annotationModel.getAnnotations(start, end);

-			var annotation, annotations = [];

-			while (iter.hasNext()) {

-				annotation = iter.next();

-				var priority = this.getAnnotationTypePriority(annotation.type);

-				if (priority === 0) { continue; }

-				annotations.push(annotation);

-			}

-			var self = this;

-			annotations.sort(function(a, b) {

-				return self.getAnnotationTypePriority(a.type) - self.getAnnotationTypePriority(b.type);

-			});

-			return annotations;

-		},

-		/**

-		 * Returns whether the receiver shows annotations of the specified type.

-		 *

-		 * @param {Object} type the annotation type 

-		 * @returns {Boolean} whether the specified annotation type is shown

-		 * 

-		 * @see #addAnnotationType

-		 * @see #removeAnnotationType

-		 */

-		isAnnotationTypeVisible: function(type) {

-			return this.getAnnotationTypePriority(type) !== 0;

-		},

-		/**

-		 * Removes an annotation type from the receiver.

-		 *

-		 * @param {Object} type the annotation type to be removed

-		 * 

-		 * @see #addAnnotationType

-		 * @see #isAnnotationTypeVisible

-		 */

-		removeAnnotationType: function(type) {

-			if (!this._annotationTypes) { return; }

-			for (var i = 0; i < this._annotationTypes.length; i++) {

-				if (this._annotationTypes[i] === type) {

-					this._annotationTypes.splice(i, 1);

-					break;

-				}

-			}

-		}

-	};

-	

-	/**

-	 * Constructs an annotation model.

-	 * 

-	 * @param {textModel} textModel The text model.

-	 * 

-	 * @class This object manages annotations for a <code>TextModel</code>.

-	 * <p>

-	 * <b>See:</b><br/>

-	 * {@link orion.textview.Annotation}<br/>

-	 * {@link orion.textview.TextModel}<br/> 

-	 * </p>	

-	 * @name orion.textview.AnnotationModel

-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener

-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener

-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent

-	 */

-	function AnnotationModel(textModel) {

-		this._annotations = [];

-		var self = this;

-		this._listener = {

-			onChanged: function(modelChangedEvent) {

-				self._onChanged(modelChangedEvent);

-			}

-		};

-		this.setTextModel(textModel);

-	}

-

-	AnnotationModel.prototype = /** @lends orion.textview.AnnotationModel.prototype */ {

-		/**

-		 * Adds an annotation to the annotation model. 

-		 * <p>The annotation model listeners are notified of this change.</p>

-		 * 

-		 * @param {orion.textview.Annotation} annotation the annotation to be added.

-		 * 

-		 * @see #removeAnnotation

-		 */

-		addAnnotation: function(annotation) {

-			if (!annotation) { return; }

-			var annotations = this._annotations;

-			var index = this._binarySearch(annotations, annotation.start);

-			annotations.splice(index, 0, annotation);

-			var e = {

-				type: "Changed", //$NON-NLS-0$

-				added: [annotation],

-				removed: [],

-				changed: []

-			};

-			this.onChanged(e);

-		},

-		/**

-		 * Returns the text model. 

-		 * 

-		 * @return {orion.textview.TextModel} The text model.

-		 * 

-		 * @see #setTextModel

-		 */

-		getTextModel: function() {

-			return this._model;

-		},

-		/**

-		 * @class This object represents an annotation iterator.

-		 * <p>

-		 * <b>See:</b><br/>

-		 * {@link orion.textview.AnnotationModel#getAnnotations}<br/>

-		 * </p>		 

-		 * @name orion.textview.AnnotationIterator

-		 * 

-		 * @property {Function} hasNext Determines whether there are more annotations in the iterator.

-		 * @property {Function} next Returns the next annotation in the iterator.

-		 */		

-		/**

-		 * Returns an iterator of annotations for the given range of text.

-		 *

-		 * @param {Number} start the start offset of the range.

-		 * @param {Number} end the end offset of the range.

-		 * @return {orion.textview.AnnotationIterator} an annotation iterartor.

-		 */

-		getAnnotations: function(start, end) {

-			var annotations = this._annotations, current;

-			//TODO binary search does not work for range intersection when there are overlaping ranges, need interval search tree for this

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: 
+ *		Felipe Heidrich (IBM Corporation) - initial API and implementation
+ *		Silenio Quarti (IBM Corporation) - initial API and implementation
+ ******************************************************************************/
+
+/*global define */
+
+define("orion/editor/annotations", ['i18n!orion/editor/nls/messages', 'orion/editor/eventTarget'], function(messages, mEventTarget) { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+	/**
+	 * @class This object represents a decoration attached to a range of text. Annotations are added to a
+	 * <code>AnnotationModel</code> which is attached to a <code>TextModel</code>.
+	 * <p>
+	 * <b>See:</b><br/>
+	 * {@link orion.editor.AnnotationModel}<br/>
+	 * {@link orion.editor.Ruler}<br/>
+	 * </p>		 
+	 * @name orion.editor.Annotation
+	 * 
+	 * @property {String} type The annotation type (for example, orion.annotation.error).
+	 * @property {Number} start The start offset of the annotation in the text model.
+	 * @property {Number} end The end offset of the annotation in the text model.
+	 * @property {String} html The HTML displayed for the annotation.
+	 * @property {String} title The text description for the annotation.
+	 * @property {orion.editor.Style} style The style information for the annotation used in the annotations ruler and tooltips.
+	 * @property {orion.editor.Style} overviewStyle The style information for the annotation used in the overview ruler.
+	 * @property {orion.editor.Style} rangeStyle The style information for the annotation used in the text view to decorate a range of text.
+	 * @property {orion.editor.Style} lineStyle The style information for the annotation used in the text view to decorate a line of text.
+	 */
+	/**
+	 * Constructs a new folding annotation.
+	 * 
+	 * @param {Number} start The start offset of the annotation in the text model.
+	 * @param {Number} end The end offset of the annotation in the text model.
+	 * @param {orion.editor.ProjectionTextModel} projectionModel The projection text model.
+	 * 
+	 * @class This object represents a folding annotation.
+	 * @name orion.editor.FoldingAnnotation
+	 */
+	function FoldingAnnotation (start, end, projectionModel) {
+		this.start = start;
+		this.end = end;
+		this._projectionModel = projectionModel;
+		this.html = this._expandedHTML;
+		this.style = this._expandedStyle;
+		this.expanded = true;
+	}
+	
+	FoldingAnnotation.prototype = /** @lends orion.editor.FoldingAnnotation.prototype */ {
+		_expandedHTML: "<div class='annotationHTML expanded'></div>", //$NON-NLS-0$
+		_expandedStyle: {styleClass: "annotation expanded"}, //$NON-NLS-0$
+		_collapsedHTML: "<div class='annotationHTML collapsed'></div>", //$NON-NLS-0$
+		_collapsedStyle: {styleClass: "annotation collapsed"}, //$NON-NLS-0$
+		/**
+		 * Collapses the annotation.
+		 */
+		collapse: function () {
+			if (!this.expanded) { return; }
+			this.expanded = false;
+			this.html = this._collapsedHTML;
+			this.style = this._collapsedStyle;
+			var projectionModel = this._projectionModel;
+			var baseModel = projectionModel.getBaseModel();
+			this._projection = {
+				start: baseModel.getLineStart(baseModel.getLineAtOffset(this.start) + 1),
+				end: baseModel.getLineEnd(baseModel.getLineAtOffset(this.end), true)
+			};
+			projectionModel.addProjection(this._projection);
+		},
+		/**
+		 * Expands the annotation.
+		 */
+		expand: function () {
+			if (this.expanded) { return; }
+			this.expanded = true;
+			this.html = this._expandedHTML;
+			this.style = this._expandedStyle;
+			this._projectionModel.removeProjection(this._projection);
+		}
+	};
+	 
+	/**
+	 * @class This object represents a regitry of annotation types.
+	 * @name orion.editor.AnnotationType
+	 */
+	function AnnotationType() {
+	}
+	
+	/**
+	 * Error annotation type.
+	 */
+	AnnotationType.ANNOTATION_ERROR = "orion.annotation.error"; //$NON-NLS-0$
+	/**
+	 * Warning annotation type.
+	 */
+	AnnotationType.ANNOTATION_WARNING = "orion.annotation.warning"; //$NON-NLS-0$
+	/**
+	 * Task annotation type.
+	 */
+	AnnotationType.ANNOTATION_TASK = "orion.annotation.task"; //$NON-NLS-0$
+	/**
+	 * Breakpoint annotation type.
+	 */
+	AnnotationType.ANNOTATION_BREAKPOINT = "orion.annotation.breakpoint"; //$NON-NLS-0$
+	/**
+	 * Bookmark annotation type.
+	 */
+	AnnotationType.ANNOTATION_BOOKMARK = "orion.annotation.bookmark"; //$NON-NLS-0$
+	/**
+	 * Folding annotation type.
+	 */
+	AnnotationType.ANNOTATION_FOLDING = "orion.annotation.folding"; //$NON-NLS-0$
+	/**
+	 * Curent bracket annotation type.
+	 */
+	AnnotationType.ANNOTATION_CURRENT_BRACKET = "orion.annotation.currentBracket"; //$NON-NLS-0$
+	/**
+	 * Matching bracket annotation type.
+	 */
+	AnnotationType.ANNOTATION_MATCHING_BRACKET = "orion.annotation.matchingBracket"; //$NON-NLS-0$
+	/**
+	 * Current line annotation type.
+	 */
+	AnnotationType.ANNOTATION_CURRENT_LINE = "orion.annotation.currentLine"; //$NON-NLS-0$
+	/**
+	 * Current search annotation type.
+	 */
+	AnnotationType.ANNOTATION_CURRENT_SEARCH = "orion.annotation.currentSearch"; //$NON-NLS-0$
+	/**
+	 * Matching search annotation type.
+	 */
+	AnnotationType.ANNOTATION_MATCHING_SEARCH = "orion.annotation.matchingSearch"; //$NON-NLS-0$
+	/**
+	 * Read Occurrence annotation type.
+	 */
+	AnnotationType.ANNOTATION_READ_OCCURRENCE = "orion.annotation.readOccurrence"; //$NON-NLS-0$
+	/**
+	 * Write Occurrence annotation type.
+	 */
+	AnnotationType.ANNOTATION_WRITE_OCCURRENCE = "orion.annotation.writeOccurrence"; //$NON-NLS-0$
+	
+	/** @private */
+	var annotationTypes = {};
+	
+	/**
+	 * Register an annotation type.
+	 *
+	 * @param {String} type The annotation type (for example, orion.annotation.error).
+	 * @param {Object|Function} properties The common annotation properties of the registered
+	 *		annotation type. All annotations create with this annotation type will expose these
+	 *		properties.
+	 */
+	AnnotationType.registerType = function(type, properties) {
+		var constructor = properties;
+		if (typeof constructor !== "function") { //$NON-NLS-0$
+			constructor = function(start, end, title) {
+				this.start = start;
+				this.end = end;
+				if (title) { this.title = title; }
+			};
+			constructor.prototype = properties;
+		}
+		constructor.prototype.type = type;
+		annotationTypes[type] = constructor;
+		return type;
+	};
+	
+	/**
+	 * Creates an annotation of a given type with the specified start end end offsets.
+	 *
+	 * @param {String} type The annotation type (for example, orion.annotation.error).
+	 * @param {Number} start The start offset of the annotation in the text model.
+	 * @param {Number} end The end offset of the annotation in the text model.
+	 * @param {String} [title] The text description for the annotation if different then the type description.
+	 * @return {orion.editor.Annotation} the new annotation
+	 */
+	AnnotationType.createAnnotation = function(type, start, end, title) {
+		return new (this.getType(type))(start, end, title);
+	};
+	
+	/**
+	 * Gets the registered annotation type with specified type. The returned
+	 * value is a constructor that can be used to create annotations of the
+	 * speficied type.  The constructor takes the start and end offsets of
+	 * the annotation.
+	 *
+	 * @param {String} type The annotation type (for example, orion.annotation.error).
+	 * @return {Function} The annotation type constructor ( i.e function(start, end, title) ).
+	 */
+	AnnotationType.getType = function(type) {
+		return annotationTypes[type];
+	};
+	
+	/** @private */
+	function registerType(type, lineStyling) {
+		var index = type.lastIndexOf('.'); //$NON-NLS-0$
+		var suffix = type.substring(index + 1);
+		var properties = {
+			title: messages[suffix],
+			style: {styleClass: "annotation " + suffix}, //$NON-NLS-0$
+			html: "<div class='annotationHTML " + suffix + "'></div>", //$NON-NLS-1$ //$NON-NLS-0$
+			overviewStyle: {styleClass: "annotationOverview " + suffix} //$NON-NLS-0$
+		};
+		if (lineStyling) {
+			properties.lineStyle = {styleClass: "annotationLine " + suffix}; //$NON-NLS-0$
+		} else {
+			properties.rangeStyle = {styleClass: "annotationRange " + suffix}; //$NON-NLS-0$
+		}
+		AnnotationType.registerType(type, properties);
+	}
+	registerType(AnnotationType.ANNOTATION_ERROR);
+	registerType(AnnotationType.ANNOTATION_WARNING);
+	registerType(AnnotationType.ANNOTATION_TASK);
+	registerType(AnnotationType.ANNOTATION_BREAKPOINT);
+	registerType(AnnotationType.ANNOTATION_BOOKMARK);
+	registerType(AnnotationType.ANNOTATION_CURRENT_BRACKET);
+	registerType(AnnotationType.ANNOTATION_MATCHING_BRACKET);
+	registerType(AnnotationType.ANNOTATION_CURRENT_SEARCH);
+	registerType(AnnotationType.ANNOTATION_MATCHING_SEARCH);
+	registerType(AnnotationType.ANNOTATION_READ_OCCURRENCE);
+	registerType(AnnotationType.ANNOTATION_WRITE_OCCURRENCE);
+	registerType(AnnotationType.ANNOTATION_CURRENT_LINE, true);
+	AnnotationType.registerType(AnnotationType.ANNOTATION_FOLDING, FoldingAnnotation);
+	
+	/** 
+	 * Constructs a new AnnotationTypeList object.
+	 * 
+	 * @class This represents an interface of prioritized annotation types.
+	 * @name orion.editor.AnnotationTypeList
+	 */
+	function AnnotationTypeList () {
+	}
+	/**
+	 * Adds in the annotation type interface into the specified object.
+	 *
+	 * @param {Object} object The object to add in the annotation type interface.
+	 */
+	AnnotationTypeList.addMixin = function(object) {
+		var proto = AnnotationTypeList.prototype;
+		for (var p in proto) {
+			if (proto.hasOwnProperty(p)) {
+				object[p] = proto[p];
+			}
+		}
+	};	
+	AnnotationTypeList.prototype = /** @lends orion.editor.AnnotationTypeList.prototype */ {
+		/**
+		 * Adds an annotation type to the receiver.
+		 * <p>
+		 * Only annotations of the specified types will be shown by
+		 * the receiver.
+		 * </p>
+		 *
+		 * @param {Object} type the annotation type to be shown
+		 * 
+		 * @see #removeAnnotationType
+		 * @see #isAnnotationTypeVisible
+		 */
+		addAnnotationType: function(type) {
+			if (!this._annotationTypes) { this._annotationTypes = []; }
+			this._annotationTypes.push(type);
+		},
+		/**
+		 * Gets the annotation type priority.  The priority is determined by the
+		 * order the annotation type is added to the receiver.  Annotation types
+		 * added first have higher priority.
+		 * <p>
+		 * Returns <code>0</code> if the annotation type is not added.
+		 * </p>
+		 *
+		 * @param {Object} type the annotation type
+		 * 
+		 * @see #addAnnotationType
+		 * @see #removeAnnotationType
+		 * @see #isAnnotationTypeVisible
+		 */
+		getAnnotationTypePriority: function(type) {
+			if (this._annotationTypes) { 
+				for (var i = 0; i < this._annotationTypes.length; i++) {
+					if (this._annotationTypes[i] === type) {
+						return i + 1;
+					}
+				}
+			}
+			return 0;
+		},
+		/**
+		 * Returns an array of annotations in the specified annotation model for the given range of text sorted by type.
+		 *
+		 * @param {orion.editor.AnnotationModel} annotationModel the annotation model.
+		 * @param {Number} start the start offset of the range.
+		 * @param {Number} end the end offset of the range.
+		 * @return {orion.editor.Annotation[]} an annotation array.
+		 */
+		getAnnotationsByType: function(annotationModel, start, end) {
+			var iter = annotationModel.getAnnotations(start, end);
+			var annotation, annotations = [];
+			while (iter.hasNext()) {
+				annotation = iter.next();
+				var priority = this.getAnnotationTypePriority(annotation.type);
+				if (priority === 0) { continue; }
+				annotations.push(annotation);
+			}
+			var self = this;
+			annotations.sort(function(a, b) {
+				return self.getAnnotationTypePriority(a.type) - self.getAnnotationTypePriority(b.type);
+			});
+			return annotations;
+		},
+		/**
+		 * Returns whether the receiver shows annotations of the specified type.
+		 *
+		 * @param {Object} type the annotation type 
+		 * @returns {Boolean} whether the specified annotation type is shown
+		 * 
+		 * @see #addAnnotationType
+		 * @see #removeAnnotationType
+		 */
+		isAnnotationTypeVisible: function(type) {
+			return this.getAnnotationTypePriority(type) !== 0;
+		},
+		/**
+		 * Removes an annotation type from the receiver.
+		 *
+		 * @param {Object} type the annotation type to be removed
+		 * 
+		 * @see #addAnnotationType
+		 * @see #isAnnotationTypeVisible
+		 */
+		removeAnnotationType: function(type) {
+			if (!this._annotationTypes) { return; }
+			for (var i = 0; i < this._annotationTypes.length; i++) {
+				if (this._annotationTypes[i] === type) {
+					this._annotationTypes.splice(i, 1);
+					break;
+				}
+			}
+		}
+	};
+	
+	/**
+	 * Constructs an annotation model.
+	 * 
+	 * @param {textModel} textModel The text model.
+	 * 
+	 * @class This object manages annotations for a <code>TextModel</code>.
+	 * <p>
+	 * <b>See:</b><br/>
+	 * {@link orion.editor.Annotation}<br/>
+	 * {@link orion.editor.TextModel}<br/> 
+	 * </p>	
+	 * @name orion.editor.AnnotationModel
+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener
+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener
+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
+	 */
+	function AnnotationModel(textModel) {
+		this._annotations = [];
+		var self = this;
+		this._listener = {
+			onChanged: function(modelChangedEvent) {
+				self._onChanged(modelChangedEvent);
+			}
+		};
+		this.setTextModel(textModel);
+	}
+
+	AnnotationModel.prototype = /** @lends orion.editor.AnnotationModel.prototype */ {
+		/**
+		 * Adds an annotation to the annotation model. 
+		 * <p>The annotation model listeners are notified of this change.</p>
+		 * 
+		 * @param {orion.editor.Annotation} annotation the annotation to be added.
+		 * 
+		 * @see #removeAnnotation
+		 */
+		addAnnotation: function(annotation) {
+			if (!annotation) { return; }
+			var annotations = this._annotations;
+			var index = this._binarySearch(annotations, annotation.start);
+			annotations.splice(index, 0, annotation);
+			var e = {
+				type: "Changed", //$NON-NLS-0$
+				added: [annotation],
+				removed: [],
+				changed: []
+			};
+			this.onChanged(e);
+		},
+		/**
+		 * Returns the text model. 
+		 * 
+		 * @return {orion.editor.TextModel} The text model.
+		 * 
+		 * @see #setTextModel
+		 */
+		getTextModel: function() {
+			return this._model;
+		},
+		/**
+		 * @class This object represents an annotation iterator.
+		 * <p>
+		 * <b>See:</b><br/>
+		 * {@link orion.editor.AnnotationModel#getAnnotations}<br/>
+		 * </p>		 
+		 * @name orion.editor.AnnotationIterator
+		 * 
+		 * @property {Function} hasNext Determines whether there are more annotations in the iterator.
+		 * @property {Function} next Returns the next annotation in the iterator.
+		 */		
+		/**
+		 * Returns an iterator of annotations for the given range of text.
+		 *
+		 * @param {Number} start the start offset of the range.
+		 * @param {Number} end the end offset of the range.
+		 * @return {orion.editor.AnnotationIterator} an annotation iterartor.
+		 */
+		getAnnotations: function(start, end) {
+			var annotations = this._annotations, current;
+			//TODO binary search does not work for range intersection when there are overlaping ranges, need interval search tree for this
 			var i = 0;
-			var skip = function() {

-				while (i < annotations.length) {

-					var a =  annotations[i++];

-					if ((start === a.start) || (start > a.start ? start < a.end : a.start < end)) {

-						return a;

-					}

-					if (a.start >= end) {

-						break;

-					}

-				}

-				return null;

-			};

-			current = skip();

-			return {

-				next: function() {

-					var result = current;

-					if (result) { current = skip(); }

-					return result;					

-				},

-				hasNext: function() {

-					return current !== null;

-				}

-			};

-		},

-		/**

-		 * Notifies the annotation model that the given annotation has been modified.

-		 * <p>The annotation model listeners are notified of this change.</p>

-		 * 

-		 * @param {orion.textview.Annotation} annotation the modified annotation.

-		 * 

-		 * @see #addAnnotation

-		 */

-		modifyAnnotation: function(annotation) {

-			if (!annotation) { return; }

-			var index = this._getAnnotationIndex(annotation);

-			if (index < 0) { return; }

-			var e = {

-				type: "Changed", //$NON-NLS-0$

-				added: [],

-				removed: [],

-				changed: [annotation]

-			};

-			this.onChanged(e);

-		},

-		/**

-		 * Notifies all listeners that the annotation model has changed.

-		 *

-		 * @param {orion.textview.Annotation[]} added The list of annotation being added to the model.

-		 * @param {orion.textview.Annotation[]} changed The list of annotation modified in the model.

-		 * @param {orion.textview.Annotation[]} removed The list of annotation being removed from the model.

-		 * @param {ModelChangedEvent} textModelChangedEvent the text model changed event that trigger this change, can be null if the change was trigger by a method call (for example, {@link #addAnnotation}).

-		 */

-		onChanged: function(e) {

-			return this.dispatchEvent(e);

-		},

-		/**

-		 * Removes all annotations of the given <code>type</code>. All annotations

-		 * are removed if the type is not specified. 

-		 * <p>The annotation model listeners are notified of this change.  Only one changed event is generated.</p>

-		 * 

-		 * @param {Object} type the type of annotations to be removed.

-		 * 

-		 * @see #removeAnnotation

-		 */

-		removeAnnotations: function(type) {

-			var annotations = this._annotations;

-			var removed, i; 

-			if (type) {

-				removed = [];

-				for (i = annotations.length - 1; i >= 0; i--) {

-					var annotation = annotations[i];

-					if (annotation.type === type) {

-						annotations.splice(i, 1);

-					}

-					removed.splice(0, 0, annotation);

-				}

-			} else {

-				removed = annotations;

-				annotations = [];

-			}

-			var e = {

-				type: "Changed", //$NON-NLS-0$

-				removed: removed,

-				added: [],

-				changed: []

-			};

-			this.onChanged(e);

-		},

-		/**

-		 * Removes an annotation from the annotation model. 

-		 * <p>The annotation model listeners are notified of this change.</p>

-		 * 

-		 * @param {orion.textview.Annotation} annotation the annotation to be removed.

-		 * 

-		 * @see #addAnnotation

-		 */

-		removeAnnotation: function(annotation) {

-			if (!annotation) { return; }

-			var index = this._getAnnotationIndex(annotation);

-			if (index < 0) { return; }

-			var e = {

-				type: "Changed", //$NON-NLS-0$

-				removed: this._annotations.splice(index, 1),

-				added: [],

-				changed: []

-			};

-			this.onChanged(e);

-		},

-		/**

-		 * Removes and adds the specifed annotations to the annotation model. 

-		 * <p>The annotation model listeners are notified of this change.  Only one changed event is generated.</p>

-		 * 

-		 * @param {orion.textview.Annotation} remove the annotations to be removed.

-		 * @param {orion.textview.Annotation} add the annotations to be added.

-		 * 

-		 * @see #addAnnotation

-		 * @see #removeAnnotation

-		 */

-		replaceAnnotations: function(remove, add) {

-			var annotations = this._annotations, i, index, annotation, removed = [];

-			if (remove) {

-				for (i = remove.length - 1; i >= 0; i--) {

-					annotation = remove[i];

-					index = this._getAnnotationIndex(annotation);

-					if (index < 0) { continue; }

-					annotations.splice(index, 1);

-					removed.splice(0, 0, annotation);

-				}

-			}

-			if (!add) { add = []; }

-			for (i = 0; i < add.length; i++) {

-				annotation = add[i];

-				index = this._binarySearch(annotations, annotation.start);

-				annotations.splice(index, 0, annotation);

-			}

-			var e = {

-				type: "Changed", //$NON-NLS-0$

-				removed: removed,

-				added: add,

-				changed: []

-			};

-			this.onChanged(e);

-		},

-		/**

-		 * Sets the text model of the annotation model.  The annotation

-		 * model listens for changes in the text model to update and remove

-		 * annotations that are affected by the change.

-		 * 

-		 * @param {orion.textview.TextModel} textModel the text model.

-		 * 

-		 * @see #getTextModel

-		 */

-		setTextModel: function(textModel) {

-			if (this._model) {

-				this._model.removeEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$

-			}

-			this._model = textModel;

-			if (this._model) {

-				this._model.addEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$

-			}

-		},

-		/** @ignore */

-		_binarySearch: function (array, offset) {

-			var high = array.length, low = -1, index;

-			while (high - low > 1) {

-				index = Math.floor((high + low) / 2);

-				if (offset <= array[index].start) {

-					high = index;

-				} else {

-					low = index;

-				}

-			}

-			return high;

-		},

-		/** @ignore */

-		_getAnnotationIndex: function(annotation) {

-			var annotations = this._annotations;

-			var index = this._binarySearch(annotations, annotation.start);

-			while (index < annotations.length && annotations[index].start === annotation.start) {

-				if (annotations[index] === annotation) {

-					return index;

-				}

-				index++;

-			}

-			return -1;

-		},

-		/** @ignore */

-		_onChanged: function(modelChangedEvent) {

-			var start = modelChangedEvent.start;

-			var addedCharCount = modelChangedEvent.addedCharCount;

-			var removedCharCount = modelChangedEvent.removedCharCount;

-			var annotations = this._annotations, end = start + removedCharCount;

-			//TODO binary search does not work for range intersection when there are overlaping ranges, need interval search tree for this

-			var startIndex = 0;

-			if (!(0 <= startIndex && startIndex < annotations.length)) { return; }

-			var e = {

-				type: "Changed", //$NON-NLS-0$

-				added: [],

-				removed: [],

-				changed: [],

-				textModelChangedEvent: modelChangedEvent

-			};

-			var changeCount = addedCharCount - removedCharCount, i;

-			for (i = startIndex; i < annotations.length; i++) {

-				var annotation = annotations[i];

-				if (annotation.start >= end) {

-					annotation.start += changeCount;

-					annotation.end += changeCount;

-					e.changed.push(annotation);

-				} else if (annotation.end <= start) {

-					//nothing

-				} else if (annotation.start < start && end < annotation.end) {

-					annotation.end += changeCount;

-					e.changed.push(annotation);

-				} else {

-					annotations.splice(i, 1);

-					e.removed.push(annotation);

-					i--;

-				}

-			}

-			if (e.added.length > 0 || e.removed.length > 0 || e.changed.length > 0) {

-				this.onChanged(e);

-			}

-		}

-	};

-	mEventTarget.EventTarget.addMixin(AnnotationModel.prototype);

-

-	/**

-	 * Constructs a new styler for annotations.

-	 * 

-	 * @param {orion.textview.TextView} view The styler view.

-	 * @param {orion.textview.AnnotationModel} view The styler annotation model.

-	 * 

-	 * @class This object represents a styler for annotation attached to a text view.

-	 * @name orion.textview.AnnotationStyler

-	 * @borrows orion.textview.AnnotationTypeList#addAnnotationType as #addAnnotationType

-	 * @borrows orion.textview.AnnotationTypeList#getAnnotationTypePriority as #getAnnotationTypePriority

-	 * @borrows orion.textview.AnnotationTypeList#getAnnotationsByType as #getAnnotationsByType

-	 * @borrows orion.textview.AnnotationTypeList#isAnnotationTypeVisible as #isAnnotationTypeVisible

-	 * @borrows orion.textview.AnnotationTypeList#removeAnnotationType as #removeAnnotationType

-	 */

-	function AnnotationStyler (view, annotationModel) {

-		this._view = view;

-		this._annotationModel = annotationModel;

-		var self = this;

-		this._listener = {

-			onDestroy: function(e) {

-				self._onDestroy(e);

-			},

-			onLineStyle: function(e) {

-				self._onLineStyle(e);

-			},

-			onChanged: function(e) {

-				self._onAnnotationModelChanged(e);

-			}

-		};

-		view.addEventListener("Destroy", this._listener.onDestroy); //$NON-NLS-0$

-		view.addEventListener("postLineStyle", this._listener.onLineStyle); //$NON-NLS-0$

-		annotationModel.addEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$

-	}

-	AnnotationStyler.prototype = /** @lends orion.textview.AnnotationStyler.prototype */ {

-		/**

-		 * Destroys the styler. 

-		 * <p>

-		 * Removes all listeners added by this styler.

-		 * </p>

-		 */

-		destroy: function() {

-			var view = this._view;

-			if (view) {

-				view.removeEventListener("Destroy", this._listener.onDestroy); //$NON-NLS-0$

-				view.removeEventListener("LineStyle", this._listener.onLineStyle); //$NON-NLS-0$

-				this.view = null;

-			}

-			var annotationModel = this._annotationModel;

-			if (annotationModel) {

-				annotationModel.removeEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$

-				annotationModel = null;

-			}

-		},

-		_mergeStyle: function(result, style) {

-			if (style) {

-				if (!result) { result = {}; }

-				if (result.styleClass && style.styleClass && result.styleClass !== style.styleClass) {

-					result.styleClass += " " + style.styleClass; //$NON-NLS-0$

-				} else {

-					result.styleClass = style.styleClass;

-				}

-				var prop;

-				if (style.style) {

-					if (!result.style) { result.style  = {}; }

-					for (prop in style.style) {

-						if (!result.style[prop]) {

-							result.style[prop] = style.style[prop];

-						}

-					}

-				}

-				if (style.attributes) {

-					if (!result.attributes) { result.attributes  = {}; }

-					for (prop in style.attributes) {

-						if (!result.attributes[prop]) {

-							result.attributes[prop] = style.attributes[prop];

-						}

-					}

-				}

-			}

-			return result;

-		},

-		_mergeStyleRanges: function(ranges, styleRange) {

-			if (!ranges) {

-				ranges = [];

-			}

-			var mergedStyle, i;

-			for (i=0; i<ranges.length && styleRange; i++) {

-				var range = ranges[i];

-				if (styleRange.end <= range.start) { break; }

-				if (styleRange.start >= range.end) { continue; }

-				mergedStyle = this._mergeStyle({}, range.style);

-				mergedStyle = this._mergeStyle(mergedStyle, styleRange.style);

-				var args = [];

-				args.push(i, 1);

-				if (styleRange.start < range.start) {

-					args.push({start: styleRange.start, end: range.start, style: styleRange.style});

-				}

-				if (styleRange.start > range.start) {

-					args.push({start: range.start, end: styleRange.start, style: range.style});

-				}

-				args.push({start: Math.max(range.start, styleRange.start), end: Math.min(range.end, styleRange.end), style: mergedStyle});

-				if (styleRange.end < range.end) {

-					args.push({start: styleRange.end, end: range.end, style: range.style});

-				}

-				if (styleRange.end > range.end) {

-					styleRange = {start: range.end, end: styleRange.end, style: styleRange.style};

-				} else {

-					styleRange = null;

-				}

-				Array.prototype.splice.apply(ranges, args);

-			}

-			if (styleRange) {

-				mergedStyle = this._mergeStyle({}, styleRange.style);

-				ranges.splice(i, 0, {start: styleRange.start, end: styleRange.end, style: mergedStyle});

-			}

-			return ranges;

-		},

-		_onAnnotationModelChanged: function(e) {

-			if (e.textModelChangedEvent) {

-				return;

-			}

-			var view = this._view;

-			if (!view) { return; }

-			var self = this;

-			var model = view.getModel();

-			function redraw(changes) {

-				for (var i = 0; i < changes.length; i++) {

-					if (!self.isAnnotationTypeVisible(changes[i].type)) { continue; }

-					var start = changes[i].start;

-					var end = changes[i].end;

-					if (model.getBaseModel) {

-						start = model.mapOffset(start, true);

-						end = model.mapOffset(end, true);

-					}

-					if (start !== -1 && end !== -1) {

-						view.redrawRange(start, end);

-					}

-				}

-			}

-			redraw(e.added);

-			redraw(e.removed);

-			redraw(e.changed);

-		},

-		_onDestroy: function(e) {

-			this.destroy();

-		},

-		_onLineStyle: function (e) {

-			var annotationModel = this._annotationModel;

-			var viewModel = e.textView.getModel();

-			var baseModel = annotationModel.getTextModel();

-			var start = e.lineStart;

-			var end = e.lineStart + e.lineText.length;

-			if (baseModel !== viewModel) {

-				start = viewModel.mapOffset(start);

-				end = viewModel.mapOffset(end);

-			}

-			var annotations = annotationModel.getAnnotations(start, end);

-			while (annotations.hasNext()) {

-				var annotation = annotations.next();

-				if (!this.isAnnotationTypeVisible(annotation.type)) { continue; }

-				if (annotation.rangeStyle) {

-					var annotationStart = annotation.start;

-					var annotationEnd = annotation.end;

-					if (baseModel !== viewModel) {

-						annotationStart = viewModel.mapOffset(annotationStart, true);

-						annotationEnd = viewModel.mapOffset(annotationEnd, true);

-					}

-					e.ranges = this._mergeStyleRanges(e.ranges, {start: annotationStart, end: annotationEnd, style: annotation.rangeStyle});

-				}

-				if (annotation.lineStyle) {

-					e.style = this._mergeStyle({}, e.style);

-					e.style = this._mergeStyle(e.style, annotation.lineStyle);

-				}

-			}

-		}

-	};

-	AnnotationTypeList.addMixin(AnnotationStyler.prototype);

-	

-	return {

-		FoldingAnnotation: FoldingAnnotation,

-		AnnotationType: AnnotationType,

-		AnnotationTypeList: AnnotationTypeList,

-		AnnotationModel: AnnotationModel,

-		AnnotationStyler: AnnotationStyler

-	};

-});

+			var skip = function() {
+				while (i < annotations.length) {
+					var a =  annotations[i++];
+					if ((start === a.start) || (start > a.start ? start < a.end : a.start < end)) {
+						return a;
+					}
+					if (a.start >= end) {
+						break;
+					}
+				}
+				return null;
+			};
+			current = skip();
+			return {
+				next: function() {
+					var result = current;
+					if (result) { current = skip(); }
+					return result;					
+				},
+				hasNext: function() {
+					return current !== null;
+				}
+			};
+		},
+		/**
+		 * Notifies the annotation model that the given annotation has been modified.
+		 * <p>The annotation model listeners are notified of this change.</p>
+		 * 
+		 * @param {orion.editor.Annotation} annotation the modified annotation.
+		 * 
+		 * @see #addAnnotation
+		 */
+		modifyAnnotation: function(annotation) {
+			if (!annotation) { return; }
+			var index = this._getAnnotationIndex(annotation);
+			if (index < 0) { return; }
+			var e = {
+				type: "Changed", //$NON-NLS-0$
+				added: [],
+				removed: [],
+				changed: [annotation]
+			};
+			this.onChanged(e);
+		},
+		/**
+		 * Notifies all listeners that the annotation model has changed.
+		 *
+		 * @param {orion.editor.Annotation[]} added The list of annotation being added to the model.
+		 * @param {orion.editor.Annotation[]} changed The list of annotation modified in the model.
+		 * @param {orion.editor.Annotation[]} removed The list of annotation being removed from the model.
+		 * @param {ModelChangedEvent} textModelChangedEvent the text model changed event that trigger this change, can be null if the change was trigger by a method call (for example, {@link #addAnnotation}).
+		 */
+		onChanged: function(e) {
+			return this.dispatchEvent(e);
+		},
+		/**
+		 * Removes all annotations of the given <code>type</code>. All annotations
+		 * are removed if the type is not specified. 
+		 * <p>The annotation model listeners are notified of this change.  Only one changed event is generated.</p>
+		 * 
+		 * @param {Object} type the type of annotations to be removed.
+		 * 
+		 * @see #removeAnnotation
+		 */
+		removeAnnotations: function(type) {
+			var annotations = this._annotations;
+			var removed, i; 
+			if (type) {
+				removed = [];
+				for (i = annotations.length - 1; i >= 0; i--) {
+					var annotation = annotations[i];
+					if (annotation.type === type) {
+						annotations.splice(i, 1);
+					}
+					removed.splice(0, 0, annotation);
+				}
+			} else {
+				removed = annotations;
+				annotations = [];
+			}
+			var e = {
+				type: "Changed", //$NON-NLS-0$
+				removed: removed,
+				added: [],
+				changed: []
+			};
+			this.onChanged(e);
+		},
+		/**
+		 * Removes an annotation from the annotation model. 
+		 * <p>The annotation model listeners are notified of this change.</p>
+		 * 
+		 * @param {orion.editor.Annotation} annotation the annotation to be removed.
+		 * 
+		 * @see #addAnnotation
+		 */
+		removeAnnotation: function(annotation) {
+			if (!annotation) { return; }
+			var index = this._getAnnotationIndex(annotation);
+			if (index < 0) { return; }
+			var e = {
+				type: "Changed", //$NON-NLS-0$
+				removed: this._annotations.splice(index, 1),
+				added: [],
+				changed: []
+			};
+			this.onChanged(e);
+		},
+		/**
+		 * Removes and adds the specifed annotations to the annotation model. 
+		 * <p>The annotation model listeners are notified of this change.  Only one changed event is generated.</p>
+		 * 
+		 * @param {orion.editor.Annotation} remove the annotations to be removed.
+		 * @param {orion.editor.Annotation} add the annotations to be added.
+		 * 
+		 * @see #addAnnotation
+		 * @see #removeAnnotation
+		 */
+		replaceAnnotations: function(remove, add) {
+			var annotations = this._annotations, i, index, annotation, removed = [];
+			if (remove) {
+				for (i = remove.length - 1; i >= 0; i--) {
+					annotation = remove[i];
+					index = this._getAnnotationIndex(annotation);
+					if (index < 0) { continue; }
+					annotations.splice(index, 1);
+					removed.splice(0, 0, annotation);
+				}
+			}
+			if (!add) { add = []; }
+			for (i = 0; i < add.length; i++) {
+				annotation = add[i];
+				index = this._binarySearch(annotations, annotation.start);
+				annotations.splice(index, 0, annotation);
+			}
+			var e = {
+				type: "Changed", //$NON-NLS-0$
+				removed: removed,
+				added: add,
+				changed: []
+			};
+			this.onChanged(e);
+		},
+		/**
+		 * Sets the text model of the annotation model.  The annotation
+		 * model listens for changes in the text model to update and remove
+		 * annotations that are affected by the change.
+		 * 
+		 * @param {orion.editor.TextModel} textModel the text model.
+		 * 
+		 * @see #getTextModel
+		 */
+		setTextModel: function(textModel) {
+			if (this._model) {
+				this._model.removeEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$
+			}
+			this._model = textModel;
+			if (this._model) {
+				this._model.addEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$
+			}
+		},
+		/** @ignore */
+		_binarySearch: function (array, offset) {
+			var high = array.length, low = -1, index;
+			while (high - low > 1) {
+				index = Math.floor((high + low) / 2);
+				if (offset <= array[index].start) {
+					high = index;
+				} else {
+					low = index;
+				}
+			}
+			return high;
+		},
+		/** @ignore */
+		_getAnnotationIndex: function(annotation) {
+			var annotations = this._annotations;
+			var index = this._binarySearch(annotations, annotation.start);
+			while (index < annotations.length && annotations[index].start === annotation.start) {
+				if (annotations[index] === annotation) {
+					return index;
+				}
+				index++;
+			}
+			return -1;
+		},
+		/** @ignore */
+		_onChanged: function(modelChangedEvent) {
+			var start = modelChangedEvent.start;
+			var addedCharCount = modelChangedEvent.addedCharCount;
+			var removedCharCount = modelChangedEvent.removedCharCount;
+			var annotations = this._annotations, end = start + removedCharCount;
+			//TODO binary search does not work for range intersection when there are overlaping ranges, need interval search tree for this
+			var startIndex = 0;
+			if (!(0 <= startIndex && startIndex < annotations.length)) { return; }
+			var e = {
+				type: "Changed", //$NON-NLS-0$
+				added: [],
+				removed: [],
+				changed: [],
+				textModelChangedEvent: modelChangedEvent
+			};
+			var changeCount = addedCharCount - removedCharCount, i;
+			for (i = startIndex; i < annotations.length; i++) {
+				var annotation = annotations[i];
+				if (annotation.start >= end) {
+					annotation.start += changeCount;
+					annotation.end += changeCount;
+					e.changed.push(annotation);
+				} else if (annotation.end <= start) {
+					//nothing
+				} else if (annotation.start < start && end < annotation.end) {
+					annotation.end += changeCount;
+					e.changed.push(annotation);
+				} else {
+					annotations.splice(i, 1);
+					e.removed.push(annotation);
+					i--;
+				}
+			}
+			if (e.added.length > 0 || e.removed.length > 0 || e.changed.length > 0) {
+				this.onChanged(e);
+			}
+		}
+	};
+	mEventTarget.EventTarget.addMixin(AnnotationModel.prototype);
+
+	/**
+	 * Constructs a new styler for annotations.
+	 * 
+	 * @param {orion.editor.TextView} view The styler view.
+	 * @param {orion.editor.AnnotationModel} view The styler annotation model.
+	 * 
+	 * @class This object represents a styler for annotation attached to a text view.
+	 * @name orion.editor.AnnotationStyler
+	 * @borrows orion.editor.AnnotationTypeList#addAnnotationType as #addAnnotationType
+	 * @borrows orion.editor.AnnotationTypeList#getAnnotationTypePriority as #getAnnotationTypePriority
+	 * @borrows orion.editor.AnnotationTypeList#getAnnotationsByType as #getAnnotationsByType
+	 * @borrows orion.editor.AnnotationTypeList#isAnnotationTypeVisible as #isAnnotationTypeVisible
+	 * @borrows orion.editor.AnnotationTypeList#removeAnnotationType as #removeAnnotationType
+	 */
+	function AnnotationStyler (view, annotationModel) {
+		this._view = view;
+		this._annotationModel = annotationModel;
+		var self = this;
+		this._listener = {
+			onDestroy: function(e) {
+				self._onDestroy(e);
+			},
+			onLineStyle: function(e) {
+				self._onLineStyle(e);
+			},
+			onChanged: function(e) {
+				self._onAnnotationModelChanged(e);
+			}
+		};
+		view.addEventListener("Destroy", this._listener.onDestroy); //$NON-NLS-0$
+		view.addEventListener("postLineStyle", this._listener.onLineStyle); //$NON-NLS-0$
+		annotationModel.addEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$
+	}
+	AnnotationStyler.prototype = /** @lends orion.editor.AnnotationStyler.prototype */ {
+		/**
+		 * Destroys the styler. 
+		 * <p>
+		 * Removes all listeners added by this styler.
+		 * </p>
+		 */
+		destroy: function() {
+			var view = this._view;
+			if (view) {
+				view.removeEventListener("Destroy", this._listener.onDestroy); //$NON-NLS-0$
+				view.removeEventListener("LineStyle", this._listener.onLineStyle); //$NON-NLS-0$
+				this.view = null;
+			}
+			var annotationModel = this._annotationModel;
+			if (annotationModel) {
+				annotationModel.removeEventListener("Changed", this._listener.onChanged); //$NON-NLS-0$
+				annotationModel = null;
+			}
+		},
+		_mergeStyle: function(result, style) {
+			if (style) {
+				if (!result) { result = {}; }
+				if (result.styleClass && style.styleClass && result.styleClass !== style.styleClass) {
+					result.styleClass += " " + style.styleClass; //$NON-NLS-0$
+				} else {
+					result.styleClass = style.styleClass;
+				}
+				var prop;
+				if (style.style) {
+					if (!result.style) { result.style  = {}; }
+					for (prop in style.style) {
+						if (!result.style[prop]) {
+							result.style[prop] = style.style[prop];
+						}
+					}
+				}
+				if (style.attributes) {
+					if (!result.attributes) { result.attributes  = {}; }
+					for (prop in style.attributes) {
+						if (!result.attributes[prop]) {
+							result.attributes[prop] = style.attributes[prop];
+						}
+					}
+				}
+			}
+			return result;
+		},
+		_mergeStyleRanges: function(ranges, styleRange) {
+			if (!ranges) {
+				ranges = [];
+			}
+			var mergedStyle, i;
+			for (i=0; i<ranges.length && styleRange; i++) {
+				var range = ranges[i];
+				if (styleRange.end <= range.start) { break; }
+				if (styleRange.start >= range.end) { continue; }
+				mergedStyle = this._mergeStyle({}, range.style);
+				mergedStyle = this._mergeStyle(mergedStyle, styleRange.style);
+				var args = [];
+				args.push(i, 1);
+				if (styleRange.start < range.start) {
+					args.push({start: styleRange.start, end: range.start, style: styleRange.style});
+				}
+				if (styleRange.start > range.start) {
+					args.push({start: range.start, end: styleRange.start, style: range.style});
+				}
+				args.push({start: Math.max(range.start, styleRange.start), end: Math.min(range.end, styleRange.end), style: mergedStyle});
+				if (styleRange.end < range.end) {
+					args.push({start: styleRange.end, end: range.end, style: range.style});
+				}
+				if (styleRange.end > range.end) {
+					styleRange = {start: range.end, end: styleRange.end, style: styleRange.style};
+				} else {
+					styleRange = null;
+				}
+				Array.prototype.splice.apply(ranges, args);
+			}
+			if (styleRange) {
+				mergedStyle = this._mergeStyle({}, styleRange.style);
+				ranges.splice(i, 0, {start: styleRange.start, end: styleRange.end, style: mergedStyle});
+			}
+			return ranges;
+		},
+		_onAnnotationModelChanged: function(e) {
+			if (e.textModelChangedEvent) {
+				return;
+			}
+			var view = this._view;
+			if (!view) { return; }
+			var self = this;
+			var model = view.getModel();
+			function redraw(changes) {
+				for (var i = 0; i < changes.length; i++) {
+					if (!self.isAnnotationTypeVisible(changes[i].type)) { continue; }
+					var start = changes[i].start;
+					var end = changes[i].end;
+					if (model.getBaseModel) {
+						start = model.mapOffset(start, true);
+						end = model.mapOffset(end, true);
+					}
+					if (start !== -1 && end !== -1) {
+						view.redrawRange(start, end);
+					}
+				}
+			}
+			redraw(e.added);
+			redraw(e.removed);
+			redraw(e.changed);
+		},
+		_onDestroy: function(e) {
+			this.destroy();
+		},
+		_onLineStyle: function (e) {
+			var annotationModel = this._annotationModel;
+			var viewModel = e.textView.getModel();
+			var baseModel = annotationModel.getTextModel();
+			var start = e.lineStart;
+			var end = e.lineStart + e.lineText.length;
+			if (baseModel !== viewModel) {
+				start = viewModel.mapOffset(start);
+				end = viewModel.mapOffset(end);
+			}
+			var annotations = annotationModel.getAnnotations(start, end);
+			while (annotations.hasNext()) {
+				var annotation = annotations.next();
+				if (!this.isAnnotationTypeVisible(annotation.type)) { continue; }
+				if (annotation.rangeStyle) {
+					var annotationStart = annotation.start;
+					var annotationEnd = annotation.end;
+					if (baseModel !== viewModel) {
+						annotationStart = viewModel.mapOffset(annotationStart, true);
+						annotationEnd = viewModel.mapOffset(annotationEnd, true);
+					}
+					e.ranges = this._mergeStyleRanges(e.ranges, {start: annotationStart, end: annotationEnd, style: annotation.rangeStyle});
+				}
+				if (annotation.lineStyle) {
+					e.style = this._mergeStyle({}, e.style);
+					e.style = this._mergeStyle(e.style, annotation.lineStyle);
+				}
+			}
+		}
+	};
+	AnnotationTypeList.addMixin(AnnotationStyler.prototype);
+	
+	return {
+		FoldingAnnotation: FoldingAnnotation,
+		AnnotationType: AnnotationType,
+		AnnotationTypeList: AnnotationTypeList,
+		AnnotationModel: AnnotationModel,
+		AnnotationStyler: AnnotationStyler
+	};
+});
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
index b126028..ad627dd 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/contentAssist.js
@@ -12,7 +12,7 @@
 /*global define */

 /*jslint maxerr:150 browser:true devel:true */

 

-define("orion/editor/contentAssist", ['i18n!orion/editor/nls/messages', 'orion/textview/keyBinding', 'orion/textview/eventTarget', 'orion/editor/Deferred', 'orion/textview/util'], function(messages, mKeyBinding, mEventTarget, Deferred, util) {

+define("orion/editor/contentAssist", ['i18n!orion/editor/nls/messages', 'orion/editor/keyBinding', 'orion/editor/eventTarget', 'orion/editor/Deferred', 'orion/editor/util'], function(messages, mKeyBinding, mEventTarget, Deferred, util) {

 	/**

 	 * @name orion.editor.ContentAssistProvider

 	 * @class Interface defining a provider of content assist proposals.

@@ -30,7 +30,7 @@
 	 * @class

 	 * @property {String} line The text of the line on which content assist is being requested.

 	 * @property {String} prefix Any non-whitespace, non-symbol characters preceding the offset.

-	 * @property {orion.textview.Selection} selection The current selection.

+	 * @property {orion.editor.Selection} selection The current selection.

 	 */

 

 	/**

@@ -45,10 +45,10 @@
 	 * {@link #apply}, after which the ContentAssist becomes deactivated. An active ContentAssist may be deactivated

 	 * by calling {@link #deactivate}.<p>

 	 * A ContentAssist dispatches events when it becomes activated or deactivated, and when proposals have been computed.

-	 * @param {orion.textview.TextView} textView The TextView to provide content assist for.

-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener

-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener

-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent

+	 * @param {orion.editor.TextView} textView The TextView to provide content assist for.

+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener

+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener

+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent

 	 */

 	/**

 	 * Dispatched when a ContentAssist is about to be activated.

@@ -149,7 +149,7 @@
 		deactivate: function() {

 			this.setState(State.INACTIVE);

 		},

-		/** @returns {orion.textview.TextView} */

+		/** @returns {orion.editor.TextView} */

 		getTextView: function() {

 			return this.textView;

 		},

@@ -158,7 +158,7 @@
 			return this.state === State.ACTIVE || this.state === State.FILTERING;

 		},

 		/** @returns {Boolean} <code>true</code> if the event describes a change that should deactivate content assist. */

-		isDeactivatingChange: function(/**orion.textview.ModelChangingEvent*/ event) {

+		isDeactivatingChange: function(/**orion.editor.ModelChangingEvent*/ event) {

 			var deletion = event.removedCharCount > 0 && event.addedCharCount === 0,

 			    view = this.textView,

 			    overWhitespace = (event.start+1 <= view.getModel().getCharCount()) && /^\s*$/.test(view.getText(event.start, event.start+1));

diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.css b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.css
index bfd39f4..5bb1543 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.css
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.css
@@ -1,8 +1,8 @@
-@import "../../orion/textview/textview.css";

-@import "../../orion/textview/rulers.css";

-@import "../../orion/textview/annotations.css";

-@import "../../orion/textview/tooltip.css";

+@import "../../orion/editor/textview.css";

+@import "../../orion/editor/rulers.css";

+@import "../../orion/editor/annotations.css";

+@import "../../orion/editor/tooltip.css";

 

-@import "../../examples/textview/textstyler.css";

+@import "../../examples/editor/textstyler.css";

 @import "../../examples/editor/htmlStyles.css";

 @import "../../orion/editor/default-theme.css";
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
index e5f1d2a..4e1a2a3 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editor.js
@@ -12,14 +12,14 @@
  /*global define*/
  /*jslint maxerr:150 browser:true devel:true laxbreak:true regexp:false*/
 
-define("orion/editor/editor", ['i18n!orion/editor/nls/messages', 'orion/textview/keyBinding', 'orion/textview/eventTarget', 'orion/textview/tooltip', 'orion/textview/annotations', 'orion/textview/util'], function(messages, mKeyBinding, mEventTarget, mTooltip, mAnnotations, util) { //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/editor", ['i18n!orion/editor/nls/messages', 'orion/editor/keyBinding', 'orion/editor/eventTarget', 'orion/editor/tooltip', 'orion/editor/annotations', 'orion/editor/util'], function(messages, mKeyBinding, mEventTarget, mTooltip, mAnnotations, util) { //$NON-NLS-6$ //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 	var Animation;
 	
 	var HIGHLIGHT_ERROR_ANNOTATION = "orion.annotation.highlightError"; //$NON-NLS-0$
 
 	/**
 	 * @name orion.editor.Editor
-	 * @class An <code>Editor</code> is a user interface for editing text that provides additional features over the basic {@link orion.textview.TextView}.
+	 * @class An <code>Editor</code> is a user interface for editing text that provides additional features over the basic {@link orion.editor.TextView}.
 	 * Some of <code>Editor</code>'s features include:
 	 * <ul>
 	 * <li>Additional actions and key bindings for editing text</li>
@@ -42,9 +42,9 @@
 	 * @param {Object} options.undoStackFactory
 	 * @param {Object} options.textDNDFactory
 	 *
-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener
-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener
-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent
+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener
+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener
+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
 	 */
 	function Editor(options) {
 		this._textViewFactory = options.textViewFactory;
@@ -83,7 +83,7 @@
 		/**
 		 * Returns the annotation model of the editor. 
 		 *
-		 * @returns {orion.textview.AnnotationModel}
+		 * @returns {orion.editor.AnnotationModel}
 		 */
 		getAnnotationModel: function() {
 			return this._annotationModel;
@@ -91,7 +91,7 @@
 		/**
 		 * Returns the annotation ruler of the editor. 
 		 *
-		 * @returns {orion.textview.AnnotationRuler}
+		 * @returns {orion.editor.AnnotationRuler}
 		 */
 		getAnnotationRuler: function() {
 			return this._annotationRuler;
@@ -99,7 +99,7 @@
 		/**
 		 * Returns the annotation styler of the editor. 
 		 *
-		 * @returns {orion.textview.AnnotationStyler}
+		 * @returns {orion.editor.AnnotationStyler}
 		 */
 		getAnnotationStyler: function() {
 			return this._annotationStyler;
@@ -107,7 +107,7 @@
 		/**
 		 * Returns the folding ruler of the editor. 
 		 *
-		 * @returns {orion.textview.FoldingRuler}
+		 * @returns {orion.editor.FoldingRuler}
 		 */
 		getFoldingRuler: function() {
 			return this._foldingRuler;
@@ -115,7 +115,7 @@
 		/**
 		 * Returns the line number ruler of the editor. 
 		 *
-		 * @returns {orion.textview.LineNumberRuler}
+		 * @returns {orion.editor.LineNumberRuler}
 		 */
 		getLineNumberRuler: function() {
 			return this._lineNumberRuler;
@@ -123,7 +123,7 @@
 		/**
 		 * Returns the base text model of this editor.
 		 *
-		 * @returns orion.textview.TextModel
+		 * @returns orion.editor.TextModel
 		 */
 		getModel: function() {
 			var model = this._textView.getModel();
@@ -135,14 +135,14 @@
 		/**
 		 * Returns the overview ruler of the editor. 
 		 *
-		 * @returns {orion.textview.OverviewRuler}
+		 * @returns {orion.editor.OverviewRuler}
 		 */
 		getOverviewRuler: function() {
 			return this._overviewRuler;
 		},
 		/**
 		 * Returns the underlying <code>TextView</code> used by this editor. 
-		 * @returns orion.textview.TextView the editor text view.
+		 * @returns orion.editor.TextView the editor text view.
 		 */
 		getTextView: function() {
 			return this._textView;
@@ -343,7 +343,7 @@
 		},
 				
 		/**
-		 * @param {orion.textview.TextView} textView
+		 * @param {orion.editor.TextView} textView
 		 * @param {Number} start
 		 * @param {Number} [end]
 		 * @param {function} callBack A call back function that is used after the move animation is done
@@ -603,6 +603,8 @@
 						styler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_MATCHING_BRACKET);
 						styler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_CURRENT_BRACKET);
 						styler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_CURRENT_LINE);
+						styler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_READ_OCCURRENCE);
+						styler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_WRITE_OCCURRENCE);
 						styler.addAnnotationType(HIGHLIGHT_ERROR_ANNOTATION);
 					}
 				}
@@ -659,6 +661,8 @@
 					ruler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_MATCHING_BRACKET);
 					ruler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_CURRENT_BRACKET);
 					ruler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_CURRENT_LINE);
+					ruler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_READ_OCCURRENCE);
+					ruler.addAnnotationType(mAnnotations.AnnotationType.ANNOTATION_WRITE_OCCURRENCE);
 				}
 				this.setOverviewRulerVisible(true);
 			}
@@ -755,6 +759,38 @@
 			annotationModel.replaceAnnotations(remove, add);
 		},
 		
+		showOccurrences: function(occurrences) {
+			var annotationModel = this._annotationModel;
+			if (!annotationModel) {
+				return;
+			}
+			var remove = [], add = [];
+			var model = annotationModel.getTextModel();
+			var annotations = annotationModel.getAnnotations(0, model.getCharCount()), annotation;
+			while (annotations.hasNext()) {
+				annotation = annotations.next();
+				if (annotation.type === mAnnotations.AnnotationType.ANNOTATION_READ_OCCURRENCE || annotation.type === mAnnotations.AnnotationType.ANNOTATION_WRITE_OCCURRENCE) {
+					remove.push(annotation);
+				}
+			}
+			if (occurrences) { 
+				for (var i = 0; i < occurrences.length; i++) {
+					var occurrence = occurrences[i];
+					if (occurrence) {
+						var lineIndex = occurrence.line - 1;
+						var lineStart = model.getLineStart(lineIndex);
+						var start = lineStart + occurrence.start - 1;
+						var end = lineStart + occurrence.end;
+						var type = occurrence.readAccess === true ? mAnnotations.AnnotationType.ANNOTATION_READ_OCCURRENCE : mAnnotations.AnnotationType.ANNOTATION_WRITE_OCCURRENCE;
+						var description = occurrence.description;
+						annotation = mAnnotations.AnnotationType.createAnnotation(type, start, end, description);
+						add.push(annotation);
+					}
+				}
+			}
+			annotationModel.replaceAnnotations(remove, add);
+		},
+		
 		/**
 		 * Reveals and selects a portion of text.
 		 * @param {Number} start
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
index dfa10ac..5a4700e 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/editorFeatures.js
@@ -12,8 +12,8 @@
 /*global define */
 /*jslint maxerr:150 browser:true devel:true */
 
-define("orion/editor/editorFeatures", ['i18n!orion/editor/nls/messages', 'orion/textview/undoStack', 'orion/textview/keyBinding', //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-	'orion/textview/rulers', 'orion/textview/annotations', 'orion/textview/tooltip', 'orion/textview/textDND', 'orion/editor/regex', 'orion/textview/util'], //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/editorFeatures", ['i18n!orion/editor/nls/messages', 'orion/editor/undoStack', 'orion/editor/keyBinding', //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+	'orion/editor/rulers', 'orion/editor/annotations', 'orion/editor/tooltip', 'orion/editor/textDND', 'orion/editor/regex', 'orion/editor/util'], //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 function(messages, mUndoStack, mKeyBinding, mRulers, mAnnotations, mTooltip, mTextDND, mRegex, util) {
 
 	function UndoFactory() {
@@ -748,7 +748,7 @@
 	
 	/**
 	 * @param {orion.editor.Editor} editor
-	 * @param {orion.textView.UndoStack} undoStack
+	 * @param {orion.editor.UndoStack} undoStack
 	 * @param {orion.editor.ContentAssist} [contentAssist]
 	 * @param {orion.editor.LinkedMode} [linkedMode]
 	 */
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/eventTarget.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js
similarity index 95%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/eventTarget.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js
index 26b23f8..fd5cf56 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/eventTarget.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/eventTarget.js
@@ -1,147 +1,147 @@
-/*******************************************************************************

- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: 

- *		Felipe Heidrich (IBM Corporation) - initial API and implementation

- *		Silenio Quarti (IBM Corporation) - initial API and implementation

- ******************************************************************************/

- 

-/*global define */

-define("orion/textview/eventTarget", [], function() { //$NON-NLS-0$

-	/** 

-	 * Constructs a new EventTarget object.

-	 * 

-	 * @class 

-	 * @name orion.textview.EventTarget

-	 */

-	function EventTarget() {

-	}

-	/**

-	 * Adds in the event target interface into the specified object.

-	 *

-	 * @param {Object} object The object to add in the event target interface.

-	 */

-	EventTarget.addMixin = function(object) {

-		var proto = EventTarget.prototype;

-		for (var p in proto) {

-			if (proto.hasOwnProperty(p)) {

-				object[p] = proto[p];

-			}

-		}

-	};

-	EventTarget.prototype = /** @lends orion.textview.EventTarget.prototype */ {

-		/**

-		 * Adds an event listener to this event target.

-		 * 

-		 * @param {String} type The event type.

-		 * @param {Function|EventListener} listener The function or the EventListener that will be executed when the event happens. 

-		 * @param {Boolean} [useCapture=false] <code>true</code> if the listener should be trigged in the capture phase.

-		 * 

-		 * @see #removeEventListener

-		 */

-		addEventListener: function(type, listener, useCapture) {

-			if (!this._eventTypes) { this._eventTypes = {}; }

-			var state = this._eventTypes[type];

-			if (!state) {

-				state = this._eventTypes[type] = {level: 0, listeners: []};

-			}

-			var listeners = state.listeners;

-			listeners.push({listener: listener, useCapture: useCapture});

-		},

-		/**

-		 * Dispatches the given event to the listeners added to this event target.

-		 * @param {Event} evt The event to dispatch.

-		 */

-		dispatchEvent: function(evt) {

-			var type = evt.type;

-			this._dispatchEvent("pre" + type, evt); //$NON-NLS-0$

-			this._dispatchEvent(type, evt);

-			this._dispatchEvent("post" + type, evt); //$NON-NLS-0$

-		},

-		_dispatchEvent: function(type, evt) {

-			var state = this._eventTypes ? this._eventTypes[type] : null;

-			if (state) {

-				var listeners = state.listeners;

-				try {

-					state.level++;

-					if (listeners) {

-						for (var i=0, len=listeners.length; i < len; i++) {

-							if (listeners[i]) {

-								var l = listeners[i].listener;

-								if (typeof l === "function") { //$NON-NLS-0$

-									l.call(this, evt);

-								} else if (l.handleEvent && typeof l.handleEvent === "function") { //$NON-NLS-0$

-									l.handleEvent(evt);

-								}

-							}

-						}

-					}

-				} finally {

-					state.level--;

-					if (state.compact && state.level === 0) {

-						for (var j=listeners.length - 1; j >= 0; j--) {

-							if (!listeners[j]) {

-								listeners.splice(j, 1);

-							}

-						}

-						if (listeners.length === 0) {

-							delete this._eventTypes[type];

-						}

-						state.compact = false;

-					}

-				}

-			}

-		},

-		/**

-		 * Returns whether there is a listener for the specified event type.

-		 * 

-		 * @param {String} type The event type

-		 * 

-		 * @see #addEventListener

-		 * @see #removeEventListener

-		 */

-		isListening: function(type) {

-			if (!this._eventTypes) { return false; }

-			return this._eventTypes[type] !== undefined;

-		},		

-		/**

-		 * Removes an event listener from the event target.

-		 * <p>

-		 * All the parameters must be the same ones used to add the listener.

-		 * </p>

-		 * 

-		 * @param {String} type The event type

-		 * @param {Function|EventListener} listener The function or the EventListener that will be executed when the event happens. 

-		 * @param {Boolean} [useCapture=false] <code>true</code> if the listener should be trigged in the capture phase.

-		 * 

-		 * @see #addEventListener

-		 */

-		removeEventListener: function(type, listener, useCapture){

-			if (!this._eventTypes) { return; }

-			var state = this._eventTypes[type];

-			if (state) {

-				var listeners = state.listeners;

-				for (var i=0, len=listeners.length; i < len; i++) {

-					var l = listeners[i];

-					if (l && l.listener === listener && l.useCapture === useCapture) {

-						if (state.level !== 0) {

-							listeners[i] = null;

-							state.compact = true;

-						} else {

-							listeners.splice(i, 1);

-						}

-						break;

-					}

-				}

-				if (listeners.length === 0) {

-					delete this._eventTypes[type];

-				}

-			}

-		}

-	};

-	return {EventTarget: EventTarget};

-});

+/*******************************************************************************
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: 
+ *		Felipe Heidrich (IBM Corporation) - initial API and implementation
+ *		Silenio Quarti (IBM Corporation) - initial API and implementation
+ ******************************************************************************/
+ 
+/*global define */
+define("orion/editor/eventTarget", [], function() { //$NON-NLS-0$
+	/** 
+	 * Constructs a new EventTarget object.
+	 * 
+	 * @class 
+	 * @name orion.editor.EventTarget
+	 */
+	function EventTarget() {
+	}
+	/**
+	 * Adds in the event target interface into the specified object.
+	 *
+	 * @param {Object} object The object to add in the event target interface.
+	 */
+	EventTarget.addMixin = function(object) {
+		var proto = EventTarget.prototype;
+		for (var p in proto) {
+			if (proto.hasOwnProperty(p)) {
+				object[p] = proto[p];
+			}
+		}
+	};
+	EventTarget.prototype = /** @lends orion.editor.EventTarget.prototype */ {
+		/**
+		 * Adds an event listener to this event target.
+		 * 
+		 * @param {String} type The event type.
+		 * @param {Function|EventListener} listener The function or the EventListener that will be executed when the event happens. 
+		 * @param {Boolean} [useCapture=false] <code>true</code> if the listener should be trigged in the capture phase.
+		 * 
+		 * @see #removeEventListener
+		 */
+		addEventListener: function(type, listener, useCapture) {
+			if (!this._eventTypes) { this._eventTypes = {}; }
+			var state = this._eventTypes[type];
+			if (!state) {
+				state = this._eventTypes[type] = {level: 0, listeners: []};
+			}
+			var listeners = state.listeners;
+			listeners.push({listener: listener, useCapture: useCapture});
+		},
+		/**
+		 * Dispatches the given event to the listeners added to this event target.
+		 * @param {Event} evt The event to dispatch.
+		 */
+		dispatchEvent: function(evt) {
+			var type = evt.type;
+			this._dispatchEvent("pre" + type, evt); //$NON-NLS-0$
+			this._dispatchEvent(type, evt);
+			this._dispatchEvent("post" + type, evt); //$NON-NLS-0$
+		},
+		_dispatchEvent: function(type, evt) {
+			var state = this._eventTypes ? this._eventTypes[type] : null;
+			if (state) {
+				var listeners = state.listeners;
+				try {
+					state.level++;
+					if (listeners) {
+						for (var i=0, len=listeners.length; i < len; i++) {
+							if (listeners[i]) {
+								var l = listeners[i].listener;
+								if (typeof l === "function") { //$NON-NLS-0$
+									l.call(this, evt);
+								} else if (l.handleEvent && typeof l.handleEvent === "function") { //$NON-NLS-0$
+									l.handleEvent(evt);
+								}
+							}
+						}
+					}
+				} finally {
+					state.level--;
+					if (state.compact && state.level === 0) {
+						for (var j=listeners.length - 1; j >= 0; j--) {
+							if (!listeners[j]) {
+								listeners.splice(j, 1);
+							}
+						}
+						if (listeners.length === 0) {
+							delete this._eventTypes[type];
+						}
+						state.compact = false;
+					}
+				}
+			}
+		},
+		/**
+		 * Returns whether there is a listener for the specified event type.
+		 * 
+		 * @param {String} type The event type
+		 * 
+		 * @see #addEventListener
+		 * @see #removeEventListener
+		 */
+		isListening: function(type) {
+			if (!this._eventTypes) { return false; }
+			return this._eventTypes[type] !== undefined;
+		},		
+		/**
+		 * Removes an event listener from the event target.
+		 * <p>
+		 * All the parameters must be the same ones used to add the listener.
+		 * </p>
+		 * 
+		 * @param {String} type The event type
+		 * @param {Function|EventListener} listener The function or the EventListener that will be executed when the event happens. 
+		 * @param {Boolean} [useCapture=false] <code>true</code> if the listener should be trigged in the capture phase.
+		 * 
+		 * @see #addEventListener
+		 */
+		removeEventListener: function(type, listener, useCapture){
+			if (!this._eventTypes) { return; }
+			var state = this._eventTypes[type];
+			if (state) {
+				var listeners = state.listeners;
+				for (var i=0, len=listeners.length; i < len; i++) {
+					var l = listeners[i];
+					if (l && l.listener === listener && l.useCapture === useCapture) {
+						if (state.level !== 0) {
+							listeners[i] = null;
+							state.compact = true;
+						} else {
+							listeners.splice(i, 1);
+						}
+						break;
+					}
+				}
+				if (listeners.length === 0) {
+					delete this._eventTypes[type];
+				}
+			}
+		}
+	};
+	return {EventTarget: EventTarget};
+});
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/global.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/global.js
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/global.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/global.js
index f80c752..6e61ffd 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/global.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/global.js
@@ -1,85 +1,85 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: 

- *		Felipe Heidrich (IBM Corporation) - initial API and implementation

- *		Silenio Quarti (IBM Corporation) - initial API and implementation

- *		Mihai Sucan (Mozilla Foundation) - fix for Bug#364214

- */

-

-/*global window */

-

-/**

- * Evaluates the definition function and mixes in the returned module with

- * the module specified by <code>moduleName</code>.

- * <p>

- * This function is intented to by used when RequireJS is not available.

- * </p>

- *

- * @param {String} name The mixin module name.

- * @param {String[]} deps The array of dependency names.

- * @param {Function} callback The definition function.

- */

-if (!window.define) {

-	window.define = function(name, deps, callback) {

-		var module = this;

-		var split = (name || "").split("/"), i, j; //$NON-NLS-0$

-		for (i = 0; i < split.length - 1; i++) {

-			module = module[split[i]] = (module[split[i]] || {});

-		}

-		var depModules = [], depModule;

-		for (j = 0; j < deps.length; j++) {

-			depModule = this;

-			split = deps[j].split("/"); //$NON-NLS-0$

-			for (i = 0; i < split.length - 1; i++) {

-				depModule = depModule[split[i]] = (depModule[split[i]] || {});

-			}

-			depModules.push(depModule);

-		}

-		var newModule = callback.apply(this, depModules);

-		for (var p in newModule) {

-			if (newModule.hasOwnProperty(p)) {

-				module[p] = newModule[p];

-			}

-		}

-	};

-}

-

-/**

- * Require/get the defined modules.

- * <p>

- * This function is intented to by used when RequireJS is not available.

- * </p>

- *

- * @param {String[]|String} deps The array of dependency names. This can also be

- * a string, a single dependency name.

- * @param {Function} [callback] Optional, the callback function to execute when

- * multiple dependencies are required. The callback arguments will have

- * references to each module in the same order as the deps array.

- * @returns {Object|undefined} If the deps parameter is a string, then this

- * function returns the required module definition, otherwise undefined is

- * returned.

- */

-if (!window.require) {

-	window.require = function(deps, callback) {

-		var depsArr = typeof deps === "string" ? [deps] : deps; //$NON-NLS-0$

-		var depModules = [], depModule, split, i, j;

-		for (j = 0; j < depsArr.length; j++) {

-			depModule = this;

-			split = depsArr[j].split("/"); //$NON-NLS-0$

-			for (i = 0; i < split.length - 1; i++) {

-				depModule = depModule[split[i]] = (depModule[split[i]] || {});

-			}

-			depModules.push(depModule);

-		}

-		if (callback) {

-			callback.apply(this, depModules);

-		}

-		return typeof deps === "string" ? depModules[0] : undefined; //$NON-NLS-0$

-	};

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: 
+ *		Felipe Heidrich (IBM Corporation) - initial API and implementation
+ *		Silenio Quarti (IBM Corporation) - initial API and implementation
+ *		Mihai Sucan (Mozilla Foundation) - fix for Bug#364214
+ */
+
+/*global window */
+
+/**
+ * Evaluates the definition function and mixes in the returned module with
+ * the module specified by <code>moduleName</code>.
+ * <p>
+ * This function is intented to by used when RequireJS is not available.
+ * </p>
+ *
+ * @param {String} name The mixin module name.
+ * @param {String[]} deps The array of dependency names.
+ * @param {Function} callback The definition function.
+ */
+if (!window.define) {
+	window.define = function(name, deps, callback) {
+		var module = this;
+		var split = (name || "").split("/"), i, j; //$NON-NLS-0$
+		for (i = 0; i < split.length - 1; i++) {
+			module = module[split[i]] = (module[split[i]] || {});
+		}
+		var depModules = [], depModule;
+		for (j = 0; j < deps.length; j++) {
+			depModule = this;
+			split = deps[j].split("/"); //$NON-NLS-0$
+			for (i = 0; i < split.length - 1; i++) {
+				depModule = depModule[split[i]] = (depModule[split[i]] || {});
+			}
+			depModules.push(depModule);
+		}
+		var newModule = callback.apply(this, depModules);
+		for (var p in newModule) {
+			if (newModule.hasOwnProperty(p)) {
+				module[p] = newModule[p];
+			}
+		}
+	};
+}
+
+/**
+ * Require/get the defined modules.
+ * <p>
+ * This function is intented to by used when RequireJS is not available.
+ * </p>
+ *
+ * @param {String[]|String} deps The array of dependency names. This can also be
+ * a string, a single dependency name.
+ * @param {Function} [callback] Optional, the callback function to execute when
+ * multiple dependencies are required. The callback arguments will have
+ * references to each module in the same order as the deps array.
+ * @returns {Object|undefined} If the deps parameter is a string, then this
+ * function returns the required module definition, otherwise undefined is
+ * returned.
+ */
+if (!window.require) {
+	window.require = function(deps, callback) {
+		var depsArr = typeof deps === "string" ? [deps] : deps; //$NON-NLS-0$
+		var depModules = [], depModule, split, i, j;
+		for (j = 0; j < depsArr.length; j++) {
+			depModule = this;
+			split = depsArr[j].split("/"); //$NON-NLS-0$
+			for (i = 0; i < split.length - 1; i++) {
+				depModule = depModule[split[i]] = (depModule[split[i]] || {});
+			}
+			depModules.push(depModule);
+		}
+		if (callback) {
+			callback.apply(this, depModules);
+		}
+		return typeof deps === "string" ? depModules[0] : undefined; //$NON-NLS-0$
+	};
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/i18n.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/i18n.js
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/i18n.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/i18n.js
index 7e758ec..b6f0572 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/i18n.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/i18n.js
@@ -1,23 +1,23 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: IBM Corporation - initial API and implementation

- ******************************************************************************/

-

-/*global define */

-define({

-	load: function(name, parentRequire, onLoad, config) {

-		if (parentRequire.specified && parentRequire.specified("orion/bootstrap")) { //$NON-NLS-0$

-			parentRequire(["orion/i18n!" + name], function(languages) { //$NON-NLS-0$

-				onLoad(languages);

-			});

-		} else {

-			onLoad({});

-		}

-	}

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+/*global define */
+define({
+	load: function(name, parentRequire, onLoad, config) {
+		if (parentRequire.specified && parentRequire.specified("orion/bootstrap")) { //$NON-NLS-0$
+			parentRequire(["orion/i18n!" + name], function(languages) { //$NON-NLS-0$
+				onLoad(languages);
+			});
+		} else {
+			onLoad({});
+		}
+	}
 });
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/bookmark.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/bookmark.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/bookmark.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/bookmark.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/breakpoint.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/breakpoint.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/breakpoint.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/breakpoint.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/collapsed.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/collapsed.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/collapsed.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/collapsed.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/currentBracket.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/currentBracket.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/currentBracket.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/currentBracket.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/currentLine.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/currentLine.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/currentLine.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/currentLine.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/error.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/error.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/error.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/error.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/expanded.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/expanded.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/expanded.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/expanded.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/matchingBracket.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/matchingBracket.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/matchingBracket.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/matchingBracket.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/multiple.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/multiple.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/multiple.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/multiple.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/plus.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/plus.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/plus.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/plus.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/search.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/search.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/search.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/search.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_bookmark.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_bookmark.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_bookmark.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_bookmark.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_breakpoint.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_breakpoint.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_breakpoint.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_breakpoint.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_error.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_error.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_error.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_error.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_task.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_task.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_task.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_task.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_warning.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_warning.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/squiggly_warning.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/squiggly_warning.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/task.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/task.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/task.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/task.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/warning.gif b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/warning.gif
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/warning.gif
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/warning.gif
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/white_space.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/white_space.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/white_space.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/white_space.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/images/white_tab.png b/bundles/org.eclipse.orion.client.editor/web/orion/editor/images/white_tab.png
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/images/white_tab.png
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/images/white_tab.png
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/keyBinding.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/keyBinding.js
similarity index 90%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/keyBinding.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/keyBinding.js
index 6b2274e..d7d2bff 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/keyBinding.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/keyBinding.js
@@ -13,7 +13,7 @@
 
 /*global define */
 
-define("orion/textview/keyBinding", ['orion/textview/util'], function(util) { //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/keyBinding", ['orion/editor/util'], function(util) { //$NON-NLS-1$ //$NON-NLS-0$
 
 	/**
 	 * Constructs a new key binding with the given key code and modifiers.
@@ -25,7 +25,7 @@
 	 * @param {Boolean} mod4 the fourth modifier (usually Control on the Mac).
 	 * 
 	 * @class A KeyBinding represents of a key code and a modifier state that can be triggered by the user using the keyboard.
-	 * @name orion.textview.KeyBinding
+	 * @name orion.editor.KeyBinding
 	 * 
 	 * @property {String|Number} keyCode The key code.
 	 * @property {Boolean} mod1 The primary modifier (usually Command on Mac and Control on other platforms).
@@ -33,7 +33,7 @@
 	 * @property {Boolean} mod3 The third modifier (usually Alt).
 	 * @property {Boolean} mod4 The fourth modifier (usually Control on the Mac).
 	 *
-	 * @see orion.textview.TextView#setKeyBinding
+	 * @see orion.editor.TextView#setKeyBinding
 	 */
 	function KeyBinding (keyCode, mod1, mod2, mod3, mod4) {
 		if (typeof(keyCode) === "string") { //$NON-NLS-0$
@@ -46,7 +46,7 @@
 		this.mod3 = mod3 !== undefined && mod3 !== null ? mod3 : false;
 		this.mod4 = mod4 !== undefined && mod4 !== null ? mod4 : false;
 	}
-	KeyBinding.prototype = /** @lends orion.textview.KeyBinding.prototype */ {
+	KeyBinding.prototype = /** @lends orion.editor.KeyBinding.prototype */ {
 		/**
 		 * Returns whether this key binding matches the given key event.
 		 * 
@@ -67,7 +67,7 @@
 		/**
 		 * Returns whether this key binding is the same as the given parameter.
 		 * 
-		 * @param {orion.textview.KeyBinding} kb the key binding to compare with.
+		 * @param {orion.editor.KeyBinding} kb the key binding to compare with.
 		 * @returns {Boolean} whether or not the parameter and the receiver describe the same key binding.
 		 */
 		equals: function(kb) {
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
index ef2b5c7..932c4bd 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/mirror.js
@@ -11,7 +11,7 @@
  *******************************************************************************/
 /*global define */
 /*jslint browser:true forin:true*/
-define("orion/editor/mirror", ["i18n!orion/editor/nls/messages", "orion/textview/eventTarget", "orion/textview/annotations"], function(messages, mEventTarget, mAnnotations) {
+define("orion/editor/mirror", ["i18n!orion/editor/nls/messages", "orion/editor/eventTarget", "orion/editor/annotations"], function(messages, mEventTarget, mAnnotations) {
 	// TODO this affects indentation, which we don't support. Should be a parameter.
 	var tabSize = 4;
 	
@@ -229,11 +229,11 @@
 	/**
 	 * @name orion.mirror.ModeApplier
 	 * @class Driver for CodeMirror modes.
-	 * @description A <code>ModeApplier</code> listens to text changes on a {@link orion.textview.TextModel} and drives
+	 * @description A <code>ModeApplier</code> listens to text changes on a {@link orion.editor.TextModel} and drives
 	 * a CodeMirror mode to calculate highlighting in response to the change. Clients can use the highlighting information
-	 * to style a {@link orion.textview.TextView}.
+	 * to style a {@link orion.editor.TextView}.
 	 * 
-	 * <p>After a change is made to the {@link orion.textview.TextModel}, ModeApplier immediately updates the highlighting 
+	 * <p>After a change is made to the {@link orion.editor.TextModel}, ModeApplier immediately updates the highlighting 
 	 * information for a small portion of the file around where the change occurred. Successive portions of the file are
 	 * updated by short jobs that run periodically to avoid slowing down the rest of the application.</p>
 	 * 
@@ -241,14 +241,14 @@
 	 * a portion of the file. The event contains information about which lines were highlighted. The style for any highlighted
 	 * line can be obtained by calling {@link #getLineStyle}.</p>
 	 * 
-	 * @param {orion.textview.TextModel} model The text model to listen to.
+	 * @param {orion.editor.TextModel} model The text model to listen to.
 	 * @param {orion.mirror.Mirror} mirror The {@link orion.mirror.Mirror} to use for loading modes.
 	 * @param {Object} [options]
 	 * <!-- @param {Boolean} [options.whitespacesVisible] If <code>true</code>, causes ModeApplier 
 	 * to generate style regions for any whitespace characters that are not claimed as tokens by the mode. -->
-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener
-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener
-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent
+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener
+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener
+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
 	 */
 	function ModeApplier(model, codeMirror, options) {
 		options = options || {};
@@ -601,14 +601,14 @@
 			this.endLine = Math.max(this.endLine, endLine);
 		},
 		/**
-		 * Converts a <code>MirrorLineStyle</code> to a {@link orion.textview.StyleRange[]}.
+		 * Converts a <code>MirrorLineStyle</code> to a {@link orion.editor.StyleRange[]}.
 		 * @param {orion.mirror.MirrorLineStyle} style The line style to convert.
 		 * @param {Number} [lineIndex] The line index of the line having the given style. If omitted, the returned 
-		 * {@link orion.textview.StyleRange[]} objects will have offsets relative to the line, not the document.
+		 * {@link orion.editor.StyleRange[]} objects will have offsets relative to the line, not the document.
 		 * 
-		 * @returns {orion.textview.StyleRange[][]} An array of 2 elements. The first element is an {@link orion.textview.StyleRange[]}
+		 * @returns {orion.editor.StyleRange[][]} An array of 2 elements. The first element is an {@link orion.editor.StyleRange[]}
 		 * giving the styles for the line. 
-		 * <p>The second element is an {@link orion.textview.StyleRange[]} containing only those elements of
+		 * <p>The second element is an {@link orion.editor.StyleRange[]} containing only those elements of
 		 * the first array that represent syntax errors. (By CodeMirror convention, anything assigned the <code>"cm-error"</code> tag
 		 * is assumed to be an error).</p>
 		 */
@@ -650,8 +650,8 @@
 
 	/**
 	 * @name orion.mirror.CodeMirrorStyler
-	 * @class A styler that uses CodeMirror modes to provide styles for a {@link orion.textview.TextView}.
-	 * @description A <code>CodeMirrorStyler</code> applies one or more CodeMirror modes to provide styles for a {@link orion.textview.TextView}.
+	 * @class A styler that uses CodeMirror modes to provide styles for a {@link orion.editor.TextView}.
+	 * @description A <code>CodeMirrorStyler</code> applies one or more CodeMirror modes to provide styles for a {@link orion.editor.TextView}.
 	 * It uses modes that are registered with the {@link orion.mirror.Mirror} object passed to the CodeMirrorStyler constructor.
 	 * 
 	 * <p>The process for using CodeMirrorStyler is as follows:</p>
@@ -667,9 +667,9 @@
 	 * dependent modes have been registered with the Mirror before calling {@link #setMode}.</p>
 	 * </li>
 	 * 
-	 * @param {orion.textview.TextView} textView The TextView to provide style for.
+	 * @param {orion.editor.TextView} textView The TextView to provide style for.
 	 * @param {orion.mirror.Mirror} codeMirror The Mirror object to load modes from.
-	 * @param {orion.textview.AnnotationModel} [annotationModel]
+	 * @param {orion.editor.AnnotationModel} [annotationModel]
 	 */
 	function CodeMirrorStyler(textView, codeMirror, annotationModel) {
 		this.init(textView, codeMirror, annotationModel);
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/messages.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/messages.js
index 075a2eb..00e56fe 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/messages.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/messages.js
@@ -13,9 +13,22 @@
 
 /*global define*/
 
-define(['orion/textview/i18n!orion/editor/nls/messages'], function(bundle) {
+define(['orion/editor/i18n!orion/editor/nls/messages'], function(bundle) {
 	var result = {
 		root: {
+			"multipleAnnotations": "Multiple annotations:", //$NON-NLS-1$ //$NON-NLS-0$
+			"line": "Line: ${0}", //$NON-NLS-1$ //$NON-NLS-0$
+			"breakpoint": "Breakpoint", //$NON-NLS-1$ //$NON-NLS-0$
+			"bookmark": "Bookmark", //$NON-NLS-1$ //$NON-NLS-0$
+			"task": "Task", //$NON-NLS-1$ //$NON-NLS-0$
+			"error": "Error", //$NON-NLS-1$ //$NON-NLS-0$
+			"warning": "Warning", //$NON-NLS-1$ //$NON-NLS-0$
+			"matchingSearch": "Matching Search", //$NON-NLS-1$ //$NON-NLS-0$
+			"currentSearch": "Current Search", //$NON-NLS-1$ //$NON-NLS-0$
+			"currentLine": "Current Line", //$NON-NLS-1$ //$NON-NLS-0$
+			"matchingBracket": "Matching Bracket", //$NON-NLS-1$ //$NON-NLS-0$
+			"currentBracket": "Current Bracket", //$NON-NLS-1$ //$NON-NLS-0$
+			
 			"Comment": "Comment",
 			"Flat outline": "Flat outline",
 			"incrementalFind": "Incremental find: ${0}",
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js
index 7520081..8170845 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/nls/root/messages.js
@@ -16,6 +16,19 @@
 /*global define*/

 

 define({

+	"multipleAnnotations": "Multiple annotations:", //$NON-NLS-1$ //$NON-NLS-0$

+	"line": "Line: ${0}", //$NON-NLS-1$ //$NON-NLS-0$

+	"breakpoint": "Breakpoint", //$NON-NLS-1$ //$NON-NLS-0$

+	"bookmark": "Bookmark", //$NON-NLS-1$ //$NON-NLS-0$

+	"task": "Task", //$NON-NLS-1$ //$NON-NLS-0$

+	"error": "Error", //$NON-NLS-1$ //$NON-NLS-0$

+	"warning": "Warning", //$NON-NLS-1$ //$NON-NLS-0$

+	"matchingSearch": "Matching Search", //$NON-NLS-1$ //$NON-NLS-0$

+	"currentSearch": "Current Search", //$NON-NLS-1$ //$NON-NLS-0$

+	"currentLine": "Current Line", //$NON-NLS-1$ //$NON-NLS-0$

+	"matchingBracket": "Matching Bracket", //$NON-NLS-1$ //$NON-NLS-0$

+	"currentBracket": "Current Bracket", //$NON-NLS-1$ //$NON-NLS-0$

+			

 	"Comment": "Comment",

 	"Flat outline": "Flat outline",

 	"incrementalFind": "Incremental find: ${0}",

diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/projectionTextModel.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js
similarity index 91%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/projectionTextModel.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js
index c25e83c..37f1442 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/projectionTextModel.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/projectionTextModel.js
@@ -13,7 +13,7 @@
 
 /*global define */
 
-define("orion/textview/projectionTextModel", ['orion/textview/textModel', 'orion/textview/eventTarget'], function(mTextModel, mEventTarget) { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/projectionTextModel", ['orion/editor/textModel', 'orion/editor/eventTarget'], function(mTextModel, mEventTarget) { //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 
 	/**
 	 * @class This object represents a projection range. A projection specifies a
@@ -21,21 +21,21 @@
 	 * base text model associated to a projection model.
 	 * <p>
 	 * <b>See:</b><br/>
-	 * {@link orion.textview.ProjectionTextModel}<br/>
-	 * {@link orion.textview.ProjectionTextModel#addProjection}<br/>
+	 * {@link orion.editor.ProjectionTextModel}<br/>
+	 * {@link orion.editor.ProjectionTextModel#addProjection}<br/>
 	 * </p>		 
-	 * @name orion.textview.Projection
+	 * @name orion.editor.Projection
 	 * 
 	 * @property {Number} start The start offset of the projection range. 
 	 * @property {Number} end The end offset of the projection range. This offset is exclusive.
-	 * @property {String|orion.textview.TextModel} [text=""] The projection text to be inserted
+	 * @property {String|orion.editor.TextModel} [text=""] The projection text to be inserted
 	 */
 	/**
 	 * Constructs a new <code>ProjectionTextModel</code> based on the specified <code>TextModel</code>.
 	 *
-	 * @param {orion.textview.TextModel} baseModel The base text model.
+	 * @param {orion.editor.TextModel} baseModel The base text model.
 	 *
-	 * @name orion.textview.ProjectionTextModel
+	 * @name orion.editor.ProjectionTextModel
 	 * @class The <code>ProjectionTextModel</code> represents a projection of its base text
 	 * model. Projection ranges can be added to the projection text model to hide and/or insert
 	 * ranges to the base text model.
@@ -45,27 +45,27 @@
 	 * </p>
 	 * <p>
 	 * <b>See:</b><br/>
-	 * {@link orion.textview.TextView}<br/>
-	 * {@link orion.textview.TextModel}
-	 * {@link orion.textview.TextView#setModel}
+	 * {@link orion.editor.TextView}<br/>
+	 * {@link orion.editor.TextModel}
+	 * {@link orion.editor.TextView#setModel}
 	 * </p>
-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener
-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener
-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent
+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener
+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener
+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
 	 */
 	function ProjectionTextModel(baseModel) {
 		this._model = baseModel;	/* Base Model */
 		this._projections = [];
 	}
 
-	ProjectionTextModel.prototype = /** @lends orion.textview.ProjectionTextModel.prototype */ {
+	ProjectionTextModel.prototype = /** @lends orion.editor.ProjectionTextModel.prototype */ {
 		/**
 		 * Adds a projection range to the model.
 		 * <p>
 		 * The model must notify the listeners before and after the the text is
 		 * changed by calling {@link #onChanging} and {@link #onChanged} respectively. 
 		 * </p>
-		 * @param {orion.textview.Projection} projection The projection range to be added.
+		 * @param {orion.editor.Projection} projection The projection range to be added.
 		 * 
 		 * @see #removeProjection
 		 */
@@ -112,7 +112,7 @@
 		/**
 		 * Returns all projection ranges of this model.
 		 * 
-		 * @return {orion.textview.Projection[]} The projection ranges.
+		 * @return {orion.editor.Projection[]} The projection ranges.
 		 * 
 		 * @see #addProjection
 		 */
@@ -122,7 +122,7 @@
 		/**
 		 * Gets the base text model.
 		 *
-		 * @return {orion.textview.TextModel} The base text model.
+		 * @return {orion.editor.TextModel} The base text model.
 		 */
 		getBaseModel: function() {
 			return this._model;
@@ -164,7 +164,7 @@
 		 * changed by calling {@link #onChanging} and {@link #onChanged} respectively. 
 		 * </p>
 		 * 
-		 * @param {orion.textview.Projection} projection The projection range to be removed.
+		 * @param {orion.editor.Projection} projection The projection range to be removed.
 		 * 
 		 * @see #addProjection
 		 */
@@ -222,7 +222,7 @@
 			return high;
 		},
 		/**
-		 * @see orion.textview.TextModel#getCharCount
+		 * @see orion.editor.TextModel#getCharCount
 		 */
 		getCharCount: function() {
 			var count = this._model.getCharCount(), projections = this._projections;
@@ -233,7 +233,7 @@
 			return count;
 		},
 		/**
-		 * @see orion.textview.TextModel#getLine
+		 * @see orion.editor.TextModel#getLine
 		 */
 		getLine: function(lineIndex, includeDelimiter) {
 			if (lineIndex < 0) { return null; }
@@ -275,7 +275,7 @@
 			return result.join("");
 		},
 		/**
-		 * @see orion.textview.TextModel#getLineAtOffset
+		 * @see orion.editor.TextModel#getLineAtOffset
 		 */
 		getLineAtOffset: function(offset) {
 			var model = this._model, projections = this._projections;
@@ -296,7 +296,7 @@
 			return model.getLineAtOffset(offset - delta) + lineDelta;
 		},
 		/**
-		 * @see orion.textview.TextModel#getLineCount
+		 * @see orion.editor.TextModel#getLineCount
 		 */
 		getLineCount: function() {
 			var model = this._model, projections = this._projections;
@@ -308,13 +308,13 @@
 			return count;
 		},
 		/**
-		 * @see orion.textview.TextModel#getLineDelimiter
+		 * @see orion.editor.TextModel#getLineDelimiter
 		 */
 		getLineDelimiter: function() {
 			return this._model.getLineDelimiter();
 		},
 		/**
-		 * @see orion.textview.TextModel#getLineEnd
+		 * @see orion.editor.TextModel#getLineEnd
 		 */
 		getLineEnd: function(lineIndex, includeDelimiter) {
 			if (lineIndex < 0) { return -1; }
@@ -334,7 +334,7 @@
 			return model.getLineEnd(lineIndex - delta, includeDelimiter) + offsetDelta;
 		},
 		/**
-		 * @see orion.textview.TextModel#getLineStart
+		 * @see orion.editor.TextModel#getLineStart
 		 */
 		getLineStart: function(lineIndex) {
 			if (lineIndex < 0) { return -1; }
@@ -354,7 +354,7 @@
 			return model.getLineStart(lineIndex - delta) + offsetDelta;
 		},
 		/**
-		 * @see orion.textview.TextModel#getText
+		 * @see orion.editor.TextModel#getText
 		 */
 		getText: function(start, end) {
 			if (start === undefined) { start = 0; }
@@ -431,25 +431,25 @@
 			}
 		},
 		/**
-		 * @see orion.textview.TextModel#onChanging
+		 * @see orion.editor.TextModel#onChanging
 		 */
 		onChanging: function(modelChangingEvent) {
 			return this.dispatchEvent(modelChangingEvent);
 		},
 		/**
-		 * @see orion.textview.TextModel#onChanged
+		 * @see orion.editor.TextModel#onChanged
 		 */
 		onChanged: function(modelChangedEvent) {
 			return this.dispatchEvent(modelChangedEvent);
 		},
 		/**
-		 * @see orion.textview.TextModel#setLineDelimiter
+		 * @see orion.editor.TextModel#setLineDelimiter
 		 */
 		setLineDelimiter: function(lineDelimiter) {
 			this._model.setLineDelimiter(lineDelimiter);
 		},
 		/**
-		 * @see orion.textview.TextModel#setText
+		 * @see orion.editor.TextModel#setText
 		 */
 		setText: function(text, start, end) {
 			if (text === undefined) { text = ""; }
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/rulers.css b/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.css
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/rulers.css
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.css
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/rulers.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js
similarity index 84%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/rulers.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js
index 968303b..a4375eb 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/rulers.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/rulers.js
@@ -11,7 +11,7 @@
 
 /*global define*/
 
-define("orion/textview/rulers", ['i18n!orion/textview/nls/messages', 'orion/textview/annotations', 'orion/textview/tooltip', 'orion/textview/util'], function(messages, mAnnotations, mTooltip, util) { //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/rulers", ['i18n!orion/editor/nls/messages', 'orion/editor/annotations', 'orion/editor/tooltip', 'orion/editor/util'], function(messages, mAnnotations, mTooltip, util) { //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 
 	/**
 	 * Constructs a new ruler. 
@@ -20,10 +20,10 @@
 	 * and is useful only for objects implementing rulers.
 	 * <p/>
 	 * 
-	 * @param {orion.textview.AnnotationModel} annotationModel the annotation model for the ruler.
+	 * @param {orion.editor.AnnotationModel} annotationModel the annotation model for the ruler.
 	 * @param {String} [rulerLocation="left"] the location for the ruler.
 	 * @param {String} [rulerOverview="page"] the overview for the ruler.
-	 * @param {orion.textview.Style} [rulerStyle] the style for the ruler. 
+	 * @param {orion.editor.Style} [rulerStyle] the style for the ruler. 
 	 * 
 	 * @class This interface represents a ruler for the text view.
 	 * <p>
@@ -35,18 +35,18 @@
 	 * visible, while a document ruler always shows the whole content.
 	 * </p>
 	 * <b>See:</b><br/>
-	 * {@link orion.textview.LineNumberRuler}<br/>
-	 * {@link orion.textview.AnnotationRuler}<br/>
-	 * {@link orion.textview.OverviewRuler}<br/> 
-	 * {@link orion.textview.TextView}<br/>
-	 * {@link orion.textview.TextView#addRuler}
+	 * {@link orion.editor.LineNumberRuler}<br/>
+	 * {@link orion.editor.AnnotationRuler}<br/>
+	 * {@link orion.editor.OverviewRuler}<br/> 
+	 * {@link orion.editor.TextView}<br/>
+	 * {@link orion.editor.TextView#addRuler}
 	 * </p>		 
-	 * @name orion.textview.Ruler
-	 * @borrows orion.textview.AnnotationTypeList#addAnnotationType as #addAnnotationType
-	 * @borrows orion.textview.AnnotationTypeList#getAnnotationTypePriority as #getAnnotationTypePriority
-	 * @borrows orion.textview.AnnotationTypeList#getAnnotationsByType as #getAnnotationsByType
-	 * @borrows orion.textview.AnnotationTypeList#isAnnotationTypeVisible as #isAnnotationTypeVisible
-	 * @borrows orion.textview.AnnotationTypeList#removeAnnotationType as #removeAnnotationType
+	 * @name orion.editor.Ruler
+	 * @borrows orion.editor.AnnotationTypeList#addAnnotationType as #addAnnotationType
+	 * @borrows orion.editor.AnnotationTypeList#getAnnotationTypePriority as #getAnnotationTypePriority
+	 * @borrows orion.editor.AnnotationTypeList#getAnnotationsByType as #getAnnotationsByType
+	 * @borrows orion.editor.AnnotationTypeList#isAnnotationTypeVisible as #isAnnotationTypeVisible
+	 * @borrows orion.editor.AnnotationTypeList#removeAnnotationType as #removeAnnotationType
 	 */
 	function Ruler (annotationModel, rulerLocation, rulerOverview, rulerStyle) {
 		this._location = rulerLocation || "left"; //$NON-NLS-0$
@@ -64,7 +64,7 @@
 		};
 		this.setAnnotationModel(annotationModel);
 	}
-	Ruler.prototype = /** @lends orion.textview.Ruler.prototype */ {
+	Ruler.prototype = /** @lends orion.editor.Ruler.prototype */ {
 		/**
 		 * Returns the annotations for a given line range merging multiple
 		 * annotations when necessary.
@@ -74,7 +74,7 @@
 		 *
 		 * @param {Number} startLine the start line index
 		 * @param {Number} endLine the end line index
-		 * @return {orion.textview.Annotation[]} the annotations for the line range. The array might be sparse.
+		 * @return {orion.editor.Annotation[]} the annotations for the line range. The array might be sparse.
 		 */
 		getAnnotations: function(startLine, endLine) {
 			var annotationModel = this._annotationModel;
@@ -121,7 +121,7 @@
 		/**
 		 * Returns the annotation model.
 		 *
-		 * @returns {orion.textview.AnnotationModel} the ruler annotation model.
+		 * @returns {orion.editor.AnnotationModel} the ruler annotation model.
 		 *
 		 * @see #setAnnotationModel
 		 */
@@ -151,7 +151,7 @@
 		/**
 		 * Returns the style information for the ruler.
 		 *
-		 * @returns {orion.textview.Style} the style information.
+		 * @returns {orion.editor.Style} the style information.
 		 */
 		getRulerStyle: function() {
 			return this._rulerStyle;
@@ -159,7 +159,7 @@
 		/**
 		 * Returns the text view.
 		 *
-		 * @returns {orion.textview.TextView} the text view.
+		 * @returns {orion.editor.TextView} the text view.
 		 *
 		 * @see #setView
 		 */
@@ -176,7 +176,7 @@
 		 * This method is called by the text view when the ruler is redrawn.
 		 * </p>
 		 *
-		 * @returns {orion.textview.Annotation} the widest annotation.
+		 * @returns {orion.editor.Annotation} the widest annotation.
 		 *
 		 * @see #getAnnotations
 		 */
@@ -186,7 +186,7 @@
 		/**
 		 * Sets the annotation model for the ruler.
 		 *
-		 * @param {orion.textview.AnnotationModel} annotationModel the annotation model.
+		 * @param {orion.editor.AnnotationModel} annotationModel the annotation model.
 		 *
 		 * @see #getAnnotationModel
 		 */
@@ -204,7 +204,7 @@
 		 * annotations.  This annotation is used when there are different types of
 		 * annotations in a given line.
 		 *
-		 * @param {orion.textview.Annotation} annotation the annotation for lines with multiple annotations.
+		 * @param {orion.editor.Annotation} annotation the annotation for lines with multiple annotations.
 		 * 
 		 * @see #setMultiAnnotationOverlay
 		 */
@@ -216,7 +216,7 @@
 		 * top of the computed annotation for a given line when there are multiple annotations of the same type
 		 * in the line. It is also used when the multiple annotation is not set.
 		 *
-		 * @param {orion.textview.Annotation} annotation the annotation overlay for lines with multiple annotations.
+		 * @param {orion.editor.Annotation} annotation the annotation overlay for lines with multiple annotations.
 		 * 
 		 * @see #setMultiAnnotation
 		 */
@@ -230,7 +230,7 @@
 		 * is added to the view.
 		 * </p>
 		 *
-		 * @param {orion.textview.TextView} view the text view.
+		 * @param {orion.editor.TextView} view the text view.
 		 */
 		setView: function (view) {
 			if (this._onTextModelChanged && this._view) {
@@ -425,19 +425,19 @@
 	/**
 	 * Constructs a new line numbering ruler. 
 	 *
-	 * @param {orion.textview.AnnotationModel} annotationModel the annotation model for the ruler.
+	 * @param {orion.editor.AnnotationModel} annotationModel the annotation model for the ruler.
 	 * @param {String} [rulerLocation="left"] the location for the ruler.
-	 * @param {orion.textview.Style} [rulerStyle=undefined] the style for the ruler.
-	 * @param {orion.textview.Style} [oddStyle={style: {backgroundColor: "white"}] the style for lines with odd line index.
-	 * @param {orion.textview.Style} [evenStyle={backgroundColor: "white"}] the style for lines with even line index.
+	 * @param {orion.editor.Style} [rulerStyle=undefined] the style for the ruler.
+	 * @param {orion.editor.Style} [oddStyle={style: {backgroundColor: "white"}] the style for lines with odd line index.
+	 * @param {orion.editor.Style} [evenStyle={backgroundColor: "white"}] the style for lines with even line index.
 	 *
-	 * @augments orion.textview.Ruler
+	 * @augments orion.editor.Ruler
 	 * @class This objects implements a line numbering ruler.
 	 *
 	 * <p><b>See:</b><br/>
-	 * {@link orion.textview.Ruler}
+	 * {@link orion.editor.Ruler}
 	 * </p>
-	 * @name orion.textview.LineNumberRuler
+	 * @name orion.editor.LineNumberRuler
 	 */
 	function LineNumberRuler (annotationModel, rulerLocation, rulerStyle, oddStyle, evenStyle) {
 		Ruler.call(this, annotationModel, rulerLocation, "page", rulerStyle); //$NON-NLS-0$
@@ -485,31 +485,31 @@
 	 * @class This is class represents an annotation for the AnnotationRuler. 
 	 * <p> 
 	 * <b>See:</b><br/> 
-	 * {@link orion.textview.AnnotationRuler}
+	 * {@link orion.editor.AnnotationRuler}
 	 * </p> 
 	 * 
-	 * @name orion.textview.Annotation 
+	 * @name orion.editor.Annotation 
 	 * 
 	 * @property {String} [html=""] The html content for the annotation, typically contains an image.
-	 * @property {orion.textview.Style} [style] the style for the annotation.
-	 * @property {orion.textview.Style} [overviewStyle] the style for the annotation in the overview ruler.
+	 * @property {orion.editor.Style} [style] the style for the annotation.
+	 * @property {orion.editor.Style} [overviewStyle] the style for the annotation in the overview ruler.
 	 */ 
 	/**
 	 * Constructs a new annotation ruler. 
 	 *
-	 * @param {orion.textview.AnnotationModel} annotationModel the annotation model for the ruler.
+	 * @param {orion.editor.AnnotationModel} annotationModel the annotation model for the ruler.
 	 * @param {String} [rulerLocation="left"] the location for the ruler.
-	 * @param {orion.textview.Style} [rulerStyle=undefined] the style for the ruler.
-	 * @param {orion.textview.Annotation} [defaultAnnotation] the default annotation.
+	 * @param {orion.editor.Style} [rulerStyle=undefined] the style for the ruler.
+	 * @param {orion.editor.Annotation} [defaultAnnotation] the default annotation.
 	 *
-	 * @augments orion.textview.Ruler
+	 * @augments orion.editor.Ruler
 	 * @class This objects implements an annotation ruler.
 	 *
 	 * <p><b>See:</b><br/>
-	 * {@link orion.textview.Ruler}<br/>
-	 * {@link orion.textview.Annotation}
+	 * {@link orion.editor.Ruler}<br/>
+	 * {@link orion.editor.Annotation}
 	 * </p>
-	 * @name orion.textview.AnnotationRuler
+	 * @name orion.editor.AnnotationRuler
 	 */
 	function AnnotationRuler (annotationModel, rulerLocation, rulerStyle) {
 		Ruler.call(this, annotationModel, rulerLocation, "page", rulerStyle); //$NON-NLS-0$
@@ -524,18 +524,18 @@
 	 * view to scroll to the annotated line.
 	 * </p>
 	 *
-	 * @param {orion.textview.AnnotationModel} annotationModel the annotation model for the ruler.
+	 * @param {orion.editor.AnnotationModel} annotationModel the annotation model for the ruler.
 	 * @param {String} [rulerLocation="left"] the location for the ruler.
-	 * @param {orion.textview.Style} [rulerStyle=undefined] the style for the ruler.
+	 * @param {orion.editor.Style} [rulerStyle=undefined] the style for the ruler.
 	 *
-	 * @augments orion.textview.Ruler
+	 * @augments orion.editor.Ruler
 	 * @class This objects implements an overview ruler.
 	 *
 	 * <p><b>See:</b><br/>
-	 * {@link orion.textview.AnnotationRuler} <br/>
-	 * {@link orion.textview.Ruler} 
+	 * {@link orion.editor.AnnotationRuler} <br/>
+	 * {@link orion.editor.Ruler} 
 	 * </p>
-	 * @name orion.textview.OverviewRuler
+	 * @name orion.editor.OverviewRuler
 	 */
 	function OverviewRuler (annotationModel, rulerLocation, rulerStyle) {
 		Ruler.call(this, annotationModel, rulerLocation, "document", rulerStyle); //$NON-NLS-0$
@@ -582,18 +582,18 @@
 	/**
 	 * Constructs a new folding ruler. 
 	 *
-	 * @param {orion.textview.AnnotationModel} annotationModel the annotation model for the ruler.
+	 * @param {orion.editor.AnnotationModel} annotationModel the annotation model for the ruler.
 	 * @param {String} [rulerLocation="left"] the location for the ruler.
-	 * @param {orion.textview.Style} [rulerStyle=undefined] the style for the ruler.
+	 * @param {orion.editor.Style} [rulerStyle=undefined] the style for the ruler.
 	 *
-	 * @augments orion.textview.Ruler
+	 * @augments orion.editor.Ruler
 	 * @class This objects implements an overview ruler.
 	 *
 	 * <p><b>See:</b><br/>
-	 * {@link orion.textview.AnnotationRuler} <br/>
-	 * {@link orion.textview.Ruler} 
+	 * {@link orion.editor.AnnotationRuler} <br/>
+	 * {@link orion.editor.Ruler} 
 	 * </p>
-	 * @name orion.textview.OverviewRuler
+	 * @name orion.editor.OverviewRuler
 	 */
 	function FoldingRuler (annotationModel, rulerLocation, rulerStyle) {
 		AnnotationRuler.call(this, annotationModel, rulerLocation, rulerStyle);
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textDND.js
similarity index 98%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/textDND.js
index 5900d6f..ac8c4c8 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textDND.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textDND.js
@@ -13,7 +13,7 @@
  
 /*global define */
 
-define("orion/textview/textDND", [], function() { //$NON-NLS-0$
+define("orion/editor/textDND", [], function() { //$NON-NLS-0$
 
 	function TextDND(view, undoStack) {
 		this._view = view;
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/editor/textMateStyler.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textMateStyler.js
index 0b44e45..3231bc7 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/editor/textMateStyler.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textMateStyler.js
@@ -540,7 +540,7 @@
 	 * 
 	 * @description Creates a new TextMateStyler.
 	 * @extends orion.editor.AbstractStyler
-	 * @param {orion.textview.TextView} textView The <code>TextView</code> to provide styling for.
+	 * @param {orion.editor.TextView} textView The <code>TextView</code> to provide styling for.
 	 * @param {Object} grammar The TextMate grammar to use for styling the <code>TextView</code>, as a JavaScript object. You can
 	 * produce this object by running a PList-to-JavaScript conversion tool on a TextMate <code>.tmLanguage</code> file.
 	 * @param {Object[]} [externalGrammars] Additional grammar objects that will be used to resolve named rule references.
@@ -1158,7 +1158,7 @@
 			}
 		},
 		/**
-		 * @param model {orion.textview.TextModel}
+		 * @param model {orion.editor.TextModel}
 		 * @param node {Node}
 		 * @param pos {Number}
 		 * @param [matchRulesOnly] {Boolean} Optional, if true only "match" subrules will be considered.
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textModel.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textModel.js
similarity index 93%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/textModel.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/textModel.js
index 2cb0330..f25f23d 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textModel.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textModel.js
@@ -13,7 +13,7 @@
  
 /*global define*/
 
-define("orion/textview/textModel", ['orion/textview/eventTarget', 'orion/textview/util'], function(mEventTarget, util) { //$NON-NLS-2$  //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/textModel", ['orion/editor/eventTarget', 'orion/editor/util'], function(mEventTarget, util) { //$NON-NLS-2$  //$NON-NLS-1$ //$NON-NLS-0$
 
 	/**
 	 * Constructs a new TextModel with the given text and default line delimiter.
@@ -21,19 +21,19 @@
 	 * @param {String} [text=""] the text that the model will store
 	 * @param {String} [lineDelimiter=platform delimiter] the line delimiter used when inserting new lines to the model.
 	 *
-	 * @name orion.textview.TextModel
+	 * @name orion.editor.TextModel
 	 * @class The TextModel is an interface that provides text for the view. Applications may
 	 * implement the TextModel interface to provide a custom store for the view content. The
 	 * view interacts with its text model in order to access and update the text that is being
 	 * displayed and edited in the view. This is the default implementation.
 	 * <p>
 	 * <b>See:</b><br/>
-	 * {@link orion.textview.TextView}<br/>
-	 * {@link orion.textview.TextView#setModel}
+	 * {@link orion.editor.TextView}<br/>
+	 * {@link orion.editor.TextView#setModel}
 	 * </p>
-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener
-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener
-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent
+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener
+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener
+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
 	 */
 	function TextModel(text, lineDelimiter) {
 		this._lastLineIndex = -1;
@@ -43,10 +43,10 @@
 		this.setLineDelimiter(lineDelimiter);
 	}
 
-	TextModel.prototype = /** @lends orion.textview.TextModel.prototype */ {
+	TextModel.prototype = /** @lends orion.editor.TextModel.prototype */ {
 		/**
 		 * @class This object describes the options to use while finding occurrences of a string in a text model.
-		 * @name orion.textview.FindOptions
+		 * @name orion.editor.FindOptions
 		 *
 		 * @property {String} string the search string to be found.
 		 * @property {Boolean} [regex=false] whether or not the search string is a regular expression.
@@ -61,9 +61,9 @@
 		 * @class This object represents a find occurrences iterator.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextModel#find}<br/>
+		 * {@link orion.editor.TextModel#find}<br/>
 		 * </p>		 
-		 * @name orion.textview.FindIterator
+		 * @name orion.editor.FindIterator
 		 * 
 		 * @property {Function} hasNext Determines whether there are more occurrences in the iterator.
 		 * @property {Function} next Returns the next matched range {start,end} in the iterator.
@@ -71,8 +71,8 @@
 		/**
 		 * Finds occurrences of a string in the text model.
 		 *
-		 * @param {orion.textview.FindOptions} options the search options
-		 * @return {orion.textview.FindIterator} the find occurrences iterator.
+		 * @param {orion.editor.FindOptions} options the search options
+		 * @return {orion.editor.FindIterator} the find occurrences iterator.
 		 */
 		find: function(options) {
 			if (this._text.length > 1) {
@@ -384,7 +384,7 @@
 		 * Notifies all listeners that the text is about to change.
 		 * <p>
 		 * This notification is intended to be used only by the view. Application clients should
-		 * use {@link orion.textview.TextView#event:onModelChanging}.
+		 * use {@link orion.editor.TextView#event:onModelChanging}.
 		 * </p>
 		 * <p>
 		 * NOTE: This method is not meant to called directly by application code. It is called internally by the TextModel
@@ -392,7 +392,7 @@
 		 * purposes and to allow integration with other toolkit frameworks.
 		 * </p>
 		 *
-		 * @param {orion.textview.ModelChangingEvent} modelChangingEvent the changing event
+		 * @param {orion.editor.ModelChangingEvent} modelChangingEvent the changing event
 		 */
 		onChanging: function(modelChangingEvent) {
 			return this.dispatchEvent(modelChangingEvent);
@@ -401,7 +401,7 @@
 		 * Notifies all listeners that the text has changed.
 		 * <p>
 		 * This notification is intended to be used only by the view. Application clients should
-		 * use {@link orion.textview.TextView#event:onModelChanged}.
+		 * use {@link orion.editor.TextView#event:onModelChanged}.
 		 * </p>
 		 * <p>
 		 * NOTE: This method is not meant to called directly by application code. It is called internally by the TextModel
@@ -409,7 +409,7 @@
 		 * purposes and to allow integration with other toolkit frameworks.
 		 * </p>
 		 *
-		 * @param {orion.textview.ModelChangedEvent} modelChangedEvent the changed event
+		 * @param {orion.editor.ModelChangedEvent} modelChangedEvent the changed event
 		 */
 		onChanged: function(modelChangedEvent) {
 			return this.dispatchEvent(modelChangedEvent);
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js
similarity index 97%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js
index 74e4510..d05ab8b 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textView.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textView.js
@@ -14,7 +14,7 @@
 
 /*global define*/
 
-define("orion/textview/textView", ['orion/textview/textModel', 'orion/textview/keyBinding', 'orion/textview/eventTarget', 'orion/textview/util'], function(mTextModel, mKeyBinding, mEventTarget, util) { //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+define("orion/editor/textView", ['orion/editor/textModel', 'orion/editor/keyBinding', 'orion/editor/eventTarget', 'orion/editor/util'], function(mTextModel, mKeyBinding, mEventTarget, util) { //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 
 	/** @private */
 	function getWindow(document) {
@@ -201,25 +201,25 @@
 	 * Constructs a new Selection object.
 	 * 
 	 * @class A Selection represents a range of selected text in the view.
-	 * @name orion.textview.Selection
+	 * @name orion.editor.Selection
 	 */
 	function Selection (start, end, caret) {
 		/**
 		 * The selection start offset.
 		 *
-		 * @name orion.textview.Selection#start
+		 * @name orion.editor.Selection#start
 		 */
 		this.start = start;
 		/**
 		 * The selection end offset.
 		 *
-		 * @name orion.textview.Selection#end
+		 * @name orion.editor.Selection#end
 		 */
 		this.end = end;
 		/** @private */
 		this.caret = caret; //true if the start, false if the caret is at end
 	}
-	Selection.prototype = /** @lends orion.textview.Selection.prototype */ {
+	Selection.prototype = /** @lends orion.editor.Selection.prototype */ {
 		/** @private */
 		clone: function() {
 			return new Selection(this.start, this.end, this.caret);
@@ -276,7 +276,7 @@
 		this.right = rect.right;
 		this.bottom = rect.bottom;
 	}
-	TextRect.prototype = /** @lends orion.textview.TextRect.prototype */ {
+	TextRect.prototype = /** @lends orion.editor.TextRect.prototype */ {
 		/** @private */
 		toString: function() {
 			return "{l=" + this.left + ", t=" + this.top + ", r=" + this.right + ", b=" + this.bottom + "}"; //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
@@ -286,28 +286,28 @@
 	 * Constructs a new TextLine object.
 	 * 
 	 * @class A TextLine represents a line of text in the view.
-	 * @name orion.textview.TextLine
+	 * @name orion.editor.TextLine
 	 * @private
 	 */
 	function TextLine (view, lineIndex, lineDiv) {
 		/**
 		 * The view.
 		 *
-		 * @name orion.textview.TextLine#view
+		 * @name orion.editor.TextLine#view
 		 * @private
 		 */
 		this.view = view;
 		/**
 		 * The line index.
 		 *
-		 * @name orion.textview.TextLine#lineIndex
+		 * @name orion.editor.TextLine#lineIndex
 		 * @private
 		 */
 		this.lineIndex = lineIndex;
 		
 		this._lineDiv = lineDiv;
 	}
-	TextLine.prototype = /** @lends orion.textview.TextLine.prototype */ {
+	TextLine.prototype = /** @lends orion.editor.TextLine.prototype */ {
 		/** @private */
 		create: function(parent, div) {
 			if (this._lineDiv) { return; }
@@ -1017,14 +1017,14 @@
 	 * @class This object describes the options for the text view.
 	 * <p>
 	 * <b>See:</b><br/>
-	 * {@link orion.textview.TextView}<br/>
-	 * {@link orion.textview.TextView#setOptions}
-	 * {@link orion.textview.TextView#getOptions}	 
+	 * {@link orion.editor.TextView}<br/>
+	 * {@link orion.editor.TextView#setOptions}
+	 * {@link orion.editor.TextView#getOptions}	 
 	 * </p>		 
-	 * @name orion.textview.TextViewOptions
+	 * @name orion.editor.TextViewOptions
 	 *
 	 * @property {String|DOMElement} parent the parent element for the view, it can be either a DOM element or an ID for a DOM element.
-	 * @property {orion.textview.TextModel} [model] the text model for the view. If it is not set the view creates an empty {@link orion.textview.TextModel}.
+	 * @property {orion.editor.TextModel} [model] the text model for the view. If it is not set the view creates an empty {@link orion.editor.TextModel}.
 	 * @property {Boolean} [readonly=false] whether or not the view is read-only.
 	 * @property {Boolean} [fullSelection=true] whether or not the view is in full selection mode.
 	 * @property {Boolean} [tabMode=true] whether or not the tab keypress is consumed by the view or is used for focus traversal.
@@ -1036,26 +1036,26 @@
 	/**
 	 * Constructs a new text view.
 	 * 
-	 * @param {orion.textview.TextViewOptions} options the view options.
+	 * @param {orion.editor.TextViewOptions} options the view options.
 	 * 
 	 * @class A TextView is a user interface for editing text.
-	 * @name orion.textview.TextView
-	 * @borrows orion.textview.EventTarget#addEventListener as #addEventListener
-	 * @borrows orion.textview.EventTarget#removeEventListener as #removeEventListener
-	 * @borrows orion.textview.EventTarget#dispatchEvent as #dispatchEvent
+	 * @name orion.editor.TextView
+	 * @borrows orion.editor.EventTarget#addEventListener as #addEventListener
+	 * @borrows orion.editor.EventTarget#removeEventListener as #removeEventListener
+	 * @borrows orion.editor.EventTarget#dispatchEvent as #dispatchEvent
 	 */
 	function TextView (options) {
 		this._init(options);
 	}
 	
-	TextView.prototype = /** @lends orion.textview.TextView.prototype */ {
+	TextView.prototype = /** @lends orion.editor.editor.prototype */ {
 		/**
 		 * Adds a ruler to the text view at the specified position.
 		 * <p>
 		 * The position is relative to the ruler location.
 		 * </p>
 		 *
-		 * @param {orion.textview.Ruler} ruler the ruler.
+		 * @param {orion.editor.Ruler} ruler the ruler.
 		 * @param {Number} [index=length] the ruler index.
 		 */
 		addRuler: function (ruler, index) {
@@ -1216,7 +1216,7 @@
 		/**
 		 * Returns the action description for a given action ID.
 		 *
-		 * @returns {orion.textview.ActionDescrition} the action description
+		 * @returns {orion.editor.ActionDescrition} the action description
 		 */
 		getActionDescription: function(actionID) {
 			var action = this._actions[actionID];
@@ -1395,7 +1395,7 @@
 		 * Returns all the key bindings associated to the given action ID.
 		 *
 		 * @param {String} actionID the action ID.
-		 * @returns {orion.textview.KeyBinding[]} the array of key bindings associated to the given action ID.
+		 * @returns {orion.editor.KeyBinding[]} the array of key bindings associated to the given action ID.
 		 *
 		 * @see #setKeyBinding
 		 * @see #setAction
@@ -1482,13 +1482,13 @@
 		/**
 		 * Returns the specified view options.
 		 * <p>
-		 * The returned value is either a <code>orion.textview.TextViewOptions</code> or an option value. An option value is returned when only one string paremeter
-		 * is specified. A <code>orion.textview.TextViewOptions</code> is returned when there are no paremeters, or the parameters are a list of options names or a
-		 * <code>orion.textview.TextViewOptions</code>. All view options are returned when there no paremeters.
+		 * The returned value is either a <code>orion.editor.TextViewOptions</code> or an option value. An option value is returned when only one string paremeter
+		 * is specified. A <code>orion.editor.TextViewOptions</code> is returned when there are no paremeters, or the parameters are a list of options names or a
+		 * <code>orion.editor.TextViewOptions</code>. All view options are returned when there no paremeters.
 		 * </p>
 		 *
-		 * @param {String|orion.textview.TextViewOptions} [options] The options to return.
-		 * @return {Object|orion.textview.TextViewOptions} The requested options or an option value.
+		 * @param {String|orion.editor.TextViewOptions} [options] The options to return.
+		 * @return {Object|orion.editor.TextViewOptions} The requested options or an option value.
 		 *
 		 * @see #setOptions
 		 */
@@ -1520,7 +1520,7 @@
 		/**
 		 * Returns the text model of the text view.
 		 *
-		 * @returns {orion.textview.TextModel} the text model of the view.
+		 * @returns {orion.editor.TextModel} the text model of the view.
 		 */
 		getModel: function() {
 			return this._model;
@@ -1560,7 +1560,7 @@
 		 * document. The character at end offset is not included in the selection.
 		 * </p>
 		 * 
-		 * @returns {orion.textview.Selection} the view selection
+		 * @returns {orion.editor.Selection} the view selection
 		 *
 		 * @see #setSelection
 		 */
@@ -1660,11 +1660,11 @@
 		 * @class This is the event sent when the user right clicks or otherwise invokes the context menu of the view. 
 		 * <p> 
 		 * <b>See:</b><br/> 
-		 * {@link orion.textview.TextView}<br/> 
-		 * {@link orion.textview.TextView#event:onContextMenu} 
+		 * {@link orion.editor.TextView}<br/> 
+		 * {@link orion.editor.TextView#event:onContextMenu} 
 		 * </p> 
 		 * 
-		 * @name orion.textview.ContextMenuEvent 
+		 * @name orion.editor.ContextMenuEvent 
 		 * 
 		 * @property {Number} x The pointer location on the x axis, relative to the document the user is editing. 
 		 * @property {Number} y The pointer location on the y axis, relative to the document the user is editing. 
@@ -1677,7 +1677,7 @@
 		 * This event is sent when the user invokes the view context menu. 
 		 * 
 		 * @event 
-		 * @param {orion.textview.ContextMenuEvent} contextMenuEvent the event 
+		 * @param {orion.editor.ContextMenuEvent} contextMenuEvent the event 
 		 */ 
 		onContextMenu: function(contextMenuEvent) {
 			return this.dispatchEvent(contextMenuEvent); 
@@ -1707,16 +1707,16 @@
 		 * @class This is the event sent when the text view is destroyed.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onDestroy}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onDestroy}
 		 * </p>
-		 * @name orion.textview.DestroyEvent
+		 * @name orion.editor.DestroyEvent
 		 */
 		/**
 		 * This event is sent when the text view has been destroyed.
 		 *
 		 * @event
-		 * @param {orion.textview.DestroyEvent} destroyEvent the event
+		 * @param {orion.editor.DestroyEvent} destroyEvent the event
 		 *
 		 * @see #destroy
 		 */
@@ -1727,10 +1727,10 @@
 		 * @class This object is used to define style information for the text view.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onLineStyle}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onLineStyle}
 		 * </p>		 
-		 * @name orion.textview.Style
+		 * @name orion.editor.Style
 		 * 
 		 * @property {String} styleClass A CSS class name.
 		 * @property {Object} style An object with CSS properties.
@@ -1741,36 +1741,36 @@
 		 * @class This object is used to style range.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onLineStyle}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onLineStyle}
 		 * </p>		 
-		 * @name orion.textview.StyleRange
+		 * @name orion.editor.StyleRange
 		 * 
 		 * @property {Number} start The start character offset, relative to the document, where the style should be applied.
 		 * @property {Number} end The end character offset (exclusive), relative to the document, where the style should be applied.
-		 * @property {orion.textview.Style} style The style for the range.
+		 * @property {orion.editor.Style} style The style for the range.
 		 */
 		/**
 		 * @class This is the event sent when the text view needs the style information for a line.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onLineStyle}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onLineStyle}
 		 * </p>		 
-		 * @name orion.textview.LineStyleEvent
+		 * @name orion.editor.LineStyleEvent
 		 * 
-		 * @property {orion.textview.TextView} textView The text view.		 
+		 * @property {orion.editor.TextView} textView The text view.		 
 		 * @property {Number} lineIndex The line index.
 		 * @property {String} lineText The line text.
 		 * @property {Number} lineStart The character offset, relative to document, of the first character in the line.
-		 * @property {orion.textview.Style} style The style for the entire line (output argument).
-		 * @property {orion.textview.StyleRange[]} ranges An array of style ranges for the line (output argument).		 
+		 * @property {orion.editor.Style} style The style for the entire line (output argument).
+		 * @property {orion.editor.StyleRange[]} ranges An array of style ranges for the line (output argument).		 
 		 */
 		/**
 		 * This event is sent when the text view needs the style information for a line.
 		 *
 		 * @event
-		 * @param {orion.textview.LineStyleEvent} lineStyleEvent the event
+		 * @param {orion.editor.LineStyleEvent} lineStyleEvent the event
 		 */
 		onLineStyle: function(lineStyleEvent) {
 			return this.dispatchEvent(lineStyleEvent);
@@ -1779,11 +1779,11 @@
 		 * @class This is the event sent when the text in the model has changed.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onModelChanged}<br/>
-		 * {@link orion.textview.TextModel#onChanged}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onModelChanged}<br/>
+		 * {@link orion.editor.TextModel#onChanged}
 		 * </p>
-		 * @name orion.textview.ModelChangedEvent
+		 * @name orion.editor.ModelChangedEvent
 		 * 
 		 * @property {Number} start The character offset in the model where the change has occurred.
 		 * @property {Number} removedCharCount The number of characters removed from the model.
@@ -1795,7 +1795,7 @@
 		 * This event is sent when the text in the model has changed.
 		 *
 		 * @event
-		 * @param {orion.textview.ModelChangedEvent} modelChangedEvent the event
+		 * @param {orion.editor.ModelChangedEvent} modelChangedEvent the event
 		 */
 		onModelChanged: function(modelChangedEvent) {
 			return this.dispatchEvent(modelChangedEvent);
@@ -1804,11 +1804,11 @@
 		 * @class This is the event sent when the text in the model is about to change.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onModelChanging}<br/>
-		 * {@link orion.textview.TextModel#onChanging}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onModelChanging}<br/>
+		 * {@link orion.editor.TextModel#onChanging}
 		 * </p>
-		 * @name orion.textview.ModelChangingEvent
+		 * @name orion.editor.ModelChangingEvent
 		 * 
 		 * @property {String} text The text that is about to be inserted in the model.
 		 * @property {Number} start The character offset in the model where the change will occur.
@@ -1821,7 +1821,7 @@
 		 * This event is sent when the text in the model is about to change.
 		 *
 		 * @event
-		 * @param {orion.textview.ModelChangingEvent} modelChangingEvent the event
+		 * @param {orion.editor.ModelChangingEvent} modelChangingEvent the event
 		 */
 		onModelChanging: function(modelChangingEvent) {
 			return this.dispatchEvent(modelChangingEvent);
@@ -1830,10 +1830,10 @@
 		 * @class This is the event sent when the text is modified by the text view.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onModify}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onModify}
 		 * </p>
-		 * @name orion.textview.ModifyEvent
+		 * @name orion.editor.ModifyEvent
 		 */
 		/**
 		 * This event is sent when the text view has changed text in the model.
@@ -1843,7 +1843,7 @@
 		 * </p>
 		 *
 		 * @event
-		 * @param {orion.textview.ModifyEvent} modifyEvent the event
+		 * @param {orion.editor.ModifyEvent} modifyEvent the event
 		 */
 		onModify: function(modifyEvent) {
 			return this.dispatchEvent(modifyEvent);
@@ -1867,19 +1867,19 @@
 		 * @class This is the event sent when the selection changes in the text view.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onSelection}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onSelection}
 		 * </p>		 
-		 * @name orion.textview.SelectionEvent
+		 * @name orion.editor.SelectionEvent
 		 * 
-		 * @property {orion.textview.Selection} oldValue The old selection.
-		 * @property {orion.textview.Selection} newValue The new selection.
+		 * @property {orion.editor.Selection} oldValue The old selection.
+		 * @property {orion.editor.Selection} newValue The new selection.
 		 */
 		/**
 		 * This event is sent when the text view selection has changed.
 		 *
 		 * @event
-		 * @param {orion.textview.SelectionEvent} selectionEvent the event
+		 * @param {orion.editor.SelectionEvent} selectionEvent the event
 		 */
 		onSelection: function(selectionEvent) {
 			return this.dispatchEvent(selectionEvent);
@@ -1888,10 +1888,10 @@
 		 * @class This is the event sent when the text view scrolls.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onScroll}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onScroll}
 		 * </p>		 
-		 * @name orion.textview.ScrollEvent
+		 * @name orion.editor.ScrollEvent
 		 * 
 		 * @property oldValue The old scroll {x,y}.
 		 * @property newValue The new scroll {x,y}.
@@ -1900,7 +1900,7 @@
 		 * This event is sent when the text view scrolls vertically or horizontally.
 		 *
 		 * @event
-		 * @param {orion.textview.ScrollEvent} scrollEvent the event
+		 * @param {orion.editor.ScrollEvent} scrollEvent the event
 		 */
 		onScroll: function(scrollEvent) {
 			return this.dispatchEvent(scrollEvent);
@@ -1909,10 +1909,10 @@
 		 * @class This is the event sent when the text is about to be modified by the text view.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onVerify}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onVerify}
 		 * </p>
-		 * @name orion.textview.VerifyEvent
+		 * @name orion.editor.VerifyEvent
 		 * 
 		 * @property {String} text The text being inserted.
 		 * @property {Number} start The start offset of the text range to be replaced.
@@ -1930,7 +1930,7 @@
 		 * </p>
 		 *
 		 * @event
-		 * @param {orion.textview.VerifyEvent} verifyEvent the event
+		 * @param {orion.editor.VerifyEvent} verifyEvent the event
 		 */
 		onVerify: function(verifyEvent) {
 			return this.dispatchEvent(verifyEvent);
@@ -1939,16 +1939,16 @@
 		 * @class This is the event sent when the text view is focused.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onFocus}<br/>
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onFocus}<br/>
 		 * </p>
-		 * @name orion.textview.FocusEvent
+		 * @name orion.editor.FocusEvent
 		 */
 		/**
 		 * This event is sent when the text view is focused.
 		 *
 		 * @event
-		 * @param {orion.textview.FocusEvent} focusEvent the event
+		 * @param {orion.editor.FocusEvent} focusEvent the event
 		 */
 		onFocus: function(focusEvent) {
 			return this.dispatchEvent(focusEvent);
@@ -1957,16 +1957,16 @@
 		 * @class This is the event sent when the text view goes out of focus.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#event:onBlur}<br/>
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#event:onBlur}<br/>
 		 * </p>
-		 * @name orion.textview.BlurEvent
+		 * @name orion.editor.BlurEvent
 		 */
 		/**
 		 * This event is sent when the text view goes out of focus.
 		 *
 		 * @event
-		 * @param {orion.textview.BlurEvent} blurEvent the event
+		 * @param {orion.editor.BlurEvent} blurEvent the event
 		 */
 		onBlur: function(blurEvent) {
 			return this.dispatchEvent(blurEvent);
@@ -2075,7 +2075,7 @@
 		/**
 		 * Removes a ruler from the text view.
 		 *
-		 * @param {orion.textview.Ruler} ruler the ruler.
+		 * @param {orion.editor.Ruler} ruler the ruler.
 		 */
 		removeRuler: function (ruler) {
 			var rulers = this._rulers;
@@ -2097,10 +2097,10 @@
 		 * @class This object describes an action for the text view.
 		 * <p>
 		 * <b>See:</b><br/>
-		 * {@link orion.textview.TextView}<br/>
-		 * {@link orion.textview.TextView#setAction}
+		 * {@link orion.editor.TextView}<br/>
+		 * {@link orion.editor.TextView#setAction}
 		 * </p>		 
-		 * @name orion.textview.ActionDescription
+		 * @name orion.editor.ActionDescription
 		 *
 		 * @property {String} [name] the name to be used when showing the action as text.
 		 */
@@ -2114,7 +2114,7 @@
 		 *
 		 * @param {String} actionID the action ID.
 		 * @param {Function} handler the action handler.
-		 * @param {orion.textview.ActionDescription} [actionDescription=undefined] the action description.
+		 * @param {orion.editor.ActionDescription} [actionDescription=undefined] the action description.
 		 *
 		 * @see #getActions
 		 * @see #invokeAction
@@ -2134,7 +2134,7 @@
 		 * association with the specified key binding is overwriten. If the
 		 * action ID is <code>null</code>, the association is removed.
 		 * 
-		 * @param {orion.textview.KeyBinding} keyBinding the key binding
+		 * @param {orion.editor.KeyBinding} keyBinding the key binding
 		 * @param {String} actionID the action ID
 		 */
 		setKeyBinding: function(keyBinding, actionID) {
@@ -2218,7 +2218,7 @@
 		/**
 		 * Sets the text model of the text view.
 		 *
-		 * @param {orion.textview.TextModel} model the text model of the view.
+		 * @param {orion.editor.TextModel} model the text model of the view.
 		 */
 		setModel: function(model) {
 			if (!model) { return; }
@@ -2258,7 +2258,7 @@
 		/**
 		 * Sets the view options for the view.
 		 *
-		 * @param {orion.textview.TextViewOptions} options the view options.
+		 * @param {orion.editor.TextViewOptions} options the view options.
 		 * 
 		 * @see #getOptions
 		 */
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/textview.css b/bundles/org.eclipse.orion.client.editor/web/orion/editor/textview.css
similarity index 100%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/textview.css
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/textview.css
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/tooltip.css b/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.css
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/tooltip.css
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.css
index 5bde00e..a3f15fc 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/tooltip.css
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.css
@@ -1,28 +1,28 @@
-.tooltip .textview {

-	color: InfoText !important;

-	background-color: InfoBackground !important;

-	padding: 0px;

-}

-

-/* Styles for the view tooltips */

-.textviewTooltip {

-	font-family: monospace;

-	font-size: 10pt;

-	background-color: InfoBackground;

-	color: InfoText;

-	padding: 2px;

-	border-radius: 4px;

-	border: 1px solid black;

-	z-index: 100;

-	position: fixed;

-	overflow: hidden;

-	white-space: pre;

-}

-.textviewTooltip em {

-	font-style: normal;

-	font-weight: bold;

-}

-

-.tooltip .annotationLine.currentLine {

-	background-color: transparent;

+.tooltip .textview {
+	color: InfoText !important;
+	background-color: InfoBackground !important;
+	padding: 0px;
+}
+
+/* Styles for the view tooltips */
+.textviewTooltip {
+	font-family: monospace;
+	font-size: 10pt;
+	background-color: InfoBackground;
+	color: InfoText;
+	padding: 2px;
+	border-radius: 4px;
+	border: 1px solid black;
+	z-index: 100;
+	position: fixed;
+	overflow: hidden;
+	white-space: pre;
+}
+.textviewTooltip em {
+	font-style: normal;
+	font-weight: bold;
+}
+
+.tooltip .annotationLine.currentLine {
+	background-color: transparent;
 }
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/tooltip.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js
similarity index 96%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/tooltip.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js
index b2657d1..58b0ccb 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/tooltip.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/tooltip.js
@@ -1,263 +1,263 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2010, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: IBM Corporation - initial API and implementation

- ******************************************************************************/

-

-/*global define Node */

-

-define("orion/textview/tooltip", [ //$NON-NLS-0$

-	'i18n!orion/textview/nls/messages', //$NON-NLS-0$

-	'orion/textview/textView', //$NON-NLS-0$

-	'orion/textview/textModel', //$NON-NLS-0$

-	'orion/textview/projectionTextModel', //$NON-NLS-0$

-	'orion/textview/util' //$NON-NLS-0$

-], function(messages, mTextView, mTextModel, mProjectionTextModel, util) {

-

-	/** @private */

-	function Tooltip (view) {

-		this._view = view;

-		this._create(view.getOptions("parent").ownerDocument); //$NON-NLS-0$

-		view.addEventListener("Destroy", this, this.destroy); //$NON-NLS-0$

-	}

-	Tooltip.getTooltip = function(view) {

-		if (!view._tooltip) {

-			 view._tooltip = new Tooltip(view);

-		}

-		return view._tooltip;

-	};

-	Tooltip.prototype = /** @lends orion.textview.Tooltip.prototype */ {

-		_create: function(document) {

-			if (this._tooltipDiv) { return; }

-			var tooltipDiv = this._tooltipDiv = util.createElement(document, "div"); //$NON-NLS-0$

-			tooltipDiv.className = "textviewTooltip"; //$NON-NLS-0$

-			tooltipDiv.setAttribute("aria-live", "assertive"); //$NON-NLS-1$ //$NON-NLS-0$

-			tooltipDiv.setAttribute("aria-atomic", "true"); //$NON-NLS-1$ //$NON-NLS-0$

-			var tooltipContents = this._tooltipContents = util.createElement(document, "div"); //$NON-NLS-0$

-			tooltipDiv.appendChild(tooltipContents);

-			document.body.appendChild(tooltipDiv);

-			this.hide();

-		},

-		_getWindow: function() {

-			var document = this._tooltipDiv.ownerDocument;

-			return document.defaultView || document.parentWindow;

-		},

-		destroy: function() {

-			if (!this._tooltipDiv) { return; }

-			this.hide();

-			var parent = this._tooltipDiv.parentNode;

-			if (parent) { parent.removeChild(this._tooltipDiv); }

-			this._tooltipDiv = null;

-		},

-		hide: function() {

-			if (this._contentsView) {

-				this._contentsView.destroy();

-				this._contentsView = null;

-			}

-			if (this._tooltipContents) {

-				this._tooltipContents.innerHTML = "";

-			}

-			if (this._tooltipDiv) {

-				this._tooltipDiv.style.visibility = "hidden"; //$NON-NLS-0$

-			}

-			var window = this._getWindow();

-			if (this._showTimeout) {

-				window.clearTimeout(this._showTimeout);

-				this._showTimeout = null;

-			}

-			if (this._hideTimeout) {

-				window.clearTimeout(this._hideTimeout);

-				this._hideTimeout = null;

-			}

-			if (this._fadeTimeout) {

-				window.clearInterval(this._fadeTimeout);

-				this._fadeTimeout = null;

-			}

-		},

-		isVisible: function() {

-			return this._tooltipDiv && this._tooltipDiv.style.visibility === "visible"; //$NON-NLS-0$

-		},

-		setTarget: function(target, delay) {

-			if (this.target === target) { return; }

-			this._target = target;

-			this.hide();

-			if (target) {

-				var self = this;

-				if(delay === 0) {

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2010, 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ * 
+ * Contributors: IBM Corporation - initial API and implementation
+ ******************************************************************************/
+
+/*global define Node */
+
+define("orion/editor/tooltip", [ //$NON-NLS-0$
+	'i18n!orion/editor/nls/messages', //$NON-NLS-0$
+	'orion/editor/textView', //$NON-NLS-0$
+	'orion/editor/textModel', //$NON-NLS-0$
+	'orion/editor/projectionTextModel', //$NON-NLS-0$
+	'orion/editor/util' //$NON-NLS-0$
+], function(messages, mTextView, mTextModel, mProjectionTextModel, util) {
+
+	/** @private */
+	function Tooltip (view) {
+		this._view = view;
+		this._create(view.getOptions("parent").ownerDocument); //$NON-NLS-0$
+		view.addEventListener("Destroy", this, this.destroy); //$NON-NLS-0$
+	}
+	Tooltip.getTooltip = function(view) {
+		if (!view._tooltip) {
+			 view._tooltip = new Tooltip(view);
+		}
+		return view._tooltip;
+	};
+	Tooltip.prototype = /** @lends orion.editor.Tooltip.prototype */ {
+		_create: function(document) {
+			if (this._tooltipDiv) { return; }
+			var tooltipDiv = this._tooltipDiv = util.createElement(document, "div"); //$NON-NLS-0$
+			tooltipDiv.className = "textviewTooltip"; //$NON-NLS-0$
+			tooltipDiv.setAttribute("aria-live", "assertive"); //$NON-NLS-1$ //$NON-NLS-0$
+			tooltipDiv.setAttribute("aria-atomic", "true"); //$NON-NLS-1$ //$NON-NLS-0$
+			var tooltipContents = this._tooltipContents = util.createElement(document, "div"); //$NON-NLS-0$
+			tooltipDiv.appendChild(tooltipContents);
+			document.body.appendChild(tooltipDiv);
+			this.hide();
+		},
+		_getWindow: function() {
+			var document = this._tooltipDiv.ownerDocument;
+			return document.defaultView || document.parentWindow;
+		},
+		destroy: function() {
+			if (!this._tooltipDiv) { return; }
+			this.hide();
+			var parent = this._tooltipDiv.parentNode;
+			if (parent) { parent.removeChild(this._tooltipDiv); }
+			this._tooltipDiv = null;
+		},
+		hide: function() {
+			if (this._contentsView) {
+				this._contentsView.destroy();
+				this._contentsView = null;
+			}
+			if (this._tooltipContents) {
+				this._tooltipContents.innerHTML = "";
+			}
+			if (this._tooltipDiv) {
+				this._tooltipDiv.style.visibility = "hidden"; //$NON-NLS-0$
+			}
+			var window = this._getWindow();
+			if (this._showTimeout) {
+				window.clearTimeout(this._showTimeout);
+				this._showTimeout = null;
+			}
+			if (this._hideTimeout) {
+				window.clearTimeout(this._hideTimeout);
+				this._hideTimeout = null;
+			}
+			if (this._fadeTimeout) {
+				window.clearInterval(this._fadeTimeout);
+				this._fadeTimeout = null;
+			}
+		},
+		isVisible: function() {
+			return this._tooltipDiv && this._tooltipDiv.style.visibility === "visible"; //$NON-NLS-0$
+		},
+		setTarget: function(target, delay) {
+			if (this.target === target) { return; }
+			this._target = target;
+			this.hide();
+			if (target) {
+				var self = this;
+				if(delay === 0) {
 					self.show(true);
-				}

-				else {

-				var window = this._getWindow();

-					self._showTimeout = window.setTimeout(function() {

-						self.show(true);

-					}, delay ? delay : 500);

 				}
-			}

-		},

-		show: function(autoHide) {

-			if (!this._target) { return; }

-			var info = this._target.getTooltipInfo();

-			if (!info) { return; }

-			var tooltipDiv = this._tooltipDiv, tooltipContents = this._tooltipContents;

-			tooltipDiv.style.left = tooltipDiv.style.right = tooltipDiv.style.width = tooltipDiv.style.height = 

-				tooltipContents.style.width = tooltipContents.style.height = "auto"; //$NON-NLS-0$

-			var contents = info.contents;

-			if (contents instanceof Array) {

-				contents = this._getAnnotationContents(contents);

-			}

-			if (typeof contents === "string") { //$NON-NLS-0$

-				tooltipContents.innerHTML = contents;

-			} else if (this._isNode(contents)) {

-				tooltipContents.appendChild(contents);

-			} else if (contents instanceof mProjectionTextModel.ProjectionTextModel) {

-				var view = this._view;

-				var options = view.getOptions();

-				options.wrapMode = false;

-				options.parent = tooltipContents;

-				var tooltipTheme = "tooltip"; //$NON-NLS-0$

-				var theme = options.themeClass;

-				if (theme) {

-					theme = theme.replace(tooltipTheme, "");

-					if (theme) { theme = " " + theme; } //$NON-NLS-0$

-					theme = tooltipTheme + theme;

-				} else {

-					theme = tooltipTheme;

-				}

-				options.themeClass = theme;

-				var contentsView = this._contentsView = new mTextView.TextView(options);

-				//TODO this is need to avoid Firefox from getting focus

-				contentsView._clientDiv.contentEditable = false;

-				//TODO need to find a better way of sharing the styler for multiple views

-				var listener = {

-					onLineStyle: function(e) {

-						view.onLineStyle(e);

-					}

-				};

-				contentsView.addEventListener("LineStyle", listener.onLineStyle); //$NON-NLS-0$

-				contentsView.setModel(contents);

-				var size = contentsView.computeSize();

-				tooltipContents.style.width = (size.width + 20) + "px"; //$NON-NLS-0$

-				tooltipContents.style.height = size.height + "px"; //$NON-NLS-0$

-				contentsView.resize();

-			} else {

-				return;

-			}

-			var documentElement = tooltipDiv.ownerDocument.documentElement;

-			if (info.anchor === "right") { //$NON-NLS-0$

-				var right = documentElement.clientWidth - info.x;

-				tooltipDiv.style.right = right + "px"; //$NON-NLS-0$

-				tooltipDiv.style.maxWidth = (documentElement.clientWidth - right - 10) + "px"; //$NON-NLS-0$

-			} else {

-				var left = parseInt(this._getNodeStyle(tooltipDiv, "padding-left", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$

-				left += parseInt(this._getNodeStyle(tooltipDiv, "border-left-width", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$

-				left = info.x - left;

-				tooltipDiv.style.left = left + "px"; //$NON-NLS-0$

-				tooltipDiv.style.maxWidth = (documentElement.clientWidth - left - 10) + "px"; //$NON-NLS-0$

-			}

-			var top = parseInt(this._getNodeStyle(tooltipDiv, "padding-top", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$

-			top += parseInt(this._getNodeStyle(tooltipDiv, "border-top-width", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$

-			top = info.y - top;

-			tooltipDiv.style.top = top + "px"; //$NON-NLS-0$

-			tooltipDiv.style.maxHeight = (documentElement.clientHeight - top - 10) + "px"; //$NON-NLS-0$

-			tooltipDiv.style.opacity = "1"; //$NON-NLS-0$

-			tooltipDiv.style.visibility = "visible"; //$NON-NLS-0$

-			if (autoHide) {

-				var self = this;

-				var window = this._getWindow();

-				self._hideTimeout = window.setTimeout(function() {

-					var opacity = parseFloat(self._getNodeStyle(tooltipDiv, "opacity", "1")); //$NON-NLS-1$ //$NON-NLS-0$

-					self._fadeTimeout = window.setInterval(function() {

-						if (tooltipDiv.style.visibility === "visible" && opacity > 0) { //$NON-NLS-0$

-							opacity -= 0.1;

-							tooltipDiv.style.opacity = opacity;

-							return;

-						}

-						self.hide();

-					}, 50);

-				}, 5000);

-			}

-		},

-		_getAnnotationContents: function(annotations) {

-			if (annotations.length === 0) {

-				return null;

-			}

-			var model = this._view.getModel(), annotation;

-			var baseModel = model.getBaseModel ? model.getBaseModel() : model;

-			function getText(start, end) {

-				var textStart = baseModel.getLineStart(baseModel.getLineAtOffset(start));

-				var textEnd = baseModel.getLineEnd(baseModel.getLineAtOffset(end), true);

-				return baseModel.getText(textStart, textEnd);

-			}

-			function getAnnotationHTML(annotation) {

-				var title = annotation.title;

-				if (title === "") { return null; }

-				var result = "<div>"; //$NON-NLS-0$

-				if (annotation.html) {

-					result += annotation.html + "&nbsp;"; //$NON-NLS-0$

-				}

-				if (!title) {

-					title = getText(annotation.start, annotation.end);

-				}

-				title = title.replace(/</g, "&lt;").replace(/>/g, "&gt;"); //$NON-NLS-1$ //$NON-NLS-0$

-				result += "<span style='vertical-align:middle;'>" + title + "</span><div>"; //$NON-NLS-1$ //$NON-NLS-0$

-				return result;

-			}

-			if (annotations.length === 1) {

-				annotation = annotations[0];

-				if (annotation.title !== undefined) {

-					return getAnnotationHTML(annotation);

-				} else {

-					var newModel = new mProjectionTextModel.ProjectionTextModel(baseModel);

-					var lineStart = baseModel.getLineStart(baseModel.getLineAtOffset(annotation.start));

-					var charCount = baseModel.getCharCount();

-					if (annotation.end !== charCount) {

-						newModel.addProjection({start: annotation.end, end: charCount});

-					}

-					if (lineStart > 0) {

-						newModel.addProjection({start: 0, end: lineStart});

-					}

-					return newModel;

-				}

-			} else {

-				var tooltipHTML = "<div><em>" + messages.multipleAnnotations + "</em></div>"; //$NON-NLS-1$ //$NON-NLS-0$

-				for (var i = 0; i < annotations.length; i++) {

-					annotation = annotations[i];

-					var html = getAnnotationHTML(annotation);

-					if (html) {

-						tooltipHTML += html;

-					}

-				}

-				return tooltipHTML;

-			}

-		},

-		_getNodeStyle: function(node, prop, defaultValue) {

-			var value;

-			if (node) {

-				value = node.style[prop];

-				if (!value) {

-					if (node.currentStyle) {

-						var index = 0, p = prop;

-						while ((index = p.indexOf("-", index)) !== -1) { //$NON-NLS-0$

-							p = p.substring(0, index) + p.substring(index + 1, index + 2).toUpperCase() + p.substring(index + 2);

-						}

-						value = node.currentStyle[p];

-					} else {

-						var css = node.ownerDocument.defaultView.getComputedStyle(node, null);

-						value = css ? css.getPropertyValue(prop) : null;

-					}

-				}

-			}

-			return value || defaultValue;

-		},

-		_isNode: function (obj) {

-			return typeof Node === "object" ? obj instanceof Node : //$NON-NLS-0$

-				obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-		}

-	};

-	return {Tooltip: Tooltip};

-});

+				else {
+				var window = this._getWindow();
+					self._showTimeout = window.setTimeout(function() {
+						self.show(true);
+					}, delay ? delay : 500);
+				}
+			}
+		},
+		show: function(autoHide) {
+			if (!this._target) { return; }
+			var info = this._target.getTooltipInfo();
+			if (!info) { return; }
+			var tooltipDiv = this._tooltipDiv, tooltipContents = this._tooltipContents;
+			tooltipDiv.style.left = tooltipDiv.style.right = tooltipDiv.style.width = tooltipDiv.style.height = 
+				tooltipContents.style.width = tooltipContents.style.height = "auto"; //$NON-NLS-0$
+			var contents = info.contents;
+			if (contents instanceof Array) {
+				contents = this._getAnnotationContents(contents);
+			}
+			if (typeof contents === "string") { //$NON-NLS-0$
+				tooltipContents.innerHTML = contents;
+			} else if (this._isNode(contents)) {
+				tooltipContents.appendChild(contents);
+			} else if (contents instanceof mProjectionTextModel.ProjectionTextModel) {
+				var view = this._view;
+				var options = view.getOptions();
+				options.wrapMode = false;
+				options.parent = tooltipContents;
+				var tooltipTheme = "tooltip"; //$NON-NLS-0$
+				var theme = options.themeClass;
+				if (theme) {
+					theme = theme.replace(tooltipTheme, "");
+					if (theme) { theme = " " + theme; } //$NON-NLS-0$
+					theme = tooltipTheme + theme;
+				} else {
+					theme = tooltipTheme;
+				}
+				options.themeClass = theme;
+				var contentsView = this._contentsView = new mTextView.TextView(options);
+				//TODO this is need to avoid Firefox from getting focus
+				contentsView._clientDiv.contentEditable = false;
+				//TODO need to find a better way of sharing the styler for multiple views
+				var listener = {
+					onLineStyle: function(e) {
+						view.onLineStyle(e);
+					}
+				};
+				contentsView.addEventListener("LineStyle", listener.onLineStyle); //$NON-NLS-0$
+				contentsView.setModel(contents);
+				var size = contentsView.computeSize();
+				tooltipContents.style.width = (size.width + 20) + "px"; //$NON-NLS-0$
+				tooltipContents.style.height = size.height + "px"; //$NON-NLS-0$
+				contentsView.resize();
+			} else {
+				return;
+			}
+			var documentElement = tooltipDiv.ownerDocument.documentElement;
+			if (info.anchor === "right") { //$NON-NLS-0$
+				var right = documentElement.clientWidth - info.x;
+				tooltipDiv.style.right = right + "px"; //$NON-NLS-0$
+				tooltipDiv.style.maxWidth = (documentElement.clientWidth - right - 10) + "px"; //$NON-NLS-0$
+			} else {
+				var left = parseInt(this._getNodeStyle(tooltipDiv, "padding-left", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$
+				left += parseInt(this._getNodeStyle(tooltipDiv, "border-left-width", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$
+				left = info.x - left;
+				tooltipDiv.style.left = left + "px"; //$NON-NLS-0$
+				tooltipDiv.style.maxWidth = (documentElement.clientWidth - left - 10) + "px"; //$NON-NLS-0$
+			}
+			var top = parseInt(this._getNodeStyle(tooltipDiv, "padding-top", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$
+			top += parseInt(this._getNodeStyle(tooltipDiv, "border-top-width", "0"), 10); //$NON-NLS-1$ //$NON-NLS-0$
+			top = info.y - top;
+			tooltipDiv.style.top = top + "px"; //$NON-NLS-0$
+			tooltipDiv.style.maxHeight = (documentElement.clientHeight - top - 10) + "px"; //$NON-NLS-0$
+			tooltipDiv.style.opacity = "1"; //$NON-NLS-0$
+			tooltipDiv.style.visibility = "visible"; //$NON-NLS-0$
+			if (autoHide) {
+				var self = this;
+				var window = this._getWindow();
+				self._hideTimeout = window.setTimeout(function() {
+					var opacity = parseFloat(self._getNodeStyle(tooltipDiv, "opacity", "1")); //$NON-NLS-1$ //$NON-NLS-0$
+					self._fadeTimeout = window.setInterval(function() {
+						if (tooltipDiv.style.visibility === "visible" && opacity > 0) { //$NON-NLS-0$
+							opacity -= 0.1;
+							tooltipDiv.style.opacity = opacity;
+							return;
+						}
+						self.hide();
+					}, 50);
+				}, 5000);
+			}
+		},
+		_getAnnotationContents: function(annotations) {
+			if (annotations.length === 0) {
+				return null;
+			}
+			var model = this._view.getModel(), annotation;
+			var baseModel = model.getBaseModel ? model.getBaseModel() : model;
+			function getText(start, end) {
+				var textStart = baseModel.getLineStart(baseModel.getLineAtOffset(start));
+				var textEnd = baseModel.getLineEnd(baseModel.getLineAtOffset(end), true);
+				return baseModel.getText(textStart, textEnd);
+			}
+			function getAnnotationHTML(annotation) {
+				var title = annotation.title;
+				if (title === "") { return null; }
+				var result = "<div>"; //$NON-NLS-0$
+				if (annotation.html) {
+					result += annotation.html + "&nbsp;"; //$NON-NLS-0$
+				}
+				if (!title) {
+					title = getText(annotation.start, annotation.end);
+				}
+				title = title.replace(/</g, "&lt;").replace(/>/g, "&gt;"); //$NON-NLS-1$ //$NON-NLS-0$
+				result += "<span style='vertical-align:middle;'>" + title + "</span><div>"; //$NON-NLS-1$ //$NON-NLS-0$
+				return result;
+			}
+			if (annotations.length === 1) {
+				annotation = annotations[0];
+				if (annotation.title !== undefined) {
+					return getAnnotationHTML(annotation);
+				} else {
+					var newModel = new mProjectionTextModel.ProjectionTextModel(baseModel);
+					var lineStart = baseModel.getLineStart(baseModel.getLineAtOffset(annotation.start));
+					var charCount = baseModel.getCharCount();
+					if (annotation.end !== charCount) {
+						newModel.addProjection({start: annotation.end, end: charCount});
+					}
+					if (lineStart > 0) {
+						newModel.addProjection({start: 0, end: lineStart});
+					}
+					return newModel;
+				}
+			} else {
+				var tooltipHTML = "<div><em>" + messages.multipleAnnotations + "</em></div>"; //$NON-NLS-1$ //$NON-NLS-0$
+				for (var i = 0; i < annotations.length; i++) {
+					annotation = annotations[i];
+					var html = getAnnotationHTML(annotation);
+					if (html) {
+						tooltipHTML += html;
+					}
+				}
+				return tooltipHTML;
+			}
+		},
+		_getNodeStyle: function(node, prop, defaultValue) {
+			var value;
+			if (node) {
+				value = node.style[prop];
+				if (!value) {
+					if (node.currentStyle) {
+						var index = 0, p = prop;
+						while ((index = p.indexOf("-", index)) !== -1) { //$NON-NLS-0$
+							p = p.substring(0, index) + p.substring(index + 1, index + 2).toUpperCase() + p.substring(index + 2);
+						}
+						value = node.currentStyle[p];
+					} else {
+						var css = node.ownerDocument.defaultView.getComputedStyle(node, null);
+						value = css ? css.getPropertyValue(prop) : null;
+					}
+				}
+			}
+			return value || defaultValue;
+		},
+		_isNode: function (obj) {
+			return typeof Node === "object" ? obj instanceof Node : //$NON-NLS-0$
+				obj && typeof obj === "object" && typeof obj.nodeType === "number" && typeof obj.nodeName === "string"; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+		}
+	};
+	return {Tooltip: Tooltip};
+});
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/undoStack.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
similarity index 96%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/undoStack.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
index bb19aaf..f0c27c6 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/undoStack.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/undoStack.js
@@ -11,13 +11,13 @@
 
 /*global define */
 
-define("orion/textview/undoStack", [], function() { //$NON-NLS-0$
+define("orion/editor/undoStack", [], function() { //$NON-NLS-0$
 
 	/** 
 	 * Constructs a new Change object.
 	 * 
 	 * @class 
-	 * @name orion.textview.Change
+	 * @name orion.editor.Change
 	 * @private
 	 */
 	function Change(offset, text, previousText) {
@@ -69,7 +69,7 @@
 	 * Constructs a new CompoundChange object.
 	 * 
 	 * @class 
-	 * @name orion.textview.CompoundChange
+	 * @name orion.editor.CompoundChange
 	 * @private
 	 */
 	function CompoundChange () {
@@ -117,16 +117,16 @@
 	/**
 	 * Constructs a new UndoStack on a text view.
 	 *
-	 * @param {orion.textview.TextView} view the text view for the undo stack.
+	 * @param {orion.editor.TextView} view the text view for the undo stack.
 	 * @param {Number} [size=100] the size for the undo stack.
 	 *
-	 * @name orion.textview.UndoStack
+	 * @name orion.editor.UndoStack
 	 * @class The UndoStack is used to record the history of a text model associated to an view. Every
 	 * change to the model is added to stack, allowing the application to undo and redo these changes.
 	 *
 	 * <p>
 	 * <b>See:</b><br/>
-	 * {@link orion.textview.TextView}<br/>
+	 * {@link orion.editor.TextView}<br/>
 	 * </p>
 	 */
 	function UndoStack (view, size) {
@@ -150,7 +150,7 @@
 		model.addEventListener("Changing", this._listener.onChanging); //$NON-NLS-0$
 		view.addEventListener("Destroy", this._listener.onDestroy); //$NON-NLS-0$
 	}
-	UndoStack.prototype = /** @lends orion.textview.UndoStack.prototype */ {
+	UndoStack.prototype = /** @lends orion.editor.UndoStack.prototype */ {
 		/**
 		 * Adds a change to the stack.
 		 * 
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/util.js b/bundles/org.eclipse.orion.client.editor/web/orion/editor/util.js
similarity index 99%
rename from bundles/org.eclipse.orion.client.editor/web/orion/textview/util.js
rename to bundles/org.eclipse.orion.client.editor/web/orion/editor/util.js
index 055ff17..659f285 100644
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/util.js
+++ b/bundles/org.eclipse.orion.client.editor/web/orion/editor/util.js
@@ -1,68 +1,68 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- *

- * Contributors: IBM Corporation - initial API and implementation

- *******************************************************************************/

-

-/*global define navigator*/

-define(function() {

-

-	var userAgent = navigator.userAgent;

-	var isIE = parseFloat(userAgent.split("MSIE")[1]) || undefined; //$NON-NLS-0$

-	var isFirefox = parseFloat(userAgent.split("Firefox/")[1] || userAgent.split("Minefield/")[1]) || undefined; //$NON-NLS-1$ //$NON-NLS-0$

-	var isOpera = userAgent.indexOf("Opera") !== -1; //$NON-NLS-0$

-	var isChrome = parseFloat(userAgent.split("Chrome/")[1]) || undefined; //$NON-NLS-0$

-	var isSafari = userAgent.indexOf("Safari") !== -1 && !isChrome; //$NON-NLS-0$

-	var isWebkit = parseFloat(userAgent.split("WebKit/")[1]) || undefined; //$NON-NLS-0$

-	var isAndroid = userAgent.indexOf("Android") !== -1; //$NON-NLS-0$

-	var isIPad = userAgent.indexOf("iPad") !== -1; //$NON-NLS-0$

-	var isIPhone = userAgent.indexOf("iPhone") !== -1; //$NON-NLS-0$

-	var isIOS = isIPad || isIPhone;

-	var isMac = navigator.platform.indexOf("Mac") !== -1; //$NON-NLS-0$

-	var isWindows = navigator.platform.indexOf("Win") !== -1; //$NON-NLS-0$

-	var isLinux = navigator.platform.indexOf("Linux") !== -1; //$NON-NLS-0$

-	var platformDelimiter = isWindows ? "\r\n" : "\n"; //$NON-NLS-1$ //$NON-NLS-0$

-

-	function formatMessage(msg) {

-		var args = arguments;

-		return msg.replace(/\$\{([^\}]+)\}/g, function(str, index) { return args[(index << 0) + 1]; });

-	}

-	

-	var XHTML = "http://www.w3.org/1999/xhtml"; //$NON-NLS-0$

-	function createElement(document, tagName) {

-		if (document.createElementNS) {

-			return document.createElementNS(XHTML, tagName);

-		}

-		return document.createElement(tagName);

-	}

-

-	return {

-		formatMessage: formatMessage,

-		

-		createElement: createElement,

-		

-		/** Browsers */

-		isIE: isIE,

-		isFirefox: isFirefox,

-		isOpera: isOpera,

-		isChrome: isChrome,

-		isSafari: isSafari,

-		isWebkit: isWebkit,

-		isAndroid: isAndroid,

-		isIPad: isIPad,

-		isIPhone: isIPhone,

-		isIOS: isIOS,

-		

-		/** OSs */

-		isMac: isMac,

-		isWindows: isWindows,

-		isLinux: isLinux,

-		

-		platformDelimiter: platformDelimiter

-	};

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors: IBM Corporation - initial API and implementation
+ *******************************************************************************/
+
+/*global define navigator*/
+define(function() {
+
+	var userAgent = navigator.userAgent;
+	var isIE = parseFloat(userAgent.split("MSIE")[1]) || undefined; //$NON-NLS-0$
+	var isFirefox = parseFloat(userAgent.split("Firefox/")[1] || userAgent.split("Minefield/")[1]) || undefined; //$NON-NLS-1$ //$NON-NLS-0$
+	var isOpera = userAgent.indexOf("Opera") !== -1; //$NON-NLS-0$
+	var isChrome = parseFloat(userAgent.split("Chrome/")[1]) || undefined; //$NON-NLS-0$
+	var isSafari = userAgent.indexOf("Safari") !== -1 && !isChrome; //$NON-NLS-0$
+	var isWebkit = parseFloat(userAgent.split("WebKit/")[1]) || undefined; //$NON-NLS-0$
+	var isAndroid = userAgent.indexOf("Android") !== -1; //$NON-NLS-0$
+	var isIPad = userAgent.indexOf("iPad") !== -1; //$NON-NLS-0$
+	var isIPhone = userAgent.indexOf("iPhone") !== -1; //$NON-NLS-0$
+	var isIOS = isIPad || isIPhone;
+	var isMac = navigator.platform.indexOf("Mac") !== -1; //$NON-NLS-0$
+	var isWindows = navigator.platform.indexOf("Win") !== -1; //$NON-NLS-0$
+	var isLinux = navigator.platform.indexOf("Linux") !== -1; //$NON-NLS-0$
+	var platformDelimiter = isWindows ? "\r\n" : "\n"; //$NON-NLS-1$ //$NON-NLS-0$
+
+	function formatMessage(msg) {
+		var args = arguments;
+		return msg.replace(/\$\{([^\}]+)\}/g, function(str, index) { return args[(index << 0) + 1]; });
+	}
+	
+	var XHTML = "http://www.w3.org/1999/xhtml"; //$NON-NLS-0$
+	function createElement(document, tagName) {
+		if (document.createElementNS) {
+			return document.createElementNS(XHTML, tagName);
+		}
+		return document.createElement(tagName);
+	}
+
+	return {
+		formatMessage: formatMessage,
+		
+		createElement: createElement,
+		
+		/** Browsers */
+		isIE: isIE,
+		isFirefox: isFirefox,
+		isOpera: isOpera,
+		isChrome: isChrome,
+		isSafari: isSafari,
+		isWebkit: isWebkit,
+		isAndroid: isAndroid,
+		isIPad: isIPad,
+		isIPhone: isIPhone,
+		isIOS: isIOS,
+		
+		/** OSs */
+		isMac: isMac,
+		isWindows: isWindows,
+		isLinux: isLinux,
+		
+		platformDelimiter: platformDelimiter
+	};
 });
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/nls/messages.js b/bundles/org.eclipse.orion.client.editor/web/orion/textview/nls/messages.js
deleted file mode 100644
index 72172d2..0000000
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/nls/messages.js
+++ /dev/null
@@ -1,39 +0,0 @@
-/*******************************************************************************
- * @license
- * Copyright (c) 2010, 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- * 
- * Contributors: 
- *		Felipe Heidrich (IBM Corporation) - initial API and implementation
- *		Silenio Quarti (IBM Corporation) - initial API and implementation
- ******************************************************************************/
-
-/*global define*/
-
-define(['orion/textview/i18n!orion/textview/nls/messages'], function(bundle) {
-	var result = {
-		root: {
-			"multipleAnnotations": "Multiple annotations:", //$NON-NLS-1$ //$NON-NLS-0$
-			"line": "Line: ${0}", //$NON-NLS-1$ //$NON-NLS-0$
-			"breakpoint": "Breakpoint", //$NON-NLS-1$ //$NON-NLS-0$
-			"bookmark": "Bookmark", //$NON-NLS-1$ //$NON-NLS-0$
-			"task": "Task", //$NON-NLS-1$ //$NON-NLS-0$
-			"error": "Error", //$NON-NLS-1$ //$NON-NLS-0$
-			"warning": "Warning", //$NON-NLS-1$ //$NON-NLS-0$
-			"matchingSearch": "Matching Search", //$NON-NLS-1$ //$NON-NLS-0$
-			"currentSearch": "Current Search", //$NON-NLS-1$ //$NON-NLS-0$
-			"currentLine": "Current Line", //$NON-NLS-1$ //$NON-NLS-0$
-			"matchingBracket": "Matching Bracket", //$NON-NLS-1$ //$NON-NLS-0$
-			"currentBracket": "Current Bracket" //$NON-NLS-1$ //$NON-NLS-0$
-		}
-	};
-	Object.keys(bundle).forEach(function(key) {
-		if (typeof result[key] === 'undefined') { //$NON-NLS-0$
-			result[key] = bundle[key];
-		}
-	});
-	return result;
-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.editor/web/orion/textview/nls/root/messages.js b/bundles/org.eclipse.orion.client.editor/web/orion/textview/nls/root/messages.js
deleted file mode 100644
index ce260d1..0000000
--- a/bundles/org.eclipse.orion.client.editor/web/orion/textview/nls/root/messages.js
+++ /dev/null
@@ -1,31 +0,0 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: 

- *		Felipe Heidrich (IBM Corporation) - initial API and implementation

- *		Silenio Quarti (IBM Corporation) - initial API and implementation

- ******************************************************************************/

-

-/*global define */

-

-//NLS_CHARSET=UTF-8

-

-define({

-	"multipleAnnotations": "Multiple annotations:", //$NON-NLS-1$ //$NON-NLS-0$

-	"line": "Line: ${0}", //$NON-NLS-1$ //$NON-NLS-0$

-	"breakpoint": "Breakpoint", //$NON-NLS-1$ //$NON-NLS-0$

-	"bookmark": "Bookmark", //$NON-NLS-1$ //$NON-NLS-0$

-	"task": "Task", //$NON-NLS-1$ //$NON-NLS-0$

-	"error": "Error", //$NON-NLS-1$ //$NON-NLS-0$

-	"warning": "Warning", //$NON-NLS-1$ //$NON-NLS-0$

-	"matchingSearch": "Matching Search", //$NON-NLS-1$ //$NON-NLS-0$

-	"currentSearch": "Current Search", //$NON-NLS-1$ //$NON-NLS-0$

-	"currentLine": "Current Line", //$NON-NLS-1$ //$NON-NLS-0$

-	"matchingBracket": "Matching Bracket", //$NON-NLS-1$ //$NON-NLS-0$

-	"currentBracket": "Current Bracket" //$NON-NLS-1$ //$NON-NLS-0$

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.git/web/git/plugins/gitPlugin.js b/bundles/org.eclipse.orion.client.git/web/git/plugins/gitPlugin.js
index c0ce535..e9af7d2 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/plugins/gitPlugin.js
+++ b/bundles/org.eclipse.orion.client.git/web/git/plugins/gitPlugin.js
@@ -1,5 +1,5 @@
-/*global define document*/
-define(["orion/plugin", "orion/xhr", "domReady!"], function(PluginProvider, xhr) {
+/*global define document URL window*/
+define(["orion/plugin", "orion/xhr", "orion/URL-shim", "domReady!"], function(PluginProvider, xhr) {
 	var temp = document.createElement('a');
 	temp.href = "../mixloginstatic/LoginWindow.html";
 	var login = temp.href;
@@ -197,22 +197,24 @@
 	var base = temp.href;
 	provider.registerService("orion.core.diff", {
 		getDiffContent: function(diffURI){	
-			return xhr("GET", diffURI, {
+			var url = new URL(diffURI, window.location);
+			url.query.set("parts", "diff");
+			return xhr("GET", url.href, {
 				headers: {
 					"Orion-Version": "1"
 				},
-				query: { "parts": "diff" },
 				timeout: 15000
 			}).then(function(xhrResult) {
 				return xhrResult.responseText;
 			});
 		},			
 		getDiffFileURI: function(diffURI){
-			return xhr("GET", diffURI, {
+			var url = new URL(diffURI, window.location);
+			url.query.set("parts", "uris");
+			return xhr("GET", url.href, {
 				headers: {
 					"Orion-Version": "1"
 				},
-				query: { "parts": "uris" },
 				timeout: 15000
 			}).then(function(xhrResult) {
 				return JSON.parse(xhrResult.responseText);
diff --git a/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html
index 727a658..4dcb96e 100644
--- a/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html
+++ b/bundles/org.eclipse.orion.client.git/web/git/reviewRequest.html
@@ -12,26 +12,7 @@
 		require({

 		  baseUrl: '..',

 		  // set the paths to our library packages

-		  packages: [

-		    {

-		      name: 'dojo',

-		      location: 'org.dojotoolkit/dojo',

-		      main: 'lib/main-browser',

-		      lib: '.'

-		    },

-		    {

-		      name: 'dijit',

-		      location: 'org.dojotoolkit/dijit',

-		      main: 'lib/main',

-		      lib: '.'

-		    },

-		    {

-		      name: 'dojox',

-		      location: 'org.dojotoolkit/dojox',

-		      main: 'lib/main',

-		      lib: '.'

-		    }

-		  ],

+		  packages: [],

 		  paths: {

 		    text: 'requirejs/text',

 		    i18n: 'requirejs/i18n',

diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js
index 07aa24e..cad767a 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitClient.js
@@ -104,49 +104,7 @@
 			
 			return clientDeferred;
 		},
-		
-//		getDiffContent: function(diffURI){
-//			var service = this;
-//			var clientDeferred = new dojo.Deferred();
-//			dojo.xhrGet({
-//				url: diffURI , 
-//				headers: {
-//					"Orion-Version": "1" //$NON-NLS-1$ //$NON-NLS-0$
-//				},
-//				content: { "parts": "diff" }, //$NON-NLS-1$ //$NON-NLS-0$
-//				handleAs: "text", //$NON-NLS-0$
-//				timeout: 15000,
-//				load: function(jsonData, xhrArgs) {
-//					service._getGitServiceResponse(clientDeferred, jsonData, xhrArgs);
-//				},
-//				error: function(error, ioArgs) {
-//					service._handleGitServiceResponseError(clientDeferred, error);
-//				}
-//			});
-//			return clientDeferred;
-//		},
-		
-//		getDiffFileURI: function(diffURI){
-//			var service = this;
-//			var clientDeferred = new dojo.Deferred();
-//			dojo.xhrGet({
-//				url: diffURI , 
-//				headers: {
-//					"Orion-Version": "1" //$NON-NLS-1$ //$NON-NLS-0$
-//				},
-//				content: { "parts": "uris" }, //$NON-NLS-1$ //$NON-NLS-0$
-//				handleAs: "json", //$NON-NLS-0$
-//				timeout: 15000,
-//				load: function(jsonData, xhrArgs) {
-//					service._getGitServiceResponse(clientDeferred, jsonData, xhrArgs);
-//				},
-//				error: function(error, ioArgs) {
-//					service._handleGitServiceResponseError(clientDeferred, error);
-//				}
-//			});
-//			return clientDeferred;
-//		},
-		
+	
 		getGitStatus: function(url){
 			var service = this;
 			
@@ -959,10 +917,12 @@
 			var response =  result.response ? JSON.parse(result.response) : null;
 			
 			if (result.xhr && result.xhr.status === 202) {
-				operation.handle(response.Location).then(deferred.resolve, function(data) {
+				var def = operation.handle(response.Location);
+				def.then(deferred.resolve, function(data) {
 					data.failedOperation = response.Location;
 					deferred.reject(data);
 				}, deferred.progress);
+				deferred.then(null, function(error){def.reject(error);});
 				return;
 			}
 			deferred.resolve(response);
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
index 9fc0044..676fbbd 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitCommands.js
@@ -868,8 +868,13 @@
 									);
 								}, function(jsonData, secondArg) {
 									exports.handleGitServiceResponse(jsonData, serviceRegistry, 
-										function() {
-										}, function (jsonData) {
+									function() {
+										progress.progress(gitService.getGitRemote(path), "Getting remote details " + path).then(
+											function(jsonData){
+												explorer.changedItem(item);
+											}, displayErrorOnStatus
+										);
+									}, function (jsonData) {
 											handleResponse(jsonData, commandInvocation);
 										}
 									);
@@ -997,7 +1002,11 @@
 								}, function(jsonData, secondArg) {
 									exports.handleGitServiceResponse(jsonData, serviceRegistry, 
 										function() {
-										
+											progress.progress(gitService.getGitRemote(path), "Getting remote information " + path).then(
+												function(jsonData){
+													explorer.changedItem(item);
+												}, displayErrorOnStatus
+											);
 										}, function (jsonData) {
 											handleResponse(jsonData, commandInvocation);
 										}
@@ -1353,7 +1362,7 @@
 						}, function(jsonData, secondArg) {
 							exports.handleGitServiceResponse(jsonData, serviceRegistry, 
 								function() {
-								
+									explorer.changedItem();
 								}, function (jsonData) {
 									handleResponse(jsonData, commandInvocation);
 								}
@@ -1547,7 +1556,7 @@
 						}, function(jsonData, secondArg) {
 							exports.handleGitServiceResponse(jsonData, serviceRegistry, 
 								function() {
-								
+									explorer.changedItem(item);
 								}, function (jsonData) {
 									handleResponse(jsonData, commandInvocation);
 								}
@@ -2245,6 +2254,11 @@
 											},function(jsonData, secondArg) {
 												exports.handleGitServiceResponse(jsonData, serviceRegistry, 
 													function() {
+														progress.progress(gitService.getGitRemote(remoteToFetch.Location), "Getting remote details " + name).then(
+																function(jsonData){
+																	explorer.changedItem(item);
+																}, displayErrorOnStatus
+															);
 													}, function (jsonData) {
 														handleResponse(jsonData, commandInvocation);
 													}
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js b/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
index e29bf78..da8a773 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/gitReviewRequestExplorer.js
@@ -1,6 +1,6 @@
 /*******************************************************************************
  * @license
- * Copyright (c) 2012 IBM Corporation and others.
+ * Copyright (c) 2012, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials are made
  * available under the terms of the Eclipse Public License v1.0
  * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution
@@ -9,13 +9,9 @@
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
 
-/*global define console document orion Image*/
-/*global dojo eclipse:true widgets*/
-/*jslint regexp:false browser:true forin:true*/
-
-define(['i18n!git/nls/gitmessages', 'require', 'dojo','dijit', 'orion/section', 'orion/i18nUtil', 'orion/globalCommands', 'orion/compare/diff-provider', 
-        'orion/compare/compare-container' ,'orion/git/gitCommands','dijit/TooltipDialog', 'orion/git/widgets/CommitTooltipDialog', 'dojo/hash'], 
-		function(messages, require, dojo, dijit , mSection, i18nUtil, mGlobalCommands, mDiffProvider , mCompareContainer, mGitCommands) {
+define(['i18n!git/nls/gitmessages', 'require', 'orion/section', 'orion/i18nUtil', 'orion/PageUtil', 'orion/webui/littlelib', 'orion/globalCommands',
+        'orion/git/gitCommands', 'orion/Deferred', 'orion/git/widgets/CommitTooltipDialog',], 
+		function(messages, require, mSection, i18nUtil, PageUtil, lib, mGlobalCommands, mGitCommands, Deferred, mCommitTooltip) {
 	var exports = {};
 
 	exports.GitReviewRequestExplorer = (function() {
@@ -41,12 +37,13 @@
 		};
 		
 		GitReviewRequestExplorer.prototype.redisplay = function(){
-			this.display(dojo.hash());
+			var pageParams = PageUtil.matchResourceParameters();
+			this.display(pageParams.resource);
 		};
 		
 		GitReviewRequestExplorer.prototype.display = function(remote_sha){
 			this.progressService = this.registry.getService("orion.page.message"); //$NON-NLS-0$
-			this.loadingDeferred = new dojo.Deferred();
+			this.loadingDeferred = new Deferred();
 			this.progressService.showWhile(this.loadingDeferred, messages["Loading Contribution Review Request..."]); //$NON-NLS-0$
 			var that = this;
 			var params = [];
@@ -66,11 +63,11 @@
 			this.url = params[2];
 			this.initTitleBar(params[1], params[0]);
 
-			dojo.empty(dojo.byId("welcomeDiv"));
-			dojo.empty(dojo.byId("cloneDiv"));
-			dojo.empty(dojo.byId("commitDiv"));
-			dojo.empty(dojo.byId("fetchDiv"));
-			dojo.empty(dojo.byId("remoteDiv"));
+			lib.empty(lib.node("welcomeDiv"));
+			lib.empty(lib.node("cloneDiv"));
+			lib.empty(lib.node("commitDiv"));
+			lib.empty(lib.node("fetchDiv"));
+			lib.empty(lib.node("remoteDiv"));
 			
 			 this.registry.getService("orion.page.progress").progress(this.fileClient.loadWorkspace(), "Loading default workspace info").then(
 				function(workspace){
@@ -78,10 +75,18 @@
 					that.commandService.registerCommandContribution("fetch", "eclipse.orion.git.fetch", 200);
 					that.commandService.registerCommandContribution("fetch", "eclipse.orion.git.fetchForce", 250);
 					that.commandService.registerCommandContribution("add", "eclipse.addRemoteReviewRequestCommand", 300);
-					var tableNode = dojo.byId("cloneDiv");
-					dojo.create("div", {"class" : "stretch", id : "descriptionHeader", style: "width: 500px, height: 100px" }, dojo.byId("welcomeDiv"));
-					dojo.create("div", {style: "padding-top: 30px" }, dojo.byId("welcomeDiv"));
-					var titleWrapper1 = new mSection.Section(dojo.byId("commitDiv"), {
+					var tableNode = lib.node("cloneDiv");
+					
+					var descriptionHeader = document.createElement("div");
+					descriptionHeader.id = "descriptionHeader";
+					descriptionHeader.className = "stretch";
+					lib.node("welcomeDiv").appendChild(descriptionHeader);
+					
+					var div = document.createElement("div");
+					div.style.paddingTop = "30px";
+					lib.node("welcomeDiv").appendChild(div);
+					
+					var titleWrapper1 = new mSection.Section(lib.node("commitDiv"), {
 						id: "open commit from existing repository", //$NON-NLS-0$
 						title: messages["The commit can be found in the following repositories"], //$NON-NLS-0$
 						slideout: true,
@@ -90,7 +95,7 @@
 						content: '<div id="commitNode" class="mainPadding"></div>' //$NON-NLS-0$
 					});
 					
-					var titleWrapper2 = new mSection.Section(dojo.byId("fetchDiv"), {
+					var titleWrapper2 = new mSection.Section(lib.node("fetchDiv"), {
 						id: "fetch section", //$NON-NLS-0$
 						title: messages["Try to update your repositories"], //$NON-NLS-0$
 						slideout: true,
@@ -105,7 +110,7 @@
 						content: '<div id="cloneNode" class="mainPadding"></div>' //$NON-NLS-0$
 					});
 					
-					var titleWrapper4 = new mSection.Section(dojo.byId("remoteDiv"), {
+					var titleWrapper4 = new mSection.Section(lib.node("remoteDiv"), {
 						id: "add", //$NON-NLS-0$
 						title: messages["Attach the remote to one of your existing repositories"], //$NON-NLS-0$
 						slideout: true,
@@ -114,18 +119,28 @@
 						content: '<div id="remoteNode" class="mainPadding"></div>' //$NON-NLS-0$
 					});
 					
-					dojo.byId("commitDiv").style.display = " none ";
-					dojo.byId("fetchDiv").style.display = " none ";
-					dojo.byId("remoteDiv").style.display = " none ";
-					dojo.byId("moreOptionsDiv").style.display = " none ";
+					lib.node("commitDiv").style.display = " none ";
+					lib.node("fetchDiv").style.display = " none ";
+					lib.node("remoteDiv").style.display = " none ";
+					lib.node("moreOptionsDiv").style.display = " none ";
 					
-					var text = dojo.string.substitute(messages["You are reviewing contribution ${0} from ${1}"], [params[1], params[2]]);
+					var text = i18nUtil.formatMessage(messages["You are reviewing contribution ${0} from ${1}"], params[1], params[2]);
 					var text2 = messages["Unfortunately the commit can not be found in your workspace. To see it try one of the following: "];
-					dojo.byId("moreOptionsDiv").textContent = messages["To review the commit you can also:"];
-					var description = dojo.create("span", {"class" : "gitSecondaryDescription", "style" : "padding : 5px, display: block", "id": "welcome"}, dojo.byId("descriptionHeader"));
+					lib.node("moreOptionsDiv").textContent = messages["To review the commit you can also:"];
+					
+					var description = document.createElement("span");
+					description.id = "welcome";
+					description.style.padding = "5px";
+					description.style.display = "block";
 					description.textContent = text;
-					var description2 = dojo.create("span", {"class" : "gitSecondaryDescription", "style" : "display: block", "id" : "instruction"}, dojo.byId("descriptionHeader"));
+					lib.node("descriptionHeader").appendChild(description);
+					
+					var description2 = document.createElement("span");
+					description2.id = "instruction";
+					description2.style.display = "block";
 					description2.textContent = text2;
+					lib.node("descriptionHeader").appendChild(description2);
+					
 					that.renderCloneSection(params);
 					
 					var repositories = [];
@@ -136,7 +151,7 @@
 					}
 					
 					if(repositories.length === 0){
-						dojo.byId("instruction").style.display = " block ";
+						lib.node("instruction").style.display = " block ";
 						return;
 					}
 					that.renderSections(repositories, params[0], params[2], params[1]);
@@ -149,9 +164,13 @@
 			var that = this;
 			that.progressService.setProgressMessage("");
 			that.commandService.registerCommandContribution("clone", "eclipse.cloneGitRepositoryReviewReq", 200);
-			that.commandService.renderCommands("clone", dojo.byId("cloneNode"), "clone", that, "button", params[0]);
-			var mainDescription = dojo.create("span", { style: "padding: 0px; text-align: left;", "class": "gitMainDescription" },  dojo.byId("cloneNode"));
+			that.commandService.renderCommands("clone", lib.node("cloneNode"), "clone", that, "button", params[0]);
+			
+			var mainDescription = document.createElement("span");
+			mainDescription.style.padding = "0px";
+			mainDescription.style.textAlign = "left";
 			mainDescription.textContent = " using " + params[0];
+			lib.node("cloneNode").appendChild(mainDescription);
 		};
 		
 		GitReviewRequestExplorer.prototype.renderSections = function(repositories, url1, url2, sha){
@@ -159,20 +178,20 @@
 
 			var findCommitLocation = function (repositories, commitName, deferred, that) {
 				if (deferred === null)
-					deferred = new dojo.Deferred();
+					deferred = new Deferred();
 				if (repositories.length > 0) {
 					that.registry.getService("orion.page.progress").progress(that.registry.getService("orion.git.provider").doGitLog( //$NON-NLS-0$
 						"/gitapi/commit/" + sha + repositories[0].Location + "?page=1&pageSize=1", null, null, messages['Looking for the commit']), "Looking for commit " + sha).then( //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 						function(resp){
 							that.currentCommit = resp;
-							deferred.callback(resp.Children[0].Location);
+							deferred.resolve(resp.Children[0].Location);
 						},
 						function(error) {
-							deferred.errback();
+							deferred.reject();
 						}
 					);
 				} else {
-					deferred.errback();
+					deferred.reject();
 				}
 				
 				return deferred;
@@ -203,55 +222,42 @@
 								if(foundRemote){
 									findCommitLocation(repositories, sha, null, that).then(	
 										function(commitLocation){
-											var _timer;
 											var commitPageURL = "/git/git-commit.html#" + commitLocation + "?page=1&pageSize=1";
 											var repoURL = "/git/git-repository.html#" + resp.Children[0].Location;
-											dojo.create("div", {id : resp.Children[0].Id + "tableitem" , "class": "sectionTableItem lightTreeTableRow"},  dojo.byId("commitNode"));
-											dojo.create("div", {id : resp.Children[0].Id + "div" , "class": "stretch"},  dojo.byId(resp.Children[0].Id + "tableitem"));
-											dojo.create("div", {id : resp.Children[0].Id + "divCommands" , "class": "sectionTableItemActions" },  dojo.byId(resp.Children[0].Id + "tableitem"));
-											var link2 = dojo.create("a", {style: "padding: 0px; text-align: left; display: inline-block;  width: 150px", href: repoURL },  dojo.byId(resp.Children[0].Id + "div"));
+											
+											var sectionItem = document.createElement("div");
+											sectionItem.className = "sectionTableItem lightTreeTableRow";
+											lib.node("commitNode").appendChild(sectionItem);
+											
+											var div = document.createElement("div");
+											div.className = "stretch";
+											sectionItem.appendChild(div);
+											
+											var divCommands = document.createElement("div");
+											divCommands.className = "sectionTableItemActions";
+											sectionItem.appendChild(divCommands);
+
+											var link2 = document.createElement("a");
+											link2.href = repoURL;
 											link2.textContent = repositories[0].Name;
-											var span = dojo.create("span", {"class": "gitSecondaryDescription"},dojo.byId(resp.Children[0].Id + "div"));
+											link2.style.display = "inline-block";
+											link2.style.width = "150px";
+											div.appendChild(link2);
+											
+											var span = document.createElement("span");
 											span.textContent = messages["location: "] + repositories[0].Content.Path;
-											var link = dojo.create("a", {id : resp.Children[0].Id + "a", style: "padding: 0px; text-align: left; width: 50px", href: commitPageURL },  dojo.byId(resp.Children[0].Id + "divCommands"));
+											div.appendChild(span);
+											
+											var link = document.createElement("a");
+											link.href = commitPageURL;
 											link.textContent = messages["Open Commit"];
-											dojo.byId("commitDiv").style.display = " block ";
-											dojo.byId("moreOptionsDiv").style.display = " block ";
-											dojo.byId("instruction").style.display = " none ";
-											var tooltipDialog = new orion.git.widgets.CommitTooltipDialog({
-											    commit: that.currentCommit.Children[0],
-											    onMouseLeave: function(){
-													if(dijit.popup.hide)
-														dijit.popup.hide(tooltipDialog); //close doesn't work on FF
-													dijit.popup.close(tooltipDialog);
-												},
-												onMouseEnter: function(){
-													clearTimeout(_timer);
-												}
-											});
+											divCommands.appendChild(link);
 											
-											dojo.connect(link, "onmouseover", link2, function() { //$NON-NLS-0$
-												clearTimeout(_timer);
-												
-												_timer = setTimeout(function(){
-													dijit.popup.open({
-														popup: tooltipDialog,
-														around: link,
-														position: "before",
-														orient: {'BL':'TL', 'TR':'BR'} //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-													});
-												}, 600);
-											});
+											lib.node("commitDiv").style.display = " block ";
+											lib.node("moreOptionsDiv").style.display = " block ";
+											lib.node("instruction").style.display = " none ";
 											
-											dojo.connect(link, "onmouseout", link, function() { //$NON-NLS-0$
-												clearTimeout(_timer);
-												
-												_timer = setTimeout(function(){
-													if(dijit.popup.hide)
-														dijit.popup.hide(tooltipDialog); //close doesn't work on FF
-													dijit.popup.close(tooltipDialog);
-												}, 200);
-											});
+											new mCommitTooltip.CommitTooltipDialog({commit: that.currentCommit.Children[0], triggerNode: link});
 										},
 										function(){
 											var index;
@@ -262,36 +268,73 @@
 												}
 											}
 											var repoURL = "/git/git-repository.html#" + resp.Children[0].Location;
-											dojo.create("div", {id : resp.Children[0].Id + "tableitem" , "class": "sectionTableItem lightTreeTableRow" , style: "height: 20px"},  dojo.byId("fetchNode"));
-											dojo.create("div", {id : resp.Children[0].Id + "div" , "class": "stretch" },  dojo.byId(resp.Children[0].Id + "tableitem"));
-											dojo.create("div", {id : resp.Children[0].Id + "divCommands" , "class": "sectionTableItemActions" },  dojo.byId(resp.Children[0].Id + "tableitem"));
-											var link = dojo.create("a", {id : resp.Children[0].Id, style: "padding: 0px; text-align: left; display: inline-block;  width: 150px", href: repoURL },  dojo.byId(resp.Children[0].Id + "div"));
-											link.textContent = resp.Children[0].Name + "    ";
-											var span = dojo.create("span", {"class": "gitSecondaryDescription"},dojo.byId(resp.Children[0].Id + "div"));
+											
+											var sectionItem = document.createElement("div");
+											sectionItem.className = "sectionTableItem lightTreeTableRow";
+											lib.node("fetchNode").appendChild(sectionItem);
+											
+											var div = document.createElement("div");
+											div.className = "stretch";
+											sectionItem.appendChild(div);
+											
+											var divCommands = document.createElement("div");
+											divCommands.className = "sectionTableItemActions";
+											sectionItem.appendChild(divCommands);
+
+											var link = document.createElement("a");
+											link.href = repoURL;
+											link.textContent = resp.Children[0].Name;
+											link.style.display = "inline-block";
+											link.style.width = "150px";
+											div.appendChild(link);
+											
+											var span = document.createElement("span");
 											span.textContent = messages["location: "] + repositories[0].Content.Path;
-											that.commandService.renderCommands("fetch", dojo.byId(resp.Children[0].Id + "divCommands"), remotes.Children[index], that, "tool");
-											dojo.byId("fetchDiv").style.display = " block ";
-											var style = dojo.style("commitDiv", "display");
+											div.appendChild(span);
+
+											that.commandService.renderCommands("fetch", divCommands, remotes.Children[index], that, "tool");
+											lib.node("fetchDiv").style.display = " block ";
 										}
 									);	
 								} else {
 									var repoURL = "/git/git-repository.html#" + resp.Children[0].Location;
-									dojo.create("div", {id : resp.Children[0].Id + "tableitem" , "class": "sectionTableItem lightTreeTableRow"},  dojo.byId("remoteNode"));
-									dojo.create("div", {id : resp.Children[0].Id + "div" , "class": "stretch" },  dojo.byId(resp.Children[0].Id + "tableitem"));
-									dojo.create("div", {id : resp.Children[0].Id + "divCommands" , "class": "sectionTableItemActions" },  dojo.byId(resp.Children[0].Id + "tableitem"));
-									var repoLink = dojo.create("a", {id : resp.Children[0].Id, style: "padding: 0px; text-align: left; display: inline-block;  width: 150px", href: repoURL },  dojo.byId(resp.Children[0].Id + "div"));
-									repoLink.textContent = resp.Children[0].Name + "    ";
-									var span = dojo.create("span", {"class": "gitSecondaryDescription"},dojo.byId(resp.Children[0].Id + "div"));
+									
+									var sectionItem = document.createElement("div");
+									sectionItem.className = "sectionTableItem lightTreeTableRow";
+									lib.node("remoteNode").appendChild(sectionItem);
+									
+									var div = document.createElement("div");
+									div.className = "stretch";
+									sectionItem.appendChild(div);
+									
+									var divCommands = document.createElement("div");
+									divCommands.className = "sectionTableItemActions";
+									sectionItem.appendChild(divCommands);
+									
+									var link = document.createElement("a");
+									link.href = repoURL;
+									link.textContent = resp.Children[0].Name;
+									link.style.display = "inline-block";
+									link.style.width = "150px";
+									div.appendChild(link);
+									
+									var span = document.createElement("span");
 									span.textContent = messages["location: "] + repositories[0].Content.Path;
-									that.commandService.renderCommands("add", dojo.byId(resp.Children[0].Id + "divCommands"), resp.Children[0], that, "tool",  url1);
-									dojo.byId("remoteDiv").style.display = " block ";
-									 for(var i=0;i<remotes.Children.length;i++){	
-										dojo.create("div", {}, dojo.byId(resp.Children[0].Id + "div"));
+									div.appendChild(span);
+
+									that.commandService.renderCommands("add", divCommands, resp.Children[0], that, "tool",  url1);
+									lib.node("remoteDiv").style.display = " block ";
+									
+									for(var i=0;i<remotes.Children.length;i++){											
 										resp.Children[0].RemoteLocation = "/gitapi/remote" + repositories[0].Location;
-										var div = dojo.create("div", {"class": "gitSecondaryDescription"},dojo.byId(resp.Children[0].Id + "div"));
-										div.textContent = remotes.Children[i].Name + " : " + remotes.Children[i].GitUrl;
+										
+										var remoteDiv = document.createElement("div");
+										remoteDiv.style.padding = "6px 150px 0";
+										remoteDiv.textContent = remotes.Children[i].Name + " : " + remotes.Children[i].GitUrl;
+										div.appendChild(remoteDiv);
 									}
 								}
+								
 								that.renderSections(repositories.slice(1), url1, url2, sha);
 							}
 						);
@@ -301,7 +344,7 @@
 		};
 		
 		GitReviewRequestExplorer.prototype.initTitleBar = function(commit, url){
-			var title = dojo.string.substitute(messages["Contribution Review Request for ${0} on ${1}"], [commit, url]);
+			var title = i18nUtil.formatMessage(messages["Contribution Review Request for ${0} on ${1}"], commit, url);
 			
 			var item = {};
 			item.Name = title;
@@ -312,18 +355,21 @@
 			});
 		};
 		
-		GitReviewRequestExplorer.prototype.sshCheck = function(remote){
-				var url = remote;
-				var scheme = new dojo._Url(url).scheme;
-				if(scheme === "ssh"){
-					var indexOfAt = url.indexOf("@");
-					if(indexOfAt !== -1){
-						var urlNoUser = "ssh://" + url.substr(indexOfAt + 1);
-						url = urlNoUser;
-					}
+		GitReviewRequestExplorer.prototype.sshCheck = function(gitUrl) {
+			var url = gitUrl;
+			var parser = document.createElement('a');
+			parser.href = url;
+			var scheme = parser.protocol;
+			
+			if (scheme === "ssh:") {
+				var indexOfAt = url.indexOf("@");
+				if (indexOfAt !== -1) {
+					var urlNoUser = "ssh://" + url.substr(indexOfAt + 1);
+					url = urlNoUser;
 				}
-				return url;
-			};
+			}
+			return url;
+		};
 		
 		return GitReviewRequestExplorer;
 	}());
diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
index 7c739b7..5753ddb 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/CommitTooltipDialog.js
@@ -22,25 +22,9 @@
 

 	CommitTooltipDialog.prototype._init = function(options) {

 		this.commit = options.commit;

-		

-		var that = this;

-		

-		options.triggerNode.addEventListener("mouseover", function(evt) {  //$NON-NLS-0$

-			clearTimeout(that._timer);

-			that._timer = setTimeout(function(){

-				that.show();

-			}, 600);

-		});

-		

-		options.triggerNode.addEventListener("mouseout", function(evt) {  //$NON-NLS-0$

-			clearTimeout(that._timer);

-			that._timer = setTimeout(function(){

-				that.hide();

-			}, 200);

-		});

 

 		// Start the dialog initialization.

-		this._initialize(options.triggerNode);

+		this._initialize(options.triggerNode, null, null, "mouseover", 1000);

 	};

 

 	CommitTooltipDialog.prototype._bindToDom = function(parent) {

@@ -48,17 +32,7 @@
 	};

 

 	CommitTooltipDialog.prototype._displayCommit = function(commit) {

-		var that = this;

-		

 		var tableNode = this.$parentPane;

-		

-		tableNode.addEventListener("mouseover", function(evt) {  //$NON-NLS-0$

-			clearTimeout(that._timer);

-		});

-		

-		tableNode.addEventListener("mouseout", function(evt) {  //$NON-NLS-0$

-			that.hide();

-		});

 

 		var commitMessage0 = commit.Message.split(/(\r?\n|$)/)[0];

 		var link = document.createElement("a");

diff --git a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
index a90b69c..ab8a319 100644
--- a/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
+++ b/bundles/org.eclipse.orion.client.git/web/orion/git/widgets/OpenCommitDialog.js
@@ -8,9 +8,10 @@
  * 
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
+/*globals define document clearTimeout setTimeout window*/
 
-define([ 'i18n!git/nls/gitmessages', 'orion/i18nUtil', 'orion/Deferred', 'orion/webui/dialog', 'orion/webui/littlelib' ], function(
-		messages, i18nUtil, Deferred, dialog, lib) {
+define(['i18n!git/nls/gitmessages', 'orion/i18nUtil', 'orion/Deferred', 'orion/webui/dialog', 'orion/webui/littlelib'], function(
+messages, i18nUtil, Deferred, dialog, lib) {
 
 	/**
 	 * Usage:
@@ -25,8 +26,7 @@
 
 	OpenCommitDialog.prototype = new dialog.Dialog();
 
-	OpenCommitDialog.prototype.TEMPLATE = '<div><label for="resourceName">${Type the commit name (sha1):}</label></div>'
-			+ '<div><input type="text" id="resourceName"></div>' + '<div id="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>';
+	OpenCommitDialog.prototype.TEMPLATE = '<div><label for="resourceName">${Type the commit name (sha1):}</label></div><div><input type="text" id="resourceName"></div><div id="results" style="max-height:400px; height:auto; overflow-y:auto;"></div>';
 
 	OpenCommitDialog.prototype._init = function(options) {
 		var that = this;
@@ -53,11 +53,12 @@
 
 		this.buttons = [];
 
-		this.buttons.push({ callback : function() {
-			that.destroy();
-			that._execute();
-		},
-		text : 'OK'
+		this.buttons.push({
+			callback: function() {
+				that.destroy();
+				that._execute();
+			},
+			text: 'OK'
 		});
 
 		// Start the dialog initialization.
@@ -104,18 +105,19 @@
 
 	OpenCommitDialog.prototype._findCommitLocation = function(repositories, commitName, deferred) {
 		var that = this;
-		if (deferred == null)
+		if (deferred === null) {
 			deferred = new Deferred();
+		}
 
 		if (repositories.length > 0) {
-			serviceRegistry.getService("orion.page.progress").progress(
-					that.serviceRegistry.getService("orion.git.provider").doGitLog(
-							"/gitapi/commit/" + commitName + repositories[0].ContentLocation + "?page=1&pageSize=1"), "Getting commit details " + commitName)
-					.then(function(resp) {
-						deferred.resolve(resp.Children[0]);
-					}, function(error) {
-						that._findCommitLocation(repositories.slice(1), commitName, deferred);
-					});
+			this.serviceRegistry.getService("orion.page.progress").progress(
+			that.serviceRegistry.getService("orion.git.provider").doGitLog(
+				"/gitapi/commit/" + commitName + repositories[0].ContentLocation + "?page=1&pageSize=1"), "Getting commit details " + commitName)
+				.then(function(resp) {
+				deferred.resolve(resp.Children[0]);
+			}, function(error) {
+				that._findCommitLocation(repositories.slice(1), commitName, deferred);
+			});
 		} else {
 			deferred.reject();
 		}
@@ -171,7 +173,7 @@
 				that.hide();
 			}
 		}, false);
-		
+
 		link.addEventListener("keyup", function(evt) { //$NON-NLS-0$
 			if (evt.keyCode === lib.KEY.ENTER) {
 				that.hide();
@@ -186,8 +188,8 @@
 		if (commit.Parents && commit.Parents.length > 0) {
 			var parentDiv = document.createElement("div"); //$NON-NLS-0$
 			parentDiv.style.padding = "4px 0 0 4px";
-			
-			var link = document.createElement("a"); //$NON-NLS-0$
+
+			link = document.createElement("a"); //$NON-NLS-0$
 			link.href = "/git/git-commit.html#" + commit.Parents[0].Location + "?page=1&pageSize=1";
 			link.appendChild(document.createTextNode(messages['parent:'] + commit.Parents[0].Name));
 			parentDiv.appendChild(link);
@@ -198,47 +200,13 @@
 					that.hide();
 				}
 			}, false);
-			
+
 			link.addEventListener("keyup", function(evt) { //$NON-NLS-0$
 				if (evt.keyCode === lib.KEY.ENTER) {
 					that.hide();
 				}
 			}, false);
 		}
-
-		// dojo.create("div", { "style" : "padding-top:15px"
-		// }, tableNode);
-		// //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-		//
-		// if (commit.AuthorImage) {
-		// var authorImage = dojo.create("span", { "class" :
-		// "git-author-icon-small",
-		// "style" : "margin-bottom:30px"}, tableNode); //$NON-NLS-4$
-		// //$NON-NLS-3$
-		// //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-		// var image = new Image();
-		// image.src = commit.AuthorImage;
-		// image.name = commit.AuthorName;
-		// image.width = 35;
-		// image.height = 35;
-		// dojo.place(image, authorImage, "first"); //$NON-NLS-0$
-		// }
-		//
-		// var authoredBySpan = dojo.create("span", { "class" :
-		// "gitSecondaryDescription"}, tableNode); //$NON-NLS-2$
-		// //$NON-NLS-1$ //$NON-NLS-0$
-		// authoredBySpan.textContent =
-		// dojo.string.substitute(messages["authored by ${0} (${1})) on ${2}"],
-		// [ commit.AuthorName, commit.AuthorEmail,
-		// dojo.date.locale.format(new Date(commit.Time), { formatLength :
-		// "short"}) ]); //$NON-NLS-0$
-		// dojo.create("div", null, tableNode); //$NON-NLS-0$
-		// var committedBySpan = dojo.create("span", { "class" :
-		// "gitSecondaryDescription"}, tableNode); //$NON-NLS-2$
-		// //$NON-NLS-1$ //$NON-NLS-0$
-		// committedBySpan.textContent =
-		// dojo.string.substitute(messages['committed by 0 (1)'], [
-		// commit.CommitterName, commit.CommitterEmail ]);
 	};
 
 	OpenCommitDialog.prototype._beforeHiding = function() {
@@ -248,7 +216,8 @@
 	OpenCommitDialog.prototype.constructor = OpenCommitDialog;
 
 	// return the module exports
-	return { OpenCommitDialog : OpenCommitDialog
+	return {
+		OpenCommitDialog: OpenCommitDialog
 	};
 
-});
+});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/css/sections.css b/bundles/org.eclipse.orion.client.ui/web/css/sections.css
index 27c2a6f..d6ff1c0 100644
--- a/bundles/org.eclipse.orion.client.ui/web/css/sections.css
+++ b/bundles/org.eclipse.orion.client.ui/web/css/sections.css
@@ -74,6 +74,7 @@
 	color: gray;

 	padding-bottom:3px;

 	margin-bottom:5px;

+	overflow: hidden;

 }

 

 .sectionWrapperAux {

diff --git a/bundles/org.eclipse.orion.client.ui/web/edit/edit.css b/bundles/org.eclipse.orion.client.ui/web/edit/edit.css
index 77c5d48..e649713 100644
--- a/bundles/org.eclipse.orion.client.ui/web/edit/edit.css
+++ b/bundles/org.eclipse.orion.client.ui/web/edit/edit.css
@@ -6,10 +6,10 @@
 
 @import "../css/sections.css"; /* for outliner */
 
-@import "../orion/textview/textview.css";
-@import "../orion/textview/rulers.css";
-@import "../orion/textview/annotations.css";
-@import "../orion/textview/tooltip.css";
+@import "../orion/editor/textview.css";
+@import "../orion/editor/rulers.css";
+@import "../orion/editor/annotations.css";
+@import "../orion/editor/tooltip.css";
 @import "../css/editor-theme.css";
 
 .outlineExplorer {
diff --git a/bundles/org.eclipse.orion.client.ui/web/edit/readonly.css b/bundles/org.eclipse.orion.client.ui/web/edit/readonly.css
index 77c5d48..e649713 100644
--- a/bundles/org.eclipse.orion.client.ui/web/edit/readonly.css
+++ b/bundles/org.eclipse.orion.client.ui/web/edit/readonly.css
@@ -6,10 +6,10 @@
 
 @import "../css/sections.css"; /* for outliner */
 
-@import "../orion/textview/textview.css";
-@import "../orion/textview/rulers.css";
-@import "../orion/textview/annotations.css";
-@import "../orion/textview/tooltip.css";
+@import "../orion/editor/textview.css";
+@import "../orion/editor/rulers.css";
+@import "../orion/editor/annotations.css";
+@import "../orion/editor/tooltip.css";
 @import "../css/editor-theme.css";
 
 .outlineExplorer {
diff --git a/bundles/org.eclipse.orion.client.ui/web/edit/setup.js b/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
index 12c33f4..51332b6 100644
--- a/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
+++ b/bundles/org.eclipse.orion.client.ui/web/edit/setup.js
@@ -15,8 +15,8 @@
 define(['i18n!orion/edit/nls/messages', 'require', 'orion/Deferred', 'orion/webui/littlelib', 'orion/selection', 'orion/status', 'orion/progress', 'orion/dialogs',
         'orion/commands', 'orion/favorites', 'orion/fileClient', 'orion/operationsClient', 'orion/searchClient', 'orion/globalCommands', 'orion/outliner',
         'orion/problems', 'orion/editor/contentAssist', 'orion/editorCommands', 'orion/editor/editorFeatures', 'orion/editor/editor', 'orion/syntaxchecker',
-        'orion/textview/textView', 'orion/textview/textModel', 
-        'orion/textview/projectionTextModel', 'orion/textview/keyBinding','orion/searchAndReplace/textSearcher',
+        'orion/editor/textView', 'orion/editor/textModel', 
+        'orion/editor/projectionTextModel', 'orion/editor/keyBinding','orion/searchAndReplace/textSearcher',
         'orion/edit/dispatcher', 'orion/contentTypes', 'orion/PageUtil', 'orion/highlight', 'orion/i18nUtil', 'orion/edit/syntaxmodel', 'orion/widgets/themes/editor/MiniThemeChooser'],
 		function(messages, require, Deferred, lib, mSelection, mStatus, mProgress, mDialogs, mCommands, mFavorites,
 				mFileClient, mOperationsClient, mSearchClient, mGlobalCommands, mOutliner, mProblems, mContentAssist, mEditorCommands, mEditorFeatures, mEditor,
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js b/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js
index b969959..03f8fa3 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/jsTestSuite.js
@@ -90,7 +90,7 @@
 OrionTestCase("testRunAsynch", "/js-tests/testRunAsynch/test.html");
 OrionTestCase("editor", "/js-tests/editor/test.html");
 OrionTestCase("textMateStyler", "/js-tests/editor/textMateStyler/test.html");
-OrionTestCase("textview", "/js-tests/textview/test.html");
+OrionTestCase("textview", "/js-tests/editor/test-models.html");
 OrionTestCase("contentAssist", "/js-tests/editor/contentAssist/test.html");
 OrionTestCase("jsTemplateContentAssist", "/js-tests/jsTemplateContentAssist/test.html");
 OrionTestCase("contentTypes", "/js-tests/contentTypes/test.html");
@@ -105,7 +105,7 @@
 OrionTestCase("commands", "/js-tests/commands/test.html");
 
 //OrionTestCase("searchRendering", "/js-tests/searchRendering/test.html");
-//OrionUITestCase("textviewPerformance", "/js-tests/textview/test-performance.html");
+//OrionUITestCase("textviewPerformance", "/js-tests/editor/test-performance.html");
 
 
 
diff --git a/bundles/org.eclipse.orion.client.ui/web/js-tests/xhr/testcase.js b/bundles/org.eclipse.orion.client.ui/web/js-tests/xhr/testcase.js
index 396d937..33eeadd 100644
--- a/bundles/org.eclipse.orion.client.ui/web/js-tests/xhr/testcase.js
+++ b/bundles/org.eclipse.orion.client.ui/web/js-tests/xhr/testcase.js
@@ -10,7 +10,7 @@
  ******************************************************************************/
 
 /*global console define navigator setTimeout XMLHttpRequest*/
-define(["orion/assert", "orion/test", "orion/Deferred", "orion/xhr", "orion/textview/eventTarget"],
+define(["orion/assert", "orion/test", "orion/Deferred", "orion/xhr", "orion/editor/eventTarget"],
 		function(assert, mTest, Deferred, xhr, mEventTarget) {
 	var EventTarget = mEventTarget.EventTarget;
 	var isIE = navigator.appName.indexOf("Microsoft Internet Explorer") !== -1;
@@ -198,7 +198,6 @@
 				data: 'my request body',
 				headers: {'X-Foo': 'bar'},
 				log: true,
-				query: {param: 'value'},
 				responseType: 'text',
 				timeout: 1500
 			}, new OkXhr())
@@ -207,8 +206,7 @@
 				assert.equal(result.args.data, 'my request body');
 				assert.equal(result.args.headers['X-Foo'], 'bar');
 				assert.equal(result.args.log, true);
-				assert.ok(!!result.args.query);
-				assert.equal(result.args.query.param, 'value');
+				assert.ok(result.url);
 				assert.equal(result.args.responseType, 'text');
 				assert.equal(result.args.timeout, 1500);
 				assert.equal(result.status, 200);
@@ -223,7 +221,6 @@
 				data: 'my request body',
 				headers: {'X-Foo': 'bar'},
 				log: false,
-				query: {param: 'value'},
 				responseType: 'text',
 				timeout: 1500
 			}, new FailXhr())
@@ -232,8 +229,6 @@
 				assert.equal(result.args.data, 'my request body');
 				assert.equal(result.args.headers['X-Foo'], 'bar');
 				assert.equal(result.args.log, false);
-				assert.ok(!!result.args.query);
-				assert.equal(result.args.query.param, 'value');
 				assert.equal(result.args.responseType, 'text');
 				assert.equal(result.args.timeout, 1500);
 				assert.ok(result.xhr instanceof MockXMLHttpRequest);
@@ -279,66 +274,6 @@
 		return d;
 	};
 
-	tests['test GET query params'] = function() {
-		return xhr('GET', '/', {
-			query: {
-				'foo': 3,
-				'bar': 'baz'
-			}
-		}, new OkXhr())
-		.then(function(result) {
-			assert.strictEqual(result.url, '/?foo=3&bar=baz', null);
-		}, fail);
-	};
-
-	// Bug 382381
-	tests['test POST query params'] = function() {
-		return xhr('POST', '/', {
-			query: {
-				'foo': 3,
-				'bar': 'baz'
-			}
-		}, new OkXhr())
-		.then(function(result) {
-			assert.strictEqual(result.url, '/?foo=3&bar=baz', null);
-		}, fail);
-	};
-
-	tests['test GET query params encoding'] = function() {
-		return xhr('GET', '/', {
-			query: {
-				'foo!bar': 31337,
-				'baz': 'fizz buzz'
-			}
-		}, new OkXhr())
-		.then(function(result) {
-			assert.strictEqual(result.url, '/?foo%21bar=31337&baz=fizz%20buzz', null);
-		}, fail);
-	};
-
-	tests['test GET query params with fragment'] = function() {
-		return xhr('GET', '/#some?junk&we?dont&care?about', {
-			query: {
-				'foo*bar': 'baz',
-				'quux': 'a b'
-			}
-		}, new OkXhr())
-		.then(function(result) {
-			assert.strictEqual(result.url, '/?foo%2Abar=baz&quux=a%20b#some?junk&we?dont&care?about', null);
-		}, fail);
-	};
-
-	tests['test GET query params with existing params and fragment'] = function() {
-		return xhr('GET', '/?a%20=b#some?junk&we?dont&care?about', {
-			query: {
-				'foo*bar': 'baz'
-			}
-		}, new OkXhr())
-		.then(function(result) {
-			assert.strictEqual(result.url, '/?a%20=b&foo%2Abar=baz#some?junk&we?dont&care?about', null);
-		}, fail);
-	};
-
 	tests['test GET with headers'] = function() {
 		return xhr('GET', '/', {
 			headers: {
diff --git a/bundles/org.eclipse.orion.client.ui/web/operations/list.js b/bundles/org.eclipse.orion.client.ui/web/operations/list.js
index 0e7e6ee..82b7a04 100644
--- a/bundles/org.eclipse.orion.client.ui/web/operations/list.js
+++ b/bundles/org.eclipse.orion.client.ui/web/operations/list.js
@@ -32,7 +32,7 @@
 		// global commands
 		mGlobalCommands.generateBanner("orion-operationList", serviceRegistry, commandService, preferences, searcher); //$NON-NLS-0$
 		mGlobalCommands.setPageTarget({task: "Operations"});
-		mOperationsCommands.createOperationsCommands(serviceRegistry, commandService, operationsTable, operationsClient);
+		mOperationsCommands.createOperationsCommands(commandService, operationsTable, operationsClient);
 		
 		commandService.addCommandGroup("pageActions", "eclipse.taskGroup.unlabeled", 100); //$NON-NLS-1$ //$NON-NLS-0$
 		commandService.addCommandGroup("selectionTools", "eclipse.selectionGroup", 500, messages["More"]); //$NON-NLS-1$ //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/commands.js b/bundles/org.eclipse.orion.client.ui/web/orion/commands.js
index 6aab13e..b5735cd 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/commands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/commands.js
@@ -482,11 +482,11 @@
 		 * @param {String} groupId The id of the group, must be unique.  May be used for a dom node id of
 		 *  the element representing the group
 		 * @param {Number} position The relative position of the group within its parent.  Required.
-		 * @param {String} title The title of the group, optional
-		 * @param {String} parentPath The path of parent groups, separated by '/'.  For example,
+		 * @param {String} [title] The title of the group, optional
+		 * @param {String} [parentPath] The path of parent groups, separated by '/'.  For example,
 		 *  a path of "group1Id/group2Id" indicates that the group belongs as a child of 
 		 *  group2Id, which is itself a child of group1Id.  Optional.
-		 * @param {String} emptyGroupMessage A message to show if the group is empty and the user activates the UI element
+		 * @param {String} [emptyGroupMessage] A message to show if the group is empty and the user activates the UI element
 		 *  representing the group.  Optional.  If not specified, then the group UI element won't be shown when it is empty.
 		 */	
 		 
@@ -550,12 +550,12 @@
 		 *  This scope id is used when rendering commands.
 		 * @param {String} commandId the id of the command.  Required.
 		 * @param {Number} position the relative position of the command within its parent.  Required.
-		 * @param {String} parentPath the path of any parent groups, separated by '/'.  For example,
+		 * @param {String} [parentPath=null] the path of any parent groups, separated by '/'.  For example,
 		 *  a path of "group1Id/group2Id/command" indicates that the command belongs as a child of 
 		 *  group2Id, which is itself a child of group1Id.  Optional.
-		 * @param {boolean} bindingOnly if true, then the command is never rendered, but the key or URL binding is hooked.
-		 * @param {orion.commands.CommandKeyBinding} keyBinding a keyBinding for the command.  Optional.
-		 * @param {orion.commands.URLBinding} urlBinding a url binding for the command.  Optional.
+		 * @param {boolean} [bindingOnly=false] if true, then the command is never rendered, but the key or URL binding is hooked.
+		 * @param {orion.commands.CommandKeyBinding} [keyBinding] a keyBinding for the command.  Optional.
+		 * @param {orion.commands.URLBinding} [urlBinding] a url binding for the command.  Optional.
 		 */
 		registerCommandContribution: function(scopeId, commandId, position, parentPath, bindingOnly, keyBinding, urlBinding) {
 			if (!this._contributionsByScopeId[scopeId]) {
@@ -623,14 +623,14 @@
 		 *  Only contributions made to this scope will be rendered.
 		 * @param {DOMElement} parent The element in which commands should be rendered.  If commands have been
 		 *  previously rendered into this element, it is up to the caller to empty any previously generated content.
-		 * @param {Object} items An item or array of items to which the command applies.  Optional.  If not
+		 * @param {Object} [items] An item or array of items to which the command applies.  Optional.  If not
 		 *  items are specified and a selection service was specified at creation time, then the selection
 		 *  service will be used to determine which items are involved. 
 		 * @param {Object} handler The object that should perform the command
 		 * @param {String} renderType The style in which the command should be rendered.  "tool" will render
 		 *  a tool image in the dom.  "button" will render a text button.  "menu" will render menu items.  
-		 * @param {Object} userData Optional user data that should be attached to generated command callbacks
-		 * @param {Array} domNodeWrapperList Optional an array used to record any DOM nodes that are rendered during this call.
+		 * @param {Object} [userData] Optional user data that should be attached to generated command callbacks
+		 * @param {Array} [domNodeWrapperList] Optional an array used to record any DOM nodes that are rendered during this call.
 		 *  If an array is provided, then as commands are rendered, an object will be created to represent the command's node.  
 		 *  The object will always have the property "domNode" which contains the node created for the command.  If the command is
 		 *  rendered using other means (toolkit widget) then the optional property "widget" should contain the toolkit
@@ -1007,25 +1007,25 @@
 	 * @param {String} options.id the unique id to be used when referring to the command in the command service.
 	 * @param {String} options.name the name to be used when showing the command as text.
 	 * @param {String} options.tooltip the tooltip description to use when explaining the purpose of the command.
-	 * @param {Function} options.callback the callback to call when the command is activated.  The callback should either 
+	 * @param {Function} [options.callback] the callback to call when the command is activated.  The callback should either 
 	 *  perform the command or return a deferred that represents the asynchronous performance of the command.  Optional.
-	 * @param {Function} options.hrefcallback if specified, this callback is used to retrieve
+	 * @param {Function} [options.hrefcallback] if specified, this callback is used to retrieve
 	 *  a URL that can be used as the location for a command represented as a hyperlink.  The callback should return 
 	 *  the URL.  In this release, the callback may also return a deferred that will eventually return the URL, but this 
 	 *  functionality may not be supported in the future.  See https://bugs.eclipse.org/bugs/show_bug.cgi?id=341540.
 	 *  Optional.
-	 * @param {Function} options.choicecallback a callback which retrieves choices that should be shown in a secondary
+	 * @param {Function} [options.choicecallback] a callback which retrieves choices that should be shown in a secondary
 	 *  menu from the command itself.  Returns a list of choices that supply the name and image to show, and the callback
 	 *  to call when the choice is made.  Optional.
-	 * @param {String} options.imageClass a CSS class name suitable for showing a background image.  Optional.
-	 * @param {String} options.spriteClass an additional CSS class name that can be used to specify a sprite background image.  This
+	 * @param {String} [options.imageClass] a CSS class name suitable for showing a background image.  Optional.
+	 * @param {String} [options.spriteClass] an additional CSS class name that can be used to specify a sprite background image.  This
 	 *  useful with some sprite generation tools, where imageClass specifies the location in a sprite, and spriteClass describes the
 	 *  sprite itself.  Optional.
-	 * @param {Function} options.visibleWhen A callback that returns a boolean to indicate whether the command should be visible
+	 * @param {Function} [options.visibleWhen] A callback that returns a boolean to indicate whether the command should be visible
 	 *  given a particular set of items that are selected.  Optional, defaults to always visible.
-	 * @param {orion.commands.ParametersDescription} options.parameters A description of parameters that should be collected before invoking
+	 * @param {orion.commands.ParametersDescription} [options.parameters] A description of parameters that should be collected before invoking
 	 *  the command.
-	 * @param {Image} options.image the image that may be used to represent the callback.  A text link will be shown in lieu
+	 * @param {Image} [options.image] the image that may be used to represent the callback.  A text link will be shown in lieu
 	 *  of an image if no image is supplied.  Optional.
 	 * @class A command is an object that describes an action a user can perform, as well as when and
 	 *  what it should look like when presented in various contexts.  Commands are identified by a
@@ -1239,7 +1239,7 @@
 				lib.stop(e);
 			}, false);
 			domNode.addEventListener("keydown", function(e) { //$NON-NLS-0$
-				if (e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {						
+				if (e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {						
 					if (before) { before(); }
 					context.commandService._invoke(context);					
 					if (after) { after(); }
@@ -1274,7 +1274,7 @@
 						}
 					}, false); 
 					node.addEventListener("keydown", function(event) { //$NON-NLS-0$
-						if (event.keyCode === lib.KEY.ENTER || event.charCode === lib.KEY.SPACE) {
+						if (event.keyCode === lib.KEY.ENTER || event.keyCode === lib.KEY.SPACE) {
 							if (event.target.choice) {
 								event.target.choice.callback.call(event.target.choice, items);
 							}
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.css b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.css
index a7c583f..5c4fa74 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.css
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.css
@@ -105,7 +105,7 @@
 	z-index: 50;
 	width: 3px;
 	cursor: e-resize;
-	background: white;
+	background: #dedede;
 	visibility: hidden;  /* use visibility vs. display because we need a position in calculations */
 }
 
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.js b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.js
index 30da082..5a5695c 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-container.js
@@ -12,7 +12,7 @@
 //*jslint browser:true devel:true */
 define(['i18n!orion/compare/nls/messages', 'require', 'orion/Deferred', 'orion/webui/littlelib', 'orion/compare/diff-parser', 'orion/compare/compare-rulers', 'orion/editor/contentAssist',
         'orion/editorCommands','orion/editor/editor','orion/editor/editorFeatures','orion/globalCommands', 'orion/commands',
-        'orion/textview/textModel','orion/textview/textView', 'orion/compare/compare-features', 'orion/compare/compareUtils', 'orion/compare/diff-provider', 'orion/compare/jsdiffAdapter', 'orion/highlight', 'orion/compare/diffTreeNavigator', 'orion/searchAndReplace/textSearcher', 'orion/fileClient'], 
+        'orion/editor/textModel','orion/editor/textView', 'orion/compare/compare-features', 'orion/compare/compareUtils', 'orion/compare/diff-provider', 'orion/compare/jsdiffAdapter', 'orion/highlight', 'orion/compare/diffTreeNavigator', 'orion/searchAndReplace/textSearcher', 'orion/fileClient'], 
 		function(messages, require, Deferred, lib, mDiffParser, mCompareRulers, mContentAssist, mEditorCommands, mEditor, mEditorFeatures, mGlobalCommands,
 				mCommands, mTextModel, mTextView, mCompareFeatures, mCompareUtils, mDiffProvider, mJSDiffAdapter, Highlight, mDiffTreeNavigator, mSearcher, mFileClient) {
 
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-features.js b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-features.js
index 4704967..fd20abf 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-features.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compare-features.js
@@ -59,7 +59,7 @@
 				this._leftTitleDiv.style.height = "0px";
 				this._rightTitleDiv.style.height = "0px";
 			}
-			if(!this._showTitle){
+			if(!this._showLineStatus){
 				this._leftEditorParentDiv.style.marginBottom = "0px";
 				this._rightEditorWrapperDiv.style.marginBottom = "0px";
 				this._leftStatusDiv.style.height = "0px";
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareUtils.js b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareUtils.js
index d2c2c60..b3606d0 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareUtils.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/compare/compareUtils.js
@@ -186,6 +186,9 @@
 			var text = "";
 			for(var j = 0; j < mapperItem[0]; j++){
 				var lineText = diffArray[mapperItem[2]-1+j];
+				if(lineText[lineText.length-1] === "\r"){
+					lineText = lineText.substring(0, lineText.length-1);
+				}
 				text = text + lineText.substring(diffArraySubstrIndex) + lineDelim;
 			}
 			var lineCount = oldTextModel.getLineCount();
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js b/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
index 76f4065..94c9e91 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/compare/diffTreeNavigator.js
@@ -9,7 +9,7 @@
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
 
-define(['orion/treeModelIterator', 'orion/compare/compareUtils', 'orion/textview/annotations', 'orion/compare/jsdiffAdapter'], function(mTreeModelIterator, mCompareUtils, mAnnotations, mJSDiffAdapter){
+define(['orion/treeModelIterator', 'orion/compare/compareUtils', 'orion/editor/annotations', 'orion/compare/jsdiffAdapter'], function(mTreeModelIterator, mCompareUtils, mAnnotations, mJSDiffAdapter){
 
 var exports = {};
 
@@ -282,6 +282,9 @@
 		},
 		
 		replaceAllAnnotations: function(removeExisting, wrapperIndex, wordOrBlock, normal, replacingList){
+			if(!this.editorWrapper[wrapperIndex].annoTypes){
+				return;
+			}
 			for(var i = 0; i < this.editorWrapper[wrapperIndex].annoTypes.length; i++){
 				if(this.editorWrapper[wrapperIndex].annoTypes[i].type === wordOrBlock){
 					this.replaceDiffAnnotations(this.editorWrapper[wrapperIndex].editor, replacingList ? replacingList : this.editorWrapper[wrapperIndex].annoTypes[i].list, 
@@ -402,7 +405,14 @@
 			if(blockIndex < 0){
 				blockIndex = 0;
 			}
-			return this.getFeeder().getDiffBlocks().length === 0 ? -1 : this.getFeeder().getDiffBlocks()[blockIndex][1];
+			var diffBlocks = this.getFeeder().getDiffBlocks();
+			if(!diffBlocks || diffBlocks.length === 0){
+				return -1;
+			}
+			if(blockIndex > (diffBlocks.length - 1) ){
+				blockIndex = 0;
+			}
+			return diffBlocks[blockIndex][1];
 		},
 		
 		replaceDiffAnnotations: function(editor, overallAnnotations, type, removeExisting){
@@ -445,8 +455,12 @@
 				annoType0 = this.editorWrapper[0].diffFeeder.getCurrentBlockAnnoType(cursor.index);
 				annoType1 = this.editorWrapper[1].diffFeeder.getCurrentBlockAnnoType(cursor.index);
 			}
-			this.replaceDiffAnnotations(this.editorWrapper[0].editor, [new (mAnnotations.AnnotationType.getType(annoType0.current))(annoPosOld.start, annoPosOld.end)], annoType0, true);
-			this.replaceDiffAnnotations(this.editorWrapper[1].editor, [new (mAnnotations.AnnotationType.getType(annoType1.current))(annoPosNew.start, annoPosNew.end)], annoType1, true);
+			if(annoType0){
+				this.replaceDiffAnnotations(this.editorWrapper[0].editor, [new (mAnnotations.AnnotationType.getType(annoType0.current))(annoPosOld.start, annoPosOld.end)], annoType0, true);
+			}
+			if(annoType1){
+				this.replaceDiffAnnotations(this.editorWrapper[1].editor, [new (mAnnotations.AnnotationType.getType(annoType1.current))(annoPosNew.start, annoPosNew.end)], annoType1, true);
+			}
 			if(moveSelection){
 				this.autoSelecting = true;
 				this.editorWrapper[0].editor.setSelection(cursor.oldA.start, cursor.oldA.end, true);
@@ -552,6 +566,9 @@
 
 		_positionDiffBlock: function(){
 			var blockIndex = this.getCurrentBlockIndex();
+			if(blockIndex < 0){
+				blockIndex = 0;
+			}
 			var diffBlocks = this.getFeeder().getDiffBlocks();
 			if(diffBlocks.length === 0)
 				return;
@@ -614,7 +631,7 @@
 	 *
 	 * @name orion.DiffTreeNavigator.TwoWayDiffBlockFeeder
 	 * @class A feeder to feed all the diff blocks based on the line index and mapper index.
-	 * @param {orion.textview.TextModel} The text model of the whole text.
+	 * @param {orion.editor.TextModel} The text model of the whole text.
 	 * @param {array} The mapper generated from the unified diff.
 	 * @param {integer} The column index where the line index can be calculated.
 	 */
@@ -684,7 +701,7 @@
 		},
 		
 		getDiffBlockH: function(diffBlockIndex){
-			if(!this._diffBlocks){
+			if(!this._diffBlocks || this._diffBlocks.length === 0){
 				return -1;
 			}
 			var mapperIndex = this._diffBlocks[diffBlockIndex][1];
@@ -700,6 +717,9 @@
 		},
 		
 		getCharRange: function(blockIndex){
+			if(!this._diffBlocks || this._diffBlocks.length === 0){
+				return null;
+			}
 			var mapperIndex = this._diffBlocks[blockIndex][1];
 			var startLine = this._diffBlocks[blockIndex][0];
 			var endLine = startLine + this._mapper[mapperIndex][this._mapperColumnIndex] -1;
@@ -712,6 +732,9 @@
 		},
 		
 		getTextOnBlock: function(blockIndex){
+			if(!this._diffBlocks || this._diffBlocks.length === 0){
+				return null;
+			}
 			var mapperIndex = this._diffBlocks[blockIndex][1];
 			if(this._mapper[mapperIndex][0] === 0 || this._mapper[mapperIndex][1] === 0 || this._mapper[mapperIndex][2] === 0){
 				//return null;
@@ -734,7 +757,7 @@
 	 *
 	 * @name orion.DiffTreeNavigator.TwoWayDiffBlockFeeder
 	 * @class A feeder to feed all the diff blocks based on the line index and mapper index.
-	 * @param {orion.textview.TextModel} The text model of the whole text.
+	 * @param {orion.editor.TextModel} The text model of the whole text.
 	 * @param {array} The mapper generated from the unified diff.
 	 * @param {integer} The column index where the line index can be calculated.
 	 */
@@ -768,6 +791,9 @@
 		result.push({type: "block", normal: DiffAnnoTypes.ANNO_DIFF_BLOCK_CONFLICT, current: DiffAnnoTypes.ANNO_DIFF_CURRENT_BLOCK_CONFLICT, list: []}); //$NON-NLS-0$
 	};
 	TwoWayDiffBlockFeeder.prototype.getCurrentBlockAnnoType = function(diffBlockIndex){
+		if(!this._diffBlocks || this._diffBlocks.length === 0){
+			return null;
+		}
 		var mapperIndex = this._diffBlocks[diffBlockIndex][1];
 		if(this._mapper[mapperIndex][this._mapperColumnIndex] === 0){
 			return {normal: DiffAnnoTypes.ANNO_DIFF_BLOCK_TOPONLY, current: DiffAnnoTypes.ANNO_DIFF_CURRENT_BLOCK_TOPONLY};
@@ -788,7 +814,7 @@
 	 *
 	 * @name orion.DiffTreeNavigator.inlineDiffBlockFeeder
 	 * @class A feeder to feed all the diff blocks based on the line index and mapper index.
-	 * @param {orion.textview.TextModel} The text model of the whole text.
+	 * @param {orion.editor.TextModel} The text model of the whole text.
 	 * @param {array} The mapper generated from the unified diff.
 	 * @param {integer} The column index where the line index can be calculated.
 	 */
@@ -838,6 +864,9 @@
 		result.push({type: "block", normal: DiffAnnoTypes.ANNO_DIFF_BLOCK_CONFLICT, current: DiffAnnoTypes.ANNO_DIFF_CURRENT_BLOCK_CONFLICT, list: []}); //$NON-NLS-0$
 	};
 	inlineDiffBlockFeeder.prototype.getCurrentBlockAnnoType = function(diffBlockIndex){
+		if(!this._diffBlocks || this._diffBlocks.length === 0){
+			return null;
+		}
 		var mapperIndex = this._diffBlocks[diffBlockIndex][1];
 		if(this._mapper[mapperIndex][this._mapperColumnIndex] === 0){
 			//We do not want to show the empty line annotation i ninline compare
@@ -851,7 +880,7 @@
 		return {type: "block", normal: DiffAnnoTypes.ANNO_DIFF_DELETED_BLOCK, current: DiffAnnoTypes.ANNO_DIFF_CURRENT_DELETED_BLOCK, list: []}; //$NON-NLS-0$
 	};
 	inlineDiffBlockFeeder.prototype.getDiffBlockH = function(diffBlockIndex){
-		if(!this._diffBlocks){
+		if(!this._diffBlocks || this._diffBlocks.length === 0){
 			return -1;
 		}
 		var mapperIndex = this._diffBlocks[diffBlockIndex][1];
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js
index 77ae214..92eebca 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/editorCommands.js
@@ -16,7 +16,7 @@
 /**
  * @namespace The global container for orion APIs.
  */ 
-define(['i18n!orion/edit/nls/messages', 'orion/webui/littlelib', 'orion/Deferred', 'orion/URITemplate', 'orion/commands', 'orion/globalCommands', 'orion/extensionCommands', 'orion/contentTypes', 'orion/textview/keyBinding', 'orion/textview/undoStack', 'orion/searchUtils', 'orion/PageUtil'], 
+define(['i18n!orion/edit/nls/messages', 'orion/webui/littlelib', 'orion/Deferred', 'orion/URITemplate', 'orion/commands', 'orion/globalCommands', 'orion/extensionCommands', 'orion/contentTypes', 'orion/editor/keyBinding', 'orion/editor/undoStack', 'orion/searchUtils', 'orion/PageUtil'], 
 	function(messages, lib, Deferred, URITemplate, mCommands, mGlobalCommands, mExtensionCommands, mContentTypes, mKeyBinding, mUndoStack, mSearchUtils, mPageUtil) {
 
 var exports = {};
@@ -270,7 +270,7 @@
 				//        required attribute: name - the name of the command
 				//        required attribute: id - the id of the action, namespace qualified
 				//        optional attribute: tooltip - the tooltip to use for the command
-				//        optional attribute: key - an array with values to pass to the orion.textview.KeyBinding constructor
+				//        optional attribute: key - an array with values to pass to the orion.editor.KeyBinding constructor
 				//        optional attribute: img - a URL to an image for the action
 				//      optional attribute: contentType - an array of content types for which this command is valid
 				//      optional attribute: validationProperties - an array of validation properties used to read the resource
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js
index 9b2e83d..5d32337 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/globalCommands.js
@@ -13,7 +13,7 @@
 /*browser:true*/
 
 define(['i18n!orion/nls/messages', 'require', 'orion/commonHTMLFragments', 'orion/commands', 'orion/parameterCollectors', 
-	'orion/extensionCommands', 'orion/uiUtils', 'orion/textview/keyBinding', 'orion/breadcrumbs', 'orion/webui/littlelib', 'orion/webui/splitter', 
+	'orion/extensionCommands', 'orion/uiUtils', 'orion/editor/keyBinding', 'orion/breadcrumbs', 'orion/webui/littlelib', 'orion/webui/splitter', 
 	'orion/webui/dropdown', 'orion/webui/tooltip', 'orion/favorites', 'orion/contentTypes', 'orion/URITemplate', 'orion/PageUtil', 'orion/widgets/themes/container/ThemeSheetWriter', 
 	'orion/searchUtils', 'orion/inputCompletion/inputCompletion', 'orion/globalSearch/advSearchOptContainer', 'orion/Deferred',
 	'orion/widgets/UserMenu', 'orion/PageLinks', 'orion/webui/dialogs/OpenResourceDialog'], 
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js b/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js
index 6b69659..784c2ed 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/highlight.js
@@ -10,8 +10,8 @@
  ******************************************************************************/

 

 /*global define*/

-define(['examples/textview/textStyler', 'orion/editor/textMateStyler', 'orion/editor/AsyncStyler',

-			'examples/textview/textStylerOptions', 'orion/bootstrap', 'orion/textview/util', 'orion/Deferred'], 

+define(['examples/editor/textStyler', 'orion/editor/textMateStyler', 'orion/editor/AsyncStyler',

+			'examples/editor/textStylerOptions', 'orion/bootstrap', 'orion/editor/util', 'orion/Deferred'], 

 		function(mTextStyler, mTextMateStyler, AsyncStyler, mTextStylerOptions, mBootstrap, util, Deferred) {

 	/**

 	 * Returns a promise that will provide a styler for the given content type.

@@ -19,8 +19,8 @@
 	 * @param {orion.serviceregistry.ServiceRegistry} serviceRegistry

 	 * @param {orion.core.ContentTypeService} contentTypeService

 	 * @param {orion.core.ContentType} contentType

-	 * @param {orion.textview.TextView} textView

-	 * @param {orion.textview.AnnotationModel} annotationModel

+	 * @param {orion.editor.TextView} textView

+	 * @param {orion.editor.AnnotationModel} annotationModel

 	 * @param {String} [fileName] Deprecated.

 	 * @param {Boolean} [allowAsync=true]

 	 * @returns {orion.Deferred}

@@ -125,8 +125,8 @@
 	SyntaxHighlighter.prototype = /** @lends orion.highlight.SyntaxHighlighter.prototype */ {

 		/**

 		 * @param {orion.core.ContentType} contentType

-		 * @param {orion.textview.TextView} textView

-		 * @param {orion.textview.AnnotationModel} annotationModel

+		 * @param {orion.editor.TextView} textView

+		 * @param {orion.editor.AnnotationModel} annotationModel

 		 * @param {String} [fileName] <i>Deprecated.</i> For backwards compatibility only, service-contributed highlighters

 		 * will be checked against the file extension instead of contentType.

 		 * @param {Boolean} [allowAsync=true] If true, plugin-contributed asynchronous highlighters (i.e. <code>type == "highlighter"</code>

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/inputCompletion/inputCompletion.js b/bundles/org.eclipse.orion.client.ui/web/orion/inputCompletion/inputCompletion.js
index 8690f18..17b5903 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/inputCompletion/inputCompletion.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/inputCompletion/inputCompletion.js
@@ -58,6 +58,7 @@
 		this._proposalIndex = -1;
 		this._dismissed = true;
 		this._mouseDown = false;
+		this._dataList = [];
 		this._initUI();
 		
 		var that = this;
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/operationsCommands.js b/bundles/org.eclipse.orion.client.ui/web/orion/operationsCommands.js
index 4d9969d..74eea02 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/operationsCommands.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/operationsCommands.js
@@ -52,14 +52,21 @@
 			}

 		};

 		

-		exports.createOperationsCommands = function(serviceRegistry, commandService, explorer, operationsClient){

+		exports.createOperationsCommands = function(commandService, explorer, operationsClient){

 			

 			function _isOperationRunning(item){

-				if(!item.operation || item.operation.type){

+				if(!item.operation || !item.operation.type){

 					return false;

 				}

 				return (item.operation.type==="loadstart" || item.operation.type==="progress"); //$NON-NLS-1$ //$NON-NLS-0$

 			}

+			

+			function _isOperationCancelable(item){

+				if(item.operation && item.operation.cancelable){

+					return true;

+				}

+				return false;

+			}

 		

 			var removeCompletedOperationsCommand = new mCommands.Command({

 				name : messages["Remove Completed"],

@@ -100,6 +107,34 @@
 				}

 			});

 			commandService.addCommand(removeOperationCommand);

+			

+			var cancelOperationCommand = new mCommands.Command({

+				name : messages["Cancel"],

+				tooltip : messages["Cancel operations from the operations list."],

+				imageClass: "core-sprite-stop", //$NON-NLS-0$

+				id : "eclipse.cancelOperation", //$NON-NLS-0$

+				callback : function(data) {

+					var items = Array.isArray(data.items) ? data.items : [data.items];

+					for (var i=0; i < items.length; i++) {

+						var item = items[i];

+						if(item.deferred){

+							item.deferred.cancel();

+						}

+					}

+				},

+				visibleWhen : function(items) {

+					if(!Array.isArray(items) || items.length===0){

+						return (_isOperationRunning(items) && _isOperationCancelable(items));

+					}

+					for(var i in items){

+						if(!_isOperationRunning(items[i]) || !_isOperationCancelable(items[i])){

+							return false;

+						}

+					}

+					return true;

+				}

+			});

+			commandService.addCommand(cancelOperationCommand);

 		};

 	

 	}());	

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/operationsTable.js b/bundles/org.eclipse.orion.client.ui/web/orion/operationsTable.js
index 6a65184..4b34437 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/operationsTable.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/operationsTable.js
@@ -62,6 +62,11 @@
 						that.changedItem(this);

 					};

 					var failure = function(error) {

+						if(error.canceled){

+							operation.deferred = that.operationsClient.getOperation(this);

+							operation.deferred.then(success.bind(this), failure.bind(this), progress.bind(this));

+							return;

+						}

 						if(error.HttpCode==404 && error.JsonData && error.JsonData.taskNotFound){

 							globalOperations.remove(this);

 							delete operations[this];

@@ -69,7 +74,11 @@
 							return;

 						}

 						operations[this].operation = operations[this].operation || {};

-						operations[this].operation.type = "error";

+						if(error.Severity=="Cancel"){

+							operations[this].operation.type = "abort";

+						}else{

+							operations[this].operation.type = "error";

+						}

 						operations[this].operation.error = error;

 						that.changedItem(this);

 					}; 

@@ -77,7 +86,8 @@
 						operations[this].operation = operation;

 						that.changedItem(this);

 					};

-					operation.deferred = that.operationsClient.getOperation(operationLocation).then(success.bind(operationLocation), failure.bind(operationLocation), progress.bind(operationLocation));

+					operation.deferred = that.operationsClient.getOperation(operationLocation);

+					operation.deferred.then(success.bind(operationLocation), failure.bind(operationLocation), progress.bind(operationLocation));

 				}

 				that._loadOperationsList.bind(that)(operations);

 			}, displayError);

@@ -118,10 +128,8 @@
 		

 		OperationsModel.prototype.getItem = function(location){

 			var operationInfo = this.operations[location];

-			return {Location: location,

-				Name: operationInfo.Name,

-				deferred: operationInfo.deferred,

-				operation: operationInfo.operation};	

+			operationInfo.Location = location;

+			return operationInfo;

 		};

 		

 		OperationsModel.prototype.getChildren = function(parentItem, onComplete){

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/parameterCollectors.js b/bundles/org.eclipse.orion.client.ui/web/orion/parameterCollectors.js
index 73691a8..a05c6c0 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/parameterCollectors.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/parameterCollectors.js
@@ -111,7 +111,7 @@
 					}, false);
 					// onClick events do not register for spans when using the keyboard without a screen reader
 					close.addEventListener("keydown", function (e) { //$NON-NLS-0$
-						if(e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {
+						if(e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {
 							self.close();
 						}
 					}, false);
@@ -275,7 +275,7 @@
 					}, false);
 					// onClick events do not register for spans when using the keyboard without a screen reader
 					options.addEventListener("keydown", function (e) { //$NON-NLS-0$
-						if(e.keyCode === lib.KEY.ENTER  || e.charCode === lib.KEY.SPACE) {			
+						if(e.keyCode === lib.KEY.ENTER  || e.keyCode === lib.KEY.SPACE) {			
 							commandInvocation.parameters.optionsRequested = true;
 							finish(self);
 						}
@@ -288,7 +288,7 @@
 				}, false);
 				// onClick events do not register for spans when using the keyboard without a screen reader
 					ok.addEventListener("keydown", function (e) { //$NON-NLS-0$
-					if(e.keyCode === lib.KEY.ENTER  || e.charCode === lib.KEY.SPACE) {
+					if(e.keyCode === lib.KEY.ENTER  || e.keyCode === lib.KEY.SPACE) {
 						finish(self);
 					}
 				}, false);
@@ -303,7 +303,7 @@
 				}, false);
 				// onClick events do not register for spans when using the keyboard without a screen reader
 				close.addEventListener("keydown", function (e) { //$NON-NLS-0$
-					if(e.keyCode === lib.KEY.ENTER  || e.charCode === lib.KEY.SPACE) {
+					if(e.keyCode === lib.KEY.ENTER  || e.keyCode === lib.KEY.SPACE) {
 						localClose();
 					}
 				}, false);
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/progress.js b/bundles/org.eclipse.orion.client.ui/web/orion/progress.js
index 563242b..a5f556d 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/progress.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/progress.js
@@ -14,12 +14,12 @@
 function(messages, require, Deferred, lib, mOperationsDialog) {

 	

 	

-	function ProgressMonitorTool(progressPane){

+	function ProgressMonitorTool(progressPane, serviceRegistry){

 		if(this._progressPane){

 			return;

 		}

 		this._progressPane = lib.node(progressPane);

-		this._operationsDialog = new mOperationsDialog.OperationsDialog({triggerNode: this._progressPane});

+		this._operationsDialog = new mOperationsDialog.OperationsDialog({triggerNode: this._progressPane, serviceRegistry: serviceRegistry});

 		var that = this;

 		this._progressPane.addEventListener("keydown", function(evt) {  //$NON-NLS-0$

 			if(evt.charOrCode === ' ' || evt.keyCode === lib.KEY.ENTER) { //$NON-NLS-0$

@@ -36,7 +36,7 @@
 				this._lastIconClass = iconClass;

 				this._progressPane.classList.add(this._lastIconClass);

 			},

-			generateOperationsInfo: function(operations){

+			generateOperationsInfo: function(operations, deferreds){

 				

 				var operationsToDisplay = {};

 				for(var i in operations){

@@ -52,7 +52,7 @@
 					if(this._progressPane.hasAttribute("aria-valuetext")) { //$NON-NLS-0$

 						this._progressPane.removeAttribute("aria-valuetext"); //$NON-NLS-0$

 					}

-					this._operationsDialog.setOperations(operationsToDisplay);

+					this._operationsDialog.setOperations(operationsToDisplay, deferreds);

 					return;

 				}

 				

@@ -97,7 +97,7 @@
 					}

 					this._switchIconTo("progressPane_operations");					 //$NON-NLS-0$

 				}

-				this._operationsDialog.setOperations(operationsToDisplay);

+				this._operationsDialog.setOperations(operationsToDisplay, deferreds);

 			},

 			_isEmpty: function(object){

 				for(var key in object){

@@ -121,6 +121,7 @@
 		this._serviceRegistration = serviceRegistry.registerService("orion.page.progress", this); //$NON-NLS-0$ 

 		this._operationsClient = operationsClient;

 		this._operations = {};

+		this._operationDeferrds = {};

 		this._operationsIndex = 0;

 		this._lastOperation = null;

 		this._lastIconClass = null;

@@ -132,7 +133,7 @@
 				if(this._progressMonitorClass){

 					return; // we have an other progress monitor implementation, we don't need to initialize our UI

 				}

-				this._progressMonitorTool = new ProgressMonitorTool(progressPane);

+				this._progressMonitorTool = new ProgressMonitorTool(progressPane, this._serviceRegistry);

 			},

 			progress: function(deferred, operationName, progressMonitor){

 				var that = this;

@@ -151,7 +152,7 @@
 						if(progressMonitor){

 							operation.progressMonitor = progressMonitor;

 						}

-						that.writeOperation.bind(that)(operationsIndex, operation);

+						that.writeOperation.bind(that)(operationsIndex, operation, deferred);

 						if(!operation.Location){

 							that._removeOperationFromTheList.bind(that)(operationsIndex);

 						}

@@ -165,9 +166,9 @@
 							operation.progressMonitor = progressMonitor;

 						}

 						that._lastOperation = operation;

-						operation.type = "error";

+						operation.type = error.canceled ? "abort" : "error";

 						operation.error = error; 

-						that.writeOperation.bind(that)(operationsIndex, operation);

+						that.writeOperation.bind(that)(operationsIndex, operation, deferred);

 						if(!operation.Location){

 							that._removeOperationFromTheList.bind(that)(operationsIndex);

 						}

@@ -178,7 +179,7 @@
 					if(progressMonitor){

 						operation.progressMonitor = progressMonitor;

 					}

-					that.writeOperation.bind(that)(operationsIndex, operation);

+					that.writeOperation.bind(that)(operationsIndex, operation, deferred);

 				});

 				return deferred;

 			},

@@ -195,10 +196,11 @@
 			_removeOperationFromTheList: function(operationId){

 				var progressMonitor = this._operations[operationId].progressMonitor;

 				delete this._operations[operationId];

+				delete this._operationDeferrds[operationId];

 				if(progressMonitor){

 					progressMonitor.done();

 				}else{

-					this._progressMonitorTool.generateOperationsInfo(this._operations); 

+					this._progressMonitorTool.generateOperationsInfo(this._operations, this._operationDeferrds); 

 				}

 			},

 			removeCompletedOperations: function(){

@@ -209,9 +211,10 @@
 						if(progressMonitor)

 							progressMonitor.done();

 						delete this._operations[i];

+						delete this._operationDeferrds[i];

 					}

 				}

-				this._progressMonitorTool.generateOperationsInfo(operations);

+				this._progressMonitorTool.generateOperationsInfo(operations, this._operationDeferrds);

 			},

 			setProgressResult: function(result){

 				this._serviceRegistry.getService("orion.page.message").setProgressResult(result); //$NON-NLS-0$

@@ -237,8 +240,9 @@
 				});

 				return this.progress(deferred, message);

 			},

-			writeOperation: function(operationIndex, operation){

+			writeOperation: function(operationIndex, operation, deferred){

 				this._operations[operationIndex] = operation;

+				this._operationDeferrds[operationIndex] = deferred;

 				if(operation.Location){

 					serviceRegistry.getService("orion.core.preference").getPreferences("/operations").then(function(globalOperations){

 						globalOperations.put(operation.Location, {Name: operation.Name, expires: operation.expires});

@@ -247,7 +251,7 @@
 				if(operation.progressMonitor){

 					operation.progressMonitor.progress(operation.Name);

 				}else{

-					this._progressMonitorTool.generateOperationsInfo(this._operations);

+					this._progressMonitorTool.generateOperationsInfo(this._operations, this._operationDeferrds);

 				}

 			}

 	};

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js b/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js
index 0433ca4..fc09dd1 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/searchAndReplace/textSearcher.js
@@ -12,7 +12,7 @@
  ******************************************************************************/
 /*global define window document navigator*/
 
-define(['i18n!orion/search/nls/messages', 'require', 'orion/webui/littlelib', 'orion/textview/annotations', 'orion/commands', 'orion/searchUtils' ], 
+define(['i18n!orion/search/nls/messages', 'require', 'orion/webui/littlelib', 'orion/editor/annotations', 'orion/commands', 'orion/searchUtils' ], 
 	function(messages, require, lib, mAnnotations, mCommands, mSearchUtils){
 	
 var orion = orion || {};
@@ -226,7 +226,7 @@
 			button.addEventListener("click", callback.bind(this), false); //$NON-NLS-0$
 			var self = this;
 			button.addEventListener("keydown", function(e) { //$NON-NLS-0$
-				if (e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {						
+				if (e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {						
 					callback.bind(self)();			
 				} else if (e.keyCode === lib.KEY.ESCAPE) {
 					self.closeUI();
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js b/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js
index a1ba0aa..d670dde 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/searchExplorer.js
@@ -360,7 +360,7 @@
 				check.checked = this.getCheckedFunc(this.explorer.model._listRoot);
 				check.classList.toggle("core-sprite-check_on"); //$NON-NLS-0$
 			}
-			_connect(check, "onclick", function(evt) { //$NON-NLS-0$
+			_connect(check, "click", function(evt) { //$NON-NLS-0$
 				var newValue = evt.target.checked ? false : true;
 				this.onCheck(null, evt.target, newValue);
 			}.bind(this));
@@ -530,7 +530,7 @@
 		var linkLocation = item.parent.linkLocation + mSearchUtils.generateFindURLBinding(this.explorer.model._searchParams, this.explorer.model.searchHelper.inFileQuery, item.lineNumber, this.explorer._replaceStr);
 		var link = _createLink('navlink', this.getItemLinkId(item), linkLocation, spanHolder); //$NON-NLS-0$
 		mNavUtils.addNavGrid(this.explorer.getNavDict(), item, link);
-		_connect(link, "onclick", function() { //$NON-NLS-0$
+		_connect(link, "click", function() { //$NON-NLS-0$
 			that.explorer.getNavHandler().cursorOn(item);
 		});
 		var span = _createElement('span', null, null, link); //$NON-NLS-0$
@@ -577,7 +577,7 @@
 		link.title = i18nUtil.formatMessage(messages["Search again in this folder with \"${0}\""], this.explorer.model.searchHelper.displayedSearchTerm);
 		mNavUtils.addNavGrid(this.explorer.getNavDict(), item, link);
 		var that = this;
-		_connect(link, "onclick", function() { //$NON-NLS-0$
+		_connect(link, "click", function() { //$NON-NLS-0$
 			that.explorer.closeContextTip();
 		});
 	};
@@ -675,13 +675,13 @@
 			var span = _createElement('span', "primaryColumn", null, div);//$NON-NLS-1$ //$NON-NLS-0$
 
 			_place(document.createTextNode(item.model.fullPathName + "/" + item.model.name), span, "only"); //$NON-NLS-1$ //$NON-NLS-0$
-			_connect(span, "onclick", function() { //$NON-NLS-0$
+			_connect(span, "click", function() { //$NON-NLS-0$
 				window.open(item.model.linkLocation);
 			});
-			_connect(span, "onmouseover", function() { //$NON-NLS-0$
+			_connect(span, "mouseover", function() { //$NON-NLS-0$
 				span.style.cursor ="pointer"; //$NON-NLS-0$
 			});
-			_connect(span, "onmouseout", function() { //$NON-NLS-0$
+			_connect(span, "mouseout", function() { //$NON-NLS-0$
 				span.style.cursor ="default"; //$NON-NLS-0$
 			});
 			
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/sites/nls/root/messages.js b/bundles/org.eclipse.orion.client.ui/web/orion/sites/nls/root/messages.js
index 796191f..00250e8 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/sites/nls/root/messages.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/sites/nls/root/messages.js
@@ -68,5 +68,6 @@
 	"Changes you make here won't affect the running site." : "Changes you make here won't affect the running site.",
 	"Stopped" : "Stopped",
 	"Started at " : "Started at ",
-	"EnterPortNumber": "Enter the HTTP port number that the Orion server is running on (default is ${0}):"
+	"EnterPortNumber": "Enter the HTTP port number that the Orion server is running on (default is ${0}):",
+	"SitesCommandScope": "Sites"
 });
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js b/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js
index 86f9646..78fe198 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/sites/sitesExplorer.js
@@ -103,7 +103,7 @@
 					
 					commandService.registerCommandContribution(that.selectionActionsWrapperId, 'orion.site.start', 20); //$NON-NLS-0$
 					commandService.registerCommandContribution(that.selectionActionsWrapperId, 'orion.site.stop', 30); //$NON-NLS-0$
-					commandService.registerCommandContribution(that.selectionActionsWrapperId, 'orion.site.delete', 40); //$NON-NLS-0$
+					commandService.registerCommandContribution(that.selectionActionsWrapperId, 'orion.site.delete', 40, null, false, new mCommands.CommandKeyBinding(lib.KEY.DEL, false, false, false, false, null, messages['SitesCommandScope'])); //$NON-NLS-0$
 					
 					commandService.registerCommandContribution(that.defaultActionWrapperId, 'orion.site.start', 20); //$NON-NLS-0$
 					commandService.registerCommandContribution(that.defaultActionWrapperId, 'orion.site.stop', 30); //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/status.js b/bundles/org.eclipse.orion.client.ui/web/orion/status.js
index 560f524..d97a465 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/status.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/status.js
@@ -43,7 +43,7 @@
 				}, false);	

 				// onClick events do not register for spans when using the keyboard

 				closeButton.addEventListener("keydown", function(e) { //$NON-NLS-0$

-					if (e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {						

+					if (e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {						

 						self.setProgressMessage("");

 					}				

 				}, false);

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js b/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
index 541c673..d87c104 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/uiUtils.js
@@ -209,7 +209,7 @@
 			lib.stop(e);
 		}, false);
 		button.addEventListener("keydown", function(e) { //$NON-NLS-0$
-			if (e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {						
+			if (e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {						
 				callback();
 				lib.stop(e);
 			}				
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialog.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialog.js
index 7fc47b3..79996bd 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialog.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialog.js
@@ -90,7 +90,7 @@
 			// hook key handlers.  This must be done after _makeButtons so that the default callback (if any)
 			// is established.
 			this.$close.addEventListener("keydown", function (e) { //$NON-NLS-0$
-				if(e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {
+				if(e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {
 					self.hide();
 				}
 			}, false);
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js
index 43ceaf9..bf7c916 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/OperationsDialog.js
@@ -11,8 +11,8 @@
 /*global define*/

 /*jslint browser:true*/

 

-define(['i18n!orion/operations/nls/messages', 'require', 'orion/webui/littlelib', 'orion/webui/popupdialog'],

-function(messages, require, lib, popupdialog) {

+define(['i18n!orion/operations/nls/messages', 'require', 'orion/webui/littlelib', 'orion/webui/popupdialog', 'orion/operationsCommands'],

+function(messages, require, lib, popupdialog, mOperationsCommands) {

 	

 	/**

 	 * Usage: <code>new OperationsDialog(options).show();</code>

@@ -22,7 +22,7 @@
 	 * @param {DOMNode} [options.triggerNode] The node that triggers the dialog.

 	 */

 	function OperationsDialog(options) {

-		this._init(options);

+		this._options = options;

 	}

 	

 	OperationsDialog.prototype = new popupdialog.PopupDialog();

@@ -41,6 +41,10 @@
 

 	OperationsDialog.prototype._init = function(options) {

 		this._myOperations = [];

+		this._operationsDeferreds = [];

+		this._commandService = options.serviceRegistry.getService("orion.page.command");

+		mOperationsCommands.createOperationsCommands(this._commandService);		

+		this._commandService.registerCommandContribution("operationsDialogItems", "eclipse.cancelOperation", 1); //$NON-NLS-1$ //$NON-NLS-0$

 		this._initialize(options.triggerNode);

 	};

 	

@@ -49,11 +53,16 @@
 		this._setOperationsVisibility();

 	};

 

-	OperationsDialog.prototype.setOperations = function(operations){

+	OperationsDialog.prototype.setOperations = function(operations, deferreds){

+		if(!this._myOperations){

+			this._init(this._options)

+		}

 		this._myOperations = [];

+		this._operationsDeferreds = [];

 		if(operations)

 			for(var i in operations){

 				this._myOperations.push(operations[i]);

+				this._operationsDeferreds.push(deferreds[i]);

 			}

 		this._renderOperations();

 	};

@@ -78,10 +87,10 @@
 	};

 	

 	OperationsDialog.prototype._renderOperations = function(){

-		this._renderOperationsTable(this.$myOperationsList, this._myOperations);

+		this._renderOperationsTable(this.$myOperationsList, this._myOperations, this._operationsDeferreds);

 	};

 	

-	OperationsDialog.prototype._renderOperationsTable = function(operationsTable, operations){

+	OperationsDialog.prototype._renderOperationsTable = function(operationsTable, operations, deferreds){

 		lib.empty(operationsTable);

 		for(var i=0; i<operations.length; i++){

 			var operation = operations[i];

@@ -140,6 +149,10 @@
 				span.textContent = message;

 			}

 			

+			var operationActions = document.createElement("span"); //$NON-NLS-0$

+			div.appendChild(operationActions);

+			this._commandService.renderCommands("operationsDialogItems", div, {operation: operation, deferred: deferreds[i]}, this, "tool");  //$NON-NLS-0$

+			

 			operationsTable.appendChild(tr);

 		}

 		this._setOperationsVisibility();

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/SFTPConnectionDialog.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/SFTPConnectionDialog.js
index 419ceaf..4af9683 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/SFTPConnectionDialog.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dialogs/SFTPConnectionDialog.js
@@ -52,7 +52,7 @@
 		};
 		this.$addSftpConnection.addEventListener("click", addConnection.bind(self), false); //$NON-NLS-0$
 		this.$addSftpConnection.addEventListener("keydown", function(e) { //$NON-NLS-0$
-			if (e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {						
+			if (e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {						
 				addConnection.bind(self)();
 				lib.stop(e);
 			}				
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
index bd27e53..51a7748 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/dropdown.js
@@ -51,7 +51,7 @@
 			// if trigger node is not key enabled...
 			if (this._triggerNode.tagName.toLowerCase() === "span") { //$NON-NLS-0$
 				this._triggerNode.addEventListener("keydown", function(event) { //$NON-NLS-0$
-					if (event.keyCode === lib.KEY.ENTER || event.charCode === lib.KEY.SPACE) {
+					if (event.keyCode === lib.KEY.ENTER || event.keyCode === lib.KEY.SPACE) {
 						self.toggle();
 						lib.stop(event);
 					}
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/popupdialog.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/popupdialog.js
index f5165e5..2c81d7b 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/popupdialog.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/popupdialog.js
@@ -42,17 +42,20 @@
 		 * Called by clients once the popup dialog template has been bound to the TEMPLATE variable, and an optional message object has
 		 * been set.
 		 * @param {DOMElement} triggerNode The node that should trigger the popup.
-		 * @param {Function} afterShowing Optional.  A function to call after the popup appears.
-		 * @param {Function} afterHiding Optional.  A function to call after the popup is hidden.
+		 * @param {Function} afterShowing Optional. A function to call after the popup appears.
+		 * @param {Function} afterHiding Optional. A function to call after the popup is hidden.
+		 * @param {String} trigger Optional. The event that triggers the popup. Defaults to "click". Can be one of "mouseover",
+		 * @param {Number} hideDelay Optional.  The delay to be used when hiding the popup.
+		 * "click", or "none".  If "none" then the creator will be responsible for showing, hiding, and destroying the popup.
 		 */
 
-		_initialize: function(triggerNode, afterShowing, afterHiding) {
+		_initialize: function(triggerNode, afterShowing, afterHiding, trigger, hideDelay) {
 			this._tooltip = new tooltip.Tooltip({
 				node: triggerNode,
-				hideDelay: 0,
+				hideDelay: hideDelay || 0,
 				afterShowing: this._afterShowingFunction(afterShowing).bind(this), 
 				afterHiding: afterHiding,
-				trigger: "click" //$NON-NLS-0$
+				trigger: trigger ? trigger : "click" //$NON-NLS-0$
 			});
 			this.$parent = this._tooltip.contentContainer();
 			this.$parent.role = "dialog"; //$NON-NLS-0$
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/webui/tooltip.js b/bundles/org.eclipse.orion.client.ui/web/orion/webui/tooltip.js
index e8461b0..9cce3e8 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/webui/tooltip.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/webui/tooltip.js
@@ -24,7 +24,7 @@
 	 * @param options.node The node showing the tooltip.  Required.
 	 * @param options.text The text in the tooltip.  Optional.  If not specified, the client is expected to add content
 	 * to the tooltip prior to triggering it.
-	 * @param options.trigger The event that triggers the tooltip.  Optional.  Defaults to "mouseover."  Can be one of "mouseover",
+	 * @param options.trigger The event that triggers the tooltip.  Optional.  Defaults to "mouseover".  Can be one of "mouseover",
 	 * "click", or "none".  If "none" then the creator will be responsible for showing, hiding, and destroying the tooltip.
 	 * If "mouseover" then the aria attributes for tooltips will be set up.
 	 * @param options.position An array specifying the preferred positions to try positioning the tooltip.  Positions can be "left", "right", 
@@ -103,6 +103,21 @@
 					 this._tipInner.id = "tooltip" + new Date().getTime().toString(); //$NON-NLS-0$
 					 this._node.setAttribute("aria-describedby", this._tipInner.id); //$NON-NLS-0$
 				}
+				// see https://bugs.eclipse.org/bugs/show_bug.cgi?id=398960
+				// mousing over the tip itself will cancel any pending timeout to close it, but then we must
+				// also close it when we leave the tip.
+				this._tip.addEventListener("mouseover", function(event) { //$NON-NLS-0$
+					if (self._timeout) {
+						window.clearTimeout(self._timeout);
+						self._timeout = null;
+					}
+					self._tip.addEventListener("mouseout", function(event) { //$NON-NLS-0$
+						if (lib.contains(self._tip, event.target)) {
+							self.hide();
+							lib.stop(event);
+						}
+					}, false);
+				}, false);
 			}
 			return this._tip;
 		},
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/Shell.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/Shell.js
index 3c1c122..a4d0257 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/Shell.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/Shell.js
@@ -185,6 +185,12 @@
 				mTypes.registerType(NewType);
 			},
 			/**
+			 * Sets focus to the Shell's input area.
+			 */
+			setFocusToInput: function() {
+				this.inputText.focus();
+			},
+			/**
 			 * Populates the Shell's input area with a string value.
 			 */
 			setInputText: function(value) {
@@ -192,12 +198,6 @@
 					this.inputText.value = value.toString();
 				}
 			},
-			/**
-			 * Sets focus to the Shell's input area.
-			 */
-			setFocus: function() {
-				this.inputText.focus();
-			},
 			
 			/** @private */
 
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/UserMenu.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/UserMenu.js
index 95ed30f..36f87d7 100644
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/UserMenu.js
+++ b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/UserMenu.js
@@ -53,7 +53,7 @@
 			element.addEventListener("click", click, false); //$NON-NLS-0$

 			// onClick events do not register for spans when using the keyboard

 			element.addEventListener("keydown", function(e) { //$NON-NLS-0$

-				if (e.keyCode === lib.KEY.ENTER || e.charCode === lib.KEY.SPACE) {	

+				if (e.keyCode === lib.KEY.ENTER || e.keyCode === lib.KEY.SPACE) {	

 					click();

 				}

 			}, false);

diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginCompletionSection.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginCompletionSection.js
deleted file mode 100644
index efd05c2..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginCompletionSection.js
+++ /dev/null
@@ -1,48 +0,0 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: Anton McConville - IBM Corporation - initial API and implementation

- ******************************************************************************/

-/*global dojo dijit widgets orion  window console define localStorage*/

-/*jslint browser:true*/

-

-/* This SettingsContainer widget is a dojo border container with a left and right side. The left is for choosing a 

-   category, the right shows the resulting HTML for that category. */

-

-define(['i18n!orion/settings/nls/messages', 'require', 'dojo', 'dijit', 'dijit/TooltipDialog', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'orion/widgets/plugin/PluginList', 'orion/widgets/maker/ScrollingContainerSection'], function(messages, require, dojo, dijit) {

-

-	dojo.declare("orion.widgets.maker.PluginCompletionSection", [orion.widgets.maker.ScrollingContainerSection], { //$NON-NLS-0$

-						

-		content:'<form class="scrollForm" action="/" method="post">' +	 //$NON-NLS-0$

-					'<fieldset>' + //$NON-NLS-0$

-						'<div class="steps">' + //$NON-NLS-0$

-							'<a id="code" class="nextlink downloadbutton" style="float: left; background-color: #2dad2d;" target="_blank"><span style="display: inline-block;">'+messages['Edit Plugin JavaScript']+'</span></a>' + //$NON-NLS-2$ //$NON-NLS-0$

-							'<a id="installer" class="nextlink downloadbutton" style="padding-left:20px;float: left; background-color: #2dad2d;" target="_blank"><span style="display: inline-block;">'+messages['Install Plugin']+'</span></a>' + //$NON-NLS-2$ //$NON-NLS-0$

-						'</div>' + //$NON-NLS-0$

-					'</fieldset>' +								 //$NON-NLS-0$

-				'</form>', //$NON-NLS-0$

-				

-		updateReferences: function( root, path, name ){

-			var installer = dojo.byId( "installer" ); //$NON-NLS-0$

-			installer.href = root + 'settings/settings.html#,category=plugins,installPlugin=' + path; //$NON-NLS-0$

-			

-			var code = dojo.byId( "code" ); //$NON-NLS-0$

-			code.href =  root + 'edit/edit.html#/file/FF/bundles/org.eclipse.orion.client.ui/web/plugins/' + name + '/' + name + '.js'; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-		},

-				

-		getData: function(){

-			var data = [];

-			data.id = this.sectionID;

-			data.name = dojo.byId( 'pluginname' ).value; //$NON-NLS-0$

-			data.author = dojo.byId( 'pluginauthor' ).value; //$NON-NLS-0$

-			data.licence = dojo.byId( 'pluginLicence' ).value; //$NON-NLS-0$

-			data.description = dojo.byId( 'pluginDescription' ).value; //$NON-NLS-0$

-			return data;

-		}

-	});

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginDescriptionSection.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginDescriptionSection.js
deleted file mode 100644
index 6cf90c4..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginDescriptionSection.js
+++ /dev/null
@@ -1,52 +0,0 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: Anton McConville - IBM Corporation - initial API and implementation

- ******************************************************************************/

-/*global dojo dijit widgets orion  window console define localStorage*/

-/*jslint browser:true*/

-

-/* This SettingsContainer widget is a dojo border container with a left and right side. The left is for choosing a 

-   category, the right shows the resulting HTML for that category. */

-

-define(['i18n!orion/settings/nls/messages', 'require', 'dojo', 'dijit', 'dijit/TooltipDialog', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'orion/widgets/plugin/PluginList', 'orion/widgets/maker/ScrollingContainerSection'], function(messages, require, dojo, dijit) {

-

-	dojo.declare("orion.widgets.maker.PluginDescriptionSection", [orion.widgets.maker.ScrollingContainerSection], { //$NON-NLS-0$

-						

-		content: '<form class="scrollForm" action="/" method="post">' +	 //$NON-NLS-0$

-					'<fieldset>' + //$NON-NLS-0$

-						'<p class="first">' +					 //$NON-NLS-0$

-							'<label for="name">'+messages['Plugin Name:']+'</label>' +				 //$NON-NLS-2$ //$NON-NLS-0$

-							'<input type="text" name="name" id="pluginname" size="30">' +					 //$NON-NLS-0$

-						'</p>' + //$NON-NLS-0$

-						'<p>' +					 //$NON-NLS-0$

-							'<label for="email">'+messages['Author Name:']+'</label>' +				 //$NON-NLS-2$ //$NON-NLS-0$

-							'<input  type="text" name="email" id="pluginauthor" size="30">' +				 //$NON-NLS-0$

-						'</p>' + //$NON-NLS-0$

-						'<p>' + //$NON-NLS-0$

-							'<label for="web">'+messages['Licence:']+'</label>' +				 //$NON-NLS-2$ //$NON-NLS-0$

-							'<input type="text" name="web" id="pluginLicence" size="30">' +										 //$NON-NLS-0$

-						'</p>' +			 //$NON-NLS-0$

-						'<p>' + //$NON-NLS-0$

-							'<label for="message">'+messages['Description:']+'</label>' +//$NON-NLS-2$ //$NON-NLS-0$

-							'<textarea name="message" id="pluginDescription" cols="30" rows="10"></textarea>' + //$NON-NLS-0$

-						'</p>' +					 //$NON-NLS-0$

-					'</fieldset>' +								 //$NON-NLS-0$

-				'</form>', //$NON-NLS-0$

-				

-		getData: function(){

-			var data = [];

-			data.id = this.sectionID;

-			data.name = dojo.byId( 'pluginname' ).value; //$NON-NLS-0$

-			data.author = dojo.byId( 'pluginauthor' ).value; //$NON-NLS-0$

-			data.licence = dojo.byId( 'pluginLicence' ).value; //$NON-NLS-0$

-			data.description = dojo.byId( 'pluginDescription' ).value; //$NON-NLS-0$

-			return data;

-		}

-	});

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginMakerContainer.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginMakerContainer.js
deleted file mode 100644
index e5258ac..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/PluginMakerContainer.js
+++ /dev/null
@@ -1,333 +0,0 @@
-/*******************************************************************************
- * @license
- * Copyright (c) 2012 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials are made 
- * available under the terms of the Eclipse Public License v1.0 
- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
- * 
- * Contributors: Anton McConville - IBM Corporation - initial API and implementation
- ******************************************************************************/
-/*global dojo dijit widgets orion  window console define localStorage*/
-/*jslint browser:true*/
-
-/* This SettingsContainer widget is a dojo border container with a left and right side. The left is for choosing a 
-   category, the right shows the resulting HTML for that category. */
-
-define(['require', 'dojo', 'dijit', 'orion/commands', 'orion/fileClient', 'dijit/TooltipDialog', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'orion/widgets/plugin/PluginList', 'orion/widgets/maker/ScrollingContainer', 'orion/widgets/maker/PluginCompletionSection'], function(require, dojo, dijit, mCommands, mFileClient) {
-
-	dojo.declare("orion.widgets.maker.PluginMakerContainer", [orion.widgets.maker.ScrollingContainer], { //$NON-NLS-0$
-		
-		fileClient: null,
-		
-		path: '/file/FF/bundles/org.eclipse.orion.client.ui/web/plugins/', //$NON-NLS-0$
-		
-		csscomplete: false,
-		jscomplete: false,
-		htmlcomplete: false,
-		
-		postCreate: function(){
-			
-			var bar = dojo.byId( 'pageToolbar' );	 //$NON-NLS-0$
-			dojo.style( bar, 'borderBottom', '2px solid whitesmoke' ); //$NON-NLS-1$ //$NON-NLS-0$
-			
-			var actions = dojo.byId( 'pageActions' ); //$NON-NLS-0$
-			
-			this.sectionNavigation = dojo.create( 'div', null, actions ); //$NON-NLS-0$
-		
-			this.sectionList = [];
-			
-			this.fileClient = new mFileClient.FileClient(this.serviceRegistry);	
-		},
-		
-		
-		addCommand: function( name, command ){
-		
-			var id = "orion.add" + name; //$NON-NLS-0$
-			var tooltip = name;
-		
-			var createPluginCommand = new mCommands.Command({
-				name: name,
-				tooltip: tooltip,
-				id: id,
-				anchor: name,
-				callback: dojo.hitch( this, command )
-			});
-			
-			this.commandService.addCommand(createPluginCommand);
-			this.commandService.registerCommandContribution(this.toolbarID, id, 2);
-			this.commandService.renderCommands(this.toolbarID, this.toolbarID, this, this, "button"); //$NON-NLS-0$
-			
-			var nodes = dojo.query(".commandButton"); //$NON-NLS-0$
-			
-			for( var n = 0; n < nodes.length; n++ ){
-				nodes[n].style.padding = '3px'; //$NON-NLS-0$
-			}	
-		},
-		
-		
-		handleError: function(error){
-			console.log( error );
-		},
-		
-		handleSuccess: function(media, name ){
-		
-			switch( media ){
-				case 'css': //$NON-NLS-0$
-					this.csscomplete = true;
-					break;
-					
-				case 'js': //$NON-NLS-0$
-					this.jscomplete = true;
-					break;
-					
-				case 'html': //$NON-NLS-0$
-					this.htmlcomplete = true;
-					break;
-			}
-		
-			if( this.csscomplete && this.htmlcomplete && this.jscomplete ){
-			
-			
-				var root = window.location.href.split('settings')[0]; //$NON-NLS-0$
-				
-				var pluginPath = root + 'plugins/' + name + '/' + name + '.html'; //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-				
-				var source;
-			
-				var complete = orion.widgets.maker.PluginCompletionSection({title:"Next Steps"}); //$NON-NLS-0$
-				
-				var createButton = dojo.byId( 'buttonorion.addCreate0' ); //$NON-NLS-0$
-				createButton.parentNode.removeChild(createButton);
-				
-				var menuItem = this.addSection( complete );
-				
-				var event = [];
-				event.currentTarget = menuItem;
-				
-				this.scrollTo( event );
-				
-				complete.updateReferences( root, pluginPath, name );
-			}
-		},
-		
-		writeJSContent: function(){
-		
-			var content = this.prepareJSContent();
-			var def = this.fileClient.write( this.javascriptFile, content );
-			var progress = this.serviceRegistry.getService("orion.page.progress");
-			if(progress){
-				progress.progress(def, "Writing javascript content for " + this.pluginName);
-			}
-			def.then(
-							dojo.hitch(this, 'handleSuccess', 'js', this.pluginName ), //$NON-NLS-1$ //$NON-NLS-0$
-							this.handleError);
-		},
-		
-		writeCSSContent: function(){
-		
-			var content =		'.plugin{\n' + //$NON-NLS-0$
-									'\tborder:solid 5px #ebf4fb;\n' + //$NON-NLS-0$
-									'\twidth: 400px;\n' + //$NON-NLS-0$
-									'\theight: 400px;\n' + //$NON-NLS-0$
-									'\tposition: absolute;\n' + //$NON-NLS-0$
-									'\tleft: 50%;\n' + //$NON-NLS-0$
-									'\ttop: 50%;\n' + //$NON-NLS-0$
-									'\tmargin-left: -200px;\n' + //$NON-NLS-0$
-									'\tmargin-top: -200px;\n' + //$NON-NLS-0$
-									'\tborder-radius:5px;\n' + //$NON-NLS-0$
-								'}\n\n' + //$NON-NLS-0$
-
-								'.banner{\n' + //$NON-NLS-0$
-									'\tfont-size:14px;\n' + //$NON-NLS-0$
-									'\tfont-weight:bold;\n' + //$NON-NLS-0$
-									'\tmargin:14px;\n' + //$NON-NLS-0$
-									'\tcolor:#5b6e79;\n' + //$NON-NLS-0$
-									'\ttext-align:center;\n' + //$NON-NLS-0$
-									'\tmargin-top:50px;\n' + //$NON-NLS-0$
-								'}\n\n' + //$NON-NLS-0$
-
-								'.title{\n' + //$NON-NLS-0$
-									'\tfont-size:20px;\n' + //$NON-NLS-0$
-									'\tfont-weight:bold;\n' + //$NON-NLS-0$
-									'\tmargin:10px;\n' + //$NON-NLS-0$
-									'\tcolor:#5b6e79;\n' + //$NON-NLS-0$
-									'\ttext-align:center;\n' + //$NON-NLS-0$
-								'}\n\n' + //$NON-NLS-0$
-
-								'.author{\n' + //$NON-NLS-0$
-									'\tfont-size:14px;\n' + //$NON-NLS-0$
-									'\tfont-weight:bold;\n' + //$NON-NLS-0$
-									'\tmargin:10px;\n' + //$NON-NLS-0$
-									'\tcolor:#5b6e79;\n' + //$NON-NLS-0$
-									'\ttext-align:center;\n' + //$NON-NLS-0$
-								'}\n\n' + //$NON-NLS-0$
-								
-								'.created{\n' + //$NON-NLS-0$
-									'\tfont-size:14px;\n' + //$NON-NLS-0$
-									'\tfont-weight:bold;\n' + //$NON-NLS-0$
-									'\tmargin:10px;\n' + //$NON-NLS-0$
-									'\tcolor:#5b6e79;\n' + //$NON-NLS-0$
-									'\ttext-align:center;\n' + //$NON-NLS-0$
-								'}\n\n' + //$NON-NLS-0$
-								
-								'.description{\n' + //$NON-NLS-0$
-									'\tfont-size:14px;\n' + //$NON-NLS-0$
-									'\tfont-weight:bold;\n' + //$NON-NLS-0$
-						                        '\tborder-top: 1px solid #b7ddf2;\n' + //$NON-NLS-0$
-									'\tmargin:10px;\n' + //$NON-NLS-0$
-									'\tmargin-top:15px;\n' + //$NON-NLS-0$
-									'\tpadding:15px;\n' + //$NON-NLS-0$
-									'\tcolor:#5b6e79;\n' + //$NON-NLS-0$
-									'\ttext-align:center;\n' + //$NON-NLS-0$
-									'\twidth:275px;\n' + //$NON-NLS-0$
-									'\tmargin-left:50px;\n' + //$NON-NLS-0$
-									'\tmargin-right:100px;\n' + //$NON-NLS-0$
-									'\tline-height:20px;\n' + //$NON-NLS-0$
-								'}'; //$NON-NLS-0$
-								
-			var def = this.fileClient.write( this.cssFile, content );
-			var progress = this.serviceRegistry.getService("orion.page.progress");
-			if(progress){
-				progress.progress(def, "Writing css content for " + this.pluginName);
-			}
-			def.then(
-							dojo.hitch(this, 'handleSuccess', 'css', this.pluginName ), //$NON-NLS-1$ //$NON-NLS-0$
-							this.handleError);
-		
-		},
-		
-		writeHTMLContent: function(){
-		
-			var content = this.prepareHTMLContent();
-		
-			var def = this.fileClient.write( this.htmlFile, content );
-			var progress = this.serviceRegistry.getService("orion.page.progress");
-			if(progress){
-				progress.progress(def, "Writing html content for " + this.pluginName);
-			}
-			def.then(dojo.hitch(this, 'handleSuccess', 'html', this.pluginName), //$NON-NLS-1$ //$NON-NLS-0$
-							this.handleError);
-		},
-		
-		createNewFolder: function( name ){
-			var def = this.fileClient.createFolder( this.path, name );
-			var progress = this.serviceRegistry.getService("orion.page.progress");
-			if(progress){
-				progress.progress(def, "Creating folder " + name);
-			}
-			def.then(dojo.hitch(this, 'createNewFiles'), //$NON-NLS-0$
-							this.handleError);
-		},
-		
-		createNewFiles: function( filename ){	
-			
-			var pluginjs = this.pluginName + '.js'; //$NON-NLS-0$
-			var pluginhtml = this.pluginName + '.html'; //$NON-NLS-0$
-			var plugincss = this.pluginName + '.css'; //$NON-NLS-0$
-			
-			this.javascriptFile = this.path + '/' + this.pluginName + '/' + pluginjs; //$NON-NLS-1$ //$NON-NLS-0$
-			this.htmlFile = this.path + '/' + this.pluginName + '/' + pluginhtml; //$NON-NLS-1$ //$NON-NLS-0$
-			this.cssFile = this.path + '/' + this.pluginName + '/' + plugincss; //$NON-NLS-1$ //$NON-NLS-0$
-			
-			var progress = this.serviceRegistry.getService("orion.page.progress");
-			var def = this.fileClient.createFile( this.path + '/' + this.pluginName , pluginjs );
-			if(progress){
-				progress.progress("Creating javascript file for plugin " + this.pluginName);
-			}
-			def.then( //$NON-NLS-0$
-							dojo.hitch(this, 'writeJSContent'), //$NON-NLS-0$
-							this.handleError);
-			
-							
-			def = this.fileClient.createFile( this.path + '/' + this.pluginName , pluginhtml )
-			if(progress){
-				progress.progress("Creating html file for plugin " + this.pluginName);
-			}
-			def.then( //$NON-NLS-0$
-							dojo.hitch(this, 'writeHTMLContent'), //$NON-NLS-0$
-							this.handleError);
-							
-			def = this.fileClient.createFile( this.path + '/' + this.pluginName , plugincss )
-			if(progress){
-				progress.progress("Creating css file for plugin " + this.pluginName);
-			}
-			def.then( //$NON-NLS-0$
-							dojo.hitch(this, 'writeCSSContent'), //$NON-NLS-0$
-							this.handleError);
-		},
-		
-		prepareHTMLContent: function(){
-			var filecontent = '<!DOCTYPE html>\n' + //$NON-NLS-0$
-								'<html>\n' + //$NON-NLS-0$
-									'\t<head>\n' + //$NON-NLS-0$
-									  '\t\t<meta charset="UTF-8"/>\n' + //$NON-NLS-0$
-									  '\t\t<title>' + this.pluginName + '</title>\n' + //$NON-NLS-1$ //$NON-NLS-0$
-									  '\t\t<link rel=StyleSheet href="' + this.pluginName + '.css" type="text/css"></link>\n' + //$NON-NLS-1$ //$NON-NLS-0$
-									  '\t\t<script src="../../orion/plugin.js"></script>\n' + //$NON-NLS-0$
-									  '\t\t<script src="' + this.pluginName + '.js"></script>\n' + //$NON-NLS-1$ //$NON-NLS-0$
-									  '\t\t<script>\n' + //$NON-NLS-0$
-							'\t\t</script>\n' + //$NON-NLS-0$
-							'\t</head>\n' + //$NON-NLS-0$
-							'\t<body>\n' + //$NON-NLS-0$
-							'\t\t<div class="plugin">\n' + //$NON-NLS-0$
-							'\t\t\t<div class="banner">An Eclipse Orion Plugin</div>\n' + //$NON-NLS-0$
-							'\t\t\t<div class="title"> - ' + this.pluginName + ' - </div>\n' + //$NON-NLS-1$ //$NON-NLS-0$
-							'\t\t\t<div class="author">Written by ' + this.pluginAuthor + '</div>\n' + //$NON-NLS-1$ //$NON-NLS-0$
-							'\t\t\t<div class="created">Created 13.04.2012</div>\n' + //$NON-NLS-0$
-							'\t\t\t<div class="description">' + this.pluginDescription + '</div>\n' + //$NON-NLS-1$ //$NON-NLS-0$
-							'\t\t</div>\n' + //$NON-NLS-0$
-							'\t</body>\n' + //$NON-NLS-0$
-							'</html>'; //$NON-NLS-0$
-							
-			return filecontent;
-		},
-		
-		prepareJSContent: function(){	
-			var filecontent =	'/*global console eclipse CSSLint window*/\n\n' +  //$NON-NLS-0$
-								'window.onload = function() {\n' + //$NON-NLS-0$
-									'\tvar provider = new orion.PluginProvider();\n' + //$NON-NLS-0$
-									'\tvar serviceImpl = {\n' + //$NON-NLS-0$
-											'\t\trun: function(text) {\n' + //$NON-NLS-0$
-												'\t\t\treturn text.split("").reverse().join("");\n' + //$NON-NLS-0$
-											'\t\t}\n' + //$NON-NLS-0$
-									'\t};\n' +  //$NON-NLS-0$
-									'\tvar serviceProperties = {\n' +  //$NON-NLS-0$
-										'\t\tname: "Reverse Text",\n' + //$NON-NLS-0$
-										'\t\tkey: ["e", true, true] // Ctrl+Shift+e\n' + //$NON-NLS-0$
-									'\t};\n' + //$NON-NLS-0$
-									'\tprovider.registerService("orion.edit.command", serviceImpl, serviceProperties);\n' + //$NON-NLS-0$
-									'\tprovider.connect();\n' + //$NON-NLS-0$
-								'};'; //$NON-NLS-0$
-			return filecontent;
-		},
-		
-		createPlugin: function( item ){
-			
-			for( var s = 0; s < this.sectionList.length; s++ ){
-				var d = this.sectionList[s].getData();	
-				
-				if( d.id === "Plugin Description Section" ){ //$NON-NLS-0$
-				
-					this.pluginAuthor = d.author;
-					this.pluginName = d.name;
-					this.pluginDescription = d.description;
-					this.pluginLicence = d.licence;
-					
-					this.createNewFolder( this.pluginName );
-				}
-			}
-		},
-        
-		addCreationCommand: function(){
-		
-		},
-		
-		resize: function( size ){
-			var mb = dojo.marginBox ( this.scontent );	
-			dojo.style( this.scontent, 'width', mb.w + 'px' ); //$NON-NLS-1$ //$NON-NLS-0$
-			dojo.style( this.domNode.parentNode, 'overflow', 'auto' ); //$NON-NLS-1$ //$NON-NLS-0$
-		}
-	
-	});
-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/ScrollingContainer.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/ScrollingContainer.js
deleted file mode 100644
index afc5661..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/ScrollingContainer.js
+++ /dev/null
@@ -1,217 +0,0 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: Anton McConville - IBM Corporation - initial API and implementation

- ******************************************************************************/

-/*global dojo dijit widgets orion  window console define localStorage*/

-/*jslint browser:true*/

-

-/* This SettingsContainer widget is a dojo border container with a left and right side. The left is for choosing a 

-   category, the right shows the resulting HTML for that category. */

-

-define(['require', 'dojo', 'dijit', 'orion/fileClient','dijit/TooltipDialog', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'orion/widgets/plugin/PluginList', 'orion/widgets/settings/InputBuilder'], function(require, dojo, dijit, mFileClient) {

-

-	dojo.declare("orion.widgets.maker.ScrollingContainer", [dijit._Widget, dijit._Templated], { //$NON-NLS-0$

-	

-		templateString:	'<div>' +  //$NON-NLS-0$

-							'<div data-dojo-attach-point="scontent" class="scrollcontent">' +  //$NON-NLS-0$

-								'<div data-dojo-attach-point="sections" style="padding-bottom:200px;"></div>' + //$NON-NLS-0$

-							'</div>' +  //$NON-NLS-0$

-						'</div>', //$NON-NLS-0$

-						

-		scrolling: false,	

-		offset: null,

-		travel: null,

-		selectedNode: null,

-		sectionCount: 0,

-		lastScroll: 0,

-		sectionList: null,

-		

-		postCreate: function(){

-			

-			var bar = dojo.byId( 'pageToolbar' );	 //$NON-NLS-0$

-			dojo.style( bar, 'borderBottom', '2px solid whitesmoke' ); //$NON-NLS-1$ //$NON-NLS-0$

-			

-			var actions = dojo.byId( 'pageActions' ); //$NON-NLS-0$

-			

-			this.sectionNavigation = dojo.create( 'div', null, actions ); //$NON-NLS-0$

-		

-			this.sectionList = [];

-			

-			this.fileClient = new mFileClient.FileClient(this.serviceRegistry);	

-			

-			dojo.style( this.domNode.parentNode, 'background', 'white' ); //$NON-NLS-1$ //$NON-NLS-0$

-		},

-		

-		

-		addCommand: function( name, command ){

-		

-			var id = "orion.add" + name; //$NON-NLS-0$

-			var tooltip = name;

-		

-			var createPluginCommand = new mCommands.Command({

-				name: name,

-				tooltip: tooltip,

-				id: id,

-				anchor: name,

-				callback: dojo.hitch( this, command )

-			

-			});

-			

-			this.commandService.addCommand(createPluginCommand);

-			this.commandService.registerCommandContribution(this.toolbarID, id, 2);

-			this.commandService.renderCommands(this.toolbarID, this.toolbarID, this, this, "button"); //$NON-NLS-0$

-			

-			var nodes = dojo.query(".commandButton"); //$NON-NLS-0$

-			

-			for( var n = 0; n < nodes.length; n++ ){

-				nodes[n].style.padding = '3px'; //$NON-NLS-0$

-			}

-			

-		},

-

-        complete: function(name){

-			window.location.hash = name;

-			this.scrolling = false;

-        },

-        

-        rate: function(score){

-

-			var rate = Math.max(Math.abs(Math.round(score/ 3)), 1200);

-			return rate;

-        },

-        

-        fourthRoot: function(n){

-			return n*n*n*n;

-        },

-        

-        roll: function(name, time){

-        

-            var ease = ( new Date().getTime() ) - time;

-            var decrement = 2;      

-            var constant = 0.5;

-            

-            if( ease >= this.value ){

-            

-                window.clearInterval( this.interval );

-                this.complete( name );

-                

-            }else{

-            

-				var rate = ease / this.value;

-                ease = decrement * rate;

-                

-                if( ease < 1 ){

-					ease = constant * this.fourthRoot(ease);

-                }else{

-					ease -= decrement;

-                    ease = -constant * ( this.fourthRoot(ease) - decrement );

-                }

-                

-                this.lastScroll = this.offset + this.travel * ease;

-                

-                console.log( 'POINT: ' + this.lastScroll ); //$NON-NLS-0$

-                

-				dojo.byId( 'centerPane' ).scrollTop = this.lastScroll; //$NON-NLS-0$

-            }

-        },

-        

-        smooth: function( name ){

-			var date = new Date().getTime();   

-			this.interval = window.setInterval( dojo.hitch( this, 'roll', name, date ), 15 ); //$NON-NLS-0$

-        },

-		

-		adjust: function( node ){

-			dojo.removeClass( this.selectedNode, 'smiSelected' ); //$NON-NLS-0$

-			this.selectedNode = node;

-			dojo.addClass( this.selectedNode, 'smiSelected' ); //$NON-NLS-0$

-        },

-		

-		position: function(element){	

-			var coordinate = { x: 0, y: 0 };		

-			if( element !== null ){

-                coordinate.x += element.offsetLeft;

-				coordinate.y += element.offsetTop;

-                element = element.offsetParent;

-            }

-            return coordinate;

-		},

-						

-		scrollTo: function(event){

-			

-			this.scrolling = true;

-			

-			try{

-				var targetName = event.currentTarget.href.split("#")[1]; //$NON-NLS-0$

-				var targetNode = dojo.byId( targetName );

-				this.offset = this.lastScroll;

-				this.travel = this.position( targetNode ).y - this.offset;

-				this.value = this.rate( this.travel );

-				this.smooth( targetName );

-				this.adjust( event.currentTarget );			

-			}catch(e){

-				console.error(e);

-				return true;

-			}

-		},

-		

-		createMenuItem: function( name, count ){

-		

-			var content = { 'class':'scrollmenuitem',  //$NON-NLS-1$ //$NON-NLS-0$

-							'href': '#' + name,  //$NON-NLS-1$ //$NON-NLS-0$

-							'data-dojo-attach-point':name,  //$NON-NLS-0$

-							'onclick': dojo.hitch( this, 'scrollTo' ) //$NON-NLS-1$ //$NON-NLS-0$

-			};

-			content.textContent = name;

-			

-			var menuItem = dojo.create( 'a', content ); //$NON-NLS-0$

-			

-			if( !this.selectedNode ){

-				this.selectedNode = menuItem;			

-				dojo.addClass( this.selectedNode, 'smiSelected' ); //$NON-NLS-0$

-			}

-			

-			var listItem = dojo.create( 'li' ); //$NON-NLS-0$

-			

-			listItem.appendChild( menuItem );

-			

-			var counter = dojo.create( 'div', { 'class':'itemcount' }, listItem ); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-			counter.textContent = count;

-			

-			var actions = dojo.byId( 'pageActions' ); //$NON-NLS-0$

-		

-			dojo.byId( this.toolbarID ).appendChild( listItem );

-			

-			return menuItem;

-		},

-		

-		/* This will need a ScrolingContainerSection object */

-		

-		addSection: function(section){

-			this.sectionList.push(section);

-			this.sectionCount = this.sectionCount +1;

-			section.setOrder( this.sectionCount );

-			var menuItem = this.createMenuItem( section.title, this.sectionCount );

-			this.sections.appendChild( section.domNode );

-			section.startup();

-			

-			return menuItem;

-		},

-		

-		addCreationCommand: function(){

-		

-		},

-		

-		resize: function( size ){

-			var mb = dojo.marginBox ( this.scontent );	

-			dojo.style( this.scontent, 'width', mb.w + 'px' ); //$NON-NLS-1$ //$NON-NLS-0$

-			dojo.style( this.domNode.parentNode, 'overflow', 'auto' ); //$NON-NLS-1$ //$NON-NLS-0$

-		}

-	

-	});

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/ScrollingContainerSection.js b/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/ScrollingContainerSection.js
deleted file mode 100644
index 52080d9..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/orion/widgets/maker/ScrollingContainerSection.js
+++ /dev/null
@@ -1,63 +0,0 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- * 

- * Contributors: Anton McConville - IBM Corporation - initial API and implementation

- ******************************************************************************/

-/*global dojo dijit widgets orion  window console define localStorage*/

-/*jslint browser:true*/

-

-/* This SettingsContainer widget is a dojo border container with a left and right side. The left is for choosing a 

-   category, the right shows the resulting HTML for that category. */

-

-define(['require', 'dojo', 'dijit','dijit/TooltipDialog', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane', 'orion/widgets/plugin/PluginList', 'orion/widgets/settings/InputBuilder'], function(require, dojo, dijit) {

-

-	dojo.declare("orion.widgets.maker.ScrollingContainerSection", [dijit._Widget, dijit._Templated], { //$NON-NLS-0$

-	

-		templateString:	'<div>' + //$NON-NLS-0$

-							'<a class="anchor" data-dojo-attach-point="anchor" id="section" name="section"></a>' + //$NON-NLS-0$

-							'<div data-dojo-attach-point="section" class="sectionBlock">' +  //$NON-NLS-0$

-								'<div data-dojo-attach-point="contentArea" class="inner">' +  //$NON-NLS-0$

-								'</div>' + //$NON-NLS-0$

-							'</div>' +				 //$NON-NLS-0$

-							'<div data-dojo-attach-point="sectionTitle" class="pluginTitle"></div>' +  //$NON-NLS-0$

-							'<div data-dojo-attach-point="orderCircle" class="circle">1</div>' +  //$NON-NLS-0$

-						'</div>', //$NON-NLS-0$

-						

-		content: "<div></div>", //$NON-NLS-0$

-						

-		order: 1,

-		

-		postCreate: function(){

-			this.sectionID = this.title + ' Section'; //$NON-NLS-0$

-			this.selectedNode = this.home;

-			this.anchor.id = this.title;

-			this.anchor.name = this.title;

-			this.sectionTitle.textContent = this.title;

-		},

-		

-		startup: function(){

-			var mb = dojo.position( this.domNode );

-			var parentmb = dojo.position( this.domNode.parentNode );

-			this.sectionTitle.style.top = mb.y - parentmb.y - 18 + 'px'; //$NON-NLS-0$

-			this.orderCircle.style.top =  mb.y - parentmb.y + 30 + 'px'; //$NON-NLS-0$

-			dojo.place( this.content, this.contentArea );

-		},

-		

-		setOrder: function( order ){

-			this.order = order;

-			this.orderCircle.textContent = this.order;

-		},

-		

-		getData: function(){

-			var data = [];

-			data.id = this.sectionID;

-			return data;

-		}

-	

-	});

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js b/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
index f53b87b..b42d844 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/filePlugin/fileImpl.js
@@ -9,11 +9,11 @@
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
 
-/*global window define XMLHttpRequest BlobBuilder*/
+/*global window define URL XMLHttpRequest BlobBuilder*/
 /*jslint forin:true devel:true browser:true*/
 
 
-define(["orion/Deferred", "orion/xhr"], function(Deferred, xhr) {
+define(["orion/Deferred", "orion/xhr", "orion/URL-shim"], function(Deferred, xhr) {
 	/**
 	 * An implementation of the file service that understands the Orion 
 	 * server file API. This implementation is suitable for invocation by a remote plugin.
@@ -392,11 +392,14 @@
 		 * @return A deferred that will be provided with the contents or metadata when available
 		 */
 		read: function(location, isMetadata) {
-			return xhr("GET", location, {
+			var url = new URL(location, window.location);
+			if (isMetadata) {
+				url.query.set("parts", "meta");
+			}
+			return xhr("GET", url.href, {
 				timeout: 5000,
 				headers: { "Orion-Version": "1" },
-				log: false,
-				query: isMetadata ? { "parts": "meta" } : {}
+				log: false
 			}).then(function(result) {
 				if (isMetadata) {
 					return result.response ? JSON.parse(result.response) : null;
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/jsSyntaxModel/jsSyntaxModelPlugin.js b/bundles/org.eclipse.orion.client.ui/web/plugins/jsSyntaxModel/jsSyntaxModelPlugin.js
index 92ba33a..7a7c4c5 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/jsSyntaxModel/jsSyntaxModelPlugin.js
+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/jsSyntaxModel/jsSyntaxModelPlugin.js
@@ -1,6 +1,6 @@
 /*jslint browser:true*/
 /*global define esprima */
-define(['orion/plugin', 'orion/textview/textModel', 'esprima/esprima', 'domReady!'], function(PluginProvider, mTextModel) {
+define(['orion/plugin', 'orion/editor/textModel', 'esprima/esprima', 'domReady!'], function(PluginProvider, mTextModel) {
 	var provider = new PluginProvider({
 		name: 'JS Syntax Model Provider',
 		description: 'Constructs an abstract syntax tree (AST) for JavaScript code that can be used by other plugins to provide JS language tooling.',
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js b/bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js
index bdacae6..e627b6b 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js
+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/site/siteServiceImpl.js
@@ -1,6 +1,6 @@
 /*******************************************************************************
  * @license
- * Copyright (c) 2012 IBM Corporation and others.
+ * Copyright (c) 2012, 2013 IBM Corporation and others.
  * All rights reserved. This program and the accompanying materials are made 
  * available under the terms of the Eclipse Public License v1.0 
  * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
@@ -10,7 +10,7 @@
  ******************************************************************************/
 /*global define document window*/
 /*jslint regexp:false*/
-define(['require', 'orion/xhr'], function(require, xhr) {
+define(['require', 'orion/xhr', 'orion/editor/regex'], function(require, xhr, regex) {
 	
 	var temp = document.createElement('a');
 	
@@ -114,40 +114,67 @@
 			return this.projects[workspaceId];
 		};
 	}
-	function getSelfHostingMappings(basePath, port) {
+	/*
+	 * TYPE_FILE: TargetSuffix represents a workspace path
+	 * TYPE_API: TargetSuffix represents a URL on this server
+	 */
+	var TYPE_FILE = 0, TYPE_API = 1;
+	var SELF_HOSTING_TEMPLATE = [
+			{ type: TYPE_FILE, source: "/", targetSuffix: "/bundles/org.eclipse.orion.client.ui/web/index.html" },
+			{ type: TYPE_FILE, source: "/", targetSuffix: "/bundles/org.eclipse.orion.client.ui/web" },
+			{ type: TYPE_FILE, source: "/", targetSuffix: "/bundles/org.eclipse.orion.client.core/web" },
+			{ type: TYPE_FILE, source: "/", targetSuffix: "/bundles/org.eclipse.orion.client.editor/web" },
+			{ type: TYPE_API, source: "/file", targetSuffix: "file" },
+			{ type: TYPE_API, source: "/prefs", targetSuffix: "prefs" },
+			{ type: TYPE_API, source: "/workspace", targetSuffix: "workspace" },
+			{ type: TYPE_API, source: "/users", targetSuffix: "users" },
+			{ type: TYPE_API, source: "/authenticationPlugin.html", targetSuffix: "authenticationPlugin.html" },
+			{ type: TYPE_API, source: "/login", targetSuffix: "login" },
+			{ type: TYPE_API, source: "/loginstatic", targetSuffix: "loginstatic" },
+			{ type: TYPE_API, source: "/useremailconfirmation", targetSuffix: "useremailconfirmation" },
+			{ type: TYPE_API, source: "/site", targetSuffix: "site" },
+			{ type: TYPE_FILE, source: "/", targetSuffix: "/bundles/org.eclipse.orion.client.git/web" },
+			{ type: TYPE_API, source: "/gitapi", targetSuffix: "gitapi" },
+			{ type: TYPE_FILE, source: "/", targetSuffix: "/bundles/org.eclipse.orion.client.users/web" },
+			{ type: TYPE_API, source: "/xfer", targetSuffix: "xfer" },
+			{ type: TYPE_API, source: "/filesearch", targetSuffix: "filesearch" },
+			{ type: TYPE_API, source: "/index.jsp", targetSuffix: "index.jsp" },
+			{ type: TYPE_API, source: "/plugins/git", targetSuffix: "plugins/git" },
+			{ type: TYPE_API, source: "/plugins/user", targetSuffix: "plugins/user" },
+			{ type: TYPE_API, source: "/logout", targetSuffix: "logout" },
+			{ type: TYPE_API, source: "/mixlogin/manageopenids", targetSuffix: "mixlogin/manageopenids" },
+			{ type: TYPE_API, source: "/openids", targetSuffix: "openids" },
+			{ type: TYPE_API, source: "/task", targetSuffix: "task" },
+			{ type: TYPE_API, source: "/help", targetSuffix: "help" }
+	];
+	function generateSelfHostingMappings(basePath, port) {
 		var hostPrefix = "http://localhost" + ":" + port + makeHostRelative(getContext());
-		return [
-			["/", basePath + "/bundles/org.eclipse.orion.client.ui/web/index.html"],
-			["/", basePath + "/bundles/org.eclipse.orion.client.ui/web"],
-			["/", basePath + "/bundles/org.eclipse.orion.client.core/web"],
-			["/", basePath + "/bundles/org.eclipse.orion.client.editor/web"],
-			["/org.dojotoolkit/dojo", basePath + "/bundles/org.eclipse.orion.client.ui/web/dojo"],
-			["/org.dojotoolkit/dojox", basePath + "/bundles/org.eclipse.orion.client.ui/web/dojox"],
-			["/file", hostPrefix + "file"],
-			["/prefs", hostPrefix + "prefs"],
-			["/workspace", hostPrefix + "workspace"],
-			["/org.dojotoolkit", hostPrefix + "org.dojotoolkit"],
-			["/users", hostPrefix + "users"],
-			["/authenticationPlugin.html", hostPrefix + "authenticationPlugin.html"],
-			["/login", hostPrefix + "login"],
-			["/loginstatic", hostPrefix + "loginstatic"],
-			["/useremailconfirmation", hostPrefix + "useremailconfirmation"],
-			["/site", hostPrefix + "site"],
-			["/", basePath + "/bundles/org.eclipse.orion.client.git/web"],
-			["/gitapi", hostPrefix + "gitapi"],
-			["/", basePath + "/bundles/org.eclipse.orion.client.users/web"],
-			["/xfer", hostPrefix + "xfer"],
-			["/filesearch", hostPrefix + "filesearch"],
-			["/index.jsp", hostPrefix + "index.jsp"],
-			["/plugins/git", hostPrefix + "plugins/git"],
-			["/plugins/user", hostPrefix + "plugins/user"],
-			["/logout", hostPrefix + "logout"],
-			["/mixlogin/manageopenids", hostPrefix + "mixlogin/manageopenids"],
-			["/openids", hostPrefix + "openids"],
-			["/task", hostPrefix + "task"],
-			["/help", hostPrefix + "help"]
-		].map(function(item) {
-			return {Source: item[0], Target: item[1]};
+		return SELF_HOSTING_TEMPLATE.map(function(item) {
+			var target;
+			if (item.type === TYPE_FILE) {
+				target = basePath + item.targetSuffix;
+			} else {
+				target = hostPrefix + item.targetSuffix;
+			}
+			return {Source: item.source, Target: target};
+		});
+	}
+	function matchesSelfHostingTemplate(basePath, site) {
+		// Given a site and a base workspace path, can we substitute the path into each FILE mapping, and
+		// localhost:anyport into every API mapping, such that the site matches the self-hosting template?
+		return SELF_HOSTING_TEMPLATE.every(function(item) {
+			return site.Mappings.some(function(mapping) {
+				if (mapping.Source === item.source) {
+					if (item.type === TYPE_FILE) {
+						return mapping.Target === (basePath + item.targetSuffix);
+					} else if (item.type === TYPE_API) {
+						return new RegExp(
+							regex.escape("http://localhost") + "(:\\d+)?" + regex.escape(makeHostRelative(getContext())) + regex.escape(item.targetSuffix)
+						).test(mapping.Target);
+					}
+				}
+				return false;
+			});
 		});
 	}
 
@@ -348,33 +375,18 @@
 			return null; // no internal form
 		},
 		isSelfHostingSite: function(site) {
-			function hasMapping(mappings, mapping) {
-				for (var i=0; i < mappings.length; i++) {
-					var m = mappings[i];
-					if (m.Source === mapping.Source || m.Target === mapping.Target) {
-						return true;
-					}
-				}
-				return false;
-			}
 			var self = this;
 			return this.cache.getProjects(site.Workspace).then(function(projects) {
 				// There must be a project for which all self hosting mappings can be generated using the project's Id
 				return projects.some(function(project) {
 					var internalPath = self.toInternalForm(project.Location);
-					var selfHostMappings = getSelfHostingMappings(internalPath);
-					for (var i=0; i < selfHostMappings.length; i++) {
-						if (!hasMapping(site.Mappings, selfHostMappings[i])) {
-							return false;
-						}
-					}
-					return true;
+					return matchesSelfHostingTemplate(internalPath, site);
 				});
 			});
 		},
 		convertToSelfHosting: function(site, selfHostfileLocation, port) {
 			var internalPath = this.toInternalForm(selfHostfileLocation);
-			var mappings = getSelfHostingMappings(internalPath, port);
+			var mappings = generateSelfHostingMappings(internalPath, port);
 			site.Mappings = mappings;
 			return site;
 		},
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/taskPlugin.js b/bundles/org.eclipse.orion.client.ui/web/plugins/taskPlugin.js
index 1df48ce..724891d 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/taskPlugin.js
+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/taskPlugin.js
@@ -8,9 +8,9 @@
  * 
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
-/*global define eclipse window parent document*/
+/*global define eclipse window parent document URL*/
 
-define(["orion/xhr", "orion/plugin", "orion/operation", "orion/Deferred", "domReady!"], function(xhr, PluginProvider, operation, Deferred) {
+define(["orion/xhr", "orion/plugin", "orion/operation", "orion/Deferred", "orion/URL-shim", "domReady!"], function(xhr, PluginProvider, operation, Deferred) {
 	var temp = document.createElement('a');
 	temp.href = "../mixloginstatic/LoginWindow.html";
 	var login = temp.href;
@@ -59,11 +59,16 @@
 	// testing that command service handles image-less actions properly
 	provider.registerService("orion.core.operation", {
 		getOperations: function(options) {
-			return xhr("GET", base, {
+			var url = new URL(base, window.location);
+			if (options && typeof options === "object") {
+				Object.keys(options).forEach(function(param) {
+					url.query.set(param, options[param]);
+				});
+			}
+			return xhr("GET", url.href, {
 				headers: {
 					"Orion-Version": "1"
 				},
-				query: options,
 				timeout: options.Longpolling ? 70000 : 15000
 			}).then(function(result) {
 				result = result.response ? JSON.parse(result.response) : null;
diff --git a/bundles/org.eclipse.orion.client.ui/web/plugins/webEditingPlugin.html b/bundles/org.eclipse.orion.client.ui/web/plugins/webEditingPlugin.html
index f7185e2..8fdbf1d 100644
--- a/bundles/org.eclipse.orion.client.ui/web/plugins/webEditingPlugin.html
+++ b/bundles/org.eclipse.orion.client.ui/web/plugins/webEditingPlugin.html
@@ -4,7 +4,7 @@
 <meta name="copyright" content="Copyright (c) IBM Corporation and others 2011, 2012.">
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 <script src="../orion/plugin.js"></script>
-<script src="../orion/textview/global.js"></script>
+<script src="../orion/editor/global.js"></script>
 <script src="../orion/editor/cssContentAssist.js"></script>
 <script src="../orion/editor/jsTemplateContentAssist.js"></script>
 <script src="../orion/editor/htmlGrammar.js"></script>
diff --git a/bundles/org.eclipse.orion.client.ui/web/projects/Drive.js b/bundles/org.eclipse.orion.client.ui/web/projects/Drive.js
index 5f0d38f..8491bb7 100644
--- a/bundles/org.eclipse.orion.client.ui/web/projects/Drive.js
+++ b/bundles/org.eclipse.orion.client.ui/web/projects/Drive.js
@@ -86,7 +86,7 @@
 					/* constuct the URL - example:
 			           sftp://oriontest:orion2012@planetorion.org/home/oriontest/sampledata */
 					
-					var url = 'sftp://' + elements[USERNAME_INDEX].getValue() + ':' + elements[PASSWORD_INDEX].getValue() + '@' + elements[ADDRESS_INDEX].getValue();
+					var url = 'sftp://' + elements[USERNAME_INDEX].getValue() + ':' + elements[PASSWORD_INDEX].getValue() + '@' + elements[ADDRESS_INDEX].getValue() + elements[PATH_INDEX].getValue();
 					
 					console.log( url );
 					
@@ -128,8 +128,6 @@
 			
 			this.commandService.addCommand(disconnectCommand);
 			this.commandService.registerCommandContribution('driveCommand', "orion.driveDisconnect", 1, /* not grouped */ null, false, /* no key binding yet */ null, null); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
-			
-//			this.commandService.renderCommands('driveCommand', this.disconnectbutton, this, this, "button"); //$NON-NLS-0$
 			this.commandService.renderCommands('driveCommand', this.connectbutton, this, this, "button"); //$NON-NLS-0$
 		}
 		
@@ -138,7 +136,7 @@
 	
 		var templateString = '<div style="overflow:hidden;">' + //$NON-NLS-0$
 								'<section class="setting-row" role="region" aria-labelledby="Navigation-header">' +
-									'<h3 class="setting-header" data-dojo-attach-point="titleNode"></h3>' +
+									'<h3 class="setting-header" id="titleNode"></h3>' +
 									'<div class="setting-content">' +
 									'</div>' +
 								'</section>' +
@@ -187,23 +185,23 @@
 				var drives = workspace.DriveLocation;
 				
 				fileClient.read( workspace.DriveLocation, true ).then( function(folders){
-					var f = folders;
 					
 					var driveName = elements[NAME_INDEX].getValue();
 					
 					for( var folder = 0; folder < folders.Children.length;folder++ ){
 					
 						if( folders.Children[folder].Name === driveName ){
-							fileClient.deleteFile( folders.Children[folder].Location, true ).then(function(input){
-							
-							});
-							
-							console.log( 'deleted drive: ' + driveName );
-							
-							break;
+							for( var p =0; p< folders.Projects.length; p++ ){
+								if( folders.Children[folder].Id === folders.Projects[p].Id ){
+									fileClient.deleteFile( folders.Projects[p].Location, true ).then(function(input){
+									
+									});
+									
+									break;
+								}
+							}
 						}
 					}
-					
 				});
 	
 				// myexplorer.loadResourceList( workspace.DriveLocation, true, null );
diff --git a/bundles/org.eclipse.orion.client.ui/web/projects/ProjectGrid.js b/bundles/org.eclipse.orion.client.ui/web/projects/ProjectGrid.js
index 70a79dd..3624478 100644
--- a/bundles/org.eclipse.orion.client.ui/web/projects/ProjectGrid.js
+++ b/bundles/org.eclipse.orion.client.ui/web/projects/ProjectGrid.js
@@ -95,8 +95,6 @@
 					content = '<div class="tab"><a href="../../projects/projectPage.html#?project=' + projectname + '"><div class="iframeOverlay"></div><iframe src="' + this.projectData[count].address + '"height="' + h + 'px" width="' + w + 'px" scrolling="no"></iframe></a></div>';

 				}else{

 					content = '<div class="tab"><a href="../../projects/projectPage.html#?project=' + projectname + '"><div class="iframeOverlay"></div><img src="../images/placeholder.png"></img></a></div>';

-	

-				

 				}

 				

 				listItem.innerHTML = content + '<div class="tileTitle">' + this.projectData[count].name + '</div><div class="tileDate">Last modified: ' + date + '</div>';

@@ -137,7 +135,8 @@
 				

 				var date = this.projectData[count].date.getMonth() + 1 + "." + this.projectData[count].date.getDate() + "." + this.projectData[count].date.getFullYear();

 		

-				row.innerHTML = '<td>' + this.projectData[count].name + '</td><td>' + this.projectData[count].description + '</td><td>' + date + '</td>';

+				row.innerHTML = '<td><a href="../../projects/projectPage.html#?project=' + projectname + '">' + this.projectData[count].name + '</a></td><td>' + 

+				this.projectData[count].description + '</td><td>' + date + '</td>';

 		

 				this.listNode.firstChild.appendChild( row );

 			}

diff --git a/bundles/org.eclipse.orion.client.ui/web/projects/ProjectNavigation.js b/bundles/org.eclipse.orion.client.ui/web/projects/ProjectNavigation.js
index 14cea76..3c04cf8 100644
--- a/bundles/org.eclipse.orion.client.ui/web/projects/ProjectNavigation.js
+++ b/bundles/org.eclipse.orion.client.ui/web/projects/ProjectNavigation.js
@@ -18,8 +18,6 @@
 
 		function ProjectNavigation( project, anchor, serviceRegistry, commandService ){
 		
-			
-		
 			this.commandService = commandService;
 		
 			var isExpanded = false;
diff --git a/bundles/org.eclipse.orion.client.ui/web/projects/SFTPConfiguration.js b/bundles/org.eclipse.orion.client.ui/web/projects/SFTPConfiguration.js
index 9d8566e..885fb10 100644
--- a/bundles/org.eclipse.orion.client.ui/web/projects/SFTPConfiguration.js
+++ b/bundles/org.eclipse.orion.client.ui/web/projects/SFTPConfiguration.js
@@ -109,7 +109,7 @@
 							'</div>' + //$NON-NLS-2$ //$NON-NLS-0$

 							

 							'<section class="setting-row" role="region" aria-labelledby="Navigation-header">' +

-								'<h3 class="setting-header" data-dojo-attach-point="titleNode">Details</h3>' +

+								'<h3 class="setting-header" id="titleNode">Details</h3>' +

 								'<div class="setting-content">' +

 									'<div class="setting-property">' +  //$NON-NLS-0$

 										'<label>' + //$NON-NLS-0$

diff --git a/bundles/org.eclipse.orion.client.ui/web/projects/projectPage.js b/bundles/org.eclipse.orion.client.ui/web/projects/projectPage.js
index 3f61302..164b937 100644
--- a/bundles/org.eclipse.orion.client.ui/web/projects/projectPage.js
+++ b/bundles/org.eclipse.orion.client.ui/web/projects/projectPage.js
@@ -54,8 +54,6 @@
 			var projectData = fetchProjectData();

 			

 			var SFTPConfiguration = new mSFTPConfiguration( project, mainPanel, projectData, commandService, serviceRegistry );	

-		

-			console.log( project );

 		}

 		

 		mBootstrap.startup().then(

diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/maker.html b/bundles/org.eclipse.orion.client.ui/web/settings/maker.html
deleted file mode 100644
index ae9c11c..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/settings/maker.html
+++ /dev/null
@@ -1,28 +0,0 @@
-<!DOCTYPE html>

-<html>

-	<head>

-		<meta charset="UTF-8">

-		<title>Plugin Maker</title>

-		<link rel="stylesheet" type="text/css" href="scroll.css"/>

-		<script src="../requirejs/require.js"></script>

-		<script type="text/javascript">

-			/*global require*/

-			require({ baseUrl: '..',

-				      packages: [{ name: 'dojo', location: 'org.dojotoolkit/dojo', main: 'lib/main-browser', lib: '.' },

-								{ name: 'dijit', location: 'org.dojotoolkit/dijit', main: 'lib/main',lib: '.' },

-								{ name: 'dojox', location: 'org.dojotoolkit/dojox', main: 'lib/main', lib: '.' } ],

-				      paths: { text: 'requirejs/text', i18n: 'requirejs/i18n', domReady: 'requirejs/domReady' } 

-			});

-			require(["maker.js"]);

-		</script>

-	</head>

-	<body style="visibility:hidden;" class="claro">

-		<div id="orion.maker" class="orionPage" dojotype="dijit.layout.BorderContainer" style="height:100%;width:100%" design="headline" gutters="false">

-			<div class="banner" id="banner" dojotype="dijit.layout.ContentPane" region="top"></div>

-			<div id="centerPane" dojotype="dijit.layout.ContentPane" region="center">

-				<div id="selectionAgent"></div>

-			</div>

-			<div class="footer" id="footer" dojotype="dijit.layout.ContentPane" region="bottom" splitter="false"></div>

-		</div>

-	</body>

-</html>

diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/maker.js b/bundles/org.eclipse.orion.client.ui/web/settings/maker.js
deleted file mode 100644
index a4a600a..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/settings/maker.js
+++ /dev/null
@@ -1,73 +0,0 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2011, 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- *

- * Contributors:

- *     Anton McConville (IBM Corporation) - initial API and implementation

- *

- *******************************************************************************/

-/*global define dojo dijit orion window widgets localStorage*/

-/*jslint browser:true devel:true*/

-

-define(['i18n!orion/settings/nls/messages', 'require', 'dojo', 'orion/bootstrap', 'orion/status', 'orion/commands', 'orion/operationsClient',

-		'orion/fileClient', 'orion/searchClient', 'orion/dialogs', 'orion/globalCommands', 'orion/sites/siteClient',

-		'dojo/parser', 'dojo/hash', 'dojo/date/locale', 'dijit/layout/BorderContainer', 'dijit/layout/ContentPane',

-		'orion/widgets/maker/PluginMakerContainer', 'orion/widgets/maker/ScrollingContainerSection',

-		'orion/widgets/maker/PluginDescriptionSection', 'orion/widgets/maker/PluginCompletionSection', 'dijit/form/Button',

-		'dijit/ColorPalette'],

-		function(messages, require, dojo, mBootstrap, mStatus, mCommands, mOperationsClient, mFileClient, mSearchClient,

-			mDialogs, mGlobalCommands) {

-

-	dojo.addOnLoad(function() {

-		mBootstrap.startup().then(function(core) {

-

-			var serviceRegistry = core.serviceRegistry;

-			var preferences = core.preferences;

-

-			document.body.style.visibility = "visible"; //$NON-NLS-0$

-			dojo.parser.parse();

-

-			// Register services

-			var operationsClient = new mOperationsClient.OperationsClient(serviceRegistry);

-			var preferencesStatusService = new mStatus.StatusReportingService(serviceRegistry, operationsClient, "statusPane", "notifications", "notificationArea"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$

-			var commandService = new mCommands.CommandService({

-				serviceRegistry: serviceRegistry

-			});

-

-			var fileClient = new mFileClient.FileClient(serviceRegistry);

-			var searcher = new mSearchClient.Searcher({

-				serviceRegistry: serviceRegistry,

-				commandService: commandService,

-				fileService: fileClient

-			});

-

-			var preferenceDialogService = new mDialogs.DialogService(serviceRegistry);

-			mGlobalCommands.generateBanner("banner", serviceRegistry, commandService, preferences, searcher); //$NON-NLS-0$

-

-			preferencesStatusService.setMessage("Loading..."); //$NON-NLS-0$

-			

-			/* Note 'pageActions' is the attach id for commands in the toolbar */

-			

-			var containerParameters = { preferences: preferences, 

-										serviceRegistry: core.serviceRegistry,

-										preferencesStatusService: preferencesStatusService,

-										commandService: commandService,

-										preferenceDialogService: preferenceDialogService,

-										settingsCore: core,

-										toolbarID: "pageActions" }; //$NON-NLS-0$

-

-			var container = new orion.widgets.maker.PluginMakerContainer( containerParameters, dojo.byId( "selectionAgent" )); //$NON-NLS-0$

-			

-			var description = orion.widgets.maker.PluginDescriptionSection({title:messages["Plugin Description"]});

-			container.addSection( description );

-			

-			container.addCommand( messages['Create'], 'createPlugin' ); //$NON-NLS-1$

-

-			preferencesStatusService.setMessage("");

-		});

-	});

-});
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/orion-transparent.png b/bundles/org.eclipse.orion.client.ui/web/settings/orion-transparent.png
deleted file mode 100644
index 563010e..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/settings/orion-transparent.png
+++ /dev/null
Binary files differ
diff --git a/bundles/org.eclipse.orion.client.ui/web/settings/scroll.css b/bundles/org.eclipse.orion.client.ui/web/settings/scroll.css
deleted file mode 100644
index 5a015bd..0000000
--- a/bundles/org.eclipse.orion.client.ui/web/settings/scroll.css
+++ /dev/null
@@ -1,274 +0,0 @@
-@import "../css/layout.css";

-@import "../css/ide.css";

-@import "../css/images.css";

-

-html,body {

-	height: 100%;

-}

-

-h1 {

-	position: relative;

-	margin-top: 18px

-}

-

-

-.scrollcontent {

-	position: relative;

-}

-

-.scrollmenubar{

-	width: 1010px;

-	height:40px;

-	border-top:solid 2px whitesmoke;

-	border-bottom: solid 2px whitesmoke ;

-	position: fixed;

-	z-index: 999;

-	clear: both;

-	overflow: hidden;

-	background: white;

-}

-

-.scrollmenu {

-	list-style: none;

-	margin: 0;

-	padding: 0;

-	padding-left:20px;

-	position: absolute;

-	left: 0;

-}

-

-.scrollmenubar ul {

-	display: block;

-	text-decoration: none;

-}

-

-.scrollmenu li {

-	list-style:none;

-	float: left;

-	margin: 0 1em 0 0;

-	padding: .3em;

-	text-decoration: none;

-	background:white;

-}

-

-.scrollmenuitem{

-	color: #999;

-	padding: .4em;

-	margin-top:1px;

-	text-decoration: none;

-	font-family: sans-serif;

-	font-size: 12px;

-	border-bottom-left-radius: 4px 4px;

-	border-bottom-right-radius: 4px 4px;

-	border-top-left-radius: 4px 4px;

-	border-top-right-radius: 4px 4px;

-	line-height:2em;

-}

-

-

-.scrollmenuitem:hover{

-	background: #E3E3E3;

-	text-decoration: none;

-	color: #999;

-}

-

-.smiSelected{

-	border: 1px dotted #BFBFBF;

-	

-	color: white;

-}

-

-.scrollmenuitem:visited{

-	background: #E3E3E3;

-	color: #999;

-}

-

-.anchor {

-	display: block;

-	height: 0;

-	border: none !important;

-	text-decoration: none !important;

-}

-

-.chapter {

-	position: relative;

-	clear: both;

-	overflow: hidden;

-}

-

-.sectionBlock{

-	border-bottom-left-radius: 20px 20px;

-	border-bottom-right-radius: 20px 20px;

-	border-top-left-radius: 20px 20px;

-	border-top-right-radius: 20px 20px;

-	padding:40px;

-	margin-top:50px;

-	margin-right:50px;

-	margin-left:50px;

-	position: relative;

-	clear: both;

-	overflow: hidden;

-	border: 1px dotted #BFBFBF;

-}

-

-.inner{

-	background: whitesmoke;

-	padding:10px;

-	border-bottom-left-radius: 20px 20px;

-	border-bottom-right-radius: 20px 20px;

-	border-top-left-radius: 20px 20px;

-	border-top-right-radius: 20px 20px;

-}

-

-.circle{

-	width:40px;

-	height:40px;

-	display:block;

-	border-radius:20px;

-	font-size:20px;

-	font-family:sans-serif;

-	font-weight:bolder;

-	color:#fff;

-	line-height:40px;

-	text-align:center;

-	background:#ffd401;

-	position:absolute;

-	margin-left:30px;

-	float:right;

-}

-

-.pluginTitle {

-	position:absolute;

-	float: right;

-	font-size: 1em;

-	font-weight: bold;

-	color: #666;

-	margin: 0;

-	background: white;

-	padding:10px;

-	margin-left:80px;

-}

-

-.scrollForm{

-	margin: 1em 0;

-	padding-top: 10px;

-	font-size:10px;

-}

-

-.scrollForm fieldset {

-	margin: 0;

-	padding-top: .5em;

-	border: none;

-}

-

-.scrollForm p {

-	clear: both;

-	margin: .5em 0;

-	overflow: hidden;

-}

-

-.scrollForm input {

-	font-size:10px;

-	font-family: sans-serif;

-	width: 500px;

-}

-

-.scrollForm textarea {

-	font-size:10px;

-	font-family: sans-serif;

-	width: 500px;

-	resize: none; 

-}

-

-.scrollForm label {

-	float: left;

-	width: 100px;

-	display: block;

-	text-align: right;

-	margin-right: 10px;

-}

-

-.itemcount{

-	width:14px;

-	height:14px;

-	display:block;

-	border-radius:7px;

-	font-size:9px;

-	font-family:sans-serif;

-	font-weight:bolder;

-	color:#fff;

-	line-height:14px;

-	text-align:center;

-	background:#ffd401;

-	position:absolute;

-	float:right;

-	margin-top:-9px;

-	margin-left:-6px;

-}

-

-.steps{

-	margin:20px;

-	margin-top:0;

-	font-size: 14px;

-	font-family: sans-serif;

-	font-weight: bolder;

-	color: #999;

-	text-align:center;

-	vertical-align:middle;

-}

-

-.nextstep{

-	float: left;

-	width: 100px;

-	height: 50px;

-	margin:10px;

-	padding:20px;

-	border-radius:7px;

-	background: white;

-	border: 1px solid #BBBBBB;

-}

-

-.or{

-	float: left;

-	width: 20px;

-	height: 50px;

-	margin:10px;

-	padding:20px;

-}

-

-.downloadbutton {

-background-color: #91BD09;

-text-align: center;

-width: 150px;

-}

-

-.nextlink{

-	-moz-border-radius: 5px 5px 5px 5px;

-	-webkit-border-radius: 5px 5px 5px 5px;

-	border-radius: 5px 5px 5px 5px;

-	-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);

-	-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);

-	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);

-	background: url("images/overlay-button.png") repeat-x scroll 0 0 #222;

-	border-bottom: 1px solid rgba(0, 0, 0, 0.25);

-	color: white !important;

-	cursor: pointer;

-	font-weight: bold;

-	line-height: 1;

-	overflow: visible;

-	font-size: 17px;

-	padding: 8px 19px 9px;

-	position: relative;

-	text-decoration: none;

-	text-shadow: 0 -1px 1px rgba(0, 0, 0, 0.25);

-	width: auto;

-	margin:10px;

-}

-

-.nextlink:hover {

--moz-box-shadow: 0 1px 11px rgba(0, 0, 0, 0.45);

--webkit-box-shadow: 0 1px 11px rgba(0, 0, 0, 0.45);

-box-shadow: 0 1px 11px rgba(0, 0, 0, 0.45);

-}

-

-

diff --git a/bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js b/bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js
index ee9e589..1bb30dd 100644
--- a/bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js
+++ b/bundles/org.eclipse.orion.client.ui/web/shell/paramType-file.js
@@ -275,14 +275,14 @@
 				if (!predictions) {
 					/* parent hierarchy is not valid */
 					return {
-						value: null,
+						value: undefined,
 						status: mShell.CompletionStatus.ERROR,
 						message: i18nUtil.formatMessage(messages["'${0}' is not valid"], string),
 						predictions: null
 					};
 				}
 
-				var message, status, value = null;
+				var message, status, value;
 				if (typeSpec.exist === false) {
 					var exactMatch;
 					for (var i = 0; i < predictions.length; i++) {
diff --git a/bundles/org.eclipse.orion.client.ui/web/shell/paramType-plugin.js b/bundles/org.eclipse.orion.client.ui/web/shell/paramType-plugin.js
index c83a715..65fd01f 100644
--- a/bundles/org.eclipse.orion.client.ui/web/shell/paramType-plugin.js
+++ b/bundles/org.eclipse.orion.client.ui/web/shell/paramType-plugin.js
@@ -179,7 +179,7 @@
 					message = i18nUtil.formatMessage(messages["'${0}' is not valid"], string);

 				}

 				return {

-					value: exactMatch ? exactMatch.value : null,

+					value: exactMatch ? exactMatch.value : undefined,

 					status: status,

 					message: message,

 					predictions: predictions

diff --git a/bundles/org.eclipse.orion.client.ui/web/shell/paramType-service.js b/bundles/org.eclipse.orion.client.ui/web/shell/paramType-service.js
index 178c577..d4354ae 100644
--- a/bundles/org.eclipse.orion.client.ui/web/shell/paramType-service.js
+++ b/bundles/org.eclipse.orion.client.ui/web/shell/paramType-service.js
@@ -84,7 +84,7 @@
 					message = i18nUtil.formatMessage(messages["'${0}' is not valid"], string);

 				}

 				return {

-					value: exactMatch ? exactMatch.value : null,

+					value: exactMatch ? exactMatch.value : undefined,

 					status: status,

 					message: message,

 					predictions: predictions

diff --git a/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js b/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js
index e27feaa..0adf0b7 100644
--- a/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js
+++ b/bundles/org.eclipse.orion.client.ui/web/shell/shellPage.js
@@ -258,9 +258,6 @@
 	}

 	

 	function cdExec(args, context) {

-		if (!args.directory) {

-			return "";

-		}

 		var node = args.directory.value[0];

 		shellPageFileService.setCurrentDirectory(node);

 		hashUpdated = true;

@@ -269,11 +266,8 @@
 		return getChangedToElement(pathString);

 	}

 

-	function editExec(node) {

-		if (!node.file) {

-			return;

-		}

-		var url = computeEditURL(node.file.value[0]);

+	function editExec(args) {

+		var url = computeEditURL(args.file.getValue()[0]);

 		window.open(url);

 	}

 

@@ -344,10 +338,6 @@
 	/* implementations of built-in plug-in management commands */

 

 	function pluginServicesExec(args, context) {

-		if (!args.plugin) {

-			return "";

-		}

-

 		var result = document.createElement("div"); //$NON-NLS-0$

 		var services = args.plugin.getServiceReferences();

 		services.forEach(function(service) {

@@ -404,13 +394,8 @@
 	}

 

 	function pluginsDisableExec(args, context) {

-		var plugin = args.plugin;

-		if (!plugin) {

-			return "";

-		}

-

 		var result = context.createPromise();

-		plugin.stop().then(

+		args.plugin.stop().then(

 			function() {

 				result.resolve(messages.Succeeded);

 			},

@@ -422,13 +407,8 @@
 	}

 

 	function pluginsEnableExec(args, context) {

-		var plugin = args.plugin;

-		if (!plugin) {

-			return "";

-		}

-

 		var result = context.createPromise();

-		plugin.start({lazy:true}).then(

+		args.plugin.start({lazy:true}).then(

 			function() {

 				result.resolve(messages.Succeeded);

 			},

@@ -470,13 +450,8 @@
 	}

 

 	function pluginsReloadExec(args, context) {

-		var plugin = args.plugin;

-		if (!plugin) {

-			return "";

-		}

-

 		var result = context.createPromise();

-		plugin.update().then(

+		args.plugin.update().then(

 			function() {

 				result.resolve(messages.Succeeded);

 			},

@@ -488,10 +463,6 @@
 	}

 

 	function pluginsUninstallExec(args, context) {

-		if (!args.plugin) {

-			return "";

-		}

-

 		var result = context.createPromise();

 		if (args.plugin.isAllPlugin) {

 			var msg = messages["Are you sure you want to uninstall all contributed plug-ins?"];

@@ -537,10 +508,6 @@
 	/* implementations of built-in service management commands */

 

 	function serviceContributorsExec(args, context) {

-		if (!args.id) {

-			return "";

-		}

-

 		var serviceId = args.id.trim();

 		var result = document.createElement("div"); //$NON-NLS-0$

 		var plugins = pluginType.getPlugins();

@@ -774,6 +741,34 @@
 		var input = document.getElementById("shell-input"); //$NON-NLS-0$

 		var shell = new mShell.Shell({input: input, output: output});

 

+		/*

+		 * Assign focus to the input element when a non-focusable element in

+		 * the output area is clicked.  Do not interfere with output area user

+		 * interactions such as selecting text, showing context menus, following

+		 * links, etc.

+		 *

+		 * The user gesture that should trigger this is essentially a click with

+		 * no mouse movement, since mouse movement within a mousedown/mouseup pair

+		 * can perform selection in adjacent elements, even if the target element

+		 * for both events is the same div.  For this reason, separate mousedown/

+		 * mouseup listeners are used instead of a single click listener, and the

+		 * event coordinates are compared (a variance of 2 pixels is allowed).

+		 */

+		var ALLOWANCE = 2;

+		output.onmousedown = function(mouseDownEvent) {

+			output.onmouseup = null;

+			if (mouseDownEvent.button === 0 && mouseDownEvent.target.tagName.toUpperCase() === "DIV") { //$NON-NLS-0$

+				output.onmouseup = function(mouseUpEvent) {

+					output.onmouseup = null;

+					if (mouseUpEvent.target === mouseDownEvent.target &&

+						Math.abs(mouseUpEvent.clientX - mouseDownEvent.clientX) <= ALLOWANCE &&

+						Math.abs(mouseUpEvent.clientY - mouseDownEvent.clientY) <= ALLOWANCE) {

+							shell.setFocusToInput();

+					}

+				};

+			}

+		};

+

 		var parameters = PageUtil.matchResourceParameters(window.location.href);

 		if (parameters.command) {

 			shell.setInputText(parameters.command);

@@ -783,7 +778,7 @@
 			window.location.href = url;

 		}

 

-		shell.setFocus();

+		shell.setFocusToInput();

 

 		shellPageFileService = new mShellPageFileService.ShellPageFileService();

 		var location = getCWD();

diff --git a/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/nonnlsSearchUtil.js b/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/nonnlsSearchUtil.js
index a2eb3a4..58a3162 100644
--- a/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/nonnlsSearchUtil.js
+++ b/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/nonnlsSearchUtil.js
@@ -1,403 +1,403 @@
-/*******************************************************************************

- * @license

- * Copyright (c) 2012 IBM Corporation and others.

- * All rights reserved. This program and the accompanying materials are made 

- * available under the terms of the Eclipse Public License v1.0 

- * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 

- * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 

- *

- * Contributors:

- *     IBM Corporation - initial API and implementation

- *******************************************************************************/

-define(['dojo'], function(dojo){

-	

-	function NonNlsSearch(fileClient, root, progress){

-		this.fileClient = fileClient;

-		this.root = root;

-		this.progress = progress;

-	}

-	

-	NonNlsSearch.prototype.getNonNls = function(){

-		return this.parseDirectory(this.root);

-	};

-	

-	NonNlsSearch.prototype.parseDirectory = function(root){

-		var deferred = new dojo.Deferred();

-		var self = this;

-				

-		var def = this.fileClient.read(root, true)

-		if(this.progress){

-			this.progress.progress(def, "Reading files from " + root);

-		}

-		def.then(function(jsonData){

-			dojo.hitch(self, self.parseDirectoryData)(jsonData).then(function(result){

-				deferred.callback(result);

-			},

-			function(error) {

-				deferred.errback(error);

-			});

-		}, function(error){

-			deferred.errback(error);

-		});

-		

-		return deferred;

-	};

-	

-	NonNlsSearch.prototype.parseDirectoryData = function(jsonData){

-		var deferred = new dojo.Deferred();

-		var self = this;

-		if(jsonData.Directory){

-			if(jsonData.Children){

-				var deferreds = [];

-				for(var i=0; i<jsonData.Children.length; i++){

-					var child = jsonData.Children[i];

-					deferreds.push(dojo.hitch(self, self.parseDirectoryData)(child));

-				}

-				var deferredsList = new dojo.DeferredList(deferreds);

-				deferredsList.then(function(results){

-					var ret = {Children: []};

-					for(var i=0; i<results.length; i++){

-						if(results[i][1]){

-							ret.Children = ret.Children.concat(results[i][1].Children);

-						}

-					}

-					deferred.callback(ret);

-				});

-			} else {

-				dojo.hitch(self, self.parseDirectory)(jsonData.ChildrenLocation).then(function(result){

-					deferred.callback(result);

-				},

-				function(error) {

-					deferred.errback(error);

-				});

-			}

-		} else {

-			if(jsonData.Name.lastIndexOf(".js")===(jsonData.Name.length-3)){ //$NON-NLS-0$

-				var def = self.fileClient.read(jsonData.Location, true);

-				if(self.progress){

-					self.progress.progress(def, "Preparing to extract strings from file " + jsonData.Name);

-				}

-				def.then(function(jsonData){

-					var def1 = self.fileClient.read(jsonData.Location, false);

-					if(self.progress){

-						self.progress.progress(def, "Getting file contents " + jsonData.Name);

-					}

-					def1.then(function(contents){

-						jsonData.nonnls = dojo.hitch(self, self.parseFile)(contents);

-						var ret;

-						if(jsonData.nonnls.length>0){

-							ret = {Children: [jsonData]};

-						} else {

-							ret = {Children: []};

-						}

-						deferred.callback(ret);

-					});					

-				});

-			} else {

-				deferred.callback({Children:[]});

-			}

-		}

-		return deferred;

-	};

-	

-	NonNlsSearch.prototype.parseFile = function(contents){

-	     function getExcluded(exlRegExp){

-				var ret = [];

-				var match = exlRegExp.exec(contents);

-				while(match){

-					ret.push(match);

-					match = exlRegExp.exec(contents);

-				}

-				return ret;

-		     }

-	     

-		     function isInExcluded(excluded, match, offset){

-				for(var i=0; i<excluded.length; i++){

-					if((match.index + offset) > excluded[i].index && (match.index + offset) < (excluded[i].index + excluded[i][0].length)){

-						return true;

-					}

-				}

-				return false;

-		     }

-

-		var excluded = getExcluded(new RegExp("/\\x2a((\\x2a[^/]*)|[^*/]|[^*]/)*\\x2a/", "gm"), contents); //$NON-NLS-1$ //$NON-NLS-0$

-		excluded = excluded.concat(getExcluded(new RegExp("//.*\\r?\\n*", "gm")), contents); //$NON-NLS-0$

-		excluded = excluded.concat(getExcluded(new RegExp("define\\(\\[[^\\]]*\\]", "gm")), contents); //$NON-NLS-1$ //$NON-NLS-0$

-		excluded = excluded.concat(getExcluded(new RegExp("define\\([\"\'][^\"\']*[\"\'], *\\[[^\\]]*\\]", "gm")), contents); //$NON-NLS-1$ //$NON-NLS-0$

-		excluded = excluded.concat(getExcluded(new RegExp("messages\\[[^\\]]*\\]", "gmi")), contents); //$NON-NLS-1$ //$NON-NLS-0$

-	     

-	       var nonnlsstrings = [];

-	       var stringRegExp = /("(\\"|[^"])+")|('(\\'|[^'])+')/g; //$NON-NLS-1$ //$NON-NLS-0$

-	       var nonnlsRegExp = /\/\/\$NON-NLS-[0-9]+\$/g;

-	       var lines = contents.split(/\r?\n/);

-	       for (var i=0; i < lines.length; i++) {

-	         var line = lines[i];

-			var lineOffset = contents.indexOf(line);

-	         var match = stringRegExp.exec(line);

-	         var strings = [];

-	         var realStringNum = 0;

-	         while (match) {

-	        	 match.realNum = realStringNum++;

-				if(!isInExcluded(excluded, match, lineOffset)){

-						strings.push(match);

-					}

-				match = stringRegExp.exec(line);

-	         }

-	         if(strings.length>0){

-		         var nonnls = {};

-		         match = nonnlsRegExp.exec(line);

-		         while(match){

-					nonnls[parseInt(match[0].substring(11, match[0].length-1))] = true;

-					match = nonnlsRegExp.exec(line);

-		         }

-		         

-		         for(var j=0; j<strings.length; j++){

-					if(!nonnls[strings[j].realNum]){

-						nonnlsstrings.push({

-						 lineNum: i,

-			             line: lines[i],

-			             string: strings[j][0],

-			             character: strings[j].index + 1,

-			             end: strings[j].index + strings[j][0].length

-			             });

-					}

-		         }

-				}

-	         }

-	       return nonnlsstrings;

-	};

-	

-	NonNlsSearch.prototype.constructor = NonNlsSearch;

-	

-	function compareNls(a, b){

-		  if (a.character < b.character)

-			     return -1;

-			  if (a.character > b.character)

-			    return 1;

-			  return 0;

-	}

-	

-	function addMessagesModule(contents, module){

-		var match = new RegExp("define\\(\\[[^\\]]*\\],[\\s\\r\\n]*function\\(", "gm").exec(contents); //$NON-NLS-1$ //$NON-NLS-0$

-		if(!match){

-			match = new RegExp("define\\([\"\'][^\"\']*[\"\'], *\\[[^\\]]*\\],[\\s\\r\\n]*function\\(", "gm").exec(contents); //$NON-NLS-1$ //$NON-NLS-0$

-		}

-		if(!match || match[0].indexOf(module)>0){

-			return contents;

-		}

-		var modules = new RegExp("\\[[^\\]]*\\]", "gm").exec(match[0]); //$NON-NLS-1$ //$NON-NLS-0$

-		if(modules[0].match(new RegExp("\\[\\s*\\]", "gm"))){ //$NON-NLS-1$ //$NON-NLS-0$

-			contents = contents.replace(match[0], match[0]+"messages"); //$NON-NLS-0$

-			contents = contents.replace(modules[0], modules[0][0] + "'" + module + "'" + modules[0].substring(1));			 //$NON-NLS-1$ //$NON-NLS-0$

-		}else{

-			contents = contents.replace(match[0], match[0]+"messages, "); //$NON-NLS-0$

-			contents = contents.replace(modules[0], modules[0][0] + "'" + module + "', " + modules[0].substring(1)); //$NON-NLS-1$ //$NON-NLS-0$

-		}

-		return contents;

-	}

-	

-	function replaceNls(contents, nls, config, saveMessages){

-		if(!config){

-			config = {};

-		}

-		if(!config.messages){

-			config.messages = {};

-		}

-		var messages;

-		if(saveMessages){

-			messages = config.messages;

-		} else {

-			messages = {};

-			for(var message in config.messages){

-				messages[message] = config.messages[message];

-			}

-		}

-		var stringRegExp = /("(\\"|[^"])+")|('(\\'|[^'])+')/g; //$NON-NLS-1$ //$NON-NLS-0$

-		 var lines = contents.split(/\r?\n/);

-		 var lineStructure = {};

-		 for(var i=0; i<nls.length; i++){

-			 var nlsitem = nls[i];

-			 if(!lineStructure[nlsitem.lineNum]){

-				 lineStructure[nlsitem.lineNum] = [];

-			 }

-			 lineStructure[nlsitem.lineNum].push(nlsitem);

-		 }

-		 var stringExternalized = false;

-		 for(var lineNum in lineStructure){

-			 lineStructure[lineNum].sort(compareNls);

-			 for(var i=lineStructure[lineNum].length-1; i>=0; i--){

-				 var change = lineStructure[lineNum][i];

-				 var line = lines[lineNum];

-				 if(change.checked){

-					 stringExternalized = true;

-					 var strippedString = unescapeQuotes(change.string);

-					 if(messages && messages[strippedString]){

-						 change.replace = "messages[\"" + escapeQuotes(messages[strippedString]) + "\"]";						  //$NON-NLS-1$ //$NON-NLS-0$

-					 } else {

-						 change.replace = "messages[" + change.string + "]"; //$NON-NLS-0$

-						 if(!messages) messages = {};

-						 messages[strippedString] = strippedString;

-					 }

-//					 change.replace = change.string;//remove

-					 var moveCharacters = change.replace.length - change.string.length;

-					 change.newcharacter = change.character;

-					 lines[lineNum] = line.substring(0, change.character-1) + change.replace + line.substring(change.end);

-					 for(var j=i+1; j<lineStructure[lineNum].length; j++){

-						 lineStructure[lineNum][j].newcharacter += moveCharacters;

-					 }

-				 } else if(config.marknls){

-					 var foundStrings = line.substring(0, change.character-1).match(stringRegExp);

-					 var stringNo = foundStrings ? foundStrings.length : 0;

-					 change.replace = " \/\/$NON-NLS-"+stringNo+"$"; //$NON-NLS-1$ //$NON-NLS-0$

-					 change.newcharacter = line.length;

-					 lines[lineNum] += change.replace;

-				 } else {

-					 delete change.replace;

-					 change.newcharacter = change.character;

-				 }

-			 }

-		 }

-		 var newlineRegExp = /\r?\n/g;

-		 var ret = "";

-		 try{

-		 for(var i=0; i<lines.length; i++){

-			 var newline = newlineRegExp.exec(contents);

-			 ret+=lines[i];

-			 if(newline){

-				 ret+=newline[0];

-			 }

-		 }

-		 }catch (e) {

-			contents.error(e);

-		}

-		 if(stringExternalized && config.module){

-			return addMessagesModule(ret, config.module);

-		 }

-		 return ret;

-	}

-	

-	function escapeQuotes(message){

-		message = message.replace(/\"/g, "\\\""); //$NON-NLS-0$

-		return message;

-	}

-	

-	function unescapeQuotes(message){

-		message = message.substring(1, message.length-1);

-		message = message.replace(/\\\"/g, "\""); //$NON-NLS-0$

-		message = message.replace(/\\\'/g, "\'"); //$NON-NLS-0$

-		return message;

-	}

-	

-	function stringify(messages){

-		var ret = "{"; //$NON-NLS-0$

-		var isFirst = true;

-		for(var message in messages){

-			if(!isFirst){

-				ret+=","; //$NON-NLS-0$

-			}

-			ret += "\n\t\""; //$NON-NLS-0$

-			ret += escapeQuotes(message);

-			ret += "\": \""; //$NON-NLS-0$

-			ret += escapeQuotes(messages[message]);

-			ret += "\""; //$NON-NLS-0$

-			isFirst = false;

-		}

-		ret +="\n}"; //$NON-NLS-0$

-		return ret;

-	}

-	

-	function writeMessagesFile(fileClient, config, messages, progress){

-		var deferred = new dojo.Deferred();

-		var keyToMessage = {};

-		for(var message in messages){

-			keyToMessage[messages[message]] = message;

-		}

-		var def = fileClient.read(config.fileLocation);

-		if(progress){

-			progress.progress(def, "Reading messages file " + config.fileLocation);

-		}

-		def.then(function(contents){

-			var match = new RegExp("define\\(\\{(.*\\r?\\n*)*\\}\\);", "gmi").exec(contents); //$NON-NLS-1$ //$NON-NLS-0$

-			if(match){

-				var messagesString = match[0].substring("define(".length, match[0].length-");".length); //$NON-NLS-1$ //$NON-NLS-0$

-				contents = contents.replace(messagesString, stringify(keyToMessage));

-			} else {

-				contents = "define(" + stringify(keyToMessage)+");"; //$NON-NLS-1$ //$NON-NLS-0$

-			}

-			var def1 = fileClient.write(config.fileLocation, contents);

-			if(progress){

-				progress.progress(def1, "Writing messages file " + config.fileLocation);

-			}

-			def1.then(

-					function(){

-						deferred.resolve();

-					},

-					function(error){

-						deferred.reject(error);

-					});

-		},function(error){

-			if(error.status===404){

-				function create(){

-					var def1 = fileClient.createFolder(config.directory.Location, "root");

-					if(progress){

-						progress.progress(def1, "Creating messages directory " + config.directory.Location);

-					}

-					def1.then( //$NON-NLS-0$

-							function(metadata){

-								var def2 = fileClient.createFile(metadata.Location, config.file);

-								if(progress){

-									progress.progress(def1, "Creating messages file " + metadata.Location);

-								}

-								def2.then(

-									function(metadata){

-										var def3 = fileClient.write(metadata.Location, "define(" + stringify(keyToMessage)+");");

-										if(progress){

-											progress.progress(def3, "Writing messages file " + metadata.Location);

-										}

-										def3.then( //$NON-NLS-1$ //$NON-NLS-0$

-												function(){

-													deferred.resolve();

-												},

-												function(error){

-													deferred.reject(error);

-												});

-									},

-									function(error){

-										deferred.reject(error);

-									});

-								},

-							function(error){deferred.reject(error);});

-				}

-				var def2 = fileClient.read(config.directory.Location, true);

-				if(progress){

-					progress.progress(def2, "Reading messages directory " + config.directory.Location);

-				}

-				def2.then(function(metadata){

-					create();

-				}, function(error){

-					if(error.status===404){

-						var def3 = fileClient.createFolder(config.directory.Parents[0].Location, config.directory.Name);

-						if(progress){

-							progress.progress(def3, "Creating messages directory " +  config.directory.Name);

-						}

-						def3.then(function(metadata){

-							create();

-						}, function(error){

-							deferred.reject(error);

-						});

-					}

-				});

-

-			} else {

-				deferred.reject(error);

-			}

-		});

-		return deferred;

-	}

-	

-	return {

-		NonNlsSearch: NonNlsSearch,

-		replaceNls: replaceNls,

-		writeMessagesFile: writeMessagesFile

-	};

+/*******************************************************************************
+ * @license
+ * Copyright (c) 2012 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials are made 
+ * available under the terms of the Eclipse Public License v1.0 
+ * (http://www.eclipse.org/legal/epl-v10.html), and the Eclipse Distribution 
+ * License v1.0 (http://www.eclipse.org/org/documents/edl-v10.html). 
+ *
+ * Contributors:
+ *     IBM Corporation - initial API and implementation
+ *******************************************************************************/
+define(['dojo', 'dojo/DeferredList'], function(dojo){
+	
+	function NonNlsSearch(fileClient, root, progress){
+		this.fileClient = fileClient;
+		this.root = root;
+		this.progress = progress;
+	}
+	
+	NonNlsSearch.prototype.getNonNls = function(){
+		return this.parseDirectory(this.root);
+	};
+	
+	NonNlsSearch.prototype.parseDirectory = function(root){
+		var deferred = new dojo.Deferred();
+		var self = this;
+				
+		var def = this.fileClient.read(root, true)
+		if(this.progress){
+			this.progress.progress(def, "Reading files from " + root);
+		}
+		def.then(function(jsonData){
+			dojo.hitch(self, self.parseDirectoryData)(jsonData).then(function(result){
+				deferred.callback(result);
+			},
+			function(error) {
+				deferred.errback(error);
+			});
+		}, function(error){
+			deferred.errback(error);
+		});
+		
+		return deferred;
+	};
+	
+	NonNlsSearch.prototype.parseDirectoryData = function(jsonData){
+		var deferred = new dojo.Deferred();
+		var self = this;
+		if(jsonData.Directory){
+			if(jsonData.Children){
+				var deferreds = [];
+				for(var i=0; i<jsonData.Children.length; i++){
+					var child = jsonData.Children[i];
+					deferreds.push(dojo.hitch(self, self.parseDirectoryData)(child));
+				}
+				var deferredsList = new dojo.DeferredList(deferreds);
+				deferredsList.then(function(results){
+					var ret = {Children: []};
+					for(var i=0; i<results.length; i++){
+						if(results[i][1]){
+							ret.Children = ret.Children.concat(results[i][1].Children);
+						}
+					}
+					deferred.callback(ret);
+				});
+			} else {
+				dojo.hitch(self, self.parseDirectory)(jsonData.ChildrenLocation).then(function(result){
+					deferred.callback(result);
+				},
+				function(error) {
+					deferred.errback(error);
+				});
+			}
+		} else {
+			if(jsonData.Name.lastIndexOf(".js")===(jsonData.Name.length-3)){ //$NON-NLS-0$
+				var def = self.fileClient.read(jsonData.Location, true);
+				if(self.progress){
+					self.progress.progress(def, "Preparing to extract strings from file " + jsonData.Name);
+				}
+				def.then(function(jsonData){
+					var def1 = self.fileClient.read(jsonData.Location, false);
+					if(self.progress){
+						self.progress.progress(def, "Getting file contents " + jsonData.Name);
+					}
+					def1.then(function(contents){
+						jsonData.nonnls = dojo.hitch(self, self.parseFile)(contents);
+						var ret;
+						if(jsonData.nonnls.length>0){
+							ret = {Children: [jsonData]};
+						} else {
+							ret = {Children: []};
+						}
+						deferred.callback(ret);
+					});					
+				});
+			} else {
+				deferred.callback({Children:[]});
+			}
+		}
+		return deferred;
+	};
+	
+	NonNlsSearch.prototype.parseFile = function(contents){
+	     function getExcluded(exlRegExp){
+				var ret = [];
+				var match = exlRegExp.exec(contents);
+				while(match){
+					ret.push(match);
+					match = exlRegExp.exec(contents);
+				}
+				return ret;
+		     }
+	     
+		     function isInExcluded(excluded, match, offset){
+				for(var i=0; i<excluded.length; i++){
+					if((match.index + offset) > excluded[i].index && (match.index + offset) < (excluded[i].index + excluded[i][0].length)){
+						return true;
+					}
+				}
+				return false;
+		     }
+
+		var excluded = getExcluded(new RegExp("/\\x2a((\\x2a[^/]*)|[^*/]|[^*]/)*\\x2a/", "gm"), contents); //$NON-NLS-1$ //$NON-NLS-0$
+		excluded = excluded.concat(getExcluded(new RegExp("//.*\\r?\\n*", "gm")), contents); //$NON-NLS-0$
+		excluded = excluded.concat(getExcluded(new RegExp("define\\(\\[[^\\]]*\\]", "gm")), contents); //$NON-NLS-1$ //$NON-NLS-0$
+		excluded = excluded.concat(getExcluded(new RegExp("define\\([\"\'][^\"\']*[\"\'], *\\[[^\\]]*\\]", "gm")), contents); //$NON-NLS-1$ //$NON-NLS-0$
+		excluded = excluded.concat(getExcluded(new RegExp("messages\\[[^\\]]*\\]", "gmi")), contents); //$NON-NLS-1$ //$NON-NLS-0$
+	     
+	       var nonnlsstrings = [];
+	       var stringRegExp = /("(\\"|[^"])+")|('(\\'|[^'])+')/g; //$NON-NLS-1$ //$NON-NLS-0$
+	       var nonnlsRegExp = /\/\/\$NON-NLS-[0-9]+\$/g;
+	       var lines = contents.split(/\r?\n/);
+	       for (var i=0; i < lines.length; i++) {
+	         var line = lines[i];
+			var lineOffset = contents.indexOf(line);
+	         var match = stringRegExp.exec(line);
+	         var strings = [];
+	         var realStringNum = 0;
+	         while (match) {
+	        	 match.realNum = realStringNum++;
+				if(!isInExcluded(excluded, match, lineOffset)){
+						strings.push(match);
+					}
+				match = stringRegExp.exec(line);
+	         }
+	         if(strings.length>0){
+		         var nonnls = {};
+		         match = nonnlsRegExp.exec(line);
+		         while(match){
+					nonnls[parseInt(match[0].substring(11, match[0].length-1))] = true;
+					match = nonnlsRegExp.exec(line);
+		         }
+		         
+		         for(var j=0; j<strings.length; j++){
+					if(!nonnls[strings[j].realNum]){
+						nonnlsstrings.push({
+						 lineNum: i,
+			             line: lines[i],
+			             string: strings[j][0],
+			             character: strings[j].index + 1,
+			             end: strings[j].index + strings[j][0].length
+			             });
+					}
+		         }
+				}
+	         }
+	       return nonnlsstrings;
+	};
+	
+	NonNlsSearch.prototype.constructor = NonNlsSearch;
+	
+	function compareNls(a, b){
+		  if (a.character < b.character)
+			     return -1;
+			  if (a.character > b.character)
+			    return 1;
+			  return 0;
+	}
+	
+	function addMessagesModule(contents, module){
+		var match = new RegExp("define\\(\\[[^\\]]*\\],[\\s\\r\\n]*function\\(", "gm").exec(contents); //$NON-NLS-1$ //$NON-NLS-0$
+		if(!match){
+			match = new RegExp("define\\([\"\'][^\"\']*[\"\'], *\\[[^\\]]*\\],[\\s\\r\\n]*function\\(", "gm").exec(contents); //$NON-NLS-1$ //$NON-NLS-0$
+		}
+		if(!match || match[0].indexOf(module)>0){
+			return contents;
+		}
+		var modules = new RegExp("\\[[^\\]]*\\]", "gm").exec(match[0]); //$NON-NLS-1$ //$NON-NLS-0$
+		if(modules[0].match(new RegExp("\\[\\s*\\]", "gm"))){ //$NON-NLS-1$ //$NON-NLS-0$
+			contents = contents.replace(match[0], match[0]+"messages"); //$NON-NLS-0$
+			contents = contents.replace(modules[0], modules[0][0] + "'" + module + "'" + modules[0].substring(1));			 //$NON-NLS-1$ //$NON-NLS-0$
+		}else{
+			contents = contents.replace(match[0], match[0]+"messages, "); //$NON-NLS-0$
+			contents = contents.replace(modules[0], modules[0][0] + "'" + module + "', " + modules[0].substring(1)); //$NON-NLS-1$ //$NON-NLS-0$
+		}
+		return contents;
+	}
+	
+	function replaceNls(contents, nls, config, saveMessages){
+		if(!config){
+			config = {};
+		}
+		if(!config.messages){
+			config.messages = {};
+		}
+		var messages;
+		if(saveMessages){
+			messages = config.messages;
+		} else {
+			messages = {};
+			for(var message in config.messages){
+				messages[message] = config.messages[message];
+			}
+		}
+		var stringRegExp = /("(\\"|[^"])+")|('(\\'|[^'])+')/g; //$NON-NLS-1$ //$NON-NLS-0$
+		 var lines = contents.split(/\r?\n/);
+		 var lineStructure = {};
+		 for(var i=0; i<nls.length; i++){
+			 var nlsitem = nls[i];
+			 if(!lineStructure[nlsitem.lineNum]){
+				 lineStructure[nlsitem.lineNum] = [];
+			 }
+			 lineStructure[nlsitem.lineNum].push(nlsitem);
+		 }
+		 var stringExternalized = false;
+		 for(var lineNum in lineStructure){
+			 lineStructure[lineNum].sort(compareNls);
+			 for(var i=lineStructure[lineNum].length-1; i>=0; i--){
+				 var change = lineStructure[lineNum][i];
+				 var line = lines[lineNum];
+				 if(change.checked){
+					 stringExternalized = true;
+					 var strippedString = unescapeQuotes(change.string);
+					 if(messages && messages[strippedString]){
+						 change.replace = "messages[\"" + escapeQuotes(messages[strippedString]) + "\"]";						  //$NON-NLS-1$ //$NON-NLS-0$
+					 } else {
+						 change.replace = "messages[" + change.string + "]"; //$NON-NLS-0$
+						 if(!messages) messages = {};
+						 messages[strippedString] = strippedString;
+					 }
+//					 change.replace = change.string;//remove
+					 var moveCharacters = change.replace.length - change.string.length;
+					 change.newcharacter = change.character;
+					 lines[lineNum] = line.substring(0, change.character-1) + change.replace + line.substring(change.end);
+					 for(var j=i+1; j<lineStructure[lineNum].length; j++){
+						 lineStructure[lineNum][j].newcharacter += moveCharacters;
+					 }
+				 } else if(config.marknls){
+					 var foundStrings = line.substring(0, change.character-1).match(stringRegExp);
+					 var stringNo = foundStrings ? foundStrings.length : 0;
+					 change.replace = " \/\/$NON-NLS-"+stringNo+"$"; //$NON-NLS-1$ //$NON-NLS-0$
+					 change.newcharacter = line.length;
+					 lines[lineNum] += change.replace;
+				 } else {
+					 delete change.replace;
+					 change.newcharacter = change.character;
+				 }
+			 }
+		 }
+		 var newlineRegExp = /\r?\n/g;
+		 var ret = "";
+		 try{
+		 for(var i=0; i<lines.length; i++){
+			 var newline = newlineRegExp.exec(contents);
+			 ret+=lines[i];
+			 if(newline){
+				 ret+=newline[0];
+			 }
+		 }
+		 }catch (e) {
+			contents.error(e);
+		}
+		 if(stringExternalized && config.module){
+			return addMessagesModule(ret, config.module);
+		 }
+		 return ret;
+	}
+	
+	function escapeQuotes(message){
+		message = message.replace(/\"/g, "\\\""); //$NON-NLS-0$
+		return message;
+	}
+	
+	function unescapeQuotes(message){
+		message = message.substring(1, message.length-1);
+		message = message.replace(/\\\"/g, "\""); //$NON-NLS-0$
+		message = message.replace(/\\\'/g, "\'"); //$NON-NLS-0$
+		return message;
+	}
+	
+	function stringify(messages){
+		var ret = "{"; //$NON-NLS-0$
+		var isFirst = true;
+		for(var message in messages){
+			if(!isFirst){
+				ret+=","; //$NON-NLS-0$
+			}
+			ret += "\n\t\""; //$NON-NLS-0$
+			ret += escapeQuotes(message);
+			ret += "\": \""; //$NON-NLS-0$
+			ret += escapeQuotes(messages[message]);
+			ret += "\""; //$NON-NLS-0$
+			isFirst = false;
+		}
+		ret +="\n}"; //$NON-NLS-0$
+		return ret;
+	}
+	
+	function writeMessagesFile(fileClient, config, messages, progress){
+		var deferred = new dojo.Deferred();
+		var keyToMessage = {};
+		for(var message in messages){
+			keyToMessage[messages[message]] = message;
+		}
+		var def = fileClient.read(config.fileLocation);
+		if(progress){
+			progress.progress(def, "Reading messages file " + config.fileLocation);
+		}
+		def.then(function(contents){
+			var match = new RegExp("define\\(\\{(.*\\r?\\n*)*\\}\\);", "gmi").exec(contents); //$NON-NLS-1$ //$NON-NLS-0$
+			if(match){
+				var messagesString = match[0].substring("define(".length, match[0].length-");".length); //$NON-NLS-1$ //$NON-NLS-0$
+				contents = contents.replace(messagesString, stringify(keyToMessage));
+			} else {
+				contents = "define(" + stringify(keyToMessage)+");"; //$NON-NLS-1$ //$NON-NLS-0$
+			}
+			var def1 = fileClient.write(config.fileLocation, contents);
+			if(progress){
+				progress.progress(def1, "Writing messages file " + config.fileLocation);
+			}
+			def1.then(
+					function(){
+						deferred.resolve();
+					},
+					function(error){
+						deferred.reject(error);
+					});
+		},function(error){
+			if(error.status===404){
+				function create(){
+					var def1 = fileClient.createFolder(config.directory.Location, "root");
+					if(progress){
+						progress.progress(def1, "Creating messages directory " + config.directory.Location);
+					}
+					def1.then( //$NON-NLS-0$
+							function(metadata){
+								var def2 = fileClient.createFile(metadata.Location, config.file);
+								if(progress){
+									progress.progress(def1, "Creating messages file " + metadata.Location);
+								}
+								def2.then(
+									function(metadata){
+										var def3 = fileClient.write(metadata.Location, "define(" + stringify(keyToMessage)+");");
+										if(progress){
+											progress.progress(def3, "Writing messages file " + metadata.Location);
+										}
+										def3.then( //$NON-NLS-1$ //$NON-NLS-0$
+												function(){
+													deferred.resolve();
+												},
+												function(error){
+													deferred.reject(error);
+												});
+									},
+									function(error){
+										deferred.reject(error);
+									});
+								},
+							function(error){deferred.reject(error);});
+				}
+				var def2 = fileClient.read(config.directory.Location, true);
+				if(progress){
+					progress.progress(def2, "Reading messages directory " + config.directory.Location);
+				}
+				def2.then(function(metadata){
+					create();
+				}, function(error){
+					if(error.status===404){
+						var def3 = fileClient.createFolder(config.directory.Parents[0].Location, config.directory.Name);
+						if(progress){
+							progress.progress(def3, "Creating messages directory " +  config.directory.Name);
+						}
+						def3.then(function(metadata){
+							create();
+						}, function(error){
+							deferred.reject(error);
+						});
+					}
+				});
+
+			} else {
+				deferred.reject(error);
+			}
+		});
+		return deferred;
+	}
+	
+	return {
+		NonNlsSearch: NonNlsSearch,
+		replaceNls: replaceNls,
+		writeMessagesFile: writeMessagesFile
+	};
 });
\ No newline at end of file
diff --git a/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/search.js b/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/search.js
index 01cc8ee..af5e3d4 100644
--- a/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/search.js
+++ b/bundles/org.eclipse.orion.client.ui/web/stringexternalizer/search.js
@@ -68,7 +68,7 @@
 			mGlobalCommands.generateBanner("orion-externalizeResults", serviceRegistry, commandService, preferences, searcher, searcher); //$NON-NLS-0$
 			
 			var searchResultsGenerator = new mSearchResults.SearchResultsGenerator(serviceRegistry, "results", commandService, fileClient); //$NON-NLS-0$
-			var configOutliner = new mStringExternalizerConfig.StringExternalizerConfig({parent: "favoriteProgress", serviceRegistry: serviceRegistry, fileClient: fileClient, commandService: commandService, setConfig: dojo.hitch(searchResultsGenerator, searchResultsGenerator.setConfig)}); //$NON-NLS-0$
+			var configOutliner = new mStringExternalizerConfig.StringExternalizerConfig({parent: dojo.byId("favoriteProgress"), serviceRegistry: serviceRegistry, fileClient: fileClient, commandService: commandService, setConfig: dojo.hitch(searchResultsGenerator, searchResultsGenerator.setConfig)}); //$NON-NLS-0$
 			function updateToolbar() {
 				var toolbar = dojo.byId("pageActions"); //$NON-NLS-0$
 				if (toolbar) {	
diff --git a/bundles/org.eclipse.orion.client.users/web/profile/UsersService.js b/bundles/org.eclipse.orion.client.users/web/profile/UsersService.js
index c0ef35a..9025ecd 100644
--- a/bundles/org.eclipse.orion.client.users/web/profile/UsersService.js
+++ b/bundles/org.eclipse.orion.client.users/web/profile/UsersService.js
@@ -9,7 +9,7 @@
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
 /*global define escape */
-define(["orion/Deferred", "orion/xhr", 'orion/EventTarget', 'orion/urlencode'], function(Deferred, xhr, EventTarget, urlencode) {
+define(["orion/Deferred", "orion/xhr", 'orion/EventTarget', 'orion/form'], function(Deferred, xhr, EventTarget, form) {
 
 	function getJSON(data) {
 		return data === "" ? null : JSON.parse(data);
@@ -124,7 +124,7 @@
 					"Orion-Version" : "1" //$NON-NLS-1$ //$NON-NLS-0$
 				},
 				timeout: 15000,
-				data: urlencode.encodeFormData({
+				data: form.encodeFormData({
 					login : userName,
 					password : password,
 					email: email
@@ -212,7 +212,7 @@
 					"Orion-Version" : "1" //$NON-NLS-1$ //$NON-NLS-0$
 				},
 				timeout : 15000,
-				data : urlencode.encodeFormData({
+				data : form.encodeFormData({
 					reset: true,
 					login : login,
 					password : password
diff --git a/modules/orionode/README.md b/modules/orionode/README.md
index 7dce2d8..fcfa22a 100644
--- a/modules/orionode/README.md
+++ b/modules/orionode/README.md
@@ -30,7 +30,7 @@
     ```npm install```
 (This will take a few minutes).
 4. Verify the default path of npm-cli.js.
-   In the same directory, open the server.conf file. The default value of npm_path is ../lib/node_modules/npm/bin/npm-cli.js.
+   In the same directory, open the orion.conf file. The default value of npm_path is ../lib/node_modules/npm/bin/npm-cli.js.
    This is the npm module path to support npm command. Make sure if this default path is correct, relative to the node executable directory in your environment.
    If you installed a recent version of nodejs the NPM should be installed automatically. The default value of npm_path should work in most of the cases.
    How to confirm:
diff --git a/modules/orionode/build/orion.build.js b/modules/orionode/build/orion.build.js
index 18a53e9..e39438c 100644
--- a/modules/orionode/build/orion.build.js
+++ b/modules/orionode/build/orion.build.js
@@ -17,23 +17,7 @@
     baseUrl: '.',
 
     // set the paths to our library packages
-    // mamacdon: I hacked the dojo path to resolve --  dojo is just too gigantic to copy into a staging dir
-    packages: [{
-        name: 'dojo',
-        location: '../../node_modules/dojo',
-        main: 'lib/main-browser',
-        lib: '.'
-    }, {
-        name: 'dijit',
-        location: '../../node_modules/dijit',
-        main: 'lib/main',
-        lib: '.'
-    }, {
-        name: 'dojox',
-        location: '../../node_modules/dojox',
-        main: 'lib/main',
-        lib: '.'
-    }],
+    packages: [],
     paths: {
         text: 'requirejs/text',
         i18n: 'requirejs/i18n',
diff --git a/modules/orionode/server.conf b/modules/orionode/orion.conf
similarity index 99%
rename from modules/orionode/server.conf
rename to modules/orionode/orion.conf
index 560d70d..2ebd5f2 100644
--- a/modules/orionode/server.conf
+++ b/modules/orionode/orion.conf
@@ -1,2 +1,2 @@
-pwd=

+pwd=
 npm_path=../lib/node_modules/npm/bin/npm-cli.js
\ No newline at end of file
diff --git a/modules/orionode/server.js b/modules/orionode/server.js
index fa14659..1545c7c 100644
--- a/modules/orionode/server.js
+++ b/modules/orionode/server.js
@@ -66,16 +66,8 @@
 			}))
 			.use(orionStatic({
 				orionClientRoot: ORION_CLIENT,
-				dojoRoot: NODE_MODULES,
 				dev: options.dev
 			}))
-			// Orion-specific Dojo overrides from orionStatic:
-			.use('/org.dojotoolkit/dojo', statik(path.resolve(ORION_CLIENT, './bundles/org.eclipse.orion.client.ui/web/dojo')))
-			.use('/org.dojotoolkit/dojox', statik(path.resolve(ORION_CLIENT, './bundles/org.eclipse.orion.client.ui/web/dojox')))
-			// Dojo libraries
-			.use('/org.dojotoolkit/dojo', statik(path.resolve(NODE_MODULES, 'dojo')))
-			.use('/org.dojotoolkit/dijit', statik(path.resolve(NODE_MODULES, 'dijit')))
-			.use('/org.dojotoolkit/dojox', statik(path.resolve(NODE_MODULES, 'dojox')))
 			// API handlers
 			.use(orionFile({
 				root: '/file',
@@ -118,7 +110,7 @@
 argslib.createDirs([workspaceDir], function(dirs) {
 	var passwordFile = args.password || args.pwd;
 	argslib.readPasswordFile(passwordFile, function(password) {
-		argslib.readConfigFile("./server.conf", function(configParams) {
+		argslib.readConfigFile("./orion.conf", function(configParams) {
 			if(configParams){
 				config_params = configParams;
 			}