IntelliIdea - Cannot see scala in add framework support - scala

I want to run scala code in IntelliJ Idea.
I donot see option scala in Add Framework Support
Please suggest how to do it?

To run the Scala code there is no need to add any framework or facet (things like this were done in some previous IntelliJ versions, but this is long ago).
The only thing you need is to install a Scala plugin.
If you did not install the plugin when installing the IDE, use menu item Settings, click on Plugin, then Marketplace and type Scala.
With a Scala plugin installed, you can create a new Scala project.

Related

Intellij IDEA - Cannot add framework support for Scala

I have sbt 0.13.16 and Scala 2.10.6 running with Intellij 2018.2.1, working with those recommended sbt and Scala settings for Odersky's coursera course on Scala (I'm guessing their automated submission grader depended on old SBT?).
When creating new sbt + scala projects, I choose the above sbt and Scala versions, then after all the dependencies have downloaded, when I right-click New -> ... I see options for Java class but nothing for Scala. I have the Scala plugin already there according to the plugin settings.
So I try to Add Framework Support after right-clicking on the project, I select Scala, but then everything is disabled except Cancel.
I looked through previous forums, found one but that seemed relevant only for git projects.
Anyone else run into this issue? Do I need to update to more recent Scala and SBT? Any help would be very appreciated.
Please check https://plugins.jetbrains.com/plugin/1347-scala/versions for a compatibility table.
You can manage plugins in IntelliJ Preferences. Your versions seem to be too old to still be supported, already. It may help to upgrade IntelliJ and then go to preferences and get the latest Scala and SBT plugins.

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.

How to use existing Scala with Intellij

I already have brew install scala - I am able to run Scala via command line. After that I installed IntelliJ version 2016.1.3
While installation process of IntelliJ, I was asked to install Scala plugin but i clicked no - because I already have Scala installed
Now I am trying to figure out where exactly we can create a Scala application with the use of my existing Scala installed. How and where in the IntelliJ can I set this up? I can only see Java projects available to be created.
Thanks
You can't. The Scala you have installed is a completely different thing from the IDEA Scala plugin.
The Scala plugin is what you need to handle Scala projects, editing Scala files, etc. in IDEA. The command-line Scala is just the compiler and the standard library, it doesn't know anything about IDEA.
Also, for the command line you should install SBT instead of working directly with the Scala compiler unless you want to handle dependencies, classpaths, etc. manually (you don't).
If you want to create Scala application using IntelliJ IDEA, you will need to install the Scala Plugin.
Step 1: Open IntelliJ Preferences or Settings
On Mac:
Open IntelliJ IDEA.
Then click on the menu item IntelliJ IDEA and select Preferences.
On Windows:
Open IntelliJ IDEA.
On the bottom right corner of the Welcome to IntelliJ screen, select Configure.
Step 2: Find and install Scala Plugin
After opening the Preferences or Settings screen from Step 1, click on the Plugins section on the left panel.
Then click on the Install JetBrains plugin… button.
This opens another window which has a Search box on the top left corner. Type in Scala in the search box and this will list the Scala plugin which you need to install.
Hit the Install button to kick off the installation.
Do not forget to Restart IntelliJ following the install.
And Voila! You should now be able to create Scala projects in IntelliJ.
For further instructions on how to install Scala plugin in IntelliJ, you can follow the instructions from www.allaboutscala.com

How to create a Play project in IntelliJ IDEA 14 Community Edition?

I am trying to create a Scala project in IntelliJ IDEA 14. As mentioned in IntelliJ IDEA's help, the Scala plugin already has support for Play 2.x.
I have installed the Scala plugin, and when I create a new project I can select Scala > Scala and Scala > SBT projects but there's no Scala > Play 2.x.
Are there any additional steps needed to make this available? I am using IDEA 14 Community Edition.
I have tried importing module to a Scala project using play-generated .impl file but IDE could not handle it well e.g. was finding errors in completely fine play! views.
Play framework is supported only in ultimate edition of Intellij Idea.
Here https://www.jetbrains.com/idea/features/editions_comparison_matrix.html, section Frameworks and Technologies.
For everyone else looking for an answer for Play 2.4+ the easiest way to get up and running is:
Create a new Run Configuration – From the main menu, select Run -> Edit Configurations
Click on the + to add a new configuration
From the list of configurations, choose “SBT Task”
In the “tasks” input box, simply put “run”
Apply changes and select OK.
Now you can choose “Run” from the main Run menu and run your application
https://www.playframework.com/documentation/2.4.x/IDE

In Eclipse, can I choose the version of Scala for my project?

Currently I'm using Scala IDE, and the version of Scala it's using for my project is 2.9.2. Preferably I'd like to choose 2.8.1, and am not sure how to select a version of the Scala Library.
Is there any way to change the version?
Thanks!
http://scala-ide.org/docs/user/gettingstarted.html
"The list of URLs of the different update sites are available in the download area. The release ones are in the current section. Scala IDE is linked to specific version of Scala, so you have to decide which one you are going to use:
release-29 provides support for projects using Scala 2.9.x (2.9.0-1 or 2.9.1). This is the current version of Scala. Pick this one if you are unsure.
release-28 provides support for projects using Scala 2.8.x (2.8.1 or 2.8.2)."
So you have to install release-28 Scala IDE to compile your Scala project with version 2.8.1 .
The release site can be found here:
http://scala-ide.org/download/current.html