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 21263 Details for
Bug 95222
[KeyBindings] Bindings stop working (no shell activation event)
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]
Patch to "org.eclipse.ui.workbench"
Bug95222-org.eclipse.ui.workbench.patch (text/plain), 8.03 KB, created by
Douglas Pollock
on 2005-05-17 11:28:55 EDT
(
hide
)
Description:
Patch to "org.eclipse.ui.workbench"
Filename:
MIME Type:
Creator:
Douglas Pollock
Created:
2005-05-17 11:28:55 EDT
Size:
8.03 KB
patch
obsolete
>Index: Eclipse UI/org/eclipse/ui/internal/contexts/ContextAuthority.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextAuthority.java,v >retrieving revision 1.4 >diff -u -r1.4 ContextAuthority.java >--- Eclipse UI/org/eclipse/ui/internal/contexts/ContextAuthority.java 25 Apr 2005 20:32:54 -0000 1.4 >+++ Eclipse UI/org/eclipse/ui/internal/contexts/ContextAuthority.java 17 May 2005 15:24:43 -0000 >@@ -52,7 +52,7 @@ > * > * @since 3.1 > */ >-final class ContextAuthority implements ISourceProviderListener { >+public final class ContextAuthority implements ISourceProviderListener { > > /** > * Whether the context authority should kick into debugging mode. This >@@ -633,7 +633,7 @@ > * @param sourcePriority > * A bit mask of all the source priorities that have changed. > */ >- private final void sourceChanged(final int sourcePriority) { >+ public final void sourceChanged(final int sourcePriority) { > /* > * In this first phase, we cycle through all of the activations that > * could have potentially changed. Each such activation is added to a >@@ -788,7 +788,7 @@ > * Updates the evaluation context with the current state from all of the > * source providers. > */ >- private final void updateCurrentState() { >+ public final void updateCurrentState() { > final Iterator providerItr = providers.iterator(); > while (providerItr.hasNext()) { > final ISourceProvider provider = (ISourceProvider) providerItr >Index: Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java,v >retrieving revision 1.6 >diff -u -r1.6 ContextService.java >--- Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java 24 Mar 2005 01:01:13 -0000 1.6 >+++ Eclipse UI/org/eclipse/ui/internal/contexts/ContextService.java 17 May 2005 15:24:43 -0000 >@@ -35,7 +35,7 @@ > /** > * The central authority for determining which context we should use. > */ >- private final ContextAuthority contextAuthority; >+ public final ContextAuthority contextAuthority; > > /** > * The context manager that supports this service. This value is never >Index: Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java,v >retrieving revision 1.3 >diff -u -r1.3 HandlerAuthority.java >--- Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java 23 Mar 2005 20:19:38 -0000 1.3 >+++ Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java 17 May 2005 15:24:43 -0000 >@@ -43,7 +43,7 @@ > * > * @since 3.1 > */ >-final class HandlerAuthority implements ISourceProviderListener { >+public final class HandlerAuthority implements ISourceProviderListener { > > /** > * Whether the workbench command support should kick into debugging mode. >@@ -377,7 +377,7 @@ > * @param sourcePriority > * A bit mask of all the source priorities that have changed. > */ >- private final void sourceChanged(final int sourcePriority) { >+ public final void sourceChanged(final int sourcePriority) { > /* > * In this first phase, we cycle through all of the activations that > * could have potentially changed. Each such activation is added to a >@@ -517,7 +517,7 @@ > * Updates the evaluation context with the current state from all of the > * source providers. > */ >- private final void updateCurrentState() { >+ public final void updateCurrentState() { > fillInCurrentState(context); > } > } >Index: Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java,v >retrieving revision 1.5 >diff -u -r1.5 HandlerService.java >--- Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java 24 Mar 2005 01:01:13 -0000 1.5 >+++ Eclipse UI/org/eclipse/ui/internal/handlers/HandlerService.java 17 May 2005 15:24:44 -0000 >@@ -43,7 +43,7 @@ > /** > * The central authority for determining which handler we should use. > */ >- private final HandlerAuthority handlerAuthority; >+ public final HandlerAuthority handlerAuthority; > > /** > * Constructs a new instance of <code>CommandService</code> using a >Index: Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java,v >retrieving revision 1.78 >diff -u -r1.78 WorkbenchKeyboard.java >--- Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java 28 Apr 2005 19:29:43 -0000 1.78 >+++ Eclipse UI/org/eclipse/ui/internal/keys/WorkbenchKeyboard.java 17 May 2005 15:24:44 -0000 >@@ -29,17 +29,25 @@ > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.StyledText; > import org.eclipse.swt.widgets.Combo; >+import org.eclipse.swt.widgets.Control; > import org.eclipse.swt.widgets.Display; > import org.eclipse.swt.widgets.Event; > import org.eclipse.swt.widgets.Listener; > import org.eclipse.swt.widgets.Shell; > import org.eclipse.swt.widgets.Text; > import org.eclipse.swt.widgets.Widget; >+import org.eclipse.ui.ISources; > import org.eclipse.ui.IWindowListener; > import org.eclipse.ui.IWorkbench; > import org.eclipse.ui.IWorkbenchWindow; >+import org.eclipse.ui.contexts.IContextService; >+import org.eclipse.ui.handlers.IHandlerService; > import org.eclipse.ui.internal.Workbench; > import org.eclipse.ui.internal.WorkbenchPlugin; >+import org.eclipse.ui.internal.contexts.ContextAuthority; >+import org.eclipse.ui.internal.contexts.ContextService; >+import org.eclipse.ui.internal.handlers.HandlerAuthority; >+import org.eclipse.ui.internal.handlers.HandlerService; > import org.eclipse.ui.internal.misc.Policy; > import org.eclipse.ui.internal.util.Util; > import org.eclipse.ui.keys.IBindingService; >@@ -707,7 +715,40 @@ > .println("KEYS >>> WorkbenchKeyboard.press(potentialKeyStrokes = " //$NON-NLS-1$ > + potentialKeyStrokes + ")"); //$NON-NLS-1$ > } >- >+ >+ /* >+ * TODO Kludge. A partial workaround for Bug 56231. This should be >+ * removed once SWT fixes Bug 56231 such that activation works properly >+ * on all platforms. Commented out at the moment. >+ */ >+ if ("gtk".equals(SWT.getPlatform())) { //$NON-NLS-1$ >+ final Widget widget = event.widget; >+ >+ final ContextService contextService = (ContextService) workbench >+ .getAdapter(IContextService.class); >+ ContextAuthority contextAuthority = contextService.contextAuthority; >+ if ((widget instanceof Control) && (!widget.isDisposed())) { >+ final Shell shell = ((Control) widget).getShell(); >+ contextAuthority.sourceChanged(ISources.ACTIVE_SHELL, >+ ISources.ACTIVE_SHELL_NAME, shell); >+ } else { >+ contextAuthority.updateCurrentState(); >+ contextAuthority.sourceChanged(ISources.ACTIVE_SHELL); >+ } >+ >+ final HandlerService handlerService = (HandlerService) workbench >+ .getAdapter(IHandlerService.class); >+ HandlerAuthority handlerAuthority = handlerService.handlerAuthority; >+ if ((widget instanceof Control) && (!widget.isDisposed())) { >+ final Shell shell = ((Control) widget).getShell(); >+ handlerAuthority.sourceChanged(ISources.ACTIVE_SHELL, >+ ISources.ACTIVE_SHELL_NAME, shell); >+ } else { >+ handlerAuthority.updateCurrentState(); >+ handlerAuthority.sourceChanged(ISources.ACTIVE_SHELL); >+ } >+ } >+ > KeySequence sequenceBeforeKeyStroke = state.getCurrentSequence(); > for (Iterator iterator = potentialKeyStrokes.iterator(); iterator > .hasNext();) {
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 95222
:
21263
|
21370