<?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 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/Git.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/targlets/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/SetupTarglets.ecore http://www.eclipse.org/oomph/setup/workingsets/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/SetupWorkingSets.ecore http://www.eclipse.org/oomph/workingsets/1.0 https://raw.githubusercontent.com/eclipse-oomph/oomph/master/setups/models/WorkingSets.ecore"
    name="swt"
    label="SWT">
  <annotation
      source="http://www.eclipse.org/oomph/setup/ConfigurationReference">
    <reference
        href="PlatformSWTConfiguration.setup#/"/>
  </annotation>
  <setupTask
      xsi:type="setup:EclipseIniTask"
      option="-Doomph.redirection.platform.swt"
      value="=https://raw.githubusercontent.com/eclipse-platform/eclipse.platform.swt/master/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup->${github.clone.platform.swt.location|uri}/bundles/org.eclipse.swt.tools/Oomph/platformSwt.setup"
      vm="true"/>
  <setupTask
      xsi:type="git:GitCloneTask"
      id="github.clone.platform.swt"
      remoteURI="eclipse-platform/eclipse.platform.swt"
      pushURI="">
    <annotation
        source="http://www.eclipse.org/oomph/setup/InducedChoices">
      <detail
          key="inherit">
        <value>github.remoteURIs</value>
      </detail>
      <detail
          key="label">
        <value>Platform SWT GitHub Repository</value>
      </detail>
      <detail
          key="target">
        <value>remoteURI</value>
      </detail>
    </annotation>
    <configSections
        name="branch">
      <properties
          key="autoSetupRebase"
          value="always"/>
    </configSections>
    <description>Platform SWT</description>
  </setupTask>
  <setupTask
      xsi:type="setup:ResourceCopyTask"
      excludedTriggers="BOOTSTRAP"
      sourceURL="${github.clone.platform.swt.location|uri}/examples/org.eclipse.swt.snippets/.classpath_${osgi.ws}"
      targetURL="${github.clone.platform.swt.location|uri}/examples/org.eclipse.swt.snippets/.classpath"/>
  <setupTask
      xsi:type="setup.targlets:TargletTask">
    <targlet
        name="SWT"
        activeRepositoryList="${eclipse.target.platform}">
      <requirement
          name="*"/>
      <sourceLocator
          rootFolder="${github.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=".*(cocoa|gtk|win32)(\.(macosx|aix|hpux|linux|solaris|win32)(\.(x86_64|ppc64|ia64|aarch64|arm|ppc64|ppc64le|s390|s390x|x86|sparcv9))?)?"/>
              <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>
          </operand>
          <operand
              xsi:type="predicates:NamePredicate"
              pattern=".*\.${osgi.ws}(\.${osgi.os}(\.${osgi.arch})?)?"/>
        </predicate>
      </sourceLocator>
    </targlet>
  </setupTask>
  <setupTask
      xsi:type="setup.workingsets:WorkingSetTask"
      id="workingsets.platform.swt">
    <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="//'workingsets.platform.swt'/@workingSets[name='SWT%20Examples'] //'workingsets.platform.swt'/@workingSets[name='SWT%20Tests'] //'workingsets.platform.swt'/@workingSets[name='SWT%20Tools']"/>
      </predicate>
    </workingSet>
  </setupTask>
  <setupTask
      xsi:type="setup.p2:P2Task"
      label="SWT Tools">
    <requirement
        name="org.eclipse.swt.tools.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>
