mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-22 07:43:56 +02:00
get remote folder when filter selected in browse dialog (defect 138896)
This commit is contained in:
parent
58843f37fb
commit
a167eaa99b
1 changed files with 14 additions and 1 deletions
|
@ -3,9 +3,12 @@ package org.eclipse.rse.eclipse.filesystem;
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
import org.eclipse.core.filesystem.URIUtil;
|
import org.eclipse.core.filesystem.URIUtil;
|
||||||
|
import org.eclipse.rse.core.subsystems.ISubSystem;
|
||||||
|
import org.eclipse.rse.core.subsystems.ISubSystemConfiguration;
|
||||||
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
|
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFileDialog;
|
||||||
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
|
import org.eclipse.rse.files.ui.dialogs.SystemRemoteFolderDialog;
|
||||||
import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
|
import org.eclipse.rse.files.ui.dialogs.SystemSelectRemoteFileOrFolderDialog;
|
||||||
|
import org.eclipse.rse.filters.ISystemFilterReference;
|
||||||
import org.eclipse.rse.model.IHost;
|
import org.eclipse.rse.model.IHost;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFile;
|
||||||
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
import org.eclipse.rse.subsystems.files.core.subsystems.IRemoteFileSubSystem;
|
||||||
|
@ -53,7 +56,17 @@ public class RSEFileSystemContributor extends FileSystemContributor {
|
||||||
*/
|
*/
|
||||||
if (dlg.open() == dlg.OK)
|
if (dlg.open() == dlg.OK)
|
||||||
{
|
{
|
||||||
IRemoteFile file = (IRemoteFile)dlg.getSelectedObject();
|
Object selected = dlg.getSelectedObject();
|
||||||
|
if (selected instanceof ISystemFilterReference)
|
||||||
|
{
|
||||||
|
ISubSystem targetSubSystem = ((ISystemFilterReference)selected).getSubSystem();
|
||||||
|
ISubSystemConfiguration factory = targetSubSystem.getSubSystemConfiguration();
|
||||||
|
if (factory.supportsDropInFilters())
|
||||||
|
{
|
||||||
|
selected = targetSubSystem.getTargetForFilter((ISystemFilterReference)selected);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
IRemoteFile file = (IRemoteFile)selected;
|
||||||
String path = file.getAbsolutePath();
|
String path = file.getAbsolutePath();
|
||||||
IHost host = dlg.getSelectedConnection();
|
IHost host = dlg.getSelectedConnection();
|
||||||
String hostName = host.getHostName();
|
String hostName = host.getHostName();
|
||||||
|
|
Loading…
Add table
Reference in a new issue