简单的IDEA入门记录, 以 2018.2 为准
在IDEA安装位置/bin
下放入破解补丁, 修改idea.vmoptions
文件, 增加
-javaagent:JetbrainsCrack-2.10-release-enc.jar
- Mac 应该要先打开一次程序, 因为会有验证文件完整性的过程
- 注意和下载的文件对应
- Windows 需要同时设置两个
.vmoptions
文件 - Windows 可能需要将
-javaagent
设为绝对路径 - 打开欢迎界面 Configure -> Manage Licenses -> Activation Code 输入注册码
不打开任何项目的界面 :
Configure -> Project Defaults -> Project Structure
设置 JDK 文档
Configure -> Preference -> Build Tools -> Maven -> Importing
- 自动更新 Import Maven projects automatically
- 自动下载源码和文档 Automatically Download: Sources and Documentation
Configure -> Preference -> Editor -> General -> Show quick documentation on mouse move
感觉体验不是很好, 还是自己 ctrl+J
吧
Configure -> Preference -> Editor -> General -> Auto Import
- 自动导包 Add unambiguous imports on the fly
- 导包优化 Optimize imports on the fly, 会
import java.io.*
不推荐
Configure -> Preference -> Editor -> General -> Code Completion
View -> Toolbar
安装流程查看官网
似乎顺便安装了 Hotcode 2
cmd+alt+L
格式化代码ctrl+J
查看文档cmd+delete
删除当前行cmd+B
/cmd+鼠标
前往定义alt+enter
- 在包重复时提供选择
cmd+N
生成 getter / settercmd+F9
Build 项目cmd+Z
/cmd+shift+Z
undo / redocmd+F
/cmd+R
Find / Replace
File -> New -> Module From Existing Source
validate
- validate the project is correct and all necessary information is availablecompile
- compile the source code of the projecttest
- test the compiled source code using a suitable unit testing framework. These tests should not require + the code be packaged or deployedpackage
- take the compiled code and package it in its distributable format, such as a JAR.verify
- run any checks on results of integration tests to ensure quality criteria are metinstall
- install the package into the local repository, for use as a dependency in other projects locallydeploy
- done in the build environment, copies the final package to the remote repository for sharing with other developers and projects.
常用命令
mvn clean
清空mvn package
打包 jarmvn install
安装到本地仓库
- 开启 IDEA 插件 (安装 阿里巴巴集团开发规约 时已自带)
- 运行程序
- 修改代码
- Build 项目