Hii,

now I will contribute something more useful [:-)]

Here is a live template for IDE IntelliJ Idea.
If you install it, just type log4j plus your shortcut
key (tab,enter,space - as defined in options).
It will automatically create new Category with
this class name filled in. Very handy.

log4j<tab>
=>
static org.apache.log4j.Category log =
org.apache.log4j.Category.getInstance(MyClass.class);

     Leo
<?xml version="1.0"?>

<templateSet group="log4j">
  <template name="log4j" value="static org.apache.log4j.Category log = org.apache.log4j.Category.getInstance($CLASS_NAME$.class);" description="Creates LOG4J category instance" toReformat="true" toShortenFQNames="false">
    <variable name="CLASS_NAME" expression="className()" defaultValue="" alwaysStopAt="false" />
    <context>
      <option name="JAVA_CODE" value="true" />
      <option name="JAVA_COMMENT" value="false" />
      <option name="JAVA_STRING" value="false" />
      <option name="XML" value="false" />
      <option name="HTML" value="false" />
      <option name="JSP" value="false" />
      <option name="OTHER" value="false" />
    </context>
  </template>
</templateSet>




--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to