Questions tagged [intellij-scala]

Questions related to the Scala plugin in IntelliJ IDEA.

The IntelliJ Scala plugin offers Scala editing support in the IntelliJ IDEA IDE.

44 questions
16
votes
5 answers

IntelliJ can't connect to its own Scala compile server

I am using latest IntelliJ IDEA (2016.1.1) - but I have seen this behaviour in previous versions too - developing in Scala with latest Scala plugin (3.0.3). When I try to Run/Debug a test or code, IDEA will start Making the project, but will then…
mdm
  • 3,928
  • 3
  • 27
  • 43
16
votes
2 answers

In Scaladoc, how to link to a method in the same class?

What is the correct way to create link to a method in the same class? Scaladoc documentation doesn't have examples of this. Consider a class such as: package controllers // import ... class AccountController extends Controller with Secured { …
Jonik
  • 80,077
  • 70
  • 264
  • 372
9
votes
6 answers

java.lang.NoClassDefFoundError: scala/reflect/api/TypeCreator

I'm getting this error message when I run my sbt project in IntelliJ by right clicking "Debug". /home/johnreed/Applications/jdk1.8.0_73/bin/java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:34395,suspend=y,server=n -Dfile.encoding=UTF-8…
8
votes
1 answer

'wrong top statement declaration' when using slick in IntelliJ

I'm currently porting a project from scala 2.9 to 2.10, therefore I have to use slick instead of scalaquery. I'm using slick 2.1.0 for now since it supports MS Access. According to this tutorial and the upgrade guide I changed Robs from object to…
SimonH
  • 1,385
  • 15
  • 35
5
votes
1 answer

Is there a way New->Scala Class in intellij can default to creating a case class (vs a regular class)?

When I right-click and follow New->Scala Class, Intellij defaults to creating a new regular class. I'd like it to default to creating a case class. A small thing... but annoying when creating a lot of new classes. Is it configurable somewhere?
Greg
  • 10,696
  • 22
  • 68
  • 98
5
votes
2 answers

Scala worksheet can not resolve class name - IntelliJ IDEA

I am following along with a lecture, the lecturer is using Eclipse but I am using IntelliJ IDEA Community Edition 15.0.6, and the code on a Scala worksheet named rationals.scala is as follows object rationals{ val x = new Rational(1,2) x.numer …
Max Wen
  • 737
  • 2
  • 10
  • 21
3
votes
2 answers

Scala List: why the IDEA prompts that Unused expression without side effects

The program successfully prints the 3,1,2 but I am curious about why it says that this expression is unused? package Collection object basics { def main(args: Array[String]): Unit = { var res = List[Int](1, 2) res.::=(3) // Unused…
cnidaye
  • 103
  • 6
3
votes
2 answers

Intellij Scala worksheet Run type difference explain

In Intellij Scala Worksheet support, what is the difference between the Run types i.e PLAIN vs REPL ?
MaatDeamon
  • 9,532
  • 9
  • 60
  • 127
3
votes
0 answers

Move refactoring is supported only for stable object members

I'm receiving the error message move refactoring is supported only for stable object members when I try to refactor / move xyz(), using IntelliJ 2018.2 Scala Plugin 2018.2.11 What is the reason for this limitation? As a work-around I do the…
Hartmut Pfarr
  • 5,534
  • 5
  • 36
  • 42
3
votes
0 answers

How to use WatchSource in SBT 1.x to filter files?

I had the following code like the following that worked previously: .settings(watchSources := watchSources.value.filterNot(_.getPath.contains("target"))) In SBT 1.x this results in: error: value getPath is not a member of…
bbarker
  • 11,636
  • 9
  • 38
  • 62
2
votes
1 answer

Call Scala Intellij Refresh Action From some other plugin

The requirement is to call Scala sbt plugin action (Refresh Action) and intelliJ synchronize all action from a custom plugin. As described here, we can use below syntax to call Actions of other plugins from our custom plugin…
mogli
  • 1,549
  • 4
  • 29
  • 57
2
votes
2 answers

Setting scalacOptions for IntelliJ IDEA

I have a sbt project which I have imported into IntelliJ IDEA. This project includes the splain compiler plugin which includes colour codes in some compiler messages. When compiling in IntelliJ IDEA then these colour codes are not interpreted. I can…
steinybot
  • 5,491
  • 6
  • 37
  • 55
2
votes
1 answer

Intellij SBT project: How to change the content roots?

This is the current content root configuration in my project: However, I want the "scala" directory to be the actual test content root, and not the directory named "test". If I modify it, I get the warning that "Module is imported from Sbt. Any…
Gal
  • 5,338
  • 5
  • 33
  • 55
2
votes
1 answer

IntelliJ sbt project download sources behind proxy or from nexus server

I am using sbt behind a proxy, with a corporate Nexus server. My setup works correctly, using CNTLM JAVA_OPTS="-Dhttp.proxyHost=10.0.2.2 -Dhttp.proxyPort=3128 -Dhttps.proxyHost=10.0.2.2…
Atais
  • 10,857
  • 6
  • 71
  • 111
2
votes
0 answers

Why does intellij not accept this scala code

The following code is compiling just fine with nsc: trait A { type B[+T] type C[+T] <: B[T] def c: C[Int] } object Q { val a: A = ??? val b: a.B[Int] = a.c } but intellij doesn't accept it with the error message expression of type…
Fabian Schmitthenner
  • 1,696
  • 10
  • 22
1
2 3