Interface EclipseProject

All Superinterfaces:
Element, HasGradleProject, HierarchicalEclipseProject, HierarchicalElement, Model, ProjectModel

public interface EclipseProject extends HierarchicalEclipseProject
The complete model of an Eclipse project.

Note that the names of Eclipse projects are unique, and can be used as an identifier for the project.

Since:
1.0-milestone-3
  • Method Details

    • getParent

      EclipseProject getParent()
      Returns the parent of this element, or null if there is no parent.
      Specified by:
      getParent in interface HierarchicalEclipseProject
      Specified by:
      getParent in interface HierarchicalElement
      Returns:
      The parent of this element, or null if there is no parent.
    • getChildren

      DomainObjectSet<? extends EclipseProject> getChildren()
      Returns the child elements, or the empty set if there are no child elements.
      Specified by:
      getChildren in interface HierarchicalEclipseProject
      Specified by:
      getChildren in interface HierarchicalElement
      Returns:
      The child elements, or the empty set if there are no child elements.
    • getJavaSourceSettings

      @Nullable @Incubating EclipseJavaSourceSettings getJavaSourceSettings() throws UnsupportedMethodException
      Returns the Java source settings for this project.
      Returns:
      the settings for Java sources or null if not a Java element.
      Throws:
      UnsupportedMethodException - For Gradle versions older than 2.10, where this method is not supported.
      Since:
      2.10
    • getGradleProject

      GradleProject getGradleProject()
      The gradle project that is associated with this project. Typically, a single Eclipse project corresponds to a single gradle project.

      See HasGradleProject

      Specified by:
      getGradleProject in interface HasGradleProject
      Returns:
      associated gradle project
      Since:
      1.0-milestone-5
    • getClasspath

      DomainObjectSet<? extends EclipseExternalDependency> getClasspath()
      Returns the external dependencies which make up the classpath of this project.
      Returns:
      The dependencies. Returns an empty set if the project has no external dependencies.
      Since:
      1.0-milestone-3
    • getProjectNatures

      Returns the Eclipse natures configured on the project.

      Some natures are automatically added to the result based on the Gradle plugins applied on the project. For example, if the project applies the 'java' plugin the result will contain the "org.eclipse.jdt.core.javanature" entry. Note, that the exact list of automatically added natures is not part of the API and can vary between Gradle releases.

      The result can be customized via the 'eclipse' plugin configuration.

      Returns:
      The list of Eclipse project natures.
      Throws:
      UnsupportedMethodException - For Gradle versions older than 2.9, where this method is not supported.
      Since:
      2.9
    • getBuildCommands

      Returns the Eclipse build commands configured on the project.

      Some build commands are automatically added to the result based on the Gradle plugins applied on the project. For example, if the project applies the 'java' plugin the result will contain the "org.eclipse.jdt.core.javabuilder" build command. Note, that the exact list of automatically added build commands is not part of the API and can vary between Gradle releases.

      The result can be customized via the 'eclipse' plugin configuration.

      Returns:
      The list of Eclipse build commands.
      Throws:
      UnsupportedMethodException - For Gradle versions older than 2.9, where this method is not supported.
      Since:
      2.9
    • getClasspathContainers

      Returns the Eclipse classpath containers defined on the project.
      Returns:
      The list of classpath containers.
      Throws:
      UnsupportedMethodException - For Gradle versions older than 3.0, where this method is not supported.
      Since:
      3.0
    • getOutputLocation

      Returns the output location of this project.
      Returns:
      The project's output location.
      Throws:
      UnsupportedMethodException - For Gradle versions older than 3.0, where this method is not supported.
      Since:
      3.0