I'm running NetBeans 6.7 final with the latest version of the scala-plugin in the repositories. I have a Maven project to which I've added the commons-httpclient-3.1 dependency.
def search(query:String):Option[Any] = {
import java.net.URLEncoder.encode
import org.apache.commons.httpclient.HttpClient // Problem line
import org.apache.commons.httpclient.methods.GetMethod // Problem line
val method = new GetMethod(baseURI+encode(query))
new HttpClient.executeMethod(method)
val response = new String(method.getResponseBody)
println(response)
val resp = JSON.parse(response)
println(resp)
resp
}
I typed in both import lines marked as "Problem line" using autocomplete (so I would assume they are correct...and they ARE according to the contents of commons-httpclient). However, once the line is typed, NetBeans marks the text starting with "httpclient." as an error. The tooltip says that httpclient isn't a member of package org.apache.commons (which it is).
The only lines flagged as errors are the two import lines marked above. However, if I type "new HttpClient." and hit Ctrl+Space, it gets immediately autocompleted to "new HttpClient.<anyname>". I assume that's because the import error above is confusing the autocomplete.
So, am I doing something stupid? Or should I just go ahead and report a bug? Where are bugs tracked for the NetBeans Scala Plugin?