文章目录
(内容源自http://javapapers.com/core-java/eclipse-shortcuts/)
File Navigation – Eclipse Shortcuts
- CTRL SHIFT R – Open a resource. You need not know the path and just part of the file name is enough.
- CTRL E – Open a file (editor) from within the list of all open files.
- CTRL PAGE UP or PAGE DOWN – Navigate to previous or next file from within the list of all open files.
- ALT <- or ALT -> – Go to previous or next edit positions from editor history list.
Java Editing – Eclipse Shortcuts
- CTRL SPACE – Type assist
- CTRL SHIFT F – Format code. 格式化代码
- CTRL O – List all methods of the class and again CTRL O lists including inherited methods.
- CTRL SHIFT O – Organize imports. 组织import语句
- CTRL SHIFT U – Find reference in file. 在文件内查找变量或方法的引用
- CTRL / – Comment a line. 注释所在行
- F3 – Go to the declaration of the variable. 跳转到变量或方法定义处
- F4 – Show type hierarchy of on a class. 显示类的层次结构
- CTRL T – Show inheritance tree of current token. 可以查看当前对象继承树
- SHIFT F2 – Show Javadoc for current element.
- ALT SHIFT Z – Enclose block in try-catch. 将选中的代码块用try-catch包围
General Editing – Eclipse Shortcuts
- F12 – Focus on current editor.
- CTRL L – Go to line number.
- CTRL D – Delete a line.
- CTRL <- or -> – Move one element left or right.
- CTRL M – Maximize editor.
- CTRL SHIFT P – Go to the matching parenthesis.
Debug, Run – Eclipse Shortcuts
- CTRL . or , – Navigate to next or previous error.
- F5 – Step into.
- F6 – Step over.
- F8 – Resume
- CTRL Q – Inspect.
- CTRL F11 – Run last run program.
- CTRL 1 – Quick fix code.
Search – Eclipse Shortcuts
- CTRL SHIFT G – Search for current cursor positioned word reference in workspace
- CTRL H – Java search in workspace.
近期评论