home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / gedit-2 / plugins / snippets / java.xml < prev    next >
Encoding:
Extensible Markup Language  |  2006-08-27  |  1.9 KB  |  92 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <snippets language="Java">
  3.   <snippet id="cd">
  4.     <text><![CDATA[private static final ${1:String} ${2:var} = "$0";]]></text>
  5.     <description>const def</description>
  6.     <tag>cd</tag>
  7.   </snippet>
  8.   <snippet id="ife">
  9.     <text><![CDATA[if ($1) { // $2
  10.  
  11.    $0
  12.  
  13. } else { // $3
  14.  
  15.    
  16.  
  17. }
  18.  
  19. ]]></text>
  20.     <description>if .. else</description>
  21.     <tag>ife</tag>
  22.   </snippet>
  23.   <snippet id="if">
  24.     <text><![CDATA[if ($1) { // $2
  25.    $0
  26. }]]></text>
  27.     <description>if</description>
  28.     <tag>if</tag>
  29.   </snippet>
  30.   <snippet id="log">
  31.     <text><![CDATA[/** Logger for this class and subclasses. */
  32. protected final Log log = LogFactory.getLog(getClass());
  33. ]]></text>
  34.     <description>logger</description>
  35.     <tag>log</tag>
  36.   </snippet>
  37.   <snippet id="tcf">
  38.     <text><![CDATA[try {
  39.    $2
  40. } catch (${1:Exception} e) {
  41.    $3
  42. } finally {
  43.    $4
  44. }
  45. $0]]></text>
  46.     <description>try .. catch .. finally</description>
  47.     <tag>tcf</tag>
  48.   </snippet>
  49.   <snippet id="while">
  50.     <text><![CDATA[while ($1) { // $2
  51.    $0
  52. }]]></text>
  53.     <description>while statement</description>
  54.     <tag>while</tag>
  55.   </snippet>
  56.   <snippet id="main">
  57.     <text><![CDATA[public static void main(String[] args) {
  58.     ${1:System.exit(0)};
  59. }]]></text>
  60.     <description>main</description>
  61.     <tag>main</tag>
  62.   </snippet>
  63.   <snippet id="sout">
  64.     <text><![CDATA[System.out.println("${1}");
  65. $0    
  66. ]]></text>
  67.     <description>System.out.println</description>
  68.     <tag>sout</tag>
  69.   </snippet>
  70.   <snippet id="try/catch">
  71.     <text><![CDATA[try {
  72.     $GEDIT_SELECTED_TEXT
  73. catch (Exception e) { 
  74.     ${1:e.printStackTrace();}
  75. }
  76. $0]]></text>
  77.     <accelerator><![CDATA[<Shift><Alt>t]]></accelerator>
  78.     <description>Wrap Selection in Try/Catch</description>
  79.   </snippet>
  80.   <snippet id="tc">
  81.     <text><![CDATA[try {
  82.    $2
  83. } catch (${1:Exception} e) {
  84.    $3
  85. }
  86. $0]]></text>
  87.     <tag>tc</tag>
  88.     <description>try .. catch</description>
  89.   </snippet>
  90. </snippets>
  91.