public class JavaProjectSetupUtil
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
JavaProjectSetupUtil.TextFile |
Constructor and Description |
---|
JavaProjectSetupUtil() |
Modifier and Type | Method and Description |
---|---|
static org.eclipse.jdt.core.IClasspathEntry |
addExternalFolderToClasspath(org.eclipse.jdt.core.IJavaProject javaProject,
org.eclipse.core.resources.IFolder folder) |
static org.eclipse.jdt.core.IClasspathEntry |
addExternalJarToClasspath(org.eclipse.jdt.core.IJavaProject javaProject,
java.io.File file) |
static org.eclipse.jdt.core.IClasspathEntry |
addJarToClasspath(org.eclipse.jdt.core.IJavaProject javaProject,
org.eclipse.core.resources.IFile jarFile) |
static void |
addJre15ClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject)
Deprecated.
addJreClasspathEntry(IJavaProject) should be used instead of this method |
static void |
addJreClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject) |
static void |
addJreClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject,
java.lang.String bree) |
static org.eclipse.jdt.core.IClasspathEntry |
addPlatformJarToClasspath(org.eclipse.core.runtime.Plugin srcPlugin,
java.lang.String jarFileName,
org.eclipse.jdt.core.IJavaProject destProject) |
static void |
addProjectReference(org.eclipse.jdt.core.IJavaProject from,
org.eclipse.jdt.core.IJavaProject to) |
static org.eclipse.core.resources.IFolder |
addSourceFolder(org.eclipse.jdt.core.IJavaProject javaProject,
java.lang.String folderName) |
static org.eclipse.core.resources.IFolder |
addSourceFolder(org.eclipse.jdt.core.IJavaProject javaProject,
java.lang.String folderName,
java.lang.String[] inclusionPatterns,
java.lang.String[] exclusionPatterns) |
static void |
addToClasspath(org.eclipse.jdt.core.IJavaProject javaProject,
org.eclipse.jdt.core.IClasspathEntry newClassPathEntry) |
static org.eclipse.core.resources.IFolder |
createExternalFolder(java.lang.String folderName) |
static java.io.File |
createExternalJar(java.io.InputStream data,
java.lang.String nameWithoutJarSuffix) |
static org.eclipse.jdt.core.IJavaProject |
createJavaProject(java.lang.String projectName) |
static org.eclipse.core.resources.IProject |
createSimpleProject(java.lang.String projectName) |
static org.eclipse.core.resources.IFolder |
createSubFolder(org.eclipse.core.resources.IProject project,
java.lang.String folderName) |
static void |
deleteClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject,
org.eclipse.core.runtime.IPath path) |
static void |
deleteExternalFolder(org.eclipse.core.resources.IFolder folder) |
static void |
deleteJavaProject(org.eclipse.jdt.core.IJavaProject javaProject) |
static void |
deleteProject(org.eclipse.core.resources.IProject project) |
static org.eclipse.core.resources.IFolder |
deleteSourceFolder(org.eclipse.jdt.core.IJavaProject project,
java.lang.String folderPath) |
static org.eclipse.jdt.core.IJavaProject |
findJavaProject(java.lang.String projectName) |
static org.eclipse.jdt.core.IClasspathEntry |
getJreContainerClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject) |
static java.io.InputStream |
jarInputStream(JavaProjectSetupUtil.TextFile... files)
creates a JarInputStream containing the passed text files.
|
static java.io.InputStream |
jarInputStream(Pair<java.lang.String,java.io.InputStream>... entries) |
static void |
makeJava5Compliant(org.eclipse.jdt.core.IJavaProject javaProject) |
static void |
makeJava7Default() |
static org.eclipse.jdt.core.IJavaProject |
makeJavaProject(org.eclipse.core.resources.IProject project) |
static void |
removeFromClasspath(org.eclipse.jdt.core.IJavaProject from,
int entryKind,
org.eclipse.core.runtime.IPath path) |
static void |
removeJarFromClasspath(org.eclipse.jdt.core.IJavaProject from,
org.eclipse.core.resources.IFile to) |
static void |
removeProjectReference(org.eclipse.jdt.core.IJavaProject from,
org.eclipse.jdt.core.IJavaProject to) |
static void |
setUnixLineEndings(org.eclipse.core.resources.IProject project) |
public static java.io.InputStream jarInputStream(JavaProjectSetupUtil.TextFile... files)
public static java.io.InputStream jarInputStream(Pair<java.lang.String,java.io.InputStream>... entries)
public static org.eclipse.jdt.core.IJavaProject createJavaProject(java.lang.String projectName) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static org.eclipse.jdt.core.IJavaProject findJavaProject(java.lang.String projectName)
public static org.eclipse.core.resources.IProject createSimpleProject(java.lang.String projectName) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static org.eclipse.core.resources.IFolder createExternalFolder(java.lang.String folderName) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static void deleteExternalFolder(org.eclipse.core.resources.IFolder folder) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static org.eclipse.core.resources.IFolder deleteSourceFolder(org.eclipse.jdt.core.IJavaProject project, java.lang.String folderPath) throws org.eclipse.jdt.core.JavaModelException, org.eclipse.core.runtime.CoreException
org.eclipse.jdt.core.JavaModelException
org.eclipse.core.runtime.CoreException
public static void addProjectReference(org.eclipse.jdt.core.IJavaProject from, org.eclipse.jdt.core.IJavaProject to) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static void removeProjectReference(org.eclipse.jdt.core.IJavaProject from, org.eclipse.jdt.core.IJavaProject to) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static void removeJarFromClasspath(org.eclipse.jdt.core.IJavaProject from, org.eclipse.core.resources.IFile to) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static void removeFromClasspath(org.eclipse.jdt.core.IJavaProject from, int entryKind, org.eclipse.core.runtime.IPath path) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static void deleteJavaProject(org.eclipse.jdt.core.IJavaProject javaProject) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static void deleteProject(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static org.eclipse.jdt.core.IJavaProject makeJavaProject(org.eclipse.core.resources.IProject project) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public static org.eclipse.core.resources.IFolder addSourceFolder(org.eclipse.jdt.core.IJavaProject javaProject, java.lang.String folderName) throws org.eclipse.core.runtime.CoreException, org.eclipse.jdt.core.JavaModelException
org.eclipse.core.runtime.CoreException
org.eclipse.jdt.core.JavaModelException
public static org.eclipse.core.resources.IFolder addSourceFolder(org.eclipse.jdt.core.IJavaProject javaProject, java.lang.String folderName, java.lang.String[] inclusionPatterns, java.lang.String[] exclusionPatterns) throws org.eclipse.core.runtime.CoreException, org.eclipse.jdt.core.JavaModelException
org.eclipse.core.runtime.CoreException
org.eclipse.jdt.core.JavaModelException
public static void deleteClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject, org.eclipse.core.runtime.IPath path) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static void addToClasspath(org.eclipse.jdt.core.IJavaProject javaProject, org.eclipse.jdt.core.IClasspathEntry newClassPathEntry) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static org.eclipse.core.resources.IFolder createSubFolder(org.eclipse.core.resources.IProject project, java.lang.String folderName) throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
@Deprecated public static void addJre15ClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject) throws org.eclipse.jdt.core.JavaModelException
addJreClasspathEntry(IJavaProject)
should be used instead of this methodorg.eclipse.jdt.core.JavaModelException
public static void addJreClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static void addJreClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject, java.lang.String bree) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static void makeJava7Default()
public static void makeJava5Compliant(org.eclipse.jdt.core.IJavaProject javaProject)
public static org.eclipse.jdt.core.IClasspathEntry getJreContainerClasspathEntry(org.eclipse.jdt.core.IJavaProject javaProject) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static org.eclipse.jdt.core.IClasspathEntry addPlatformJarToClasspath(org.eclipse.core.runtime.Plugin srcPlugin, java.lang.String jarFileName, org.eclipse.jdt.core.IJavaProject destProject) throws org.eclipse.jdt.core.JavaModelException, java.io.IOException
org.eclipse.jdt.core.JavaModelException
java.io.IOException
public static org.eclipse.jdt.core.IClasspathEntry addJarToClasspath(org.eclipse.jdt.core.IJavaProject javaProject, org.eclipse.core.resources.IFile jarFile) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static org.eclipse.jdt.core.IClasspathEntry addExternalFolderToClasspath(org.eclipse.jdt.core.IJavaProject javaProject, org.eclipse.core.resources.IFolder folder) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static org.eclipse.jdt.core.IClasspathEntry addExternalJarToClasspath(org.eclipse.jdt.core.IJavaProject javaProject, java.io.File file) throws org.eclipse.jdt.core.JavaModelException
org.eclipse.jdt.core.JavaModelException
public static java.io.File createExternalJar(java.io.InputStream data, java.lang.String nameWithoutJarSuffix) throws java.io.IOException, java.io.FileNotFoundException
java.io.IOException
java.io.FileNotFoundException
public static void setUnixLineEndings(org.eclipse.core.resources.IProject project)