Skip to content

Instantly share code, notes, and snippets.

@wadey wadey/examples.java
Created Jun 6, 2012

Embed
What would you like to do?
IntelliJ Templates
// log4j
private static final Logger log = LogManager.getLogger($CLASS_NAME$.class);
<?xml version="1.0" encoding="UTF-8"?>
<application>
<component name="ToStringTemplates">
<option name="defaultTempalteName" value="Objects.toStringHelper (Guava)" />
<option name="templates">
<list>
<TemplateResource>
<option name="fileName" value="Objects.toStringHelper (Guava)" />
<option name="name" value="Objects.toStringHelper (Guava)" />
<option name="template" value="public String toString() {&#10;#set ($autoImportPackages = &quot;com.google.common.base.Objects&quot;)&#10; return Objects.toStringHelper(this)&#10;#foreach ($member in $members)&#10; .add(&quot;$member.name&quot;, $member.accessor)&#10;#end&#10; .toString();&#10;}" />
</TemplateResource>
</list>
</option>
</component>
</application>
<?xml version="1.0" encoding="UTF-8"?>
<templateSet group="wadey">
<template name="log4j" value="private static final org.apache.log4j.Logger log = org.apache.log4j.LogManager.getLogger($CLASS_NAME$.class);" description="Set up log4j logger" toReformat="true" toShortenFQNames="true">
<variable name="CLASS_NAME" expression="className()" defaultValue="" alwaysStopAt="false" />
<context>
<option name="JAVA_CODE" value="false" />
<option name="JAVA_STATEMENT" value="false" />
<option name="GROOVY" value="false" />
<option name="GROOVY_STATEMENT" value="false" />
<option name="HTML_TEXT" value="false" />
<option name="JAVA_DECLARATION" value="true" />
<option name="XSL_TEXT" value="false" />
<option name="HTML" value="false" />
<option name="JAVA_COMMENT" value="false" />
<option name="GROOVY_DECLARATION" value="false" />
<option name="JAVA_STRING" value="false" />
<option name="JAVA_EXPRESSION" value="false" />
<option name="COMPLETION" value="false" />
<option name="XML" value="false" />
<option name="MAVEN" value="false" />
<option name="OTHER" value="false" />
<option name="GROOVY_EXPRESSION" value="false" />
</context>
</template>
</templateSet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.