<?xml version="1.0" encoding="UTF-8"?>
<setup:Project
    xmi:version="2.0"
    xmlns:xmi="http://www.omg.org/XMI"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:git="http://www.eclipse.org/oomph/setup/git/1.0"
    xmlns:jdt="http://www.eclipse.org/oomph/setup/jdt/1.0"
    xmlns:maven="http://www.eclipse.org/oomph/setup/maven/1.0"
    xmlns:pde="http://www.eclipse.org/oomph/setup/pde/1.0"
    xmlns:predicates="http://www.eclipse.org/oomph/predicates/1.0"
    xmlns:projects="http://www.eclipse.org/oomph/setup/projects/1.0"
    xmlns:setup="http://www.eclipse.org/oomph/setup/1.0"
    xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
    xmlns:setup.workingsets="http://www.eclipse.org/oomph/setup/workingsets/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/git/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/Git.ecore http://www.eclipse.org/oomph/setup/jdt/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/JDT.ecore http://www.eclipse.org/oomph/setup/maven/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/Maven.ecore http://www.eclipse.org/oomph/setup/pde/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/PDE.ecore http://www.eclipse.org/oomph/predicates/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/Predicates.ecore http://www.eclipse.org/oomph/setup/projects/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/Projects.ecore http://www.eclipse.org/oomph/setup/workingsets/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/SetupWorkingSets.ecore"
    name="sandbox"
    label="Sandbox Project">
  <setupTask
      xsi:type="setup.p2:P2Task"
      id="sandbox.development.tools"
      label="Sandbox development tools">
    <requirement
        name="org.eclipse.jdt.feature.group"/>
    <requirement
        name="org.eclipse.pde.feature.group"/>
    <requirement
        name="org.eclipse.egit.feature.group"/>
    <requirement
        name="org.eclipse.m2e.feature.feature.group"/>
    <requirement
        name="org.eclipse.m2e.pde.feature.feature.group"/>
    <requirement
        name="org.eclipse.jdt.astview.feature.feature.group"/>
    <requirement
        name="org.eclipse.jdt.jeview.feature.feature.group"/>
    <requirement
        name="org.eclipse.pde.spies.feature.group"/>
    <repository
        url="https://download.eclipse.org/releases/2026-09/"/>
  </setupTask>
  <setupTask
      xsi:type="setup:PreferenceTask"
      key="/instance/org.eclipse.core.resources/encoding"
      value="UTF-8"/>
  <setupTask
      xsi:type="setup:CompoundTask"
      name="User Preferences">
    <annotation
        source="http://www.eclipse.org/oomph/setup/UserPreferences">
      <detail
          key="/instance/org.eclipse.ui.editors/showWhitespaceCharacters">
        <value>record</value>
      </detail>
      <detail
          key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable">
        <value>record</value>
      </detail>
      <detail
          key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable">
        <value>record</value>
      </detail>
    </annotation>
    <setupTask
        xsi:type="setup:CompoundTask"
        name="org.eclipse.jdt.core">
      <setupTask
          xsi:type="setup:PreferenceTask"
          key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable"
          value="warning"/>
      <setupTask
          xsi:type="setup:PreferenceTask"
          key="/instance/org.eclipse.jdt.core/org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable"
          value="warning"/>
    </setupTask>
    <setupTask
        xsi:type="setup:CompoundTask"
        name="org.eclipse.ui.editors">
      <setupTask
          xsi:type="setup:PreferenceTask"
          key="/instance/org.eclipse.ui.editors/showWhitespaceCharacters"
          value="true"/>
    </setupTask>
  </setupTask>
  <setupTask
      xsi:type="jdt:JRETask"
      version="JavaSE-21"
      location="${jre.location-21}">
    <description>Define the JRE needed to compile and run the Java projects of ${scope.project.label}</description>
  </setupTask>
  <setupTask
      xsi:type="git:GitCloneTask"
      id="git.clone.sandbox"
      remoteURI="https://github.com/carstenartur/sandbox.git"
      checkoutBranch="main">
    <description>Clone the ${scope.project.label} repository from GitHub</description>
  </setupTask>
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Doomph.redirection.sandbox"
      value="=https://raw.githubusercontent.com/carstenartur/sandbox/main/sandbox_oomph/sandboxproject.setup->${git.clone.sandbox.location|uri}/sandbox_oomph/sandboxproject.setup"
      vm="true">
    <description>Set an Oomph redirection system property to redirect the logical location of this setup to its physical location in the Git clone.</description>
  </setupTask>
  <setupTask
      xsi:type="maven:MavenImportTask"
      id="sandbox.maven"
      label="Sandbox Maven projects">
    <sourceLocator
        rootFolder="${git.clone.sandbox.location}"
        locateNestedProjects="true">
      <excludedPath>.git</excludedPath>
      <excludedPath>.github</excludedPath>
      <excludedPath>target</excludedPath>
      <excludedPath>sandbox_oomph/target</excludedPath>
      <predicate
          xsi:type="predicates:NotPredicate">
        <operand
            xsi:type="predicates:NamePredicate"
            pattern="central"/>
      </predicate>
    </sourceLocator>
    <sourceLocator
        rootFolder="${git.clone.sandbox.location}/sandbox_oomph"/>
  </setupTask>
  <setupTask
      xsi:type="projects:ProjectsImportTask"
      id="sandbox.projects"
      predecessor="sandbox.maven">
    <sourceLocator
        rootFolder="${git.clone.sandbox.location}"
        locateNestedProjects="true">
      <excludedPath>.git</excludedPath>
      <excludedPath>.github</excludedPath>
      <excludedPath>target</excludedPath>
      <excludedPath>sandbox_oomph/target</excludedPath>
    </sourceLocator>
    <description>Import all Eclipse projects from the cloned sandbox repository</description>
  </setupTask>
  <setupTask
      xsi:type="setup.workingsets:WorkingSetTask">
    <workingSet
        name="${scope.project.label}">
      <predicate
          xsi:type="predicates:NamePredicate"
          pattern="sandbox.*"/>
    </workingSet>
    <workingSet
        name="Sandbox Core">
      <predicate
          xsi:type="predicates:NamePredicate"
          pattern="sandbox-(functional-converter-core|ast-api(-jdt)?|jgit-.*)|sandbox_(common(_core)?|mining_(core|cli)|test_commons)"/>
    </workingSet>
    <workingSet
        name="Sandbox Tests">
      <predicate
          xsi:type="predicates:NamePredicate"
          pattern="sandbox.*(_test|-benchmarks)"/>
    </workingSet>
    <workingSet
        name="Sandbox Help">
      <predicate
          xsi:type="predicates:NamePredicate"
          pattern="sandbox_.*_help"/>
    </workingSet>
    <workingSet
        name="Sandbox Distribution">
      <predicate
          xsi:type="predicates:NamePredicate"
          pattern="sandbox_(.*_feature|target|product|updatesite|distribution_verify|coverage|oomph)|sandbox-(maven-plugin|cleanup-cli-dist)"/>
    </workingSet>
    <description>The dynamic working sets for ${scope.project.label}</description>
  </setupTask>
  <setupTask
      xsi:type="pde:TargetPlatformTask"
      id="sandbox.target"
      predecessor="sandbox.projects"
      name="target platform for sandbox">
    <description>Activate the sandbox target platform so the workspace uses the correct Eclipse version and dependencies.</description>
  </setupTask>
  <setupTask
      xsi:type="projects:ProjectsBuildTask"
      predecessor="sandbox.target"
      onlyNewProjects="true">
    <description>Build newly imported projects</description>
  </setupTask>
  <stream name="main"
      label="Main">
    <description>Development stream tracking the main branch</description>
  </stream>
  <description>Sandbox provides Eclipse plugins for code cleanup and tools development. Configuration and features for the Sandbox project, including development tools adapted to Sandbox project requirements.</description>
</setup:Project>
