开发者

Macro to separate out java classe into multiple files

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, sinc开发者_如何学编程e 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.


Try Eclipse or pretty much any other Java IDE. The built-in refactoring support makes short work of moving the classes around and updating references.


Something like the Eclipse Refactoring option "Convert Member Type to Top Level"?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜