Bug 117496 [Commands] handlers: Stack overflow in commands
- had three visible (split) editors open in the Team Synchronizing perspective and about 20 actual editors open - tried to switch to the java perspective. - the following stack overflow error occured. at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.isEnabled(ActionDelegateHandlerProxy.java:217) at org.eclipse.core.commands.Command.isEnabled(Command.java:510) at org.eclipse.jface.action.CommandLegacyActionWrapper.isEnabled(CommandLegacyActionWrapper.java:305) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.isEnabled(ActionDelegateHandlerProxy.java:217) at org.eclipse.core.commands.Command.isEnabled(Command.java:510) at org.eclipse.jface.action.CommandLegacyActionWrapper.isEnabled(CommandLegacyActionWrapper.java:305) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.isEnabled(ActionDelegateHandlerProxy.java:217) at org.eclipse.core.commands.Command.isEnabled(Command.java:510) at org.eclipse.jface.action.CommandLegacyActionWrapper.isEnabled(CommandLegacyActionWrapper.java:305) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.isEnabled(ActionDelegateHandlerProxy.java:217) at org.eclipse.core.commands.Command.isEnabled(Command.java:510) at org.eclipse.jface.action.CommandLegacyActionWrapper.isEnabled(CommandLegacyActionWrapper.java:305) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.isEnabled(ActionDelegateHandlerProxy.java:217) at org.eclipse.core.commands.Command.isEnabled(Command.java:510) at org.eclipse.jface.action.CommandLegacyActionWrapper.isEnabled(CommandLegacyActionWrapper.java:305) at org.eclipse.ui.internal.handlers.ActionDelegateHandlerProxy.isEnabled(ActionDelegateHandlerProxy.java:217) at org.eclipse.core.commands.Command.isEnabled(Command.java:510) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand(WorkbenchKeyboard.java:447) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press(WorkbenchKeyboard.java:786) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent(WorkbenchKeyboard.java:833) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.filterKeySequenceBindings(WorkbenchKeyboard.java:555) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.access$3(WorkbenchKeyboard.java:498) at org.eclipse.ui.internal.keys.WorkbenchKeyboard$KeyDownFilter.handleEvent(WorkbenchKeyboard.java:118) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Display.filterEvent(Display.java:976) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:904) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:929) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:914) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:942) at org.eclipse.swt.widgets.Widget.sendKeyEvent(Widget.java:938) at org.eclipse.swt.widgets.Widget.wmChar(Widget.java:1253) at org.eclipse.swt.widgets.Control.WM_CHAR(Control.java:3242) at org.eclipse.swt.widgets.Control.windowProc(Control.java:3143) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3919) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1705) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2859) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1794) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1758) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:381) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:106) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:109) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:369) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:167) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:338) at org.eclipse.core.launcher.Main.basicRun(Main.java:282) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952)
bundles/org.eclipse.jface/src/org/eclipse/jface/action/CommandLegacyActionWrapper.java
import org.eclipse.jface.bindings.TriggerSequence;
import org.eclipse.jface.bindings.keys.KeySequence;
import org.eclipse.jface.bindings.keys.KeyStroke;
import org.eclipse.jface.commands.CommandImageManager;
import org.eclipse.jface.commands.RadioState;
import org.eclipse.jface.commands.ToggleState;
import org.eclipse.jface.menus.IMenuStateIds;
import org.eclipse.jface.menus.TextState;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.util.Util;
import org.eclipse.swt.events.HelpListener;
import org.eclipse.swt.widgets.Event;
/**
 * <p>
 * A wrapper around the new command infrastructure that imitates the old
 * <code>IAction</code> interface.
 * </p>
 * <p>
 * Clients may instantiate this class, but must not extend.
 * </p>
 * <p>
 * <strong>EXPERIMENTAL</strong>. This class or interface has been added as
 * part of a work in progress. There is a guarantee neither that this API will
 * work nor that it will remain the same. Please do not use this API without
 * consulting with the Platform/UI team.
 * </p>
 * 
 * @since 3.2
 */
public final class CommandLegacyActionWrapper extends AbstractAction {