Interface IProjectHandler
-
public interface IProjectHandlerThis interface provides a set of methods to perform language specific tasks on uno-idl projects.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddOOoDependencies(IOOo pOoo, org.eclipse.core.resources.IProject pProject)Adds the language specific OpenOffice.org dependencies to the project.voidaddProjectNature(org.eclipse.core.resources.IProject pProject)Add a language specific language nature.voidconfigureProject(UnoFactoryData pData, org.eclipse.core.runtime.IProgressMonitor pMonitor)Adds the language specific things of the UNO project.org.eclipse.core.resources.IFolder[]getBinFolders(IUnoidlProject pUnoidlProject)org.eclipse.core.runtime.IPathgetImplementationFile(java.lang.String pImplementationName)Computes the implementation file path from the implementation name.java.lang.StringgetImplementationName(IUnoidlProject pPrj, java.lang.String pService)Extracts the Implementation name of the class that will be generated by theuno-skeletonmaker.java.lang.StringgetLibraryPath(IUnoidlProject pPrj)java.lang.StringgetSkeletonMakerLanguage(UnoFactoryData pData)Extracts the language option name to give to theuno-skeletonmaker:--java5for Java 1.5 for example.voidremoveOOoDependencies(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, 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 configurepMonitor- 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 instancepProject- 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 instancepProject- 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 theuno-skeletonmaker:--java5for Java 1.5 for example. To know the correct language name, please refer to theuno-skeletonmakerhelp.- Parameters:
pData- the UNO factory data from where to extract the value- Returns:
- the option or
nullif theuno-skeletonmakerutility 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 theuno-skeletonmaker. It should never return anullvalue.- Parameters:
pPrj- the project to work onpService- 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
Fileclass 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
-
-