Interface IUnoidlProject


  • public interface IUnoidlProject
    Interface for a UNO project.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DESCRIPTION_FILENAME  
      static java.lang.String IDL_FOLDER
      org.libreoffice.ide.eclipse.idlfolder is a persistent folder property that determines whether the folder can contain unoidl files or not.
      static java.lang.String XCS_EXTENSION  
      static java.lang.String XCU_EXTENSION  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void dispose()
      Cleans up the project before destroying it.
      org.eclipse.core.resources.IFolder[] getBinFolders()  
      org.eclipse.core.runtime.IPath getBuildPath()  
      java.lang.String getCompanyPrefix()
      Returns the company prefix used in the idl modules and implementation trees.
      org.eclipse.core.resources.IFolder getDistFolder()  
      org.eclipse.core.runtime.IPath getDistPath()  
      org.eclipse.core.resources.IFile getFile​(java.lang.String pPath)
      Returns the file handle for the given project relative path.
      org.eclipse.core.resources.IFile getFile​(org.eclipse.core.runtime.IPath pPath)
      Returns the file handle for the given project relative path.
      org.eclipse.core.resources.IFolder getFolder​(java.lang.String pPath)
      Returns the folder handle for the given project relative path.
      org.eclipse.core.resources.IFolder getFolder​(org.eclipse.core.runtime.IPath pPath)
      Returns the folder handle for the given project relative path.
      org.eclipse.core.runtime.IPath getIdlPath()  
      org.eclipse.core.runtime.IPath getImplementationPath()  
      AbstractLanguage getLanguage()  
      java.lang.String getName()  
      org.eclipse.core.resources.IFolder getOfficeUserProfileFolder()  
      org.eclipse.core.runtime.IPath getOfficeUserProfilePath()  
      IOOo getOOo()  
      java.lang.String getOutputExtension()
      Returns the package or namespace name used for the implementation.
      org.eclipse.core.runtime.IPath getProjectPath()  
      java.lang.String getProperty​(java.lang.String pName)
      Get a project's property.
      java.lang.String getRootModule()
      Gets the root module of the project.
      org.eclipse.core.runtime.IPath getRootModulePath()
      Gets the root module path of the project.
      ISdk getSdk()  
      org.eclipse.core.runtime.IPath getServicesPath()  
      org.eclipse.core.runtime.IPath getSourcePath()  
      org.eclipse.core.runtime.IPath getTypesPath()  
      org.eclipse.core.runtime.IPath getUrdPath()  
      void saveAllProperties()
      Saves the UNO project configuration in a hidden file.
      void setCompanyPrefix​(java.lang.String pPrefix)
      Sets the company prefix.
      void setIdlDir​(java.lang.String pIdlDir)
      Defines the directory containing the IDL files.
      void setLanguage​(AbstractLanguage pLanguage)
      Set the language of the project implementation.
      void setOOo​(IOOo pOOo)
      Sets the selected LibreOffice.
      void setOutputExtension​(java.lang.String pOutputExt)
      Sets the output extension.
      void setProperty​(java.lang.String pName, java.lang.String pValue)
      Set a property to the project.
      void setSdk​(ISdk pSdk)
      Sets the selected SDK.
      void setSourcesDir​(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.idlfolder is a persistent folder property that determines whether the folder can contain unoidl files or not.
        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 name
        pValue - 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 null if 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 be foo::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 be idl/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 be org.libreoffice for 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.libreoffice and the output extension is comp, 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.rdb file. This path is relative to the project folder.
      • getServicesPath

        org.eclipse.core.runtime.IPath getServicesPath()
        Returns:
        the path to the project services.rdb file. 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 be null.
        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 be null.
        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 be null.
        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 be null.
        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.