My professor hands out one massive .java file, which makes development a pain. Does anyone know of a script/macro/etc. which would automatically move each class to its own Java file? I think it would have to be a bit more clever than a simple regex, since you'll need to deal with nested classes, copying the imports etc.
I'm fine with any of the (nix) shell languages, and I use emacs if there's a plugin for that.