Eclipse Shortcuts - Tutorial

Eclipse Shortcuts - Tutorial

Lars Vogel (c) 2009, 2017 vogella GmbHVersion 2.8,25.04.2017

Table of Contents


Shortcut


Description


Ctrl+Shift+R


Search dialog for resources, e.g., text files


Ctrl+Shift+T


Search dialog for Java Types


Ctrl+F8


Shortcut for switching perspectives

Table 1. Navigation


Shortcut


Description


Ctrl+E


Search dialog to select an editor from the currently open editors


Alt+←


Go to previous opened editor. Cursor is placed where it was before you opened the next editor


Alt+→


Similar Alt + ← but opens the next editor


Ctrl+Q


Go to editor and the position in this editor where the last edit was done


Ctrl+PageUp


Switch to previous opened editor


Ctrl+PageDown


Switch to next opened editor

Table 2. Navigation between editors


Shortcut


Description


Ctrl+F7


Shortcut for switching views. Choose the view to switch to with your mouse or cycle through the entries with repeating the keystroke


Shift+Alt+Q


Open menu for switch view keybindings


Shift+Alt+Q+P


Show package explorer


Shift+Alt+Q+C


Show console

Table 3. Navigation between views

4. Start Java programs


Shortcut


Description


Ctrl+F11


Run last launched


F11


Run last launched in debug mode


Ctrl+Alt+B


Skip all breakpoints. Let‘s you use debug mode for code reloading


Alt+Shift+X+J


Run current selected class as Java application


Alt+Shift+X+T


Run JUnit test


Alt+Shift+X+P


Run JUnit Plug-in test

Table 4. Running programs

5. Editing in the Java editor


Shortcut


Description


Shift+Alt+↑


Selects enclosing elements.,result depending on cursor position

Table 5. Handling the editor


Shortcut


Description


Ctrl+1


Quickfix; result depending on cursor position


Ctrl+Space


Content assist/ code completion


Ctrl+T


Show the inheritance tree of the current Java class or method.


Ctrl+O


Show all methods of the current class, press Ctrl + O again to show the inherited methods.


Ctrl+M


Maximize active editor or view


Ctrl+Shift+F


Format source code


Ctrl+I


Correct indentation, e.g., format tabs/whitespaces in code


Ctrl+F


Opens the find dialog


Shift+Enter


Adds a link break at the end of the line


Ctrl+Shift+O


Organize the imports; adds missing import statements and removes unused ones


Alt+Shift+Z


Wrap the select block of code into a block, e.g. try/catch.

Table 6. Handling the editor


Shortcut


Description


Ctrl+←?or?Ctrl+→


Move one text element in the editor to the left or right


Ctrl+↑?or?Ctrl+↓


Scroll up / down a line in the editor


Ctrl+Shift+P


Go to the matching bracket


Shift+Cursor movement


Select text from the starting position of the cursor


Alt+Shift ↑ / ↓


Select the previous / next syntactical element


Alt+Shift ↑ / ↓ / ← / →


Extending / reducing the selection of the previous / next syntactical element

Table 7. Cursor navigation and text selection


Shortcut


Description


Ctrl+Alt+↓


Copy current line below the line in which the cursor is placed


Ctrl+Alt+↑


Copy current line above the line in which the cursor is placed


Alt+Up


Move line one line up


Alt+Down


Move line one line down

Table 8. Copy and move lines


Shortcut


Description


Ctrl+D


Deletes line


Ctrl+Shift+DEL


Delete until end of line


Ctrl+DEL


Delete next element


Ctrl+BACKSPACE


Delete previous element

Table 9. Delete


Shortcut


Description


Shift+Enter


Adds a blank line below the current line and moves the cursor to the new line. The difference between a regular enter is that the currently line is unchanged, independently of the position of the cursor.


Ctrl+Shift+Enter


Same as Shift + Enter but above

Table 10. Create new lines


Shortcut


Description


Ctrl+2+L


Assign statement to new local variable


Ctrl+2+F


Assign statement to new field

Table 11. Variable assignment

6. Coding


Shortcut


Description


Shift+F2


Show the Javadoc for the selected type / class / method


Alt+Shift+N


Shortcut for the menu to create new objects


Alt+Shift+Z


Surround block with try and catch

Table 12. Coding

7. Refactoring


Shortcut


Description


Alt+Shift+R


Rename


Ctrl+2+R


Rename locally (in file), faster than Alt + Shift + R


Alt+Shift+T


Opens the context-sensitive refactoring menu, e.g., displays

Table 13. Refactoring

8. Minimum

The following shortcuts are the absolute minimum a developer should be familiar with to work efficient in Eclipse.


Shortcut


Description


Ctrl+S


Saves current editor


Ctrl+1


Quickfix; shows potential fixes for warnings, errors or shows possible actions


Ctrl+Space


Content assist/ code completion


Ctrl+Q


Goes to the last edited position


Ctrl+D


Deletes current line in the editor


Ctrl+Shift+O


Adjusts the imports statements in the current Java source file


Ctrl+2+L or F


Assign statement to new local variable or field


Ctrl+Shift+T


Open Type Dialog


Ctrl+O


Shows quick outline of a class


Ctrl+F11


Run last launched application


Shift+F10


Opens context menu. Keyboard equivalent to Mouse2


Ctrl+F10


Opens view menu for current view.

Table 14. Must known shortcuts

9. About this website

Support free content

Questions and discussion

Tutorial & code license

Get the source code

10. Links and Literature

Nothing listed.

10.1. vogella GmbH training and consulting support


TRAINING


SERVICE & SUPPORT


The vogella company provides comprehensive?training and education services?from experts in the areas of Eclipse RCP, Android, Git, Java, Gradle and Spring. We offer both public and inhouse training. Whichever course you decide to take, you are guaranteed to experience what many before you refer to as?"The best IT class I have ever attended".


The vogella company offers?expert consulting?services, development support and coaching. Our customers range from Fortune 100 corporations to individual developers.

Appendix A: Copyright and License

Copyright ? 2012-2017 vogella GmbH. Free use of the software examples is granted under the terms of the EPL License. This tutorial is published under the?Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Germany?license.

See?Licence.

?
?

来自 <http://www.vogella.com/tutorials/EclipseShortcuts/article.html#coding>

103 Shortcuts for Eclipse Helios (Windows)??[edit]

Platform:?win?[add]

Related:?Eclipse Index,?IDE?Shortcuts,?Windows?Shortcuts

Export as:?PDF,?Spreadsheet,?Printer-friendly

Table of Contents:


1. Manage Files and Projects


??


Ctrl+N


Create?new project using the Wizard


Ctrl+Alt+N


Create?new project, file, class, etc.


Alt+F, then?.


Open project, file, etc.


Ctrl+Shift+R


Open?Resource (file, folder or project)


Alt+Enter


Show and access file properties


Ctrl+S


Save current file


Ctrl+Shift+S


Save all files


Ctrl+W


Close current file


Ctrl+Shift+W


Close all files


F5


Refresh content of selected element with local file system

▲ up


2. Editor Window


??


Focus/ cursor must be in Editor Window for these to work.


??


F12


Jump to Editor Window


Ctrl+Page Down/Ctrl+Page Up


Switch to next editor / switch to previous editor


Ctrl+M


Maximize or un-maximize current Editor Window (also works for other Windows)


Ctrl+E


Show list of open Editors. Use?arrow keys?and?enter?to switch


Ctrl+F6/Ctrl+Shift+F6


Show list of open Editors. Similar to?ctrl+e?but switches immediately upon release of?ctrl


Alt+Arrow Left/Alt+Arrow Right


Go to previous / go to next Editor Window


Alt+-


Open Editor Window Option menu


Ctrl+F10


Show view menu (features available on left vertical bar: breakpoints, bookmarks, line numbers, …)


Ctrl+F10, then?n


Show or hide line?numbers


Ctrl+Shift+Q


Show or hide the diff column on the left (indicates changes since last save)


Ctrl+Shift++/-


Zoom text in/ out

▲ up


3. Navigate in Editor


??


Home/End


Jump to beginning / jump to end of indention. Press?home?twice to jump to beginning of line


Ctrl+Home/End


Jump to beginning / jump to end of source


Ctrl+Arrow Right/Arrow Left


Jump one word to the left / one word to the right


Ctrl+Shift+Arrow Down/Arrow Up


Jump to previous / jump to next method


Ctrl+L


Jump to?Line Number. To hide/show line numbers, press?ctrl+F10?and select ‘Show Line Numbers‘


Ctrl+Q


Jump to last location edited


Ctrl+./Ctrl+,


Jump to next / jump to previous compiler syntax warning or error


Ctrl+Shift+P


With a bracket selected: jump to the matching closing or opening bracket


Ctrl+[+]/Ctrl+-?on numeric keyboard


Collapse / Expand current method or class


Ctrl+[/]/Ctrl+*?on numeric keyboard


Collapse / Expand all methods or classes


Ctrl+Arrow Down/Ctrl+Arrow Up


Scroll Editor without changing cursor position


Alt+Page Up/Alt+Page Down


Next Sub-Tab / Previous Sub-Tab

▲ up


4. Select Text


??


Shift+Arrow Right/Arrow Left


Expand selection by one character to the left / to the right


Ctrl+Shift+Arrow Right/Arrow Left


Expand selection to next / previous word


Shift+Arrow Down/Arrow Up


Expand selection by one line down / one line up


Shift+End/Home


Expand selection to end / to beginning of line


Ctrl+A


Select?all


Alt+Shift+Arrow Up


Expand selection to current element (e.g. current one-line expression or content within brackets)


Alt+Shift+Arrow Left/Arrow Right


Expand selection to next / previous element


Alt+Shift+Arrow Down


Reduce previously expanded selection by one step

▲ up


5. Edit Text


??


Ctrl+C/Ctrl+X/Ctrl+V


Cut, copy and paste


Ctrl+Z


Undo last action


Ctrl+Y


Redo last (undone) action


Ctrl+D


Delete Line


Alt+Arrow Up/Arrow Down


Move current line or selection up or down


Ctrl+Alt+Arrow Up/Ctrl+Alt+Arrow Down/


Duplicate current line or selection up or down


Ctrl+Delete


Delete next word


Ctrl+Backspace


Delete previous word


Shift+Enter


Enter line below current line


Shift+Ctrl+Enter


Enter line above current line


Insert


Switch between insert and overwrite mode


Shift+Ctrl+Y


Change selection to all lower case


Shift+Ctrl+X


Change selection to all upper case

▲ up


6. Search and Replace


??


Ctrl+F


Open?find and replace dialog


Ctrl+K/Ctrl+Shift+K


Find previous / find next occurrence of search term (close find window first)


Ctrl+H


Search Workspace (Java Search, Task Search, and File Search)


Ctrl+J/Ctrl+Shift+J


Incremental search forward / backwards. Type search term after pressing?ctrl+j, there is now search window


Ctrl+Shift+O


Open a resource search dialog to find any class

▲ up


7. Indentions and Comments


??


Tab/Shift+Tab


Increase / decrease indent of selected text


Ctrl+I


Correct?indention of selected text or of current line


Ctrl+Shift+F


Autoformat all code in Editor using code formatter


Ctrl+/


Comment / uncomment line or selection ( adds ‘//‘ )


Ctrl+Shift+/


Add Block Comment around selection ( adds ‘/... */‘ )


Ctrl+Shift+\


Remove Block Comment


Alt+Shift+J


Add Element Comment ( adds ‘/** ... */‘)

▲ up


8. Editing Source Code


??


Ctrl+Space


Opens Content Assist (e.g. show available methods or field names)


Ctrl+1


Open Quick Fix and Quick Assist


Alt+/


Propose word completion (after typing at least one letter). Repeatedly press?alt+/?until reaching correct name


Ctrl+Shift+Insert


Deactivate or activate Smart Insert Mode (automatic indention, automatic brackets, etc.)

▲ up


9. Code Information


??


Ctrl+O


Show code?outline / structure


F2


Open class, method, or variable information (tooltip text)


F3


Open Declaration: Jump to Declaration of selected class, method, or parameter


F4


Open Type Hierarchy window for selected item


Ctrl+T


Show / open Quick?Type Hierarchy for selected item


Ctrl+Shift+T


Open Type in Hierarchy


Ctrl+Alt+H


Open Call?Hierarchy


Ctrl+Shift+U


Find occurrences of expression in current file


Ctrl+move over method


Open Declaration or Implementation

▲ up


10. Refactoring


??


Alt+Shift+R


Rename selected element and all references


Alt+Shift+V


Move selected element to other class or file (With complete method or class selected)


Alt+Shift+C


Change method signature (with method name selected)


Alt+Shift+M


Extract selection to?method


Alt+Shift+L


Extract?local variable: Create and assigns a variable from a selected expression


Alt+Shift+I


Inline selected local variables, methods, or constants if possible (replaces variable with its declarations/ assignment and puts it directly into the statements)

▲ up


11. Run and Debug


??


Ctrl+F11


Save and launch application (run)


F11


Debug


F5


Step Into function


F6


Next step (line by line)


F7


Step out


F8


Skip to next Breakpoint

▲ up


12. The Rest


??


Ctrl+F7/Ctrl+Shift+F7


Switch forward / backward between views (panels). Useful for switching back and forth between Package Explorer and Editor.


Ctrl+F8/Ctrl+Shift+F8


Switch forward / backward between perspectives


Ctrl+P


Print


F1


Open Eclipse Help


Shift+F10


Show Context Menu?right click with mouse

▲ up


13. Team (SVN Subversive)


??


Ctrl+Alt+S


Synchronize with Repository


Ctrl+Alt+C


Commit


Ctrl+Alt+U


Update


Ctrl+Alt+D


Update to Revision


Ctrl+Alt+E


Merge


Ctrl+Alt+T


Show Properties


Ctrl+Alt+I


Add to svn:ignore

▲ up

?
?

Uploaded by?bernd,?updated on 1/7/2017?by?bernd

?
?

来自 <https://shortcutworld.com/Eclipse/win/Eclipse-Helios_Shortcuts>

时间: 2024-10-14 13:30:28

Eclipse Shortcuts - Tutorial的相关文章

Custom &amp; Eclipse shortcuts key bindings for Sublime Text 2

[ { "keys": ["f12"], "command": "htmlprettify"}, { "keys": ["f1"], "command": "fold" }, { "keys": ["f2"], "command": "unfold" }, { &quo

Top 10 Java Debugging Tips with Eclipse

In this tutorial we will see about debugging java applications using Eclipse. Debugging helps us to identify and fix defects in the application. We will focus on run-time issues and not compile time errors. There are command line debuggers like gdb a

sublime配置eclipse快捷键

[ /**        * 适配eclipse快捷键        *        * 下面这位仁兄早就有了这个想法        * Eclipse shortcuts for Sublime Text 2        * http://icoloma.blogspot.com/2011/10/eclipse-shortcuts-for-sublime-text-2.html        */       {           "keys": ["alt+/&qu

How to decompile class file in Java and Eclipse - Javap command example(转)

Ability to decompile a Java class file is quite helpful for any Java developer who wants to look into the source of any open source or propriety library used in project. Though I always prefer to attach source in Eclipse of most common libraries like

打造属于自己的前端开发神器 -- 给Sublime Text加上Eclipse的光环

打造属于自己的前端开发神器 -- 给Sublime Text加上Eclipse的光环 2013-05-16 14:39:15 将Sublime Text打造成如Eclipse一般的前端开发IDE 1. 快捷键移植篇   从Java开始的梦, 到如痴如醉的Front End, 却始终摆脱不了Eclipse的束缚.   对于Javaer, Eclipse是非常不错的选择, 但对于单纯的前端而言, 是不是觉得略显笨重, 其中各种不想要的东西, 反正是诸多不爽, 曾用过Eclipse来做前端的人应该都有

Sublime Text加上Eclipse

打造属于自己的前端开发神器 -- 给Sublime Text加上Eclipse的光环 将Sublime Text打造成如Eclipse一般的前端开发IDE 1. 快捷键移植篇   从Java开始的梦, 到如痴如醉的Front End, 却始终摆脱不了Eclipse的束缚.   对于Javaer, Eclipse是非常不错的选择, 但对于单纯的前端而言, 是不是觉得略显笨重, 其中各种不想要的东西, 反正是诸多不爽, 曾用过Eclipse来做前端的人应该都有同感. 羡慕别人使用VIM时的酣畅淋漓,

java Eclipse debug技巧

摘要:调试不仅可以查找到应用程序缺陷所在,还可以解决缺陷.对于Java程序员来说,他们不仅要学会如何在Eclipse里面开发像样的程序,更需要学会如何调试程序.本文介绍了Java程序员必知的10个调试技巧,保证让你受益匪浅! 调试可以帮助识别和解决应用程序缺陷,在本文中,作者将使用大家常用的的开发工具Eclipse来调试Java应用程序.但这里介绍的调试方法基本都是通用的,也适用于NetBeans IDE,我们会把重点放在运行时上面. 在开始之前,推荐大家去看看Eclipse shortcuts

使用Eclipse BIRT和POJO的报表教程

Eclipse Birt 本教程介绍如何使用Eclipse BIRT和POJO来制作报表.本教程还介绍了如何部署所制作的BIRT报表到Web容器(Tomcat)中,以及如何把它运用到一个Eclipse RCP应用程序中. 本教程使用的是Eclipse 3.7 (Indigo). 原文传送门:http://www.vogella.com/tutorials/EclipseBIRT/article.html 1. Eclipse BIRT 1.1. 概述 Eclipse BIRT允许创建基于来自不同

价值博客们,技术博客

www.raychase.net http://mindhacks.cn 程序员博客墙blogwall.us http://www.cppblog.com/vczh MacTalk-池建强的随想录 Fenng DBA Notes | 闲思录robbin的自言自语风雪之隅-Laruence的博客 blog.vgod.tw 张琮翔的Blog:愛好電腦.科技.程式設計,目前在MIT電腦科學與人工智慧實驗室就讀博士班,尋找人機互動與程式設計交會的創新火花. MIT CSAIL的PhD,现在毕业开始创业了