This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Per recent changes (after Sep 1 or 2), the Document instance contained in Snapshot that passed by Parsing API can not be casted to BaseDocument anymore ? Tha following exception was caused by: snapshot.getSource.getDocument(true).asInstanceOf[BaseDocument] --- in Scala or, BaseDocument doc = (BaseDocument) snapshot.getSource.getDocument(true) --- in Java java.lang.ClassCastException: org.openide.text.FilterDocument cannot be cast to org.netbeans.editor.BaseDocument at org.netbeans.modules.scala.editor.ScalaParser.parseBuffer(ScalaParser.scala:386) at org.netbeans.modules.scala.editor.ScalaParser.parse(ScalaParser.scala:83) at org.netbeans.modules.parsing.impl.SourceCache.getResult(SourceCache.java:198) at org.netbeans.modules.parsing.impl.TaskProcessor$CompilationJob.run(TaskProcessor.java:648) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [catch] at java.lang.Thread.run(Thread.java:637)
The issue seems come from: http://hg.netbeans.org/main/rev/52f4cc2e85f1 Where, editor.libs' "layer.xml" register a global("" mimeType) SearchableEditorKitImpl instance: <file name="EditorKit.instance"> <attr name="instanceCreate" methodvalue="org.netbeans.modules.editor.lib2.actions.SearchableEditorKitImpl.createGlobalKit"/> </file> which causes org.openide.text.CloneableEditorSupport#getEditorKit(String mimePath) always ignore org.netbeans.modules.csl.core.GsfEditorKitFactory$GsfEditorKit, and returns a SearchableEditorKitImpl instance always.
Fixed by issue 171600.