## Activities Example

The following plug-in contains an example of two different activity techniques. The first technique demonstrates how activities can be used to filter a specific contribution, in this case, the Problems view. The second technique is to filter an entire plug-in.

Note: For the end user, Activities are referred to as Capabilities in the UI.

    <?xml version="1.0" encoding="UTF-8"?>
    <?eclipse version="3.0"?>
    <plugin
       id="org.eclipse.ui.examples.activities.simple"
       name="Simple Activities Plug-in"
       version="1.0.0"
       provider-name="IBM">
       <requires>
          <import plugin="org.eclipse.ui"/>
       </requires>

       <!-- Define the Examples category -->
       <extension
             point="org.eclipse.ui.activities">
          <category
                description="Contains bindings declared in the org.eclipse.ui.examples.activities.simple plugin."
                name="Examples"
                id="org.eclipse.ui.examples.activities.simple.Category"/>
       </extension>

       <!-- The following extension will filter out the Problems View-->
       <extension
             point="org.eclipse.ui.activities">
          <activity
                description="Allows usage of the Problems View"
                name="Problems View Filter"
                id="org.eclipse.ui.examples.activities.simple.Problems"/>
          <activityPatternBinding
                activityId="org.eclipse.ui.examples.activities.simple.Problems"
                pattern="org\.eclipse\.ui\.ide/org\.eclipse\.ui\.views\.ProblemView"/>
          <categoryActivityBinding
                activityId="org.eclipse.ui.examples.activities.simple.Problems"
                categoryId="org.eclipse.ui.examples.activities.simple.Category"/>
          <defaultEnablement id="org.eclipse.ui.examples.activities.simple.Problems"/>
       </extension>

       <!-- The following extension will filter all contributions from the org.eclipse.team* plugins -->
       <extension
             point="org.eclipse.ui.activities">
          <activity
                id="org.eclipse.ui.examples.activities.simple.Team"
                description="Filters all &quot;Team&quot; contributions."
                name="Team Views Filter"/>
          <activityPatternBinding
                activityId="org.eclipse.ui.examples.activities.simple.Team"
                pattern="org\.eclipse\.team.*/.*"/>
          <categoryActivityBinding
                activityId="org.eclipse.ui.examples.activities.simple.Team"
                categoryId="org.eclipse.ui.examples.activities.simple.Category"/>
       </extension>
    </plugin>

Activities

Capabilities