Eclipse not recognizing Scala code

Joe picture Joe · Dec 15, 2011 · Viewed 24.3k times · Source

I have Eclipse Indigo with the Scala IDE plugin. I downloaded a lift project from Maven. It builds correctly. Eclipse says it is viewing it with the Scala editor.

However, it is still giving my an error on each line because it is treat the code as Java (it gives errors for no semicolon, for the word "def" etc.) I tried cleaning the project and it still gives the errors.

Answer

Luigi Plinge picture Luigi Plinge · Dec 15, 2011

A couple of things I would try:

1) Right-click on project, Configure > Add Scala Nature.

2) In the Scala menu, Run Setup Diagnositics... > Use recommended default settings