org.granite.builder.util
Class ProjectUtil

java.lang.Object
  extended by org.granite.builder.util.ProjectUtil

public class ProjectUtil
extends java.lang.Object

Author:
Franck WOLFF

Nested Class Summary
static class ProjectUtil.CpEntry
           
 
Field Summary
static java.util.Comparator<org.eclipse.core.runtime.IPath> IPATH_COMPARATOR
           
 
Constructor Summary
ProjectUtil()
           
 
Method Summary
static org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.String message)
           
static org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.String message, java.lang.Throwable t)
           
static org.eclipse.core.resources.IProject[] getAllOtherGraniteProjects(org.eclipse.core.resources.IProject project)
           
static org.eclipse.core.resources.IProject[] getAllProjects(org.eclipse.core.resources.IProject project)
           
static java.util.List<ProjectUtil.CpEntry> getFullClasspath(org.eclipse.jdt.core.IJavaProject project)
           
static JavaClassInfo getJavaClassInfo(org.eclipse.jdt.core.IJavaProject project, java.lang.Class<?> clazz)
           
static JavaClassInfo getJavaClassInfo(org.eclipse.jdt.core.IJavaProject project, org.eclipse.core.resources.IFile resource)
           
static org.eclipse.core.runtime.IPath getJavaPath(org.eclipse.jdt.core.IJavaProject project, org.eclipse.core.resources.IFile classFile, boolean keepInner)
           
static org.eclipse.core.runtime.IPath getOutputFolder(org.eclipse.jdt.core.IJavaProject project, org.eclipse.jdt.core.IClasspathEntry cpe)
           
static java.util.List<org.eclipse.core.runtime.IPath> getOutputFolders(org.eclipse.jdt.core.IJavaProject project)
           
static org.eclipse.core.resources.IProject getProject(org.eclipse.core.resources.IProject project, java.lang.String name)
           
static java.io.File getProjectFile(org.eclipse.core.resources.IProject project)
           
static java.net.URI getProjectURI(org.eclipse.core.resources.IProject project)
           
static java.util.List<org.eclipse.core.runtime.IPath> getSourceFolders(org.eclipse.jdt.core.IJavaProject project)
           
static java.io.File getWorkspaceFile(org.eclipse.core.resources.IProject project)
           
static java.net.URI getWorkspaceURI(org.eclipse.core.resources.IProject project)
           
static boolean isFlexBuilderProject(org.eclipse.core.resources.IProject project)
           
static boolean isGraniteProject(org.eclipse.core.resources.IProject project)
           
static org.eclipse.core.runtime.IPath[] makeRelative(org.eclipse.core.runtime.IPath[] paths)
           
static java.util.List<org.eclipse.core.runtime.IPath> makeRelative(java.util.List<org.eclipse.core.runtime.IPath> paths)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

IPATH_COMPARATOR

public static final java.util.Comparator<org.eclipse.core.runtime.IPath> IPATH_COMPARATOR
Constructor Detail

ProjectUtil

public ProjectUtil()
Method Detail

getAllProjects

public static org.eclipse.core.resources.IProject[] getAllProjects(org.eclipse.core.resources.IProject project)

getAllOtherGraniteProjects

public static org.eclipse.core.resources.IProject[] getAllOtherGraniteProjects(org.eclipse.core.resources.IProject project)
                                                                        throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getProject

public static org.eclipse.core.resources.IProject getProject(org.eclipse.core.resources.IProject project,
                                                             java.lang.String name)

isGraniteProject

public static boolean isGraniteProject(org.eclipse.core.resources.IProject project)
                                throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

isFlexBuilderProject

public static boolean isFlexBuilderProject(org.eclipse.core.resources.IProject project)
                                    throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

makeRelative

public static java.util.List<org.eclipse.core.runtime.IPath> makeRelative(java.util.List<org.eclipse.core.runtime.IPath> paths)

makeRelative

public static org.eclipse.core.runtime.IPath[] makeRelative(org.eclipse.core.runtime.IPath[] paths)

getWorkspaceFile

public static java.io.File getWorkspaceFile(org.eclipse.core.resources.IProject project)

getWorkspaceURI

public static java.net.URI getWorkspaceURI(org.eclipse.core.resources.IProject project)

getProjectFile

public static java.io.File getProjectFile(org.eclipse.core.resources.IProject project)

getProjectURI

public static java.net.URI getProjectURI(org.eclipse.core.resources.IProject project)

getFullClasspath

public static java.util.List<ProjectUtil.CpEntry> getFullClasspath(org.eclipse.jdt.core.IJavaProject project)
                                                            throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getSourceFolders

public static java.util.List<org.eclipse.core.runtime.IPath> getSourceFolders(org.eclipse.jdt.core.IJavaProject project)
                                                                       throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getOutputFolder

public static org.eclipse.core.runtime.IPath getOutputFolder(org.eclipse.jdt.core.IJavaProject project,
                                                             org.eclipse.jdt.core.IClasspathEntry cpe)
                                                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getOutputFolders

public static java.util.List<org.eclipse.core.runtime.IPath> getOutputFolders(org.eclipse.jdt.core.IJavaProject project)
                                                                       throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getJavaPath

public static org.eclipse.core.runtime.IPath getJavaPath(org.eclipse.jdt.core.IJavaProject project,
                                                         org.eclipse.core.resources.IFile classFile,
                                                         boolean keepInner)
                                                  throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

getJavaClassInfo

public static JavaClassInfo getJavaClassInfo(org.eclipse.jdt.core.IJavaProject project,
                                             java.lang.Class<?> clazz)

getJavaClassInfo

public static JavaClassInfo getJavaClassInfo(org.eclipse.jdt.core.IJavaProject project,
                                             org.eclipse.core.resources.IFile resource)
                                      throws org.eclipse.core.runtime.CoreException
Throws:
org.eclipse.core.runtime.CoreException

createErrorStatus

public static org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.String message)

createErrorStatus

public static org.eclipse.core.runtime.IStatus createErrorStatus(java.lang.String message,
                                                                 java.lang.Throwable t)