Home > other >  Adding package name to copyright profile in IntelliJ IDEA
Adding package name to copyright profile in IntelliJ IDEA

Time:11-02

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.

CodePudding user response:

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, "")
  • Related