Friday, June 24, 2011

Add menu accelerator for FindBugs plugin

One way to run FindBugs is to:
  1. Right click on the Java source file you’re editing
  2. Move cursor and hover over "Find Bugs"
  3. Wait until child menu appears
  4. Move cursor to select and then click on "Find Bugs"
You can greatly accelerate this process by modifying eclipse/plugins/edu.umd.cs.findbugs.plugin.eclipse_1.3.9.20090821/plugin.xml:
REPLACE:
   label="Find Bugs"

WITH:
   label="Find Bu&gs"
Then restart Eclipse with -clean command line argument. Now, to run FindBugs, you can just:
  1. Press Menu key
  2. Press G (this didn’t use to have an accelerator, but now does)
  3. Press F (this already has an accelerator)
Similarly, you can clear all FindBugs markers by pressing the key sequence Menu G C.

No comments:

Post a Comment