Thomas Sundberg

October 24, 2014

Removing the auto generated class header in IntelliJ IDEA

Filed under: Tools — Tags: , , , — Thomas Sundberg @ 15:58

This post has been migrated to

My weapon of choice when it comes to editors is without question IntelliJ IDEA. It is great and behaves as I want and usually expects. It has, however, one feature that I find annoying and that I always remove.

IDEA will automatically insert a header with my user name and the date when I created a new class. I use version control so this information is never important. Adding a user name implies code ownership. Code ownership is against one principle I think is very important, collective code ownership. It is a core principle in XP with the goal to make sure that every developer feels that it is ok to work on all code in a project.

The header IDEA inserts used to include where to find it so you easily could find and modify it. Today, when I set up a new environment at a new customer, I noticed that the template had changed. It didn’t tell me where to find the template. It looked like below:

* Created by ${USER} on ${DATE}.

My question now became, where is this defined? I found it after some searching. On a Windows host I had to follow this path:

File | Settings | File and Code Template | Includes | File Header

I will probably not find it again so I write this as a reminder to myself.



  1. For OSX, it’s under IntelliJ IDEA -> Preferences -> Editor -> File and Code Templates.

    Comment by Oscar Barrett — January 4, 2015 @ 14:33

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at

%d bloggers like this: