Package org.eclipse.remote.ui
Class RemoteUIFileService
- java.lang.Object
-
- org.eclipse.remote.ui.RemoteUIFileService
-
- All Implemented Interfaces:
IRemoteConnectionType.Service,IRemoteUIFileService
public class RemoteUIFileService extends Object implements IRemoteUIFileService
- Since:
- 2.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classRemoteUIFileService.Factory
-
Constructor Summary
Constructors Constructor Description RemoteUIFileService(IRemoteConnectionType connectionType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbrowseDirectory(org.eclipse.swt.widgets.Shell shell, String message, String filterPath, int flags)Browse for a remote directory.StringbrowseFile(org.eclipse.swt.widgets.Shell shell, String message, String filterPath, int flags)Browse for a remote file.List<String>browseFiles(org.eclipse.swt.widgets.Shell shell, String message, String filterPath, int flags)Browse for a set of remote files.IRemoteConnectiongetConnection()Get the last connection that was selected in the browser.IRemoteConnectionTypegetConnectionType()voidsetConnection(IRemoteConnection connection)Set the connection to use for file browsing.voidshowConnections(boolean enable)Show a list of available connections if possible.
-
-
-
Constructor Detail
-
RemoteUIFileService
public RemoteUIFileService(IRemoteConnectionType connectionType)
-
-
Method Detail
-
getConnectionType
public IRemoteConnectionType getConnectionType()
- Specified by:
getConnectionTypein interfaceIRemoteConnectionType.Service
-
browseDirectory
public String browseDirectory(org.eclipse.swt.widgets.Shell shell, String message, String filterPath, int flags)
Description copied from interface:IRemoteUIFileServiceBrowse for a remote directory. The return value is the path of the directory on the remote system. Equivalent toDirectoryDialog.- Specified by:
browseDirectoryin interfaceIRemoteUIFileService- Parameters:
shell- workbench shellmessage- message to display in dialogfilterPath- initial path to use when displaying filesflags- option settings for dialog (not currently used) valid values are NONE (@see IRemoteUIConstants)- Returns:
- the path to the directory relative to the remote system or null if the browser was cancelled
-
browseFile
public String browseFile(org.eclipse.swt.widgets.Shell shell, String message, String filterPath, int flags)
Description copied from interface:IRemoteUIFileServiceBrowse for a remote file. The return value is the path of the file on the remote system. Equivalent toFileDialog.- Specified by:
browseFilein interfaceIRemoteUIFileService- Parameters:
shell- workbench shellmessage- message to display in dialogfilterPath- initial path to use when displaying filesflags- options settings for dialog valid values are NONE, SAVE, or OPEN (@see IRemoteUIConstants)- Returns:
- the path to the file relative to the remote system or null if the browser was cancelled
-
browseFiles
public List<String> browseFiles(org.eclipse.swt.widgets.Shell shell, String message, String filterPath, int flags)
Description copied from interface:IRemoteUIFileServiceBrowse for a set of remote files. The return value is a list of paths of the files on the remote system. Equivalent toFileDialog.- Specified by:
browseFilesin interfaceIRemoteUIFileService- Parameters:
shell- workbench shellmessage- message to display in dialogfilterPath- initial path to use when displaying filesflags- options settings for dialog (@see IRemoteUIConstants) valid values are NONE, SAVE, or OPEN (@see IRemoteUIConstants)- Returns:
- list of paths to the files relative to the remote system or null if the browser was cancelled
-
getConnection
public IRemoteConnection getConnection()
Description copied from interface:IRemoteUIFileServiceGet the last connection that was selected in the browser.- Specified by:
getConnectionin interfaceIRemoteUIFileService- Returns:
- selected connection
-
setConnection
public void setConnection(IRemoteConnection connection)
Description copied from interface:IRemoteUIFileServiceSet the connection to use for file browsing. The connection must support the IRemoteFileService service or it will be ignored.- Specified by:
setConnectionin interfaceIRemoteUIFileService- Parameters:
connection- connection to use for file browsing
-
showConnections
public void showConnections(boolean enable)
Description copied from interface:IRemoteUIFileServiceShow a list of available connections if possible.- Specified by:
showConnectionsin interfaceIRemoteUIFileService- Parameters:
enable- enable connection list
-
-