Class WorkspaceUtils


  • public class WorkspaceUtils
    extends java.lang.Object
    Helper class for dealing with Eclipse workspaces
    Author:
    Ben Holland
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.eclipse.core.runtime.IStatus deleteProject​(org.eclipse.core.resources.IProject project)  
      static org.eclipse.core.resources.IFile getFile​(java.io.File file)
      Converts a File to an Eclipse IFile Source: http://stackoverflow.com/questions/960746/how-to-convert-from-file-to-ifile-in-java-for-files-outside-the-project
      static java.io.File getFile​(org.eclipse.core.resources.IFile iFile)
      Converts an IFile to a Java File
      static org.eclipse.core.resources.IProject getProject​(java.lang.String projectName)
      Returns a project in the workspace for the given project name
      static org.eclipse.core.runtime.jobs.Job importProjectFromArchivedResource​(org.osgi.framework.Bundle bundle, java.lang.String relativeArchivedProjectPath, java.lang.String projectName)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getProject

        public static org.eclipse.core.resources.IProject getProject​(java.lang.String projectName)
        Returns a project in the workspace for the given project name
        Parameters:
        projectName -
        Returns:
      • getFile

        public static org.eclipse.core.resources.IFile getFile​(java.io.File file)
        Converts a File to an Eclipse IFile Source: http://stackoverflow.com/questions/960746/how-to-convert-from-file-to-ifile-in-java-for-files-outside-the-project
        Parameters:
        file -
        Returns:
      • getFile

        public static java.io.File getFile​(org.eclipse.core.resources.IFile iFile)
                                    throws org.eclipse.core.runtime.CoreException
        Converts an IFile to a Java File
        Parameters:
        file -
        Returns:
        Throws:
        org.eclipse.core.runtime.CoreException
      • deleteProject

        public static org.eclipse.core.runtime.IStatus deleteProject​(org.eclipse.core.resources.IProject project)
      • importProjectFromArchivedResource

        public static org.eclipse.core.runtime.jobs.Job importProjectFromArchivedResource​(org.osgi.framework.Bundle bundle,
                                                                                          java.lang.String relativeArchivedProjectPath,
                                                                                          java.lang.String projectName)