IntelliJ IDEA 工具

简介

IDEA 全称IntelliJ IDEA,是java语言开发的集成环境,IntelliJ在业界被公认为最好的java开发工具之一,也是AES算法标准的主要竞争者,其安全性已经在国际密码年会上被证明。

优势

  • 自动反编译
  • 好用的快捷键和代码模版
  • 提示功能快速、便捷
  • 提示范围较广(例如sql语句)
  • 精准搜索
  • 整合能力更强

快捷键

下面是我从网上找到的就是用的比较多的一些快捷键,大家仅供参考,还是要多用。
1.执行(run) alt+r
2.提示补全 (Class Name Completion) alt+/
3.单选注释 ctrl + /
4.多行注释 ctrl + shift + /
5.向下复制一行 (Duplicate Lines) ctrl+alt+down
6.删除一行或选中行 (delete line) ctrl+d
7.向下移动行(move statement down) alt+down
8.向上移动行(move statement up) alt+up
9.向下开始新的一行(start new line) shift+enter
10.向上开始新的一行 (Start New Line before current) ctrl+shift+enter
11.如何查看源码 (class) ctrl + 选中指定的结构 或 ctrl + shift + t
12.万能解错/生成返回值变量 alt + enter
13.退回到前一个编辑的页面 (back) alt + left
14.进入到下一个编辑的页面(针对于上面那条来说的) (forward) alt + right
15.查看类继承关系(type hierarchy) F4
16.格式化代码(reformat code) ctrl+shift+F
17.提示方法参数类型(Parameter Info) ctrl+alt+/
18.复制代码 ctrl + c
19.撤销 ctrl + z
20.反撤销 ctrl + y
21.剪切 ctrl + x
22.粘贴 ctrl + v
23.保存 ctrl + s
24.全选 ctrl + a
25.选中数行,整体往后移动 tab
26.选中数行,整体往前移动 shift + tab
27.查看类的结构:类似于 eclipse 的 outline ctrl+o
28.修改变量名与方法名(rename) alt+shift+r
29.大写转小写/小写转大写(toggle case) ctrl+shift+y
30.生成构造/get/set/toString alt +shift + s
31.查看文档说明(quick documentation) F2
32.收起所有的方法(collapse all) alt + shift + c
33.打开所有方法(expand all) alt+shift+x
34.打开代码所在硬盘文件夹(show in explorer) ctrl+shift+x
35.生成 try-catch 等(surround with) alt+shift+z
36.局部变量抽取为成员变量(introduce field) alt+shift+F
37.查找/替换(当前) ctrl+f
38.查找(全局) ctrl+h
39.查找文件 double Shift
40.抽取方法(Extract Method) alt+shift+m
41.全屏显示代码(close active tab) ctrl + m
42.打开 Module setting 窗口(Recently Changed Files) ctrl+E
43.关闭当前打开的代码栏(close) ctrl + w
44.关闭打开的所有代码栏(close all) ctrl + shift + w
45.快速搜索类中的错误(next highlighted error) ctrl + shift + Q
46.选择要粘贴的内容(Show in Explorer) ctrl+shift+V
47.查找方法在哪里被调用(Call Hierarchy) ctrl+shift+H
48.查看方法的多层重写结构(method hierarchy) ctrl+alt+h
原文链接:https://blog.csdn.net/flyfeifei66/article/details/88014512

模板

  • psvm//模板一
public static void main(String[] args) {
  }
  • sout //模板二

–soutv(打印就近变量的值)

 int num=10;
  System.out.println("num = " + num);

–soutp(打印这个方法的形参 parameter)

public static void main(String[] args) {

	System.out.println("args = [" + args + "]");
}

–soutm(能够把这个类使用的方法名给打印出来)

public class helloword {
    public static void main(String[] args) {       
        System.out.println("helloword.main");
        }
  • fori //模板三
String[] arr = new String[]{"Tom", "Hans","Jerry"};
        for (int i = 0; i < lenhth; i++) {
            System.out.println(arr[i]);
        }

还有两个变形 iter itar

  • List.for

IDEA的安装

我提供下面两种方式下载IDEA.

发布了2 篇原创文章 · 获赞 2 · 访问量 235

猜你喜欢

转载自blog.csdn.net/See__word/article/details/104261919
今日推荐