您的位置:首页 > 其它

idea 快捷键,常用设置,插件安装,查看字节码

2017-01-14 19:05 721 查看

快捷键

command+o 快速打开类

shift+command+o 打开任意文件

⌃Space control+空格 代码快速补全

⌥F7 find all places where a particular class, method or variable is used in the whole project

alt+enter 导入类

alt+command+b 进入方法具体实现

Ctrl+H 类的层级结构

command+7 显示类结构

control +alt+O 代码格式化

Ctrl + Alt + Shift + T 重构

command + alt + L 格式化

双击 shift 全文搜索

参考:IntelliJ IDEA 使用教程(极客学院)http://wiki.jikexueyuan.com/project/intellij-idea-tutorial/emmet-introduce.html

安装插件ACTIVATE-POWER-MODE

从ACTIVATE-POWER-MODE认识IntelliJ IDEA的插件开发 : http://www.shaowenwu.cn/cong-activate-power-moderen-shi-intellij-ideade-cha-jian-kai-fa/

输入爆炸效果插件:activate-power-mode

去掉震动效果,GitHub项目地址:https://github.com/ViceFantasyPlace/activate-power-mode 这里下载该插件的源码,然后删除所有和shake有关的代码,就可以去掉震动效果,不过使用中感觉idea变得有点卡顿。参考:http://www.shaowenwu.cn/cong-activate-power-moderen-shi-intellij-ideade-cha-jian-kai-fa/

debug及运行插件:

To create a Run/Debug configuration for a plugin

On the main menu, choose Run | Edit Configurations.

In the Run/Debug Configuration dialog, click ➕



* , or press ⇧⌫, and select Plugin.

* Specify the settings as necessary and click OK.

To run or debug a plugin

Depending on whether you are going to run or debug your plugin:

* To run the plugin, select Run | Run from the main menu, or press ⌃R.

* To debug the plugin, select Run | Debug from the main menu, or press ⌃D.

As a result, IntelliJ IDEA will start an instance of itself. This will be the instance in which your plugin will be available.

打包插件方法,打成个jar,然后从本安装插件的方法安装这个插件就可以了。

To create a plugin archive

* Right-click the plugin module in the Project view and select Prepare Plugin Module For Deployment in the context menu.As a result, IntelliJ IDEA will create the necessary archive.


AceJump插件

安装插件方法就不说了,mac上是
control+;
然后按下要定位的字符,然后会出现很多字符,输入字符定位到想要定位的位置

FindBugs-IDEA 插件

选择项目右击,选择 find bugs 菜单即可

idea查看文件字节码配置

command+
打开偏好设置
Tools->External Tools
点击加号添加,随便写 Name 和 Description内容

在Tools settings中填写如下内容:

program:/Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/javap
Parameters:-c $FileClass$
Working directory: $OutputPath$


然后再右击java文件时,选择External Tools 中的显示字节码选项,就会将字节码显示到控制台上

参考:Intellij idea快速查看Java类字节码 - AClewis:http://www.itdadao.com/articles/c15a1016491p0.html

常用设置

代码提示忽略大小写

preferences->code completion   :  Case sensitive completion  选择 None


显示内存使用情况

preferences-》Appearance   Window Options  勾选 Show memory indicator


右下角会显示内存使用情况,点击后可以进行部分内存的回收。

idea远程调试tomcat

参见:https://github.com/judasn/IntelliJ-IDEA-Tutorial/blob/newMaster/remote-debugging.md

极力推荐idea使用教程推荐:https://github.com/judasn/IntelliJ-IDEA-Tutorial

【参考文献】

jetbrains官方手册
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: