Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarin Wright2007-05-07 16:51:54 +0000
committerDarin Wright2007-05-07 16:51:54 +0000
commit4c7d125503905fcbb276a92a76252a58e3387aee (patch)
tree4307153f98a8829d81bf688bc39b9160b3db1b0f /org.eclipse.debug.ui
parentacef736900d688a6bbe3d95007ac6a3e52d83561 (diff)
downloadeclipse.platform.debug-4c7d125503905fcbb276a92a76252a58e3387aee.tar.gz
eclipse.platform.debug-4c7d125503905fcbb276a92a76252a58e3387aee.tar.xz
eclipse.platform.debug-4c7d125503905fcbb276a92a76252a58e3387aee.zip
Bug 144019 [KeyBindings] Constructed context shows in Keys pref page
Diffstat (limited to 'org.eclipse.debug.ui')
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java13
-rw-r--r--org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java3
2 files changed, 11 insertions, 5 deletions
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
index 51e5ffd93..163265df9 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java
@@ -422,12 +422,14 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
public void run() {
IWorkbenchWindow window = null;
try{
- if (targetId != null) {
+ if (targetId != null) {
+ // get the window to open the perspective in
window = getWindowForPerspective(targetId);
if (window == null) {
return;
}
+ // switch the perspective if user preference is set
if (shouldSwitchPerspective(window, targetId, IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND)) {
switchToPerspective(window, targetId);
window = getWindowForPerspective(targetId);
@@ -435,6 +437,8 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
return;
}
}
+
+ // make sure the shell is active
Shell shell= window.getShell();
if (shell != null) {
if (DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH)) {
@@ -444,8 +448,8 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
shell.forceActive();
}
}
- }
- if (targetId != null) {
+
+ // Activate a context for the launch
Object ca = fLaunchToContextActivations.get(launch);
if (ca == null) {
ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration();
@@ -458,7 +462,8 @@ public class PerspectiveManager implements ILaunchListener, ISuspendTriggerListe
String[] ids = service.getEnabledPerspectives();
IContextActivation[] activations = new IContextActivation[ids.length];
for (int i = 0; i < ids.length; i++) {
- Context context = contextServce.getContext(type + "." + ids[i]); //$NON-NLS-1$
+ // Include the word '.internal.' so the context is filtered from the key binding pref page (Bug 144019) also see ViewContextService.contextActivated()
+ Context context = contextServce.getContext(type + ".internal." + ids[i]); //$NON-NLS-1$
if (!context.isDefined()) {
context.define(context.getId(), null, null);
}
diff --git a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
index 4392f320d..ba5bc0a3b 100644
--- a/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
+++ b/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java
@@ -735,7 +735,8 @@ public class ViewContextService implements IDebugContextListener, IPerspectiveLi
try {
ILaunchConfigurationType type = launchConfiguration.getType();
// check if this perspective is enabled for the launch type
- if (fContextService.getActiveContextIds().contains(type.getIdentifier() + "." + getActivePerspective().getId())) { //$NON-NLS-1$
+ // Include the word '.internal.' so the context is filtered from the key binding pref page (Bug 144019) also see PerspectiveManager.handleBreakpointHit()
+ if (fContextService.getActiveContextIds().contains(type.getIdentifier() + ".internal." + getActivePerspective().getId())) { //$NON-NLS-1$
// get the leaf contexts to be activated
List workbenchContexts = DebugModelContextBindingManager.getDefault().getWorkbenchContextsForDebugContext(target);
// TODO: do we need to check if contexts are actually enabled in workbench first?

Back to the top