java code templates eclipse

1.5k views Asked by At

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 !

1

There are 1 answers

1
MJSG On BEST ANSWER

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.