scala 学习
来源:互联网 发布:知乎出错了请稍后再试 编辑:程序博客网 时间:2024/06/14 09:19
Before you start
By default, the Scala plugin is not bundled with IntelliJ IDEA.
If IntelliJ IDEA recognizes that you have .scala
files in your project then it displays the appropriate pop-up suggesting to install the Scala plugin.
![scala_plugin_popUp scala_plugin_popUp](https://www.jetbrains.com/help/img/idea/2016.2/scala_plugin_popUp.png)
![choose_plugin_to_install_scala choose_plugin_to_install_scala](https://www.jetbrains.com/help/img/idea/2016.2/choose_plugin_to_install_scala.png)
Alternatively, you can use Settings to download and enable the plugin in IntelliJ IDEA.
Creating a project with a Scala module
- If no project is currently open in IntelliJ IDEA, click Create New Project on the Welcome screen. Otherwise, select File | New | Project.
As a result, the New Project wizard opens.
- In the left-hand pane, select Scala.
Note that if you select Java and in Additional Libraries and Frameworks, select Scala, you will create a Java project with a simple Scala module. However, the project will not include SBT, Play 2.x or Activator. - In the right-hand pane, select Scala.
You can also select SBT for creating an SBT project, Play 2.x for creating a project with the Play 2.x framework, Activator for creating a project with Typesafe Activator templates or Dotty for creating a project with the Dotty SDK.Click Next.
- On the next page of the wizard, specify project and module location settings.
If the Scala SDK is not specified, click Create, select a necessary SDK version for downloading and click OK.
Click Finish.
Exploring your project structure
- Open Project Structure.
- On the left-hand pane, select Modules and on the right-hand side of the module page, you can check the project libraries, add the new ones, edit or delete the existing libraries.
Click OK.
Creating an object
- In the project tree, right-click a node in which you want to create your Scala object.
- From the drop-down list, select Scala class.
- In the dialog that opens, in the field Name, enter the name of your Scala object and in the field Kind select either Object, Class or Trait.
Click OK.
Running your application
- In the project tree, right-click the application and from the context menu select Run 'application name'. Alternatively, press Shift+F10 to run the application. You can also right-click the
icon in the left gutter and select Run 'application name' command.
Before you start
By default, the Scala plugin is not bundled with IntelliJ IDEA.
If IntelliJ IDEA recognizes that you have .scala
files in your project then it displays the appropriate pop-up suggesting to install the Scala plugin.
![scala_plugin_popUp scala_plugin_popUp](https://www.jetbrains.com/help/img/idea/2016.2/scala_plugin_popUp.png)
![choose_plugin_to_install_scala choose_plugin_to_install_scala](https://www.jetbrains.com/help/img/idea/2016.2/choose_plugin_to_install_scala.png)
Alternatively, you can use Settings to download and enable the plugin in IntelliJ IDEA.
Creating a project with a Scala module
- If no project is currently open in IntelliJ IDEA, click Create New Project on the Welcome screen. Otherwise, select File | New | Project.
As a result, the New Project wizard opens.
- In the left-hand pane, select Scala.
Note that if you select Java and in Additional Libraries and Frameworks, select Scala, you will create a Java project with a simple Scala module. However, the project will not include SBT, Play 2.x or Activator. - In the right-hand pane, select Scala.
You can also select SBT for creating an SBT project, Play 2.x for creating a project with the Play 2.x framework, Activator for creating a project with Typesafe Activator templates or Dotty for creating a project with the Dotty SDK.Click Next.
- On the next page of the wizard, specify project and module location settings.
If the Scala SDK is not specified, click Create, select a necessary SDK version for downloading and click OK.
Click Finish.
Exploring your project structure
- Open Project Structure.
- On the left-hand pane, select Modules and on the right-hand side of the module page, you can check the project libraries, add the new ones, edit or delete the existing libraries.
Click OK.
Creating an object
- In the project tree, right-click a node in which you want to create your Scala object.
- From the drop-down list, select Scala class.
- In the dialog that opens, in the field Name, enter the name of your Scala object and in the field Kind select either Object, Class or Trait.
Click OK.
Running your application
- In the project tree, right-click the application and from the context menu select Run 'application name'. Alternatively, press Shift+F10 to run the application. You can also right-click the
icon in the left gutter and select Run 'application name' command.
- scala学习
- Scala 学习
- scala 学习
- Scala学习
- Scala学习
- scala学习
- Scala 学习
- scala学习
- SCALA学习
- scala学习
- scala学习
- 学习SCALA
- scala学习
- scala学习
- Scala学习
- 学习scala
- Scala 学习
- scala学习
- Could not find any matches for com.tencent.mm.opensdk:wechat-sdk-android-with-mta:+ as no versions处理
- 如何禁止客户端机器使用凭据远程登录
- Android 监听EditText的输入状态
- Arpa’s obvious problem and Mehrdad’s terrible solution CodeForces
- ArrayAdapter
- scala 学习
- js中最实用string(字符串)类型的使用及截取与拼接
- poj 2891 中国剩余定理 线性同余方程
- String类和StringBuffer类
- 求链表中倒数第k个结点
- 【PSO】Python 实现粒子群算法
- Android开发相关——Retrofit+RxJava+OkHttp(下)使用
- jquery开发:jquery插件编写
- Balloons