Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKen Ryall2010-04-07 15:19:53 +0000
committerKen Ryall2010-04-07 15:19:53 +0000
commit857c5eae688574a290eeb7c1c4863efbef46a2ea (patch)
tree8787ee2d5cab58cd81f9c2e542804cad61ea9550
parent5d4fc7432caeec24a872ef9024404d5a79d4fdb1 (diff)
downloadorg.eclipse.cdt-857c5eae688574a290eeb7c1c4863efbef46a2ea.tar.gz
org.eclipse.cdt-857c5eae688574a290eeb7c1c4863efbef46a2ea.tar.xz
org.eclipse.cdt-857c5eae688574a290eeb7c1c4863efbef46a2ea.zip
Bug 303440 - [preferences] Unify and clarify debug preference pages
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/plugin.xml34
-rw-r--r--debug/org.eclipse.cdt.debug.ui/plugin.xml44
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml36
-rw-r--r--dsf-gdb/org.eclipse.cdt.dsf.gdb/src/org/eclipse/cdt/dsf/gdb/launching/GdbLaunchDelegate.java2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/plugin.properties2
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/plugin.xml31
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java21
-rw-r--r--dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java3
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java10
-rw-r--r--launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java23
-rw-r--r--memory/org.eclipse.cdt.debug.ui.memory.traditional/plugin.xml2
11 files changed, 201 insertions, 7 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml
index ebacefa621f..2c8ef969e5d 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.mi.ui/plugin.xml
@@ -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>
diff --git a/debug/org.eclipse.cdt.debug.ui/plugin.xml b/debug/org.eclipse.cdt.debug.ui/plugin.xml
index 13e20328df5..f39a3cefb80 100644
--- a/debug/org.eclipse.cdt.debug.ui/plugin.xml
+++ b/debug/org.eclipse.cdt.debug.ui/plugin.xml
@@ -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>
diff --git a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
index 53dee121099..f2dba5a34e7 100644
--- a/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
+++ b/dsf-gdb/org.eclipse.cdt.dsf.gdb.ui/plugin.xml
@@ -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>
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 eaeba2e8434..afcc8830d98 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
@@ -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();
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/plugin.properties b/dsf/org.eclipse.cdt.dsf.ui/plugin.properties
index ec8dddd372b..19146e9de1f 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/plugin.properties
+++ b/dsf/org.eclipse.cdt.dsf.ui/plugin.properties
@@ -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
diff --git a/dsf/org.eclipse.cdt.dsf.ui/plugin.xml b/dsf/org.eclipse.cdt.dsf.ui/plugin.xml
index 2c2baa79332..20d9953f3f1 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/plugin.xml
+++ b/dsf/org.eclipse.cdt.dsf.ui/plugin.xml
@@ -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"
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java
index 8ff52b7741d..8b378f26705 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/debug/ui/DsfDebugUITools.java
@@ -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);
+ }
+
}
diff --git a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java
index ed997000325..58e7fa37723 100644
--- a/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java
+++ b/dsf/org.eclipse.cdt.dsf.ui/src/org/eclipse/cdt/dsf/internal/ui/DsfUIPlugin.java
@@ -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$
}
/*
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
index 6f02af44067..a080fbde0f1 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/AbstractCLaunchDelegate.java
@@ -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
diff --git a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java
index 53a2ee98bd0..5dfe5420db8 100644
--- a/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java
+++ b/launch/org.eclipse.cdt.launch/src/org/eclipse/cdt/launch/LaunchUtils.java
@@ -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);
+ }
+
}
diff --git a/memory/org.eclipse.cdt.debug.ui.memory.traditional/plugin.xml b/memory/org.eclipse.cdt.debug.ui.memory.traditional/plugin.xml
index 907808dcd15..adeececc01c 100644
--- a/memory/org.eclipse.cdt.debug.ui.memory.traditional/plugin.xml
+++ b/memory/org.eclipse.cdt.debug.ui.memory.traditional/plugin.xml
@@ -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"

Back to the top