Project: JDT
Bug 302077 [projection] ClassCastException when pressing Ctrl+.
Reported: 2010-02-07 19:29:00 | Status: verified fixed

What steps will reproduce the problem? 1. Open Mylyn class CopyTaskDetailsAction 2. Press Ctrl+. The editor stops redrawing after this error is encountered. -- Error Details -- Date: Fri Feb 05 20:05:26 PST 2010 Message: Unhandled event loop exception Severity: Error Product: Eclipse SDK 3.6.0.v201001291300 (org.eclipse.sdk.ide) Plugin: org.eclipse.ui Session Data: eclipse.buildId=I20100129-1300 java.version=1.6.0_15 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_CA Framework arguments: -keyring /home/stp/.eclipsekeyring Command-line arguments: -os linux -ws gtk -arch x86 Exception Stack Trace: org.eclipse.swt.SWTException: Failed to execute runnable (java.lang.ClassCastException: org.eclipse.jface.text.source.projection.AnnotationBag cannot be cast to org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager$OverrideIndicator) at org.eclipse.swt.SWT.error(SWT.java:4083) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:137) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3501) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3148) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2407) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2371) at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2220) at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:500) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:493) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:115) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:194) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:367) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:611) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:566) at org.eclipse.equinox.launcher.Main.run(Main.java:1363) Caused by: java.lang.ClassCastException: org.eclipse.jface.text.source.projection.AnnotationBag cannot be cast to org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager$OverrideIndicator at org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorImageProvider.isOverwriting(OverrideIndicatorImageProvider.java:70) at org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorImageProvider.getImageDescriptorId(OverrideIndicatorImageProvider.java:47) at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.getImage(DefaultMarkerAnnotationAccess.java:374) at org.eclipse.ui.texteditor.DefaultMarkerAnnotationAccess.paint(DefaultMarkerAnnotationAccess.java:263) at org.eclipse.jface.text.source.AnnotationRulerColumn.doPaint1(AnnotationRulerColumn.java:761) at org.eclipse.jface.text.source.AnnotationRulerColumn.doClearPaint(AnnotationRulerColumn.java:517) at org.eclipse.jface.text.source.AnnotationRulerColumn.access$3(AnnotationRulerColumn.java:508) at org.eclipse.jface.text.source.AnnotationRulerColumn$1.paintControl(AnnotationRulerColumn.java:280) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:217) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1223) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1247) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1232) at org.eclipse.swt.widgets.Control.gtk_expose_event(Control.java:2776) at org.eclipse.swt.widgets.Composite.gtk_expose_event(Composite.java:671) at org.eclipse.swt.widgets.Canvas.gtk_expose_event(Canvas.java:170) at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:1692) at org.eclipse.swt.widgets.Control.windowProc(Control.java:4606) at org.eclipse.swt.widgets.Display.windowProc(Display.java:4303) at org.eclipse.swt.internal.gtk.OS._gtk_main_do_event(Native Method) at org.eclipse.swt.internal.gtk.OS.gtk_main_do_event(OS.java:8051) at org.eclipse.swt.widgets.Display.eventProc(Display.java:1238) at org.eclipse.swt.internal.gtk.OS._gdk_window_process_updates(Native Method) at org.eclipse.swt.internal.gtk.OS.gdk_window_process_updates(OS.java:5228) at org.eclipse.swt.widgets.Control.update(Control.java:4565) at org.eclipse.swt.widgets.Control.update(Control.java:4556) at org.eclipse.jface.text.source.AnnotationRulerColumn.redraw(AnnotationRulerColumn.java:791) at org.eclipse.jface.text.source.AnnotationRulerColumn$6.run(AnnotationRulerColumn.java:778) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:134) ... 22 more

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/javaeditor/OverrideIndicatorImageProvider.java