wollok.js 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. ace.define("ace/snippets/wollok",["require","exports","module"], 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. });