绑定完请刷新页面
取消
刷新

分享好友

×
取消 复制
Eclipse Key Shortcuts for Greater Developers Produ
2020-01-06 10:50:27

Posted byAjitesh Kumar /InJava / June 6, 2014

http://vitalflux.com/eclipse-key-shortcuts-greater-developers-productivity/

The article presents Eclipse Key Shortcuts (for Windows) which could be used to perform most common coding tasks in a much efficient/faster and effective manner thereby enhancing overall productivity of the Java developers. Please note there are lot more key shortcuts which could be accessed from Eclipse IDE Windows/Preferences/Keys. However, I have made a mention of only those shortcuts which I found very useful in coding faster. If I missed on any shortcuts keys that you feel would be useful to be added in the list below, please give a shout.

There were some useful feedbacks on redditpost from where I took some commands and added to the list below. Thanks for the shout.

Java developers’ productivity when working with Eclipse IDE could be increased to a great extent if he/she should be work in a faster and effective manner in following broad areas of work:

Working with Classes/Interfaces

Working with Tabs

Quick reference/help documentation

Common text editor commands

Following describes specifics on all of the above areas along with the Shortcuts Keys commands.

Working with Java Classes/Interfaces (Resources)

Many a times, we need to following while coding:

Open any specific Java classes/interface

Open structure of specific Java classes/interface and navigate through member methods and variables

Create getter/setter methods

Work with errors and apply quick fixes

Go to declaration of any specific classes/interface from within the code

Search the Java classes/interfaces across the packages for specific texts etc.

Following are the commands:

Helpful commands forcoding Java classes/interfaces & resources files

CTRL + Shift + R: Open a dialog box where one could write initials of Java classes/interfaces and other resource files such as XML etc and, the list would appear showing all the matches. One could also do quick search using * and ?.

F3: Open classes/interfaces decleration

CTRL + F3: Show the structure of the selected element including methods and member variables. It helps to quickly navigate the methods or variables.

CTRL + Shift + Down: Go to Next Member. The same could be achieved using CTRL + F3 and using down arrow.

CTRL + Shift + Up: Go to Previous Member. The same could be achieved using CTRL + F3 and using up arrow.

F4: Open a type hierarchy on the selected element. Shows member variables and methods of the selected element.

CTRL + Shift + F: Format the block of code including class and its methods.

CTRL + D: Delete selected line(s)

ALT + Shift + R: Rename the classes. Useful for code refactoring.

CTRL + 7: Comment the select block of code. Pretty useful.

ALT + Shift + S then H: Generate equals and hashcode method.

Helpful commands forhandling errors

CTRL + .: Go to next error

CTRL + ,: Go to previous error

CTRL + 1: Show quick fixes

Helpful command forgetter/setter methods

CTRL + 1: As you define the member variable, you could place the cursor on the variable and press CTRL + 1. It would show up options where you could select “Create getter and setter for…”.

ALT + Shift + S then R: This is formally suggested by Eclipse for creating getter and setter methods.

Helpful commands forsearch

CTRL + H: Open Search Dialog which could be used to search Java classes/interfaces consisting of specific text related with type, methods, member variables, package etc.

 

Working with Tabs

Often, we need to do following with the tabs:

Move between the tabs consisting of source code for different Java classes

Close the tabs, one at a time or all of them at once

Maximize/minimize the tab for ease of development

Following are the shortcut keys which helps to achieve above objectives faster than the mouse:

CTRL + F6: Next Tab/Editor

CTRL + M: Maximize Activity Window

CTRL + W: Close Tab/Window 

CTRL + Shift + W: Close all Tabs/Windows

 

Quick Reference/Help

Following command would help in opening associated JavaDoc right in the Eclipse IDE. All you need to do is place your cursor on the element and press the following keys:

Shift + F2: Open Attached Javadoc

 

Common Text Editor Commands

Following are some commonly used text commands which could speed up coding, in general.

Add New Lines

CTRL + Shift + Enter Insert line above Current Line

Shift + Enter Insert Line below Current Line

Collapse/Expand All Methods

CTRL + Shift + Numpad_Divide Collapse all methods

CTRL + Shift + Numpad_Multiply Expand all methods

分享好友

分享这个小栈给你的朋友们,一起进步吧。

JAVA玩具小屋
创建时间:2019-08-16 16:54:49
分享程序开发方面的小经验,思考一些比较简单易懂的技术问题
展开
订阅须知

• 所有用户可根据关注领域订阅专区或所有专区

• 付费订阅:虚拟交易,一经交易不退款;若特殊情况,可3日内客服咨询

• 专区发布评论属默认订阅所评论专区(除付费小栈外)

栈主、嘉宾

查看更多
  • Yios5092
    栈主

小栈成员

查看更多
  • 栈栈
  • coyan
  • 25minutes
  • ?
戳我,来吐槽~