Class EclipseIProject

java.lang.Object
com.iizigo.app.EclipseIProject
All Implemented Interfaces:
IIDirectory, IIResource

public class EclipseIProject extends Object implements IIDirectory
The Eclipse project wrapper as a directory.
Author:
Christopher Mindus
  • Constructor Details

    • EclipseIProject

      public EclipseIProject(org.eclipse.core.resources.IProject project)
      Constructs a file.
  • Method Details

    • getFullPath

      public String getFullPath() throws IOException
      Gets the full path to the resource.
      Specified by:
      getFullPath in interface IIResource
      Throws:
      IOException - For I/O errors.
    • getFile

      public File getFile(Object monitor) throws IOException
      Get the Java canonical File.
      Specified by:
      getFile in interface IIResource
      Parameters:
      monitor - The IProgressMonitor, null for none.
      Returns:
      a File in canonical form.
      Throws:
      IOException - For I/O errors.
    • listDirectory

      public List<IIResource> listDirectory(Object monitor) throws IOException
      Lists the contents of the directory.
      Specified by:
      listDirectory in interface IIDirectory
      Parameters:
      monitor - The IProgressMonitor, null for none.
      Throws:
      IOException - For directory errors.
    • isDirectory

      public boolean isDirectory()
      Checks if this resource is a directory.
      Specified by:
      isDirectory in interface IIResource
      Returns:
      true.
    • getName

      public String getName()
      Gets the name of the resource.
      Specified by:
      getName in interface IIResource
      Returns:
      The name of the resource (also includes the file extension).
    • equals

      public boolean equals(Object o)
      Compares two resources.
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      The hash code.
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Resource String representation is the file name.
      Overrides:
      toString in class Object