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

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?

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 .. ;-)

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:
As mentioned, note the 'S' in the Scala project icon.

Related

Eclipse failure during a maven update

First of all, probably my question is not well asked or is too easy or too simple but I'm a little bit novice and Vaadin and I can't figure what is happening.
When I try to update the maven project using "Update project" doing right client over "pom.xml", I get the following error over and over.
An internal error occurred during: "Updating Maven Project".
Receiver class com.baselet.plugin.MavenProjectChangedListener does not define or inherit an implementation of the resolved method 'abstract void mavenProjectChanged(java.util.List, org.eclipse.core.runtime.IProgressMonitor)' of interface org.eclipse.m2e.core.project.IMavenProjectChangedListener.
When I click "ok", the same error appears again and again.
I'm using:
Eclipse 2022-12
JDK Zulu 17
Apache Maven 3.8.7 which I downloaded and I selected at Eclipse's configuration.
I tried several projects and it is always the same. Could someone give me an advise?
Regards,
The current UMLet plugin which you have installed does not work with the current Eclipse Maven integration (m2e) 2.x of Eclipse 2022-09 and higher containing m2e 2.x in contrast to previous Eclipse IDE releases.
Please make sure the issue has been reported to the UMLet project.
See also m2e issue #991, closed as not a m2e issue with the following comment by Mickael Istria:
It looks like the com.baselet plugin is not compatible with m2e 2.x.
Please report issue to that plugin
For details see my comment here.

Intellij IDEA - Cannot add framework support for Scala

I have sbt 0.13.16 and Scala 2.10.6 running with Intellij 2018.2.1, working with those recommended sbt and Scala settings for Odersky's coursera course on Scala (I'm guessing their automated submission grader depended on old SBT?).
When creating new sbt + scala projects, I choose the above sbt and Scala versions, then after all the dependencies have downloaded, when I right-click New -> ... I see options for Java class but nothing for Scala. I have the Scala plugin already there according to the plugin settings.
So I try to Add Framework Support after right-clicking on the project, I select Scala, but then everything is disabled except Cancel.
I looked through previous forums, found one but that seemed relevant only for git projects.
Anyone else run into this issue? Do I need to update to more recent Scala and SBT? Any help would be very appreciated.
Please check https://plugins.jetbrains.com/plugin/1347-scala/versions for a compatibility table.
You can manage plugins in IntelliJ Preferences. Your versions seem to be too old to still be supported, already. It may help to upgrade IntelliJ and then go to preferences and get the latest Scala and SBT plugins.

Scala Eclipse IDE - strange behavior

I am giving a try to Scala Eclipse IDE after a very long time. I installed Eclipse and the said Scala plugin only a while ago, but I am unable to get stuff working. In all of the Scala files, I get the errors like following (See the tooltip):
This project uses Gradle for building, and I also have the latest version of Groovy plugin installed. Please help me get this thing working. Thanks.
Edit:
Thank you, everyone. The problem was solved. It appears there was a problem with my Scala plugin installation. A complete reinstall of everything (including Eclipse) helped. Also, this time I did not install the Groovy plugin.
I don't know which version of Eclipse / Scala-IDE you're using, but there are two reasons I know this sometimes happens:
1) You don't have JDT weaving for Scala installed.
The scala-ide uses aspects to weave in code into the JDT compiler. If you don't have this installed, this may cause the Scala files to be seen as Java files.
2) If, somehow, the Java Source File content type includes *.scala. In fact, it should be Scala Source File. If this is the case, you should remove the *.scala from the Java Source File content type.

Problem on error highlight using IntelliJ 10 CE with the scala plug-in

I'm having some strange behavior in the IntelliJ editor when editing scala sources. It continuously report problem of kind "cannot resolve symbol" on various Predef functions like "require" and "->".
It seems to be only an editor problem because I am able to run scala code in Intellij and compile the sources using maven.
Am I the only one having this kind of problem ?
I'm using the Intellij version 10.0.3 CE and scala plugin version 0.4.735.
Thanks.
I would recommend using the latest IntelliJ IDEA EAP together with the latest Scala Plugin. This is known to solve a lot of problems.
Please, check the project configuration guide. It's likely that you forgot to add Scala standard library to the module dependencies.

Groovy + Eclipse

I have a simple question regarding groovy with eclipse. I downloaded the plugin as mentioned and i didnt have problems with installations but i have compiler errors in hello p. the problem in my opinion that eclipse isnot using the groovy compiler. but i have no idea what to do
Is the filename extension .groovy?
Are you sure the project has the Groovy nature? (right-click on the project, and ensure Remove Groovy Nature appears. If Add Groovy nature appears, then the project doesn't have a groovy nature, and therefore the groovy compiler won't work).
Could you also post the file that isn't compiling. There might be something wrong with what you typed.
Make sure you are opening the file in a Groovy editor.
Look for any exceptions in your error log.
Also, just in case, you can try uninstalling and reinstalling the plugin. I'd recommend using the latest milestone version as that one is about to be promoted to 2.1.2 final.
http://dist.springsource.org/milestone/GRECLIPSE/e3.6/
I confirmed that Groovy plugin isnot workingn on mac. I tried it on 2 machines and they are giving the same error. Groovy plugin is working on windows without problems :)
NetBeans is a better option for Groovy+Java development. You can mix Java and Groovy files in a Java project in NetBeans. It also creates a distributable jar for your project. No classpath and jar issues with NetBeans created MET-INF file.