wollok.js 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. ace.define("ace/snippets/wollok",[], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "##\n\
  4. ## Basic Java packages and import\n\
  5. snippet im\n\
  6. import\n\
  7. snippet w.l\n\
  8. wollok.lang\n\
  9. snippet w.i\n\
  10. wollok.lib\n\
  11. \n\
  12. ## Class and object\n\
  13. snippet cl\n\
  14. class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\
  15. snippet obj\n\
  16. object ${1:`Filename(\"\", \"untitled\")`} ${2:inherits Parent}${3}\n\
  17. snippet te\n\
  18. test ${1:`Filename(\"\", \"untitled\")`}\n\
  19. \n\
  20. ##\n\
  21. ## Enhancements\n\
  22. snippet inh\n\
  23. inherits\n\
  24. \n\
  25. ##\n\
  26. ## Comments\n\
  27. snippet /*\n\
  28. /*\n\
  29. * ${1}\n\
  30. */\n\
  31. \n\
  32. ##\n\
  33. ## Control Statements\n\
  34. snippet el\n\
  35. else\n\
  36. snippet if\n\
  37. if (${1}) ${2}\n\
  38. \n\
  39. ##\n\
  40. ## Create a Method\n\
  41. snippet m\n\
  42. method ${1:method}(${2}) ${5}\n\
  43. \n\
  44. ## \n\
  45. ## Tests\n\
  46. snippet as\n\
  47. assert.equals(${1:expected}, ${2:actual})\n\
  48. \n\
  49. ##\n\
  50. ## Exceptions\n\
  51. snippet ca\n\
  52. catch ${1:e} : (${2:Exception} ) ${3}\n\
  53. snippet thr\n\
  54. throw\n\
  55. snippet try\n\
  56. try {\n\
  57. ${3}\n\
  58. } catch ${1:e} : ${2:Exception} {\n\
  59. }\n\
  60. \n\
  61. ##\n\
  62. ## Javadocs\n\
  63. snippet /**\n\
  64. /**\n\
  65. * ${1}\n\
  66. */\n\
  67. \n\
  68. ##\n\
  69. ## Print Methods\n\
  70. snippet print\n\
  71. console.println(\"${1:Message}\")\n\
  72. \n\
  73. ##\n\
  74. ## Setter and Getter Methods\n\
  75. snippet set\n\
  76. method set${1:}(${2:}) {\n\
  77. $1 = $2\n\
  78. }\n\
  79. snippet get\n\
  80. method get${1:}() {\n\
  81. return ${1:};\n\
  82. }\n\
  83. \n\
  84. ##\n\
  85. ## Terminate Methods or Loops\n\
  86. snippet re\n\
  87. return";
  88. exports.scope = "wollok";
  89. });
  90. (function() {
  91. ace.require(["ace/snippets/wollok"], function(m) {
  92. if (typeof module == "object" && typeof exports == "object" && module) {
  93. module.exports = m;
  94. }
  95. });
  96. })();