summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZachary McCain2013-11-15 14:56:56 (EST)
committer Stephan Born2013-12-04 05:11:38 (EST)
commit75fc01e6bbb042d0d1d4d365016d9d3ec07f7a6d (patch)
tree6f110b705c5cc0dbf447aea70bd3c7628c931b80
parent0f6aa6d98dce96431179cfa433540b279053436b (diff)
downloadorg.eclipse.stardust.ui.web-75fc01e6bbb042d0d1d4d365016d9d3ec07f7a6d.zip
org.eclipse.stardust.ui.web-75fc01e6bbb042d0d1d4d365016d9d3ec07f7a6d.tar.gz
org.eclipse.stardust.ui.web-75fc01e6bbb042d0d1d4d365016d9d3ec07f7a6d.tar.bz2
Jira-ID: CRNT-30922
- In support of Upgrade Ace Code Editor to Version 'package 07.31.2013'. As ace can be loaded as a global window variable from any perspective, it becomes neccessary that all instances of ace have available (in their local paths) all resources needed by all perspecitves. Resources being mode files, snippet files, and themes. git-svn-id: https://svn.csa.sungard.com/repos/ipp2/product/trunk/stardust/ui.web@68942 8100b5e0-4d52-466c-ae9c-bdeccbdeaf6b Signed-off-by: Zachary McCain <zachary.mccain@sungard.com>
-rw-r--r--stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/drl.js2
-rw-r--r--stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/groovy.js7
-rw-r--r--stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/python.js165
-rw-r--r--stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/sql.js33
4 files changed, 207 insertions, 0 deletions
diff --git a/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/drl.js b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/drl.js
new file mode 100644
index 0000000..14f4987
--- /dev/null
+++ b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/drl.js
@@ -0,0 +1,2 @@
+ace.define("ace/snippets/drl",["require","exports","module"],function(e,t,n){
+ t.snippetText='# function\nsnippet func\n function ${1:Type} ${2:Name}(${3:Params}){ \n ${4://body}\n }\n# Rule\nsnippet rule\n rule "${1:rule_name}" \n ${2://Attributes}\n when \n ${3://Condition}\n then \n ${4://Action}\n end\n# declare\nsnippet decl\n declare ${1:Type_Name} \n ${2://body}\n end\n',t.scope="drl"}); \ No newline at end of file
diff --git a/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/groovy.js b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/groovy.js
new file mode 100644
index 0000000..a31dc32
--- /dev/null
+++ b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/groovy.js
@@ -0,0 +1,7 @@
+ace.define('ace/snippets/groovy', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.snippetText = "";
+exports.scope = "groovy";
+
+});
diff --git a/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/python.js b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/python.js
new file mode 100644
index 0000000..1a0be2a
--- /dev/null
+++ b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/python.js
@@ -0,0 +1,165 @@
+ace.define('ace/snippets/python', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.snippetText = "snippet #!\n\
+ #!/usr/bin/env python\n\
+snippet imp\n\
+ import ${1:module}\n\
+snippet from\n\
+ from ${1:package} import ${2:module}\n\
+# Module Docstring\n\
+snippet docs\n\
+ '''\n\
+ File: ${1:`Filename('$1.py', 'foo.py')`}\n\
+ Author: ${2:`g:snips_author`}\n\
+ Description: ${3}\n\
+ '''\n\
+snippet wh\n\
+ while ${1:condition}:\n\
+ ${2:# TODO: write code...}\n\
+# dowh - does the same as do...while in other languages\n\
+snippet dowh\n\
+ while True:\n\
+ ${1:# TODO: write code...}\n\
+ if ${2:condition}:\n\
+ break\n\
+snippet with\n\
+ with ${1:expr} as ${2:var}:\n\
+ ${3:# TODO: write code...}\n\
+# New Class\n\
+snippet cl\n\
+ class ${1:ClassName}(${2:object}):\n\
+ \"\"\"${3:docstring for $1}\"\"\"\n\
+ def __init__(self, ${4:arg}):\n\
+ ${5:super($1, self).__init__()}\n\
+ self.$4 = $4\n\
+ ${6}\n\
+# New Function\n\
+snippet def\n\
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\
+ \"\"\"${3:docstring for $1}\"\"\"\n\
+ ${4:# TODO: write code...}\n\
+snippet deff\n\
+ def ${1:fname}(${2:`indent('.') ? 'self' : ''`}):\n\
+ ${3:# TODO: write code...}\n\
+# New Method\n\
+snippet defs\n\
+ def ${1:mname}(self, ${2:arg}):\n\
+ ${3:# TODO: write code...}\n\
+# New Property\n\
+snippet property\n\
+ def ${1:foo}():\n\
+ doc = \"${2:The $1 property.}\"\n\
+ def fget(self):\n\
+ ${3:return self._$1}\n\
+ def fset(self, value):\n\
+ ${4:self._$1 = value}\n\
+# Ifs\n\
+snippet if\n\
+ if ${1:condition}:\n\
+ ${2:# TODO: write code...}\n\
+snippet el\n\
+ else:\n\
+ ${1:# TODO: write code...}\n\
+snippet ei\n\
+ elif ${1:condition}:\n\
+ ${2:# TODO: write code...}\n\
+# For\n\
+snippet for\n\
+ for ${1:item} in ${2:items}:\n\
+ ${3:# TODO: write code...}\n\
+# Encodes\n\
+snippet cutf8\n\
+ # -*- coding: utf-8 -*-\n\
+snippet clatin1\n\
+ # -*- coding: latin-1 -*-\n\
+snippet cascii\n\
+ # -*- coding: ascii -*-\n\
+# Lambda\n\
+snippet ld\n\
+ ${1:var} = lambda ${2:vars} : ${3:action}\n\
+snippet .\n\
+ self.\n\
+snippet try Try/Except\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+snippet try Try/Except/Else\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+ else:\n\
+ ${5:# TODO: write code...}\n\
+snippet try Try/Except/Finally\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+ finally:\n\
+ ${5:# TODO: write code...}\n\
+snippet try Try/Except/Else/Finally\n\
+ try:\n\
+ ${1:# TODO: write code...}\n\
+ except ${2:Exception}, ${3:e}:\n\
+ ${4:raise $3}\n\
+ else:\n\
+ ${5:# TODO: write code...}\n\
+ finally:\n\
+ ${6:# TODO: write code...}\n\
+# if __name__ == '__main__':\n\
+snippet ifmain\n\
+ if __name__ == '__main__':\n\
+ ${1:main()}\n\
+# __magic__\n\
+snippet _\n\
+ __${1:init}__${2}\n\
+# python debugger (pdb)\n\
+snippet pdb\n\
+ import pdb; pdb.set_trace()\n\
+# ipython debugger (ipdb)\n\
+snippet ipdb\n\
+ import ipdb; ipdb.set_trace()\n\
+# ipython debugger (pdbbb)\n\
+snippet pdbbb\n\
+ import pdbpp; pdbpp.set_trace()\n\
+snippet pprint\n\
+ import pprint; pprint.pprint(${1})${2}\n\
+snippet \"\n\
+ \"\"\"\n\
+ ${1:doc}\n\
+ \"\"\"\n\
+# test function/method\n\
+snippet test\n\
+ def test_${1:description}(${2:`indent('.') ? 'self' : ''`}):\n\
+ ${3:# TODO: write code...}\n\
+# test case\n\
+snippet testcase\n\
+ class ${1:ExampleCase}(unittest.TestCase):\n\
+ \n\
+ def test_${2:description}(self):\n\
+ ${3:# TODO: write code...}\n\
+snippet fut\n\
+ from __future__ import ${1}\n\
+#getopt\n\
+snippet getopt\n\
+ try:\n\
+ # Short option syntax: \"hv:\"\n\
+ # Long option syntax: \"help\" or \"verbose=\"\n\
+ opts, args = getopt.getopt(sys.argv[1:], \"${1:short_options}\", [${2:long_options}])\n\
+ \n\
+ except getopt.GetoptError, err:\n\
+ # Print debug info\n\
+ print str(err)\n\
+ ${3:error_action}\n\
+\n\
+ for option, argument in opts:\n\
+ if option in (\"-h\", \"--help\"):\n\
+ ${4}\n\
+ elif option in (\"-v\", \"--verbose\"):\n\
+ verbose = argument\n\
+";
+exports.scope = "python";
+
+});
diff --git a/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/sql.js b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/sql.js
new file mode 100644
index 0000000..a9b359b
--- /dev/null
+++ b/stardust-web-reporting/src/main/resources/META-INF/webapp/js/libs/ace/snippets/sql.js
@@ -0,0 +1,33 @@
+ace.define('ace/snippets/sql', ['require', 'exports', 'module' ], function(require, exports, module) {
+
+
+exports.snippetText = "snippet tbl\n\
+ create table ${1:table} (\n\
+ ${2:columns}\n\
+ );\n\
+snippet col\n\
+ ${1:name} ${2:type} ${3:default ''} ${4:not null}\n\
+snippet ccol\n\
+ ${1:name} varchar2(${2:size}) ${3:default ''} ${4:not null}\n\
+snippet ncol\n\
+ ${1:name} number ${3:default 0} ${4:not null}\n\
+snippet dcol\n\
+ ${1:name} date ${3:default sysdate} ${4:not null}\n\
+snippet ind\n\
+ create index ${3:$1_$2} on ${1:table}(${2:column});\n\
+snippet uind\n\
+ create unique index ${1:name} on ${2:table}(${3:column});\n\
+snippet tblcom\n\
+ comment on table ${1:table} is '${2:comment}';\n\
+snippet colcom\n\
+ comment on column ${1:table}.${2:column} is '${3:comment}';\n\
+snippet addcol\n\
+ alter table ${1:table} add (${2:column} ${3:type});\n\
+snippet seq\n\
+ create sequence ${1:name} start with ${2:1} increment by ${3:1} minvalue ${4:1};\n\
+snippet s*\n\
+ select * from ${1:table}\n\
+";
+exports.scope = "sql";
+
+});