In the past, I've worked on MD extension using Eclipse. I will describe my setup and hopefully, that will give you some starting points.
The big picture: I created two projects
project1: has just the jar files of MD
project2: is my extension. project2 depends on project1
I then created an "empty" extension file (*.mxt). This is a normal extension package BUT I include no Java class in them. The reason I do this: so that when I start MD within Eclipse, MD will use the class in my project2 instead of the class in the embedded mxt file. Think of the mxt (with its meta data) as just a "glue" to allow MD to bring in the extension code.
Other things I've done to make developing extension less painful
I create a set of Maven dependencies for MD since my dev env is Maven centric (and it will make tracking/switching various MD release much cleaner: just a change the version declaration instead of messing around with a bunch of jar files)
I put in a "hack" so that my dev instance (one started within Eclipse) will default in "current directory" for all of its configuration files so that during developing/testing I don't mess around with my actual/day-to-day MD files.
With above setup, I was able
to do all developing tasks in Eclipse (no command line)
can create unit testings (via junit)
do nightly build (via maven)
Hope this will give you some starting points. I don't use MD anymore, only popping in here infrequently.