Skip to content

Commit

Permalink
Always show CDT Debug Preference Pages
Browse files Browse the repository at this point in the history
The CDT Debug Activites was originally added when we had two
distinct debuggers in CDT, the DSF one and the CDI one. To
eliminate confusion the preferences for the respective
debug infrastructures were only displayed if users actually
ran such a debug session.

Now with just one debug infrastructure, we should always display
the preference pages. It also removes some confusion that some
preference pages weren't visible until after you started the
debug session. So for example, users couldn't turn on or off
a bunch of default settings until after creating and launching
a debug session.

I have left the enableActivity call in GdbLaunchDelegate in
case any extenders were hiding some of their UI behind that key.

The only exception in the above is the View Performance preference
page which was misplaced in the top level Run/Debug preference
tree, even though it is CDT specific. That preference page has
been re-parented to C/C++ -> Debug

Fixes eclipse-cdt#972
  • Loading branch information
jonahgraham committed Dec 16, 2024
1 parent 139fe3d commit 301f992
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 77 deletions.
15 changes: 15 additions & 0 deletions NewAndNoteworthy/CDT-12.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,21 @@ The managed build system now provides an option to specify other object files to

The new option applies to static library projects using a _Cross GCC_, _Cygwin GCC_, _Linux GCC_ or _MinGW GCC_ toolchain.

# Debug

## DSF Preference Pages always visible

The DSF Preference pages (Preferences -> C/C++ -> Debug -> GDB and children) are not always shown to users.
Prior to CDT 12 these were not visible until after the first debug session was started.

At the first debug session CDT enables the [activity](https://help.eclipse.org/latest/topic/org.eclipse.platform.doc.isv/reference/extension-points/org_eclipse_ui_activities.html) for DSF (`org.eclipse.cdt.debug.dsfgdbActivity`), with this change nothing in CDT is bound to this activity key anymore.

## Preferences -> Run/Debug -> View Performance relocated

The View Performance preference page, which is CDT specific, has been relocated to the Preferences -> C/C++ -> Debug section of preferences.
This only affects where in the Preferences tree the page is located, the preferences and key names have not changed.
In addition, this page is always visible.

# API Changes, current and planned

## Breaking API changes
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ public GdbLaunchDelegate(boolean requireCProject) {
@Override
public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor)
throws CoreException {
// This activity is no longer used within CDT, but this enablement is left for extenders who were
// relying on the activity being enabled to show some UI.
org.eclipse.cdt.launch.LaunchUtils.enableActivity("org.eclipse.cdt.debug.dsfgdbActivity", true); //$NON-NLS-1$
if (monitor == null) {
monitor = new NullProgressMonitor();
Expand Down
2 changes: 1 addition & 1 deletion dsf/org.eclipse.cdt.dsf.ui/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@
<extension
point="org.eclipse.ui.preferencePages">
<page
category="org.eclipse.debug.ui.DebugPreferencePage"
category="org.eclipse.cdt.debug.ui.CDebugPreferencePage"
class="org.eclipse.cdt.dsf.debug.internal.ui.preferences.DsfDebugPreferencePage"
id="org.eclipse.cdt.dsf.debug.ui.preferences"
name="%preferencePage.name">
Expand Down
9 changes: 0 additions & 9 deletions releng/org.eclipse.cdt/plugin.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,3 @@ cheatsheet.helloworld.desc=Create a Hello World Program in C++
cheatsheet.helloworld.name=Hello World

activity.name = Debug Update Modes
activity.description.dsf = Debug Services Framework
activity.name.dsf = CDT-DSF Debug Services Framework

activity.description.dsfgdb = C/C++ debugging with the DSF GDB debugger
activity.name.dsfgdb = CDT DSF-GDB - GDB Debugging
activity.description.cdtdebug = Commands for C/C++ debugging
activity.name.cdtdebug = CDT Debug - C/C++ Development Tools
activity.description.cdigdb = C/C++ debugging with the CDI (legacy) GDB debugger
activity.name.cdigdb = CDT CDI-GDB - GDB Debugging (Legacy)
67 changes: 0 additions & 67 deletions releng/org.eclipse.cdt/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,71 +15,4 @@
pattern="org\.eclipse\.cdt\.dsf\.ui/org\.eclipse\.cdt\.dsf\.debug\.ui\.[A-Za-z]+\.viewmodel\.update\.actions\.refresh">
</activityPatternBinding>
</extension>

<extension
point="org.eclipse.ui.activities">

<activity
name="%activity.name.dsf"
description="%activity.description.dsf"
id="org.eclipse.cdt.dsf.ui.dsfActivity">
</activity>

<activityPatternBinding
activityId="org.eclipse.cdt.debug.ui.cdtActivity"
isEqualityPattern="true"
pattern="org.eclipse.cdt.dsf.ui/org.eclipse.cdt.dsf.debug.ui.preferences">
</activityPatternBinding>

<activity
name="%activity.name.dsfgdb"
description="%activity.description.dsfgdb"
id="org.eclipse.cdt.debug.dsfgdbActivity">
</activity>

<activityPatternBinding
activityId="org.eclipse.cdt.debug.dsfgdbActivity"
isEqualityPattern="true"
pattern="org.eclipse.cdt.dsf.gdb.ui/org.eclipse.cdt.dsf.gdb.ui.preferences">
</activityPatternBinding>

<activityPatternBinding
activityId="org.eclipse.cdt.debug.dsfgdbActivity"
isEqualityPattern="true"
pattern="org.eclipse.cdt.dsf.gdb.ui/org.eclipse.cdt.dsf.gdb.ui.preferences.TracepointActionsPreferencePage">
</activityPatternBinding>

<activity
name="%activity.name.cdtdebug"
description="%activity.description.cdtdebug"
id="org.eclipse.cdt.debug.ui.cdtActivity">
</activity>

<activityPatternBinding
activityId="org.eclipse.cdt.debug.ui.cdtActivity"
isEqualityPattern="true"
pattern="org.eclipse.cdt.debug.ui/org.eclipse.cdt.debug.ui.CDebugPreferencePage">
</activityPatternBinding>

<activityPatternBinding
activityId="org.eclipse.cdt.debug.ui.cdtActivity"
isEqualityPattern="true"
pattern="org.eclipse.cdt.debug.ui/org.eclipse.cdt.debug.ui.breakpointactions.ActionsPreferencePage">
</activityPatternBinding>

<activityPatternBinding
activityId="org.eclipse.cdt.debug.ui.cdtActivity"
isEqualityPattern="true"
pattern="org.eclipse.cdt.debug.ui/org.eclipse.cdt.debug.ui.SourcePreferencePage">
</activityPatternBinding>

<defaultEnablement id="org.eclipse.cdt.debug.ui.cdtActivity" />

<activity
name="%activity.name.cdigdb"
description="%activity.description.cdigdb"
id="org.eclipse.cdt.debug.cdigdbActivity">
</activity>

</extension>
</plugin>

0 comments on commit 301f992

Please sign in to comment.