How to get inline results in a worksheet in Eclipse/Scala-IDE on Ubuntu 12.04?

梦想的初衷 提交于 2019-11-27 07:48:57

问题


I've got the Scala-IDE installed on my Mac and on my pc with Ubuntu 12.04. In there I created a project, with a package and in there a worksheet. On my mac, the worksheet shows results of every line on the same line on the right. For example:

package mypackage
object myworksheet {
    println("Hello World!")                                  > Hello World!
}

On Ubuntu however, I do not see the result on the right. I've tried making changes in the worksheet and saving it, but it makes no difference.

Does anybody know how I can get these inline results on my Ubuntu machine as well?


回答1:


I had the same issue, adding -Dfile.encoding=UTF8 to eclipse.ini fixed the issue.

For more details look at answer to the question: Results encoding in Scala Worksheet Eclipse plugin




回答2:


Having a space in the Project name was the problem for me. Creating a new project without the space resolved it.

See this answer New scala worksheets not evaluated in Eclipse




回答3:


A very simple answer to your question-

I agree that the project name should not contain a space, you can also get Inline Result in Scala Worksheet

New Project < Scala Project < Type a Name < Finish GO to src < Right CLick < Scala Worksheet

P.S. Also here you don't need to Run (just hit Ctrl+S to save) also you don't need to append extends App to the obj worksheet name.




回答4:


Change the scala installation to default version.

Follow these steps:

  1. Project -> Right click -> Properties -> Scala Compiler
  2. Click Scala Installation drop down.
  3. Select "Latest 2.12 bundle (dynamic)" in drop down



来源:https://stackoverflow.com/questions/17995704/how-to-get-inline-results-in-a-worksheet-in-eclipse-scala-ide-on-ubuntu-12-04

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!