How to make adding @author comment to every class created?

Hello,

Is it possible to add @author comment to every class created? Or maybe even some kind of blank template?

Thank you.

4 comments
Comment actions Permalink

Hi Kirill,

If you talking about File | New | PHP Class, then you can edit this template in Settings | File Templates. If you mean something else then please provide more details/example.

0
Comment actions Permalink

if it's for JAVA, here's the way:

 

File --> New --> Edit file templates --> Class --> /* ${USER} created on ${DATE} inside the package - ${PACKAGE_NAME} */

2
Comment actions Permalink

The above java solution that Rajm6344 described is not available for version "IntelliJ IDEA 2022.2 (Ultimate Edition) / Build #IU-222.3345.118, built on July 26, 2022", please specify the version you are posting about in future, since features or their location change from release to release. 

0
Comment actions Permalink

Just tried it with the PHP Class on IntelliJ IDEA 2022.2, works like charm:

0

Please sign in to leave a comment.