public interface ISdk
Interface defining a LibreOffice SDK.
  • Method Details

    • initialize

      void initialize(String home, String name) throws InvalidConfigException
      Set the new SDK Home after having checked for the existence of the idl and settings directory. If name is empty, it will be fetched from the dk.mk file
      Parameters:
      home - path to the new sdk home
      name - name of the new sdk
      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

      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
    • getName

      String getName()
      Returns the SDK version number.
      Returns:
      the SDK version number
    • getCommand

      String getCommand(String command)
      Returns the SDK command adapted to the OS.
      Parameters:
      command - the Linux SDK tool command
      Returns:
      the SDK command adapted to the OS
    • useIdlWrite

      boolean useIdlWrite()
      Returns:
      if the SDK have the unoidl-write replacement tool for idlc and regmerge.
    • 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

      Process runTool(IUnoidlProject project, String shellCommand, org.eclipse.core.runtime.IProgressMonitor monitor)
      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:
      project - the UNO project on which to run the tool
      shellCommand - the shell command to execute the tool
      monitor - a process monitor to watch the tool launching
      Returns:
      the process executing the tool
    • runToolWithEnv

      Process runToolWithEnv(IUnoidlProject project, String shellCommand, String[] env, org.eclipse.core.runtime.IProgressMonitor monitor)
      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:
      project - the folder from which to run the command
      shellCommand - the shell command to execute the tool
      env - tool environment variable
      monitor - a process monitor to watch the tool launching
      Returns:
      the process executing the tool