### Eclipse Workspace Patch 1.0
#P org.jboss.ide.eclipse.as.ui
Index: jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java
===================================================================
--- jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java	(revision 31611)
+++ jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerContentProvider.java	(working copy)
@@ -35,10 +35,8 @@
 import org.eclipse.wst.server.core.internal.Server;
 import org.eclipse.wst.server.core.internal.UpdateServerJob;
 import org.eclipse.wst.server.core.util.PublishAdapter;
-import org.eclipse.wst.server.ui.internal.Trace;
 import org.eclipse.wst.server.ui.internal.view.servers.ModuleServer;
 import org.eclipse.wst.server.ui.internal.viewers.BaseContentProvider;
-import org.jboss.ide.eclipse.as.ui.Messages;
 
 /**
  * @deprecated
@@ -349,7 +347,7 @@
 							}
 						}
 					} catch (Exception e) {
-						Trace.trace(Trace.STRING_FINEST, Messages.ServerContentProvider_ErrorInServersViewAnimation, e);
+						//Trace.trace(Trace.STRING_FINEST, Messages.ServerContentProvider_ErrorInServersViewAnimation, e);
 					}
 					display.timerExec(SLEEP, animator[0]);
 				}
Index: jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java
===================================================================
--- jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java	(revision 31611)
+++ jbossui/org/jboss/tools/as/wst/server/ui/xpl/ServerActionProvider.java	(working copy)
@@ -46,7 +46,6 @@
 import org.eclipse.wst.server.core.model.ServerDelegate;
 import org.eclipse.wst.server.ui.internal.Messages;
 import org.eclipse.wst.server.ui.internal.ServerUIPlugin;
-import org.eclipse.wst.server.ui.internal.Trace;
 import org.eclipse.wst.server.ui.internal.actions.NewServerWizardAction;
 import org.eclipse.wst.server.ui.internal.view.servers.CopyAction;
 import org.eclipse.wst.server.ui.internal.view.servers.DeleteAction;
@@ -57,7 +56,6 @@
 import org.eclipse.wst.server.ui.internal.view.servers.PasteAction;
 import org.eclipse.wst.server.ui.internal.view.servers.PropertiesAction;
 import org.eclipse.wst.server.ui.internal.view.servers.PublishAction;
-import org.eclipse.wst.server.ui.internal.view.servers.PublishCleanAction;
 import org.eclipse.wst.server.ui.internal.view.servers.RemoveModuleAction;
 import org.eclipse.wst.server.ui.internal.view.servers.RenameAction;
 import org.eclipse.wst.server.ui.internal.view.servers.RestartModuleAction;
@@ -67,7 +65,6 @@
 import org.eclipse.wst.server.ui.internal.view.servers.StartModuleAction;
 import org.eclipse.wst.server.ui.internal.view.servers.StopAction;
 import org.eclipse.wst.server.ui.internal.view.servers.StopModuleAction;
-import org.jboss.ide.eclipse.as.ui.actions.ExploreAction;
 /**
  * @deprecated
  */
@@ -127,7 +124,7 @@
 					IServer server = (IServer) data;
 					ServerUIPlugin.editServer(server);
 				} catch (Exception e) {
-					Trace.trace(Trace.STRING_SEVERE, org.jboss.ide.eclipse.as.ui.Messages.ServerActionProvider_CouldNotOpenServerError, e);
+					//Trace.trace(Trace.STRING_SEVERE, org.jboss.ide.eclipse.as.ui.Messages.ServerActionProvider_CouldNotOpenServerError, e);
 				}
 			}
 		});
Index: jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java
===================================================================
--- jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java	(revision 31611)
+++ jbossui/org/jboss/ide/eclipse/as/ui/editor/DeploymentModuleOptionCompositeAssistant.java	(working copy)
@@ -231,9 +231,7 @@
 			}
 
 			public void widgetSelected(SelectionEvent e) {
-				DirectoryDialog d = new DirectoryDialog(new Shell());
-				d.setFilterPath(page.makeGlobal(deployText.getText()));
-				String x = d.open();
+				String x = openBrowseDialog(deployText.getText());
 				if (x != null) {
 					deployText.setText(page.makeRelative(x));
 				}
@@ -261,9 +259,7 @@
 			}
 
 			public void widgetSelected(SelectionEvent e) {
-				DirectoryDialog d = new DirectoryDialog(new Shell());
-				d.setFilterPath(page.makeGlobal(tempDeployText.getText()));
-				String x = d.open();
+				String x = openBrowseDialog(tempDeployText.getText());
 				if (x != null)
 					tempDeployText.setText(page.makeRelative(x));
 			}
@@ -352,7 +348,28 @@
 			showRadios = false;
 		return showRadios;
 	}
-	
+	public static interface IBrowseBehavior {
+		public String openBrowseDialog(ModuleDeploymentPage page, String original);
+	}
+	public static HashMap<String, IBrowseBehavior> browseBehaviorMap = new HashMap<String, IBrowseBehavior>();
+	static {
+		browseBehaviorMap.put(LocalPublishMethod.LOCAL_PUBLISH_METHOD, new IBrowseBehavior() { //$NON-NLS-1$
+			public String openBrowseDialog(ModuleDeploymentPage page, String original) {
+				DirectoryDialog d = new DirectoryDialog(new Shell());
+				d.setFilterPath(page.makeGlobal(original));
+				return d.open();
+			} 
+		});
+	}
+		
+	protected String openBrowseDialog(String original) {
+		String mode = getServer().getAttributeHelper().getAttribute(IDeployableServer.SERVER_MODE, LocalPublishMethod.LOCAL_PUBLISH_METHOD);
+		IBrowseBehavior beh = browseBehaviorMap.get(mode);
+		if( beh == null )
+			beh = browseBehaviorMap.get(LocalPublishMethod.LOCAL_PUBLISH_METHOD); //$NON-NLS-1$
+		return beh.openBrowseDialog(page, original);
+	}
+		
 	private void updateWidgets() {
 		if( getShowRadios()) {
 			metadataRadio.setSelection(getDeployType().equals(
#P org.jboss.ide.eclipse.as.rse.ui
Index: src/org/jboss/ide/eclipse/as/rse/ui/DeployOnlyRSEPrefComposite.java
===================================================================
--- src/org/jboss/ide/eclipse/as/rse/ui/DeployOnlyRSEPrefComposite.java	(revision 31611)
+++ src/org/jboss/ide/eclipse/as/rse/ui/DeployOnlyRSEPrefComposite.java	(working copy)
@@ -31,7 +31,6 @@
 	public DeployOnlyRSEPrefComposite(Composite parent, int style, IServerModeUICallback callback) {
 		super(parent, style, callback);
 	}
-
 	protected void createRSEWidgets(Composite child) {
 		handleDeployOnlyServer(child);
 	}
@@ -64,6 +63,10 @@
 			}
 
 			public void widgetSelected(SelectionEvent e) {
+				String browseVal = browseClicked3(deployText.getShell());
+				if (browseVal != null) {
+					deployText.setText(browseVal);
+				}
 			}
 		});
 
@@ -90,6 +93,10 @@
 			}
 
 			public void widgetSelected(SelectionEvent e) {
+				String browseVal = browseClicked3(tempDeployText.getShell());
+				if (browseVal != null) {
+					tempDeployText.setText(browseVal);
+				}
 			}
 		});
 	}
Index: src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java
===================================================================
--- src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java	(revision 31611)
+++ src/org/jboss/ide/eclipse/as/rse/ui/RSEDeploymentPreferenceUI.java	(working copy)
@@ -1,5 +1,5 @@
 /******************************************************************************* 
- * Copyright (c) 2010 Red Hat, Inc. 
+ * Copyright (c) 2011 Red Hat, Inc. 
  * Distributed under license by Red Hat, Inc. All rights reserved. 
  * This program is made available under the terms of the 
  * Eclipse Public License v1.0 which accompanies this distribution, 
@@ -50,11 +50,23 @@
 import org.jboss.ide.eclipse.as.core.util.ServerConverter;
 import org.jboss.ide.eclipse.as.rse.core.RSEUtils;
 import org.jboss.ide.eclipse.as.ui.UIUtil;
+import org.jboss.ide.eclipse.as.ui.editor.DeploymentModuleOptionCompositeAssistant;
 import org.jboss.ide.eclipse.as.ui.editor.IDeploymentTypeUI;
+import org.jboss.ide.eclipse.as.ui.editor.ModuleDeploymentPage;
 import org.jboss.ide.eclipse.as.ui.editor.ServerModeSection;
 import org.jboss.ide.eclipse.as.ui.editor.ServerModeSectionComposite.ChangeServerPropertyCommand;
 
 public class RSEDeploymentPreferenceUI implements IDeploymentTypeUI {
+	static {
+		DeploymentModuleOptionCompositeAssistant.browseBehaviorMap.put("rse", new DeploymentModuleOptionCompositeAssistant.IBrowseBehavior() {
+			public String openBrowseDialog(ModuleDeploymentPage page, String original) {
+				String current = page.getServer().getAttribute(RSEUtils.RSE_SERVER_HOST, (String)null);
+				IHost h = findHost(current, null);
+				return browseClicked4(new Shell(), h);
+			}
+		});
+	}
+	
 	public RSEDeploymentPreferenceUI() {
 		// Do nothing
 	}
@@ -116,16 +128,7 @@
 		}
 
 		protected String browseClicked3(Shell shell) {
-			SystemRemoteFileDialog d = new SystemRemoteFileDialog(
-					shell, RSEUIMessages.BROWSE_REMOTE_SYSTEM, combo.getHost());
-			if( d.open() == Dialog.OK) {
-				Object o = d.getOutputObject();
-				if( o instanceof IRemoteFile ) {
-					String path = ((IRemoteFile)o).getAbsolutePath();
-					return path;
-				}
-			}
-			return null;
+			return browseClicked4(getShell(), combo.getHost());
 		}
 		
 		protected IJBossServerRuntime getRuntime() {
@@ -260,11 +263,7 @@
 			}
 			
 			public IHost findHost(String name) {
-				for( int i = 0; i < hosts.length; i++ ) {
-					if( hosts[i].getAliasName().equals(name))
-						return hosts[i];
-				}
-				return null;
+				return RSEDeploymentPreferenceUI.findHost(name, hosts);
 			}
 
 			public Combo getCombo() {
@@ -347,4 +346,28 @@
 			}
 		}
 	}
+	
+	
+	public static IHost findHost(String name, IHost[] hosts) {
+		if( hosts == null )
+			hosts = RSECorePlugin.getTheSystemRegistry().getHostsBySubSystemConfigurationCategory("files");
+		for( int i = 0; i < hosts.length; i++ ) {
+			if( hosts[i].getAliasName().equals(name))
+				return hosts[i];
+		}
+		return null;
+	}
+
+	public static String browseClicked4(Shell s, IHost host) {
+		SystemRemoteFileDialog d = new SystemRemoteFileDialog(
+				s, RSEUIMessages.BROWSE_REMOTE_SYSTEM, host);
+		if( d.open() == Dialog.OK) {
+			Object o = d.getOutputObject();
+			if( o instanceof IRemoteFile ) {
+				String path = ((IRemoteFile)o).getAbsolutePath();
+				return path;
+			}
+		}
+		return null;
+	}
 }
