java.lang.ClassCastException: org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.scalaide.core.internal.jdt.model.ScalaCompilationUnit


Solutions on the web

Solution icon of googlegroups
via Google Groups by Александр Гурьянов, 9 months ago
org.eclipse.jdt.internal.core.CompilationUnit cannot be cast to org.scalaide.core.internal.jdt.model.ScalaCompilationUnit

Stack trace

java.lang.ClassCastException: org.eclipse.jdt.internal.core.CompilationUnit cannot be
             cast to
             org.scalaide.core.internal.jdt.model.ScalaCompilationUnit
	at org.scalaide.core.internal.ScalaPlugin.unitOfSourceFile$1(ScalaPlugin.scala:158)
	at org.scalaide.core.internal.ScalaPlugin.scalaCompilationUnit(ScalaPlugin.scala:165)
	at org.scalaide.ui.internal.editor.ScalaCompilationUnitEditor$class.getInteractiveCompilationUnit(ScalaCompilationUnitEditor.scala:100)
	at org.scalaide.ui.internal.editor.ScalaSourceFileEditor.getInteractiveCompilationUnit(ScalaSourceFileEditor.scala:62)
	at org.scalaide.ui.internal.reconciliation.ScalaReconciler.install(ScalaReconciler.scala:95)
	at org.scalaide.ui.internal.editor.ScalaSourceViewerConfiguration$$anonfun$getReconciler$1.apply(ScalaSourceViewerConfiguration.scala:217)
	at org.scalaide.ui.internal.editor.ScalaSourceViewerConfiguration$$anonfun$getReconciler$1.apply(ScalaSourceViewerConfiguration.scala:204)
	at scala.Option.map(Option.scala:146)
	at org.scalaide.ui.internal.editor.ScalaSourceViewerConfiguration.getReconciler(ScalaSourceViewerConfiguration.scala:204)
	at org.eclipse.jface.text.source.SourceViewer.configure(SourceViewer.java:460)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaSourceViewer.configure(JavaSourceViewer.java:230)
	at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3427)
	at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
	at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:447)
	at org.eclipse.jdt.internal.ui.javaeditor.JavaEditor.createPartControl(JavaEditor.java:3119)
	at org.eclipse.jdt.internal.ui.javaeditor.CompilationUnitEditor.createPartControl(CompilationUnitEditor.java:1505)

Write tip

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.