Is there a way to change "all" Java related "File and Code" Templates in ONE place?

63 Views Asked by At

By convention, our java files need our company copyright header as first entry in the file.

With IntelliJ, you can turn to Preferences->File and Code Templates, and then, in the Includes tab, there is an entry "File Header" where you can drop such copyright information. All fine.

But: in the "Files" list that defines the various applicable "types", each type has its own "rule", like:

screen-shot-class

As you can see, that "rule" puts the package name first, so I have to go and change that rule to:

#parse("File Header.java")
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
public class ${NAME} {
}

But, as said: there are multiple "types" that need the very same setup (Class, Interface, Enum, Annotation).

Is there a way to have all Java-related "types" use the same rule, without me going in and updating each entry manually, individually?

0

There are 0 best solutions below