Sunday, July 6, 2014

Essential Eclipse Plugins

I was bored on my commute home tonight so I decided to install the new Eclipse Luna distribution. In doing so, I also had to reinstall (and remember) all of my plugins that I install.  I decided I’d share my (roughly ordered) list of essential Eclipse plugins:


  1. JRebel for Eclipse - Live code reload.  Eliminates need to build your app to see changes.
  2. MoreUnit - shortcuts to switch between tests and classes under tests, create test stubs, mock support, decoration, refactoring support.
  3. Eclipse Code Recommenders –  I just recently discovered this gem a couple months ago but I don’t know how I ever got by without it.  It is a plugin for intelligent code completion.  Subwords completion allows you to just enter any subword and its abbreviations and still finds what you are looking for. No need to typing get... and set... anymore:
    1. Bonus: Snipmatch - I haven’t tried this one yet but I just installed it.  It is a new add-on to Eclipse Code Recommenders which adds a snippet completion engine that gets its snippets directly from a remote code snippet repository hosted at eclipse.org.
  4. MouseFeed - Helps to form a habit of using keyboard shortcuts. When the user clicks on a button or on a menu item, the plugin shows a popup reminding about the key shortcut. After a few times, you remember the keyboard shortcut and you will start using it, rather than clicking through menus. This will save you a lot of time at the end of the day.
  5. InstaSearch - fast text search in the workspace. The search is performed instantly as-you-type and resulting files are displayed in an Eclipse view. It is a lightweight plug-in based on Apache Lucene search engine.
  6. Checkstyle Plug-in – Static code analysis.
  7. PMD Plugin for Eclipse – Static code analysis.
  8. FindBugs Eclipse Plugin – Static code analysis.
  9. EclEmma Java Code Coverage - Code coverage tool.
  10. Unnecessary Code Detector - finds unnecessary (dead) public java code and marks methods which visibility could be reduced (public, protected, default, private)
  11. AnyEdit Tools – Convert/Compare/Sort/etc. text.
  12. Eclipse-fonts - +/- to increase/decrease font-size of editor.
  13. ExploreFS - open the folder in the native file manager containing the selected resource. It adds "Open in File System" to the context menu of package explorer, resource navigator and any other view showing files or Java classes

Another must for me is swapping Command+E (Quick Switch Editor) with Command+F6 (Next Editor).  This makes Command+E the Next Editor command which acts a Command+Tab feature for your Eclipse windows.

I also setup in Eclipse Preferences → Java → Editor → Content Assist → Favorites.  Favorites is a list of static members or types in which the content assist dialog will propose these static members even if the import is missing.  I mainly use this in my unit tests so I don’t have to remember to import JUnit or Mockito.  I also add in a few Guava and Apache Commons packages:
  • org.junit.Assert.*
  • org.mockito.Matchers.*
  • org.mockito.Mockito.*
  • com.google.common.base.Preconditions.*
  • com.google.common.base.Strings.*
  • org.apache.commons.lang3.StringUtils.*

Please let me know if you have any plugin recommendations for me to add to my collection or any other productivity tips.