Building a Play 2.6 project from IntelliJ builds nothing - scala

I'm running my head into the ground trying to create a new "hello-world" level blank Play 2.6 project. I have successfully opened and run one of their example starter projects from the Play site in IntelliJ, and it works without issue.
However when creating my own I follow all the steps:
New project -> Play 2.x -> Setup as pictured:
And about 10 seconds later, this is all I get:
From my understanding, the whole structure should be available and displaying to me.
I don't know if it matters, but my Scala version is 2.12.1 and my IntelliJ version is the full version 2017.1 . I checked and the Playframework Support plugin is enabled, and so is Scala.
I'm also open to creating a "blank" one in SBT and then importing it into Scala, but unsure of how to do that either.
Thanks for the help.

Refresh your IDE, the latest Intellij IDEA version (2017.2) with up to date plugins creates a new Play 2.x project without a problem.

Related

IntelliJ IDEA 2020.3 Scala plugin isn't working with new projects

I just formatted my computer and installed the new macOS Big Sur. I installed IntelliJ IDEA 2020.3 with the Scala plugin version 2020.3.17. I'm running GraalVM 20.3, Scala 2.13.4 and sbt 1.4.4 outside IntelliJ with no issues so far.
IntelliJ loads my projects just fine and everything works perfectly. The problem is when I try to create a new Scala/sbt project. IntelliJ isn't creating the build module as expected and, because of that, IntelliJ doesn't recognize any source code at all.
All installs were clean, I didn't recovered from any backup, just installed as it was a new computer. I also own a valid IntelliJ IDEA Ultimate license. I tried uninstalling everything, but with no success. There's no way I can make it work.
The steps to reproduce my issue:
Open IntelliJ IDEA -> New project -> Select Scala on the left panel -> Select sbt on the right panel -> All defaults on next screen -> Wait for IntelliJ to index everything and creates the modules.
That's it. After finishing indexing, no build module is created. If I open my build.sbt file, all it shows is it can't find any symbol and it doesn't highlight the src/main/scala as source code folder. Actually, it doesn't highlight any folder at all.
Anyone out there with the same issue and/or solution?
Yes, I had the same problem as you. I rebuilt the project step by step by creating a new one starting from the sbt dependencies and plugins. Basically I solved it by setting the sbt version to sbt.version = 0.13.18 inside the project / build.properties folder. By inserting scala-sdk-2.12.12 as global libraries in the project structure and Java 12 as SDK
This issue is gone with latest updates from IntelliJ.

Cannot select the scala sdk when using Intellij after installed the scala plugin

Everyone, thanks for your attention.
I'm using Intellij IDEA 2017.2 in windows 7, with Scala plugin installed.(I downloaded directly from the web and installed it from local disk.)
But when I wanna to add Scala sdk through "Project Structure-Global Libraries" , I clicked the menu "Scala sdk" which is shown in the picture below, it didn't appear by the popup window as expected, i.e, it didn't present anything.
So I cannot select the Scala sdk.
the picture describes the scenario
What should I do to make it work in Intellij? My scala version is 2.12.2.
Any advices will be appreciated.
Thanks for viewed and replied.I have found the problem.
It's wired. After I created a new project, I added scala sdk successfully within this project's structure.
I had the same issue with the Scala SDK selection doing nothing. (IntelliJ CE 2018.1 on macOS 10.13.2). To change my version of Scala (in this case going from 2.12 to 2.11 for Spark support), I deleted the 2.12 SDK from Global Libraries and noticed that IntelliJ could still build/run the project. So I changed the symlink it was reading the Scala library from to point to a 2.11 install. After restart IntelliJ still has no Scala SDK under Global Libraries and the button to add it still doesn't work, but it is using 2.11 which is all I needed.
I also tried Jimmy Liu's fix of creating a new Scala project but it didn't seem to have an effect.

Play framework support in IntelliJ IDEA Community Edition

I installed IDEA version 15 with the Scala plugin, but Play projects are enabled only in the Ultimate edition. I'm new to Scala and Play, any issues if I run Play outside of IDEA? Would Play "hot deploy" any changes I make in scala source code?
Just open it as an SBT project and it's fine.
This is how it works: (1) create a project using play/activator, (2) open IntelliJ and import as SBT project (accept all defaults), (3) run the project in a command line (externally to IntelliJ), (4) edit project source files in IntelliJ - when you update a file, it is automatically compiled (you can see that refreshing the url localhost:9000)
Play works great outside of IntelliJ. I have developed play applications using Sublime Text and Atom. You'll get the errors in the console, or in the web application itself.
There's also a NetBeans plugin now (http://nbpleasureplugin.com), and the official ScalaIDE should also support it (although I've never tried using it).

Why does IDEA mark certain parts of Play code red?

I'm pretty new to the Play framework. I've been trying to configure it so I can use it with IntelliJ Ultimate.
I use following:
IntelliJ Ultimate 14.03
Scala plugin for IntelliJ 1.2.1
Play Framework 2.3.7 (the one that works online 1,2MB)
Scala 2.11
JDK 1.7
Windows 7
My problem is all about the fact that i can't make the errors disappear. Below is a simple example. When I create something more complicated (mapping etc.) I get entire blocks of red (also it does not suggest any code for the more complicated code).
What I've tried to fix it:
- deleting .idea folder and generating it again
- cleaning sbt
- generating a Play app from inside activator and also from IntelliJ
- re-installing IntelliJ
This is how I create the app from inside IntelliJ
I'm new both to Scala and Play, but I've done some research and I didn't end up with working solution. The same project works on Eclipse, but I would like to stick with IntelliJ.
The Scala plugin 1.2.1 is fairly outdated (given the development stage/pace of the Scala support in IntelliJ IDEA).
As of today, Jan, 29th, you should really be using the latest version of the Scala plugin 1.3.

IntelliJ: Scala code doesn't compile when Play 2.0 plugin is installed

I'm using IntelliJ IDEA 13. I have a Play 2.0 project and a separate Scala project. When I install the Play 2.0 plugin (version 0.30.379) and open just the Scala project, the Scala compiler stops working. When I remove the Play 2.0 plugin, I can see that the Scala compiler is working when doing a rebuild (it shows up in the status area then).
If I remove the Play 2.0 plugin and use the Play 1.x plugin, Scala compiles fine. Reverting to previous versions of the Scala and Play 2.0 plugins doesn't seem to help (I reverted to versions prior to february 2014).
I tried a fresh install of IntelliJ but no luck.
Any ideas?
I've also posted this issue in the Jetbrains issue tracker here: http://youtrack.jetbrains.com/issue/IDEA-120990 I'll update this if I find out anything.
It looks like this is a bug in Intellij 13.0.2+ and may work fine in 13.0.1. I'll test that and update this answer.