<?xml version="1.0" encoding="UTF-8"?><templates><template autoinsert="true" context="com.pf.fdt.ui.editor.template.actionscript" deleted="false" description="Creates complete Singleton" enabled="true" id="com.pf.fdt.ui.editor.template.singleton" name="singleton">import com.bourre.log.PixlibStringifier; /** * @author ${user} */ class ${enclosing_package_and_type} { private static var _oI : ${enclosing_type}; /** * @return singleton instance of ${enclosing_type} */ public static function getInstance() : ${enclosing_type} { if (!_oI) _oI = new ${enclosing_type}(); return _oI; } private function ${enclosing_type}() { //${cursor} } /** * Returns the string representation of this instance. * @return the string representation of this instance */ public function toString() : String { return PixlibStringifier.stringify( this ); } }</template></templates>
Discussion