Class ExternalJavaProject

All Implemented Interfaces:
IBufferChangedListener, IJavaElement, IJavaProject, IOpenable, IParent, SuffixConstants, org.eclipse.core.resources.IProjectNature, org.eclipse.core.runtime.IAdaptable

public class ExternalJavaProject extends JavaProject
  • Field Details

  • Constructor Details

    • ExternalJavaProject

      public ExternalJavaProject(IClasspathEntry[] rawClasspath)
  • Method Details

    • equals

      public boolean equals(Object o)
      Description copied from class: JavaProject
      Returns true if this handle represents the same Java project as the given handle. Two handles represent the same project if they are identical or if they represent a project with the same underlying resource and occurrence counts.
      Overrides:
      equals in class JavaProject
      See Also:
      JavaElement.equals(Object)
    • exists

      public boolean exists()
      Description copied from interface: IJavaElement
      Returns whether this Java element exists in the model.

      Java elements are handle objects that may or may not be backed by an actual element. Java elements that are backed by an actual element are said to "exist", and this method returns true. For Java elements that are not working copies, it is always the case that if the element exists, then its parent also exists (provided it has one) and includes the element as one of its children. It is therefore possible to navigated to any existing Java element from the root of the Java model along a chain of existing Java elements. On the other hand, working copies are said to exist until they are destroyed (with IWorkingCopy.destroy). Unlike regular Java elements, a working copy never shows up among the children of its parent element (which may or may not exist).

      Specified by:
      exists in interface IJavaElement
      Overrides:
      exists in class Openable
      Returns:
      true if this element exists in the Java model, and false if this element does not exist
      See Also:
      IJavaElement
    • getOption

      public String getOption(String optionName, boolean inheritJavaCoreOptions)
      Description copied from interface: IJavaProject
      Helper method for returning one option value only. Equivalent to (String)this.getOptions(inheritJavaCoreOptions).get(optionName) Note that it may answer null if this option does not exist, or if there is no custom value for it.

      For a complete description of the configurable options, see JavaCore#getDefaultOptions.

      Specified by:
      getOption in interface IJavaProject
      Overrides:
      getOption in class JavaProject
      Parameters:
      optionName - the name of an option
      inheritJavaCoreOptions - - boolean indicating whether JavaCore options should be inherited as well
      Returns:
      the String value of a given option
      See Also:
      IJavaProject.getOption(String, boolean)
    • isOnClasspath

      public boolean isOnClasspath(IJavaElement element)
      Description copied from interface: IJavaProject
      Returns whether the given element is on the classpath of this project, that is, referenced from a classpath entry and not explicitly excluded using an exclusion pattern.
      Specified by:
      isOnClasspath in interface IJavaProject
      Overrides:
      isOnClasspath in class JavaProject
      Parameters:
      element - the given element
      Returns:
      true if the given element is on the classpath of this project, false otherwise
      See Also:
      IClasspathEntry.getInclusionPatterns(), IClasspathEntry.getExclusionPatterns()
    • isOnClasspath

      public boolean isOnClasspath(org.eclipse.core.resources.IResource resource)
      Description copied from interface: IJavaProject
      Returns whether the given resource is on the classpath of this project, that is, referenced from a classpath entry and not explicitly excluded using an exclusion pattern.
      Specified by:
      isOnClasspath in interface IJavaProject
      Overrides:
      isOnClasspath in class JavaProject
      Parameters:
      resource - the given resource
      Returns:
      true if the given resource is on the classpath of this project, false otherwise
      See Also:
      IClasspathEntry.getInclusionPatterns(), IClasspathEntry.getExclusionPatterns()
    • validateExistence

      protected org.eclipse.core.runtime.IStatus validateExistence(org.eclipse.core.resources.IResource underlyingResource)
      Overrides:
      validateExistence in class JavaProject