From 301f99238416274606b82d0b14a2e0d2be511e56 Mon Sep 17 00:00:00 2001 From: Jonah Graham Date: Mon, 16 Dec 2024 13:53:41 -0500 Subject: [PATCH] Always show CDT Debug Preference Pages 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 https://github.com/eclipse-cdt/cdt/issues/972 --- NewAndNoteworthy/CDT-12.0.md | 15 +++++ .../dsf/gdb/launching/GdbLaunchDelegate.java | 2 + dsf/org.eclipse.cdt.dsf.ui/plugin.xml | 2 +- releng/org.eclipse.cdt/plugin.properties | 9 --- releng/org.eclipse.cdt/plugin.xml | 67 ------------------- 5 files changed, 18 insertions(+), 77 deletions(-) diff --git a/NewAndNoteworthy/CDT-12.0.md b/NewAndNoteworthy/CDT-12.0.md index 198292ff912..5ab17e5c6bb 100644 --- a/NewAndNoteworthy/CDT-12.0.md +++ b/NewAndNoteworthy/CDT-12.0.md @@ -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 diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java index bf84a51e921..57eec7cee33 100644 --- a/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java +++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java @@ -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(); diff --git a/dsf/org.eclipse.cdt.dsf.ui/plugin.xml b/dsf/org.eclipse.cdt.dsf.ui/plugin.xml index 301d9cce2a5..8845c655b5f 100644 --- a/dsf/org.eclipse.cdt.dsf.ui/plugin.xml +++ b/dsf/org.eclipse.cdt.dsf.ui/plugin.xml @@ -678,7 +678,7 @@ diff --git a/releng/org.eclipse.cdt/plugin.properties b/releng/org.eclipse.cdt/plugin.properties index 08050d2cb00..7ce5cf9eef8 100644 --- a/releng/org.eclipse.cdt/plugin.properties +++ b/releng/org.eclipse.cdt/plugin.properties @@ -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) \ No newline at end of file diff --git a/releng/org.eclipse.cdt/plugin.xml b/releng/org.eclipse.cdt/plugin.xml index c93d40f274f..5fb9179b059 100644 --- a/releng/org.eclipse.cdt/plugin.xml +++ b/releng/org.eclipse.cdt/plugin.xml @@ -15,71 +15,4 @@ pattern="org\.eclipse\.cdt\.dsf\.ui/org\.eclipse\.cdt\.dsf\.debug\.ui\.[A-Za-z]+\.viewmodel\.update\.actions\.refresh"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -