Tip of the Day(for AS)

前一阵子看书《android群英传 神兵利器》的时候发现了这个AS自带的功能,讲的都是一些AS的快捷键小知识什么的,可以设置开AS自启,感觉每天学习一点比找文档一次看好多效果好一点(放假回来的一周,工作真的是没有状态)


17.10.12
这里写图片描述

When you want to catch exceptions thrown by some code fragment, select it in the editor, press Alt+Shift+Z (Code | Surround With) and choose try / catch. The catch blocks for all the exceptions thrown inside the block will be generated automatically.
You can customize the bodies of the generated catch blocks on the Code tab of File | Settings | File and Code Templates.
Use other items in the list to surround with other constructs.

Alt+Shift+Z 快速,try catch
亲测可用,我AS用的是Ec那会的快捷键,慢慢的感觉也许不是很好,最好还是用AS的吧


17.10.13

Alt+Shift+向上箭头 (extend selection) in the editor selects the word at the caret and then selects expanding areas of the source code. For example, it may select a method name, then the expression that calls this method, then the whole statement, then the containing block, etc. You can also select the word at the caret and the expanding areas of the source code by double-clicking the target areas in the editor.

Alt + Shift +向上箭头(扩展选择)在编辑器中选择插入符号的字,然后选择扩大区域的源代码。例如,它可以选择一个方法名,然后是调用这个方法的表达式,然后是整个语句,然后是包含的块等等。你还可以通过双击编辑器中的目标区域来选择caret中的单词和扩展的源代码区域。


17.10.15
这里写图片描述

You can comment or uncomment lines and blocks of code using Ctrl+斜杠 and Ctrl+Shift+斜杠.
Ctrl+斜杠 comments or uncomments the current line or selected block with single line comments (//...).
Ctrl+Shift+斜杠 encloses the selected block in a block comment (/*...*/).
To uncomment a commented block press Ctrl+Shift+斜杠 anywhere inside it.
你可以评论或取消注释行,代码块使用Ctrl +斜杠和Ctrl + Shift +斜杠。
Ctrl +斜杠评论或取消当前行或者所选块与单行注释(/ /……)。
Ctrl + Shift +斜杠包含所选块的块注释(/ *…* /)。
取消注释块按Ctrl + Shift +斜杠里面。

17.10.25

To see your local history of changes in a file, invoke Local History | Show History from the context menu. You can navigate through different file versions, see the differences and roll back to any previous version.
Use the same context menu item to see the history of changes on a directory. You will never lose any code with this feature!
要查看文件中更改的本地历史,请调用本地历史记录从上下文菜单中显示历史。您可以浏览不同的文件版本,查看差异并回滚到以前的版本。
使用相同的上下文菜单项来查看目录上的更改历史。您将不会丢失任何带有该特性的代码!

17.10.30
这里写图片描述

To help you learn the purpose of each item in the main menu, its short description is shown in the status bar at the bottom of the application frame when you position the mouse pointer over this item.
为了帮助您了解主菜单中的每个项目的目的,它的简短描述显示在应用程序框架底部的状态栏中,当您将鼠标指针放在这个项目上时。

猜你喜欢

转载自blog.csdn.net/qq_33413264/article/details/78211272
TIP
今日推荐