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 /dsf/org.eclipse.cdt.dsf.ui
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
Diffstat (limited to 'dsf/org.eclipse.cdt.dsf.ui')
-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
4 files changed, 55 insertions, 2 deletions
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$
}
/*

Back to the top