<?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:predicates="http://www.eclipse.org/oomph/predicates/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.targlets="http://www.eclipse.org/oomph/setup/targlets/1.0"
    xmlns:setup.workingsets="http://www.eclipse.org/oomph/setup/workingsets/1.0"
    xmlns:workingsets="http://www.eclipse.org/oomph/workingsets/1.0"
    xsi:schemaLocation="http://www.eclipse.org/oomph/setup/git/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Git.ecore http://www.eclipse.org/oomph/predicates/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/Predicates.ecore http://www.eclipse.org/oomph/setup/targlets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupTarglets.ecore http://www.eclipse.org/oomph/setup/workingsets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/SetupWorkingSets.ecore http://www.eclipse.org/oomph/workingsets/1.0 http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/models/WorkingSets.ecore"
    name="swt"
    label="SWT">
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Doomph.redirection.platform.swt"
      value="=https://git.eclipse.org/c/platform/eclipse.platform.swt.git/plain/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup->${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup"
      vm="true"/>
  <setupTask
      xsi:type="git:GitCloneTask"
      id="git.clone.platform.swt"
      remoteURI="platform/eclipse.platform.swt"
      pushURI="">
    <annotation
        source="http://www.eclipse.org/oomph/setup/InducedChoices">
      <detail
          key="inherit">
        <value>eclipse.git.gerrit.remoteURIs</value>
      </detail>
      <detail
          key="label">
        <value>Platform SWT Git or Gerrit Repository</value>
      </detail>
      <detail
          key="target">
        <value>remoteURI</value>
      </detail>
    </annotation>
    <configSections
        name="gerrit">
      <properties
          key="createchangeid"
          value="true"/>
    </configSections>
    <description>Platform SWT</description>
  </setupTask>
  <setupTask
      xsi:type="setup:ResourceCopyTask"
      excludedTriggers="BOOTSTRAP"
      sourceURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath_${osgi.ws}"
      targetURL="${git.clone.platform.swt.location|uri}/bundles/org.eclipse.swt/.classpath"/>
  <setupTask
      xsi:type="setup.workingsets:WorkingSetTask"/>
  <setupTask
      xsi:type="git:GitCloneTask"
      id="git.clone.platform.swt.binaries"
      remoteURI="platform/eclipse.platform.swt.binaries"
      pushURI=""
      restrictToCheckoutBranch="true">
    <annotation
        source="http://www.eclipse.org/oomph/setup/InducedChoices">
      <detail
          key="inherit">
        <value>eclipse.git.gerrit.remoteURIs</value>
      </detail>
      <detail
          key="label">
        <value>Platform SWT Git or Gerrit Repository</value>
      </detail>
      <detail
          key="target">
        <value>remoteURI</value>
      </detail>
    </annotation>
    <configSections
        name="gerrit">
      <properties
          key="createchangeid"
          value="true"/>
    </configSections>
    <description>Platform SWT</description>
  </setupTask>
  <setupTask
      xsi:type="setup:ResourceCopyTask"
      excludedTriggers="BOOTSTRAP"
      sourceURL="${git.clone.platform.swt.location|uri}/examples/org.eclipse.swt.snippets/.classpath_${osgi.ws}"
      targetURL="${git.clone.platform.swt.location|uri}/examples/org.eclipse.swt.snippets/.classpath"/>
  <setupTask
      xsi:type="setup.targlets:TargletTask">
    <targlet
        name="SWT Binaries"
        activeRepositoryList="${eclipse.target.platform}">
      <requirement
          name="*"/>
      <sourceLocator
          rootFolder="${git.clone.platform.swt.binaries.location}"
          locateNestedProjects="true">
        <predicate
            xsi:type="predicates:OrPredicate">
          <operand
              xsi:type="predicates:NotPredicate">
            <operand
                xsi:type="predicates:NamePredicate"
                pattern=".*(cocoa|gtk|win32)(\.(macosx|aix|hpux|linux|solaris|win32)(\.(x86_64|ppc64|ia64|aarch64|arm|ppc64|ppc64le|s390|s390x|x86|sparcv9))?)?"/>
          </operand>
          <operand
              xsi:type="predicates:NamePredicate"
              pattern=".*\.${osgi.ws}(\.${osgi.os}(\.${osgi.arch})?)?"/>
        </predicate>
      </sourceLocator>
    </targlet>
    <targlet
        name="SWT"
        activeRepositoryList="${eclipse.target.platform}">
      <requirement
          name="*"/>
      <sourceLocator
          rootFolder="${git.clone.platform.swt.location}"
          locateNestedProjects="true">
        <predicate
            xsi:type="predicates:OrPredicate">
          <operand
              xsi:type="predicates:NotPredicate">
            <operand
                xsi:type="predicates:OrPredicate">
              <operand
                  xsi:type="predicates:NamePredicate"
                  pattern="org\.eclipse\.swt\.opengl\.examples">
                <annotation
                    source="http://www.eclipse.org/oomph/base/Warning">
                  <detail
                      key="diagnostic">
                    <value>This bundle has dependencies that I don't know how to satisfy</value>
                  </detail>
                </annotation>
              </operand>
              <operand
                  xsi:type="predicates:NamePredicate"
                  pattern="org\.eclipse\.swt\.tests\.cocoa"/>
              <operand
                  xsi:type="predicates:NamePredicate"
                  pattern="org\.eclipse\.swt\.tests\.win32"/>
              <operand
                  xsi:type="predicates:NamePredicate"
                  pattern="org\.eclipse\.swt\.tests\.gtk"/>
              <operand
                  xsi:type="predicates:NamePredicate"
                  pattern="org\.eclipse\.swt\.examples\.ole\.win32"/>
            </operand>
          </operand>
          <operand
              xsi:type="predicates:NamePredicate"
              pattern="org\.eclipse\.swt\.tests\.${osgi.ws}"/>
          <operand
              xsi:type="predicates:NamePredicate"
              pattern="org\.eclipse\.swt\.examples\.ole\.${osgi.ws}"/>
        </predicate>
      </sourceLocator>
    </targlet>
    <targlet
        name="Platform"
        activeRepositoryList="${eclipse.target.platform}">
      <requirement
          name="org.eclipse.platform.feature.group"/>
      <requirement
          name="org.eclipse.jdt.feature.group"/>
      <requirement
          name="org.eclipse.pde.feature.group"/>
      <requirement
          name="org.eclipse.equinox.executable.feature.group"/>
    </targlet>
  </setupTask>
  <setupTask
      xsi:type="setup.workingsets:WorkingSetTask">
    <workingSet
        name="SWT Tools">
      <predicate
          xsi:type="predicates:AndPredicate">
        <operand
            xsi:type="predicates:RepositoryPredicate"
            project="org.eclipse.swt"/>
        <operand
            xsi:type="predicates:NamePredicate"
            pattern=".*\.tools.*"/>
      </predicate>
    </workingSet>
    <workingSet
        name="SWT Tests">
      <predicate
          xsi:type="predicates:AndPredicate">
        <operand
            xsi:type="predicates:RepositoryPredicate"
            project="org.eclipse.swt"/>
        <operand
            xsi:type="predicates:NamePredicate"
            pattern=".*\.tests.*"/>
      </predicate>
    </workingSet>
    <workingSet
        name="SWT Examples">
      <predicate
          xsi:type="predicates:AndPredicate">
        <operand
            xsi:type="predicates:RepositoryPredicate"
            project="org.eclipse.swt"/>
        <operand
            xsi:type="predicates:NamePredicate"
            pattern=".*\.examples.*|.*\.snippets"/>
      </predicate>
    </workingSet>
    <workingSet
        name="SWT">
      <predicate
          xsi:type="predicates:AndPredicate">
        <operand
            xsi:type="predicates:RepositoryPredicate"
            project="org.eclipse.swt"/>
        <operand
            xsi:type="workingsets:ExclusionPredicate"
            excludedWorkingSet="//@setupTasks.7/@workingSets.2 //@setupTasks.7/@workingSets.1 //@setupTasks.7/@workingSets.0"/>
      </predicate>
    </workingSet>
    <workingSet
        name="SWT Binaries">
      <predicate
          xsi:type="predicates:AndPredicate">
        <operand
            xsi:type="predicates:LocationPredicate"
            pattern="\Q${git.clone.platform.swt.binaries.location|path}/\E.*"/>
      </predicate>
    </workingSet>
  </setupTask>
  <setupTask
      xsi:type="setup.p2:P2Task"
      label="SWT Tools">
    <requirement
        name="org.eclipse.swt.tools.feature.feature.group"/>
    <requirement
        name="org.eclipse.platform.feature.group"/>
    <requirement
        name="org.eclipse.jdt.feature.group"/>
    <requirement
        name="org.eclipse.pde.feature.group"/>
    <requirement
        name="org.eclipse.pde.api.tools.ee.feature.feature.group"/>
    <repository
        url="${eclipse.latest.p2}"/>
  </setupTask>
  <stream name="master"
      label="Master"/>
  <logicalProjectContainer
      xsi:type="setup:Project"
      href="index:/org.eclipse.setup#//@projectCatalogs[name='org.eclipse']/@projects[name='platform']"/>
  <description>The Platform SWT support</description>
</setup:Project>
