scala-ide

Scala project won't compile in Eclipse; “Could not find the main class.”

你。 提交于 2019-12-17 11:28:06
问题 I have installed Eclipse 3.5.2 and today's Scala plugin from /update-current (that's Scala 2.8 final.) I can compile and run Scala projects consisting of a single singleton object that implements main(). But, if a project contains more classes, I receive the "Could not find the main class" error. I have tried searching for the solution and I discovered: Eclipse is correctly looking for the Main$ class, not the Main class * under Debug Configurations, my main class is correctly identified as

How to stop program execution in worksheet?

佐手、 提交于 2019-12-14 00:29:58
问题 How can program execution be stopped in the Scala worksheet ? If code is executing and does not return (an infinite loop) it does not seem possible to stop the program execution without re-starting Eclipse ? 回答1: From https://github.com/scala-ide/scala-worksheet/wiki/Getting-Started : If the program takes too long to execute, the editor adds a spinning bar after 2 seconds. You can interrupt the evaluation at any point by typing any character or Esc. 来源: https://stackoverflow.com/questions

How can I find the version of Scala installed in Eclipse IDE?

蓝咒 提交于 2019-12-13 13:05:20
问题 The question is how can I find the version of the Scala module installed in the Eclipse IDE? I know I've installed 2.9.xxx something, but I'd like to keep tracking the version number in case of future updates in order to, for example, look up the right API manual. Or is there a general way to see the versions of the installed plugins in Eclipse IDE? Thanks in advance! 回答1: Help->About Eclipse->[scala-ide.org Button]->Plugin-Details: There you can see the plugin "Scala Library for Eclipse"

Eclipse, Scala & Maven - Class files are not generating

扶醉桌前 提交于 2019-12-12 15:31:11
问题 I converted my scala project in eclipse to use Maven (simply by right clicking on project and Configure Maven build), this created pom.xml, added right dependency which pulled up required jars from maven repository but whenever i try to compile I don't see class file generating in target\classes folder. However, i see actual source code which is scala files in respective directory under target\classes folder. I am not sure why it is copying source files in target\classes folder. Another wierd

Eclipse not recognizing Scala code

▼魔方 西西 提交于 2019-12-12 08:19:06
问题 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. 回答1: A couple of things I would try: 1) Right-click on project, Configure > Add Scala Nature. 2) In the Scala menu, Run

Is there a ScalaTest Plugin for Eclipse Luna and Scala IDE Lithium?

雨燕双飞 提交于 2019-12-11 20:59:30
问题 Trying to find the ScalaTest plugin for use with Eclipse Luna and Scala IDE for Eclipse 4.0.0 (aka Lithium). Currently using Milestone 2 of the Scala IDE for Eclipse Lithium plugin. The ScalaTest plugin used to be part of the Scala IDE for Eclipse plugin (appeared on the list and you could check the box it to install--Scala IDE for Eclipse is supposed to be an ecosystem of plugins, ScalaTest being one of them). It doesn't appear to be there any more. It's not on the list, When I check

Line wrapping long curried function definitions in Scala with Scala IDE

两盒软妹~` 提交于 2019-12-11 19:48:44
问题 This is a simple question, but I'm curious about the "right" way to line-wrap curried functions in Scala. For example, suppose I have the moderately long line (if it's not long enough, you can pretend there are more parameters): def executeFooBarCommand(ce: CommandExecutor)(implicit ec: ExecutionContext): Future[FooBar] = { //... } I have two problems regarding wrapping the long definition: First, I'm not sure what the accepted best practice is for wrapping such lines (or even longer ones.

Type not found: type .. when type is in src_managed folder

依然范特西╮ 提交于 2019-12-11 14:23:55
问题 After sbt eclipse , when I import a project to my eclipse workspace, I get the error that type not found:X When I search for that type X, I find it in the src_managed folder of the same project. I am using Scala IDE 4.0.0 RC2 I have set my Scala Installation to my project(2.10.4) It does not have any projects that it depends on I can compile it in sbt i.e. sbt.{project myProject,compile}. NOTE: When I do this, and I come back and refresh the project in Eclipse, suddenly all errors "seem" to

When exporting a Java Scala project it failed to get scala/ScalaObject

心已入冬 提交于 2019-12-11 11:59:50
问题 I'm working on eclipse with Scala 2.9.3 plugin installed. I have a Scala project which work fine from the eclipse but when I export the project to "Runnable JAR File" and I try to run it I'm getting the following exception: java.lang.NoClassDefFoundError: scala/ScalaObject I tried all the 3 Library handling options: Extract required libraries... Package required libraries... Copy required libraries... All end up in the same exception. What I need to do in order to make a standalone JAR file

Scala Eclipse IDE - strange behavior

半腔热情 提交于 2019-12-11 08:24:19
问题 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