org.openoffice.ide.eclipse.core.model.config
Interface ISdk


public interface ISdk

Interface defining an OpenOffice.org SDK.

Author:
cedricbosdo

Method Summary
 org.eclipse.core.runtime.IPath getBinPath()
           
 java.lang.String getHome()
          Returns the SDK home directory.
 java.lang.String getId()
          Returns the SDK build id without the parenthesized string.
 org.eclipse.core.runtime.IPath getIncludePath()
           
 org.eclipse.core.runtime.IPath getLibPath()
           
 java.lang.Process runTool(IUnoidlProject pProject, java.lang.String pShellCommand, org.eclipse.core.runtime.IProgressMonitor pMonitor)
          Create a process for the given shell command.
 java.lang.Process runToolWithEnv(org.eclipse.core.resources.IProject pProject, IOOo pOOo, java.lang.String pShellCommand, java.lang.String[] pEnv, org.eclipse.core.runtime.IProgressMonitor pMonitor)
          Create a process for the given shell command.
 void setHome(java.lang.String pHome)
          Set the new SDK Home after having checked for the existence of the idl and settings directory.
 

Method Detail

setHome

void setHome(java.lang.String pHome)
             throws InvalidConfigException
Set the new SDK Home after having checked for the existence of the idl and settings directory. Fetches the sdk name and buildid from the dk.mk file

Parameters:
pHome - path to the new sdk home
Throws:
InvalidConfigException -

This exception is thrown when the following errors are encountered with the InvalidConfigException.INVALID_SDK_HOMEerror code:

  • the sdk path does not point to a valid directory
  • the $(SDK_HOME)/idl directory doesnt exist
  • the $(SDK_HOME)/settings directory doesnt exist
  • the sdk name and buildid cannot be fetched
  • an unexpected exception has been raised

getHome

java.lang.String getHome()
Returns the SDK home directory. This string could be passed to the Path constructor to get the folder object.

Returns:
SDK home directory

getId

java.lang.String getId()
Returns the SDK build id without the parenthesized string. For example, if the full build id is 680m92(Build:8896), the result will be: 680m92. If the builid is null, the return will be

Returns:
the shortened build id

getBinPath

org.eclipse.core.runtime.IPath getBinPath()
Returns:
the path to the directory containing the binaries in the SDK.

getIncludePath

org.eclipse.core.runtime.IPath getIncludePath()
Returns:
the path to the includes in the SDK.

getLibPath

org.eclipse.core.runtime.IPath getLibPath()
Returns:
the path to the libraries in the SDK.

runTool

java.lang.Process runTool(IUnoidlProject pProject,
                          java.lang.String pShellCommand,
                          org.eclipse.core.runtime.IProgressMonitor pMonitor)
Create a process for the given shell command. This process will be created with the project parameters such as it's SDK and location path

Parameters:
pProject - the UNO project on which to run the tool
pShellCommand - the shell command to execute the tool
pMonitor - a process monitor to watch the tool launching
Returns:
the process executing the tool

runToolWithEnv

java.lang.Process runToolWithEnv(org.eclipse.core.resources.IProject pProject,
                                 IOOo pOOo,
                                 java.lang.String pShellCommand,
                                 java.lang.String[] pEnv,
                                 org.eclipse.core.runtime.IProgressMonitor pMonitor)
Create a process for the given shell command. This process will be created with the project parameters such as it's SDK and location path

Parameters:
pProject - the folder from which to run the command
pOOo - the ooo instance to run the tool
pShellCommand - the shell command to execute the tool
pEnv - tool environment variable
pMonitor - a process monitor to watch the tool launching
Returns:
the process executing the tool