Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 302830

Summary: [projection] java.lang.ClassCastException: org.eclipse.jface.text.source.projection.AnnotationBag cannot be cast to org.eclipse.jdt.internal.ui.javaeditor.OverrideIndicatorManager$OverrideIndicator
Product: [Eclipse Project] JDT Reporter: Nicolas Rouquette <nicolas.f.rouquette>
Component: TextAssignee: JDT-Text-Inbox <jdt-text-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: daniel_megert, pascal, remy.suen
Version: 3.6   
Target Milestone: 3.6 M5   
Hardware: Macintosh   
OS: Mac OS X   
Whiteboard:

Description Nicolas Rouquette CLA 2010-02-14 16:22:19 EST
eclipse.buildId=I20100129-1300
java.version=1.6.0_17
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.modeling.product
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.modeling.product -clean

Since 3.6M5, Eclipse produces a lot of errors when I use the collapse/expand feature in the Java editor.
In some cases, the editor just shows the background -- i.e., no text, but in other cases, Eclipse hangs.

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.Display.sendEvent(Display.java:3706)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1314)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1337)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1322)
at org.eclipse.swt.widgets.Control.drawWidget(Control.java:1087)
at org.eclipse.swt.widgets.Canvas.drawWidget(Canvas.java:158)
at org.eclipse.swt.widgets.Widget.drawRect(Widget.java:634)
at org.eclipse.swt.widgets.Canvas.drawRect(Canvas.java:153)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4819)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSendSuper(Native Method)
at org.eclipse.swt.widgets.Display.applicationNextEventMatchingMask(Display.java:4368)
at org.eclipse.swt.widgets.Display.applicationProc(Display.java:4610)
at org.eclipse.swt.internal.cocoa.OS.objc_msgSend(Native Method)
at org.eclipse.swt.internal.cocoa.NSApplication.nextEventMatchingMask(NSApplication.java:75)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3218)
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)
Comment 1 Remy Suen CLA 2010-02-14 17:12:20 EST
Dupe of bug 302077?
Comment 2 Nicolas Rouquette CLA 2010-02-14 17:34:58 EST
Thanks, this looks like a duplicate. 

I'll follow the suggestion in comment #2 until the fix is available in an integration build.
Comment 3 Remy Suen CLA 2010-02-14 17:40:47 EST
(In reply to comment #2)
> I'll follow the suggestion in comment #2 until the fix is available in an
> integration build.

Is it not in one of the 20100209 integration builds?
Comment 4 Dani Megert CLA 2010-02-15 02:30:33 EST

*** This bug has been marked as a duplicate of bug 302077 ***
Comment 5 Nicolas Rouquette CLA 2010-02-15 20:02:57 EST
(In reply to comment #3)
> (In reply to comment #2)
> > I'll follow the suggestion in comment #2 until the fix is available in an
> > integration build.
> 
> Is it not in one of the 20100209 integration builds?

It is non-trivial to tell if a particular fix is in a given integration/night build.
I experienced this problem with the version of the EPP Modeling build here:

http://build.eclipse.org/technology/epp/epp_build/36/download/20100210-1833/20100210-1833_eclipse-modeling-helios-M5-macosx.cocoa.x86_64.tar.gz

There is no link to the build map for this; I don't know what this build includes unless I install it.
About Eclipse tells me this:

Build id: 20100210-1830

But this is misleading, it's the build date of the EPP package, not of the Eclipse platform itself.
The configuration details shows this:

eclipse.buildId=I20100129-1300

So, I doublt that Dani's fix is there. I assume that when he said:

> Fixed in HEAD.
> Available in builds > N20100206-2000.

THis means that the fix should be in I or N builds of Eclipse platform after 20100206-2000.
Comment 6 Remy Suen CLA 2010-02-15 20:06:50 EST
(In reply to comment #5)
> So, I doublt that Dani's fix is there. I assume that when he said:
> 
> > Fixed in HEAD.
> > Available in builds > N20100206-2000.
> 
> THis means that the fix should be in I or N builds of Eclipse platform after
> 20100206-2000.

Yes, I should have been more clear. You can get one of those below or try using p2 to update your base.
http://download.eclipse.org/eclipse/downloads/

I don't think EPP will be making any builds until Helios M6 rolls around.
Comment 7 Nicolas Rouquette CLA 2010-02-15 21:00:08 EST
Do you know what kind of command-line would let me use p2 director to update my base installation?

I had used the command line stuff before p2 & E3.4 but I haven't had the opportunity to try this since then. Maybe this is a good excuse to give it a shot.
Comment 8 Pascal Rapicault CLA 2010-02-16 08:42:46 EST
eclipse -application org.eclipse.equinox.p2.director -installIU org.eclipse.sdk.ide -uninstallIU org.eclipse.sdk.ide -repository <URIToEclipseRepo>
Comment 9 Nicolas Rouquette CLA 2010-02-17 12:10:08 EST
I found the P2 repositories for 3.6 here:
http://wiki.eclipse.org/Eclipse_Project_Update_Sites

I tried this:

./eclipse \
    -nosplash -consoleLog \
    -application org.eclipse.equinox.p2.director \
    -repository http://download.eclipse.org/eclipse/updates/3.6-N-builds/ \
    -list
    
I get a bunch of IUs including:

org.eclipse.sdk=3.6.0.v201002132000
org.eclipse.sdk=3.6.0.v201002142000
org.eclipse.sdk=3.6.0.v201002152000
org.eclipse.sdk=3.6.0.v201002162000

The last one is version Remy mentioned but the update didn't work:

./eclipse \
    -nosplash -consoleLog \
    -application org.eclipse.equinox.p2.director \
    -repository http://download.eclipse.org/eclipse/updates/3.6-N-builds/ \
    -installIU org.eclipse.sdk.ide \
    -uninstallIU org.eclipse.sdk.ide \
    
!SESSION 2010-02-17 08:59:01.349 -----------------------------------------------
eclipse.buildId=I20100129-1300
java.version=1.6.0_17
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.modeling.product -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/eclipse/updates/3.6-N-builds/ -installIU org.eclipse.sdk.ide -uninstallIU org.eclipse.sdk.ide
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.modeling.product -consoleLog -application org.eclipse.equinox.p2.director -repository http://download.eclipse.org/eclipse/updates/3.6-N-builds/ -installIU org.eclipse.sdk.ide -uninstallIU org.eclipse.sdk.ide

!ENTRY org.eclipse.core.net 1 0 2010-02-17 08:59:04.128
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
Installation failed.
The installable unit org.eclipse.sdk.ide has not been found.
Application failed, log file location: /Volumes/FMTools/HeliosM5.mdt/eclipse/configuration/1266425941723.log

!ENTRY org.eclipse.equinox.p2.director.app 4 0 2010-02-17 08:59:54.951
!MESSAGE The installable unit org.eclipse.sdk.ide has not been found.
    
Suggestions?
Comment 10 Nicolas Rouquette CLA 2010-02-17 12:11:52 EST
Oh, and the log file isn't saved! -- /Volumes/FMTools/HeliosM5.mdt/eclipse/configuration/1266425941723.log
Is this another bug?
Comment 11 Nicolas Rouquette CLA 2010-02-17 12:39:28 EST
I used the UI to install the update from  http://download.eclipse.org/eclipse/updates/3.6-N-builds/

'Eclipse SDK' didn't work.
'Eclipse SDK' + 'Eclipse Platform' + 'Eclipse Platform SDK' didn't work either.
Below are the details of the explanation. 

Your original request has been modified.
  "Eclipse Platform" is already installed, so an update will be performed instead.
Cannot complete the install because of a conflicting dependency.
  Software being installed: Eclipse Platform 3.6.0.N20100216-2000 (org.eclipse.platform.ide 3.6.0.N20100216-2000)
  Software currently installed: Eclipse Modeling Tools 1.3.0.20100206-1005 (epp.package.modeling 1.3.0.20100206-1005)
  Only one of the following can be installed at once: 
    Ant Build Tool Core 3.2.200.N20100216-2000 (org.eclipse.ant.core 3.2.200.N20100216-2000)
    Ant Build Tool Core 3.2.200.N20100213-2000 (org.eclipse.ant.core 3.2.200.N20100213-2000)
    Ant Build Tool Core 3.2.200.v20091118 (org.eclipse.ant.core 3.2.200.v20091118)
    Ant Build Tool Core 3.2.200.N20100214-2000 (org.eclipse.ant.core 3.2.200.N20100214-2000)
    Ant Build Tool Core 3.2.200.N20100215-2000 (org.eclipse.ant.core 3.2.200.N20100215-2000)
  Cannot satisfy dependency:
    From: Eclipse Modeling Tools 1.3.0.20100206-1005 (epp.package.modeling 1.3.0.20100206-1005)
    To: org.eclipse.epp.package.modeling.feature.feature.group [1.3.0.20100206-1005]
  Cannot satisfy dependency:
    From: EPP Modeling Feature 1.3.0.20100206-1005 (org.eclipse.epp.package.modeling.feature.feature.group 1.3.0.20100206-1005)
    To: org.eclipse.platform.feature.group [3.6.0.v20100121-9hF71GITFufnsj44XsigdRiv20ClbUb3ou]
  Cannot satisfy dependency:
    From: Eclipse Platform 3.6.0.N20100216-2000-9hF76GITFUsjt5Pv0OEiz-ZLlto5pz0NEqz-3y (org.eclipse.platform.feature.group 3.6.0.N20100216-2000-9hF76GITFUsjt5Pv0OEiz-ZLlto5pz0NEqz-3y)
    To: org.eclipse.ant.core [3.2.200.N20100216-2000]
  Cannot satisfy dependency:
    From: Eclipse Platform 3.6.0.v20100121-9hF71GITFufnsj44XsigdRiv20ClbUb3ou (org.eclipse.platform.feature.group 3.6.0.v20100121-9hF71GITFufnsj44XsigdRiv20ClbUb3ou)
    To: org.eclipse.ant.core [3.2.200.v20091118]
  Cannot satisfy dependency:
    From: Eclipse Platform 3.6.0.N20100216-2000 (org.eclipse.platform.ide 3.6.0.N20100216-2000)
    To: org.eclipse.platform.feature.group [3.6.0.N20100216-2000-9hF76GITFUsjt5Pv0OEiz-ZLlto5pz0NEqz-3y]
    
Is this to be expected given the EPP build for the Eclipse Modeling Tools?