Over the past year, I scoured Google for an Eclipse plugin that would launch the terminal in a specific folder for me. I was picturing something that added a right-click context menu option for opening any folder in a project in the console so I could do command line stuff on it.

I would do a bunch of searches and find nothing, give up for a few months until I needed the functionality again, do a bunch of searches, give up, and so on…

…read the rest of this entry »

This is in the babble category tagged as

12 comments »

- 25 Jul 2008 -

I was recently tasked with finding out the number of methods in each class in each package inside of OpenMRS. My first thought was to write a java class to do some reflection. My second thought was to find a java class that someone else had written and use that. My third thought was to find a way for Eclipse to do it.

I really should have jumped to that last one first.  Googling for my second thought gave me nothing useful.  However, simply adding “eclipse” to my search term brought up the Metrics plugin as the first result!  The Metrics plugin counts all different types of things.  Lucky for me, “number of methods” just happens to be one of them.

To get the counts working for you, follow these easy steps:

  1. Add http://metrics.sourceforge.net/update to eclipse as a plugin update site
  2. Turn metrics on for your project:
    1. Right click on the root of your project in Package Explorer view
    2. Choose Properties–>Metrics–>Enable Metrics
  3. Do an Eclipse clean rebuild
  4. Click on the root of your project in the Package Explorer
  5. Open the “Metrics” view

These are the relevant statistics from the OpenMRS project:

The second api/web are from the test package.  We have a lot of work to do to catch our total number of unit test methods up with our number of api methods.

I’ve also uploaded the entire OpenMRS metrics output.

This is in the openmrs category tagged as , ,

Add a comment »

…are the shortcuts.

I’ve been using control-shift-t extensively since Darius first showed it to me a few months ago.  It will let you quickly find and jump to a java class across your current workspace.  (There is also an Open Type button by default in eclipse that you can use.)

I’ve always wanted a way to do the same except with our jsp, xml, and properties files.  I know most of the names of files and know where they are, I’m just lazy.  I want to be able to jump to them without having to expand the whole tree.

Well, Open Resource to the rescue!  Control-shift-r works just like the Open Type except with nonjava files.  Woot!

This is in the babble category tagged as

1 comment »


…is that most of the other users of Eclipse are also software developers.  I’d bet that 75% of the users of Eclipse are capable of writing a plugin for it.  This is part of the reason there are tons of eclipse plugins, as I’ve talked about before.

Yesterday I was lamenting the fact that Eclipse doesn’t have a middle-click-closes-tab functionality as Firefox does.  It finally disturbed me enough to go and do a quick google search for it.  Lo and behold, out of those many other Eclipse-loving programmers out there, one of them felt as I did.

I now have the ability to close my tabs with a simple middle click thanks to Andriy Palamarchuk and the middle click closes tab plugin.

Plugin site: http://www.hlsoft.com/clickclosestab_eclipse
Plugin update url for eclipse: http://update.mousefeed.com/

This is in the babble category tagged as ,

Add a comment »


It always bothered me that after I edited files on the filesystem I would have to then explicitly tell Eclipse to “Refresh” in order to see them.  I stumbled across an option in the Preferences today that completely fixes it with just the click of a button!

Window –> Preferences –> General –> Workspace : Refresh Automatically

This the “File out of date” error I would get when copying and pasting files within Eclipse after an Ant build.  It also makes files appear magically in Eclipse when working directly with the filesystem (like when using Tortoise).

This is in the babble category tagged as

Add a comment »

« Previous Entries