Package: org.gradle.tooling.model.eclipse

## [Java] Interface EclipseProject

- org.gradle.tooling.model.HierarchicalElement

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

  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

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `DomainObjectSet<? extends EclipseBuildCommand>` | `getBuildCommands()` Returns the Eclipse build commands configured on the project.
    `DomainObjectSet<? extends EclipseProject>` | `getChildren()` {@inheritDoc}
    `DomainObjectSet<? extends EclipseExternalDependency>` | `getClasspath()` Returns the external dependencies which make up the classpath of this project.
    `GradleProject` | `getGradleProject()` The gradle project that is associated with this project.
    `EclipseJavaSourceSettings` | `getJavaSourceSettings()` Returns the Java source settings for this project.
    `EclipseProject` | `getParent()` {@inheritDoc}
    `DomainObjectSet<? extends EclipseProjectNature>` | `getProjectNatures()` Returns the Eclipse natures configured on the project.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `interface HierarchicalEclipseProject` | `getChildren, getIdentifier, getLinkedResources, getParent, getProjectDependencies, getProjectDirectory, getSourceDirectories`
    `interface HasGradleProject` | `getGradleProject`
    `interface HierarchicalElement` | `getChildren, getParent`
    `interface Element` | `getDescription, getName`

- - ### Method Detail

    - #### @Incubating public DomainObjectSet<? extends EclipseBuildCommand> 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.

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

    - #### public DomainObjectSet<? extends EclipseProject> getChildren()

      {@inheritDoc}

    - #### public 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

    - #### public GradleProject getGradleProject()

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

      See HasGradleProject

      Returns:
        associated gradle project
      Since:
        1.0-milestone-5

    - #### @Nullable @Incubating public EclipseJavaSourceSettings getJavaSourceSettings()

      Returns the Java source settings for this project.

      throws:
        UnsupportedMethodException For Gradle versions older than 2.10, where this method is not supported.
      Returns:
        the settings for Java sources or `null` if not a Java element.
      Since:
        2.10

    - #### public EclipseProject getParent()

      {@inheritDoc}

    - #### @Incubating public DomainObjectSet<? extends EclipseProjectNature> 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.

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