How to create multiple templates for Java files in Eclipse?

I would like to have several different templates for new java files in Eclipse. Is it possible?

Basically, when I create a new Java class file in Package Explorer, I would like to use the X template as the base for the new file, when I create a new unit test class, which I would like to use in the Y template, when I create the Wicket component class. I would like to use the Z pattern, etc.

Is it also possible to configure Eclipse to automatically create a new unit test class when creating a new Java class?

+3
source share
1 answer

, , , Eclipse, org.eclipse.ui.newWizards.

Eclipse.

( ) - (, DAO) Java (Window->Preferences->Java->Editor->Templates), , DAO Ctrl + Enter, . , , DAO , .

, !

+1

Source: https://habr.com/ru/post/1779256/


All Articles