Skip to main content
summaryrefslogtreecommitdiffstats
path: root/cross
diff options
context:
space:
mode:
authorMarc Dumais2016-05-20 10:53:11 -0400
committerGerrit Code Review @ Eclipse.org2016-06-09 12:19:44 -0400
commit9dc70ec8a5dc501d17f928e4a3f5a930d00f506d (patch)
treef8caea6b2abbe6becb37d525f3c789a265d41902 /cross
parentc3af58b543f01981a62cda88116a853d6d3b76e4 (diff)
downloadorg.eclipse.cdt-9dc70ec8a5dc501d17f928e4a3f5a930d00f506d.tar.gz
org.eclipse.cdt-9dc70ec8a5dc501d17f928e4a3f5a930d00f506d.tar.xz
org.eclipse.cdt-9dc70ec8a5dc501d17f928e4a3f5a930d00f506d.zip
bug 452356 - using o.e.remote: issues with remote browse dialog
This patch addresses an issue in the "Select Remote C/C++ Application File" browse dialog: - The remote browse dialog's selected file or directory is still used in the launch configuration, even if the user cancels the browse dialog Change-Id: Ib535254d681a349b2aadfe91adfc73d633a16e90
Diffstat (limited to 'cross')
-rw-r--r--cross/org.eclipse.cdt.launch.remote/src/org/eclipse/cdt/launch/remote/tabs/RemoteCDSFMainTab.java9
1 files changed, 8 insertions, 1 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 33db9e0cc1..36f63c7c9f 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
@@ -43,6 +43,7 @@ import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.window.Window;
import org.eclipse.remote.core.IRemoteConnection;
import org.eclipse.remote.core.IRemoteServicesManager;
import org.eclipse.remote.ui.dialogs.RemoteResourceBrowser;
@@ -330,7 +331,13 @@ public class RemoteCDSFMainTab extends CMainTab {
SWT.NONE);
b.setConnection(currentConnectionSelected);
b.setTitle(Messages.RemoteCMainTab_Remote_Path_Browse_Button_Title);
- b.open();
+ int returnCode = b.open();
+
+ // User cancelled the browse dialog?
+ if (returnCode == Window.CANCEL) {
+ return;
+ }
+
IFileStore selectedFile = b.getResource();
if (selectedFile != null) {
String absPath = selectedFile.toURI().getPath();

Back to the top