Merge branch 'master' of ssh://git.eclipse.org/gitroot/orion/org.eclipse.orion.client
diff --git a/bundles/org.eclipse.orion.client.core/web/css/ide.css b/bundles/org.eclipse.orion.client.core/web/css/ide.css
index aa795cc..b0e15b0 100644
--- a/bundles/org.eclipse.orion.client.core/web/css/ide.css
+++ b/bundles/org.eclipse.orion.client.core/web/css/ide.css
@@ -585,41 +585,57 @@
 }
 
 .contentassist {
+	font-size:11px;
 	display: none;
 	background-color: white;
 	position: fixed;
 	top: 100px;
 	left: 100px;
-	border: 2px inset #DDD;
+	border: 1px solid #DDD;
 	z-index:100;
 	cursor: default;
 	overflow: auto;
 	height: 150px;
-	width: 300px;
+	width: 350px;
 }
 
 .contentassist:focus {
-	border: 2px solid #666;
+	border: 1px solid #666;
 }
 
 .contentassist .proposal-emphasis {
-	font-weight: bold
+	font-weight: normal;
 }
+
+.contentassist hr{
+	border: 0;
+    height: 0;
+    border-top: 1px solid rgba(0, 0, 0, 0.1);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
+}
+
 .contentassist .proposal-noemphasis {
-	background-color: linen;
+	background-color: aliceblue;
 	font-weight: lighter;
 	color: grey;
 }
 .contentassist .proposal-hr {
 	/* display as horizontal rule */
-	text-decoration:line-through;
+	border: 0;
+    height: 0;
+    border-top: 1px solid rgba(0, 0, 0, 0.1);
+    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
 }
 .contentassist .proposal-default {
 	/* nothing */
 }
 
 .contentassist .selected {
-	background-color: #DDD;
+	/* background-color: #a6bfe1; */
+	font-weight:bold;
+	padding-bottom: 3px;
+	background-color: #FEC;
+	font-weight: bold;
 }
 
 
diff --git a/bundles/org.eclipse.orion.client.core/web/css/sections.css b/bundles/org.eclipse.orion.client.core/web/css/sections.css
index 5d9aef5..27c2a6f 100644
--- a/bundles/org.eclipse.orion.client.core/web/css/sections.css
+++ b/bundles/org.eclipse.orion.client.core/web/css/sections.css
@@ -27,7 +27,6 @@
 	overflow-x: hidden;

 	padding-right: 10px;

 	padding-left: 10px;

-	width: 98%;

 }

 

 .sectionTableItem {

diff --git a/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.html b/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.html
index 30dd2b9..2feb8d0 100644
--- a/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.html
+++ b/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.html
@@ -61,7 +61,7 @@
 			</div>

 

 			<div class="orion-welcome-area"></div>

-			<div class="orion-login" id="orionLogin" style="visibility: hidden;">

+			<div class="orion-login" id="orionLoginForm" style="visibility: hidden;">

 				<div class="orion-login-header">Log in</div>

 				<form>

 					<div class="orion-input-holder">

@@ -129,32 +129,31 @@
 			</div>

 

 			<div class="orion-open" id="orionOpen" style="visibility: visible;" tabindex="-1">

-				<div style="padding-bottom:10px;font-weight: bold;font-size: 15px;" tabindex="-1">Have an account? Sign in: </div>

-				<div id="openIDLogin" class="orion-open-header" tabindex="-1"></div>

+				<div id="existingAccountLogin" class="orion-account-header" tabindex="-1">Have an account? Sign in:</div>

 				<div class="orion-open-images" tabindex="-1">

 			

-					<a id="orionLoginLink" class="loginWindow" aria-labelledby="openIDLogin myopenidLogin" tabindex="-1"> 

+					<a id="orionLoginLink" class="loginWindow" aria-labelledby="existingAccountLogin orionLogin" tabindex="-1"> 

 						<div class='openIdWrapper' tabindex="-1">

-							<div id="myopenidLogin" class="orionLoginIcon" alt="myOpenID" tabindex="0" title="sign in with existing Orion account"></div> 

+							<div id="orionLogin" class="orionLoginIcon" tabindex="0" alt="Orion" title="Sign in with existing Orion account"></div> 

 						</div>

 					</a>

 				

-					<a id="googleLoginLink" class="loginWindow" aria-labelledby="openIDLogin googleLogin" tabindex="-1"> 

+					<a id="googleLoginLink" class="loginWindow" aria-labelledby="existingAccountLogin googleLogin" tabindex="-1"> 

 						<div class='openIdWrapper' tabindex="-1">

-							<div id="googleLogin" class="googleIcon" tabindex="0" alt="Google" title="sign in with associated Google account"></div>

+							<div id="googleLogin" class="googleIcon" tabindex="0" alt="Google" title="Sign in with associated Google account"></div>

 						</div>

 					</a> 

 					

-					<a id="personaLoginLink" class="loginWindow" aria-labelledby="openIDLogin personaLogin" tabindex="-1"> 

+					<a id="personaLoginLink" class="loginWindow" aria-labelledby="existingAccountLogin personaLogin" tabindex="-1"> 

 						<div class='openIdWrapper' tabindex="-1">

-							<div id="personaLogin" class="personaIcon" tabindex="0" alt="Mozilla Persona" title="sign in with associated Mozilla Persona account"></div> 

+							<div id="personaLogin" class="personaIcon" tabindex="0" alt="Mozilla Persona" title="Sign in with associated Mozilla Persona account"></div> 

 						</div>

 					</a> 

 				</div>

 			</div>	

 			

 			<div class="orion-register" id="orionRegister">

-				<div style="padding-bottom:10px;font-weight: bold;font-size: 15px;">Need an account?</div>

+				<div class="orion-account-header">Need an account?</div>

 				<form>

 					<input id="registerButton" type="button" class="orion-register-button" value="Create a new account" tabindex="0">

 				</form>

diff --git a/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.js b/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.js
index 45cf7d4..f1fd732 100644
--- a/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.js
+++ b/bundles/org.eclipse.orion.client.core/web/mixloginstatic/LoginWindow.js
@@ -359,7 +359,7 @@
 			document.getElementById('orionOpen').style.visibility = 'hidden';
 			document.getElementById('orionRegister').style.visibility = 'hidden';
 		
-			document.getElementById('orionLogin').style.visibility = 'hidden';
+			document.getElementById('orionLoginForm').style.visibility = 'hidden';
 			document.getElementById('orionRegister').style.visibility = 'hidden';
 			document.getElementById('newUserHeaderShown').style.visibility = '';
 			document.getElementById('create_login').focus();
@@ -371,7 +371,7 @@
 	}
 
 	function revealResetUser() {
-		document.getElementById('orionLogin').style.visibility = 'hidden';
+		document.getElementById('orionLoginForm').style.visibility = 'hidden';
 		if (!userCreationEnabled && !registrationURI) {
 			document.getElementById('orionRegister').style.visibility = 'hidden';
 			document.getElementById('orionReset').style.height = '212px';
@@ -382,7 +382,7 @@
 	}
 
 	function hideResetUser() {
-		document.getElementById('orionLogin').style.visibility = '';
+		document.getElementById('orionLoginForm').style.visibility = '';
 		document.getElementById('newUserHeaderShown').style.display = '';
 		document.getElementById('orionReset').style.visibility = 'hidden';
 	}
@@ -396,13 +396,13 @@
 			event.stopPropagation();
 			document.getElementById('orionOpen').style.visibility = 'hidden';
 			document.getElementById('orionRegister').style.visibility = 'hidden';		
-			document.getElementById('orionLogin').style.visibility = '';
+			document.getElementById('orionLoginForm').style.visibility = '';
 			document.getElementById("login").focus();
 		}
 	}
 	
 	function cancelLogin(){
-		document.getElementById('orionLogin').style.visibility = 'hidden';
+		document.getElementById('orionLoginForm').style.visibility = 'hidden';
 		document.getElementById('orionOpen').style.visibility = '';
 		
 		if (userCreationEnabled || registrationURI) {
@@ -441,7 +441,7 @@
 						formatForNoUserCreation();
 					}
 					document.getElementById("login-window").style.display = '';
-					document.getElementById("myopenidLogin").focus();
+					document.getElementById("orionLogin").focus();
 				}
 			}
 		};
@@ -556,7 +556,7 @@
 		document.getElementById("googleLogin").onkeydown = googleLogin;
 		
 		document.getElementById("orionLoginLink").onclick = revealLogin;
-		document.getElementById("myopenidLogin").onkeydown = revealLogin;
+		document.getElementById("orionLogin").onkeydown = revealLogin;
 		
 		document.getElementById("personaLogin").onclick = personaLogin;
 		document.getElementById("personaLogin").onkeydown = personaLogin;
diff --git a/bundles/org.eclipse.orion.client.core/web/mixloginstatic/css/landing.css b/bundles/org.eclipse.orion.client.core/web/mixloginstatic/css/landing.css
index ea119ac..7dfe62a 100644
--- a/bundles/org.eclipse.orion.client.core/web/mixloginstatic/css/landing.css
+++ b/bundles/org.eclipse.orion.client.core/web/mixloginstatic/css/landing.css
@@ -32,8 +32,9 @@
 	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#555), color-stop(100%,black));
 	background: -webkit-linear-gradient(top, #444 0%,black 100%);
 	background: -o-linear-gradient(top, #444 0%,black 100%);
-	background: -ms-linear-gradient(top, #444 0%,black 100%);
+	background: -ms-linear-gradient(top, #444 0%,black 100%); /* IE10+ */
 	background: linear-gradient(to bottom, #444 0%,black 100%);
+	-ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorStr='#444444', EndColorStr='black')"; /* IE9 */
 	-moz-box-shadow: 0 2px 15px rgba(0,0,0,0.25);
 	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
 	-webkit-transition: box-shadow 0.2s linear;
@@ -200,16 +201,10 @@
 	color:#666;
 }
 
-.orion-open-header	{
+.orion-account-header {
+	padding-bottom:10px;
 	font-weight: bold;
-	font-size:15px;
-	padding-bottom: 10px;
-	margin-bottom:5px;
-	color:#666;
-	vertical-align: 8px;
-	/* padding-right: 20px; */
-	float:left;
-	line-height: 48px;
+	font-size: 15px;
 }
 
 .orion-register-header{
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js b/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
index 508fae3..8acbd1e 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
@@ -768,9 +768,9 @@
 			callback : function(data) {
 				var item = forceSingleItem(data.items);
 				var dialog = new orion.widgets.SFTPConnectionDialog({
-					func:  function(host,path,user,password, overwriteOptions){
+					func:  function(host,port,path,user,password, overwriteOptions){
 						var optionHeader = overwriteOptions ? "sftp,"+overwriteOptions : "sftp"; //$NON-NLS-1$ //$NON-NLS-0$
-						var importOptions = {"OptionHeader":optionHeader,"Host":host,"Path":path,"UserName":user,"Passphrase":password}; //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
+						var importOptions = {"OptionHeader":optionHeader,"Host":host,"Port":port,"Path":path,"UserName":user,"Passphrase":password}; //$NON-NLS-5$ //$NON-NLS-4$ //$NON-NLS-3$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 						var deferred = fileClient.remoteImport(item.ImportLocation, importOptions);
 						progressService.showWhile(deferred, dojo.string.substitute(messages["Importing from ${0}"], [host])).then(
 							dojo.hitch(explorer, function() {
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/SFTPConnectionDialog.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/SFTPConnectionDialog.js
index a7080e6..7f2d6b7 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/SFTPConnectionDialog.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/SFTPConnectionDialog.js
@@ -8,7 +8,7 @@
  * 
  * Contributors: IBM Corporation - initial API and implementation
  ******************************************************************************/
-/*global dojo dijit localStorage widgets */
+/*global dojo dijit orion localStorage widgets window */
 /*jslint browser:true*/
 
 define(['i18n!orion/widgets/nls/messages', 'dojo', 'dijit', 'dijit/Dialog', 'dijit/form/CheckBox', 'dijit/form/ComboBox', 'dojo/data/ItemFileReadStore',  'orion/widgets/_OrionDialogMixin', 'text!orion/widgets/templates/SFTPConnectionDialog.html'], function(messages, dojo, dijit) {
@@ -45,12 +45,13 @@
 		this.inherited(arguments);
 		this.title = "SFTP Transfer"; //$NON-NLS-0$
 		this.sftpHostLabelText= messages['Remote host:'];
+		this.sftpPortLabelText = messages['Port:'];
 		this.sftpPathLabelText= messages['Remote path:'];
 		this.sftpUserLabelText= messages['User name:'];
 		this.sftpPasswordLabelText= messages['Password:'];
 		this.buttonOk = messages['Start Transfer'];
 		this.locationLabelText = messages['Location:'];
-		sftpConnectionStoreData= JSON.parse(localStorage.getItem("orion.sftpConnections")); //$NON-NLS-0$
+		window.sftpConnectionStoreData= JSON.parse(localStorage.getItem("orion.sftpConnections")); //$NON-NLS-0$
 		
 		this.preRadioDescriptionText = messages["If the same file exists in both the source and destination:"];
 		this.firstRadioLabelText = messages["Cancel the transfer"];
@@ -66,17 +67,35 @@
 	execute: function() {
 		var selected = this.sftpConnectionList.value;
 		var splits = selected.split("@"); //$NON-NLS-0$
-		if (splits.length !== 2) {
+		var host, port, path, user, remaining;
+		if (splits.length === 2) {
+			user = splits[0];
+			remaining = splits[1];
+		} else if (splits.length === 3) {
+			user = splits[0]+"@"+splits[1]; //$NON-NLS-0$
+			remaining = splits[2];
+		} else {
 			return;
 		}
-		var user = splits[0];
-		var separator = splits[1].indexOf("/"); //$NON-NLS-0$
-		if (separator <= 0) {
+		var portSeparator = remaining.indexOf(":"); //$NON-NLS-0$
+		if (portSeparator <= 0) {
+			port = 22;
+		}
+		var pathSeparator = remaining.indexOf("/"); //$NON-NLS-0$
+		if (pathSeparator <= 0) {
 			return;
 		}
-		var host = splits[1].substring(0, separator);
-		var path = splits[1].substring(separator);
-		this.options.func(host, path, user, this.sftpPassword.value, this._computeOverwriteValue());
+		if (port) {
+			host = remaining.substring(0, pathSeparator);
+			path = remaining.substring(pathSeparator);
+		} else {
+			host = remaining.substring(0, portSeparator);
+			port = remaining.substring(portSeparator+1, pathSeparator);
+			path = remaining.substring(pathSeparator);
+		}
+
+		// window.console.log("host: " + host + " port: " + port + " user: " + user + " path: " + path);
+		this.options.func(host, port, path, user, this.sftpPassword.value, this._computeOverwriteValue());
 	},
 	_computeOverwriteValue: function() {
 		if (this.overwriteCancel.checked) {
@@ -88,7 +107,7 @@
 		return "";
 	},
 	onAddConnection: function() {
-		var newConnection = {name: this.sftpUser.value+"@"+this.sftpHost.value+this.sftpPath.value}; //$NON-NLS-0$
+		var newConnection = {name: this.sftpUser.value+"@"+this.sftpHost.value+":"+this.sftpPort.value+this.sftpPath.value}; //$NON-NLS-1$ //$NON-NLS-0$
 		var connections = JSON.parse(localStorage.getItem("orion.sftpConnections")); //$NON-NLS-0$
 		//make sure we don't already have an entry with this name
 		var found = false;
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/nls/root/messages.js b/bundles/org.eclipse.orion.client.core/web/orion/widgets/nls/root/messages.js
index 4ffcb31..ce06b3f 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/nls/root/messages.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/nls/root/messages.js
@@ -29,6 +29,7 @@
 	"Services": "Services",
 	"SFTP Transfer": "SFTP Transfer",
 	"Remote host:": "Remote host:",
+	"Port:": "Port:",
 	"Remote path:": "Remote path:",
 	"User name:": "User name:",
 	"Password:": "Password:",
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/SFTPConnectionDialog.html b/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/SFTPConnectionDialog.html
index 4a6338d..d7de5bd 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/SFTPConnectionDialog.html
+++ b/bundles/org.eclipse.orion.client.core/web/orion/widgets/templates/SFTPConnectionDialog.html
@@ -31,6 +31,14 @@
 								</div>
 								<div style="display: table-row">
 									<div style="display: table-cell; padding: 5">
+										<label dojoAttachPoint="sftpPortLabel" for="${id}_sftpPort" style="padding-right: 10">${sftpPortLabelText}</label>
+									</div>
+									<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">
+										<input dojoAttachPoint="sftpPort" id="${id}_sftpPort" style="display: inline-block; width: 98%;" value="">
+									</div>
+								</div>
+								<div style="display: table-row">
+									<div style="display: table-cell; padding: 5">
 										<label dojoAttachPoint="sftpPathLabel" for="${id}_sftpPath" style="padding-right: 10">${sftpPathLabelText}</label>
 									</div>
 									<div style="display: table-cell; padding: 5; width: 40em; text-align: left;">
diff --git a/bundles/org.eclipse.orion.client.core/web/shell/shellPage.js b/bundles/org.eclipse.orion.client.core/web/shell/shellPage.js
index 0781bbc..26e1885 100644
--- a/bundles/org.eclipse.orion.client.core/web/shell/shellPage.js
+++ b/bundles/org.eclipse.orion.client.core/web/shell/shellPage.js
@@ -69,11 +69,11 @@
 	}

 

 	function createLink(node) {

-		var link = document.createElement("a");

+		var link = document.createElement("a"); //$NON-NLS-0$

 		if (node.Directory) {

 			link.href = "#" + node.Location; //$NON-NLS-0$

 			link.className = "shellPageDirectory"; //$NON-NLS-0$

-			link.textContent = node.Name; //$NON-NLS-0$

+			link.textContent = node.Name;

 			return link;

 		}

 		link.href = computeEditURL(node);

@@ -82,9 +82,10 @@
 		return link;

 	}

 

-	/* implementations of the build-in commands */

+	/* implementations of the built-in commands */

+

 	function getChangedToElement(dirName) {

-		var span = document.createElement("span"); //NON-NLS-0$

+		var span = document.createElement("span"); //$NON-NLS-0$

 		span.appendChild(document.createTextNode(messages["Changed to: "]));

 		var bold = document.createElement("b"); //$NON-NLS-0$

 		bold.appendChild(document.createTextNode(dirName));

@@ -115,7 +116,7 @@
 	function lsExec(args, context) {

 		var result = context.createPromise();

 		var location = dojo.hash() || shellPageFileService.SEPARATOR;

-		fileClient.loadWorkspace(location).then(

+		shellPageFileService.loadWorkspace(location).then(

 			function(node) {

 				shellPageFileService.setCurrentDirectory(node); /* flush current node cache */

 				shellPageFileService.withChildren(node,

@@ -129,11 +130,11 @@
 

 						/*

 						 * GCLI changes the target for all <a> tags contained in a result to _blank,

-						 * to force clicked links to open in a new window or tab.  However for links

-						 * that are created by this command to represent directories, selection should

-						 * happen within the same page since it just changes the page hash.

+						 * to force clicked links to open in a new window or tab.  However links that

+						 * are created by this command to represent directories should open in the

+						 * same window/tab since the only change is the page hash.

 						 *

-						 * To work around this GCLI behavior do a pass of all links created by this

+						 * To work around this GCLI behavior, do a pass of all links created by this

 						 * command to represent directories and change their targets back to _self.

 						 * This must be done asynchronously to ensure that it runs after GCLI has done

 						 * its initial conversion of targets to _blank.

@@ -161,12 +162,12 @@
 	function pwdExec(args, context) {

 		var result = context.createPromise();

 		var node = shellPageFileService.getCurrentDirectory();

-		fileClient.loadWorkspace(node.Location).then(

+		shellPageFileService.loadWorkspace(node.Location).then(

 			function(node) {

 				var buffer = shellPageFileService.computePathString(node);

-				var b = document.createElement("b"); //NON-NLS-0$

+				var b = document.createElement("b"); //$NON-NLS-0$

 				b.appendChild(document.createTextNode(buffer));

-				result.resolve(b); //$NON-NLS-1$ //$NON-NLS-0$

+				result.resolve(b);

 			},

 			function(error) {

 				resolveError(result, error);

@@ -218,7 +219,7 @@
 			shellPageFileService = new mShellPageFileService.ShellPageFileService();

 			var location = dojo.hash();

 			var ROOT_ORIONCONTENT = "/file"; //$NON-NLS-0$

-			fileClient.loadWorkspace(location || ROOT_ORIONCONTENT).then(

+			shellPageFileService.loadWorkspace(location || ROOT_ORIONCONTENT).then(

 				function(node) {

 					shellPageFileService.setCurrentDirectory(node);

 				});

@@ -340,19 +341,19 @@
 					return;

 				}

 				if (hash.length === 0) {

-					fileClient.loadWorkspace(shellPageFileService.SEPARATOR).then(

+					shellPageFileService.loadWorkspace(shellPageFileService.SEPARATOR).then(

 						function(node) {

 							shellPageFileService.setCurrentDirectory(node);

 						}

 					);

-					shell.output(getChangedToElement("/")); //$NON-NLS-0$

+					shell.output(getChangedToElement(shellPageFileService.SEPARATOR));

 					return;

 				}

-				fileClient.loadWorkspace(hash).then(

+				shellPageFileService.loadWorkspace(hash).then(

 					function(node) {

 						shellPageFileService.setCurrentDirectory(node);

 						var buffer = shellPageFileService.computePathString(node);

-						shell.output(getChangedToElement(buffer)); //$NON-NLS-1$ //$NON-NLS-0$

+						shell.output(getChangedToElement(buffer));

 					}

 				);

 			});

diff --git a/bundles/org.eclipse.orion.client.core/web/shell/shellPageFileService.js b/bundles/org.eclipse.orion.client.core/web/shell/shellPageFileService.js
index 4715eaf..6094407 100644
--- a/bundles/org.eclipse.orion.client.core/web/shell/shellPageFileService.js
+++ b/bundles/org.eclipse.orion.client.core/web/shell/shellPageFileService.js
@@ -126,6 +126,9 @@
 				}

 				return node.parent;

 			},

+			loadWorkspace: function(path) {

+				return fileClient.loadWorkspace(path);

+			},

 			/**

 			 * Sets the current directory node and initiates retrieval of its

 			 * child nodes.