简体   繁体   中英

java code templates eclipse

I've got 3 files for eclipse code templates:

2 xml files, which have templates related to company information and author name, which are used when you create a java file

1 .epf file - eclipse preference file

I'm trying to use these templates by going to windows->preferences->java->editor->templates->import

But this is not helping. How do I apply these template files- xml and epf both?

Help appreciated.

Thanks !

Here i am assuming that you are trying to import java templates

  • If xml file begins with <?xml version="1.0" encoding="UTF-8" standalone="no"?><templates> then it is for 'Code Templates' Location: Windows -> Preferences -> Java -> Code Style -> Code Templates

  • If xml file begins with

 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <profiles version="12"> <profile kind="CodeFormatterProfile" 

then these are for Formatter

Location: Windows -> Preferences -> Java -> Code Style -> Formatter

  • If xml file begins with
 <?xml version="1.0" encoding="UTF-8" standalone="no"?> <profiles version="2"> <profile kind="CleanUpProfile" 

Location: Windows -> Preferences -> Java -> Code Style -> Clean Up

  • For .epf files, select File -> Import -> General -> Preferences (now select file) and follow the steps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM