Skip to content

Commit 8bfae81

Browse files
committed
feat: unify launch and debug configurations
1 parent a95a157 commit 8bfae81

10 files changed

Lines changed: 450 additions & 230 deletions

File tree

bundles/com.espressif.idf.core/plugin.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<?eclipse version="3.4"?>
33
<plugin>
44
<extension-point id="com.espressif.idf.core.toolchain" name="esptoolchain" schema="schema/com.espressif.idf.core.toolchain.exsd"/>
5+
<extension-point id="com.espressif.idf.core.launchDefaultsContributor" name="Launch Defaults Contributor" schema="schema/launchDefaultsContributor.exsd"/>
56
<extension
67
id="idfNature"
78
name="IDF Nature"
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<?xml version='1.0' encoding='UTF-8'?>
2+
<!-- Schema file written by PDE -->
3+
<schema targetNamespace="com.espressif.idf.core" xmlns="http://www.w3.org/2001/XMLSchema">
4+
<annotation>
5+
<appinfo>
6+
<meta.schema plugin="com.espressif.idf.core" id="launchDefaultsContributor" name="Launch Defaults Contributor"/>
7+
</appinfo>
8+
<documentation>
9+
[Enter description of this extension point.]
10+
</documentation>
11+
</annotation>
12+
13+
<element name="extension">
14+
<annotation>
15+
<appinfo>
16+
<meta.element />
17+
</appinfo>
18+
</annotation>
19+
<complexType>
20+
<choice minOccurs="1" maxOccurs="unbounded">
21+
<element ref="contributor"/>
22+
</choice>
23+
<attribute name="point" type="string" use="required">
24+
<annotation>
25+
<documentation>
26+
27+
</documentation>
28+
</annotation>
29+
</attribute>
30+
<attribute name="id" type="string">
31+
<annotation>
32+
<documentation>
33+
34+
</documentation>
35+
</annotation>
36+
</attribute>
37+
<attribute name="name" type="string">
38+
<annotation>
39+
<documentation>
40+
41+
</documentation>
42+
<appinfo>
43+
<meta.attribute translatable="true"/>
44+
</appinfo>
45+
</annotation>
46+
</attribute>
47+
</complexType>
48+
</element>
49+
50+
<element name="contributor">
51+
<complexType>
52+
<attribute name="class" type="string" use="required">
53+
<annotation>
54+
<documentation>
55+
56+
</documentation>
57+
<appinfo>
58+
<meta.attribute kind="java" basedOn=":com.espressif.idf.core.util.ILaunchDefaultsContributor"/>
59+
</appinfo>
60+
</annotation>
61+
</attribute>
62+
</complexType>
63+
</element>
64+
65+
<annotation>
66+
<appinfo>
67+
<meta.section type="since"/>
68+
</appinfo>
69+
<documentation>
70+
[Enter the first release in which this extension point appears.]
71+
</documentation>
72+
</annotation>
73+
74+
<annotation>
75+
<appinfo>
76+
<meta.section type="examples"/>
77+
</appinfo>
78+
<documentation>
79+
[Enter extension point usage example here.]
80+
</documentation>
81+
</annotation>
82+
83+
<annotation>
84+
<appinfo>
85+
<meta.section type="apiinfo"/>
86+
</appinfo>
87+
<documentation>
88+
[Enter API information here.]
89+
</documentation>
90+
</annotation>
91+
92+
<annotation>
93+
<appinfo>
94+
<meta.section type="implementation"/>
95+
</appinfo>
96+
<documentation>
97+
[Enter information about supplied implementation of this extension point.]
98+
</documentation>
99+
</annotation>
100+
101+
102+
</schema>
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
package com.espressif.idf.core.util;
2+
3+
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
4+
5+
public interface ILaunchDefaultsContributor
6+
{
7+
/**
8+
* Applies plugin-specific default values to a newly created launch configuration.
9+
*/
10+
void applyDefaults(ILaunchConfigurationWorkingCopy wc);
11+
}

bundles/com.espressif.idf.debug.gdbjtag.openocd/plugin.xml

Lines changed: 111 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
-->
1515

1616
<plugin>
17+
<extension
18+
point="org.eclipse.debug.core.launchConfigurationTypes">
19+
<launchConfigurationType
20+
id="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationType"
21+
modes="debug,run"
22+
name="%launchConfig.name"
23+
public="true">
24+
</launchConfigurationType>
25+
</extension>
1726

18-
<extension point="org.eclipse.debug.core.launchConfigurationTypes">
19-
<launchConfigurationType
20-
id="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationType"
21-
modes="debug,run"
22-
name="%launchConfig.name"
23-
public="true" />
24-
</extension>
2527

2628
<extension point="org.eclipse.debug.core.launchDelegates">
2729
<launchDelegate
@@ -34,6 +36,16 @@
3436
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
3537
type="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationType">
3638
</launchDelegate>
39+
<launchDelegate
40+
delegate="com.espressif.idf.debug.gdbjtag.openocd.dsf.LaunchConfigurationDelegate"
41+
delegateDescription="%launchDelegate.jtagDsf.description"
42+
id="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified"
43+
modes="debug"
44+
name="%launchDelegate.jtagDsf.name"
45+
sourceLocatorId="org.eclipse.cdt.debug.core.sourceLocator"
46+
sourcePathComputerId="org.eclipse.cdt.debug.core.sourcePathComputer"
47+
type="com.espressif.idf.launch.serial.launchConfigurationType">
48+
</launchDelegate>
3749
</extension>
3850

3951
<extension point="org.eclipse.debug.ui.launchConfigurationTypeImages">
@@ -181,58 +193,128 @@
181193
plugin="com.espressif.idf.debug.gdbjtag.openocd">
182194
</statusHandler>
183195
</extension>
184-
<extension
185-
point="org.eclipse.debug.ui.launchConfigurationTabs">
196+
<extension point="org.eclipse.debug.ui.launchConfigurationTabs">
197+
198+
<!-- LEGACY LAYOUT: Main Tab -->
186199
<tab
187200
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabMain"
188201
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
189202
id="org.eclipse.cdt.cdi.launch.mainTab"
190203
name="Main">
191204
</tab>
205+
206+
<!-- LEGACY LAYOUT: Debugger Tab -->
192207
<tab
193208
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabDebugger"
194209
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
195210
id="com.espressif.idf.debug.gdbjtag.openocd.ui.debuggertab"
196211
name="Debugger">
197-
<placement
198-
after="org.eclipse.cdt.cdi.launch.mainTab">
199-
</placement>
212+
<placement after="org.eclipse.cdt.cdi.launch.mainTab" />
200213
</tab>
214+
215+
<!-- LEGACY LAYOUT: Startup Tab -->
201216
<tab
202217
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabStartup"
203218
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
204219
id="com.espressif.idf.debug.gdbjtag.openocd.ui.startuptab"
205220
name="Startup">
206-
<placement
207-
after="com.espressif.idf.debug.gdbjtag.openocd.ui.debuggertab">
208-
</placement>
221+
<placement after="com.espressif.idf.debug.gdbjtag.openocd.ui.debuggertab" />
209222
</tab>
223+
224+
<!-- LEGACY LAYOUT: Source Lookup Tab -->
210225
<tab
211226
class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab"
212227
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
213-
id="org.eclipse.debug.ui.sourceLookupTab"
228+
id= "org.eclipse.debug.ui.sourceLookupTab"
214229
name="SourceLookupTab">
215-
<placement
216-
after="com.espressif.idf.debug.gdbjtag.openocd.ui.startuptab">
217-
</placement>
230+
<placement after="com.espressif.idf.debug.gdbjtag.openocd.ui.startuptab" />
218231
</tab>
232+
233+
<!-- LEGACY LAYOUT: Common Tab -->
234+
235+
<!-- 5. Common Tab -->
219236
<tab
220-
class="org.eclipse.debug.ui.CommonTab"
221-
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
222-
id="org.eclipse.debug.ui.commonTab"
223-
name="CommonTab">
224-
<placement
225-
after="org.eclipse.debug.ui.sourceLookupTab">
226-
</placement>
237+
class="org.eclipse.debug.ui.CommonTab"
238+
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
239+
id="org.eclipse.debug.ui.commonTab"
240+
name="CommonTab">
241+
<placement after="org.eclipse.debug.ui.sourceLookupTab" />
227242
</tab>
243+
244+
<!-- LEGACY LAYOUT: SVD Target Tab -->
228245
<tab
229246
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabSvdTarget"
230247
group="com.espressif.idf.debug.gdbjtag.openocd.launchConfigurationTabGroup"
231248
id="org.eclipse.embedcdt.debug.gdbjtag.ui.svdtab"
232249
name="TabSvdTarget">
233-
<placement
234-
after="org.eclipse.debug.ui.commonTab">
235-
</placement>
250+
<placement after="org.eclipse.debug.ui.commonTab" />
236251
</tab>
237252
</extension>
253+
<extension point="org.eclipse.debug.ui.launchConfigurationTabs">
254+
<!-- 1. Main Tab -->
255+
<tab
256+
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabMain"
257+
group="com.espressif.idf.launch.serial.ui.launchConfigurationTabGroup"
258+
id="org.eclipse.cdt.cdi.launch.mainTab"
259+
name="Main">
260+
<associatedDelegate delegate="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified" />
261+
</tab>
262+
263+
<!-- 2. Debugger Tab -->
264+
<tab
265+
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabDebugger"
266+
group="com.espressif.idf.launch.serial.ui.launchConfigurationTabGroup"
267+
id="com.espressif.idf.debug.gdbjtag.openocd.ui.debuggertab"
268+
name="Debugger">
269+
<placement after="org.eclipse.cdt.cdi.launch.mainTab" />
270+
<associatedDelegate delegate="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified" />
271+
</tab>
272+
273+
<!-- 3. Startup Tab -->
274+
<tab
275+
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabStartup"
276+
group="com.espressif.idf.launch.serial.ui.launchConfigurationTabGroup"
277+
id="com.espressif.idf.debug.gdbjtag.openocd.ui.startuptab"
278+
name="Startup">
279+
<placement after="com.espressif.idf.debug.gdbjtag.openocd.ui.debuggertab" />
280+
<associatedDelegate delegate="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified" />
281+
</tab>
282+
283+
<!-- 4. Source Lookup Tab -->
284+
<tab
285+
class="org.eclipse.debug.ui.sourcelookup.SourceLookupTab"
286+
group="com.espressif.idf.launch.serial.ui.launchConfigurationTabGroup"
287+
id="org.eclipse.debug.ui.sourceLookupTab"
288+
name="SourceLookupTab">
289+
<placement after="com.espressif.idf.debug.gdbjtag.openocd.ui.startuptab" />
290+
<associatedDelegate delegate="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified" />
291+
</tab>
292+
293+
<!-- 5. Common Tab -->
294+
<tab
295+
class="org.eclipse.debug.ui.CommonTab"
296+
group="com.espressif.idf.launch.serial.ui.launchConfigurationTabGroup"
297+
id="org.eclipse.debug.ui.commonTab"
298+
name="CommonTab">
299+
<placement after="org.eclipse.debug.ui.sourceLookupTab" />
300+
<associatedDelegate delegate="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified" />
301+
</tab>
302+
303+
<!-- 6. Svd Target Tab -->
304+
<tab
305+
class="com.espressif.idf.debug.gdbjtag.openocd.ui.TabSvdTarget"
306+
group="com.espressif.idf.launch.serial.ui.launchConfigurationTabGroup"
307+
id="org.eclipse.embedcdt.debug.gdbjtag.ui.svdtab"
308+
name="TabSvdTarget">
309+
<placement after="org.eclipse.debug.ui.commonTab" />
310+
<associatedDelegate delegate="com.espressif.idf.debug.gdbjtag.openocd.core.dsfLaunchDelegate.unified" />
311+
</tab>
312+
313+
</extension>
314+
<extension
315+
point="com.espressif.idf.core.launchDefaultsContributor">
316+
<contributor
317+
class="com.espressif.idf.debug.gdbjtag.openocd.preferences.OpenOCDDefaultsInjector">
318+
</contributor>
319+
</extension>
238320
</plugin>

0 commit comments

Comments
 (0)