scala-ide

Adding joda-time as manageable dependency via sbt

会有一股神秘感。 提交于 2020-01-15 03:30:29
问题 I'm having trouble using joda-time in my scala project in scala-ide. I have the following line: import org.joda.time.DateTime But it causes the following error: object joda is not a member of package org That's what I did: I put these lines in build.sbt : libraryDependencies += "joda-time" % "joda-time" % "2.9.3" libraryDependencies += "org.joda" % "joda-convert" % "1.8" Then I ran reload in my sbt session. Then I ran update in my sbt session. So what did I miss? 回答1: sbt eclipse fixed the

Joda Time classes don't have any constructors… why? And what am I doing wrong?

▼魔方 西西 提交于 2020-01-04 03:00:13
问题 Apparently Scala on Eclipse tries to convince me that DateTime , Period , DateMidnight and many other classes in Joda Time don't have any constructors Which is odd considering the fact that the documentation for them shows a constructor and a number of methods The only things I have access to are the static methods such as DateTime.now() and DateTime.parse() Note that I have added the joda-time-2.2.jar , joda-time-2.2-sources.jar , and joda-time-2.2-javadoc.jar files to the java build path of

How to get Scala Compiler Plugin to work in Scala IDE

≯℡__Kan透↙ 提交于 2020-01-02 05:30:08
问题 Note: This is an exact repost of the same question on the Scala-IDE mailing list, where I got zero reply and gave up waiting after 5 days. I'm writing a Scala Compiler Plugin. It's currently called scalawrapper (but I might find a better name later). I have the Typesafe Stack installed, and I put my plugin in it under: C:\Program Files\typesafe-stack\misc\scala-devel\plugins Now I can call scalac like this: scalac -classpath ... -Xplugin-require:scalawrapper test\... and it finds and uses my

Eclipse stuck for search dialog box

蓝咒 提交于 2019-12-23 17:43:53
问题 My project is named MyProject , and I got the following error popping up when I press Ctrl + H in eclipse to search my project: Search Dialog Problem An error occurred while creating the search page "Java Search" Reason: MyProject does not exist When I look at the log, I find the following: !ENTRY org.eclipse.search 4 1 2013-09-03 14:58:19.272 !MESSAGE Internal Error !STACK 1 Java Model Exception: Java Model Status [MyProject does not exist] at org.eclipse.jdt.internal.core.JavaElement

toString on a negative number doesn't compile in Scala Worksheet

跟風遠走 提交于 2019-12-23 10:19:10
问题 If I create a Scala Worksheet in Eclipse as follows: object negative { 2.toString //> res0: String = 2 (2).toString //> res1: String = 2 // compile error (-2).toString } the final line causes a compile error: ';' expected but ')' found. illegal start of simple expression However, the same three lines compile and run fine within a normal Scala source file. Why does this not work in the worksheet? This is using Eclipse 3.7.2, Scala IDE 3.0.0.v-2_10, Scala Worksheet 0.1.4.v-2_10 [Updated: this

How can I run a Scala project as a Scala application by default in Eclipse IDE?

心已入冬 提交于 2019-12-23 09:29:31
问题 I am a novice to the Eclipse IDE and the question is how can I run a Scala project as a Scala application by default? When I run the project by hitting the ⌘R key, it always asks how to run it, as a Scala or Java application. Is there a way to skip this and always run it as Scala by default? I guess it's somehow related to the launch configuration, but when I try to make a new launch configuration for the project, it doesn't give me the option of Scala: only Java applet and Java application

Configure working directory of Scala worksheet

旧时模样 提交于 2019-12-22 04:14:08
问题 I would like the working directory for Scala worksheet (and the Scala interpreter) to be the Eclipse project path rather than the Eclipse installation directory. How can I (non programmatically) achieve that? I know that I can use System.setProperty("user.dir", "...") , but IMHO that does not belong in the code. Further, it does not seem to work: object ScratchWS { System.setProperty("user.dir", "C:\\") //> res0: String = C:\adt-bundle-windows-x86_64-20130219\eclipse new File("putty.exe")

Why do I get a very long timeout in my PlayFramework app?

跟風遠走 提交于 2019-12-21 20:57:32
问题 I have created a working app, but sometimes when I change things and hit the "Reload"-Button in my browser, the app takes forever to time out (300000ms or 5 minutes! ). After that I get the following exception in the browser: java.util.concurrent.TimeoutException: Futures timed out after [300000 milliseconds] scala.concurrent.impl.Promise$DefaultPromise.ready(Promise.scala:219) scala.concurrent.impl.Promise$DefaultPromise.result(Promise.scala:223) scala.concurrent.Await$$anonfun$result$1

Scala Eclipse file>new has <No Applicable Items>

蹲街弑〆低调 提交于 2019-12-21 12:12:03
问题 I downloaded the Scala IDE for Mac 64 bit from http://scala-ide.org/download/sdk.html I open the program, click File > New and see . The Coursera tutorial I'm in says that I should see the option to create a new Scala project. It looks like I have the IDE but not the SDK? 回答1: The simplest reason to get this behavior would be if all perspectives are closed. Most of the menus in Eclipse are contextual, and File > New is empty if there is no current perspective. To open a perspective, use

How to configure scaladoc in eclipse juno? [closed]

萝らか妹 提交于 2019-12-18 07:24:55
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I'm new to scala. I've installed the nightly build since I use eclipse juno. The problem I'm facing is I do not see scaladoc when the cursor is on a class/trait and I press F2(like in java). 回答1: That is because it is not implemented yet. See ticket #1000954 and #1000210 for more information and future work on