com.mindoo.remote.api.org.eclipse.swt.program
Interface IRemoteProgramController


public interface IRemoteProgramController

This interface wraps the static part of org.eclipse.swt.program.Program (Online documentation)

Original documentation:
Instances of this class represent programs and their associated file extensions in the operating system.


Method Summary
 IRemoteProgram findProgram(java.lang.String extension)
          Finds the program that is associated with an extension.
 java.lang.String[] getExtensions()
          Answer all program extensions in the operating system.
 IRemoteProgram[] getPrograms()
          Answers all available programs in the operating system.
 boolean launch(java.lang.String fileName)
          Launches the operating system executable associated with the file or URL (http:// or https://).
 

Method Detail

findProgram

IRemoteProgram findProgram(java.lang.String extension)
                           throws RemoteEclipseAPIException
Finds the program that is associated with an extension. The extension may or may not begin with a '.'. Note that a Display must already exist to guarantee that this method returns an appropriate result.

Parameters:
extension - the program extension
Returns:
the program or null
Throws:
RemoteEclipseAPIException

getExtensions

java.lang.String[] getExtensions()
                                 throws RemoteEclipseAPIException
Answer all program extensions in the operating system. Note that a Display must already exist to guarantee that this method returns an appropriate result.

Returns:
an array of extensions
Throws:
RemoteEclipseAPIException

getPrograms

IRemoteProgram[] getPrograms()
                             throws RemoteEclipseAPIException
Answers all available programs in the operating system.

Returns:
an array of programs
Throws:
RemoteEclipseAPIException

launch

boolean launch(java.lang.String fileName)
               throws RemoteEclipseAPIException
Launches the operating system executable associated with the file or URL (http:// or https://). If the file is an executable then the executable is launched. Note that a Display must already exist to guarantee that this method returns an appropriate result.

Parameters:
fileName - the file or program name or URL (http:// or https://)
Returns:
true if the file is launched, otherwise false
Throws:
RemoteEclipseAPIException