I'm just starting to learn Scala. I have installed the Scala plugin for IntelliJ, and created a new Scala project. But when I right-click on the src folder to make a new Scala class, there is no option to do so. Am I missing something?
相关问题
- Unusual use of the new keyword
- What uses more memory in c++? An 2 ints or 2 funct
- Get Runtime Type picked by implicit evidence
- How Does WebSphere Choose the Classloading Order i
- What's the point of nonfinal singleton objects
相关文章
- Gatling拓展插件开发,check(bodyString.saveAs("key"))怎么实现
- RDF libraries for Scala [closed]
- In IntelliJ IDEA, how can I create a key binding t
- Why is my Dispatching on Actors scaled down in Akk
- IntelliJ IDEA can't open projects or add SDK o
- How do you run cucumber with Scala 2.11 and sbt 0.
- GRPC: make high-throughput client in Java/Scala
- NameError: name 'self' is not defined, eve
Right click on your project, "Add Framework support" and choose Scala framework, then by right click on the packages you can create Scala Class.
Go to Src folder and choose Mark as Directory then choose the option called source root, that would fix your problem.
add
libraryDependencies += "org.scala-lang.modules" %% "scala-parser-combinators" % "1.0.50"
in target ->built.sbt
file this works for IntelliJ IDEA 2017I experienced this behavior when the folder was not correctly marked as a source folder (blue folder symbol). If that is the case, simply right-click on the whole project and choose Open Module Settings where you can then mark the respective folder as source: Module settings where you may select src as Source folder
Intellij by default doesn't pick up the dependencies at times. You'll need to create a seperate sbt or maven project and then import it to Intellij.
If you want to create a Java Scala Mixin project you can follow this blog post. And then import it in Intellij.
Or if your just trying to learn Scala.
You can download this maven based Scala Starter Template and import it in intellij and then continuing working on it.
You just need to select the 'Package' instead of 'Project' option from the drop-down menu just above your project name.