Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 65806 Details for
Bug 144019
[KeyBindings] Constructed context shows in Keys pref page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Fix
144019KeyBindingShowsInternalContext (text/plain), 6.23 KB, created by
Curtis Windatt
on 2007-05-03 13:20:51 EDT
(
hide
)
Description:
Fix
Filename:
MIME Type:
Creator:
Curtis Windatt
Created:
2007-05-03 13:20:51 EDT
Size:
6.23 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.debug.ui >Index: ui/org/eclipse/debug/internal/ui/views/ViewContextService.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/views/ViewContextService.java,v >retrieving revision 1.9 >diff -u -r1.9 ViewContextService.java >--- ui/org/eclipse/debug/internal/ui/views/ViewContextService.java 25 Oct 2006 19:55:07 -0000 1.9 >+++ ui/org/eclipse/debug/internal/ui/views/ViewContextService.java 3 May 2007 17:21:07 -0000 >@@ -735,7 +735,8 @@ > 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? >Index: ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.debug.ui/ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java,v >retrieving revision 1.91 >diff -u -r1.91 PerspectiveManager.java >--- ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java 21 Feb 2007 17:52:54 -0000 1.91 >+++ ui/org/eclipse/debug/internal/ui/launchConfigurations/PerspectiveManager.java 3 May 2007 17:21:07 -0000 >@@ -422,54 +422,57 @@ > public void run() { > IWorkbenchWindow window = null; > try{ >- 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); > if (window == null) { > return; > } >- >- if (shouldSwitchPerspective(window, targetId, IInternalDebugUIConstants.PREF_SWITCH_PERSPECTIVE_ON_SUSPEND)) { >- switchToPerspective(window, targetId); >- window = getWindowForPerspective(targetId); >- if (window == null) { >- return; >- } >- } >- Shell shell= window.getShell(); >- if (shell != null) { >- if (DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH)) { >- if (shell.getMinimized()) { >- shell.setMinimized(false); >- } >- shell.forceActive(); >+ } >+ >+ // make sure the shell is active >+ Shell shell= window.getShell(); >+ if (shell != null) { >+ if (DebugUIPlugin.getDefault().getPreferenceStore().getBoolean(IDebugUIConstants.PREF_ACTIVATE_WORKBENCH)) { >+ if (shell.getMinimized()) { >+ shell.setMinimized(false); > } >+ shell.forceActive(); > } > } >- if (targetId != null) { >- Object ca = fLaunchToContextActivations.get(launch); >- if (ca == null) { >- ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration(); >- if (launchConfiguration != null) { >- try { >- String type = launchConfiguration.getType().getIdentifier(); >- ViewContextService service = ViewContextManager.getDefault().getService(window); >- if (service != null) { >- IContextService contextServce = (IContextService) PlatformUI.getWorkbench().getAdapter(IContextService.class); >- 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$ >- if (!context.isDefined()) { >- context.define(context.getId(), null, null); >- } >- IContextActivation activation = contextServce.activateContext(context.getId()); >- activations[i] = activation; >+ >+ // Activate a context for the launch >+ Object ca = fLaunchToContextActivations.get(launch); >+ if (ca == null) { >+ ILaunchConfiguration launchConfiguration = launch.getLaunchConfiguration(); >+ if (launchConfiguration != null) { >+ try { >+ String type = launchConfiguration.getType().getIdentifier(); >+ ViewContextService service = ViewContextManager.getDefault().getService(window); >+ if (service != null) { >+ IContextService contextServce = (IContextService) PlatformUI.getWorkbench().getAdapter(IContextService.class); >+ String[] ids = service.getEnabledPerspectives(); >+ IContextActivation[] activations = new IContextActivation[ids.length]; >+ for (int i = 0; i < ids.length; i++) { >+ // 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); > } >- fLaunchToContextActivations.put(launch, activations); >+ IContextActivation activation = contextServce.activateContext(context.getId()); >+ activations[i] = activation; > } >- } catch (CoreException e) { >- DebugUIPlugin.log(e); >+ fLaunchToContextActivations.put(launch, activations); > } >+ } catch (CoreException e) { >+ DebugUIPlugin.log(e); > } > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 144019
: 65806