make clients responsible for clearing slideout on context change rather than command service
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/commands.js b/bundles/org.eclipse.orion.client.core/web/orion/commands.js
index c00a5a4..944f861 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/commands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/commands.js
@@ -519,10 +519,6 @@
 		 * @param {String} inactiveCommandClass (optional) class to use when a command becomes inactive by lost focus or blur
 		 */	
 		renderCommands: function(parent, scope, items, handler, renderType, forceText, userData, activeCommandClass, inactiveCommandClass) {
-		
-			if (this._parameterCollectors[renderType] && this._parameterCollectors[renderType].collectsFor(parent)) {
-				this.closeParameterCollector(renderType, this._activeModalCommandNode);
-			}
 			if (typeof(parent) === "string") {
 				parent = dojo.byId(parent);
 			}
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 cef9d80..06cb88f 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/fileCommands.js
@@ -24,6 +24,8 @@
 	var fileCommandUtils = {};
 
 	var favoritesCache = null;
+	
+	var lastItemLoaded = {Location: null};
 
 	// I'm not sure where this belongs.  This is the first time an outer party consumes
 	// favorites and understands the structure.  We need a cache for synchronous requests
@@ -74,7 +76,17 @@
 			throw "could not find toolbar " + toolbarId;
 		}
 		var service = registry.getService("orion.page.command");
-		service.renderCommands(toolbar, "dom", item, explorer, "tool", true);  // true for force icons to text
+		// close any open slideouts because if we are retargeting the command
+		if (item.Location !== lastItemLoaded.Location) {
+			service.closeParameterCollector("tool");
+			lastItemLoaded.Location = item.Location;
+		}
+
+		service.renderCommands(toolbar, "dom", item, explorer, "tool", true).then(function() {
+			if (lastItemLoaded.Location) {
+				service.processURL(window.location.href);
+			}
+		}); 
 		if (selectionToolbarId) {
 			var selectionTools = dojo.create("span", {id: selectionToolbarId}, toolbar, "last");
 			service.renderCommands(selectionTools, "dom", null, explorer, "tool", true); // true would force icons to text
diff --git a/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js b/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js
index 3ebac4e..a64e48f 100644
--- a/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js
+++ b/bundles/org.eclipse.orion.client.core/web/orion/globalCommands.js
@@ -127,18 +127,6 @@
 			return false;
 		},
 		
-		/**
-		 * Return whether this collector would collect parameters for commands on the given dom node
-		 *
-		 * @param {DOMElement | String} the id or node on which commands are rendered
-		 * @returns {Boolean} whether or not collection would occur.
-		 */
-		collectsFor: function(domElementOrId) {
-			var answer = false;
-			answer = (typeof(domElementOrId) === "string") && (domElementOrId === "pageActions" || domElementOrId === "pageNavigationActions");
-			return answer || (domElementOrId && domElementOrId.id && (domElementOrId.id === "pageActions" || domElementOrId.id === "pageNavigationActions"));
-		},
-		
 		_collectAndCall: function(commandInvocation, parent) {
 			dojo.query("input", parent).forEach(function(field) {
 				if (field.type !== "button") {
@@ -437,13 +425,17 @@
 	 * @function
 	 */
 	function generateDomCommandsInBanner(commandService, handler , pageActionDomId , useImage) {
+		// close any open slideouts because we are retargeting
+		commandService.closeParameterCollector("tool");
 		var toolbar = dojo.byId("pageActions");
 		if(pageActionDomId) {
 			toolbar = dojo.byId(pageActionDomId);
 		}
 		if (toolbar) {	
 			dojo.empty(toolbar);
-			commandService.renderCommands(toolbar, "dom", handler, handler, "tool", !useImage);  // use true when we want to force toolbar items to text
+			commandService.renderCommands(toolbar, "dom", handler, handler, "tool", !useImage).then(function() {
+				commandService.processURL(window.location.href);
+			});  
 		}
 		// now page navigation actions
 		toolbar = dojo.byId("pageNavigationActions");
@@ -678,9 +670,6 @@
 			}
 		}
 		
-		dojo.addOnLoad(function() {
-			commandService.processURL(window.location.href);
-		});
 		//every time the user manually changes the hash, we need to load the workspace with that name
 		dojo.subscribe("/dojo/hashchange", commandService, function() {
 			commandService.processURL(window.location.href);