Package org.apache.uima.pear.nature
Class ProjectCustomizer
java.lang.Object
org.apache.uima.pear.nature.ProjectCustomizer
A util class to handle customization of IProject with the UIMA nature
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
addUIMANature
(org.eclipse.core.resources.IProject project) Adds the UIMA nature to a projectstatic org.eclipse.core.resources.IFile
createFile
(org.eclipse.core.resources.IContainer container, String fileName, InputStream is, boolean overrideContentIfExist) Creates a file in a project with an InputStream for the contentstatic org.eclipse.core.resources.IFile
createFile
(org.eclipse.core.resources.IProject project, String fileName, String s, boolean overrideContentIfExist) Creates a file in a project with a string as contentstatic org.eclipse.core.resources.IFolder
createFolder
(org.eclipse.core.resources.IContainer container, String folderName) Creates a folder, if it does not exist, in a given containerstatic void
createPearFolderStructure
(org.eclipse.core.resources.IContainer container) Creates the PEAR folder structurestatic void
customizeProject
(org.eclipse.core.resources.IContainer container, InstallationDescriptor insd) Customizes an IProject with the UIMA nature using an InstallationDescriptor instancestatic void
customizeProject
(org.eclipse.core.resources.IProject project) Customizes an IProject with the UIMA nature using an empty installation descriptor.
-
Field Details
-
UIMA_NATURE_ID
- See Also:
-
-
Constructor Details
-
ProjectCustomizer
public ProjectCustomizer()
-
-
Method Details
-
customizeProject
public static void customizeProject(org.eclipse.core.resources.IContainer container, InstallationDescriptor insd) throws PearException Customizes an IProject with the UIMA nature using an InstallationDescriptor instance- Parameters:
container
- An IProjectinsd
- An InstallationDescriptor- Throws:
PearException
- If a problem occurs
-
customizeProject
public static void customizeProject(org.eclipse.core.resources.IProject project) throws PearException Customizes an IProject with the UIMA nature using an empty installation descriptor.- Parameters:
project
- An IProject- Throws:
PearException
- If a problem occurs
-
addUIMANature
Adds the UIMA nature to a project- Parameters:
project
- an IProject- Throws:
PearException
- If a problem occurs
-
createPearFolderStructure
public static void createPearFolderStructure(org.eclipse.core.resources.IContainer container) throws PearException Creates the PEAR folder structure- Parameters:
container
- an IProject- Throws:
PearException
- if a problem occurs
-
createFolder
public static org.eclipse.core.resources.IFolder createFolder(org.eclipse.core.resources.IContainer container, String folderName) throws PearException Creates a folder, if it does not exist, in a given container- Parameters:
container
- an IContainerfolderName
- The folder name- Returns:
- the handle (IFolder) to the folder
- Throws:
PearException
- If a problem occurs
-
createFile
public static org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IProject project, String fileName, String s, boolean overrideContentIfExist) throws PearException Creates a file in a project with a string as content- Parameters:
project
- an IProjectfileName
- pathname relative to the projects
- A string representing the contentoverrideContentIfExist
- if true, overrides existing file- Returns:
- a handle to the file (IFile)
- Throws:
PearException
- If a problem occurs
-
createFile
public static org.eclipse.core.resources.IFile createFile(org.eclipse.core.resources.IContainer container, String fileName, InputStream is, boolean overrideContentIfExist) throws PearException Creates a file in a project with an InputStream for the content- Parameters:
container
- an IProjectfileName
- pathname relative to the projectis
- An inputStream for the the contentoverrideContentIfExist
- if true, overrides existing file- Returns:
- a handle to the file (IFile)
- Throws:
PearException
- If a problem occurs
-