aboutsummaryrefslogtreecommitdiffstats
blob: 00368a49b796269de58a2659364a05d92e44c9b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
   <extension
         point="org.eclipse.debug.core.launchConfigurationTypes">
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileLaunchConfigurationDelegate"
            id="org.eclipse.linuxtools.oprofile.launch.oprofile"
            modes="profile"
            name="%launchconfigurationtype.label"
            public="true"
            sourceLocatorId="org.eclipse.cdt.launch.DefaultSourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
      <launchConfigurationType
            delegate="org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileManualLaunchConfigurationDelegate"
            id="org.eclipse.linuxtools.oprofile.launch.oprofile.manual"
            modes="profile"
            name="%launchconfigurationtype.manual.label"
            public="true"
            sourceLocatorId="org.eclipse.cdt.launch.DefaultSourceLocator"
            sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer">
      </launchConfigurationType>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTypeImages">
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.oprofile.launch.oprofile"
            icon="icons/profile_run.png"
            id="org.eclipse.linuxtools.oprofile.launch.oprofileImage">
      </launchConfigurationTypeImage>
      <launchConfigurationTypeImage
            configTypeID="org.eclipse.linuxtools.oprofile.launch.oprofile.manual"
            icon="icons/profile_manual_run.png"
            id="org.eclipse.linuxtools.oprofile.launch.manual.oprofileImage">
      </launchConfigurationTypeImage>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
      <launchConfigurationTabGroup
            class="org.eclipse.linuxtools.internal.oprofile.launch.configuration.OprofileLaunchConfigurationTabGroup"
            id="org.eclipse.linuxtools.oprofile.launch.launchConfigurationTabGroup"
            type="org.eclipse.linuxtools.oprofile.launch.oprofile">
      </launchConfigurationTabGroup>
      <launchConfigurationTabGroup
            class="org.eclipse.linuxtools.internal.oprofile.launch.configuration.OprofileLaunchConfigurationTabGroup"
            id="org.eclipse.linuxtools.oprofile.launch.manualLaunchConfigurationTabGroup"
            type="org.eclipse.linuxtools.oprofile.launch.oprofile.manual">
      </launchConfigurationTabGroup>
   </extension>
   <extension
         point="org.eclipse.debug.ui.launchShortcuts">
      <shortcut
            class="org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileLaunchShortcut"
            icon="icons/profile_run.png"
            id="org.eclipse.linuxtools.oprofile.launch.profileshortcut"
            label="%launchshortcuts.label"
            modes="profile">
         <contextualLaunch>
           <enablement>
<!-- FIXME: this is not a proper enablement condition -->           
             <with variable="selection">
             	<count value="1"></count>

               <iterate>
                   <or>
                     <instanceof value="org.eclipse.cdt.core.model.IBinary"/>
                     <instanceof value="org.eclipse.cdt.core.model.ICProject"/>
                     <test property="org.eclipse.cdt.launch.isExecutable"/>
                     <test 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>
      </shortcut>
      <shortcut
            class="org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileManualLaunchShortcut"
            icon="icons/profile_manual_run.png"
            id="org.eclipse.linuxtools.oprofile.launch.profileshortcut.manual"
            label="%manual.launchshortcuts.label"
            modes="profile">
         <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.linuxtools.profiling.launch.launchProvider">
      <provider
            default="false"
            delegate="org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileLaunchConfigurationDelegate"
            id="org.eclipse.linuxtools.oprofile.launch.provider"
            name="Oprofile"
            priority="2"
            shortcut="org.eclipse.linuxtools.internal.oprofile.launch.launching.OprofileLaunchShortcut"
            tabgroup="org.eclipse.linuxtools.internal.oprofile.launch.configuration.OprofileLaunchConfigurationTabGroup"
            type="timing">
      </provider>
   </extension>
</plugin>