Adding package name to copyright profile in IntelliJ IDEA

95 Views Asked by At

I'm using Intellij idea. I need to add copyright for package name across the project

tried with ${PACKAGE_NAME} and $pacakage.name but no luck. Also, tried with

 $file.qualifiedClassName

but it gets the package along with class name. Let me know the possible variable for getting the package name in copyright.

1

There are 1 best solutions below

0
Egor Klepikov On BEST ANSWER

Copyright profiles are using Apache Velocity engine under the hood. You can try something like:

#set( $dot = "." )
#set( $final=$dot + $file.className)
$file.qualifiedClassName.replace($final, "")