Michael Jarvis
Michael Jarvis

Reputation: 1143

IntelliJ File and Code Templates error

This isn't specifically code-related, but about the templates of IntelliJ IDEA. In File -> Settings... -> File and Code Templates, it shows the templates of various file types that you can edit (when you create a file of that type, it provides the layout from the template, pretty simple). However, my problem is that it doesn't exactly follow my desired template. For example, let's take the Class type.

This is what I want:

#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end

public class ${NAME} 
{
}

This is what I get:

package name

class name {
}

Why does IntelliJ IDEA ignore my moving of the block character onto the next line? How do I fix this? It's incredibly frustrating.

Upvotes: 1

Views: 222

Answers (1)

kuporific
kuporific

Reputation: 10322

IntelliJ is deciding where to put the brace using your current code style.

enter image description here

Upvotes: 1

Related Questions