Intellij IDEA

本文提供了IntelliJ IDEA中常用的各种快捷键总结,包括代码导航、编辑、重构等操作,帮助开发者提高工作效率。

打开编辑器中的任何类迅速,按Ctrl + N(导航|类)和开始键入类名。选择类从一个下拉菜单中出现。
你可以打开任何文件在您的项目以类似的方式通过使用Ctrl + Shift + N(导航|文件)

2.

这个代码完成功能允许你快速完成不同的语句在代码。例如,开始输入类名和按下Ctrl + Space来完成它。当多个选择可用,它们显示在查找列表。

You may quickly find all places where a particular class, method or variable is used in the whole project by positioning the caret at the symbol's name or at its usage in code and pressing Alt+F7 (Find Usages in the popup menu).

你很快就会发现所有的地方,一个特定的类、方法或变量用于定位到整个项目的符号名称插入符号或在其用法在代码和紧迫的Alt + F7(找到用法在弹出菜单)。

快速查看文档的类或方法用于编辑的脱字符号,按Ctrl + Q(视图|快速文档)。

导航到的声明一个类、方法或变量在代码中使用过,位置插入符号的使用和按Ctrl + B。你也可以点击鼠标的用法使用Ctrl键按跳到声明。

You can quickly navigate in the currently edited file with Ctrl+F12 (View | File Structure).

It shows the list of members of the current class. Select an element you want to navigate to and press the Enter key or the F4 key.

To easily locate an item in the list, just start typing its name.

你可以很快的掌握在当前编辑的文件和Ctrl + F12(视图|文件结构)。
它显示了成员的列表当前类。选择一个元素你想浏览并按回车键或F4键。
容易找到一个列表项,只要开始键入它的名字。

You may easily rename your classes, methods and variables with automatic correction of all places where they are used.

To try it, position the editor caret at any symbol and press Shift+F6 (Refactor | Rename). Type the new name in the dialog that appears and press Enter.

You may browse all places where the variable is used and then press the Do Refactor button to finish the renaming operation.

你可以很容易地重命名你的类、方法和变量和自动修正所有的地方使用它们的位置。
尝试它,位置编辑脱字符号在任何符号和按下Shift + F6(重构|重命名)。输入新名称在出现的对话框中,按下Enter。
你可以浏览所有使用该变量的地方,然后按下做重构按钮完成重命名操作。

You may easily override methods of the base class by pressing Ctrl+O (Code | Override Methods).

To implement methods of the interfaces that the current class implements (or of the abstract base class), use Ctrl+I (Code | Implement Methods).

你可能很容易覆盖基类的方法通过按Ctrl + O(代码|覆盖方法)。
实现方法的接口,当前类实现(或抽象基类),使用Ctrl +我(代码|实现方法)。

这个SmartType代码完成大大有助于找到方法和变量,它们适合当前上下文,通过分析预期的类型的整个表达式。这样做,IntelliJ IDEA指出五种最合适的结果和强调他们在绿色背景。例如,typeThe SmartType完成后也可以return关键字,在一个指定的,在一个参数列表的一个方法调用和其他地方。

When using Code Completion, you can accept the currently highlighted selection in the popup list with the Tab key.

Unlike accepting with the Enter key, the selected name will overwrite the rest of the name to the right of the caret. This can be especially useful for replacing one method or variable name with another.

当使用代码完成功能,您可以接受当前突出显示的弹出列表中选择通过Tab键。
与接受和回车键,选择的名称将覆盖剩下的名字右边的脱字符号。这可能是特别有用的方法或变量名替换一个与另一个。

Did you know that you can close tabs in the editor and the tool windows of IntelliJ IDEA without actually using the context menu commands? It is enough to point with your mouse cursor to a tab to be closed, and click the middle mouse button, or just use the Shift+click combination.

你知道你可以关闭标签在编辑器和工具窗口的IntelliJ IDEA,而不必实际使用上下文菜单命令吗?这是足以点与您的鼠标移动到一个选项卡被关闭,并单击鼠标中键,或者只是使用Shift +单击组合。

使用Alt +插入(代码|生成)在编辑器中,你可以轻松地生成getter和setter方法对于任何领域的类。

为了快速选择当前编辑元素(类、文件、方法或字段)在任何视图(项目视图、结构视图或其他),按Alt + F1(视图|选择在)。

搜索可用的速度在所有的树视图:就开始打字,你会很快找到必要的项目。

The Escape key in any tool window moves the focus to the editor.

Shift+Escape moves the focus to the editor and also hides the current (or last active) tool window.

The F12 key moves the focus from the editor to the last focused tool window.

Escape键在任何工具窗口移动集中到编辑器。
Shift +逃脱移动集中到编辑器,还隐藏了当前(或去年积极)工具窗口。
关键的步骤的F12将焦点从编辑到最后集中工具窗口。

当您想要捕获异常抛出一些代码片段,在编辑器中选择它,按Ctrl + Alt + T(代码|围)并选择try / catch。catch块的所有块中的抛出的异常将自动生成。
您可以定制的尸体catch块的代码生成选项卡的文件|设置|文件模板。
使用列表中的其他项目围绕与其他结构。

这个SmartType代码完成后可以使用new关键字,来实例化一个期望类型的对象的。例如,输入


转载于:https://my.oschina.net/waippwchani/blog/91061

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值