Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala IDE error - "projectname" is not a Scala project -

I have installed latest scala ide plugin to eclipse (Version: 3.4.2). It seems installation is ok without any errors.

I am able to create a scala project and add a package, but i couldn't add scala object, at the time it shows "projectname" is not a Scala project error message in add object dialog.

I have googled and found it could be related to JDT Weaving not enabled in eclipse. I have verified, its enabled and running in my environment.

Below the screenshot of the error. alt text http://a.imageshack.us/img80/3070/scala.png

I just started scala.. Can someone help me to resolve this problem?

like image 635
RameshVel Avatar asked Jul 14 '10 07:07

RameshVel


2 Answers

I had a similar error two minutes ago. Here's how I fixed it. I'm using Helios and the relevant Scala IDE version.

Right click on the project name --> Configure --> Add scala nature

I must mention that I have the M2Eclipse plugin as well and my project is a Maven project in addition to having a Scala "nature" .. Not that it should matter .. ;-)

like image 81
Sri Avatar answered Nov 20 '22 19:11

Sri


The error message means your project is not recognize as a Scala one (as detailed in the scala.tools.eclipse.wizards.AbstractNewElementWizardPage.scala class.
But adding "Scala nature" to your project, as suggested by Alexey Romanov in the comments, might not be enough in this case.

The requirements mentioned in scala-ide.org clearly include:

  • Java Developer Toolkit 1.6
  • Eclipse Classic 3.5.2

So could you try with a more recent Eclipse version?
See Requirements and Installation, and then the turorial:

alt text

As mentioned, note the 'S' in the Scala project icon.

like image 25
VonC Avatar answered Nov 20 '22 19:11

VonC