Take the 2-minute tour ×

I'm using Eclipse 4.2 with Scala-IDE 3.0.

There seem to be a bug either in Eclipse or Scala-IDE for eclipse.

Scala code:

package messages
sealed trait BasicMessage
case class GetIP() extends BasicMessage 

And from Java:

package view;
import messages.GetIP$;
.... GetIP$.MODULE$ ....

The Java code compiles and works, but Eclipse keeps saying syntax error, first on the import statement, and then on the MODULE$ thing....

it doesn't seem to like much the $....

Is there any workaround without having to declare a companion object for every "case class"? Has anybody experienced this problem?


share|improve this question
Yeah, seems to do it for me as well. Must be a scala-IDE thing - suggest filing a bug. I'd also suggest using case object where your case class lacks any parameters.\ –  Impredicative May 20 '13 at 13:23
add comment


Your Answer



Browse other questions tagged or ask your own question.