Skip to content

Instantly share code, notes, and snippets.

@xiorcal
Created August 21, 2015 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save xiorcal/e35683aef70a66424c00 to your computer and use it in GitHub Desktop.
Save xiorcal/e35683aef70a66424c00 to your computer and use it in GitHub Desktop.
ecplise's java templates
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<templates>
<template autoinsert="true" context="java" deleted="false" description="" enabled="true" name="logdeb">if(LOGGER.isDebugEnabled()){&#13;
LOGGER.debug(${cursor});&#13;
}</template>
<template autoinsert="true" context="java" deleted="false" description="initialise logger" enabled="true" name="logger">${:import(org.slf4j.Logger,org.slf4j.LoggerFactory)}&#13;
&#13;
/** Logger for ${enclosing_type} */&#13;
private static final Logger LOGGER = LoggerFactory.getLogger(${enclosing_type}.class);</template>
<template autoinsert="true" context="java" deleted="false" description="" enabled="true" name="singleton">/** instance of ${enclosing_type} (singleton) */&#13;
private static ${enclosing_type} instance;&#13;
&#13;
/** no constructor for singleton */&#13;
private ${enclosing_type}(){}&#13;
&#13;
/**&#13;
* instance access &#13;
* @return Instance of ${enclosing_type}&#13;
*/&#13;
public static ${enclosing_type} getInstance(){&#13;
if(null == instance){&#13;
instance = new ${enclosing_type}();&#13;
}&#13;
return instance;&#13;
}</template>
<template autoinsert="true" context="java" deleted="false" description="string format" enabled="true" name="strf">String.format("${string}",${objects})</template>
<template autoinsert="true" context="java" deleted="false" description="todo mala" enabled="true" name="todo">// TODO ${user} - </template>
</templates>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment