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 41357 Details for
Bug 137091
[KeyBindings] Toggle Mark Occurrences shortcut is broken
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]
right direction workbench patch v01
bug137091-ui.workbench-v01.txt (text/plain), 27.63 KB, created by
Paul Webster
on 2006-05-12 14:48:25 EDT
(
hide
)
Description:
right direction workbench patch v01
Filename:
MIME Type:
Creator:
Paul Webster
Created:
2006-05-12 14:48:25 EDT
Size:
27.63 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.ui.workbench >Index: Eclipse UI/org/eclipse/ui/internal/EditorReference.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorReference.java,v >retrieving revision 1.14 >diff -u -r1.14 EditorReference.java >--- Eclipse UI/org/eclipse/ui/internal/EditorReference.java 4 Apr 2006 18:12:56 -0000 1.14 >+++ Eclipse UI/org/eclipse/ui/internal/EditorReference.java 12 May 2006 18:44:31 -0000 >@@ -405,7 +405,7 @@ > > EditorSite site = new EditorSite(this, part, manager.page, descr); > >- site.setActionBars(new EditorActionBars(manager.page, site, getId())); >+ site.setActionBars(new EditorActionBars(manager.page, site.getWorkbenchWindow(), getId())); > try { > part.init(site, input); > } catch (PartInitException e) { >Index: Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java,v >retrieving revision 1.30 >diff -u -r1.30 EditorActionBars.java >--- Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java 24 Feb 2006 18:36:11 -0000 1.30 >+++ Eclipse UI/org/eclipse/ui/internal/EditorActionBars.java 12 May 2006 18:44:31 -0000 >@@ -10,6 +10,7 @@ > *******************************************************************************/ > package org.eclipse.ui.internal; > >+import org.eclipse.core.expressions.Expression; > import org.eclipse.jface.action.ActionContributionItem; > import org.eclipse.jface.action.ContributionManager; > import org.eclipse.jface.action.GroupMarker; >@@ -31,6 +32,8 @@ > import org.eclipse.ui.IWorkbenchPart; > import org.eclipse.ui.SubActionBars2; > import org.eclipse.ui.actions.RetargetAction; >+import org.eclipse.ui.internal.expressions.AndExpression; >+import org.eclipse.ui.internal.expressions.LegacyEditorContributionExpression; > import org.eclipse.ui.internal.misc.Policy; > import org.eclipse.ui.internal.provisional.presentations.IActionBarPresentationFactory; > import org.eclipse.ui.services.IServiceLocator; >@@ -89,6 +92,8 @@ > > private IActionBarPresentationFactory actionBarPresentation; > >+ private WorkbenchPage workbenchPage; >+ > /** > * Constructs the EditorActionBars for an editor. > */ >@@ -98,6 +103,7 @@ > this.type = type; > this.actionBarPresentation = ((WorkbenchWindow) page > .getWorkbenchWindow()).getActionBarPresentationFactory(); >+ this.workbenchPage = page; > } > > /** >@@ -327,7 +333,7 @@ > super.partChanged(part); > if (part instanceof IEditorPart) { > IEditorPart editor = (IEditorPart) part; >- setServiceLocator(editor.getEditorSite()); >+// setServiceLocator(editor.getEditorSite()); > if (editorContributor != null) { > editorContributor.setActiveEditor(editor); > } >@@ -470,4 +476,20 @@ > } > } > } >+ >+ private AndExpression fEditorHandlerExpression = null; >+ >+ /* (non-Javadoc) >+ * @see org.eclipse.ui.SubActionBars#getHandlerExpression() >+ */ >+ protected Expression getHandlerExpression() { >+ if (fEditorHandlerExpression == null) { >+ fEditorHandlerExpression = new AndExpression(); >+ fEditorHandlerExpression.add(super.getHandlerExpression()); >+ fEditorHandlerExpression >+ .add(new LegacyEditorContributionExpression(type, >+ workbenchPage.getWorkbenchWindow())); >+ } >+ return fEditorHandlerExpression; >+ } > } >Index: Eclipse UI/org/eclipse/ui/internal/EditorManager.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/EditorManager.java,v >retrieving revision 1.109 >diff -u -r1.109 EditorManager.java >--- Eclipse UI/org/eclipse/ui/internal/EditorManager.java 30 Mar 2006 01:36:58 -0000 1.109 >+++ Eclipse UI/org/eclipse/ui/internal/EditorManager.java 12 May 2006 18:44:31 -0000 >@@ -301,7 +301,7 @@ > } > > // Create a new action bar set. >- actionBars = new EditorActionBars(page, site, type); >+ actionBars = new EditorActionBars(page, site.getWorkbenchWindow(), type); > actionBars.addRef(); > actionCache.put(type, actionBars); > >@@ -333,7 +333,7 @@ > > // Create a new action bar set. > // Note: It is an empty set. >- EditorActionBars actionBars = new EditorActionBars(page, site, type); >+ EditorActionBars actionBars = new EditorActionBars(page, site.getWorkbenchWindow(), type); > actionBars.addRef(); > actionCache.put(type, actionBars); > >Index: Eclipse UI/org/eclipse/ui/internal/PartSite.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/PartSite.java,v >retrieving revision 1.86 >diff -u -r1.86 PartSite.java >--- Eclipse UI/org/eclipse/ui/internal/PartSite.java 8 May 2006 20:55:36 -0000 1.86 >+++ Eclipse UI/org/eclipse/ui/internal/PartSite.java 12 May 2006 18:44:31 -0000 >@@ -536,6 +536,8 @@ > buffer.append(getPluginId()); > buffer.append(",registeredName="); //$NON-NLS-1$ > buffer.append(getRegisteredName()); >+ buffer.append(",hashCode="); //$NON-NLS-1$ >+ buffer.append(hashCode()); > buffer.append(')'); > return buffer.toString(); > } >Index: Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java,v >retrieving revision 1.26 >diff -u -r1.26 HandlerAuthority.java >--- Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java 8 May 2006 20:55:52 -0000 1.26 >+++ Eclipse UI/org/eclipse/ui/internal/handlers/HandlerAuthority.java 12 May 2006 18:44:31 -0000 >@@ -144,6 +144,9 @@ > final void activateHandler(final IHandlerActivation activation) { > // First we update the handlerActivationsByCommandId map. > final String commandId = activation.getCommandId(); >+ if ("org.eclipse.jdt.ui.edit.text.java.open.external.javadoc".equals(commandId)) { //$NON-NLS-1$ >+ System.out.println(); >+ } > final Object value = handlerActivationsByCommandId.get(commandId); > if (value instanceof SortedSet) { > final SortedSet handlerActivations = (SortedSet) value; >Index: Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java,v >retrieving revision 1.12 >diff -u -r1.12 SlaveHandlerService.java >--- Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java 8 Feb 2006 16:09:24 -0000 1.12 >+++ Eclipse UI/org/eclipse/ui/internal/handlers/SlaveHandlerService.java 12 May 2006 18:44:31 -0000 >@@ -1 +1 @@ >-/******************************************************************************* * Copyright (c) 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.ui.internal.handlers; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.eclipse.core.commands.Command; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.IHandler; import org.eclipse.core.commands.NotEnabledException; import org.eclipse.core.commands.NotHandledException; import org.eclipse.core.commands.ParameterizedCommand; import org.eclipse.core.commands.common.NotDefinedException; import org.eclipse.core.expressions.Expression; import org.eclipse.core.expressions.IEvaluationContext; import org.eclipse.swt.widgets.Event; import org.eclipse.ui.ISourceProvider; import org.eclipse.ui.handlers.IHandlerActivation; import org.eclipse.ui.handlers.IHandlerService; import org.eclipse.ui.internal.expressions.AndExpression; /** * A handler service which delegates almost all responsibility to the parent * service. It is only responsible for disposing of locally activated handlers * when it is disposed. * <p> * This class is not intended for use outside of the * <code>org.eclipse.ui.workbench</code> plug-in. * </p> * * @since 3.2 */ public class SlaveHandlerService implements IHandlerService { /** * The default expression to use when * {@link #activateHandler(String, IHandler)} is called. Handlers * contributed using that method will only be active when this service is * active. However, this expression will be used for conflict resolution. */ protected final Expression defaultExpression; /** * A collection of source providers. The listeners are not * activated/deactivated, but they will be removed when this service is * disposed. */ private Collection fSourceProviders = new ArrayList(); /** * A map of the local activation to the parent activations. If this service * is inactive, then all parent activations are <code>null</code>. * Otherwise, they point to the corresponding activation in the parent * service. */ protected final Map localActivationsToParentActivations = new HashMap(); /** * The parent handler service to which all requests are ultimately routed. * This value is never <code>null</code>. */ protected final IHandlerService parent; /** * The activations registered with the parent handler service. This value is * never <code>null</code>. */ protected final Set parentActivations = new HashSet(); /** * Constructs a new instance. * * @param parentHandlerService * The parent handler service for this slave; must not be * <code>null</code>. * @param defaultExpression * The default expression to use if none is provided. This is * primarily used for conflict resolution. This value may be * <code>null</code>. */ public SlaveHandlerService(final IHandlerService parentHandlerService, final Expression defaultExpression) { if (parentHandlerService == null) { throw new NullPointerException( "The parent handler service cannot be null"); //$NON-NLS-1$ } this.defaultExpression = defaultExpression; this.parent = parentHandlerService; } public final IHandlerActivation activateHandler( final IHandlerActivation childActivation) { final String commandId = childActivation.getCommandId(); final IHandler handler = childActivation.getHandler(); final Expression childExpression = childActivation.getExpression(); final AndExpression expression; if (childExpression instanceof AndExpression) { expression = (AndExpression) childExpression; } else { expression = new AndExpression(); if (childExpression != null) { expression.add(childExpression); } } if (defaultExpression != null) { expression.add(defaultExpression); } final int depth = childActivation.getDepth() + 1; final IHandlerActivation localActivation = new HandlerActivation( commandId, handler, expression, depth, this); return doActivation(localActivation); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler) { final IHandlerActivation localActivation = new HandlerActivation( commandId, handler, defaultExpression, IHandlerActivation.ROOT_DEPTH, this); return doActivation(localActivation); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler, final Expression expression) { return activateHandler(commandId, handler, expression, false); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler, final Expression expression, final boolean global) { if (global) { final IHandlerActivation activation = parent.activateHandler( commandId, handler, expression, global); parentActivations.add(activation); return activation; } final AndExpression andExpression; if (expression instanceof AndExpression) { andExpression = (AndExpression) expression; } else { andExpression = new AndExpression(); if (expression != null) { andExpression.add(expression); } } if (defaultExpression != null) { andExpression.add(defaultExpression); } final IHandlerActivation localActivation = new HandlerActivation( commandId, handler, andExpression, IHandlerActivation.ROOT_DEPTH, this); return doActivation(localActivation); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler, final Expression expression, final int sourcePriorities) { return activateHandler(commandId, handler, expression); } public final void addSourceProvider(final ISourceProvider provider) { if (!fSourceProviders.contains(provider)) { fSourceProviders.add(provider); } parent.addSourceProvider(provider); } public final ExecutionEvent createExecutionEvent(final Command command, final Event event) { return parent.createExecutionEvent(command, event); } public final ExecutionEvent createExecutionEvent( final ParameterizedCommand command, final Event event) { return parent.createExecutionEvent(command, event); } public final void deactivateHandler(final IHandlerActivation activation) { final IHandlerActivation parentActivation; if (localActivationsToParentActivations.containsKey(activation)) { parentActivation = (IHandlerActivation) localActivationsToParentActivations .remove(activation); } else { parentActivation = activation; } if (parentActivation != null) { parent.deactivateHandler(parentActivation); parentActivations.remove(parentActivation); } } public final void deactivateHandlers(final Collection activations) { Object[] array = activations.toArray(); for (int i = 0; i < array.length; i++) { deactivateHandler((IHandlerActivation) array[i]); array[i] = null; } } public final void dispose() { parent.deactivateHandlers(parentActivations); parentActivations.clear(); localActivationsToParentActivations.clear(); // Remove any "resource", like listeners, that were associated // with this service. if (!fSourceProviders.isEmpty()) { Object[] array = fSourceProviders.toArray(); for (int i = 0; i < array.length; i++) { removeSourceProvider((ISourceProvider) array[i]); } fSourceProviders.clear(); } } protected IHandlerActivation doActivation( final IHandlerActivation localActivation) { final IHandlerActivation parentActivation; parentActivation = parent.activateHandler(localActivation); parentActivations.add(parentActivation); localActivationsToParentActivations.put(localActivation, parentActivation); return localActivation; } public final Object executeCommand(final ParameterizedCommand command, final Event event) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException { return parent.executeCommand(command, event); } public final Object executeCommand(final String commandId, final Event event) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException { return parent.executeCommand(commandId, event); } public final IEvaluationContext getCurrentState() { return parent.getCurrentState(); } public final void readRegistry() { parent.readRegistry(); } public final void removeSourceProvider(final ISourceProvider provider) { fSourceProviders.remove(provider); parent.removeSourceProvider(provider); } public final void setHelpContextId(final IHandler handler, final String helpContextId) { parent.setHelpContextId(handler, helpContextId); } } >\ No newline at end of file >+/******************************************************************************* * Copyright (c) 2006 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * IBM Corporation - initial API and implementation ******************************************************************************/ package org.eclipse.ui.internal.handlers; import java.util.ArrayList; import java.util.Collection; import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; import org.eclipse.core.commands.Command; import org.eclipse.core.commands.ExecutionEvent; import org.eclipse.core.commands.ExecutionException; import org.eclipse.core.commands.IHandler; import org.eclipse.core.commands.NotEnabledException; import org.eclipse.core.commands.NotHandledException; import org.eclipse.core.commands.ParameterizedCommand; import org.eclipse.core.commands.common.NotDefinedException; import org.eclipse.core.expressions.Expression; import org.eclipse.core.expressions.IEvaluationContext; import org.eclipse.swt.widgets.Event; import org.eclipse.ui.ISourceProvider; import org.eclipse.ui.handlers.IHandlerActivation; import org.eclipse.ui.handlers.IHandlerService; import org.eclipse.ui.internal.expressions.AndExpression; /** * A handler service which delegates almost all responsibility to the parent * service. It is only responsible for disposing of locally activated handlers * when it is disposed. * <p> * This class is not intended for use outside of the * <code>org.eclipse.ui.workbench</code> plug-in. * </p> * * @since 3.2 */ public class SlaveHandlerService implements IHandlerService { /** * The default expression to use when * {@link #activateHandler(String, IHandler)} is called. Handlers * contributed using that method will only be active when this service is * active. However, this expression will be used for conflict resolution. */ protected final Expression defaultExpression; /** * A collection of source providers. The listeners are not * activated/deactivated, but they will be removed when this service is * disposed. */ private Collection fSourceProviders = new ArrayList(); /** * A map of the local activation to the parent activations. If this service * is inactive, then all parent activations are <code>null</code>. * Otherwise, they point to the corresponding activation in the parent * service. */ protected final Map localActivationsToParentActivations = new HashMap(); /** * The parent handler service to which all requests are ultimately routed. * This value is never <code>null</code>. */ protected final IHandlerService parent; /** * The activations registered with the parent handler service. This value is * never <code>null</code>. */ protected final Set parentActivations = new HashSet(); /** * Constructs a new instance. * * @param parentHandlerService * The parent handler service for this slave; must not be * <code>null</code>. * @param defaultExpression * The default expression to use if none is provided. This is * primarily used for conflict resolution. This value may be * <code>null</code>. */ public SlaveHandlerService(final IHandlerService parentHandlerService, final Expression defaultExpression) { if (parentHandlerService == null) { throw new NullPointerException( "The parent handler service cannot be null"); //$NON-NLS-1$ } this.defaultExpression = defaultExpression; this.parent = parentHandlerService; } public final IHandlerActivation activateHandler( final IHandlerActivation childActivation) { final String commandId = childActivation.getCommandId(); final IHandler handler = childActivation.getHandler(); final Expression childExpression = childActivation.getExpression(); final AndExpression expression; // if (childExpression instanceof AndExpression) { // expression = (AndExpression) childExpression; // } else { // expression = new AndExpression(); // if (childExpression != null) { // expression.add(childExpression); // } // } expression = new AndExpression(); if (childExpression != null) { expression.add(childExpression); } if (defaultExpression != null) { expression.add(defaultExpression); } final int depth = childActivation.getDepth() + 1; final IHandlerActivation localActivation = new HandlerActivation( commandId, handler, expression, depth, this); return doActivation(localActivation); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler) { final IHandlerActivation localActivation = new HandlerActivation( commandId, handler, defaultExpression, IHandlerActivation.ROOT_DEPTH, this); return doActivation(localActivation); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler, final Expression expression) { return activateHandler(commandId, handler, expression, false); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler, final Expression expression, final boolean global) { if (global) { final IHandlerActivation activation = parent.activateHandler( commandId, handler, expression, global); parentActivations.add(activation); return activation; } final AndExpression andExpression; // if (expression instanceof AndExpression) { // andExpression = (AndExpression) expression; // } else { andExpression = new AndExpression(); if (expression != null) { andExpression.add(expression); } if (defaultExpression != null) { andExpression.add(defaultExpression); } final IHandlerActivation localActivation = new HandlerActivation( commandId, handler, andExpression, IHandlerActivation.ROOT_DEPTH, this); return doActivation(localActivation); } public final IHandlerActivation activateHandler(final String commandId, final IHandler handler, final Expression expression, final int sourcePriorities) { return activateHandler(commandId, handler, expression); } public final void addSourceProvider(final ISourceProvider provider) { if (!fSourceProviders.contains(provider)) { fSourceProviders.add(provider); } parent.addSourceProvider(provider); } public final ExecutionEvent createExecutionEvent(final Command command, final Event event) { return parent.createExecutionEvent(command, event); } public final ExecutionEvent createExecutionEvent( final ParameterizedCommand command, final Event event) { return parent.createExecutionEvent(command, event); } public final void deactivateHandler(final IHandlerActivation activation) { final IHandlerActivation parentActivation; if (localActivationsToParentActivations.containsKey(activation)) { parentActivation = (IHandlerActivation) localActivationsToParentActivations .remove(activation); } else { parentActivation = activation; } if (parentActivation != null) { parent.deactivateHandler(parentActivation); parentActivations.remove(parentActivation); } } public final void deactivateHandlers(final Collection activations) { Object[] array = activations.toArray(); for (int i = 0; i < array.length; i++) { deactivateHandler((IHandlerActivation) array[i]); array[i] = null; } } public final void dispose() { parent.deactivateHandlers(parentActivations); parentActivations.clear(); localActivationsToParentActivations.clear(); // Remove any "resource", like listeners, that were associated // with this service. if (!fSourceProviders.isEmpty()) { Object[] array = fSourceProviders.toArray(); for (int i = 0; i < array.length; i++) { removeSourceProvider((ISourceProvider) array[i]); } fSourceProviders.clear(); } } protected IHandlerActivation doActivation( final IHandlerActivation localActivation) { final IHandlerActivation parentActivation; parentActivation = parent.activateHandler(localActivation); parentActivations.add(parentActivation); localActivationsToParentActivations.put(localActivation, parentActivation); return localActivation; } public final Object executeCommand(final ParameterizedCommand command, final Event event) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException { return parent.executeCommand(command, event); } public final Object executeCommand(final String commandId, final Event event) throws ExecutionException, NotDefinedException, NotEnabledException, NotHandledException { return parent.executeCommand(commandId, event); } public final IEvaluationContext getCurrentState() { return parent.getCurrentState(); } public final void readRegistry() { parent.readRegistry(); } public final void removeSourceProvider(final ISourceProvider provider) { fSourceProviders.remove(provider); parent.removeSourceProvider(provider); } public final void setHelpContextId(final IHandler handler, final String helpContextId) { parent.setHelpContextId(handler, helpContextId); } } >\ No newline at end of file >Index: Eclipse UI/org/eclipse/ui/SubActionBars.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/SubActionBars.java,v >retrieving revision 1.26 >diff -u -r1.26 SubActionBars.java >--- Eclipse UI/org/eclipse/ui/SubActionBars.java 8 May 2006 20:55:31 -0000 1.26 >+++ Eclipse UI/org/eclipse/ui/SubActionBars.java 12 May 2006 18:44:31 -0000 >@@ -50,14 +50,14 @@ > * over handlers contributed to the {@link IHandlerService}. > */ > private static final Expression EXPRESSION = new Expression() { >- public final EvaluationResult evaluate(final IEvaluationContext context) { >- return EvaluationResult.TRUE; >- } >- > public final void collectExpressionInfo(final ExpressionInfo info) { > info > .addVariableNameAccess(SourcePriorityNameMapping.LEGACY_LEGACY_NAME); > } >+ >+ public final EvaluationResult evaluate(final IEvaluationContext context) { >+ return EvaluationResult.TRUE; >+ } > }; > > /** >@@ -317,6 +317,17 @@ > } > > /** >+ * The expression used for action handler activation. This method should not >+ * be extended or overridden by subclasses. >+ * >+ * @return the expression for use with action handler activation. >+ * @since 3.2 >+ */ >+ protected Expression getHandlerExpression() { >+ return EXPRESSION; >+ } >+ >+ /** > * Returns the abstract menu manager. If items are added or removed from the > * manager be sure to call <code>updateActionBars</code>. > * >@@ -506,7 +517,7 @@ > final IHandler actionHandler = new ActionHandler(handler); > final IHandlerActivation activation = service > .activateHandler(commandId, actionHandler, >- EXPRESSION); >+ getHandlerExpression()); > activationsByActionId.put(actionID, activation); > } > } >Index: Eclipse UI/org/eclipse/ui/internal/expressions/LegacyEditorContributionExpression.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.ui.workbench/Eclipse UI/org/eclipse/ui/internal/expressions/LegacyEditorContributionExpression.java,v >retrieving revision 1.5 >diff -u -r1.5 LegacyEditorContributionExpression.java >--- Eclipse UI/org/eclipse/ui/internal/expressions/LegacyEditorContributionExpression.java 8 May 2006 20:55:52 -0000 1.5 >+++ Eclipse UI/org/eclipse/ui/internal/expressions/LegacyEditorContributionExpression.java 12 May 2006 18:44:31 -0000 >@@ -90,6 +90,9 @@ > > public final EvaluationResult evaluate(final IEvaluationContext context) > throws CoreException { >+ if ("org.eclipse.jdt.ui.CompilationUnitEditor".equals(activeEditorId)) { //$NON-NLS-1$ >+ System.out.println(); >+ } > final EvaluationResult result = super.evaluate(context); > if (result == EvaluationResult.FALSE) { > return result;
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 137091
:
41170
|
41357
|
41492
|
41588
|
41637
|
41713
|
42049