Skip to main content
summaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorAlvaro Sanchez-Leon2014-03-26 16:02:54 -0400
committerTeodor Madan2014-04-01 04:41:32 -0400
commitaf6a81e33d2da1c102f9230f3565308e4eef47e0 (patch)
tree84c644c10d0708bc84ff12f1f683f31db0baa929 /cross
parent98e690291a07877a458e142f2d1bc4f0810e2a0f (diff)
downloadorg.eclipse.cdt-af6a81e33d2da1c102f9230f3565308e4eef47e0.tar.gz
org.eclipse.cdt-af6a81e33d2da1c102f9230f3565308e4eef47e0.tar.xz
org.eclipse.cdt-af6a81e33d2da1c102f9230f3565308e4eef47e0.zip
Bug 430313 - [remote] Auto Remote Debug - Unable to download to folder
Change-Id: I5b798435a11a97cb0e5195494455104867d12b8d Signed-off-by: Alvaro Sanchez-Leon <alvsan09@gmail.com> Reviewed-on: https://git.eclipse.org/r/23735 Tested-by: Hudson CI Reviewed-by: Teodor Madan <teodor.madan@freescale.com> IP-Clean: Teodor Madan <teodor.madan@freescale.com> Tested-by: Teodor Madan <teodor.madan@freescale.com>
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java16
1 files changed, 14 insertions, 2 deletions
diff --git a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
index 0fdf871266..796e162791 100644
--- a/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
+++ b/cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2006, 2011 PalmSource, Inc. and others.
+ * Copyright (c) 2006, 2014 PalmSource, Inc. and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -21,6 +21,7 @@
* Anna Dushistova (Mentor Graphics) - [318052] [remote launch] Properties are not saved/used
* Anna Dushistova (MontaVista) - [375067] [remote] Automated remote launch does not support project-less debug
* Dan Ungureanu (Freescale) - [428367] [remote launch] Fix missing title for Properties dialog
+ * Alvaro Sanchez-Leon (Ericsson) - [430313] [remote] Auto Remote Debug - Unable to download to folder
*******************************************************************************/
package org.eclipse.cdt.launch.remote.tabs;
@@ -326,7 +327,18 @@ public class RemoteCDSFMainTab extends CMainTab {
Object retObj = dlg.getSelectedObject();
if (retObj instanceof IRemoteFile) {
IRemoteFile selectedFile = (IRemoteFile) retObj;
- remoteProgText.setText(selectedFile.getAbsolutePath());
+ String absPath = selectedFile.getAbsolutePath();
+ if (selectedFile.isDirectory()) {
+ // The user selected a destination folder to upload the binary
+ // Append the Program name as the default file destination
+ IPath appPath = new Path(fProgText.getText().trim());
+ String lastSegment = appPath.lastSegment();
+ if (lastSegment != null && lastSegment.trim().length() > 0) {
+ IPath remotePath = new Path(selectedFile.getAbsolutePath()).append(lastSegment.trim());
+ absPath = remotePath.toPortableString();
+ }
+ }
+ remoteProgText.setText(absPath);
}
}

Back to the top