After about 6-7 hours in a row, I'm hoping that somebody can help me with a problem I am having. Basically I'm trying to develop a Eclipse plugin containing both Scala and Java code. Unfortunately it is such that when I'm trying to build the plugin, I get errors of this kind:
File: @dot.log 04-04-12 19:02:49 CEST Eclipse Compiler for Java(TM) 0.A76_R36x, 3.6.2, Copyright IBM Corp 2000, 2010. All rights reserved.
- ERROR in C:\Documents and Settings\b96274\workspace_scala_akka\TestScala\src\testscala\Activator.java (at line 16) ScalaTest t = null; ^^^^^^^^^ ScalaTest cannot be resolved to a type
1 problem (1 error)
The two classes I have defined are:
"Activator.java"
package testscala;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
public class Activator implements BundleActivator {
private static BundleContext context;
static BundleContext getContext() {
return context;
}
public void start(BundleContext bundleContext) throws Exception {
Activator.context = bundleContext;
ScalaTest t = null;
}
public void stop(BundleContext bundleContext) throws Exception {
Activator.context = null;
}
}
"ScalaTest.scala" package testscala
class ScalaTest {
val t = "whatever"
}
I create the plugin as first a Plugin Project, and the afterwards add Scala nature to it. To inform the PDE builder of scala I have used: http://www.michel-kraemer.com/scala-projects-with-eclipse-pde-build-2 Michel Kraemers very excellent build file.
My build.properties file is:
source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.
customBuildCallbacks=customBuildCallbacks.xml
customBuildCallbacks.inheritall=true
and the customBuildCallbacks.xml is stored in the buttom of the project.
I have tried with nightly and the stable build branch of the Scala IDE plugin. Also fresh versions of Eclipse 3.6.2 and 3.7.2 have been tried. I have gotten plugins working before with this setup, unfortunately I seems to have been forgetting some (basic?) stuff.
I can use the workaround "Use class files compiled in workspace", but I need the PDE builder to work with this. Can anyone please help, I will of course give more details if needed.
My guess is that the Java compiler can't see compiled Scala files since they first will be compiled later, but that's only an guess.
Thanks in advance. Regards Stefan Ettrup