mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-08-13 19:25:38 +02:00
Bug 303440 - [preferences] Unify and clarify debug preference pages
This commit is contained in:
parent
5d4fc7432c
commit
857c5eae68
11 changed files with 201 additions and 7 deletions
|
@ -136,4 +136,38 @@
|
|||
</breakpointLabels>
|
||||
</extension>
|
||||
|
||||
<extension
|
||||
point="org.eclipse.ui.activities">
|
||||
|
||||
<category
|
||||
name="CDT CDI-GDB - GDB Debugging (Legacy)"
|
||||
description="C/C++ debugging with the CDI (legacy) GDB debugger"
|
||||
id="org.eclipse.cdt.debug.cdigdbCategory">
|
||||
</category>
|
||||
|
||||
<categoryActivityBinding
|
||||
activityId="org.eclipse.cdt.debug.cdigdbActivity"
|
||||
categoryId="org.eclipse.cdt.debug.cdigdbCategory">
|
||||
</categoryActivityBinding>
|
||||
|
||||
<activity
|
||||
name="CDT CDI-GDB - GDB Debugging (Legacy)"
|
||||
description="C/C++ debugging with the CDI (legacy) GDB debugger"
|
||||
id="org.eclipse.cdt.debug.cdigdbActivity">
|
||||
</activity>
|
||||
|
||||
<activityPatternBinding
|
||||
activityId="org.eclipse.cdt.debug.cdigdbActivity"
|
||||
isEqualityPattern="true"
|
||||
pattern="org.eclipse.cdt.debug.mi.ui/org.eclipse.cdt.debug.mi.ui.MIPreferencePage">
|
||||
</activityPatternBinding>
|
||||
|
||||
<activityPatternBinding
|
||||
activityId="org.eclipse.cdt.debug.cdigdbActivity"
|
||||
isEqualityPattern="true"
|
||||
pattern="org.eclipse.cdt.debug.ui/org.eclipse.cdt.debug.ui.DebuggerTypesPreferencePage">
|
||||
</activityPatternBinding>
|
||||
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -2399,4 +2399,48 @@
|
|||
commandId="org.eclipse.cdt.debug.ui.command.castToArray">
|
||||
</handler>
|
||||
</extension>
|
||||
|
||||
|
||||
<extension
|
||||
point="org.eclipse.ui.activities">
|
||||
|
||||
<category
|
||||
name="CDT Debug - C/C++ Development Tools"
|
||||
description="Commands for C/C++ debugging"
|
||||
id="org.eclipse.cdt.debug.ui.cdtCategory">
|
||||
</category>
|
||||
|
||||
<categoryActivityBinding
|
||||
activityId="org.eclipse.cdt.debug.ui.cdtActivity"
|
||||
categoryId="org.eclipse.cdt.debug.ui.cdtCategory">
|
||||
</categoryActivityBinding>
|
||||
|
||||
<activity
|
||||
name="CDT Debug - C/C++ Development Tools"
|
||||
description="Commands for C/C++ debugging"
|
||||
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" />
|
||||
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -305,7 +305,7 @@
|
|||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
category="org.eclipse.cdt.dsf.debug.ui.preferences"
|
||||
category="org.eclipse.cdt.debug.ui.CDebugPreferencePage"
|
||||
class="org.eclipse.cdt.dsf.gdb.internal.ui.preferences.GdbDebugPreferencePage"
|
||||
id="org.eclipse.cdt.dsf.gdb.ui.preferences"
|
||||
name="%gdbPreferencePage.name">
|
||||
|
@ -511,4 +511,38 @@
|
|||
</action>
|
||||
</viewerContribution>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.activities">
|
||||
|
||||
<category
|
||||
name="CDT DSF-GDB - GDB Debugging"
|
||||
description="C/C++ debugging with the DSF GDB debugger"
|
||||
id="org.eclipse.cdt.debug.dsfgdbCategory">
|
||||
</category>
|
||||
|
||||
<categoryActivityBinding
|
||||
activityId="org.eclipse.cdt.debug.dsfgdbActivity"
|
||||
categoryId="org.eclipse.cdt.debug.dsfgdbCategory">
|
||||
</categoryActivityBinding>
|
||||
|
||||
<activity
|
||||
name="CDT DSF-GDB - GDB Debugging)"
|
||||
description="C/C++ debugging with the DSF GDB debugger"
|
||||
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>
|
||||
|
||||
</extension>
|
||||
|
||||
</plugin>
|
||||
|
|
|
@ -58,7 +58,9 @@ public class GdbLaunchDelegate extends AbstractCLaunchDelegate2
|
|||
private final static String NON_STOP_FIRST_VERSION = "6.8.50"; //$NON-NLS-1$
|
||||
private boolean isNonStopSession = false;
|
||||
|
||||
@Override
|
||||
public void launch( ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor ) throws CoreException {
|
||||
org.eclipse.cdt.launch.LaunchUtils.enableActivity("org.eclipse.cdt.debug.dsfgdbActivity", true); //$NON-NLS-1$
|
||||
if ( monitor == null ) {
|
||||
monitor = new NullProgressMonitor();
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ menu.updateScope = Update Scope
|
|||
|
||||
menu.numberFormat = Number Format
|
||||
|
||||
preferencePage.name = DSF
|
||||
preferencePage.name = View Performance
|
||||
|
||||
action.expandStack.label = E&xpand Stack
|
||||
|
||||
|
|
|
@ -495,7 +495,7 @@
|
|||
</page>
|
||||
<page
|
||||
class="org.eclipse.cdt.dsf.debug.internal.ui.disassembly.preferences.DisassemblyPreferencePage"
|
||||
category="org.eclipse.cdt.dsf.debug.ui.preferences"
|
||||
category="org.eclipse.cdt.debug.ui.CDebugPreferencePage"
|
||||
name="%disassemblyPreferencePage.name"
|
||||
id="org.eclipse.cdt.dsf.debug.ui.disassembly.preferencePage"/>
|
||||
</extension>
|
||||
|
@ -679,7 +679,36 @@
|
|||
activityId="org.eclipse.cdt.dsf.ui.activity.updateModes"
|
||||
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">
|
||||
|
||||
<category
|
||||
name="CDT-DSF Debug Services Framework"
|
||||
description="Debug Services Framework"
|
||||
id="org.eclipse.cdt.dsf.ui.dsfCategory">
|
||||
</category>
|
||||
|
||||
<categoryActivityBinding
|
||||
activityId="org.eclipse.cdt.dsf.ui.dsfActivity"
|
||||
categoryId="org.eclipse.cdt.dsf.ui.dsfCategory">
|
||||
</categoryActivityBinding>
|
||||
|
||||
<activity
|
||||
name="CDT-DSF Debug Services Framework"
|
||||
description="Debug Services Framework"
|
||||
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>
|
||||
|
||||
</extension>
|
||||
|
||||
<extension point="org.eclipse.core.runtime.adapters">
|
||||
<factory
|
||||
class="org.eclipse.cdt.dsf.debug.internal.ui.SuspendResumeAdapterFactory"
|
||||
|
|
|
@ -11,8 +11,14 @@
|
|||
|
||||
package org.eclipse.cdt.dsf.debug.ui;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.dsf.internal.ui.DsfUIPlugin;
|
||||
import org.eclipse.jface.preference.IPreferenceStore;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.activities.IActivityManager;
|
||||
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
|
||||
|
||||
/**
|
||||
* @since 1.1
|
||||
|
@ -24,4 +30,19 @@ public class DsfDebugUITools {
|
|||
return DsfUIPlugin.getDefault().getPreferenceStore();
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void enableActivity(String activityID, boolean enableit)
|
||||
{
|
||||
IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
|
||||
IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
|
||||
Set<String> enabledActivityIds = new HashSet<String>(activityManager.getEnabledActivityIds());
|
||||
boolean changed = false;
|
||||
if (enableit)
|
||||
changed = enabledActivityIds.add(activityID);
|
||||
else
|
||||
changed = enabledActivityIds.remove(activityID);
|
||||
if (changed)
|
||||
workbenchActivitySupport.setEnabledActivityIds(enabledActivityIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -13,6 +13,7 @@ package org.eclipse.cdt.dsf.internal.ui;
|
|||
import org.eclipse.cdt.dsf.concurrent.IDsfStatusConstants;
|
||||
import org.eclipse.cdt.dsf.debug.internal.ui.disassembly.DisassemblyBackendDsfFactory;
|
||||
import org.eclipse.cdt.dsf.debug.internal.ui.disassembly.model.SourceDocumentProvider;
|
||||
import org.eclipse.cdt.dsf.debug.ui.DsfDebugUITools;
|
||||
import org.eclipse.cdt.dsf.ui.viewmodel.datamodel.IDMVMContext;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.Platform;
|
||||
|
@ -61,6 +62,8 @@ public class DsfUIPlugin extends AbstractUIPlugin {
|
|||
// Register the DSF backend for our disassembly view (the CDT debug UI
|
||||
// plugin registers the CDI one)
|
||||
Platform.getAdapterManager().registerAdapters(new DisassemblyBackendDsfFactory(), IDMVMContext.class);
|
||||
|
||||
DsfDebugUITools.enableActivity("org.eclipse.cdt.debug.ui.cdtActivity", true); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -23,8 +23,8 @@ import java.util.HashSet;
|
|||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
||||
|
@ -118,7 +118,13 @@ abstract public class AbstractCLaunchDelegate extends LaunchConfigurationDelegat
|
|||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
|
||||
public AbstractCLaunchDelegate() {
|
||||
super();
|
||||
org.eclipse.cdt.launch.LaunchUtils.enableActivity("org.eclipse.cdt.debug.cdigdbActivity", true); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.debug.core.model.LaunchConfigurationDelegate#getLaunch(org.eclipse.debug.core.ILaunchConfiguration, java.lang.String)
|
||||
*/
|
||||
@Override
|
||||
|
|
|
@ -11,11 +11,13 @@
|
|||
package org.eclipse.cdt.launch;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.IBinaryParser;
|
||||
import org.eclipse.cdt.core.ICExtensionReference;
|
||||
import org.eclipse.cdt.core.IBinaryParser.IBinaryObject;
|
||||
import org.eclipse.cdt.core.ICExtensionReference;
|
||||
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
|
||||
import org.eclipse.cdt.utils.CommandLineUtil;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
@ -26,6 +28,9 @@ import org.eclipse.core.runtime.Path;
|
|||
import org.eclipse.core.variables.IStringVariableManager;
|
||||
import org.eclipse.core.variables.VariablesPlugin;
|
||||
import org.eclipse.debug.core.ILaunchConfiguration;
|
||||
import org.eclipse.ui.PlatformUI;
|
||||
import org.eclipse.ui.activities.IActivityManager;
|
||||
import org.eclipse.ui.activities.IWorkbenchActivitySupport;
|
||||
|
||||
/**
|
||||
* Utility methods.
|
||||
|
@ -112,4 +117,20 @@ public class LaunchUtils {
|
|||
private static String[] parseArguments(String args) {
|
||||
return CommandLineUtil.argumentsToArray(args);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public static void enableActivity(String activityID, boolean enableit)
|
||||
{
|
||||
IWorkbenchActivitySupport workbenchActivitySupport = PlatformUI.getWorkbench().getActivitySupport();
|
||||
IActivityManager activityManager = workbenchActivitySupport.getActivityManager();
|
||||
Set<String> enabledActivityIds = new HashSet<String>(activityManager.getEnabledActivityIds());
|
||||
boolean changed = false;
|
||||
if (enableit)
|
||||
changed = enabledActivityIds.add(activityID);
|
||||
else
|
||||
changed = enabledActivityIds.remove(activityID);
|
||||
if (changed)
|
||||
workbenchActivitySupport.setEnabledActivityIds(enabledActivityIds);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -19,7 +19,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.debug.ui.memory.traditional.TraditionalRenderingPreferencePage"
|
||||
id="org.eclipse.cdt.debug.ui.memory.traditional.TraditionalRenderingPreferencePage"
|
||||
helpContextId="TraditionalRenderingPreferencePage_context"
|
||||
|
|
Loading…
Add table
Reference in a new issue