<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>
   <extension-point id="RemoteProxyManager" name="Remote Proxy Manager" schema="schema/RemoteProxyManager.exsd"/>
   <extension-point id="launchProvider" name="Launch Provider" schema="schema/org.eclipse.linuxtools.profiling.launch.provider.exsd"/>
   <extension-point id="RemoteResourceSelectorProxy" name="Remote Resource Selector Proxy" schema="schema/RemoteResourceSelectorProxy.exsd"/>
   <extension-point id="RemoteProxyNatureMapping" name="RemoteProxyNatureMapping" schema="schema/RemoteProxyNatureMapping.exsd"/>

   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            category="org.eclipse.cdt.ui.preferences.CPluginPreferencePage"
            class="org.eclipse.linuxtools.internal.profiling.launch.provider.ProviderPreferencesPage"
            id="org.eclipse.linuxtools.profiling.provider.MainPreferencePage"
            name="%profiling.page.name">
      </page>
      <page
            category="org.eclipse.linuxtools.profiling.provider.MainPreferencePage"
            class="org.eclipse.linuxtools.internal.profiling.launch.provider.ProfilingCategoriesPreferencesPage"
            id="org.eclipse.linuxtools.profiling.provider.ProfilingCategoriesPreferencePage"
            name="%categories.page.name">
      </page>
   </extension>
   <extension
         id="org.eclipse.linuxtools.profiling.timing.launch"
         name="Profile Timing"
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            icon="icons/time_obj.gif"
            id="org.eclipse.linuxtools.profiling.provider.TimingLaunchShortcut"
            label="%shortcut.label"
            modes="linuxtools"
            path="/linuxtools/category">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchShortcut">
               <parameter
                     name="type"
                     value="timing"/>
               <parameter
                     name="configurationId"
                     value="org.eclipse.linuxtools.profiling.provider.TimingLaunchConfigurationType"/>
            </class>
            <contextualLaunch>
            <enablement>
               <and>
               	 <test
                       args="timing"
                       property="org.eclipse.linuxtools.profiling.launch.categoryEnabled">
               	 </test>
                 <with
                     variable="selection">
                    <count
                        value="1">
                    </count>
                    <iterate>
                       <or>
                          <instanceof
                              value="org.eclipse.cdt.core.model.IBinary">
                          </instanceof>
                          <instanceof
                              value="org.eclipse.cdt.core.model.ICProject">
                          </instanceof>
                          <test
                              property="org.eclipse.cdt.launch.isExecutable">
                          </test>
                          <test
                              property="org.eclipse.cdt.launch.isCProject">
                          </test>
                          <and>
                             <instanceof
                                 value="org.eclipse.ui.IFileEditorInput">
                             </instanceof>
                             <adapt
                                 type="org.eclipse.core.resources.IResource">
                                <adapt
                                      type="org.eclipse.cdt.core.model.ICElement">
                                </adapt>
                             </adapt>
                          </and>
                       </or>
                    </iterate>
                 </with>
               </and>
            </enablement>
         </contextualLaunch>
      </shortcut>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            id="org.eclipse.linuxtools.profiling.provider.TimingLaunchConfigurationTabGroup"
            type="org.eclipse.linuxtools.profiling.provider.TimingLaunchConfigurationType">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.ProviderLaunchConfigurationTabGroup">
               <parameter
                     name="type"
                     value="timing"/>
               <parameter
                     name="name"
                     value="Timing"/>
            </class>
      </launchConfigurationTabGroup>
   </extension>
   <extension
         point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchConfigurationDelegate"
            id="org.eclipse.linuxtools.profiling.provider.TimingLaunchConfigurationType"
            modes="linuxtools"
            name="%launchConfigurationType.name"
            public="true"
            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            category="org.eclipse.linuxtools.profiling.provider.ProfilingCategoriesPreferencePage"
            id="org.eclipse.linuxtools.profiling.provider.TimingPreferencePage"
            name="%page.name.0">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.AbstractProviderPreferencesPage">
               <parameter
                     name="type"
                     value="timing"/>
            </class>
      </page>
   </extension>
   <extension
         id="org.eclipse.linuxtools.profiling.memory.launch"
         name="Profile Memory"
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            icon="icons/memory_view.gif"
            id="org.eclipse.linuxtools.profiling.provider.MemoryLaunchShortcut"
            label="%shortcut.label.0"
            modes="linuxtools"
            path="/linuxtools/category">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchShortcut">
               <parameter
                     name="type"
                     value="memory"/>
               <parameter
                     name="configurationId"
                     value="org.eclipse.linuxtools.profiling.provider.MemoryLaunchConfigurationType"/>
            </class>
            <contextualLaunch>
            <enablement>
               <and>
                 <test
                     args="memory"
                     property="org.eclipse.linuxtools.profiling.launch.categoryEnabled">
               	 </test>
                 <with
                     variable="selection">
                    <count
                        value="1">
                    </count>
                    <iterate>
                       <or>
                          <instanceof
                              value="org.eclipse.cdt.core.model.IBinary">
                          </instanceof>
                          <instanceof
                              value="org.eclipse.cdt.core.model.ICProject">
                          </instanceof>
                          <test
                              property="org.eclipse.cdt.launch.isExecutable">
                          </test>
                          <test
                              property="org.eclipse.cdt.launch.isCProject">
                          </test>
                          <and>
                             <instanceof
                                 value="org.eclipse.ui.IFileEditorInput">
                             </instanceof>
                             <adapt
                                 type="org.eclipse.core.resources.IResource">
                                <adapt
                                      type="org.eclipse.cdt.core.model.ICElement">
                                </adapt>
                             </adapt>
                          </and>
                       </or>
                    </iterate>
                 </with>
               </and>
            </enablement>
         </contextualLaunch>
      </shortcut>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            id="org.eclipse.linuxtools.profiling.provider.MemoryLaunchConfigurationTabGroup"
            type="org.eclipse.linuxtools.profiling.provider.MemoryLaunchConfigurationType">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.ProviderLaunchConfigurationTabGroup">
               <parameter
                     name="type"
                     value="memory"/>
               <parameter
                     name="name"
                     value="Memory"/>
            </class>
      </launchConfigurationTabGroup>
   </extension>
   <extension
         point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchConfigurationDelegate"
            id="org.eclipse.linuxtools.profiling.provider.MemoryLaunchConfigurationType"
            modes="linuxtools"
            name="%launchConfigurationType.name.0"
            public="true"
            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            category="org.eclipse.linuxtools.profiling.provider.ProfilingCategoriesPreferencePage"
            id="org.eclipse.linuxtools.profiling.provider.MemoryPreferencePage"
            name="%page.name.1">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.AbstractProviderPreferencesPage">
               <parameter
                     name="type"
                     value="memory"/>
            </class>
      </page>
   </extension>
   <extension
         id="org.eclipse.linuxtools.profiling.coverage.launch"
         name="Profile Memory"
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            icon="icons/toggle.gif"
            id="org.eclipse.linuxtools.profiling.provider.CoverageLaunchShortcut"
            label="%shortcut.label.1"
            modes="linuxtools"
            path="/linuxtools/category">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchShortcut">
               <parameter
                     name="type"
                     value="coverage"/>
               <parameter
                     name="configurationId"
                     value="org.eclipse.linuxtools.profiling.provider.CoverageLaunchConfigurationType"/>
            </class>
            <contextualLaunch>
            <enablement>
               <and>
               	 <test
                       args="coverage"
                       property="org.eclipse.linuxtools.profiling.launch.categoryEnabled">
               	 </test>
                 <with
                     variable="selection">
                    <count
                        value="1">
                    </count>
                    <iterate>
                       <or>
                          <instanceof
                              value="org.eclipse.cdt.core.model.IBinary">
                          </instanceof>
                          <instanceof
                              value="org.eclipse.cdt.core.model.ICProject">
                          </instanceof>
                          <test
                              property="org.eclipse.cdt.launch.isExecutable">
                          </test>
                          <test
                              property="org.eclipse.cdt.launch.isCProject">
                          </test>
                          <and>
                             <instanceof
                                 value="org.eclipse.ui.IFileEditorInput">
                             </instanceof>
                             <adapt
                                 type="org.eclipse.core.resources.IResource">
                                <adapt
                                      type="org.eclipse.cdt.core.model.ICElement">
                                </adapt>
                             </adapt>
                          </and>
                       </or>
                    </iterate>
                 </with>
               </and>
            </enablement>
         </contextualLaunch>
      </shortcut>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            id="org.eclipse.linuxtools.profiling.provider.CoverageLaunchConfigurationTabGroup"
            type="org.eclipse.linuxtools.profiling.provider.CoverageLaunchConfigurationType">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.ProviderLaunchConfigurationTabGroup">
               <parameter
                     name="type"
                     value="coverage"/>
               <parameter
                     name="name"
                     value="Coverage"/>
            </class>
      </launchConfigurationTabGroup>
   </extension>
   <extension
         point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchConfigurationDelegate"
            id="org.eclipse.linuxtools.profiling.provider.CoverageLaunchConfigurationType"
            modes="linuxtools"
            name="%launchConfigurationType.name.1"
            public="true"
            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
   </extension>
   <extension
         point="org.eclipse.ui.preferencePages">
      <page
            category="org.eclipse.linuxtools.profiling.provider.ProfilingCategoriesPreferencePage"
            id="org.eclipse.linuxtools.profiling.provider.CoveragePreferencePage"
            name="%page.name.2">
            <class class="org.eclipse.linuxtools.internal.profiling.launch.provider.AbstractProviderPreferencesPage">
               <parameter
                     name="type"
                     value="coverage"/>
            </class>
      </page>
   </extension>
      <extension
         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.profiling.provider.CoverageLaunchConfigurationType"
            icon="icons/toggle.gif"
            id="org.eclipse.linuxtools.profiling.provider.CoverageLaunchConfigurationType.image">
      </launchConfigurationTypeImage>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.profiling.provider.TimingLaunchConfigurationType"
            icon="icons/time_obj.gif"
            id="org.eclipse.linuxtools.profiling.provider.TimingLaunchConfigurationType.image">
      </launchConfigurationTypeImage>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.profiling.provider.MemoryLaunchConfigurationType"
            icon="icons/memory_view.gif"
            id="org.eclipse.linuxtools.profiling.provider.MemoryLaunchConfigurationType.image">
      </launchConfigurationTypeImage>
   </extension>
   <extension
         point="org.eclipse.ui.propertyPages">
      <page
            category="org.eclipse.cdt.ui.newui.Page_head_general"
            class="org.eclipse.linuxtools.internal.profiling.launch.provider.ProfilingPropertyPage"
            id="org.eclipse.linuxtools.profiling.launch.provider.properties.page"
            name="%profiling.property.page.name">
            <filter
               name="projectNature"
               value="org.eclipse.cdt.core.cnature" />
            <enabledWhen>
              <adapt type="org.eclipse.core.resources.IProject" />
         </enabledWhen>
      </page>
   </extension>
   <extension
         point="org.eclipse.cdt.ui.cPropertyTab">
      <tab
            class="org.eclipse.linuxtools.internal.profiling.launch.provider.TimingPropertyTab"
            icon="icons/time_obj.gif"
            name="%page.name.0"
            parent="org.eclipse.linuxtools.internal.profiling.launch.provider.ProfilingPropertyPage"
            weight="010">
      </tab>
      <tab
            class="org.eclipse.linuxtools.internal.profiling.launch.provider.MemoryPropertyTab"
            icon="icons/memory_view.gif"
            name="%page.name.1"
            parent="org.eclipse.linuxtools.internal.profiling.launch.provider.ProfilingPropertyPage"
            weight="011">
      </tab>
      <tab
            class="org.eclipse.linuxtools.internal.profiling.launch.provider.CoveragePropertyTab"
            icon="icons/toggle.gif"
            name="%page.name.2"
            parent="org.eclipse.linuxtools.internal.profiling.launch.provider.ProfilingPropertyPage"
            weight="012">
      </tab>
   </extension>
   <extension
         point="org.eclipse.linuxtools.profiling.launch.RemoteResourceSelectorProxy">
      <resourceSelectorProxy
            class="org.eclipse.linuxtools.profiling.launch.ui.LocalResourceSelectorProxy"
            isDefault="true"
            scheme="local"
            schemeLabel="Local">
      </resourceSelectorProxy>
   </extension>
   <extension
         point="org.eclipse.ui.popupMenus">
      <objectContribution
            adaptable="true"
            id="org.eclipse.linuxtools.profiling.launch.menu"
            objectClass="org.eclipse.core.resources.IResource">
         <action
               class="org.eclipse.linuxtools.internal.profiling.launch.ProfileContextualLaunchAction"
               enablesFor="+"
               id="org.eclipse.linuxtools.profiling.launch.submenu"
               label="Profiling Tools"
               menubarPath="additions"
               style="pulldown">
         </action>
      </objectContribution>
   </extension>
      <extension
         point="org.eclipse.debug.ui.launchGroups">
      <launchGroup
            bannerImage="icons/profile_wiz.png"
            id="org.eclipse.debug.ui.launchGroup.profilee"
            image="icons/time_obj.gif"
            label="Profiling Tools"
            mode="linuxtools"
            title="Profiling Tools">
      </launchGroup>
   </extension>
      <extension
            point="org.eclipse.debug.core.launchModes">
         <launchMode
               label="Profile"
               launchAsLabel="Linux Profiling Tools"
               mode="linuxtools">
         </launchMode>
      </extension>
   <extension point="org.eclipse.debug.core.launchDelegates">
      <launchDelegate
            id="org.eclipse.linuxtools.profiling.launch.profilingDelegate"
            type="org.eclipse.cdt.launch.applicationLaunchType"
            modes="profile"
            delegate="org.eclipse.linuxtools.internal.profiling.launch.provider.launch.ProviderLaunchConfigurationDelegate"
            name="ProfilingDelegate"
            delegateDescription="%launchDelegate.localApplication.description"
            sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchDelegate>
     </extension>
      <extension
            point="org.eclipse.debug.ui.launchConfigurationTabs">
       <!-- Profiling launch tabs-->
      <tab
            id="org.eclipse.linuxtools.profiling.launch.profileApplicationLaunch.mainTab"
            group="org.eclipse.cdt.launch.applicationProfileLaunchTabGroup"
            name="%MainTab.name"
            class="org.eclipse.cdt.launch.ui.CMainTab2">
        <associatedDelegate delegate="org.eclipse.linuxtools.profiling.launch.profilingDelegate"/>
      </tab>
      <tab
            id="org.eclipse.linuxtools.profiling.launch.profileApplicationLaunch.argumentsTab"
            group="org.eclipse.cdt.launch.applicationProfileLaunchTabGroup"
            name="%ArgumentsTab.name"
            class="org.eclipse.cdt.launch.ui.CArgumentsTab">
        <associatedDelegate delegate="org.eclipse.linuxtools.profiling.launch.profilingDelegate"/>
        <placement after="org.eclipse.cdt.cdi.launch.mainTab"/>
      </tab>
      <tab
            id="org.eclipse.linuxtools.profiling.launch.profileApplicationLaunch.environmentTab"
            group="org.eclipse.cdt.launch.applicationProfileLaunchTabGroup"
            name="%EnvironmentTab.name"
            class="org.eclipse.debug.ui.EnvironmentTab">
        <associatedDelegate delegate="org.eclipse.linuxtools.profiling.launch.profilingDelegate"/>
        <placement after="org.eclipse.cdt.cdi.launch.argumentsTab"/>
      </tab>
      <tab
            id="org.eclipse.linuxtools.profiling.launch.profileApplicationLaunch.commonTab"
            group="org.eclipse.cdt.launch.applicationProfileLaunchTabGroup"
            name="%CommonTab.name"
            class="org.eclipse.debug.ui.CommonTab">
        <associatedDelegate delegate="org.eclipse.linuxtools.profiling.launch.profilingDelegate"/>
        <placement after="org.eclipse.debug.ui.environmentTab"/>
      </tab>
      <tab
            id="org.eclipse.linuxtools.profiling.launch.profileApplicationLaunch.profilingTab"
            group="org.eclipse.cdt.launch.applicationProfileLaunchTabGroup"
            name="%ProfilerTab.name"
            class="org.eclipse.linuxtools.internal.profiling.launch.CProfilingOptionsTab">
        <associatedDelegate delegate="org.eclipse.linuxtools.profiling.launch.profilingDelegate"/>
        <placement after="org.eclipse.debug.ui.commonTab"/>
      </tab>
      </extension>
      <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            type="org.eclipse.cdt.launch.applicationLaunchType"
            class="org.eclipse.linuxtools.profiling.launch.PlaceHolderLaunchConfigurationTabGroup"
            id="org.eclipse.cdt.launch.applicationProfileLaunchTabGroup">
         <launchMode mode="profile"/>
      </launchConfigurationTabGroup>
      </extension>
         <extension
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            label="%localCApplication.label.0"
            icon="icons/time_obj.gif"
            modes="profile"
            class="org.eclipse.linuxtools.internal.profiling.launch.CApplicationLaunchShortcut"
            id="org.eclipse.linuxtools.profiling.launch.localCShortcut">
         <contextualLaunch>
           <enablement>
             <with variable="selection">
               <count value="1"/>
               <iterate>
                   <or>
                     <instanceof value="org.eclipse.cdt.core.model.IBinary"/>
                     <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
                     <test
                           forcePluginActivation="true"
                           property="org.eclipse.cdt.launch.isExecutable"/>
                     <test
                           forcePluginActivation="true"
                           property="org.eclipse.cdt.launch.isCProject"/>
                     <and>
                       <instanceof value="org.eclipse.ui.IFileEditorInput"/>
                       <adapt type="org.eclipse.core.resources.IResource">
                         <adapt type="org.eclipse.cdt.core.model.ICElement"/>
                       </adapt>
                     </and>
                   </or>
               </iterate>
             </with>
           </enablement>
         </contextualLaunch>
         <description
             mode="profile"
             description="Profiles a local C/C++ application"/>
         <configurationType
               id="org.eclipse.cdt.launch.applicationLaunchType">
         </configurationType>
    </shortcut>
   </extension>
         <extension
               point="org.eclipse.core.expressions.propertyTesters">
            <propertyTester
                  class="org.eclipse.linuxtools.profiling.launch.ProfileCategoryEnablementTester"
                  id="org.eclipse.linuxtools.profiling.launch.CodeCoverageEnablementTester"
                  namespace="org.eclipse.linuxtools.profiling.launch"
                  properties="categoryEnabled"
                  type="java.lang.Object">
            </propertyTester>
         </extension>
</plugin>
