Interface IUnoidlProject
-
public interface IUnoidlProjectInterface for a UNO project.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDESCRIPTION_FILENAMEstatic java.lang.StringIDL_FOLDERorg.libreoffice.ide.eclipse.idlfolderis a persistent folder property that determines whether the folder can contain unoidl files or not.static java.lang.StringXCS_EXTENSIONstatic java.lang.StringXCU_EXTENSION
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddispose()Cleans up the project before destroying it.org.eclipse.core.resources.IFolder[]getBinFolders()org.eclipse.core.runtime.IPathgetBuildPath()java.lang.StringgetCompanyPrefix()Returns the company prefix used in the idl modules and implementation trees.org.eclipse.core.resources.IFoldergetDistFolder()org.eclipse.core.runtime.IPathgetDistPath()org.eclipse.core.resources.IFilegetFile(java.lang.String pPath)Returns the file handle for the given project relative path.org.eclipse.core.resources.IFilegetFile(org.eclipse.core.runtime.IPath pPath)Returns the file handle for the given project relative path.org.eclipse.core.resources.IFoldergetFolder(java.lang.String pPath)Returns the folder handle for the given project relative path.org.eclipse.core.resources.IFoldergetFolder(org.eclipse.core.runtime.IPath pPath)Returns the folder handle for the given project relative path.org.eclipse.core.runtime.IPathgetIdlPath()org.eclipse.core.runtime.IPathgetImplementationPath()AbstractLanguagegetLanguage()java.lang.StringgetName()org.eclipse.core.resources.IFoldergetOfficeUserProfileFolder()org.eclipse.core.runtime.IPathgetOfficeUserProfilePath()IOOogetOOo()java.lang.StringgetOutputExtension()Returns the package or namespace name used for the implementation.org.eclipse.core.runtime.IPathgetProjectPath()java.lang.StringgetProperty(java.lang.String pName)Get a project's property.java.lang.StringgetRootModule()Gets the root module of the project.org.eclipse.core.runtime.IPathgetRootModulePath()Gets the root module path of the project.ISdkgetSdk()org.eclipse.core.runtime.IPathgetServicesPath()org.eclipse.core.runtime.IPathgetSourcePath()org.eclipse.core.runtime.IPathgetTypesPath()org.eclipse.core.runtime.IPathgetUrdPath()voidsaveAllProperties()Saves the UNO project configuration in a hidden file.voidsetCompanyPrefix(java.lang.String pPrefix)Sets the company prefix.voidsetIdlDir(java.lang.String pIdlDir)Defines the directory containing the IDL files.voidsetLanguage(AbstractLanguage pLanguage)Set the language of the project implementation.voidsetOOo(IOOo pOOo)Sets the selected LibreOffice.voidsetOutputExtension(java.lang.String pOutputExt)Sets the output extension.voidsetProperty(java.lang.String pName, java.lang.String pValue)Set a property to the project.voidsetSdk(ISdk pSdk)Sets the selected SDK.voidsetSourcesDir(java.lang.String pSourcesDir)Defines the directory containing the sources.
-
-
-
Field Detail
-
DESCRIPTION_FILENAME
static final java.lang.String DESCRIPTION_FILENAME
- See Also:
- Constant Field Values
-
IDL_FOLDER
static final java.lang.String IDL_FOLDER
org.libreoffice.ide.eclipse.idlfolderis a persistent folder property that determines whether the folder can contain unoidl files or not.- See Also:
- Constant Field Values
-
XCS_EXTENSION
static final java.lang.String XCS_EXTENSION
- See Also:
- Constant Field Values
-
XCU_EXTENSION
static final java.lang.String XCU_EXTENSION
- See Also:
- Constant Field Values
-
-
Method Detail
-
dispose
void dispose()
Cleans up the project before destroying it.
-
getLanguage
AbstractLanguage getLanguage()
- Returns:
- the project implementation language.
-
getName
java.lang.String getName()
- Returns:
- the project name.
-
getOOo
IOOo getOOo()
- Returns:
- the selected LibreOffice
-
getSdk
ISdk getSdk()
- Returns:
- the selected SDK
-
setLanguage
void setLanguage(AbstractLanguage pLanguage)
Set the language of the project implementation. This method can be called only once on a project to avoid project nature problems.- Parameters:
pLanguage- the new language
-
setOOo
void setOOo(IOOo pOOo)
Sets the selected LibreOffice.- Parameters:
pOOo- the selected LibreOffice
-
setSdk
void setSdk(ISdk pSdk)
Sets the selected SDK.- Parameters:
pSdk- the selected SDK
-
setProperty
void setProperty(java.lang.String pName, java.lang.String pValue)Set a property to the project.This can be used by plugins to set their own properties on the project.
- Parameters:
pName- the property namepValue- the property value
-
getProperty
java.lang.String getProperty(java.lang.String pName)
Get a project's property.This can be used by plugins to get their own properties from the project.
- Parameters:
pName- the property name- Returns:
- the value of the property or
nullif it doesn't exists
-
getRootModule
java.lang.String getRootModule()
Gets the root module of the project.It corresponds to the prefix transformed as an idl scoped name. For example, if the company prefix is set to
foo.bar, the root module will befoo::bar.- Returns:
- the root module of the project
-
getRootModulePath
org.eclipse.core.runtime.IPath getRootModulePath()
Gets the root module path of the project.It corresponds to the path to the root module definition. For example, if the company prefix is set to
foo.bar, the root module path will beidl/foo/bar.- Returns:
- the root module path of the project
-
setCompanyPrefix
void setCompanyPrefix(java.lang.String pPrefix)
Sets the company prefix.- Parameters:
pPrefix- new company prefix
-
getCompanyPrefix
java.lang.String getCompanyPrefix()
Returns the company prefix used in the idl modules and implementation trees. For example, it could beorg.libreofficefor any code created by the LibreOffice community.- Returns:
- the company prefix
-
setOutputExtension
void setOutputExtension(java.lang.String pOutputExt)
Sets the output extension.- Parameters:
pOutputExt- new output extension to set
-
getOutputExtension
java.lang.String getOutputExtension()
Returns the package or namespace name used for the implementation.If the company prefix is
org.libreofficeand the output extension iscomp, then the implementation namespace will be:org.libreoffice.comp.- Returns:
- the implementation namespace
-
getBuildPath
org.eclipse.core.runtime.IPath getBuildPath()
- Returns:
- the path to the project directory containing the temporary build files. This path is relative to the project folder.
-
getIdlPath
org.eclipse.core.runtime.IPath getIdlPath()
- Returns:
- the path to the project directory containing the idl files. This path is relative to the project folder.
-
getImplementationPath
org.eclipse.core.runtime.IPath getImplementationPath()
- Returns:
- the path to the project implementation directory. This path is relative to the project folder.
-
getProjectPath
org.eclipse.core.runtime.IPath getProjectPath()
- Returns:
- the full path to the project
-
getSourcePath
org.eclipse.core.runtime.IPath getSourcePath()
- Returns:
- the path to the sources directory: that is "source". This path is relative to the project folder.
-
getTypesPath
org.eclipse.core.runtime.IPath getTypesPath()
- Returns:
- the path to the project
types.rdbfile. This path is relative to the project folder.
-
getServicesPath
org.eclipse.core.runtime.IPath getServicesPath()
- Returns:
- the path to the project
services.rdbfile. This path is relative to the project folder.
-
getUrdPath
org.eclipse.core.runtime.IPath getUrdPath()
- Returns:
- the path to the project directory containing the generated urd files. This path is relative to the project folder.
-
getDistPath
org.eclipse.core.runtime.IPath getDistPath()
- Returns:
- the path to the project's folder containing the distribution .oxt file.
-
getDistFolder
org.eclipse.core.resources.IFolder getDistFolder() throws org.eclipse.core.runtime.CoreException- Returns:
- the folder folder containing the distribution .oxt file. If the folder does not exist then it is created.
- Throws:
org.eclipse.core.runtime.CoreException- if we were unable to create the folder.
-
getOfficeUserProfilePath
org.eclipse.core.runtime.IPath getOfficeUserProfilePath()
- Returns:
- the path to the project's folder used to store the user profile when running/debugging LibreOffice in a clean environment. This way we do not mangle with the system wide installed, LibreOffice settings.
-
getOfficeUserProfileFolder
org.eclipse.core.resources.IFolder getOfficeUserProfileFolder() throws org.eclipse.core.runtime.CoreException- Returns:
- the folder used to store the user profile when running/debugging LibreOffice in a clean environment. This way we do not mangle with the system wide installed, LibreOffice settings. If the folder does not exist then it is created.
- Throws:
org.eclipse.core.runtime.CoreException- if we were unable to create the folder.
-
getFile
org.eclipse.core.resources.IFile getFile(org.eclipse.core.runtime.IPath pPath)
Returns the file handle for the given project relative path. If the file doesn't exists, the handle will benull.- Parameters:
pPath- the path to the folder to get- Returns:
- the folder handle or
null - See Also:
IProject.getFile(java.lang.String)
-
getFile
org.eclipse.core.resources.IFile getFile(java.lang.String pPath)
Returns the file handle for the given project relative path. If the file doesn't exists, the handle will benull.- Parameters:
pPath- the path to the folder to get- Returns:
- the folder handle or
null - See Also:
IProject.getFile(java.lang.String)
-
getFolder
org.eclipse.core.resources.IFolder getFolder(org.eclipse.core.runtime.IPath pPath)
Returns the folder handle for the given project relative path. If the folder doesn't exists, the handle will benull.- Parameters:
pPath- the path to the folder to get- Returns:
- the folder handle or
null - See Also:
IProject.getFolder(java.lang.String)
-
getFolder
org.eclipse.core.resources.IFolder getFolder(java.lang.String pPath)
Returns the folder handle for the given project relative path. If the folder doesn't exists, the handle will benull.- Parameters:
pPath- the path to the folder to get- Returns:
- the folder handle or
null - See Also:
IProject.getFolder(java.lang.String)
-
setIdlDir
void setIdlDir(java.lang.String pIdlDir)
Defines the directory containing the IDL files.- Parameters:
pIdlDir- the IDL directory
-
setSourcesDir
void setSourcesDir(java.lang.String pSourcesDir)
Defines the directory containing the sources.- Parameters:
pSourcesDir- the sources directory
-
saveAllProperties
void saveAllProperties()
Saves the UNO project configuration in a hidden file.
-
getBinFolders
org.eclipse.core.resources.IFolder[] getBinFolders()
- Returns:
- the language dependent binaries folders.
-
-