Interface IOOo
public interface IOOo
Interface for a LibreOffice configuration instance. This can even be implemented as an URE instance.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancreateUnoCommand(String implementationName, String libLocation, String[] registriesPaths, String[] args) Returns a command to execute aunocomponent.String[]Returns the path to any folder containing binaries in the LibreOffice installation.String[]Returns the path to the LibreOffice classes directory.getHome()Returns the path to the LibreOffice home directory.String[]Returns the path to the LibreOffice shared libraries.getName()Returns the LibreOffice name.String[]String[]voidrunOffice(IUnoidlProject prj, org.eclipse.debug.core.ILaunch launch, org.eclipse.core.runtime.IPath userInstallation, IExtraOptionsProvider extraOptionsProvider, org.eclipse.core.runtime.IProgressMonitor monitor) voidrunUno(IUnoidlProject prj, String main, String args, org.eclipse.debug.core.ILaunch launch, org.eclipse.core.runtime.IProgressMonitor monitor) Run theunoexecutable with the given Main implementation, the arguments and the launcher.voidSet the home directory.voidupdatePackage(File packageFile, org.eclipse.core.runtime.IPath userInstallation) Update a package in the LibreOffice instance if it can manages packages.
-
Method Details
-
setHome
Set the home directory.- Parameters:
home- the absolute path to the home directory- Throws:
InvalidConfigException- is thrown if the path doesn't match the implementation requirement for a LibreOffice instance. The error code will beInvalidConfigException.INVALID_OOO_HOME
-
getHome
String getHome()Returns the path to the LibreOffice home directory. This string could be passed to the Path constructor to get the folder object.- Returns:
- path to the LibreOffice home directory.
-
getName
String getName()Returns the LibreOffice name. It should be a unique identifier- Returns:
- LibreOffice name
-
getClassesPath
String[] getClassesPath()Returns the path to the LibreOffice classes directory. These strings could be passed to the Path constructor to get the folder object.
This method should be used for future compatibility with URE applications
- Returns:
- path to the LibreOffice classes directory
-
getLibsPath
String[] getLibsPath()Returns the path to the LibreOffice shared libraries. This string could be passed to the Path constructor to get the folder object.
- Returns:
- path to the LibreOffice libraries directory
-
getBinPath
String[] getBinPath()Returns the path to any folder containing binaries in the LibreOffice installation. This string could be passed to the Path constructor to get the folder object.
- Returns:
- paths to the LibreOffice binary directories
-
getTypesPath
String[] getTypesPath()- Returns:
- the path to the
types.rdbfile of the LibreOffice or URE instance.
-
getServicesPath
String[] getServicesPath()- Returns:
- the path to the
services.rdbfile of the LibreOffice or URE instance.
-
getUnorcPath
String getUnorcPath()- Returns:
- the path to the UNO bootstrap properties file.
-
getUnoPath
String getUnoPath()- Returns:
- the path to the UNO executable file
-
getJavaldxPath
String getJavaldxPath()- Returns:
- the path to the
javaldxexecutable
-
createUnoCommand
String createUnoCommand(String implementationName, String libLocation, String[] registriesPaths, String[] args) Returns a command to execute aunocomponent.- Parameters:
implementationName- the name of the component implementation to runlibLocation- the name of the library containing the implementationregistriesPaths- the path to the additional registriesargs- the argument for the component launch- Returns:
- the command to execute the
unobinary
-
runUno
void runUno(IUnoidlProject prj, String main, String args, org.eclipse.debug.core.ILaunch launch, org.eclipse.core.runtime.IProgressMonitor monitor) Run theunoexecutable with the given Main implementation, the arguments and the launcher.- Parameters:
prj- the project to runmain- the main implementationargs- the argument to pass to the main implementationlaunch- the launchermonitor- a monitor to follow the progress
-
runOffice
void runOffice(IUnoidlProject prj, org.eclipse.debug.core.ILaunch launch, org.eclipse.core.runtime.IPath userInstallation, IExtraOptionsProvider extraOptionsProvider, org.eclipse.core.runtime.IProgressMonitor monitor) - Parameters:
prj- the project to runlaunch- the launcher to which we'll add our processesuserInstallation- the userInstallation folder to use. If null we'll go with the default system one.extraOptionsProvider- provider for extra env variables to be set before launching.monitor- a monitor to follow the progress
-
canManagePackages
boolean canManagePackages()- Returns:
trueif the LibreOffice instance has a package manager.
-
updatePackage
Update a package in the LibreOffice instance if it can manages packages.- Parameters:
packageFile- the package to add or updateuserInstallation- path to the user profile folder.
-