Wednesday, August 1, 2012

Save Time With Eclipse External Tools Configuration

You probably know the feeling. You are sitting next to your colleague in his working station, waiting for your question to be answered. However, he is in charge of the keyboard and you are only an observer. You simply can't comprehend why instead of creating a shortcut in the folder view, he is again navigating all the way from the Desktop to the ProgramData directory, without using auto-complete. 

This example illustrates how we often see people work inefficiently while performing small technical tasks dozens of times a day. This could be a simple thing, such as navigating to a specific location on the computer. However, if you consider the number of times this is performed a day (and the agony on the face of the person sitting next to you waiting for an answer)...well you get the idea. Performing this weary tasks daily can also lead to frustration and discontentment.

Since developers usually perform what can be considered small technical tasks dozens of times a day, this is especially critical. Since most of us use IDE's as our main tool, I would like you to consider the "External Tools Configuration" in Eclipse. This is an unappreciated and not widely used feature which provides a mechanism to run tools that are not part of the IDE. How can this be helpful? For example, let's say that you want to quickly open a file for edit specifically in Notepad++, or jump to the folder of the file you are currently editing, or even open a console directly in a specific directory.

Creating a new external tool 

The External Tools Configuration is located right next to the Run\Debug buttons (In red).

Click on the drop down menu -> External Tools Configuration. You can now create a new tool. Right click on the left Program menu, and click new. This will open the configuration screen for your new tool. Let's go over the 3 examples mentioned above:
  • Open a file for edit specifically in Notepad++
  • Open the folder of the file you are currently editing
  • Open a console directly in a specific directory

So...if you are seeing this mechanism for the first time, I hope this post will save you time. If you already use it - fill free to add here your created tools and shortcuts.