Project: JDT
Bug 54153 AssertionFailedException when canceling action from "lock window"
Reported: 2004-03-09 10:34:47 | Status: resolved fixed

N20040309 1. Start a CVS refresh (long running) that will lock your project 2. Try to perform a refactoring (e.g. Extract Constant) 3. The progress "lock" window will show up, telling you that the workspace lock can not be obtained, with the option to cancel either the cvs or ui task. 4. Choose to cancel the UI task -> I get an AssertionFailedException. Since the option to cancel is offered in the ui, we should not throw, but abort gracefully. org.eclipse.jface.util.Assert$AssertionFailedException: Assertion failed: at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.jface.util.Assert$AssertionFailedException.<init>(Assert.java:54) at org.eclipse.jface.util.Assert.isTrue(Assert.java:168) at org.eclipse.jface.util.Assert.isTrue(Assert.java) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.checkActivation(RefactoringStarter.java:73) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:47) at org.eclipse.jdt.ui.actions.ExtractConstantAction.run(ExtractConstantAction.java:94) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:216) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:188) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.ui.actions.RetargetAction.runWithEvent(RetargetAction.java:212) at org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:212) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:550) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:502) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:435) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1451) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1422) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:258) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:79) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:260) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:173) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:106) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41) at java.lang.reflect.Method.invoke(Method.java:386) at org.eclipse.core.launcher.Main.basicRun(Main.java:305) at org.eclipse.core.launcher.Main.run(Main.java:745) at org.eclipse.core.launcher.Main.main(Main.java:713)

Files changed in fix:
org.eclipse.jdt.ui/ui refactoring/org/eclipse/jdt/internal/ui/refactoring/actions/RefactoringStarter.java