Project: JDT
Bug 289152 [implementation] Class cast exception from editor while getting content from CVS
Reported: 2009-09-10 16:53:14 | Status: resolved fixed

I had a .class file open in an editor (EclipseHomeVariableResolver), and then I went to get the source from CVS. While the source was being checked out, I got the following exception: eclipse.buildId=I20090908-0800 java.fullversion=J2RE 1.5.0 IBM J9 2.3 Windows XP x86-32 j9vmwi3223-20070201 (JIT enabled) J9VM - 20070131_11312_lHdSMR JIT - 20070109_1805ifx1_r8 GC - 200701_09 BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 java.lang.ClassCastException: org.eclipse.ui.part.FileEditorInput incompatible with org.eclipse.jdt.internal.ui.javaeditor.IClassFileEditorInput at org.eclipse.jdt.internal.ui.javaeditor.ClassFileDocumentProvider.handleDeleted(ClassFileDocumentProvider.java:358) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileDocumentProvider$ClassFileSynchronizer.check(ClassFileDocumentProvider.java:132) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileDocumentProvider$ClassFileSynchronizer.check(ClassFileDocumentProvider.java:138) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileDocumentProvider$ClassFileSynchronizer.check(ClassFileDocumentProvider.java:138) at org.eclipse.jdt.internal.ui.javaeditor.ClassFileDocumentProvider$ClassFileSynchronizer.elementChanged(ClassFileDocumentProvider.java:105) at org.eclipse.jdt.internal.core.DeltaProcessor$3.run(DeltaProcessor.java:1557) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.core.DeltaProcessor.notifyListeners(DeltaProcessor.java:1547) at org.eclipse.jdt.internal.core.DeltaProcessor.firePostChangeDelta(DeltaProcessor.java:1381) at org.eclipse.jdt.internal.core.DeltaProcessor.fire(DeltaProcessor.java:1357) at org.eclipse.jdt.internal.core.JavaModelOperation.run(JavaModelOperation.java:769) at org.eclipse.jdt.internal.core.JavaModelOperation.runOperation(JavaModelOperation.java:788) at org.eclipse.jdt.core.JavaCore.setClasspathContainer(JavaCore.java:4759) at org.eclipse.pde.internal.core.PluginModelManager.updateAffectedEntries(PluginModelManager.java:242) at org.eclipse.pde.internal.core.PluginModelManager.modelsChanged(PluginModelManager.java:167) at org.eclipse.pde.internal.core.AbstractModelManager.fireModelProviderEvent(AbstractModelManager.java:35) at org.eclipse.pde.internal.core.WorkspaceModelManager.createAndFireEvent(WorkspaceModelManager.java:277) at org.eclipse.pde.internal.core.WorkspacePluginModelManager.createAndFireEvent(WorkspacePluginModelManager.java:469) at org.eclipse.pde.internal.core.WorkspaceModelManager.processModelChanges(WorkspaceModelManager.java:249) at org.eclipse.pde.internal.core.WorkspaceModelManager.processModelChanges(WorkspaceModelManager.java:211) at org.eclipse.pde.internal.core.WorkspacePluginModelManager.processModelChanges(WorkspacePluginModelManager.java:459) at org.eclipse.pde.internal.core.WorkspaceModelManager.resourceChanged(WorkspaceModelManager.java:128) at org.eclipse.jdt.internal.core.DeltaProcessingState$1.run(DeltaProcessingState.java:465) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.jdt.internal.core.DeltaProcessingState.resourceChanged(DeltaProcessingState.java:460) at org.eclipse.core.internal.events.NotificationManager$2.run(NotificationManager.java:291) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) at org.eclipse.core.internal.events.NotificationManager.notify(NotificationManager.java:285) at org.eclipse.core.internal.events.NotificationManager.broadcastChanges(NotificationManager.java:149) at org.eclipse.core.internal.resources.Workspace.broadcastPostChange(Workspace.java:313) at org.eclipse.core.internal.resources.Workspace.endOperation(Workspace.java:1022) at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:45) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

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