This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Question about implementing code completion

No replies
Ståle Undheim
Joined: 2009-03-23,
User offline. Last seen 42 years 45 weeks ago.

Given the program:

object Main extends Application {
1 to 100 m
}

How can I read out a result from the compiler about the type off the
expression preceding the m (first letter to complete on)? If you
compile this, you get the sensible error that there is no member "m"
on Range.Inclusive, however using the -Ybrowse:typer on the compiler,
you can't extract the information about the type preceding the token
"m".

I am trying to implement code completion in NetBeans for Scala. Maybe
what I need to do is feed the compiler with the file excluding the
prefix off the completion ("m"), so I get the correct context and
Symbol for the 1 to 100 expression.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland