On Tue, Sep 11, 2012 at 1:07 PM, Simon Schäfer <m...
> I tried to write an eclipse plugin with editor. When I do this with Java
> all works fine, but when I add Scala nature to the project and create a
> Scala class which extends org.eclipse.ui.editors.text.**TextEditor I get
> following error:
> error while loading AbstractDecoratedTextEditor, class file
> is broken (class java.lang.**NullPointerException/) com.test.slang
> Unknown Scala Problem
This indicates an incomplete classpath: some classfile references another
class which is not found. I wonder if there is any additional information
in the Error Log window, or if the Scala log file (make sure to turn on
DEBUG level logging in Eclipse Preferences/Scala/Logging).
> I'm working with the last nightly build and 2.10.
> Dependencies and so on are correctly set (it works with Java). Does
> someone know what's that for a problem?
Unfortunately, the Scala compiler is more greedy than the Java compiler. It
may happen that it needs a certain class on the classpath in situations
where the java compiler is happy to know just the name of that class! So in
this case I'm pretty sure the solution is to add another dependency in your
MANIFEST.MF file. To know exactly what bundle you need is impossible
without more information. For an example plugin written in Scala that
defines an editor you can have a look at
At any rate, the Scala compiler should not crash with an NPE. It would be
good to file a bug on the Scala issue tracker (issues.scala-lang.org) as
« Je déteste la montagne, ça cache le paysage »