Posted by Ajitesh Kumar / In Java / 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 reddit postfrom 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 for coding 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 for handling errors
    • CTRL + .: Go to next error
    • CTRL + ,: Go to previous error
    • CTRL + 1: Show quick fixes
  • Helpful command for getter/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 for search
    • 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

Eclipse Key Shortcuts for Greater Developers Productivity--reference的更多相关文章

  1. eclipse ide for java ee developers 开发环境搭建(j2ee)

    转载自:http://www.iteye.com/topic/982182 真的是一片很不错的文章啊! 使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指 ...

  2. 怎么样Eclipse IDE for C/C++ Developers正确编译GTK规划?(解决)

    <span style="color: rgb(51, 51, 51); font-family: Arial; font-size: 14px; line-height: 25.99 ...

  3. eclipse ide for java ee developers 开发环境搭建(J2EE) 【转载】

    使用eclipse真的有年头了,相信java程序员没有不知道它的,最近在给团队中新来的应届生做指导,专门讲解了一下Eclipse开发环境的搭建过程, 一是帮助他们尽快的熟悉IDE的使用,二也是保证团队 ...

  4. Eclipse IDE for Java EE Developers 与 Eclipse Classic(Eclipse Standard)区别

    Eclipse下载官网:http://www.eclipse.org/downloads/ 版本: 1.Eclipse classic(Eclipse Standard):Eclipse的标准版; 2 ...

  5. Eclipse IDE for C/C++ Developers安装配置详解

    Eclipse IDE for C/C++ Developers安装配置详解(转) 转自:http://hi.baidu.com/ltb6w/item/986532efd712460f570f1ddc ...

  6. ubuntu下安装eclipse IDE for C/C++ developers

     序 linux的GUI和windos比起来实在逊色,虽然它的终端模式(命令行模式)非常强大.linux发行版ubuntu的GUI相对其他版本要华丽一些,所以最近由redhat转向ubuntu进行li ...

  7. Ubuntu下在Eclipse IDE for C/C++ Developers中怎样执行C语言的GTK程序?(已解决)

    (已解决.详见Ubuntu 12.04下在Eclipse IDE for C/C++ Developers中执行C语言的GTK程序) 按"Ubuntu下GTK的安装.编译和測试"( ...

  8. Linux下安装JRE和Eclipse IDE for C/C++ Developers

    Linux32位,下载eclipse-cpp-luna-R-linux-gtk.tar.gz和jre-8u11-linux-i586.rpm  放到家文件夹中. http://www.eclipse. ...

  9. Eclipse IDE for java EE Developers下载和安装

    1.登录 http://www.eclipse.org/home/index.php ,下载Eclipse IDE for java EE Developers 2.解压缩压缩包到任意路径(推荐:G: ...

随机推荐

  1. python多重继承:

    除了从一个父类继承外,Python允许从多个父类继承,称为多重继承. 多重继承的继承链就不是一棵树了,它像这样: class A(object): def __init__(self, a): pri ...

  2. uva 1400 - "Ray, Pass me the dishes!"

    又是一道线段树区间更新的题: #include<cstdio> #include<algorithm> #include<cstring> #define ll l ...

  3. 虚拟机下ubuntu的minicom使用指南

    整理自ubuntu下的minicom的使用 minicom是linux下串口通信的软件,它的使用完全依靠键盘的操作,虽然没有"超级终端"那么易用,但是使用习惯之后读者将会体会到它的 ...

  4. 转:Java学习路线图

    作者: nuanyangyang 标  题: Java学习路线图(整理中,欢迎纠正) 发信站: 北邮人论坛 (Mon Aug 11 19:28:16 2014), 站内   [以下肯定是不完整的列表, ...

  5. POJ 2750 Potted Flower(线段树的区间合并)

    点我看题目链接 题意 : 很多花盆组成的圆圈,每个花盆都有一个值,给你两个数a,b代表a位置原来的数换成b,然后让你从圈里找出连续的各花盆之和,要求最大的. 思路 :这个题比较那啥,差不多可以用DP的 ...

  6. Java使用java命令运行程序出现:找不到主类错误

    这是配置环境的问题. 在classpath里面添加 .; 即:点+分号 为什么呢,点代表当前目录.

  7. 最简单的CRC32源码-查表法

    这个算法是在逐BYTE法的基础上进行修改的,在上一篇文章里我们说过,如果不查表的话,逐BYTE法和逐BIT法没什么区别,现在我们就把这个算法写出来,注意在调用CRC校验函数前需要先调用表生成函数: u ...

  8. Lea指令计算地址(用于四则混合运算),附上一个函数调用例子及其反汇编代码,很清楚

    比如你用local在栈上定义了一个局部变量LocalVar,你知道实际的指令是什么么?一般都差不多像下面的样子:     push   ebp     mov   esp,   ebp     sub ...

  9. 例说C#深拷贝与浅拷贝

    一开始,先对C#深拷贝与浅拷贝知识做个简单的总结. 无论是浅拷贝与深拷贝,C#都将源对象中的所有字段复制到新的对象中.不过,对于值类型字段,引用类型字段以及字符串类型字段的处理,两种拷贝方式存在一定的 ...

  10. mybatis源码分析(3)——SqlSessionManager类

    从上图可能看出,在 mybatis中,SqlSession的实现类有两个,其中SqlSessionManager类不但实现了SqlSession接口,同时也实现了SqlSessionFactory接口 ...