开发者

How do you set up new class templates in Eclipse?

I mainly program Android, and one of the things I (and the rest of android programmers I'm sure) use with tenacity is android.util.Log. Every class I create has a

private static final String TAG = 开发者_开发知识库"ClassName";

tag that I write up as soon as I create the class, before I work on anything else. So, since I always create the tag I figured it would just save me on time (albeit a small amount) to just have it as part of the template for an empty class. My problem is, I don't know how or where to create code templates. Can anyone inform me on how to manage and create them?


What you're referring to are called "code templates" in Eclipse.

Go to Eclipse Preferences, search for "templates", you'll find them under Java -> Code Style -> Code Templates.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜