Scala plugin can't resolve Java symbols?

In code containing the following import statement, I get complaints about "Connection" being unresolved:

import _root_.java.sql.{Connection, DriverManager}
<snip>
private var pool: List[Connection] = Nil

Curiously, I only get a message about DriverManager being unresolved in the import statement.  In a statement like the following, I don't see any red text:

DriverManager.getConnection(dbUrl, user, pwd)

Anyhow, is it expected that importing Java will confuse the Scala plugin?  This is with the 16-Dec-2008 plugin version.

0
3 comments

Hello, David.

So, I didn't understand, what reference - Connection or DriverManager was highlighted as unresolved? It may depend of package name in current file, which one does it have? Anyway in arbitrary file everything works fine in my case.

With best regards,
Ilya

0

Both Connection and DriverManager are unresolved for me.  However, I just tried it on OSX and it's fine.  The troublsome system runs OpenSolaris 2008.11.

I may not have installed IntelliJ IDEA correctly, but all I did was set JDK_HOME and run idea.sh just as on Linux.

I'll try it on Linux tomorrow to see if the problem is really just with OpenSolaris.

Thanks for looking into it.

0

I haven't been able to try this out on Linux, but I just tried on Windows and have the same problem as on OpenSolaris.  Should the following code look fine in the IDE?


import _root_.java.sql.Connection

class Foo {
    val bar: List[Connection] = Nil
}

On Windows, "Connection" in List[Connection] is in red text.

Setup = Vista 32 bit, IDEA 8.0.1, Scala plugin from 31-Dec-2008, JRE 1.6u11.  It works fine on an OSX system I have which uses Java 1.5 (don't know if that's relevant though.)

0

Please sign in to leave a comment.