mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-12 11:35:21 +02:00
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
(cherry picked from commit 9dc70ec8a5
)
This commit is contained in:
parent
909e2294b1
commit
3447d2a00a
1 changed files with 8 additions and 1 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue