Interface IProjectHandler


  • public interface IProjectHandler
    This interface provides a set of methods to perform language specific tasks on uno-idl projects.
    • Method Detail

      • configureProject

        void configureProject​(UnoFactoryData pData,
                              org.eclipse.core.runtime.IProgressMonitor pMonitor)
                       throws java.lang.Exception
        Adds the language specific things of the UNO project. The project handle has to be contained in the provided data.
        Parameters:
        pData - the data describing the project to configure
        pMonitor - the monitor reporting the progress
        Throws:
        java.lang.Exception - if anything wrong happens.
      • addProjectNature

        void addProjectNature​(org.eclipse.core.resources.IProject pProject)
        Add a language specific language nature. This one has to configure the language-specific properties of the project and set the builders.
        Parameters:
        pProject - the project on which to add the nature. Must not be null, otherwise the nature won't be added
      • addOOoDependencies

        void addOOoDependencies​(IOOo pOoo,
                                org.eclipse.core.resources.IProject pProject)
        Adds the language specific OpenOffice.org dependencies to the project.
        Parameters:
        pOoo - the OpenOffice.org instance
        pProject - the project on which to add the dependencies
      • removeOOoDependencies

        void removeOOoDependencies​(IOOo pOoo,
                                   org.eclipse.core.resources.IProject pProject)
        Removes the language specific OpenOffice.org dependencies from the project.
        Parameters:
        pOoo - the OpenOffice.org instance
        pProject - the project from which to remove the dependencies
      • getSkeletonMakerLanguage

        java.lang.String getSkeletonMakerLanguage​(UnoFactoryData pData)
                                           throws java.lang.Exception
        Extracts the language option name to give to the uno-skeletonmaker: --java5 for Java 1.5 for example. To know the correct language name, please refer to the uno-skeletonmaker help.
        Parameters:
        pData - the UNO factory data from where to extract the value
        Returns:
        the option or null if the uno-skeletonmaker utility doesn't support the language.
        Throws:
        java.lang.Exception - is thrown if anything wrong happens
      • getImplementationName

        java.lang.String getImplementationName​(IUnoidlProject pPrj,
                                               java.lang.String pService)
                                        throws java.lang.Exception
        Extracts the Implementation name of the class that will be generated by the uno-skeletonmaker. It should never return a null value.
        Parameters:
        pPrj - the project to work on
        pService - the service for which to get the implementation
        Returns:
        the implementation name
        Throws:
        java.lang.Exception - if anything wrong happens.
      • getImplementationFile

        org.eclipse.core.runtime.IPath getImplementationFile​(java.lang.String pImplementationName)
        Computes the implementation file path from the implementation name.
        Parameters:
        pImplementationName - the implementation name returned by the project handler.
        Returns:
        a source directory relative path pointing to the file that will be generated by uno-skeletonmaker.
      • getLibraryPath

        java.lang.String getLibraryPath​(IUnoidlProject pPrj)
        Parameters:
        pPrj - the UNO project from which to get the library path
        Returns:
        the library path, ready to be provided to the File class constructor.
      • getBinFolders

        org.eclipse.core.resources.IFolder[] getBinFolders​(IUnoidlProject pUnoidlProject)
        Parameters:
        pUnoidlProject - the UNO project from which to get the binary folders
        Returns:
        the binary folders