<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.4"?>
<plugin>

   <extension
         point="org.eclipse.ui.views">
      <view
            name="Perf Profile View"
            icon="icons/file.gif"
            category="org.eclipse.linuxtools.profiling.ui"
            class="org.eclipse.linuxtools.internal.perf.ui.PerfProfileView"
            id="org.eclipse.linuxtools.perf.ui.ProfileView">
      </view>
      <view
            category="org.eclipse.linuxtools.profiling.ui"
            class="org.eclipse.linuxtools.internal.perf.ui.PerfProfileView"
            icon="icons/file.gif"
            id="org.eclipse.linuxtools.perf.ui.RemoteProfileView"
            name="Remote Perf Profile View"
            restorable="true">
      </view>
      <view
            allowMultiple="true"
            category="org.eclipse.linuxtools.profiling.ui"
            class="org.eclipse.linuxtools.internal.perf.ui.SourceDisassemblyView"
            icon="icons/symbol.gif"
            id="org.eclipse.linuxtools.perf.ui.SourceDisassemblyView"
            name="Perf Source Disassembly">
      </view>
      <view
            allowMultiple="false"
            category="org.eclipse.linuxtools.profiling.ui"
            class="org.eclipse.linuxtools.internal.perf.ui.StatView"
            icon="icons/symbol.gif"
            id="org.eclipse.linuxtools.perf.ui.StatView"
            name="Perf Statistics">
      </view>
      <view
            allowMultiple="true"
            category="org.eclipse.linuxtools.profiling.ui"
            class="org.eclipse.linuxtools.internal.perf.ui.ReportComparisonView"
            icon="icons/symbol.gif"
            id="org.eclipse.linuxtools.perf.ui.ReportViewDiff"
            name="Perf Comparison"
            restorable="true">
      </view>
   </extension>
   <extension
         point="org.eclipse.help.contexts">
      <contexts
            file="contexts.xml">
      </contexts>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            class="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchShortcut"
            icon="icons/symbol.gif"
            id="org.eclipse.linuxtools.perf.launch.profileshortcut"
            label="Profile with Perf"
            modes="linuxtools">
         <contextualLaunch>
            <enablement>
               <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>
            </enablement>
         </contextualLaunch>
      </shortcut>
   </extension>
   <extension
         point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchConfigDelegate"
            id="org.eclipse.linuxtools.perf.launch.profile"
            modes="linuxtools"
            name="Profile with Perf"
            public="true"
            sourceLocatorId="org.eclipse.cdt.launch.DefaultSourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchConfigDelegate"
            id="org.eclipse.linuxtools.perf.remote.launch.profile"
            modes="linuxtools"
            name="Profile with Perf (Remote)"
            public="true"
            sourceLocatorId="org.eclipse.cdt.launch.DefaultSourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            class="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchConfigurationTabGroup"
            description="%launchConfigurationTabGroup.description.0"
            id="org.eclipse.linuxtools.perf.launch.launchConfigurationTabGroup"
            type="org.eclipse.linuxtools.perf.launch.profile">
      </launchConfigurationTabGroup>
      <launchConfigurationTabGroup
            class="org.eclipse.linuxtools.internal.perf.remote.launch.PerfLaunchConfigurationTabGroup"
            description="%launchConfigurationTabGroup.description.1"
            id="org.eclipse.linuxtools.perf.remote.launch.launchConfigurationTabGroup"
            type="org.eclipse.linuxtools.perf.remote.launch.profile">
      </launchConfigurationTabGroup>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.perf.launch.profile"
            icon="icons/symbol.gif"
            id="org.eclipse.linuxtools.perf.launch.perfImage">
      </launchConfigurationTypeImage>
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.perf.remote.launch.profile"
            icon="icons/symbol.gif"
            id="org.eclipse.linuxtools.perf.remote.launch.perfImage">
      </launchConfigurationTypeImage>
   </extension>
   <extension
         point="org.eclipse.ui.editors">
      <editor
            default="true"
            id="org.eclipse.linuxtools.perf.editor"
            launcher="org.eclipse.linuxtools.internal.perf.launch.PerfOpenData"
            name="%perfReportViewName">
         <contentTypeBinding
               contentTypeId="org.eclipse.linuxtools.perf.report.content-type">
         </contentTypeBinding>
      </editor>
      <editor
            default="true"
            id="org.eclipse.linuxtools.perf.stat.launch"
            launcher="org.eclipse.linuxtools.internal.perf.handlers.PerfStatDataOpenHandler"
            name="%perfStatViewName">
         <contentTypeBinding
               contentTypeId="org.eclipse.linuxtools.perf.stat.content-type">
         </contentTypeBinding>
      </editor>
   </extension>
   <extension
         point="org.eclipse.linuxtools.profiling.launch.launchProvider">
      <provider
            delegate="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchConfigDelegate"
            description="%perfLaunchConfiguration.description"
            id="org.eclipse.linuxtools.perf.provider"
            information="%perfLaunchConfiguration.information"
            name="%perfLaunchConfiguration.name.0"
            priority="1"
            shortcut="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchShortcut"
            tabgroup="org.eclipse.linuxtools.internal.perf.launch.PerfLaunchConfigurationTabGroup"
            type="timing">
      </provider>
   </extension>
   <extension
         point="org.eclipse.ui.menus">
      <menuContribution
            allPopups="false"
            locationURI="menu:org.eclipse.linuxtools.perf.ui.ProfileView">
         <command
               commandId="org.eclipse.linuxtools.perf.SaveData"
               id="org.eclipse.linuxtools.perf.SaveCommand"
               label="%perfSaveCurrentSession"
               style="push">
         </command>
      </menuContribution>
      <menuContribution
            allPopups="false"
            locationURI="menu:org.eclipse.linuxtools.perf.ui.StatView">
         <command
               commandId="org.eclipse.linuxtools.perf.SaveStatData"
               id="org.eclipse.linuxtools.perf.SaveStatData"
               label="%perfSaveStatistics"
               style="push">
         </command>
         <command
               commandId="org.eclipse.linuxtools.perf.QuickStatDiff"
               id="org.eclipse.linuxtools.perf.QuickStatDiff"
               label="%perfCompareLatest"
               style="push">
         </command>
      </menuContribution>
   </extension>
   <extension
         point="org.eclipse.ui.commands">
      <command
            defaultHandler="org.eclipse.linuxtools.internal.perf.handlers.PerfSaveSessionHandler"
            id="org.eclipse.linuxtools.perf.SaveData"
            name="%perfSaveCurrentSession">
      </command>
      <command
            defaultHandler="org.eclipse.linuxtools.internal.perf.handlers.PerfSaveStatsHandler"
            id="org.eclipse.linuxtools.perf.SaveStatData"
            name="%perfSaveStatistics">
      </command>
      <command
            defaultHandler="org.eclipse.linuxtools.internal.perf.handlers.PerfStatsQuickDiffHandler"
            id="org.eclipse.linuxtools.perf.QuickStatDiff"
            name="%perfCompareLatest">
      </command>
      <!--
      Expose org.eclipse.team.internal.ui.actions.CompareAction so that it may
      executed programmatically using the ICommandService API. We need to do it
      this way to avoid using the internal class while passing the ExecutionEvent.
      -->
      <command
            defaultHandler="org.eclipse.team.internal.ui.actions.CompareAction"
            id="org.eclipse.linuxtools.perf.CompareAction"
            name="Perf Compare Action">
      </command>
   </extension>
   <extension
         point="org.eclipse.compare.contentMergeViewers">
      <viewer
            class="org.eclipse.linuxtools.internal.perf.ui.StatComparisonViewCreator"
            id="org.eclipse.linuxtools.perf.statdiff"
            label="%perfStatCompare.label">
      </viewer>
      <viewer
            class="org.eclipse.linuxtools.internal.perf.ui.ReportComparisonViewCreator"
            id="org.eclipse.linuxtools.perf.reportdiff"
            label="%perfReportCompare.label">
      </viewer>
      <contentTypeBinding
            contentMergeViewerId="org.eclipse.linuxtools.perf.statdiff"
            contentTypeId="org.eclipse.linuxtools.perf.stat.content-type">
      </contentTypeBinding>
      <contentTypeBinding
            contentMergeViewerId="org.eclipse.linuxtools.perf.reportdiff"
            contentTypeId="org.eclipse.linuxtools.perf.report.content-type">
      </contentTypeBinding>
   </extension>
   <extension
         point="org.eclipse.core.contenttype.contentTypes">
      <content-type
            file-extensions="stat"
            id="org.eclipse.linuxtools.perf.stat.content-type"
            name="%perfStatData.name"
            priority="normal">
      </content-type>
      <content-type
            file-extensions="data"
            file-names="perf.data.old"
            id="org.eclipse.linuxtools.perf.report.content-type"
            name="%perfReportData.name"
            priority="normal">
      </content-type>
   </extension>
</plugin>
