jsp.js 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. ace.define("ace/snippets/jsp",[], function(require, exports, module) {
  2. "use strict";
  3. exports.snippetText = "snippet @page\n\
  4. <%@page contentType=\"text/html\" pageEncoding=\"UTF-8\"%>\n\
  5. snippet jstl\n\
  6. <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\
  7. <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\
  8. snippet jstl:c\n\
  9. <%@ taglib uri=\"http://java.sun.com/jsp/jstl/core\" prefix=\"c\" %>\n\
  10. snippet jstl:fn\n\
  11. <%@ taglib uri=\"http://java.sun.com/jsp/jstl/functions\" prefix=\"fn\" %>\n\
  12. snippet cpath\n\
  13. ${pageContext.request.contextPath}\n\
  14. snippet cout\n\
  15. <c:out value=\"${1}\" default=\"${2}\" />\n\
  16. snippet cset\n\
  17. <c:set var=\"${1}\" value=\"${2}\" />\n\
  18. snippet cremove\n\
  19. <c:remove var=\"${1}\" scope=\"${2:page}\" />\n\
  20. snippet ccatch\n\
  21. <c:catch var=\"${1}\" />\n\
  22. snippet cif\n\
  23. <c:if test=\"${${1}}\">\n\
  24. ${2}\n\
  25. </c:if>\n\
  26. snippet cchoose\n\
  27. <c:choose>\n\
  28. ${1}\n\
  29. </c:choose>\n\
  30. snippet cwhen\n\
  31. <c:when test=\"${${1}}\">\n\
  32. ${2}\n\
  33. </c:when>\n\
  34. snippet cother\n\
  35. <c:otherwise>\n\
  36. ${1}\n\
  37. </c:otherwise>\n\
  38. snippet cfore\n\
  39. <c:forEach items=\"${${1}}\" var=\"${2}\" varStatus=\"${3}\">\n\
  40. ${4:<c:out value=\"$2\" />}\n\
  41. </c:forEach>\n\
  42. snippet cfort\n\
  43. <c:set var=\"${1}\">${2:item1,item2,item3}</c:set>\n\
  44. <c:forTokens var=\"${3}\" items=\"${$1}\" delims=\"${4:,}\">\n\
  45. ${5:<c:out value=\"$3\" />}\n\
  46. </c:forTokens>\n\
  47. snippet cparam\n\
  48. <c:param name=\"${1}\" value=\"${2}\" />\n\
  49. snippet cparam+\n\
  50. <c:param name=\"${1}\" value=\"${2}\" />\n\
  51. cparam+${3}\n\
  52. snippet cimport\n\
  53. <c:import url=\"${1}\" />\n\
  54. snippet cimport+\n\
  55. <c:import url=\"${1}\">\n\
  56. <c:param name=\"${2}\" value=\"${3}\" />\n\
  57. cparam+${4}\n\
  58. </c:import>\n\
  59. snippet curl\n\
  60. <c:url value=\"${1}\" var=\"${2}\" />\n\
  61. <a href=\"${$2}\">${3}</a>\n\
  62. snippet curl+\n\
  63. <c:url value=\"${1}\" var=\"${2}\">\n\
  64. <c:param name=\"${4}\" value=\"${5}\" />\n\
  65. cparam+${6}\n\
  66. </c:url>\n\
  67. <a href=\"${$2}\">${3}</a>\n\
  68. snippet credirect\n\
  69. <c:redirect url=\"${1}\" />\n\
  70. snippet contains\n\
  71. ${fn:contains(${1:string}, ${2:substr})}\n\
  72. snippet contains:i\n\
  73. ${fn:containsIgnoreCase(${1:string}, ${2:substr})}\n\
  74. snippet endswith\n\
  75. ${fn:endsWith(${1:string}, ${2:suffix})}\n\
  76. snippet escape\n\
  77. ${fn:escapeXml(${1:string})}\n\
  78. snippet indexof\n\
  79. ${fn:indexOf(${1:string}, ${2:substr})}\n\
  80. snippet join\n\
  81. ${fn:join(${1:collection}, ${2:delims})}\n\
  82. snippet length\n\
  83. ${fn:length(${1:collection_or_string})}\n\
  84. snippet replace\n\
  85. ${fn:replace(${1:string}, ${2:substr}, ${3:replace})}\n\
  86. snippet split\n\
  87. ${fn:split(${1:string}, ${2:delims})}\n\
  88. snippet startswith\n\
  89. ${fn:startsWith(${1:string}, ${2:prefix})}\n\
  90. snippet substr\n\
  91. ${fn:substring(${1:string}, ${2:begin}, ${3:end})}\n\
  92. snippet substr:a\n\
  93. ${fn:substringAfter(${1:string}, ${2:substr})}\n\
  94. snippet substr:b\n\
  95. ${fn:substringBefore(${1:string}, ${2:substr})}\n\
  96. snippet lc\n\
  97. ${fn:toLowerCase(${1:string})}\n\
  98. snippet uc\n\
  99. ${fn:toUpperCase(${1:string})}\n\
  100. snippet trim\n\
  101. ${fn:trim(${1:string})}\n\
  102. ";
  103. exports.scope = "jsp";
  104. });
  105. (function() {
  106. ace.require(["ace/snippets/jsp"], function(m) {
  107. if (typeof module == "object" && typeof exports == "object" && module) {
  108. module.exports = m;
  109. }
  110. });
  111. })();