summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorViolaine Batthish2013-05-21 11:05:21 (EDT)
committer Chris Recoskie2013-05-21 11:05:21 (EDT)
commit02ca43354ae177a27c98e0e62dac9bcd208a5e90 (patch)
treea99ad20c676f6929ec296ff4f9f7ed0fb09380c2
parentcb94b3dfbd8946771c18c7b2340a399484e7f159 (diff)
downloadorg.eclipse.ptp-02ca43354ae177a27c98e0e62dac9bcd208a5e90.zip
org.eclipse.ptp-02ca43354ae177a27c98e0e62dac9bcd208a5e90.tar.gz
org.eclipse.ptp-02ca43354ae177a27c98e0e62dac9bcd208a5e90.tar.bz2
Bug 407884 - Selecting Local connection for Build using RSE on Service
Configurations on Windows client causes exception
-rw-r--r--core/org.eclipse.ptp.remote.rse.core/src/org/eclipse/ptp/remote/rse/core/RSEFileManager.java5
-rw-r--r--rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java11
2 files changed, 13 insertions, 3 deletions
diff --git a/core/org.eclipse.ptp.remote.rse.core/src/org/eclipse/ptp/remote/rse/core/RSEFileManager.java b/core/org.eclipse.ptp.remote.rse.core/src/org/eclipse/ptp/remote/rse/core/RSEFileManager.java
index 8246937..d263b67 100644
--- a/core/org.eclipse.ptp.remote.rse.core/src/org/eclipse/ptp/remote/rse/core/RSEFileManager.java
+++ b/core/org.eclipse.ptp.remote.rse.core/src/org/eclipse/ptp/remote/rse/core/RSEFileManager.java
@@ -60,7 +60,10 @@ public class RSEFileManager implements IRemoteFileManager {
path = new Path(fConnection.getWorkingDirectory()).append(path);
}
try {
- return EFS.getFileSystem("rse").getStore(toURI(path)); //$NON-NLS-1$
+ if (fConnection.getHost().getSystemType().getId().equals(IRSESystemType.SYSTEMTYPE_LOCAL_ID) && fConnection.getHost().getSystemType().isWindows())
+ return EFS.getLocalFileSystem().getStore(path);
+ else
+ return EFS.getFileSystem("rse").getStore(toURI(path)); //$NON-NLS-1$
} catch (CoreException e) {
return null;
}
diff --git a/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java b/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java
index e114d29..5595871 100644
--- a/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java
+++ b/rdt/org.eclipse.ptp.rdt.ui/src/org/eclipse/ptp/rdt/ui/wizards/RemoteBuildServiceFileLocationWidget.java
@@ -10,12 +10,14 @@
*******************************************************************************/
package org.eclipse.ptp.rdt.ui.wizards;
+import java.io.File;
import java.net.URI;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.cdt.utils.EFSExtensionManager;
import org.eclipse.core.filesystem.IFileStore;
+import org.eclipse.core.internal.filesystem.local.LocalFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.core.runtime.Path;
@@ -38,7 +40,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Text;
@@ -148,10 +149,16 @@ public class RemoteBuildServiceFileLocationWidget extends Composite {
IFileStore homeStore = remoteServices.getFileManager(connection).getResource(homeDir);
URI uri = homeStore.toURI();
String pathString = EFSExtensionManager.getDefault().getPathFromURI(uri);
+ boolean isLocal = homeStore instanceof LocalFile;
+ if (pathString==null && isLocal)
+ pathString = (new File(uri)).getAbsolutePath();
if(pathString!=null){
IPath path = new Path(pathString);
path = path.append(RSEUtils.DEFAULT_CONFIG_DIR_NAME);
- return path.toString();
+ if (isLocal)
+ return path.toOSString();
+ else
+ return path.toString();
}
}
}