dabc32896dd99d88e7b0f27f99d9f3d1.js 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. ace.define("ace/snippets/vala",["require","exports","module"], function(require, exports, module){"use strict";
  2. exports.snippets = [
  3. {
  4. "content": "case ${1:condition}:\n\t$0\n\tbreak;\n",
  5. "name": "case",
  6. "scope": "vala",
  7. "tabTrigger": "case"
  8. },
  9. {
  10. "content": "/**\n * ${6}\n */\n${1:public} class ${2:MethodName}${3: : GLib.Object} {\n\n\t/**\n\t * ${7}\n\t */\n\tpublic ${2}(${4}) {\n\t\t${5}\n\t}\n\n\t$0\n}",
  11. "name": "class",
  12. "scope": "vala",
  13. "tabTrigger": "class"
  14. },
  15. {
  16. "content": "(${1}) => {\n\t${0}\n}\n",
  17. "name": "closure",
  18. "scope": "vala",
  19. "tabTrigger": "=>"
  20. },
  21. {
  22. "content": "/*\n * $0\n */",
  23. "name": "Comment (multiline)",
  24. "scope": "vala",
  25. "tabTrigger": "/*"
  26. },
  27. {
  28. "content": "Console.WriteLine($1);\n$0",
  29. "name": "Console.WriteLine (writeline)",
  30. "scope": "vala",
  31. "tabTrigger": "writeline"
  32. },
  33. {
  34. "content": "[DBus(name = \"$0\")]",
  35. "name": "DBus annotation",
  36. "scope": "vala",
  37. "tabTrigger": "[DBus"
  38. },
  39. {
  40. "content": "delegate ${1:void} ${2:DelegateName}($0);",
  41. "name": "delegate",
  42. "scope": "vala",
  43. "tabTrigger": "delegate"
  44. },
  45. {
  46. "content": "do {\n\t$0\n} while ($1);\n",
  47. "name": "do while",
  48. "scope": "vala",
  49. "tabTrigger": "dowhile"
  50. },
  51. {
  52. "content": "/**\n * $0\n */",
  53. "name": "DocBlock",
  54. "scope": "vala",
  55. "tabTrigger": "/**"
  56. },
  57. {
  58. "content": "else if ($1) {\n\t$0\n}\n",
  59. "name": "else if (elseif)",
  60. "scope": "vala",
  61. "tabTrigger": "elseif"
  62. },
  63. {
  64. "content": "else {\n\t$0\n}",
  65. "name": "else",
  66. "scope": "vala",
  67. "tabTrigger": "else"
  68. },
  69. {
  70. "content": "enum {$1:EnumName} {\n\t$0\n}",
  71. "name": "enum",
  72. "scope": "vala",
  73. "tabTrigger": "enum"
  74. },
  75. {
  76. "content": "public errordomain ${1:Error} {\n\t$0\n}",
  77. "name": "error domain",
  78. "scope": "vala",
  79. "tabTrigger": "errordomain"
  80. },
  81. {
  82. "content": "for ($1;$2;$3) {\n\t$0\n}",
  83. "name": "for",
  84. "scope": "vala",
  85. "tabTrigger": "for"
  86. },
  87. {
  88. "content": "foreach ($1 in $2) {\n\t$0\n}",
  89. "name": "foreach",
  90. "scope": "vala",
  91. "tabTrigger": "foreach"
  92. },
  93. {
  94. "content": "Gee.ArrayList<${1:G}>($0);",
  95. "name": "Gee.ArrayList",
  96. "scope": "vala",
  97. "tabTrigger": "ArrayList"
  98. },
  99. {
  100. "content": "Gee.HashMap<${1:K},${2:V}>($0);",
  101. "name": "Gee.HashMap",
  102. "scope": "vala",
  103. "tabTrigger": "HashMap"
  104. },
  105. {
  106. "content": "Gee.HashSet<${1:G}>($0);",
  107. "name": "Gee.HashSet",
  108. "scope": "vala",
  109. "tabTrigger": "HashSet"
  110. },
  111. {
  112. "content": "if ($1) {\n\t$0\n}",
  113. "name": "if",
  114. "scope": "vala",
  115. "tabTrigger": "if"
  116. },
  117. {
  118. "content": "interface ${1:InterfaceName}{$2: : SuperInterface} {\n\t$0\n}",
  119. "name": "interface",
  120. "scope": "vala",
  121. "tabTrigger": "interface"
  122. },
  123. {
  124. "content": "public static int main(string [] argv) {\n\t${0}\n\treturn 0;\n}",
  125. "name": "Main function",
  126. "scope": "vala",
  127. "tabTrigger": "main"
  128. },
  129. {
  130. "content": "namespace $1 {\n\t$0\n}\n",
  131. "name": "namespace (ns)",
  132. "scope": "vala",
  133. "tabTrigger": "ns"
  134. },
  135. {
  136. "content": "stdout.printf($0);",
  137. "name": "printf",
  138. "scope": "vala",
  139. "tabTrigger": "printf"
  140. },
  141. {
  142. "content": "${1:public} ${2:Type} ${3:Name} {\n\tset {\n\t\t$0\n\t}\n\tget {\n\n\t}\n}",
  143. "name": "property (prop)",
  144. "scope": "vala",
  145. "tabTrigger": "prop"
  146. },
  147. {
  148. "content": "${1:public} ${2:Type} ${3:Name} {\n\tget {\n\t\t$0\n\t}\n}",
  149. "name": "read-only property (roprop)",
  150. "scope": "vala",
  151. "tabTrigger": "roprop"
  152. },
  153. {
  154. "content": "@\"${1:\\$var}\"",
  155. "name": "String template (@)",
  156. "scope": "vala",
  157. "tabTrigger": "@"
  158. },
  159. {
  160. "content": "struct ${1:StructName} {\n\t$0\n}",
  161. "name": "struct",
  162. "scope": "vala",
  163. "tabTrigger": "struct"
  164. },
  165. {
  166. "content": "switch ($1) {\n\t$0\n}",
  167. "name": "switch",
  168. "scope": "vala",
  169. "tabTrigger": "switch"
  170. },
  171. {
  172. "content": "try {\n\t$2\n} catch (${1:Error} e) {\n\t$0\n}",
  173. "name": "try/catch",
  174. "scope": "vala",
  175. "tabTrigger": "try"
  176. },
  177. {
  178. "content": "\"\"\"$0\"\"\";",
  179. "name": "Verbatim string (\"\"\")",
  180. "scope": "vala",
  181. "tabTrigger": "verbatim"
  182. },
  183. {
  184. "content": "while ($1) {\n\t$0\n}",
  185. "name": "while",
  186. "scope": "vala",
  187. "tabTrigger": "while"
  188. }
  189. ];
  190. exports.scope = "";
  191. }); (function() {
  192. ace.require(["ace/snippets/vala"], function(m) {
  193. if (typeof module == "object" && typeof exports == "object" && module) {
  194. module.exports = m;
  195. }
  196. });
  197. })();