org.openoffice.ide.eclipse.core.model.language
Interface IProjectHandler


public interface IProjectHandler

This interface provides a set of methods to perform language specific tasks on uno-idl projects.

Author:
cedricbosdo

Method Summary
 void addLanguageDependencies(IUnoidlProject pUnoproject, org.eclipse.core.runtime.IProgressMonitor pMonitor)
          Adds the language specific dependencies for the project.
 void addOOoDependencies(IOOo pOoo, org.eclipse.core.resources.IProject pProject)
          Adds the language specific OpenOffice.org dependencies to the project.
 void addProjectNature(org.eclipse.core.resources.IProject pProject)
          Add a language specific language nature.
 void configureProject(UnoFactoryData pData)
          Adds the language specific things of the UNO project.
 void createRegistrationSystem(IUnoidlProject pPrj)
          Adds the necessary code for the registration of several services implementation.
 org.eclipse.core.runtime.IPath getImplementationFile(java.lang.String pImplementationName)
          Computes the implementation file path from the implementation name.
 java.lang.String getImplementationName(IUnoidlProject pPrj, java.lang.String pService)
          Extracts the Implementation name of the class that will be generated by the uno-skeletonmaker.
 java.lang.String getLibraryPath(IUnoidlProject pPrj)
           
 java.lang.String getSkeletonMakerLanguage(UnoFactoryData pData)
          Extracts the language option name to give to the uno-skeletonmaker: --java5 for Java 1.5 for example.
 void removeOOoDependencies(IOOo pOoo, org.eclipse.core.resources.IProject pProject)
          Removes the language specific OpenOffice.org dependencies from the project.
 

Method Detail

configureProject

void configureProject(UnoFactoryData pData)
                      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
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

addLanguageDependencies

void addLanguageDependencies(IUnoidlProject pUnoproject,
                             org.eclipse.core.runtime.IProgressMonitor pMonitor)
                             throws org.eclipse.core.runtime.CoreException
Adds the language specific dependencies for the project. This is mostly about library path settings. This method although has to add the build path to the libraries and the implementation as the sources path.

Parameters:
pUnoproject - the UNO project on which to add the dependencies
pMonitor - a progress monitor
Throws:
org.eclipse.core.runtime.CoreException - if there is any problem during the operation

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.

createRegistrationSystem

void createRegistrationSystem(IUnoidlProject pPrj)
Adds the necessary code for the registration of several services implementation.

Parameters:
pPrj - the project where to add the registration system