mdbe 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (688) hide show
  1. checksums.yaml +15 -0
  2. data/LICENSE.txt +21 -0
  3. data/README.md +53 -0
  4. data/app.rb +182 -0
  5. data/bin/mdbe +5 -0
  6. data/config.ru +2 -0
  7. data/environment.rb +8 -0
  8. data/lib/mdbe.rb +39 -0
  9. data/lib/mdbe/action_controller_debug_patch.rb +12 -0
  10. data/lib/mdbe/code_evaluation.rb +46 -0
  11. data/lib/mdbe/database_views.rb +24 -0
  12. data/lib/mdbe/database_views/abstract_dictionary.rb +69 -0
  13. data/lib/mdbe/database_views/abstract_exception.rb +25 -0
  14. data/lib/mdbe/database_views/array.rb +28 -0
  15. data/lib/mdbe/database_views/boolean.rb +12 -0
  16. data/lib/mdbe/database_views/class.rb +46 -0
  17. data/lib/mdbe/database_views/exception.rb +3 -0
  18. data/lib/mdbe/database_views/execblock.rb +5 -0
  19. data/lib/mdbe/database_views/fixnum.rb +5 -0
  20. data/lib/mdbe/database_views/float.rb +5 -0
  21. data/lib/mdbe/database_views/globals.rb +2 -0
  22. data/lib/mdbe/database_views/gsnmethod.rb +29 -0
  23. data/lib/mdbe/database_views/hash.rb +5 -0
  24. data/lib/mdbe/database_views/maglev_record.rb +42 -0
  25. data/lib/mdbe/database_views/module.rb +103 -0
  26. data/lib/mdbe/database_views/nilclass.rb +5 -0
  27. data/lib/mdbe/database_views/object.rb +80 -0
  28. data/lib/mdbe/database_views/proc.rb +3 -0
  29. data/lib/mdbe/database_views/repository.rb +3 -0
  30. data/lib/mdbe/database_views/ruby_workspace.rb +5 -0
  31. data/lib/mdbe/database_views/smalltalk_classes.rb +34 -0
  32. data/lib/mdbe/database_views/smalltalk_classes.st +60 -0
  33. data/lib/mdbe/database_views/string.rb +31 -0
  34. data/lib/mdbe/database_views/symbol.rb +32 -0
  35. data/lib/mdbe/database_views/system.rb +61 -0
  36. data/lib/mdbe/database_views/thread.rb +101 -0
  37. data/lib/mdbe/debug_server.rb +22 -0
  38. data/lib/mdbe/halt.rb +42 -0
  39. data/lib/mdbe/ruby_workspace.rb +29 -0
  40. data/lib/mdbe/version.rb +3 -0
  41. data/lib/tasks/maglev-database-explorer_tasks.rake +4 -0
  42. data/public/LICENSE +35 -0
  43. data/public/amber/CHANGELOG +65 -0
  44. data/public/amber/LICENSE +22 -0
  45. data/public/amber/Makefile +53 -0
  46. data/public/amber/README.md +30 -0
  47. data/public/amber/bin/amber +3 -0
  48. data/public/amber/bin/amberc +352 -0
  49. data/public/amber/bin/nodecompile.js +33 -0
  50. data/public/amber/bin/server +3 -0
  51. data/public/amber/bin/server.bat +3 -0
  52. data/public/amber/css/amber-normalize.css +468 -0
  53. data/public/amber/css/amber-normalize.less +501 -0
  54. data/public/amber/css/amber.css +539 -0
  55. data/public/amber/css/documentation.css +84 -0
  56. data/public/amber/css/profstef.css +75 -0
  57. data/public/amber/css/style.css +313 -0
  58. data/public/amber/documentation.html +37 -0
  59. data/public/amber/examples/Makefile +23 -0
  60. data/public/amber/examples/README +4 -0
  61. data/public/amber/examples/android/helloamber/AndroidManifest.xml +19 -0
  62. data/public/amber/examples/android/helloamber/HelloAmber.st +13 -0
  63. data/public/amber/examples/android/helloamber/Makefile +56 -0
  64. data/public/amber/examples/android/helloamber/README.md +80 -0
  65. data/public/amber/examples/android/helloamber/ant.properties +17 -0
  66. data/public/amber/examples/android/helloamber/assets/index.html +15 -0
  67. data/public/amber/examples/android/helloamber/assets/jquery-1.7.2.min.js +4 -0
  68. data/public/amber/examples/android/helloamber/build.xml +83 -0
  69. data/public/amber/examples/android/helloamber/local.properties +10 -0
  70. data/public/amber/examples/android/helloamber/proguard-project.txt +20 -0
  71. data/public/amber/examples/android/helloamber/project.properties +14 -0
  72. data/public/amber/examples/android/helloamber/res/layout/main.xml +6 -0
  73. data/public/amber/examples/android/helloamber/res/values/strings.xml +4 -0
  74. data/public/amber/examples/android/helloamber/src/org/amberlang/android/helloamber/HelloAmber.java +59 -0
  75. data/public/amber/examples/myproject/index.html +16 -0
  76. data/public/amber/examples/nodejs/README +9 -0
  77. data/public/amber/examples/nodejs/benchfib/Benchfib.st +124 -0
  78. data/public/amber/examples/nodejs/benchfib/Makefile +8 -0
  79. data/public/amber/examples/nodejs/benchfib/benchfib +1 -0
  80. data/public/amber/examples/nodejs/hello/Hello.st +9 -0
  81. data/public/amber/examples/nodejs/hello/Makefile +8 -0
  82. data/public/amber/examples/nodejs/hello/README +13 -0
  83. data/public/amber/examples/nodejs/hello/hello +1 -0
  84. data/public/amber/examples/nodejs/meta/Makefile +8 -0
  85. data/public/amber/examples/nodejs/meta/MyScript.st +27 -0
  86. data/public/amber/examples/nodejs/meta/meta +1 -0
  87. data/public/amber/examples/nodejs/pystone/Makefile +8 -0
  88. data/public/amber/examples/nodejs/pystone/Pystone.st +306 -0
  89. data/public/amber/examples/nodejs/pystone/pystone +1 -0
  90. data/public/amber/examples/nodejs/trivialserver/Makefile +8 -0
  91. data/public/amber/examples/nodejs/trivialserver/TrivialServer.st +51 -0
  92. data/public/amber/examples/nodejs/trivialserver/trivial +1 -0
  93. data/public/amber/examples/presentation/esug2011/images/asterix.png +0 -0
  94. data/public/amber/examples/presentation/esug2011/images/background_box.png +0 -0
  95. data/public/amber/examples/presentation/esug2011/images/background_header.png +0 -0
  96. data/public/amber/examples/presentation/esug2011/images/balloon.jpg +0 -0
  97. data/public/amber/examples/presentation/esug2011/images/balloon_header.png +0 -0
  98. data/public/amber/examples/presentation/esug2011/images/devices.jpg +0 -0
  99. data/public/amber/examples/presentation/esug2011/images/enyo.png +0 -0
  100. data/public/amber/examples/presentation/esug2011/images/ide_star_wars.png +0 -0
  101. data/public/amber/examples/presentation/esug2011/images/nodejs.png +0 -0
  102. data/public/amber/examples/presentation/esug2011/images/terminal.png +0 -0
  103. data/public/amber/examples/presentation/esug2011/images/webos.png +0 -0
  104. data/public/amber/examples/presentation/fosdem2012/images/amber.png +0 -0
  105. data/public/amber/examples/presentation/fosdem2012/images/ambrhino.jpg +0 -0
  106. data/public/amber/examples/presentation/fosdem2012/images/nodejs.png +0 -0
  107. data/public/amber/examples/presentation/fosdem2012/images/pharo.png +0 -0
  108. data/public/amber/examples/presentation/fosdem2012/images/php.gif +0 -0
  109. data/public/amber/examples/presentation/fosdem2012/images/rails.png +0 -0
  110. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/arrow-next.png +0 -0
  111. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/arrow-prev.png +0 -0
  112. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/closedhand.cur +0 -0
  113. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/openhand.cur +0 -0
  114. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/shadow-top-back.png +0 -0
  115. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/shadow-top-forward.png +0 -0
  116. data/public/amber/examples/presentation/fosdem2012/lib/booklet/images/shadow.png +0 -0
  117. data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.booklet.1.2.0.css +100 -0
  118. data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.booklet.1.2.0.js +1232 -0
  119. data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.booklet.1.2.0.min.js +13 -0
  120. data/public/amber/examples/presentation/fosdem2012/lib/booklet/jquery.easing.1.3.js +38 -0
  121. data/public/amber/examples/presentation/index.html +17 -0
  122. data/public/amber/examples/presentation/js/Presentation.deploy.js +1922 -0
  123. data/public/amber/examples/presentation/js/Presentation.js +2712 -0
  124. data/public/amber/examples/presentation/st/Presentation.st +1996 -0
  125. data/public/amber/examples/trysmalltalk/index.html +18 -0
  126. data/public/amber/examples/trysmalltalk/js/TrySmalltalk.deploy.js +837 -0
  127. data/public/amber/examples/trysmalltalk/js/TrySmalltalk.js +1206 -0
  128. data/public/amber/examples/trysmalltalk/st/TrySmalltalk.st +964 -0
  129. data/public/amber/examples/twitterwall/css/twitterwall.css +19 -0
  130. data/public/amber/examples/twitterwall/index.html +35 -0
  131. data/public/amber/examples/twitterwall/js/TwitterWall.deploy.js +116 -0
  132. data/public/amber/examples/twitterwall/js/TwitterWall.js +146 -0
  133. data/public/amber/examples/twitterwall/st/TwitterWall.st +91 -0
  134. data/public/amber/examples/webos/README +11 -0
  135. data/public/amber/examples/webos/eris/DuckQwaq.wav +0 -0
  136. data/public/amber/examples/webos/eris/EnyoAmber.st +36 -0
  137. data/public/amber/examples/webos/eris/Eris.css +0 -0
  138. data/public/amber/examples/webos/eris/Eris.st +86 -0
  139. data/public/amber/examples/webos/eris/Makefile +37 -0
  140. data/public/amber/examples/webos/eris/README +3 -0
  141. data/public/amber/examples/webos/eris/appinfo.json +10 -0
  142. data/public/amber/examples/webos/eris/index.html +12 -0
  143. data/public/amber/examples/webos/helloamber/EnyoAmber.st +36 -0
  144. data/public/amber/examples/webos/helloamber/HelloAmber.st +86 -0
  145. data/public/amber/examples/webos/helloamber/Makefile +38 -0
  146. data/public/amber/examples/webos/helloamber/README +5 -0
  147. data/public/amber/examples/webos/helloamber/appinfo.json +10 -0
  148. data/public/amber/examples/webos/helloamber/index.html +12 -0
  149. data/public/amber/favicon.ico +0 -0
  150. data/public/amber/images/amber.png +0 -0
  151. data/public/amber/images/amber.svg +706 -0
  152. data/public/amber/images/amber_small.png +0 -0
  153. data/public/amber/images/off.amber.png +0 -0
  154. data/public/amber/images/off.png +0 -0
  155. data/public/amber/images/offHover.amber.png +0 -0
  156. data/public/amber/images/offHover.png +0 -0
  157. data/public/amber/images/presentation.png +0 -0
  158. data/public/amber/images/profstef.png +0 -0
  159. data/public/amber/images/sprite.amber.png +0 -0
  160. data/public/amber/images/sprite.png +0 -0
  161. data/public/amber/images/tinylogo.amber.png +0 -0
  162. data/public/amber/images/tinylogo.png +0 -0
  163. data/public/amber/images/twitterwall.png +0 -0
  164. data/public/amber/index.html +55 -0
  165. data/public/amber/js/Additional-Examples.deploy.js +15 -0
  166. data/public/amber/js/Additional-Examples.js +21 -0
  167. data/public/amber/js/Benchfib.deploy.js +132 -0
  168. data/public/amber/js/Benchfib.js +167 -0
  169. data/public/amber/js/Canvas.deploy.js +2446 -0
  170. data/public/amber/js/Canvas.js +3547 -0
  171. data/public/amber/js/Compiler-Tests.deploy.js +97 -0
  172. data/public/amber/js/Compiler-Tests.js +137 -0
  173. data/public/amber/js/Compiler.deploy.js +1877 -0
  174. data/public/amber/js/Compiler.js +2622 -0
  175. data/public/amber/js/Documentation.deploy.js +961 -0
  176. data/public/amber/js/Documentation.js +1376 -0
  177. data/public/amber/js/Examples.deploy.js +53 -0
  178. data/public/amber/js/Examples.js +73 -0
  179. data/public/amber/js/IDE.deploy.js +3557 -0
  180. data/public/amber/js/IDE.js +5002 -0
  181. data/public/amber/js/Kernel-Announcements.deploy.js +107 -0
  182. data/public/amber/js/Kernel-Announcements.js +152 -0
  183. data/public/amber/js/Kernel-Classes.deploy.js +774 -0
  184. data/public/amber/js/Kernel-Classes.js +1095 -0
  185. data/public/amber/js/Kernel-Collections.deploy.js +3121 -0
  186. data/public/amber/js/Kernel-Collections.js +4427 -0
  187. data/public/amber/js/Kernel-Exceptions.deploy.js +244 -0
  188. data/public/amber/js/Kernel-Exceptions.js +349 -0
  189. data/public/amber/js/Kernel-Methods.deploy.js +573 -0
  190. data/public/amber/js/Kernel-Methods.js +807 -0
  191. data/public/amber/js/Kernel-Objects.deploy.js +2877 -0
  192. data/public/amber/js/Kernel-Objects.js +4107 -0
  193. data/public/amber/js/Kernel-Tests.deploy.js +1513 -0
  194. data/public/amber/js/Kernel-Tests.js +2053 -0
  195. data/public/amber/js/Kernel-Transcript.deploy.js +142 -0
  196. data/public/amber/js/Kernel-Transcript.js +202 -0
  197. data/public/amber/js/Maglev-Core.deploy.js +2996 -0
  198. data/public/amber/js/Maglev-Core.js +4246 -0
  199. data/public/amber/js/Maglev-Database-Explorer.deploy.js +4476 -0
  200. data/public/amber/js/Maglev-Database-Explorer.js +6232 -0
  201. data/public/amber/js/Maglev-Vendor.deploy.js +350 -0
  202. data/public/amber/js/Maglev-Vendor.js +465 -0
  203. data/public/amber/js/README.md +5 -0
  204. data/public/amber/js/SUnit.deploy.js +351 -0
  205. data/public/amber/js/SUnit.js +501 -0
  206. data/public/amber/js/amber.js +273 -0
  207. data/public/amber/js/boot.js +602 -0
  208. data/public/amber/js/compat.js +22 -0
  209. data/public/amber/js/init.js +9 -0
  210. data/public/amber/js/lib/CodeMirror/LICENSE +19 -0
  211. data/public/amber/js/lib/CodeMirror/active-line.js +39 -0
  212. data/public/amber/js/lib/CodeMirror/amber.css +21 -0
  213. data/public/amber/js/lib/CodeMirror/codemirror.css +67 -0
  214. data/public/amber/js/lib/CodeMirror/codemirror.js +2144 -0
  215. data/public/amber/js/lib/CodeMirror/smalltalk.js +134 -0
  216. data/public/amber/js/lib/jQuery/jquery-1.4.4.min.js +167 -0
  217. data/public/amber/js/lib/jQuery/jquery-1.6.4.min.js +4 -0
  218. data/public/amber/js/lib/jQuery/jquery-ui-1.8.16.custom.min.js +791 -0
  219. data/public/amber/js/lib/jQuery/jquery.textarea.js +267 -0
  220. data/public/amber/js/lib/peg-0.6.2.min.js +2 -0
  221. data/public/amber/js/lib/showdown.js +419 -0
  222. data/public/amber/js/parser.js +4222 -0
  223. data/public/amber/js/parser.pegjs +223 -0
  224. data/public/amber/learn.html +40 -0
  225. data/public/amber/repl/Makefile +8 -0
  226. data/public/amber/repl/REPL.js +124 -0
  227. data/public/amber/repl/REPL.st +56 -0
  228. data/public/amber/repl/amber.js +18085 -0
  229. data/public/amber/server/FileServer.st +576 -0
  230. data/public/amber/server/Makefile +8 -0
  231. data/public/amber/server/server.js +13049 -0
  232. data/public/amber/st/Benchfib.js +297 -0
  233. data/public/amber/st/Benchfib.st +124 -0
  234. data/public/amber/st/Canvas.st +968 -0
  235. data/public/amber/st/Compiler-Tests.st +471 -0
  236. data/public/amber/st/Compiler.st +1445 -0
  237. data/public/amber/st/Documentation.st +758 -0
  238. data/public/amber/st/Examples.js +100 -0
  239. data/public/amber/st/Examples.st +38 -0
  240. data/public/amber/st/IDE.st +2404 -0
  241. data/public/amber/st/Kernel-Announcements.st +61 -0
  242. data/public/amber/st/Kernel-Classes.st +462 -0
  243. data/public/amber/st/Kernel-Collections.st +1611 -0
  244. data/public/amber/st/Kernel-Exceptions.st +124 -0
  245. data/public/amber/st/Kernel-Methods.st +291 -0
  246. data/public/amber/st/Kernel-Objects.st +1587 -0
  247. data/public/amber/st/Kernel-Tests.st +953 -0
  248. data/public/amber/st/Kernel-Transcript.st +70 -0
  249. data/public/amber/st/Maglev-Core.st +1694 -0
  250. data/public/amber/st/Maglev-Database-Explorer.st +3148 -0
  251. data/public/amber/st/Maglev-Vendor.st +151 -0
  252. data/public/amber/st/Makefile +104 -0
  253. data/public/amber/st/README.md +4 -0
  254. data/public/amber/st/SUnit.st +172 -0
  255. data/public/css/bootstrap-combined.no-icons.min.css +731 -0
  256. data/public/css/bootstrap.css +6811 -0
  257. data/public/css/images/animated-overlay.gif +0 -0
  258. data/public/css/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  259. data/public/css/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  260. data/public/css/images/ui-bg_flat_10_000000_40x100.png +0 -0
  261. data/public/css/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  262. data/public/css/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
  263. data/public/css/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  264. data/public/css/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
  265. data/public/css/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  266. data/public/css/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
  267. data/public/css/images/ui-icons_222222_256x240.png +0 -0
  268. data/public/css/images/ui-icons_228ef1_256x240.png +0 -0
  269. data/public/css/images/ui-icons_ef8c08_256x240.png +0 -0
  270. data/public/css/images/ui-icons_ffd27a_256x240.png +0 -0
  271. data/public/css/images/ui-icons_ffffff_256x240.png +0 -0
  272. data/public/css/jquery-ui.min.css +5 -0
  273. data/public/css/smalltalk_code.css +42 -0
  274. data/public/css/style.css +210 -0
  275. data/public/images/bg_tile.png +0 -0
  276. data/public/images/maglev-logo.gif +0 -0
  277. data/public/images/mchammer.gif +0 -0
  278. data/public/images/rails_tiny.png +0 -0
  279. data/public/images/ruby.png +0 -0
  280. data/public/images/ruby_smalltalk_bridge.png +0 -0
  281. data/public/images/smalltalk.png +0 -0
  282. data/public/img/glyphicons-halflings.png +0 -0
  283. data/public/index.html +118 -0
  284. data/public/libs/bootstrap.min.js +7 -0
  285. data/public/libs/codemirror/CONTRIBUTING.md +72 -0
  286. data/public/libs/codemirror/LICENSE +23 -0
  287. data/public/libs/codemirror/README.md +11 -0
  288. data/public/libs/codemirror/addon/dialog/dialog.css +32 -0
  289. data/public/libs/codemirror/addon/dialog/dialog.js +80 -0
  290. data/public/libs/codemirror/addon/display/placeholder.js +54 -0
  291. data/public/libs/codemirror/addon/edit/closebrackets.js +54 -0
  292. data/public/libs/codemirror/addon/edit/closetag.js +86 -0
  293. data/public/libs/codemirror/addon/edit/continuecomment.js +44 -0
  294. data/public/libs/codemirror/addon/edit/continuelist.js +25 -0
  295. data/public/libs/codemirror/addon/edit/matchbrackets.js +82 -0
  296. data/public/libs/codemirror/addon/fold/brace-fold.js +31 -0
  297. data/public/libs/codemirror/addon/fold/foldcode.js +32 -0
  298. data/public/libs/codemirror/addon/fold/indent-fold.js +11 -0
  299. data/public/libs/codemirror/addon/fold/xml-fold.js +64 -0
  300. data/public/libs/codemirror/addon/hint/html-hint.js +582 -0
  301. data/public/libs/codemirror/addon/hint/javascript-hint.js +142 -0
  302. data/public/libs/codemirror/addon/hint/pig-hint.js +117 -0
  303. data/public/libs/codemirror/addon/hint/python-hint.js +93 -0
  304. data/public/libs/codemirror/addon/hint/show-hint.css +38 -0
  305. data/public/libs/codemirror/addon/hint/show-hint.js +180 -0
  306. data/public/libs/codemirror/addon/hint/xml-hint.js +118 -0
  307. data/public/libs/codemirror/addon/lint/javascript-lint.js +127 -0
  308. data/public/libs/codemirror/addon/lint/json-lint.js +14 -0
  309. data/public/libs/codemirror/addon/lint/lint.css +96 -0
  310. data/public/libs/codemirror/addon/lint/lint.js +197 -0
  311. data/public/libs/codemirror/addon/mode/loadmode.js +51 -0
  312. data/public/libs/codemirror/addon/mode/multiplex.js +95 -0
  313. data/public/libs/codemirror/addon/mode/overlay.js +59 -0
  314. data/public/libs/codemirror/addon/runmode/colorize.js +29 -0
  315. data/public/libs/codemirror/addon/runmode/runmode-standalone.js +130 -0
  316. data/public/libs/codemirror/addon/runmode/runmode.js +52 -0
  317. data/public/libs/codemirror/addon/runmode/runmode.node.js +89 -0
  318. data/public/libs/codemirror/addon/search/match-highlighter.js +60 -0
  319. data/public/libs/codemirror/addon/search/search.js +131 -0
  320. data/public/libs/codemirror/addon/search/searchcursor.js +133 -0
  321. data/public/libs/codemirror/addon/selection/active-line.js +39 -0
  322. data/public/libs/codemirror/addon/selection/mark-selection.js +34 -0
  323. data/public/libs/codemirror/bin/compress +91 -0
  324. data/public/libs/codemirror/bin/lint +11 -0
  325. data/public/libs/codemirror/demo/activeline.html +70 -0
  326. data/public/libs/codemirror/demo/bidi.html +61 -0
  327. data/public/libs/codemirror/demo/btree.html +87 -0
  328. data/public/libs/codemirror/demo/buffers.html +98 -0
  329. data/public/libs/codemirror/demo/changemode.html +50 -0
  330. data/public/libs/codemirror/demo/closebrackets.html +63 -0
  331. data/public/libs/codemirror/demo/closetag.html +37 -0
  332. data/public/libs/codemirror/demo/complete.html +70 -0
  333. data/public/libs/codemirror/demo/emacs.html +60 -0
  334. data/public/libs/codemirror/demo/folding.html +69 -0
  335. data/public/libs/codemirror/demo/fullscreen.html +147 -0
  336. data/public/libs/codemirror/demo/html5complete.html +92 -0
  337. data/public/libs/codemirror/demo/indentwrap.html +49 -0
  338. data/public/libs/codemirror/demo/lint.html +90 -0
  339. data/public/libs/codemirror/demo/loadmode.html +40 -0
  340. data/public/libs/codemirror/demo/marker.html +59 -0
  341. data/public/libs/codemirror/demo/markselection.html +36 -0
  342. data/public/libs/codemirror/demo/matchhighlighter.html +38 -0
  343. data/public/libs/codemirror/demo/multiplex.html +60 -0
  344. data/public/libs/codemirror/demo/mustache.html +59 -0
  345. data/public/libs/codemirror/demo/placeholder.html +36 -0
  346. data/public/libs/codemirror/demo/preview.html +76 -0
  347. data/public/libs/codemirror/demo/resize.html +49 -0
  348. data/public/libs/codemirror/demo/runmode.html +50 -0
  349. data/public/libs/codemirror/demo/search.html +85 -0
  350. data/public/libs/codemirror/demo/spanaffectswrapping_shim.html +73 -0
  351. data/public/libs/codemirror/demo/theme.html +89 -0
  352. data/public/libs/codemirror/demo/variableheight.html +52 -0
  353. data/public/libs/codemirror/demo/vim.html +65 -0
  354. data/public/libs/codemirror/demo/visibletabs.html +53 -0
  355. data/public/libs/codemirror/demo/widget.html +74 -0
  356. data/public/libs/codemirror/demo/xmlcomplete.html +81 -0
  357. data/public/libs/codemirror/index.html +487 -0
  358. data/public/libs/codemirror/keymap/emacs.js +30 -0
  359. data/public/libs/codemirror/keymap/vim.js +3044 -0
  360. data/public/libs/codemirror/lib/codemirror.css +253 -0
  361. data/public/libs/codemirror/lib/codemirror.js +5585 -0
  362. data/public/libs/codemirror/mode/apl/apl.js +160 -0
  363. data/public/libs/codemirror/mode/apl/index.html +61 -0
  364. data/public/libs/codemirror/mode/asterisk/asterisk.js +183 -0
  365. data/public/libs/codemirror/mode/asterisk/index.html +142 -0
  366. data/public/libs/codemirror/mode/clike/clike.js +302 -0
  367. data/public/libs/codemirror/mode/clike/index.html +103 -0
  368. data/public/libs/codemirror/mode/clike/scala.html +767 -0
  369. data/public/libs/codemirror/mode/clojure/clojure.js +222 -0
  370. data/public/libs/codemirror/mode/clojure/index.html +76 -0
  371. data/public/libs/codemirror/mode/coffeescript/LICENSE +22 -0
  372. data/public/libs/codemirror/mode/coffeescript/coffeescript.js +346 -0
  373. data/public/libs/codemirror/mode/coffeescript/index.html +728 -0
  374. data/public/libs/codemirror/mode/commonlisp/commonlisp.js +101 -0
  375. data/public/libs/codemirror/mode/commonlisp/index.html +165 -0
  376. data/public/libs/codemirror/mode/css/css.js +567 -0
  377. data/public/libs/codemirror/mode/css/index.html +58 -0
  378. data/public/libs/codemirror/mode/css/scss.html +145 -0
  379. data/public/libs/codemirror/mode/css/scss_test.js +80 -0
  380. data/public/libs/codemirror/mode/css/test.js +113 -0
  381. data/public/libs/codemirror/mode/d/d.js +205 -0
  382. data/public/libs/codemirror/mode/d/index.html +262 -0
  383. data/public/libs/codemirror/mode/diff/diff.js +32 -0
  384. data/public/libs/codemirror/mode/diff/index.html +105 -0
  385. data/public/libs/codemirror/mode/ecl/ecl.js +192 -0
  386. data/public/libs/codemirror/mode/ecl/index.html +39 -0
  387. data/public/libs/codemirror/mode/erlang/erlang.js +463 -0
  388. data/public/libs/codemirror/mode/erlang/index.html +64 -0
  389. data/public/libs/codemirror/mode/gas/gas.js +326 -0
  390. data/public/libs/codemirror/mode/gas/index.html +57 -0
  391. data/public/libs/codemirror/mode/gfm/gfm.js +96 -0
  392. data/public/libs/codemirror/mode/gfm/index.html +74 -0
  393. data/public/libs/codemirror/mode/gfm/test.js +112 -0
  394. data/public/libs/codemirror/mode/go/go.js +165 -0
  395. data/public/libs/codemirror/mode/go/index.html +74 -0
  396. data/public/libs/codemirror/mode/groovy/groovy.js +210 -0
  397. data/public/libs/codemirror/mode/groovy/index.html +73 -0
  398. data/public/libs/codemirror/mode/haskell/haskell.js +242 -0
  399. data/public/libs/codemirror/mode/haskell/index.html +62 -0
  400. data/public/libs/codemirror/mode/haxe/haxe.js +429 -0
  401. data/public/libs/codemirror/mode/haxe/index.html +90 -0
  402. data/public/libs/codemirror/mode/htmlembedded/htmlembedded.js +73 -0
  403. data/public/libs/codemirror/mode/htmlembedded/index.html +49 -0
  404. data/public/libs/codemirror/mode/htmlmixed/htmlmixed.js +104 -0
  405. data/public/libs/codemirror/mode/htmlmixed/index.html +73 -0
  406. data/public/libs/codemirror/mode/http/http.js +98 -0
  407. data/public/libs/codemirror/mode/http/index.html +32 -0
  408. data/public/libs/codemirror/mode/javascript/index.html +92 -0
  409. data/public/libs/codemirror/mode/javascript/javascript.js +467 -0
  410. data/public/libs/codemirror/mode/javascript/typescript.html +48 -0
  411. data/public/libs/codemirror/mode/jinja2/index.html +38 -0
  412. data/public/libs/codemirror/mode/jinja2/jinja2.js +42 -0
  413. data/public/libs/codemirror/mode/less/index.html +741 -0
  414. data/public/libs/codemirror/mode/less/less.js +266 -0
  415. data/public/libs/codemirror/mode/livescript/LICENSE +23 -0
  416. data/public/libs/codemirror/mode/livescript/index.html +446 -0
  417. data/public/libs/codemirror/mode/livescript/livescript.js +267 -0
  418. data/public/libs/codemirror/mode/livescript/livescript.ls +266 -0
  419. data/public/libs/codemirror/mode/lua/index.html +74 -0
  420. data/public/libs/codemirror/mode/lua/lua.js +140 -0
  421. data/public/libs/codemirror/mode/markdown/index.html +344 -0
  422. data/public/libs/codemirror/mode/markdown/markdown.js +526 -0
  423. data/public/libs/codemirror/mode/markdown/test.js +636 -0
  424. data/public/libs/codemirror/mode/meta.js +75 -0
  425. data/public/libs/codemirror/mode/mirc/index.html +149 -0
  426. data/public/libs/codemirror/mode/mirc/mirc.js +177 -0
  427. data/public/libs/codemirror/mode/ntriples/index.html +33 -0
  428. data/public/libs/codemirror/mode/ntriples/ntriples.js +170 -0
  429. data/public/libs/codemirror/mode/ocaml/index.html +131 -0
  430. data/public/libs/codemirror/mode/ocaml/ocaml.js +113 -0
  431. data/public/libs/codemirror/mode/pascal/LICENSE +7 -0
  432. data/public/libs/codemirror/mode/pascal/index.html +48 -0
  433. data/public/libs/codemirror/mode/pascal/pascal.js +94 -0
  434. data/public/libs/codemirror/mode/perl/LICENSE +19 -0
  435. data/public/libs/codemirror/mode/perl/index.html +62 -0
  436. data/public/libs/codemirror/mode/perl/perl.js +816 -0
  437. data/public/libs/codemirror/mode/php/index.html +51 -0
  438. data/public/libs/codemirror/mode/php/php.js +129 -0
  439. data/public/libs/codemirror/mode/pig/index.html +42 -0
  440. data/public/libs/codemirror/mode/pig/pig.js +171 -0
  441. data/public/libs/codemirror/mode/properties/index.html +41 -0
  442. data/public/libs/codemirror/mode/properties/properties.js +63 -0
  443. data/public/libs/codemirror/mode/python/LICENSE.txt +21 -0
  444. data/public/libs/codemirror/mode/python/index.html +135 -0
  445. data/public/libs/codemirror/mode/python/python.js +340 -0
  446. data/public/libs/codemirror/mode/q/index.html +131 -0
  447. data/public/libs/codemirror/mode/q/q.js +124 -0
  448. data/public/libs/codemirror/mode/r/LICENSE +24 -0
  449. data/public/libs/codemirror/mode/r/index.html +74 -0
  450. data/public/libs/codemirror/mode/r/r.js +141 -0
  451. data/public/libs/codemirror/mode/rpm/changes/changes.js +19 -0
  452. data/public/libs/codemirror/mode/rpm/changes/index.html +53 -0
  453. data/public/libs/codemirror/mode/rpm/spec/index.html +99 -0
  454. data/public/libs/codemirror/mode/rpm/spec/spec.css +5 -0
  455. data/public/libs/codemirror/mode/rpm/spec/spec.js +66 -0
  456. data/public/libs/codemirror/mode/rst/LICENSE.txt +21 -0
  457. data/public/libs/codemirror/mode/rst/index.html +524 -0
  458. data/public/libs/codemirror/mode/rst/rst.js +550 -0
  459. data/public/libs/codemirror/mode/ruby/LICENSE +24 -0
  460. data/public/libs/codemirror/mode/ruby/index.html +173 -0
  461. data/public/libs/codemirror/mode/ruby/ruby.js +197 -0
  462. data/public/libs/codemirror/mode/rust/index.html +48 -0
  463. data/public/libs/codemirror/mode/rust/rust.js +432 -0
  464. data/public/libs/codemirror/mode/sass/index.html +54 -0
  465. data/public/libs/codemirror/mode/sass/sass.js +349 -0
  466. data/public/libs/codemirror/mode/scheme/index.html +65 -0
  467. data/public/libs/codemirror/mode/scheme/scheme.js +230 -0
  468. data/public/libs/codemirror/mode/shell/index.html +51 -0
  469. data/public/libs/codemirror/mode/shell/shell.js +118 -0
  470. data/public/libs/codemirror/mode/sieve/LICENSE +19 -0
  471. data/public/libs/codemirror/mode/sieve/index.html +81 -0
  472. data/public/libs/codemirror/mode/sieve/sieve.js +183 -0
  473. data/public/libs/codemirror/mode/smalltalk/index.html +57 -0
  474. data/public/libs/codemirror/mode/smalltalk/smalltalk.js +141 -0
  475. data/public/libs/codemirror/mode/smarty/index.html +83 -0
  476. data/public/libs/codemirror/mode/smarty/smarty.js +148 -0
  477. data/public/libs/codemirror/mode/sparql/index.html +42 -0
  478. data/public/libs/codemirror/mode/sparql/sparql.js +143 -0
  479. data/public/libs/codemirror/mode/sql/index.html +68 -0
  480. data/public/libs/codemirror/mode/sql/sql.js +268 -0
  481. data/public/libs/codemirror/mode/stex/index.html +98 -0
  482. data/public/libs/codemirror/mode/stex/stex.js +246 -0
  483. data/public/libs/codemirror/mode/stex/test.js +117 -0
  484. data/public/libs/codemirror/mode/tcl/index.html +129 -0
  485. data/public/libs/codemirror/mode/tcl/tcl.js +131 -0
  486. data/public/libs/codemirror/mode/tiddlywiki/index.html +142 -0
  487. data/public/libs/codemirror/mode/tiddlywiki/tiddlywiki.css +14 -0
  488. data/public/libs/codemirror/mode/tiddlywiki/tiddlywiki.js +353 -0
  489. data/public/libs/codemirror/mode/tiki/index.html +81 -0
  490. data/public/libs/codemirror/mode/tiki/tiki.css +26 -0
  491. data/public/libs/codemirror/mode/tiki/tiki.js +308 -0
  492. data/public/libs/codemirror/mode/turtle/index.html +39 -0
  493. data/public/libs/codemirror/mode/turtle/turtle.js +145 -0
  494. data/public/libs/codemirror/mode/vb/LICENSE.txt +21 -0
  495. data/public/libs/codemirror/mode/vb/index.html +88 -0
  496. data/public/libs/codemirror/mode/vb/vb.js +259 -0
  497. data/public/libs/codemirror/mode/vbscript/index.html +42 -0
  498. data/public/libs/codemirror/mode/vbscript/vbscript.js +26 -0
  499. data/public/libs/codemirror/mode/velocity/index.html +103 -0
  500. data/public/libs/codemirror/mode/velocity/velocity.js +144 -0
  501. data/public/libs/codemirror/mode/verilog/index.html +121 -0
  502. data/public/libs/codemirror/mode/verilog/verilog.js +182 -0
  503. data/public/libs/codemirror/mode/xml/index.html +45 -0
  504. data/public/libs/codemirror/mode/xml/xml.js +328 -0
  505. data/public/libs/codemirror/mode/xquery/LICENSE +20 -0
  506. data/public/libs/codemirror/mode/xquery/index.html +221 -0
  507. data/public/libs/codemirror/mode/xquery/test.js +64 -0
  508. data/public/libs/codemirror/mode/xquery/xquery.js +450 -0
  509. data/public/libs/codemirror/mode/yaml/index.html +68 -0
  510. data/public/libs/codemirror/mode/yaml/yaml.js +95 -0
  511. data/public/libs/codemirror/mode/z80/index.html +39 -0
  512. data/public/libs/codemirror/mode/z80/z80.js +85 -0
  513. data/public/libs/codemirror/package.json +21 -0
  514. data/public/libs/codemirror/test/doc_test.js +329 -0
  515. data/public/libs/codemirror/test/driver.js +138 -0
  516. data/public/libs/codemirror/test/index.html +182 -0
  517. data/public/libs/codemirror/test/lint/acorn.js +1593 -0
  518. data/public/libs/codemirror/test/lint/lint.js +112 -0
  519. data/public/libs/codemirror/test/lint/parse-js.js +1372 -0
  520. data/public/libs/codemirror/test/lint/walk.js +216 -0
  521. data/public/libs/codemirror/test/mode_test.css +10 -0
  522. data/public/libs/codemirror/test/mode_test.js +192 -0
  523. data/public/libs/codemirror/test/phantom_driver.js +31 -0
  524. data/public/libs/codemirror/test/run.js +33 -0
  525. data/public/libs/codemirror/test/test.js +1400 -0
  526. data/public/libs/codemirror/test/vim_test.js +1688 -0
  527. data/public/libs/codemirror/theme/ambiance-mobile.css +5 -0
  528. data/public/libs/codemirror/theme/ambiance.css +75 -0
  529. data/public/libs/codemirror/theme/blackboard.css +25 -0
  530. data/public/libs/codemirror/theme/cobalt.css +18 -0
  531. data/public/libs/codemirror/theme/eclipse.css +25 -0
  532. data/public/libs/codemirror/theme/elegant.css +10 -0
  533. data/public/libs/codemirror/theme/erlang-dark.css +21 -0
  534. data/public/libs/codemirror/theme/lesser-dark.css +44 -0
  535. data/public/libs/codemirror/theme/midnight.css +52 -0
  536. data/public/libs/codemirror/theme/monokai.css +28 -0
  537. data/public/libs/codemirror/theme/neat.css +9 -0
  538. data/public/libs/codemirror/theme/night.css +21 -0
  539. data/public/libs/codemirror/theme/rubyblue.css +21 -0
  540. data/public/libs/codemirror/theme/solarized.css +207 -0
  541. data/public/libs/codemirror/theme/twilight.css +26 -0
  542. data/public/libs/codemirror/theme/vibrant-ink.css +27 -0
  543. data/public/libs/codemirror/theme/xq-dark.css +46 -0
  544. data/public/libs/codemirror/theme/xq-light.css +43 -0
  545. data/public/libs/font-awesome/css/font-awesome-ie7.css +983 -0
  546. data/public/libs/font-awesome/css/font-awesome-ie7.min.css +24 -0
  547. data/public/libs/font-awesome/css/font-awesome.css +1268 -0
  548. data/public/libs/font-awesome/css/font-awesome.min.css +24 -0
  549. data/public/libs/font-awesome/font/FontAwesome.otf +0 -0
  550. data/public/libs/font-awesome/font/fontawesome-webfont.eot +0 -0
  551. data/public/libs/font-awesome/font/fontawesome-webfont.svg +339 -0
  552. data/public/libs/font-awesome/font/fontawesome-webfont.ttf +0 -0
  553. data/public/libs/font-awesome/font/fontawesome-webfont.woff +0 -0
  554. data/public/libs/font-awesome/less/bootstrap.less +78 -0
  555. data/public/libs/font-awesome/less/core.less +132 -0
  556. data/public/libs/font-awesome/less/extras.less +79 -0
  557. data/public/libs/font-awesome/less/font-awesome-ie7.less +413 -0
  558. data/public/libs/font-awesome/less/font-awesome.less +32 -0
  559. data/public/libs/font-awesome/less/icons.less +330 -0
  560. data/public/libs/font-awesome/less/mixins.less +34 -0
  561. data/public/libs/font-awesome/less/path.less +15 -0
  562. data/public/libs/font-awesome/less/variables.less +9 -0
  563. data/public/libs/jquery-1.10.0.min.js +6 -0
  564. data/public/libs/jquery-ui.min.js +12 -0
  565. data/public/libs/jquery.jsPlumb-1.4.0-all.js +9571 -0
  566. data/public/libs/jquery.livequery.js +226 -0
  567. data/public/libs/jsPlumbInitializer.js +72 -0
  568. data/public/libs/jstree/README.txt +10 -0
  569. data/public/libs/jstree/_demo/_dump.sql +20 -0
  570. data/public/libs/jstree/_demo/_inc/__mysql_errors.log +0 -0
  571. data/public/libs/jstree/_demo/_inc/class._database.php +146 -0
  572. data/public/libs/jstree/_demo/_inc/class._database_i.php +152 -0
  573. data/public/libs/jstree/_demo/_inc/class.tree.php +602 -0
  574. data/public/libs/jstree/_demo/_install.txt +6 -0
  575. data/public/libs/jstree/_demo/config.php +14 -0
  576. data/public/libs/jstree/_demo/file.png +0 -0
  577. data/public/libs/jstree/_demo/folder.png +0 -0
  578. data/public/libs/jstree/_demo/index.html +461 -0
  579. data/public/libs/jstree/_demo/root.png +0 -0
  580. data/public/libs/jstree/_demo/server.php +69 -0
  581. data/public/libs/jstree/_docs/!style.css +48 -0
  582. data/public/libs/jstree/_docs/_drive.png +0 -0
  583. data/public/libs/jstree/_docs/_html_data.html +2 -0
  584. data/public/libs/jstree/_docs/_json_data.json +4 -0
  585. data/public/libs/jstree/_docs/_search_data.json +6 -0
  586. data/public/libs/jstree/_docs/_search_result.json +1 -0
  587. data/public/libs/jstree/_docs/_xml_flat.xml +12 -0
  588. data/public/libs/jstree/_docs/_xml_nest.xml +18 -0
  589. data/public/libs/jstree/_docs/checkbox.html +171 -0
  590. data/public/libs/jstree/_docs/contextmenu.html +121 -0
  591. data/public/libs/jstree/_docs/cookies.html +97 -0
  592. data/public/libs/jstree/_docs/core.html +689 -0
  593. data/public/libs/jstree/_docs/crrm.html +316 -0
  594. data/public/libs/jstree/_docs/dnd.html +199 -0
  595. data/public/libs/jstree/_docs/hotkeys.html +82 -0
  596. data/public/libs/jstree/_docs/html_data.html +175 -0
  597. data/public/libs/jstree/_docs/index.html +86 -0
  598. data/public/libs/jstree/_docs/json_data.html +249 -0
  599. data/public/libs/jstree/_docs/languages.html +152 -0
  600. data/public/libs/jstree/_docs/logo.png +0 -0
  601. data/public/libs/jstree/_docs/search.html +153 -0
  602. data/public/libs/jstree/_docs/sort.html +85 -0
  603. data/public/libs/jstree/_docs/syntax/!script.js +2232 -0
  604. data/public/libs/jstree/_docs/syntax/!style.css +511 -0
  605. data/public/libs/jstree/_docs/syntax/clipboard.swf +0 -0
  606. data/public/libs/jstree/_docs/syntax/help.png +0 -0
  607. data/public/libs/jstree/_docs/syntax/magnifier.png +0 -0
  608. data/public/libs/jstree/_docs/syntax/page_white_code.png +0 -0
  609. data/public/libs/jstree/_docs/syntax/page_white_copy.png +0 -0
  610. data/public/libs/jstree/_docs/syntax/printer.png +0 -0
  611. data/public/libs/jstree/_docs/syntax/wrapping.png +0 -0
  612. data/public/libs/jstree/_docs/themeroller.html +107 -0
  613. data/public/libs/jstree/_docs/themes.html +127 -0
  614. data/public/libs/jstree/_docs/types.html +178 -0
  615. data/public/libs/jstree/_docs/ui.html +197 -0
  616. data/public/libs/jstree/_docs/unique.html +85 -0
  617. data/public/libs/jstree/_docs/xml_data.html +218 -0
  618. data/public/libs/jstree/_lib/jquery.cookie.js +96 -0
  619. data/public/libs/jstree/_lib/jquery.hotkeys.js +99 -0
  620. data/public/libs/jstree/_lib/jquery.js +5 -0
  621. data/public/libs/jstree/jquery.jstree.js +4564 -0
  622. data/public/libs/jstree/themes/apple/bg.jpg +0 -0
  623. data/public/libs/jstree/themes/apple/d.png +0 -0
  624. data/public/libs/jstree/themes/apple/dot_for_ie.gif +0 -0
  625. data/public/libs/jstree/themes/apple/style.css +61 -0
  626. data/public/libs/jstree/themes/apple/throbber.gif +0 -0
  627. data/public/libs/jstree/themes/classic/d.gif +0 -0
  628. data/public/libs/jstree/themes/classic/d.png +0 -0
  629. data/public/libs/jstree/themes/classic/dot_for_ie.gif +0 -0
  630. data/public/libs/jstree/themes/classic/style.css +77 -0
  631. data/public/libs/jstree/themes/classic/throbber.gif +0 -0
  632. data/public/libs/jstree/themes/default-rtl/d.gif +0 -0
  633. data/public/libs/jstree/themes/default-rtl/d.png +0 -0
  634. data/public/libs/jstree/themes/default-rtl/dots.gif +0 -0
  635. data/public/libs/jstree/themes/default-rtl/style.css +84 -0
  636. data/public/libs/jstree/themes/default-rtl/throbber.gif +0 -0
  637. data/public/libs/jstree/themes/default/d.gif +0 -0
  638. data/public/libs/jstree/themes/default/d.png +0 -0
  639. data/public/libs/jstree/themes/default/style.css +74 -0
  640. data/public/libs/jstree/themes/default/throbber.gif +0 -0
  641. data/public/themes/geo-bootstrap/README.md +25 -0
  642. data/public/themes/geo-bootstrap/img/flames.gif +0 -0
  643. data/public/themes/geo-bootstrap/img/glyphicons-halflings-white.png +0 -0
  644. data/public/themes/geo-bootstrap/img/glyphicons-halflings.png +0 -0
  645. data/public/themes/geo-bootstrap/img/microfab.gif +0 -0
  646. data/public/themes/geo-bootstrap/img/progress.gif +0 -0
  647. data/public/themes/geo-bootstrap/img/rainbow.gif +0 -0
  648. data/public/themes/geo-bootstrap/img/stars.gif +0 -0
  649. data/public/themes/geo-bootstrap/img/test/7upspot.gif +0 -0
  650. data/public/themes/geo-bootstrap/img/test/americanflag.gif +0 -0
  651. data/public/themes/geo-bootstrap/img/test/community.gif +0 -0
  652. data/public/themes/geo-bootstrap/img/test/computer-01.gif +0 -0
  653. data/public/themes/geo-bootstrap/img/test/computer.gif +0 -0
  654. data/public/themes/geo-bootstrap/img/test/construction.gif +0 -0
  655. data/public/themes/geo-bootstrap/img/test/counter.gif +0 -0
  656. data/public/themes/geo-bootstrap/img/test/counter2.gif +0 -0
  657. data/public/themes/geo-bootstrap/img/test/divider.gif +0 -0
  658. data/public/themes/geo-bootstrap/img/test/divider1.gif +0 -0
  659. data/public/themes/geo-bootstrap/img/test/divider2.gif +0 -0
  660. data/public/themes/geo-bootstrap/img/test/divider3.gif +0 -0
  661. data/public/themes/geo-bootstrap/img/test/divider4.gif +0 -0
  662. data/public/themes/geo-bootstrap/img/test/drudgesiren.gif +0 -0
  663. data/public/themes/geo-bootstrap/img/test/emailme.gif +0 -0
  664. data/public/themes/geo-bootstrap/img/test/funky.gif +0 -0
  665. data/public/themes/geo-bootstrap/img/test/geocities.jpg +0 -0
  666. data/public/themes/geo-bootstrap/img/test/hacker.gif +0 -0
  667. data/public/themes/geo-bootstrap/img/test/heart.gif +0 -0
  668. data/public/themes/geo-bootstrap/img/test/hot.gif +0 -0
  669. data/public/themes/geo-bootstrap/img/test/ie_logo.gif +0 -0
  670. data/public/themes/geo-bootstrap/img/test/mailkitten.gif +0 -0
  671. data/public/themes/geo-bootstrap/img/test/mchammer.gif +0 -0
  672. data/public/themes/geo-bootstrap/img/test/new.gif +0 -0
  673. data/public/themes/geo-bootstrap/img/test/new2.gif +0 -0
  674. data/public/themes/geo-bootstrap/img/test/noframes.gif +0 -0
  675. data/public/themes/geo-bootstrap/img/test/notepad.gif +0 -0
  676. data/public/themes/geo-bootstrap/img/test/ns_logo.gif +0 -0
  677. data/public/themes/geo-bootstrap/img/test/sign-in.gif +0 -0
  678. data/public/themes/geo-bootstrap/img/test/spinningearth.gif +0 -0
  679. data/public/themes/geo-bootstrap/img/test/underconstruction.gif +0 -0
  680. data/public/themes/geo-bootstrap/img/test/wabwalk.gif +0 -0
  681. data/public/themes/geo-bootstrap/img/test/webtrips.gif +0 -0
  682. data/public/themes/geo-bootstrap/img/test/yahooweek.gif +0 -0
  683. data/public/themes/geo-bootstrap/package.json +21 -0
  684. data/public/themes/geo-bootstrap/swatch/bootstrap-responsive.css +1109 -0
  685. data/public/themes/geo-bootstrap/swatch/bootstrap-responsive.min.css +9 -0
  686. data/public/themes/geo-bootstrap/swatch/bootstrap.css +6462 -0
  687. data/public/themes/geo-bootstrap/swatch/bootstrap.min.css +9 -0
  688. metadata +791 -0
@@ -0,0 +1,100 @@
1
+ define("amber_core/Examples", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals"], function(smalltalk,nil,_st, globals){
2
+ smalltalk.addPackage('Examples');
3
+ smalltalk.packages["Examples"].transport = {"type":"amd","amdNamespace":"amber_core"};
4
+
5
+ smalltalk.addClass('Counter', globals.nil, ['count', 'header'], 'Examples');
6
+ smalltalk.addMethod(
7
+ smalltalk.method({
8
+ selector: "decrease",
9
+ protocol: 'actions',
10
+ fn: function (){
11
+ var self=this;
12
+ return smalltalk.withContext(function($ctx1) {
13
+ self["@count"]=_st(self["@count"]).__minus((1));
14
+ _st(self["@header"])._contents_((function(html){
15
+ return smalltalk.withContext(function($ctx2) {
16
+ return _st(html)._with_(_st(self["@count"])._asString());
17
+ }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
18
+ return self}, function($ctx1) {$ctx1.fill(self,"decrease",{},globals.Counter)})},
19
+ args: [],
20
+ source: "decrease\x0a count := count - 1.\x0a header contents: [:html | html with: count asString]",
21
+ messageSends: ["-", "contents:", "with:", "asString"],
22
+ referencedClasses: []
23
+ }),
24
+ globals.Counter);
25
+
26
+ smalltalk.addMethod(
27
+ smalltalk.method({
28
+ selector: "increase",
29
+ protocol: 'actions',
30
+ fn: function (){
31
+ var self=this;
32
+ return smalltalk.withContext(function($ctx1) {
33
+ self["@count"]=_st(self["@count"]).__plus((1));
34
+ _st(self["@header"])._contents_((function(html){
35
+ return smalltalk.withContext(function($ctx2) {
36
+ return _st(html)._with_(_st(self["@count"])._asString());
37
+ }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
38
+ return self}, function($ctx1) {$ctx1.fill(self,"increase",{},globals.Counter)})},
39
+ args: [],
40
+ source: "increase\x0a count := count + 1.\x0a header contents: [:html | html with: count asString]",
41
+ messageSends: ["+", "contents:", "with:", "asString"],
42
+ referencedClasses: []
43
+ }),
44
+ globals.Counter);
45
+
46
+ smalltalk.addMethod(
47
+ smalltalk.method({
48
+ selector: "initialize",
49
+ protocol: 'initialization',
50
+ fn: function (){
51
+ var self=this;
52
+ return smalltalk.withContext(function($ctx1) {
53
+ self._initialize();
54
+ self["@count"]=(0);
55
+ return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Counter)})},
56
+ args: [],
57
+ source: "initialize\x0a super initialize.\x0a count := 0",
58
+ messageSends: ["initialize"],
59
+ referencedClasses: []
60
+ }),
61
+ globals.Counter);
62
+
63
+ smalltalk.addMethod(
64
+ smalltalk.method({
65
+ selector: "renderOn:",
66
+ protocol: 'rendering',
67
+ fn: function (html){
68
+ var self=this;
69
+ return smalltalk.withContext(function($ctx1) {
70
+ var $1,$2,$3,$4,$5,$6;
71
+ $1=_st(html)._h1();
72
+ _st($1)._with_(_st(self["@count"])._asString());
73
+ $ctx1.sendIdx["with:"]=1;
74
+ $2=_st($1)._yourself();
75
+ self["@header"]=$2;
76
+ $3=_st(html)._button();
77
+ $ctx1.sendIdx["button"]=1;
78
+ _st($3)._with_("++");
79
+ $ctx1.sendIdx["with:"]=2;
80
+ $4=_st($3)._onClick_((function(){
81
+ return smalltalk.withContext(function($ctx2) {
82
+ return self._increase();
83
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
84
+ $ctx1.sendIdx["onClick:"]=1;
85
+ $5=_st(html)._button();
86
+ _st($5)._with_("--");
87
+ $6=_st($5)._onClick_((function(){
88
+ return smalltalk.withContext(function($ctx2) {
89
+ return self._decrease();
90
+ }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
91
+ return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.Counter)})},
92
+ args: ["html"],
93
+ source: "renderOn: html\x0a header := html h1 \x0a\x09with: count asString;\x0a\x09yourself.\x0a html button\x0a\x09with: '++';\x0a\x09onClick: [self increase].\x0a html button\x0a\x09with: '--';\x0a\x09onClick: [self decrease]",
94
+ messageSends: ["with:", "h1", "asString", "yourself", "button", "onClick:", "increase", "decrease"],
95
+ referencedClasses: []
96
+ }),
97
+ globals.Counter);
98
+
99
+
100
+ });
@@ -0,0 +1,38 @@
1
+ Smalltalk current createPackage: 'Examples' properties: #{}!
2
+ Widget subclass: #Counter
3
+ instanceVariableNames: 'count header'
4
+ package: 'Examples'!
5
+
6
+ !Counter methodsFor: 'actions'!
7
+
8
+ decrease
9
+ count := count - 1.
10
+ header contents: [:html | html with: count asString]
11
+ !
12
+
13
+ increase
14
+ count := count + 1.
15
+ header contents: [:html | html with: count asString]
16
+ ! !
17
+
18
+ !Counter methodsFor: 'initialization'!
19
+
20
+ initialize
21
+ super initialize.
22
+ count := 0
23
+ ! !
24
+
25
+ !Counter methodsFor: 'rendering'!
26
+
27
+ renderOn: html
28
+ header := html h1
29
+ with: count asString;
30
+ yourself.
31
+ html button
32
+ with: '++';
33
+ onClick: [self increase].
34
+ html button
35
+ with: '--';
36
+ onClick: [self decrease]
37
+ ! !
38
+
@@ -0,0 +1,2404 @@
1
+ Smalltalk current createPackage: 'IDE' properties: #{}!
2
+ Widget subclass: #ClassesList
3
+ instanceVariableNames: 'browser ul nodes'
4
+ package: 'IDE'!
5
+
6
+ !ClassesList methodsFor: 'accessing'!
7
+
8
+ browser
9
+ ^browser
10
+ !
11
+
12
+ browser: aBrowser
13
+ browser := aBrowser
14
+ !
15
+
16
+ category
17
+ ^self browser selectedPackage
18
+ !
19
+
20
+ getNodes
21
+ | classes children others |
22
+ classes := self browser classes.
23
+ children := #().
24
+ others := #().
25
+ classes do: [:each |
26
+ (classes includes: each superclass)
27
+ ifFalse: [children add: each]
28
+ ifTrue: [others add: each]].
29
+ ^children collect: [:each |
30
+ ClassesListNode on: each browser: self browser classes: others level: 0]
31
+ !
32
+
33
+ nodes
34
+ nodes ifNil: [nodes := self getNodes].
35
+ ^nodes
36
+ !
37
+
38
+ resetNodes
39
+ nodes := nil
40
+ ! !
41
+
42
+ !ClassesList methodsFor: 'rendering'!
43
+
44
+ renderOn: html
45
+ ul := html ul
46
+ class: 'jt_column browser classes';
47
+ yourself.
48
+ self updateNodes
49
+ !
50
+
51
+ updateNodes
52
+ ul contents: [:html |
53
+ self nodes do: [:each |
54
+ each renderOn: html]]
55
+ ! !
56
+
57
+ !ClassesList class methodsFor: 'instance creation'!
58
+
59
+ on: aBrowser
60
+ ^self new
61
+ browser: aBrowser;
62
+ yourself
63
+ ! !
64
+
65
+ Widget subclass: #ClassesListNode
66
+ instanceVariableNames: 'browser theClass level nodes'
67
+ package: 'IDE'!
68
+
69
+ !ClassesListNode methodsFor: ''!
70
+
71
+ renderOn: html
72
+ | li cssClass |
73
+ cssClass := ''.
74
+ li := html li
75
+ onClick: [self browser selectClass: self theClass].
76
+ li asJQuery html: self label.
77
+
78
+ self browser selectedClass = self theClass ifTrue: [
79
+ cssClass := cssClass, ' selected'].
80
+
81
+ self theClass comment isEmpty ifFalse: [
82
+ cssClass := cssClass, ' commented'].
83
+
84
+ li class: cssClass.
85
+
86
+ self nodes do: [:each |
87
+ each renderOn: html]
88
+ ! !
89
+
90
+ !ClassesListNode methodsFor: 'accessing'!
91
+
92
+ browser
93
+ ^browser
94
+ !
95
+
96
+ browser: aBrowser
97
+ browser := aBrowser
98
+ !
99
+
100
+ getNodesFrom: aCollection
101
+ | children others |
102
+ children := #().
103
+ others := #().
104
+ aCollection do: [:each |
105
+ (each superclass = self theClass)
106
+ ifTrue: [children add: each]
107
+ ifFalse: [others add: each]].
108
+ nodes:= children collect: [:each |
109
+ ClassesListNode on: each browser: self browser classes: others level: self level + 1]
110
+ !
111
+
112
+ label
113
+ | str |
114
+ str := String new writeStream.
115
+ self level timesRepeat: [
116
+ str nextPutAll: '    '].
117
+ str nextPutAll: self theClass name.
118
+ ^str contents
119
+ !
120
+
121
+ level
122
+ ^level
123
+ !
124
+
125
+ level: anInteger
126
+ level := anInteger
127
+ !
128
+
129
+ nodes
130
+ ^nodes
131
+ !
132
+
133
+ theClass
134
+ ^theClass
135
+ !
136
+
137
+ theClass: aClass
138
+ theClass := aClass
139
+ ! !
140
+
141
+ !ClassesListNode class methodsFor: 'instance creation'!
142
+
143
+ on: aClass browser: aBrowser classes: aCollection level: anInteger
144
+ ^self new
145
+ theClass: aClass;
146
+ browser: aBrowser;
147
+ level: anInteger;
148
+ getNodesFrom: aCollection;
149
+ yourself
150
+ ! !
151
+
152
+ ErrorHandler subclass: #DebugErrorHandler
153
+ instanceVariableNames: ''
154
+ package: 'IDE'!
155
+
156
+ !DebugErrorHandler methodsFor: 'error handling'!
157
+
158
+ handleError: anError
159
+ [Debugger new
160
+ error: anError;
161
+ open] on: Error do: [:error |
162
+ ErrorHandler new handleError: error]
163
+ ! !
164
+
165
+ !DebugErrorHandler class methodsFor: 'initialization'!
166
+
167
+ initialize
168
+ self register
169
+ ! !
170
+
171
+ Widget subclass: #SourceArea
172
+ instanceVariableNames: 'editor div receiver onDoIt'
173
+ package: 'IDE'!
174
+
175
+ !SourceArea methodsFor: 'accessing'!
176
+
177
+ currentLine
178
+ ^editor getLine: (editor getCursor line)
179
+ !
180
+
181
+ currentLineOrSelection
182
+ ^editor somethingSelected
183
+ ifFalse: [self currentLine]
184
+ ifTrue: [self selection]
185
+ !
186
+
187
+ editor
188
+ ^editor
189
+ !
190
+
191
+ onDoIt
192
+ ^onDoIt
193
+ !
194
+
195
+ onDoIt: aBlock
196
+ onDoIt := aBlock
197
+ !
198
+
199
+ receiver
200
+ ^receiver ifNil: [DoIt new]
201
+ !
202
+
203
+ receiver: anObject
204
+ receiver := anObject
205
+ !
206
+
207
+ selection
208
+ ^editor getSelection
209
+ !
210
+
211
+ selectionEnd
212
+ ^textarea element selectionEnd
213
+ !
214
+
215
+ selectionEnd: anInteger
216
+ textarea element selectionEnd: anInteger
217
+ !
218
+
219
+ selectionStart
220
+ ^textarea element selectionStart
221
+ !
222
+
223
+ selectionStart: anInteger
224
+ textarea element selectionStart: anInteger
225
+ !
226
+
227
+ setEditorOn: aTextarea
228
+ <self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
229
+ theme: 'jtalk',
230
+ lineNumbers: true,
231
+ enterMode: 'flat',
232
+ matchBrackets: true,
233
+ electricChars: false
234
+ })>
235
+ !
236
+
237
+ val
238
+ ^editor getValue
239
+ !
240
+
241
+ val: aString
242
+ editor setValue: aString
243
+ ! !
244
+
245
+ !SourceArea methodsFor: 'actions'!
246
+
247
+ clear
248
+ self val: ''
249
+ !
250
+
251
+ doIt
252
+ | result |
253
+ result := self eval: self currentLineOrSelection.
254
+ self onDoIt ifNotNil: [self onDoIt value].
255
+ ^result
256
+ !
257
+
258
+ eval: aString
259
+ | compiler |
260
+ compiler := Compiler new.
261
+ [compiler parseExpression: aString] on: Error do: [:ex |
262
+ ^window alert: ex messageText].
263
+ ^(compiler load: 'doIt ^[', aString, '] value' forClass: DoIt) fn applyTo: self receiver arguments: #()
264
+ !
265
+
266
+ fileIn
267
+ Importer new import: self currentLineOrSelection readStream
268
+ !
269
+
270
+ handleKeyDown: anEvent
271
+ <if(anEvent.ctrlKey) {
272
+ if(anEvent.keyCode === 80) { //ctrl+p
273
+ self._printIt();
274
+ anEvent.preventDefault();
275
+ return false;
276
+ }
277
+ if(anEvent.keyCode === 68) { //ctrl+d
278
+ self._doIt();
279
+ anEvent.preventDefault();
280
+ return false;
281
+ }
282
+ if(anEvent.keyCode === 73) { //ctrl+i
283
+ self._inspectIt();
284
+ anEvent.preventDefault();
285
+ return false;
286
+ }
287
+ }>
288
+ !
289
+
290
+ inspectIt
291
+ self doIt inspect
292
+ !
293
+
294
+ print: aString
295
+ | start stop |
296
+ start := HashedCollection new.
297
+ stop := HashedCollection new.
298
+ start at: 'line' put: (editor getCursor: false) line.
299
+ start at: 'ch' put: (editor getCursor: false) ch.
300
+ stop at: 'line' put: (start at: 'line').
301
+ stop at: 'ch' put: ((start at: 'ch') + aString size + 2).
302
+ editor replaceSelection: (editor getSelection, ' ', aString, ' ').
303
+ editor setCursor: (editor getCursor: true).
304
+ editor setSelection: stop end: start
305
+ !
306
+
307
+ printIt
308
+ self print: self doIt printString
309
+ ! !
310
+
311
+ !SourceArea methodsFor: 'events'!
312
+
313
+ onKeyDown: aBlock
314
+ div onKeyDown: aBlock
315
+ !
316
+
317
+ onKeyUp: aBlock
318
+ div onKeyUp: aBlock
319
+ ! !
320
+
321
+ !SourceArea methodsFor: 'rendering'!
322
+
323
+ renderOn: html
324
+ | textarea |
325
+ div := html div class: 'source'.
326
+ div with: [textarea := html textarea].
327
+ self setEditorOn: textarea element.
328
+ div onKeyDown: [:e | self handleKeyDown: e]
329
+ ! !
330
+
331
+ Widget subclass: #TabManager
332
+ instanceVariableNames: 'selectedTab tabs opened ul input'
333
+ package: 'IDE'!
334
+
335
+ !TabManager methodsFor: 'accessing'!
336
+
337
+ labelFor: aWidget
338
+ | label maxSize |
339
+ maxSize := 15.
340
+ label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).
341
+ aWidget label size > maxSize ifTrue: [
342
+ label := label, '...'].
343
+ ^label
344
+ !
345
+
346
+ tabs
347
+ ^tabs ifNil: [tabs := Array new]
348
+ ! !
349
+
350
+ !TabManager methodsFor: 'actions'!
351
+
352
+ close
353
+ opened ifTrue: [
354
+ '#jtalk' asJQuery hide.
355
+ ul asJQuery hide.
356
+ selectedTab hide.
357
+ self removeBodyMargin.
358
+ 'body' asJQuery removeClass: 'jtalkBody'.
359
+ opened := false]
360
+ !
361
+
362
+ closeTab: aWidget
363
+ self removeTab: aWidget.
364
+ self selectTab: self tabs last.
365
+ aWidget remove.
366
+ self update
367
+ !
368
+
369
+ newBrowserTab
370
+ Browser open
371
+ !
372
+
373
+ onResize: aBlock
374
+ <jQuery('#jtalk').resizable({
375
+ handles: 'n',
376
+ resize: aBlock,
377
+ minHeight: 230
378
+ })>
379
+ !
380
+
381
+ onWindowResize: aBlock
382
+ <jQuery(window).resize(aBlock)>
383
+ !
384
+
385
+ open
386
+ opened ifFalse: [
387
+ 'body' asJQuery addClass: 'jtalkBody'.
388
+ '#jtalk' asJQuery show.
389
+ ul asJQuery show.
390
+ self updateBodyMargin.
391
+ selectedTab show.
392
+ opened := true]
393
+ !
394
+
395
+ removeBodyMargin
396
+ self setBodyMargin: 0
397
+ !
398
+
399
+ search: aString
400
+ | searchedClass |
401
+ searchedClass := Smalltalk current at: aString.
402
+ searchedClass isClass
403
+ ifTrue: [Browser openOn: searchedClass]
404
+ ifFalse: [ReferencesBrowser search: aString]
405
+ !
406
+
407
+ selectTab: aWidget
408
+ self open.
409
+ selectedTab := aWidget.
410
+ self tabs do: [:each |
411
+ each hide].
412
+ aWidget show.
413
+
414
+ self update
415
+ !
416
+
417
+ setBodyMargin: anInteger
418
+ '.jtalkBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'
419
+ !
420
+
421
+ updateBodyMargin
422
+ self setBodyMargin: '#jtalk' asJQuery height
423
+ !
424
+
425
+ updatePosition
426
+ <jQuery('#jtalk').css('top', '').css('bottom', '0px')>
427
+ ! !
428
+
429
+ !TabManager methodsFor: 'adding/Removing'!
430
+
431
+ addTab: aWidget
432
+ self tabs add: aWidget.
433
+ aWidget appendToJQuery: '#jtalk' asJQuery.
434
+ aWidget hide
435
+ !
436
+
437
+ removeTab: aWidget
438
+ self tabs remove: aWidget.
439
+ self update
440
+ ! !
441
+
442
+ !TabManager methodsFor: 'initialization'!
443
+
444
+ initialize
445
+ super initialize.
446
+ opened := true.
447
+ [:html | html div id: 'jtalk'] appendToJQuery: 'body' asJQuery.
448
+ 'body' asJQuery
449
+ addClass: 'jtalkBody'.
450
+ self appendToJQuery: '#jtalk' asJQuery.
451
+ self
452
+ addTab: IDETranscript current;
453
+ addTab: Workspace new;
454
+ addTab: TestRunner new.
455
+ self selectTab: self tabs last.
456
+ self
457
+ onResize: [self updateBodyMargin; updatePosition];
458
+ onWindowResize: [self updatePosition]
459
+ ! !
460
+
461
+ !TabManager methodsFor: 'rendering'!
462
+
463
+ renderOn: html
464
+ html div id: 'logo'.
465
+ self renderToolbarOn: html.
466
+ ul := html ul
467
+ id: 'jtalkTabs';
468
+ yourself.
469
+ self renderTabs
470
+ !
471
+
472
+ renderTabFor: aWidget on: html
473
+ | li |
474
+ li := html li.
475
+ selectedTab = aWidget ifTrue: [
476
+ li class: 'selected'].
477
+ li with: [
478
+ html span class: 'ltab'.
479
+ html span
480
+ class: 'mtab';
481
+ with: [
482
+ aWidget canBeClosed ifTrue: [
483
+ html span
484
+ class: 'close';
485
+ with: 'x';
486
+ onClick: [self closeTab: aWidget]].
487
+ html span with: (self labelFor: aWidget)].
488
+ html span class: 'rtab'];
489
+ onClick: [self selectTab: aWidget]
490
+ !
491
+
492
+ renderTabs
493
+ ul contents: [:html |
494
+ self tabs do: [:each |
495
+ self renderTabFor: each on: html].
496
+ html li
497
+ class: 'newtab';
498
+ with: [
499
+ html span class: 'ltab'.
500
+ html span class: 'mtab'; with: ' + '.
501
+ html span class: 'rtab'];
502
+ onClick: [self newBrowserTab]]
503
+ !
504
+
505
+ renderToolbarOn: html
506
+ html div
507
+ id: 'jt_toolbar';
508
+ with: [
509
+ input := html input
510
+ class: 'implementors';
511
+ yourself.
512
+ input onKeyPress: [:event |
513
+ event keyCode = 13 ifTrue: [
514
+ self search: input asJQuery val]].
515
+ html div id: 'jt_close'; onClick: [self close]]
516
+ ! !
517
+
518
+ !TabManager methodsFor: 'updating'!
519
+
520
+ update
521
+ self renderTabs
522
+ ! !
523
+
524
+ TabManager class instanceVariableNames: 'current'!
525
+
526
+ !TabManager class methodsFor: 'instance creation'!
527
+
528
+ current
529
+ ^current ifNil: [current := super new]
530
+ !
531
+
532
+ new
533
+ self shouldNotImplement
534
+ ! !
535
+
536
+ Widget subclass: #TabWidget
537
+ instanceVariableNames: 'div'
538
+ package: 'IDE'!
539
+
540
+ !TabWidget methodsFor: 'accessing'!
541
+
542
+ label
543
+ self subclassResponsibility
544
+ ! !
545
+
546
+ !TabWidget methodsFor: 'actions'!
547
+
548
+ close
549
+ TabManager current closeTab: self
550
+ !
551
+
552
+ hide
553
+ div asJQuery hide
554
+ !
555
+
556
+ open
557
+ TabManager current addTab: self.
558
+ TabManager current selectTab: self
559
+ !
560
+
561
+ remove
562
+ div asJQuery remove
563
+ !
564
+
565
+ show
566
+ div asJQuery show
567
+ ! !
568
+
569
+ !TabWidget methodsFor: 'rendering'!
570
+
571
+ renderBoxOn: html
572
+ !
573
+
574
+ renderButtonsOn: html
575
+ !
576
+
577
+ renderOn: html
578
+ div := html div
579
+ class: 'jtalkTool';
580
+ yourself.
581
+ self renderTab
582
+ !
583
+
584
+ renderTab
585
+ div contents: [:html |
586
+ html div
587
+ class: 'jt_box';
588
+ with: [self renderBoxOn: html].
589
+ html div
590
+ class: 'jt_buttons';
591
+ with: [self renderButtonsOn: html]]
592
+ !
593
+
594
+ update
595
+ self renderTab
596
+ ! !
597
+
598
+ !TabWidget methodsFor: 'testing'!
599
+
600
+ canBeClosed
601
+ ^false
602
+ ! !
603
+
604
+ !TabWidget class methodsFor: 'instance creation'!
605
+
606
+ open
607
+ ^self new open
608
+ ! !
609
+
610
+ TabWidget subclass: #Browser
611
+ instanceVariableNames: 'selectedPackage selectedClass selectedProtocol selectedMethod packagesList classesList protocolsList methodsList sourceArea tabsList selectedTab saveButton classButtons methodButtons unsavedChanges'
612
+ package: 'IDE'!
613
+
614
+ !Browser methodsFor: 'accessing'!
615
+
616
+ classCommentSource
617
+ ^selectedClass comment
618
+ !
619
+
620
+ classDeclarationSource
621
+ | stream |
622
+ stream := '' writeStream.
623
+ selectedClass ifNil: [^self classDeclarationTemplate].
624
+ stream
625
+ nextPutAll: selectedClass superclass asString;
626
+ nextPutAll: ' subclass: #';
627
+ nextPutAll: selectedClass name;
628
+ nextPutAll: String lf, String tab;
629
+ nextPutAll: 'instanceVariableNames: '''.
630
+ selectedClass instanceVariableNames
631
+ do: [:each | stream nextPutAll: each]
632
+ separatedBy: [stream nextPutAll: ' '].
633
+ stream
634
+ nextPutAll: '''', String lf, String tab;
635
+ nextPutAll: 'package: ''';
636
+ nextPutAll: selectedClass category;
637
+ nextPutAll: ''''.
638
+ ^stream contents
639
+ !
640
+
641
+ classDeclarationTemplate
642
+ ^'Object subclass: #NameOfSubclass
643
+ instanceVariableNames: ''''
644
+ package: ''', self selectedPackage, ''''
645
+ !
646
+
647
+ classes
648
+ ^((Smalltalk current classes
649
+ select: [:each | each category = selectedPackage])
650
+ sort: [:a :b | a name < b name]) asSet
651
+ !
652
+
653
+ declarationSource
654
+ ^selectedTab = #instance
655
+ ifTrue: [self classDeclarationSource]
656
+ ifFalse: [self metaclassDeclarationSource]
657
+ !
658
+
659
+ dummyMethodSource
660
+ ^'messageSelectorAndArgumentNames
661
+ "comment stating purpose of message"
662
+
663
+ | temporary variable names |
664
+ statements'
665
+ !
666
+
667
+ label
668
+ ^selectedClass
669
+ ifNil: ['Browser (nil)']
670
+ ifNotNil: ['Browser: ', selectedClass name]
671
+ !
672
+
673
+ metaclassDeclarationSource
674
+ | stream |
675
+ stream := '' writeStream.
676
+ selectedClass ifNotNil: [
677
+ stream
678
+ nextPutAll: selectedClass asString;
679
+ nextPutAll: ' class ';
680
+ nextPutAll: 'instanceVariableNames: '''.
681
+ selectedClass class instanceVariableNames
682
+ do: [:each | stream nextPutAll: each]
683
+ separatedBy: [stream nextPutAll: ' '].
684
+ stream nextPutAll: ''''].
685
+ ^stream contents
686
+ !
687
+
688
+ methodSource
689
+ ^selectedMethod
690
+ ifNil: [self dummyMethodSource]
691
+ ifNotNil: [selectedMethod source]
692
+ !
693
+
694
+ methods
695
+ | klass |
696
+ selectedTab = #comment ifTrue: [^#()].
697
+ selectedClass ifNotNil: [
698
+ klass := selectedTab = #instance
699
+ ifTrue: [selectedClass]
700
+ ifFalse: [selectedClass class]].
701
+ ^(selectedProtocol
702
+ ifNil: [
703
+ klass
704
+ ifNil: [#()]
705
+ ifNotNil: [klass methodDictionary values]]
706
+ ifNotNil: [
707
+ klass methodDictionary values select: [:each |
708
+ each category = selectedProtocol]]) sort: [:a :b | a selector < b selector]
709
+ !
710
+
711
+ packages
712
+ | packages |
713
+ packages := Array new.
714
+ Smalltalk current classes do: [:each |
715
+ (packages includes: each category) ifFalse: [
716
+ packages add: each category]].
717
+ ^packages sort
718
+ !
719
+
720
+ protocols
721
+ | klass |
722
+ selectedClass ifNotNil: [
723
+ selectedTab = #comment ifTrue: [^#()].
724
+ klass := selectedTab = #instance
725
+ ifTrue: [selectedClass]
726
+ ifFalse: [selectedClass class].
727
+ klass methodDictionary isEmpty ifTrue: [
728
+ ^Array with: 'not yet classified'].
729
+ ^klass protocols].
730
+ ^Array new
731
+ !
732
+
733
+ selectedClass
734
+ ^selectedClass
735
+ !
736
+
737
+ selectedPackage
738
+ ^selectedPackage
739
+ !
740
+
741
+ source
742
+ selectedTab = #comment ifFalse: [
743
+ ^(selectedProtocol notNil or: [selectedMethod notNil])
744
+ ifFalse: [self declarationSource]
745
+ ifTrue: [self methodSource]].
746
+ ^selectedClass
747
+ ifNil: ['']
748
+ ifNotNil: [self classCommentSource]
749
+ ! !
750
+
751
+ !Browser methodsFor: 'actions'!
752
+
753
+ addInstanceVariableNamed: aString toClass: aClass
754
+ ClassBuilder new
755
+ addSubclassOf: aClass superclass
756
+ named: aClass name
757
+ instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)
758
+ package: aClass package name
759
+ !
760
+
761
+ addNewClass
762
+ | className |
763
+ className := window prompt: 'New class'.
764
+ (className notNil and: [className notEmpty]) ifTrue: [
765
+ Object subclass: className instanceVariableNames: '' package: self selectedPackage.
766
+ self
767
+ resetClassesList;
768
+ updateClassesList.
769
+ self selectClass: (Smalltalk current at: className)]
770
+ !
771
+
772
+ addNewProtocol
773
+ | newProtocol |
774
+ newProtocol := window prompt: 'New method protocol'.
775
+ (newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [
776
+ selectedMethod category: newProtocol.
777
+ self setMethodProtocol: newProtocol]
778
+ !
779
+
780
+ cancelChanges
781
+ ^unsavedChanges
782
+ ifTrue: [window confirm: 'Cancel changes?']
783
+ ifFalse: [true]
784
+ !
785
+
786
+ commitPackage
787
+ selectedPackage ifNotNil: [ |package|
788
+ package := Package named: selectedPackage.
789
+ { Exporter -> (package commitPathJs, '/', selectedPackage, '.js').
790
+ StrippedExporter -> (package commitPathJs, '/', selectedPackage, '.deploy.js').
791
+ ChunkExporter -> (package commitPathSt, '/', selectedPackage, '.st') }
792
+
793
+ do: [:commitStrategy| |fileContents|
794
+ fileContents := (commitStrategy key new exportPackage: selectedPackage).
795
+ self ajaxPutAt: commitStrategy value data: fileContents]
796
+ ]
797
+ !
798
+
799
+ compile
800
+ self disableSaveButton.
801
+ selectedTab = #comment
802
+ ifTrue: [
803
+ selectedClass ifNotNil: [
804
+ self compileClassComment]]
805
+ ifFalse: [
806
+ (selectedProtocol notNil or: [selectedMethod notNil])
807
+ ifFalse: [self compileDefinition]
808
+ ifTrue: [self compileMethodDefinition]]
809
+ !
810
+
811
+ compileClassComment
812
+ selectedClass comment: sourceArea val
813
+ !
814
+
815
+ compileDefinition
816
+ | newClass |
817
+ newClass := Compiler new loadExpression: sourceArea val.
818
+ self
819
+ resetClassesList;
820
+ updateCategoriesList;
821
+ updateClassesList.
822
+ self selectClass: newClass
823
+ !
824
+
825
+ compileMethodDefinition
826
+ selectedTab = #instance
827
+ ifTrue: [self compileMethodDefinitionFor: selectedClass]
828
+ ifFalse: [self compileMethodDefinitionFor: selectedClass class]
829
+ !
830
+
831
+ compileMethodDefinitionFor: aClass
832
+ | compiler method source node |
833
+ source := sourceArea val.
834
+ selectedProtocol ifNil: [selectedProtocol := selectedMethod category].
835
+ compiler := Compiler new.
836
+ compiler source: source.
837
+ node := compiler parse: source.
838
+ node isParseFailure ifTrue: [
839
+ ^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].
840
+ compiler currentClass: aClass.
841
+ method := compiler eval: (compiler compileNode: node).
842
+ method category: selectedProtocol.
843
+ compiler unknownVariables do: [:each |
844
+ "Do not try to redeclare javascript's objects"
845
+ (window at: each) ifNil: [
846
+ (window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [
847
+ self addInstanceVariableNamed: each toClass: aClass.
848
+ ^self compileMethodDefinitionFor: aClass]]].
849
+ aClass addCompiledMethod: method.
850
+ compiler setupClass: aClass.
851
+ self updateMethodsList.
852
+ self selectMethod: method
853
+ !
854
+
855
+ copyClass
856
+ | className |
857
+ className := window prompt: 'Copy class'.
858
+ (className notNil and: [className notEmpty]) ifTrue: [
859
+ ClassBuilder new copyClass: self selectedClass named: className.
860
+ self
861
+ resetClassesList;
862
+ updateClassesList.
863
+ self selectClass: (Smalltalk current at: className)]
864
+ !
865
+
866
+ disableSaveButton
867
+ saveButton ifNotNil: [
868
+ saveButton at: 'disabled' put: true].
869
+ unsavedChanges := false
870
+ !
871
+
872
+ handleSourceAreaKeyDown: anEvent
873
+ <if(anEvent.ctrlKey) {
874
+ if(anEvent.keyCode === 83) { //ctrl+s
875
+ self._compile();
876
+ anEvent.preventDefault();
877
+ return false;
878
+ }
879
+ }
880
+ >
881
+ !
882
+
883
+ hideClassButtons
884
+ classButtons asJQuery hide
885
+ !
886
+
887
+ hideMethodButtons
888
+ methodButtons asJQuery hide
889
+ !
890
+
891
+ removeClass
892
+ (window confirm: 'Do you really want to remove ', selectedClass name, '?')
893
+ ifTrue: [
894
+ Smalltalk current removeClass: selectedClass.
895
+ self resetClassesList.
896
+ self selectClass: nil]
897
+ !
898
+
899
+ removeMethod
900
+ self cancelChanges ifTrue: [
901
+ (window confirm: 'Do you really want to remove #', selectedMethod selector, '?')
902
+ ifTrue: [
903
+ selectedTab = #instance
904
+ ifTrue: [selectedClass removeCompiledMethod: selectedMethod]
905
+ ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].
906
+ self selectMethod: nil]]
907
+ !
908
+
909
+ removePackage
910
+
911
+ (window confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')
912
+ ifTrue: [
913
+ Smalltalk current removePackage: selectedPackage.
914
+ self updateCategoriesList]
915
+ !
916
+
917
+ renameClass
918
+ | newName |
919
+ newName := window prompt: 'Rename class ', selectedClass name.
920
+ (newName notNil and: [newName notEmpty]) ifTrue: [
921
+ selectedClass rename: newName.
922
+ self
923
+ updateClassesList;
924
+ updateSourceAndButtons]
925
+ !
926
+
927
+ renamePackage
928
+
929
+ | newName |
930
+ newName := window prompt: 'Rename package ', selectedPackage.
931
+ newName ifNotNil: [
932
+ newName notEmpty ifTrue: [
933
+ Smalltalk current renamePackage: selectedPackage to: newName.
934
+ self updateCategoriesList]]
935
+ !
936
+
937
+ search: aString
938
+ self cancelChanges ifTrue: [| searchedClass |
939
+ searchedClass := Smalltalk current at: aString.
940
+ searchedClass isClass
941
+ ifTrue: [self class openOn: searchedClass]
942
+ ifFalse: [self searchReferencesOf: aString]]
943
+ !
944
+
945
+ searchClassReferences
946
+ ReferencesBrowser search: selectedClass name
947
+ !
948
+
949
+ searchReferencesOf: aString
950
+ ReferencesBrowser search: aString
951
+ !
952
+
953
+ selectCategory: aCategory
954
+ self cancelChanges ifTrue: [
955
+ selectedPackage := aCategory.
956
+ selectedClass := selectedProtocol := selectedMethod := nil.
957
+ self resetClassesList.
958
+ self
959
+ updateCategoriesList;
960
+ updateClassesList;
961
+ updateProtocolsList;
962
+ updateMethodsList;
963
+ updateSourceAndButtons]
964
+ !
965
+
966
+ selectClass: aClass
967
+ self cancelChanges ifTrue: [
968
+ selectedClass := aClass.
969
+ selectedProtocol := selectedMethod := nil.
970
+ self
971
+ updateClassesList;
972
+ updateProtocolsList;
973
+ updateMethodsList;
974
+ updateSourceAndButtons]
975
+ !
976
+
977
+ selectMethod: aMethod
978
+ self cancelChanges ifTrue: [
979
+ selectedMethod := aMethod.
980
+ self
981
+ updateProtocolsList;
982
+ updateMethodsList;
983
+ updateSourceAndButtons]
984
+ !
985
+
986
+ selectProtocol: aString
987
+ self cancelChanges ifTrue: [
988
+ selectedProtocol := aString.
989
+ selectedMethod := nil.
990
+ self
991
+ updateProtocolsList;
992
+ updateMethodsList;
993
+ updateSourceAndButtons]
994
+ !
995
+
996
+ selectTab: aString
997
+ self cancelChanges ifTrue: [
998
+ selectedTab := aString.
999
+ self selectProtocol: nil.
1000
+ self updateTabsList]
1001
+ !
1002
+
1003
+ setMethodProtocol: aString
1004
+ self cancelChanges ifTrue: [
1005
+ (self protocols includes: aString)
1006
+ ifFalse: [self addNewProtocol]
1007
+ ifTrue: [
1008
+ selectedMethod category: aString.
1009
+ selectedProtocol := aString.
1010
+ selectedMethod := selectedMethod.
1011
+ self
1012
+ updateProtocolsList;
1013
+ updateMethodsList;
1014
+ updateSourceAndButtons]]
1015
+ !
1016
+
1017
+ showClassButtons
1018
+ classButtons asJQuery show
1019
+ !
1020
+
1021
+ showMethodButtons
1022
+ methodButtons asJQuery show
1023
+ ! !
1024
+
1025
+ !Browser methodsFor: 'initialization'!
1026
+
1027
+ initialize
1028
+ super initialize.
1029
+ selectedTab := #instance.
1030
+ selectedPackage := self packages first.
1031
+ unsavedChanges := false
1032
+ ! !
1033
+
1034
+ !Browser methodsFor: 'network'!
1035
+
1036
+ ajaxPutAt: anURL data: aString
1037
+ jQuery
1038
+ ajax: anURL options: #{ 'type' -> 'PUT'.
1039
+ 'data' -> aString.
1040
+ 'contentType' -> 'text/plain;charset=UTF-8'.
1041
+ 'error' -> [window alert: 'PUT request failed at: ', anURL] }
1042
+ ! !
1043
+
1044
+ !Browser methodsFor: 'rendering'!
1045
+
1046
+ renderBottomPanelOn: html
1047
+ html div
1048
+ class: 'jt_sourceCode';
1049
+ with: [
1050
+ sourceArea := SourceArea new.
1051
+ sourceArea renderOn: html.
1052
+ sourceArea onKeyDown: [:e |
1053
+ self handleSourceAreaKeyDown: e].
1054
+ sourceArea onKeyUp: [self updateStatus]]
1055
+ !
1056
+
1057
+ renderBoxOn: html
1058
+ self
1059
+ renderTopPanelOn: html;
1060
+ renderTabsOn: html;
1061
+ renderBottomPanelOn: html
1062
+ !
1063
+
1064
+ renderButtonsOn: html
1065
+ saveButton := html button.
1066
+ saveButton
1067
+ with: 'Save';
1068
+ onClick: [self compile].
1069
+ methodButtons := html span.
1070
+ classButtons := html span.
1071
+ html div
1072
+ class: 'right';
1073
+ with: [
1074
+ html button
1075
+ with: 'DoIt';
1076
+ onClick: [sourceArea doIt].
1077
+ html button
1078
+ with: 'PrintIt';
1079
+ onClick: [sourceArea printIt].
1080
+ html button with: 'InspectIt';
1081
+ onClick: [sourceArea inspectIt]].
1082
+ self updateSourceAndButtons
1083
+ !
1084
+
1085
+ renderTabsOn: html
1086
+ tabsList := html ul class: 'jt_tabs jt_browser'.
1087
+ self updateTabsList.
1088
+ !
1089
+
1090
+ renderTopPanelOn: html
1091
+ html div
1092
+ class: 'top';
1093
+ with: [
1094
+ packagesList := html ul class: 'jt_column browser packages'.
1095
+ html div class: 'jt_packagesButtons'; with: [
1096
+ html button
1097
+ title: 'Commit classes in this package to disk';
1098
+ onClick: [self commitPackage];
1099
+ with: 'Commit'.
1100
+ html button
1101
+ title: 'Rename package';
1102
+ onClick: [self renamePackage];
1103
+ with: 'Rename'.
1104
+ html button
1105
+ title: 'Remove this package from the system';
1106
+ onClick: [self removePackage];
1107
+ with: 'Remove'].
1108
+ classesList := ClassesList on: self.
1109
+ classesList renderOn: html.
1110
+ protocolsList := html ul class: 'jt_column browser protocols'.
1111
+ methodsList := html ul class: 'jt_column browser methods'.
1112
+ self
1113
+ updateCategoriesList;
1114
+ updateClassesList;
1115
+ updateProtocolsList;
1116
+ updateMethodsList.
1117
+ html div class: 'jt_clear']
1118
+ ! !
1119
+
1120
+ !Browser methodsFor: 'testing'!
1121
+
1122
+ canBeClosed
1123
+ ^true
1124
+ ! !
1125
+
1126
+ !Browser methodsFor: 'updating'!
1127
+
1128
+ resetClassesList
1129
+ classesList resetNodes
1130
+ !
1131
+
1132
+ updateCategoriesList
1133
+ packagesList contents: [:html |
1134
+ self packages do: [:each || li label |
1135
+ each isEmpty
1136
+ ifTrue: [label := 'Unclassified']
1137
+ ifFalse: [label := each].
1138
+ li := html li.
1139
+ selectedPackage = each ifTrue: [
1140
+ li class: 'selected'].
1141
+ li
1142
+ with: label;
1143
+ onClick: [self selectCategory: each]]]
1144
+ !
1145
+
1146
+ updateClassesList
1147
+ TabManager current update.
1148
+ classesList updateNodes
1149
+ !
1150
+
1151
+ updateMethodsList
1152
+ methodsList contents: [:html |
1153
+ self methods do: [:each || li |
1154
+ li := html li.
1155
+ selectedMethod = each ifTrue: [
1156
+ li class: 'selected'].
1157
+ li
1158
+ with: each selector;
1159
+ onClick: [self selectMethod: each]]]
1160
+ !
1161
+
1162
+ updateProtocolsList
1163
+ protocolsList contents: [:html |
1164
+ self protocols do: [:each || li |
1165
+ li := html li.
1166
+ selectedProtocol = each ifTrue: [
1167
+ li class: 'selected'].
1168
+ li
1169
+ with: each;
1170
+ onClick: [self selectProtocol: each]]]
1171
+ !
1172
+
1173
+ updateSourceAndButtons
1174
+ self disableSaveButton.
1175
+ classButtons contents: [:html |
1176
+ html button
1177
+ title: 'Create a new class';
1178
+ onClick: [self addNewClass];
1179
+ with: 'New class'.
1180
+ html button
1181
+ with: 'Rename class';
1182
+ onClick: [self renameClass].
1183
+ html button
1184
+ with: 'Copy class';
1185
+ onClick: [self copyClass].
1186
+ html button
1187
+ with: 'Remove class';
1188
+ onClick: [self removeClass].
1189
+ html button
1190
+ with: 'References';
1191
+ onClick: [self searchClassReferences]].
1192
+ methodButtons contents: [:html | | protocolSelect referencesSelect |
1193
+ html button
1194
+ with: 'Remove method';
1195
+ onClick: [self removeMethod].
1196
+ protocolSelect := html select.
1197
+ protocolSelect
1198
+ onChange: [ self setMethodProtocol: protocolSelect asJQuery val];
1199
+ with: [
1200
+ html option
1201
+ with: 'Method protocol';
1202
+ at: 'disabled' put: 'disabled'.
1203
+ html option
1204
+ class: 'important';
1205
+ with: 'New...'.
1206
+ self protocols do: [:each |
1207
+ option := html option with: each.
1208
+ selectedProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ]].
1209
+ selectedMethod isNil ifFalse: [
1210
+ referencesSelect := html select.
1211
+ referencesSelect
1212
+ onChange: [self searchReferencesOf: referencesSelect asJQuery val];
1213
+ with: [ |option|
1214
+ html option
1215
+ with: 'References';
1216
+ at: 'disabled' put: 'disabled'.
1217
+ html option
1218
+ class: 'important';
1219
+ with: selectedMethod selector.
1220
+ selectedMethod messageSends sorted do: [:each |
1221
+ html option with: each]]]].
1222
+ selectedMethod isNil
1223
+ ifTrue: [
1224
+ self hideMethodButtons.
1225
+ (selectedClass isNil or: [selectedProtocol notNil])
1226
+ ifTrue: [self hideClassButtons]
1227
+ ifFalse: [self showClassButtons]]
1228
+ ifFalse: [
1229
+ self hideClassButtons.
1230
+ self showMethodButtons].
1231
+ sourceArea val: self source
1232
+ !
1233
+
1234
+ updateStatus
1235
+ sourceArea val = self source
1236
+ ifTrue: [
1237
+ saveButton ifNotNil: [
1238
+ saveButton at: 'disabled' put: true].
1239
+ unsavedChanges := false]
1240
+ ifFalse: [
1241
+ saveButton ifNotNil: [
1242
+ saveButton removeAt: 'disabled'].
1243
+ unsavedChanges := true]
1244
+ !
1245
+
1246
+ updateTabsList
1247
+ tabsList contents: [:html || li |
1248
+ li := html li.
1249
+ selectedTab = #instance ifTrue: [li class: 'selected'].
1250
+ li
1251
+ with: [
1252
+ html span class: 'ltab'.
1253
+ html span class: 'mtab'; with: 'Instance'.
1254
+ html span class: 'rtab'];
1255
+ onClick: [self selectTab: #instance].
1256
+ li := html li.
1257
+ selectedTab = #class ifTrue: [li class: 'selected'].
1258
+ li
1259
+ with: [
1260
+ html span class: 'ltab'.
1261
+ html span class: 'mtab'; with: 'Class'.
1262
+ html span class: 'rtab'];
1263
+ onClick: [self selectTab: #class].
1264
+ li := html li.
1265
+ selectedTab = #comment ifTrue: [li class: 'selected'].
1266
+ li
1267
+ with: [
1268
+ html span class: 'ltab'.
1269
+ html span class: 'mtab'; with: 'Comment'.
1270
+ html span class: 'rtab'];
1271
+ onClick: [self selectTab: #comment]]
1272
+ ! !
1273
+
1274
+ !Browser class methodsFor: 'accessing'!
1275
+
1276
+ commitPathJs
1277
+ ^'js'
1278
+ !
1279
+
1280
+ commitPathSt
1281
+ ^'st'
1282
+ ! !
1283
+
1284
+ !Browser class methodsFor: 'convenience'!
1285
+
1286
+ open
1287
+ self new open
1288
+ !
1289
+
1290
+ openOn: aClass
1291
+ ^self new
1292
+ open;
1293
+ selectCategory: aClass category;
1294
+ selectClass: aClass
1295
+ ! !
1296
+
1297
+ TabWidget subclass: #Debugger
1298
+ instanceVariableNames: 'error selectedContext sourceArea ul ul2 inspector saveButton unsavedChanges selectedVariable selectedVariableName inspectButton'
1299
+ package: 'IDE'!
1300
+
1301
+ !Debugger methodsFor: 'accessing'!
1302
+
1303
+ arguments
1304
+ ^self method
1305
+ ifNil: [selectedContext temps collect: [:each | nil]]
1306
+ ifNotNil: [self method arguments]
1307
+ !
1308
+
1309
+ error
1310
+ ^error
1311
+ !
1312
+
1313
+ error: anError
1314
+ error := anError
1315
+ !
1316
+
1317
+ label
1318
+ ^'[Debugger]'
1319
+ !
1320
+
1321
+ method
1322
+ ^selectedContext receiver class methodAt: selectedContext selector
1323
+ !
1324
+
1325
+ receiver
1326
+ ^selectedContext receiver
1327
+ !
1328
+
1329
+ source
1330
+ ^self method
1331
+ ifNil: ['Method doesn''t exist!!']
1332
+ ifNotNil: [self method source]
1333
+ ! !
1334
+
1335
+ !Debugger methodsFor: 'actions'!
1336
+
1337
+ inspectSelectedVariable
1338
+ selectedVariable inspect
1339
+ !
1340
+
1341
+ proceed
1342
+ self close.
1343
+ selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps
1344
+ !
1345
+
1346
+ save
1347
+ | protocol |
1348
+ protocol := (selectedContext receiver class methodDictionary at: selectedContext selector) category.
1349
+ selectedContext receiver class compile: sourceArea val category: protocol.
1350
+ self updateStatus
1351
+ !
1352
+
1353
+ selectContext: aContext
1354
+ selectedContext := aContext.
1355
+ selectedVariable := nil.
1356
+ selectedVariableName := nil.
1357
+ self
1358
+ updateContextsList;
1359
+ updateSourceArea;
1360
+ updateInspector;
1361
+ updateVariablesList;
1362
+ updateStatus
1363
+ !
1364
+
1365
+ selectVariable: anObject named: aString
1366
+ selectedVariable := anObject.
1367
+ selectedVariableName := aString.
1368
+ inspector contents: [:html | html with: anObject printString].
1369
+ self updateVariablesList
1370
+ ! !
1371
+
1372
+ !Debugger methodsFor: 'initialization'!
1373
+
1374
+ initialize
1375
+ super initialize.
1376
+ unsavedChanges = false
1377
+ ! !
1378
+
1379
+ !Debugger methodsFor: 'rendering'!
1380
+
1381
+ renderBottomPanelOn: html
1382
+ html div
1383
+ class: 'jt_sourceCode debugger';
1384
+ with: [
1385
+ sourceArea := SourceArea new.
1386
+ sourceArea renderOn: html].
1387
+ ul2 := html ul class: 'jt_column debugger variables'.
1388
+ inspector := html div class: 'jt_column debugger inspector'.
1389
+ sourceArea
1390
+ onKeyUp: [self updateStatus]
1391
+ !
1392
+
1393
+ renderBoxOn: html
1394
+ self
1395
+ renderTopPanelOn: html;
1396
+ renderBottomPanelOn: html
1397
+ !
1398
+
1399
+ renderButtonsOn: html
1400
+ saveButton := html button
1401
+ with: 'Save';
1402
+ onClick: [self save].
1403
+ html button
1404
+ with: 'DoIt';
1405
+ onClick: [sourceArea doIt].
1406
+ html button
1407
+ with: 'PrintIt';
1408
+ onClick: [sourceArea printIt].
1409
+ html button
1410
+ with: 'InspectIt';
1411
+ onClick: [sourceArea inspectIt].
1412
+ html button
1413
+ with: 'Proceed';
1414
+ onClick: [self proceed].
1415
+ html button
1416
+ with: 'Abandon';
1417
+ onClick: [self close].
1418
+ inspectButton := html button
1419
+ class: 'jt_button debugger inspect';
1420
+ with: 'Inspect';
1421
+ onClick: [self inspectSelectedVariable].
1422
+ self
1423
+ updateSourceArea;
1424
+ updateStatus;
1425
+ updateVariablesList;
1426
+ updateInspector
1427
+ !
1428
+
1429
+ renderContext: aContext on: html
1430
+ | li |
1431
+ li := html li.
1432
+ selectedContext = aContext ifTrue: [
1433
+ li class: 'selected'].
1434
+ li
1435
+ with: aContext asString;
1436
+ onClick: [self selectContext: aContext].
1437
+ aContext home ifNotNil: [self renderContext: aContext home on: html]
1438
+ !
1439
+
1440
+ renderTopPanelOn: html
1441
+ selectedContext := self error context.
1442
+ html div
1443
+ class: 'top';
1444
+ with: [
1445
+ html div
1446
+ class: 'label';
1447
+ with: self error messageText.
1448
+ ul := html ul
1449
+ class: 'jt_column debugger contexts';
1450
+ with: [self renderContext: self error context on: html]]
1451
+ ! !
1452
+
1453
+ !Debugger methodsFor: 'testing'!
1454
+
1455
+ canBeClosed
1456
+ ^true
1457
+ ! !
1458
+
1459
+ !Debugger methodsFor: 'updating'!
1460
+
1461
+ updateContextsList
1462
+ ul contents: [:html |
1463
+ self renderContext: self error context on: html]
1464
+ !
1465
+
1466
+ updateInspector
1467
+ inspector contents: [:html |]
1468
+ !
1469
+
1470
+ updateSourceArea
1471
+ sourceArea val: self source
1472
+ !
1473
+
1474
+ updateStatus
1475
+ sourceArea val = self source
1476
+ ifTrue: [
1477
+ saveButton ifNotNil: [
1478
+ saveButton at: 'disabled' put: true].
1479
+ unsavedChanges := false]
1480
+ ifFalse: [
1481
+ saveButton ifNotNil: [
1482
+ saveButton removeAt: 'disabled'].
1483
+ unsavedChanges := true]
1484
+ !
1485
+
1486
+ updateVariablesList
1487
+ ul2 contents: [:html | | li |
1488
+ li := html li
1489
+ with: 'self';
1490
+ onClick: [self selectVariable: self receiver named: 'self'].
1491
+ selectedVariableName = 'self' ifTrue: [
1492
+ li class: 'selected'].
1493
+ self arguments withIndexDo: [:each :index | | param |
1494
+ param := selectedContext temps at: index.
1495
+ li := html li
1496
+ with: each;
1497
+ onClick: [self selectVariable: param named: each].
1498
+ selectedVariableName = each ifTrue: [
1499
+ li class: 'selected']].
1500
+ self receiver class allInstanceVariableNames do: [:each | | ivar |
1501
+ ivar := self receiver instVarAt: each.
1502
+ li := html li
1503
+ with: each;
1504
+ onClick: [self selectVariable: ivar named: each].
1505
+ selectedVariableName = each ifTrue: [
1506
+ li class: 'selected']]].
1507
+ selectedVariable ifNil: [inspectButton at: 'disabled' put: true] ifNotNil: [inspectButton removeAt: 'disabled']
1508
+ ! !
1509
+
1510
+ TabWidget subclass: #IDETranscript
1511
+ instanceVariableNames: 'textarea'
1512
+ package: 'IDE'!
1513
+
1514
+ !IDETranscript methodsFor: 'accessing'!
1515
+
1516
+ label
1517
+ ^'Transcript'
1518
+ ! !
1519
+
1520
+ !IDETranscript methodsFor: 'actions'!
1521
+
1522
+ clear
1523
+ textarea asJQuery val: ''
1524
+ !
1525
+
1526
+ cr
1527
+ textarea asJQuery val: textarea asJQuery val, String cr.
1528
+ !
1529
+
1530
+ open
1531
+ TabManager current
1532
+ open;
1533
+ selectTab: self
1534
+ !
1535
+
1536
+ show: anObject
1537
+ textarea ifNil: [self open].
1538
+ textarea asJQuery val: textarea asJQuery val, anObject asString.
1539
+ ! !
1540
+
1541
+ !IDETranscript methodsFor: 'rendering'!
1542
+
1543
+ renderBoxOn: html
1544
+ textarea := html textarea.
1545
+ textarea
1546
+ class: 'jt_transcript';
1547
+ at: 'spellcheck' put: 'false'
1548
+ !
1549
+
1550
+ renderButtonsOn: html
1551
+ html button
1552
+ with: 'Clear transcript';
1553
+ onClick: [self clear]
1554
+ ! !
1555
+
1556
+ IDETranscript class instanceVariableNames: 'current'!
1557
+
1558
+ !IDETranscript class methodsFor: 'initialization'!
1559
+
1560
+ initialize
1561
+ Transcript register: self current
1562
+ ! !
1563
+
1564
+ !IDETranscript class methodsFor: 'instance creation'!
1565
+
1566
+ current
1567
+ ^current ifNil: [current := super new]
1568
+ !
1569
+
1570
+ new
1571
+ self shouldNotImplement
1572
+ !
1573
+
1574
+ open
1575
+ TabManager current
1576
+ open;
1577
+ selectTab: self current
1578
+ ! !
1579
+
1580
+ TabWidget subclass: #Inspector
1581
+ instanceVariableNames: 'label variables object selectedVariable variablesList valueTextarea diveButton sourceArea'
1582
+ package: 'IDE'!
1583
+
1584
+ !Inspector methodsFor: 'accessing'!
1585
+
1586
+ label
1587
+ ^label ifNil: ['Inspector (nil)']
1588
+ !
1589
+
1590
+ selectedVariable
1591
+ ^selectedVariable
1592
+ !
1593
+
1594
+ selectedVariable: aString
1595
+ selectedVariable := aString
1596
+ !
1597
+
1598
+ setLabel: aString
1599
+ label := aString
1600
+ !
1601
+
1602
+ setVariables: aCollection
1603
+ variables := aCollection
1604
+ !
1605
+
1606
+ sourceArea
1607
+ ^sourceArea
1608
+ !
1609
+
1610
+ variables
1611
+ ^variables
1612
+ ! !
1613
+
1614
+ !Inspector methodsFor: 'actions'!
1615
+
1616
+ dive
1617
+ (self variables at: self selectedVariable) inspect
1618
+ !
1619
+
1620
+ inspect: anObject
1621
+ object := anObject.
1622
+ variables := #().
1623
+ object inspectOn: self
1624
+ !
1625
+
1626
+ refresh
1627
+ self
1628
+ inspect: object;
1629
+ updateVariablesList;
1630
+ updateValueTextarea
1631
+ ! !
1632
+
1633
+ !Inspector methodsFor: 'rendering'!
1634
+
1635
+ renderBottomPanelOn: html
1636
+ html div
1637
+ class: 'jt_sourceCode';
1638
+ with: [
1639
+ sourceArea := SourceArea new
1640
+ receiver: object;
1641
+ onDoIt: [self refresh];
1642
+ yourself.
1643
+ sourceArea renderOn: html]
1644
+ !
1645
+
1646
+ renderBoxOn: html
1647
+ self
1648
+ renderTopPanelOn: html;
1649
+ renderBottomPanelOn: html
1650
+ !
1651
+
1652
+ renderButtonsOn: html
1653
+ html button
1654
+ with: 'DoIt';
1655
+ onClick: [self sourceArea doIt].
1656
+ html button
1657
+ with: 'PrintIt';
1658
+ onClick: [self sourceArea printIt].
1659
+ html button
1660
+ with: 'InspectIt';
1661
+ onClick: [self sourceArea inspectIt].
1662
+ self updateButtons
1663
+ !
1664
+
1665
+ renderTopPanelOn: html
1666
+ html div
1667
+ class: 'top';
1668
+ with: [
1669
+ variablesList := html ul class: 'jt_column variables'.
1670
+ valueTextarea := html textarea class: 'jt_column value'; at: 'readonly' put: 'readonly'.
1671
+ html div class: 'jt_tabs inspector'; with: [
1672
+ html button
1673
+ class: 'jt_button inspector refresh';
1674
+ with: 'Refresh';
1675
+ onClick: [self refresh].
1676
+ diveButton := html button
1677
+ class: 'jt_button inspector dive';
1678
+ with: 'Dive';
1679
+ onClick: [self dive]].
1680
+ html div class: 'jt_clear'].
1681
+ self
1682
+ updateVariablesList;
1683
+ updateValueTextarea.
1684
+ ! !
1685
+
1686
+ !Inspector methodsFor: 'testing'!
1687
+
1688
+ canBeClosed
1689
+ ^true
1690
+ ! !
1691
+
1692
+ !Inspector methodsFor: 'updating'!
1693
+
1694
+ selectVariable: aString
1695
+ self selectedVariable: aString.
1696
+ self
1697
+ updateVariablesList;
1698
+ updateValueTextarea;
1699
+ updateButtons
1700
+ !
1701
+
1702
+ updateButtons
1703
+ (self selectedVariable notNil and: [(self variables at: self selectedVariable) notNil])
1704
+ ifFalse: [diveButton at: 'disabled' put: true]
1705
+ ifTrue: [diveButton removeAt: 'disabled']
1706
+ !
1707
+
1708
+ updateValueTextarea
1709
+ valueTextarea asJQuery val: (self selectedVariable isNil
1710
+ ifTrue: ['']
1711
+ ifFalse: [(self variables at: self selectedVariable) printString])
1712
+ !
1713
+
1714
+ updateVariablesList
1715
+ variablesList contents: [:html |
1716
+ self variables keys do: [:each || li |
1717
+ li := html li.
1718
+ li
1719
+ with: each;
1720
+ onClick: [self selectVariable: each].
1721
+ self selectedVariable = each ifTrue: [
1722
+ li class: 'selected']]]
1723
+ ! !
1724
+
1725
+ !Inspector class methodsFor: 'instance creation'!
1726
+
1727
+ on: anObject
1728
+ ^self new
1729
+ inspect: anObject;
1730
+ yourself
1731
+ ! !
1732
+
1733
+ TabWidget subclass: #ProgressBar
1734
+ instanceVariableNames: 'percent progressDiv div'
1735
+ package: 'IDE'!
1736
+
1737
+ !ProgressBar methodsFor: 'accessing'!
1738
+
1739
+ percent
1740
+ ^percent ifNil: [0]
1741
+ !
1742
+
1743
+ percent: aNumber
1744
+ percent := aNumber
1745
+ ! !
1746
+
1747
+ !ProgressBar methodsFor: 'rendering'!
1748
+
1749
+ renderOn: html
1750
+ div := html div
1751
+ class: 'progress_bar';
1752
+ yourself.
1753
+ self renderProgressBar
1754
+ !
1755
+
1756
+ renderProgressBar
1757
+ div contents: [:html |
1758
+ html div
1759
+ class: 'progress';
1760
+ style: 'width:', self percent asString, '%']
1761
+ ! !
1762
+
1763
+ !ProgressBar methodsFor: 'updating'!
1764
+
1765
+ updatePercent: aNumber
1766
+ self percent: aNumber.
1767
+ self renderProgressBar
1768
+ ! !
1769
+
1770
+ TabWidget subclass: #ReferencesBrowser
1771
+ instanceVariableNames: 'implementors senders implementorsList input timer selector sendersList referencedClasses referencedClassesList matches matchesList'
1772
+ package: 'IDE'!
1773
+
1774
+ !ReferencesBrowser methodsFor: 'accessing'!
1775
+
1776
+ classesAndMetaclasses
1777
+ ^Smalltalk current classes, (Smalltalk current classes collect: [:each | each class])
1778
+ !
1779
+
1780
+ implementors
1781
+ ^implementors ifNil: [implementors := Array new]
1782
+ !
1783
+
1784
+ label
1785
+ ^'[References]'
1786
+ !
1787
+
1788
+ matches
1789
+ ^matches ifNil: [matches := Array new]
1790
+ !
1791
+
1792
+ referencedClasses
1793
+ ^referencedClasses ifNil: [referencedClasses := Array new]
1794
+ !
1795
+
1796
+ selector
1797
+ ^selector
1798
+ !
1799
+
1800
+ senders
1801
+ ^senders ifNil: [senders := Array new]
1802
+ ! !
1803
+
1804
+ !ReferencesBrowser methodsFor: 'actions'!
1805
+
1806
+ openBrowserOn: aMethod
1807
+ | browser |
1808
+ browser := Browser openOn: (aMethod methodClass isMetaclass
1809
+ ifTrue: [aMethod methodClass instanceClass] ifFalse: [aMethod methodClass]).
1810
+ aMethod methodClass isMetaclass ifTrue: [browser selectTab: #class].
1811
+ browser
1812
+ selectProtocol: aMethod category;
1813
+ selectMethod: aMethod
1814
+ !
1815
+
1816
+ search: aString
1817
+ self
1818
+ searchReferencesFor: aString;
1819
+ updateImplementorsList;
1820
+ updateSendersList;
1821
+ updateReferencedClassesList;
1822
+ updateMatchesList
1823
+ !
1824
+
1825
+ searchMethodSource
1826
+ | regex |
1827
+ regex := selector allButFirst.
1828
+ self classesAndMetaclasses do: [:each |
1829
+ each methodDictionary values do: [:value |
1830
+ (value source match: regex) ifTrue: [
1831
+ self matches add: value]]]
1832
+ !
1833
+
1834
+ searchReferencedClasses
1835
+ self classesAndMetaclasses do: [:each |
1836
+ each methodDictionary values do: [:value |
1837
+ (value referencedClasses includes: selector) ifTrue: [
1838
+ self referencedClasses add: value]]]
1839
+ !
1840
+
1841
+ searchReferencesFor: aString
1842
+ selector := aString.
1843
+ implementors := Array new.
1844
+ senders := Array new.
1845
+ referencedClasses := Array new.
1846
+ matches := Array new.
1847
+ self searchMethodSource.
1848
+ (selector match: '^[A-Z]')
1849
+ ifFalse: [self searchSelectorReferences]
1850
+ ifTrue: [self searchReferencedClasses]
1851
+ !
1852
+
1853
+ searchSelectorReferences
1854
+ self classesAndMetaclasses do: [:each |
1855
+ each methodDictionary keysAndValuesDo: [:key :value |
1856
+ key = selector ifTrue: [self implementors add: value].
1857
+ (value messageSends includes: selector) ifTrue: [
1858
+ self senders add: value]]]
1859
+ ! !
1860
+
1861
+ !ReferencesBrowser methodsFor: 'initialization'!
1862
+
1863
+ initialize
1864
+ super initialize.
1865
+ selector := ''
1866
+ ! !
1867
+
1868
+ !ReferencesBrowser methodsFor: 'private'!
1869
+
1870
+ setInputEvents
1871
+ input
1872
+ onKeyUp: [timer := [self search: input asJQuery val] valueWithTimeout: 100];
1873
+ onKeyDown: [timer ifNotNil: [timer clearTimeout]]
1874
+ ! !
1875
+
1876
+ !ReferencesBrowser methodsFor: 'rendering'!
1877
+
1878
+ renderBoxOn: html
1879
+ self
1880
+ renderInputOn: html;
1881
+ renderImplementorsOn: html;
1882
+ renderSendersOn: html;
1883
+ renderReferencedClassesOn: html;
1884
+ renderMatchesOn: html
1885
+ !
1886
+
1887
+ renderImplementorsOn: html
1888
+ implementorsList := html ul class: 'jt_column implementors'.
1889
+ self updateImplementorsList
1890
+ !
1891
+
1892
+ renderInputOn: html
1893
+ input := html input
1894
+ class: 'implementors';
1895
+ yourself.
1896
+ input asJQuery val: selector.
1897
+ self setInputEvents
1898
+ !
1899
+
1900
+ renderMatchesOn: html
1901
+ matchesList := html ul class: 'jt_column matches'.
1902
+ self updateMatchesList
1903
+ !
1904
+
1905
+ renderReferencedClassesOn: html
1906
+ referencedClassesList := html ul class: 'jt_column referenced_classes'.
1907
+ self updateReferencedClassesList
1908
+ !
1909
+
1910
+ renderSendersOn: html
1911
+ sendersList := html ul class: 'jt_column senders'.
1912
+ self updateSendersList
1913
+ ! !
1914
+
1915
+ !ReferencesBrowser methodsFor: 'testing'!
1916
+
1917
+ canBeClosed
1918
+ ^true
1919
+ ! !
1920
+
1921
+ !ReferencesBrowser methodsFor: 'updating'!
1922
+
1923
+ updateImplementorsList
1924
+ implementorsList contents: [:html |
1925
+ html li
1926
+ class: 'column_label';
1927
+ with: 'Implementors (', self implementors size asString, ')';
1928
+ style: 'font-weight: bold'.
1929
+ self implementors do: [:each || li |
1930
+ li := html li.
1931
+ li
1932
+ with: (each methodClass asString, ' >> ', self selector);
1933
+ onClick: [self openBrowserOn: each]]]
1934
+ !
1935
+
1936
+ updateMatchesList
1937
+ matchesList contents: [:html |
1938
+ html li
1939
+ class: 'column_label';
1940
+ with: 'Regex matches (', self matches size asString, ')';
1941
+ style: 'font-weight: bold'.
1942
+ self matches do: [:each || li |
1943
+ li := html li.
1944
+ li
1945
+ with: (each methodClass asString, ' >> ', each selector);
1946
+ onClick: [self openBrowserOn: each]]]
1947
+ !
1948
+
1949
+ updateReferencedClassesList
1950
+ referencedClassesList contents: [:html |
1951
+ html li
1952
+ class: 'column_label';
1953
+ with: 'Class references (', self referencedClasses size asString, ')';
1954
+ style: 'font-weight: bold'.
1955
+ self referencedClasses do: [:each |
1956
+ html li
1957
+ with: (each methodClass asString, ' >> ', each selector);
1958
+ onClick: [self openBrowserOn: each]]]
1959
+ !
1960
+
1961
+ updateSendersList
1962
+ sendersList contents: [:html |
1963
+ html li
1964
+ class: 'column_label';
1965
+ with: 'Senders (', self senders size asString, ')';
1966
+ style: 'font-weight: bold'.
1967
+ self senders do: [:each |
1968
+ html li
1969
+ with: (each methodClass asString, ' >> ', each selector);
1970
+ onClick: [self openBrowserOn: each]]]
1971
+ ! !
1972
+
1973
+ !ReferencesBrowser class methodsFor: 'instance creation'!
1974
+
1975
+ search: aString
1976
+ ^self new
1977
+ searchReferencesFor: aString;
1978
+ open
1979
+ ! !
1980
+
1981
+ TabWidget subclass: #TestRunner
1982
+ instanceVariableNames: 'selectedCategories packagesList selectedClasses classesList selectedMethods progressBar methodsList result statusDiv'
1983
+ package: 'IDE'!
1984
+
1985
+ !TestRunner methodsFor: 'accessing'!
1986
+
1987
+ allClasses
1988
+ ^TestCase allSubclasses
1989
+ !
1990
+
1991
+ classes
1992
+ ^(self allClasses
1993
+ select: [:each | self selectedCategories includes: each category])
1994
+ sort: [:a :b | a name > b name]
1995
+ !
1996
+
1997
+ label
1998
+ ^'SUnit'
1999
+ !
2000
+
2001
+ packages
2002
+ | packages |
2003
+ packages := Array new.
2004
+ self allClasses do: [:each |
2005
+ (packages includes: each category) ifFalse: [
2006
+ packages add: each category]].
2007
+ ^packages sort
2008
+ !
2009
+
2010
+ progressBar
2011
+ ^progressBar ifNil: [progressBar := ProgressBar new]
2012
+ !
2013
+
2014
+ result
2015
+ ^result
2016
+ !
2017
+
2018
+ selectedCategories
2019
+ ^selectedCategories ifNil: [selectedCategories := Array new]
2020
+ !
2021
+
2022
+ selectedClasses
2023
+ ^selectedClasses ifNil: [selectedClasses := Array new]
2024
+ !
2025
+
2026
+ statusInfo
2027
+ ^self printTotal, self printPasses, self printErrors, self printFailures
2028
+ !
2029
+
2030
+ testCases
2031
+ | testCases |
2032
+ testCases := #().
2033
+ self selectedClasses do: [:each | testCases addAll: each buildSuite].
2034
+ ^testCases
2035
+ ! !
2036
+
2037
+ !TestRunner methodsFor: 'actions'!
2038
+
2039
+ performFailure: aTestCase
2040
+ aTestCase perform: aTestCase selector
2041
+ !
2042
+
2043
+ run: aCollection
2044
+ result := TestResult new.
2045
+ self
2046
+ updateStatusDiv;
2047
+ updateMethodsList.
2048
+ self progressBar updatePercent: 0.
2049
+ result total: aCollection size.
2050
+ aCollection do: [:each |
2051
+ [each runCaseFor: result.
2052
+ self progressBar updatePercent: result runs / result total * 100.
2053
+ self updateStatusDiv.
2054
+ self updateMethodsList] valueWithTimeout: 100].
2055
+ !
2056
+
2057
+ selectAllCategories
2058
+ self packages do: [:each |
2059
+ (selectedCategories includes: each) ifFalse: [
2060
+ self selectedCategories add: each]].
2061
+ self
2062
+ updateCategoriesList;
2063
+ updateClassesList
2064
+ !
2065
+
2066
+ selectAllClasses
2067
+ self classes do: [:each |
2068
+ (selectedClasses includes: each) ifFalse: [
2069
+ self selectedClasses add: each]].
2070
+ self
2071
+ updateCategoriesList;
2072
+ updateClassesList
2073
+ !
2074
+
2075
+ toggleCategory: aCategory
2076
+ (self isSelectedCategory: aCategory)
2077
+ ifFalse: [selectedCategories add: aCategory]
2078
+ ifTrue: [selectedCategories remove: aCategory].
2079
+ self
2080
+ updateCategoriesList;
2081
+ updateClassesList
2082
+ !
2083
+
2084
+ toggleClass: aClass
2085
+ (self isSelectedClass: aClass)
2086
+ ifFalse: [selectedClasses add: aClass]
2087
+ ifTrue: [selectedClasses remove: aClass].
2088
+ self
2089
+ updateClassesList
2090
+ ! !
2091
+
2092
+ !TestRunner methodsFor: 'initialization'!
2093
+
2094
+ initialize
2095
+ super initialize.
2096
+ result := TestResult new
2097
+ ! !
2098
+
2099
+ !TestRunner methodsFor: 'printing'!
2100
+
2101
+ printErrors
2102
+ ^self result errors size asString , ' errors, '
2103
+ !
2104
+
2105
+ printFailures
2106
+ ^self result failures size asString, ' failures'
2107
+ !
2108
+
2109
+ printPasses
2110
+ ^(self result total - self result errors size - self result failures size) asString , ' passes, '
2111
+ !
2112
+
2113
+ printTotal
2114
+ ^self result total asString, ' runs, '
2115
+ ! !
2116
+
2117
+ !TestRunner methodsFor: 'rendering'!
2118
+
2119
+ renderBoxOn: html
2120
+ self
2121
+ renderCategoriesOn: html;
2122
+ renderClassesOn: html;
2123
+ renderResultsOn: html
2124
+ !
2125
+
2126
+ renderButtonsOn: html
2127
+ html button
2128
+ with: 'Run selected';
2129
+ onClick: [self run: self testCases]
2130
+ !
2131
+
2132
+ renderCategoriesOn: html
2133
+ packagesList := html ul class: 'jt_column sunit packages'.
2134
+ self updateCategoriesList
2135
+ !
2136
+
2137
+ renderClassesOn: html
2138
+ classesList := html ul class: 'jt_column sunit classes'.
2139
+ self updateClassesList
2140
+ !
2141
+
2142
+ renderErrorsOn: html
2143
+ self result errors do: [:each |
2144
+ html li
2145
+ class: 'errors';
2146
+ with: each class name, ' >> ', each selector;
2147
+ onClick: [self performFailure: each]]
2148
+ !
2149
+
2150
+ renderFailuresOn: html
2151
+ self result failures do: [:each |
2152
+ html li
2153
+ class: 'failures';
2154
+ with: each class name, ' >> ', each selector;
2155
+ onClick: [self performFailure: each]]
2156
+ !
2157
+
2158
+ renderResultsOn: html
2159
+ statusDiv := html div.
2160
+ html with: self progressBar.
2161
+ methodsList := html ul class: 'jt_column sunit results'.
2162
+ self updateMethodsList.
2163
+ self updateStatusDiv
2164
+ ! !
2165
+
2166
+ !TestRunner methodsFor: 'testing'!
2167
+
2168
+ isSelectedCategory: aCategory
2169
+ ^(self selectedCategories includes: aCategory)
2170
+ !
2171
+
2172
+ isSelectedClass: aClass
2173
+ ^(self selectedClasses includes: aClass)
2174
+ ! !
2175
+
2176
+ !TestRunner methodsFor: 'updating'!
2177
+
2178
+ updateCategoriesList
2179
+ packagesList contents: [:html |
2180
+ html li
2181
+ class: 'all';
2182
+ with: 'All';
2183
+ onClick: [self selectAllCategories].
2184
+ self packages do: [:each || li |
2185
+ li := html li.
2186
+ (self selectedCategories includes: each) ifTrue: [
2187
+ li class: 'selected'].
2188
+ li
2189
+ with: each;
2190
+ onClick: [self toggleCategory: each]]]
2191
+ !
2192
+
2193
+ updateClassesList
2194
+ classesList contents: [:html |
2195
+ (self selectedCategories isEmpty) ifFalse: [
2196
+ html li
2197
+ class: 'all';
2198
+ with: 'All';
2199
+ onClick: [self selectAllClasses]].
2200
+ self classes do: [:each || li |
2201
+ li := html li.
2202
+ (self selectedClasses includes: each) ifTrue: [
2203
+ li class: 'selected'].
2204
+ li
2205
+ with: each name;
2206
+ onClick: [self toggleClass: each]]]
2207
+ !
2208
+
2209
+ updateMethodsList
2210
+ methodsList contents: [:html |
2211
+ self renderErrorsOn: html.
2212
+ self renderFailuresOn: html]
2213
+ !
2214
+
2215
+ updateStatusDiv
2216
+ statusDiv class: 'sunit status ', result status.
2217
+ statusDiv contents: [:html |
2218
+ html span with: self statusInfo]
2219
+ ! !
2220
+
2221
+ TabWidget subclass: #Workspace
2222
+ instanceVariableNames: 'sourceArea'
2223
+ package: 'IDE'!
2224
+
2225
+ !Workspace methodsFor: 'accessing'!
2226
+
2227
+ label
2228
+ ^'Workspace'
2229
+ ! !
2230
+
2231
+ !Workspace methodsFor: 'actions'!
2232
+
2233
+ clearWorkspace
2234
+ sourceArea clear
2235
+ !
2236
+
2237
+ doIt
2238
+ sourceArea doIt
2239
+ !
2240
+
2241
+ fileIn
2242
+ sourceArea fileIn
2243
+ !
2244
+
2245
+ inspectIt
2246
+ sourceArea inspectIt
2247
+ !
2248
+
2249
+ printIt
2250
+ sourceArea printIt
2251
+ ! !
2252
+
2253
+ !Workspace methodsFor: 'rendering'!
2254
+
2255
+ renderBoxOn: html
2256
+ sourceArea := SourceArea new.
2257
+ sourceArea renderOn: html
2258
+ !
2259
+
2260
+ renderButtonsOn: html
2261
+ html button
2262
+ with: 'DoIt';
2263
+ title: 'ctrl+d';
2264
+ onClick: [self doIt].
2265
+ html button
2266
+ with: 'PrintIt';
2267
+ title: 'ctrl+p';
2268
+ onClick: [self printIt].
2269
+ html button
2270
+ with: 'InspectIt';
2271
+ title: 'ctrl+i';
2272
+ onClick: [self inspectIt].
2273
+ html button
2274
+ with: 'FileIn';
2275
+ title: 'ctrl+f';
2276
+ onClick: [self fileIn].
2277
+ html button
2278
+ with: 'Clear workspace';
2279
+ onClick: [self clearWorkspace]
2280
+ ! !
2281
+
2282
+ !Object methodsFor: '*IDE'!
2283
+
2284
+ inspect
2285
+ Inspector new
2286
+ inspect: self;
2287
+ open
2288
+ !
2289
+
2290
+ inspectOn: anInspector
2291
+ | variables |
2292
+ variables := Dictionary new.
2293
+ variables at: '#self' put: self.
2294
+ self class allInstanceVariableNames do: [:each |
2295
+ variables at: each put: (self instVarAt: each)].
2296
+ anInspector
2297
+ setLabel: self printString;
2298
+ setVariables: variables
2299
+ ! !
2300
+
2301
+ !Collection methodsFor: '*IDE'!
2302
+
2303
+ inspectOn: anInspector
2304
+ | variables |
2305
+ variables := Dictionary new.
2306
+ variables at: '#self' put: self.
2307
+ self withIndexDo: [:each :i |
2308
+ variables at: i put: each].
2309
+ anInspector
2310
+ setLabel: self printString;
2311
+ setVariables: variables
2312
+ ! !
2313
+
2314
+ !HashedCollection methodsFor: '*IDE'!
2315
+
2316
+ inspectOn: anInspector
2317
+ | variables |
2318
+ variables := Dictionary new.
2319
+ variables at: '#self' put: self.
2320
+ variables at: '#keys' put: self keys.
2321
+ self keysAndValuesDo: [:key :value |
2322
+ variables at: key put: value].
2323
+ anInspector
2324
+ setLabel: self printString;
2325
+ setVariables: variables
2326
+ ! !
2327
+
2328
+ !String methodsFor: '*IDE'!
2329
+
2330
+ inspectOn: anInspector
2331
+ | label |
2332
+ super inspectOn: anInspector.
2333
+ self printString size > 30
2334
+ ifTrue: [label := (self printString copyFrom: 1 to: 30), '...''']
2335
+ ifFalse: [label := self printString].
2336
+ anInspector setLabel: label
2337
+ ! !
2338
+
2339
+ !Set methodsFor: '*IDE'!
2340
+
2341
+ inspectOn: anInspector
2342
+ | variables |
2343
+ variables := Dictionary new.
2344
+ variables at: '#self' put: self.
2345
+ elements withIndexDo: [:each :i |
2346
+ variables at: i put: each].
2347
+ anInspector
2348
+ setLabel: self printString;
2349
+ setVariables: variables
2350
+ ! !
2351
+
2352
+ !Date methodsFor: '*IDE'!
2353
+
2354
+ inspectOn: anInspector
2355
+ | variables |
2356
+ variables := Dictionary new.
2357
+ variables at: '#self' put: self.
2358
+ variables at: '#year' put: self year.
2359
+ variables at: '#month' put: self month.
2360
+ variables at: '#day' put: self day.
2361
+ variables at: '#hours' put: self hours.
2362
+ variables at: '#minutes' put: self minutes.
2363
+ variables at: '#seconds' put: self seconds.
2364
+ variables at: '#milliseconds' put: self milliseconds.
2365
+ anInspector
2366
+ setLabel: self printString;
2367
+ setVariables: variables
2368
+ ! !
2369
+
2370
+ !Date methodsFor: '*IDE'!
2371
+
2372
+ inspectOn: anInspector
2373
+ | variables |
2374
+ variables := Dictionary new.
2375
+ variables at: '#self' put: self.
2376
+ variables at: '#year' put: self year.
2377
+ variables at: '#month' put: self month.
2378
+ variables at: '#day' put: self day.
2379
+ variables at: '#hours' put: self hours.
2380
+ variables at: '#minutes' put: self minutes.
2381
+ variables at: '#seconds' put: self seconds.
2382
+ variables at: '#milliseconds' put: self milliseconds.
2383
+ anInspector
2384
+ setLabel: self printString;
2385
+ setVariables: variables
2386
+ ! !
2387
+
2388
+ !MethodContext methodsFor: '*IDE'!
2389
+
2390
+ inspectOn: anInspector
2391
+ | variables |
2392
+ variables := Dictionary new.
2393
+ variables at: '#self' put: self.
2394
+ variables at: '#home' put: self home.
2395
+ variables at: '#receiver' put: self receiver.
2396
+ variables at: '#selector' put: self selector.
2397
+ variables at: '#temps' put: self temps.
2398
+ self class instanceVariableNames do: [:each |
2399
+ variables at: each put: (self instVarAt: each)].
2400
+ anInspector
2401
+ setLabel: self printString;
2402
+ setVariables: variables
2403
+ ! !
2404
+