Reputation: 369
I'm having trouble with the file templates for Java Development in IntelliJ IDEA. I created an includes file to be parsed out and create Javadoc Comments from it.
File > Settings > Editor > File and Code Templates > Includes Tab
I added these variables to my File Header:
@name ${NAME}
@author #set( $Company = "Avaruus Studios" )
@date ${DATE}
I then added the parse directive to the File Template:
#if (${PACKAGE_NAME} && ${PACKAGE_NAME} != "")package ${PACKAGE_NAME};#end
#parse("File Header.java")
public class ${NAME} {
}
When I add a new Java Class, the Javadoc Header Comments that are generated show up as errors:
How can I fix this template so that they are generated correctly?
Upvotes: 2
Views: 1479
Reputation: 46
Javadoc needs to be inside comment brackets for java, so try changing your template file to:
Edit:
#set( $Company = "Avaruus Studios" )
/**
* @name ${NAME}
* @author ${Company}
* @date ${DATE}
*/
Upvotes: 1