Helios-Debugger.js 71 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116
  1. define("helios/Helios-Debugger", ["amber/boot"
  2. //>>excludeStart("imports", pragmas.excludeImports);
  3. , "amber_core/Compiler-Interpreter"
  4. //>>excludeEnd("imports");
  5. , "amber_core/Kernel-Objects", "helios/Helios-Core", "helios/Helios-Workspace"], function($boot
  6. //>>excludeStart("imports", pragmas.excludeImports);
  7. //>>excludeEnd("imports");
  8. ){"use strict";
  9. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  10. $core.addPackage('Helios-Debugger');
  11. $core.packages["Helios-Debugger"].innerEval = function (expr) { return eval(expr); };
  12. $core.packages["Helios-Debugger"].imports = ["amber_core/Compiler-Interpreter"];
  13. $core.packages["Helios-Debugger"].transport = {"type":"amd","amdNamespace":"helios"};
  14. $core.addClass('HLContextInspectorDecorator', $globals.Object, ['context'], 'Helios-Debugger');
  15. $core.addMethod(
  16. $core.method({
  17. selector: "context",
  18. protocol: 'accessing',
  19. fn: function (){
  20. var self=this;
  21. return self["@context"];
  22. },
  23. //>>excludeStart("ide", pragmas.excludeIdeData);
  24. args: [],
  25. source: "context\x0a\x09^ context",
  26. referencedClasses: [],
  27. //>>excludeEnd("ide");
  28. messageSends: []
  29. }),
  30. $globals.HLContextInspectorDecorator);
  31. $core.addMethod(
  32. $core.method({
  33. selector: "evaluate:on:",
  34. protocol: 'evaluating',
  35. fn: function (aString,anEvaluator){
  36. var self=this;
  37. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  38. return $core.withContext(function($ctx1) {
  39. //>>excludeEnd("ctx");
  40. return $recv(self._context())._evaluate_on_(aString,anEvaluator);
  41. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  42. }, function($ctx1) {$ctx1.fill(self,"evaluate:on:",{aString:aString,anEvaluator:anEvaluator},$globals.HLContextInspectorDecorator)});
  43. //>>excludeEnd("ctx");
  44. },
  45. //>>excludeStart("ide", pragmas.excludeIdeData);
  46. args: ["aString", "anEvaluator"],
  47. source: "evaluate: aString on: anEvaluator\x0a\x09^ self context evaluate: aString on: anEvaluator",
  48. referencedClasses: [],
  49. //>>excludeEnd("ide");
  50. messageSends: ["evaluate:on:", "context"]
  51. }),
  52. $globals.HLContextInspectorDecorator);
  53. $core.addMethod(
  54. $core.method({
  55. selector: "initializeFromContext:",
  56. protocol: 'initialization',
  57. fn: function (aContext){
  58. var self=this;
  59. self["@context"]=aContext;
  60. return self;
  61. },
  62. //>>excludeStart("ide", pragmas.excludeIdeData);
  63. args: ["aContext"],
  64. source: "initializeFromContext: aContext\x0a\x09context := aContext",
  65. referencedClasses: [],
  66. //>>excludeEnd("ide");
  67. messageSends: []
  68. }),
  69. $globals.HLContextInspectorDecorator);
  70. $core.addMethod(
  71. $core.method({
  72. selector: "inspectOn:",
  73. protocol: 'inspecting',
  74. fn: function (anInspector){
  75. var self=this;
  76. var variables,inspectedContext;
  77. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  78. return $core.withContext(function($ctx1) {
  79. //>>excludeEnd("ctx");
  80. var $1,$2,$3,$receiver;
  81. variables=$recv($globals.Dictionary)._new();
  82. inspectedContext=self._context();
  83. $1=variables;
  84. $2=$recv(inspectedContext)._locals();
  85. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  86. $ctx1.sendIdx["locals"]=1;
  87. //>>excludeEnd("ctx");
  88. $recv($1)._addAll_($2);
  89. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  90. $ctx1.sendIdx["addAll:"]=1;
  91. //>>excludeEnd("ctx");
  92. $recv((function(){
  93. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  94. return $core.withContext(function($ctx2) {
  95. //>>excludeEnd("ctx");
  96. return $recv($recv(inspectedContext)._notNil())._and_((function(){
  97. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  98. return $core.withContext(function($ctx3) {
  99. //>>excludeEnd("ctx");
  100. return $recv(inspectedContext)._isBlockContext();
  101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  102. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  103. //>>excludeEnd("ctx");
  104. }));
  105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  106. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  107. //>>excludeEnd("ctx");
  108. }))._whileTrue_((function(){
  109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  110. return $core.withContext(function($ctx2) {
  111. //>>excludeEnd("ctx");
  112. inspectedContext=$recv(inspectedContext)._outerContext();
  113. inspectedContext;
  114. $3=inspectedContext;
  115. if(($receiver = $3) == null || $receiver.isNil){
  116. return $3;
  117. } else {
  118. return $recv(variables)._addAll_($recv(inspectedContext)._locals());
  119. };
  120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  121. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  122. //>>excludeEnd("ctx");
  123. }));
  124. $recv(anInspector)._setLabel_("Context");
  125. $recv(anInspector)._setVariables_(variables);
  126. return self;
  127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  128. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext},$globals.HLContextInspectorDecorator)});
  129. //>>excludeEnd("ctx");
  130. },
  131. //>>excludeStart("ide", pragmas.excludeIdeData);
  132. args: ["anInspector"],
  133. source: "inspectOn: anInspector\x0a\x09| variables inspectedContext |\x0a\x09\x0a\x09variables := Dictionary new.\x0a\x09inspectedContext := self context.\x0a\x09\x0a\x09variables addAll: inspectedContext locals.\x0a\x09\x0a\x09[ inspectedContext notNil and: [ inspectedContext isBlockContext ] ] whileTrue: [\x0a\x09\x09inspectedContext := inspectedContext outerContext.\x0a\x09\x09inspectedContext ifNotNil: [\x0a\x09\x09\x09variables addAll: inspectedContext locals ] ].\x0a\x09\x0a\x09anInspector\x0a\x09\x09setLabel: 'Context';\x0a\x09\x09setVariables: variables",
  134. referencedClasses: ["Dictionary"],
  135. //>>excludeEnd("ide");
  136. messageSends: ["new", "context", "addAll:", "locals", "whileTrue:", "and:", "notNil", "isBlockContext", "outerContext", "ifNotNil:", "setLabel:", "setVariables:"]
  137. }),
  138. $globals.HLContextInspectorDecorator);
  139. $core.addMethod(
  140. $core.method({
  141. selector: "on:",
  142. protocol: 'instance creation',
  143. fn: function (aContext){
  144. var self=this;
  145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  146. return $core.withContext(function($ctx1) {
  147. //>>excludeEnd("ctx");
  148. var $1;
  149. $1=self._new();
  150. $recv($1)._initializeFromContext_(aContext);
  151. return $recv($1)._yourself();
  152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  153. }, function($ctx1) {$ctx1.fill(self,"on:",{aContext:aContext},$globals.HLContextInspectorDecorator.klass)});
  154. //>>excludeEnd("ctx");
  155. },
  156. //>>excludeStart("ide", pragmas.excludeIdeData);
  157. args: ["aContext"],
  158. source: "on: aContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aContext;\x0a\x09\x09yourself",
  159. referencedClasses: [],
  160. //>>excludeEnd("ide");
  161. messageSends: ["initializeFromContext:", "new", "yourself"]
  162. }),
  163. $globals.HLContextInspectorDecorator.klass);
  164. $core.addClass('HLDebugger', $globals.HLFocusableWidget, ['model', 'stackListWidget', 'codeWidget', 'inspectorWidget'], 'Helios-Debugger');
  165. //>>excludeStart("ide", pragmas.excludeIdeData);
  166. $globals.HLDebugger.comment="I am the main widget for the Helios debugger.";
  167. //>>excludeEnd("ide");
  168. $core.addMethod(
  169. $core.method({
  170. selector: "codeWidget",
  171. protocol: 'widgets',
  172. fn: function (){
  173. var self=this;
  174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  175. return $core.withContext(function($ctx1) {
  176. //>>excludeEnd("ctx");
  177. var $1,$2,$4,$5,$6,$3,$receiver;
  178. $1=self["@codeWidget"];
  179. if(($receiver = $1) == null || $receiver.isNil){
  180. $2=$recv($globals.HLDebuggerCodeWidget)._new();
  181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  182. $ctx1.sendIdx["new"]=1;
  183. //>>excludeEnd("ctx");
  184. $4=$recv($globals.HLDebuggerCodeModel)._new();
  185. $5=self._model();
  186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  187. $ctx1.sendIdx["model"]=1;
  188. //>>excludeEnd("ctx");
  189. $recv($4)._debuggerModel_($5);
  190. $6=$recv($4)._yourself();
  191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  192. $ctx1.sendIdx["yourself"]=1;
  193. //>>excludeEnd("ctx");
  194. $3=$6;
  195. $recv($2)._model_($3);
  196. $recv($2)._browserModel_(self._model());
  197. self["@codeWidget"]=$recv($2)._yourself();
  198. return self["@codeWidget"];
  199. } else {
  200. return $1;
  201. };
  202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  203. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},$globals.HLDebugger)});
  204. //>>excludeEnd("ctx");
  205. },
  206. //>>excludeStart("ide", pragmas.excludeIdeData);
  207. args: [],
  208. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLDebuggerCodeWidget new\x0a\x09\x09model: (HLDebuggerCodeModel new\x0a\x09\x09\x09debuggerModel: self model;\x0a\x09\x09\x09yourself);\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
  209. referencedClasses: ["HLDebuggerCodeWidget", "HLDebuggerCodeModel"],
  210. //>>excludeEnd("ide");
  211. messageSends: ["ifNil:", "model:", "new", "debuggerModel:", "model", "yourself", "browserModel:"]
  212. }),
  213. $globals.HLDebugger);
  214. $core.addMethod(
  215. $core.method({
  216. selector: "cssClass",
  217. protocol: 'accessing',
  218. fn: function (){
  219. var self=this;
  220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  221. return $core.withContext(function($ctx1) {
  222. //>>excludeEnd("ctx");
  223. var $1;
  224. $1=(
  225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  226. $ctx1.supercall = true,
  227. //>>excludeEnd("ctx");
  228. ($globals.HLDebugger.superclass||$boot.dnu).fn.prototype._cssClass.apply($recv(self), []));
  229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  230. $ctx1.supercall = false;
  231. //>>excludeEnd("ctx");;
  232. return $recv($1).__comma(" hl_debugger");
  233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  234. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},$globals.HLDebugger)});
  235. //>>excludeEnd("ctx");
  236. },
  237. //>>excludeStart("ide", pragmas.excludeIdeData);
  238. args: [],
  239. source: "cssClass\x0a\x09^ super cssClass, ' hl_debugger'",
  240. referencedClasses: [],
  241. //>>excludeEnd("ide");
  242. messageSends: [",", "cssClass"]
  243. }),
  244. $globals.HLDebugger);
  245. $core.addMethod(
  246. $core.method({
  247. selector: "focus",
  248. protocol: 'actions',
  249. fn: function (){
  250. var self=this;
  251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  252. return $core.withContext(function($ctx1) {
  253. //>>excludeEnd("ctx");
  254. $recv(self._stackListWidget())._focus();
  255. return self;
  256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  257. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLDebugger)});
  258. //>>excludeEnd("ctx");
  259. },
  260. //>>excludeStart("ide", pragmas.excludeIdeData);
  261. args: [],
  262. source: "focus\x0a\x09self stackListWidget focus",
  263. referencedClasses: [],
  264. //>>excludeEnd("ide");
  265. messageSends: ["focus", "stackListWidget"]
  266. }),
  267. $globals.HLDebugger);
  268. $core.addMethod(
  269. $core.method({
  270. selector: "initializeFromError:",
  271. protocol: 'initialization',
  272. fn: function (anError){
  273. var self=this;
  274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  275. return $core.withContext(function($ctx1) {
  276. //>>excludeEnd("ctx");
  277. self["@model"]=$recv($globals.HLDebuggerModel)._on_(anError);
  278. self._observeModel();
  279. return self;
  280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  281. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError},$globals.HLDebugger)});
  282. //>>excludeEnd("ctx");
  283. },
  284. //>>excludeStart("ide", pragmas.excludeIdeData);
  285. args: ["anError"],
  286. source: "initializeFromError: anError\x0a\x09model := HLDebuggerModel on: anError.\x0a\x09self observeModel",
  287. referencedClasses: ["HLDebuggerModel"],
  288. //>>excludeEnd("ide");
  289. messageSends: ["on:", "observeModel"]
  290. }),
  291. $globals.HLDebugger);
  292. $core.addMethod(
  293. $core.method({
  294. selector: "inspectorWidget",
  295. protocol: 'widgets',
  296. fn: function (){
  297. var self=this;
  298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  299. return $core.withContext(function($ctx1) {
  300. //>>excludeEnd("ctx");
  301. var $1,$receiver;
  302. $1=self["@inspectorWidget"];
  303. if(($receiver = $1) == null || $receiver.isNil){
  304. self["@inspectorWidget"]=$recv($globals.HLInspectorWidget)._new();
  305. return self["@inspectorWidget"];
  306. } else {
  307. return $1;
  308. };
  309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  310. }, function($ctx1) {$ctx1.fill(self,"inspectorWidget",{},$globals.HLDebugger)});
  311. //>>excludeEnd("ctx");
  312. },
  313. //>>excludeStart("ide", pragmas.excludeIdeData);
  314. args: [],
  315. source: "inspectorWidget\x0a\x09^ inspectorWidget ifNil: [ \x0a\x09\x09inspectorWidget := HLInspectorWidget new ]",
  316. referencedClasses: ["HLInspectorWidget"],
  317. //>>excludeEnd("ide");
  318. messageSends: ["ifNil:", "new"]
  319. }),
  320. $globals.HLDebugger);
  321. $core.addMethod(
  322. $core.method({
  323. selector: "model",
  324. protocol: 'accessing',
  325. fn: function (){
  326. var self=this;
  327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  328. return $core.withContext(function($ctx1) {
  329. //>>excludeEnd("ctx");
  330. var $1,$receiver;
  331. $1=self["@model"];
  332. if(($receiver = $1) == null || $receiver.isNil){
  333. self["@model"]=$recv($globals.HLDebuggerModel)._new();
  334. return self["@model"];
  335. } else {
  336. return $1;
  337. };
  338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  339. }, function($ctx1) {$ctx1.fill(self,"model",{},$globals.HLDebugger)});
  340. //>>excludeEnd("ctx");
  341. },
  342. //>>excludeStart("ide", pragmas.excludeIdeData);
  343. args: [],
  344. source: "model\x0a\x09^ model ifNil: [ model := HLDebuggerModel new ]",
  345. referencedClasses: ["HLDebuggerModel"],
  346. //>>excludeEnd("ide");
  347. messageSends: ["ifNil:", "new"]
  348. }),
  349. $globals.HLDebugger);
  350. $core.addMethod(
  351. $core.method({
  352. selector: "observeModel",
  353. protocol: 'actions',
  354. fn: function (){
  355. var self=this;
  356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  357. return $core.withContext(function($ctx1) {
  358. //>>excludeEnd("ctx");
  359. var $1;
  360. $1=$recv(self._model())._announcer();
  361. $recv($1)._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected:",self);
  362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  363. $ctx1.sendIdx["on:send:to:"]=1;
  364. //>>excludeEnd("ctx");
  365. $recv($1)._on_send_to_($globals.HLDebuggerStepped,"onDebuggerStepped:",self);
  366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  367. $ctx1.sendIdx["on:send:to:"]=2;
  368. //>>excludeEnd("ctx");
  369. $recv($1)._on_send_to_($globals.HLDebuggerProceeded,"onDebuggerProceeded",self);
  370. return self;
  371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  372. }, function($ctx1) {$ctx1.fill(self,"observeModel",{},$globals.HLDebugger)});
  373. //>>excludeEnd("ctx");
  374. },
  375. //>>excludeStart("ide", pragmas.excludeIdeData);
  376. args: [],
  377. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLDebuggerProceeded\x0a\x09\x09send: #onDebuggerProceeded\x0a\x09\x09to: self",
  378. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerProceeded"],
  379. //>>excludeEnd("ide");
  380. messageSends: ["on:send:to:", "announcer", "model"]
  381. }),
  382. $globals.HLDebugger);
  383. $core.addMethod(
  384. $core.method({
  385. selector: "onContextSelected:",
  386. protocol: 'reactions',
  387. fn: function (anAnnouncement){
  388. var self=this;
  389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  390. return $core.withContext(function($ctx1) {
  391. //>>excludeEnd("ctx");
  392. $recv(self._inspectorWidget())._inspect_($recv($globals.HLContextInspectorDecorator)._on_($recv(anAnnouncement)._context()));
  393. return self;
  394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  395. }, function($ctx1) {$ctx1.fill(self,"onContextSelected:",{anAnnouncement:anAnnouncement},$globals.HLDebugger)});
  396. //>>excludeEnd("ctx");
  397. },
  398. //>>excludeStart("ide", pragmas.excludeIdeData);
  399. args: ["anAnnouncement"],
  400. source: "onContextSelected: anAnnouncement\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context)",
  401. referencedClasses: ["HLContextInspectorDecorator"],
  402. //>>excludeEnd("ide");
  403. messageSends: ["inspect:", "inspectorWidget", "on:", "context"]
  404. }),
  405. $globals.HLDebugger);
  406. $core.addMethod(
  407. $core.method({
  408. selector: "onDebuggerProceeded",
  409. protocol: 'reactions',
  410. fn: function (){
  411. var self=this;
  412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  413. return $core.withContext(function($ctx1) {
  414. //>>excludeEnd("ctx");
  415. self._removeTab();
  416. return self;
  417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  418. }, function($ctx1) {$ctx1.fill(self,"onDebuggerProceeded",{},$globals.HLDebugger)});
  419. //>>excludeEnd("ctx");
  420. },
  421. //>>excludeStart("ide", pragmas.excludeIdeData);
  422. args: [],
  423. source: "onDebuggerProceeded\x0a\x09self removeTab",
  424. referencedClasses: [],
  425. //>>excludeEnd("ide");
  426. messageSends: ["removeTab"]
  427. }),
  428. $globals.HLDebugger);
  429. $core.addMethod(
  430. $core.method({
  431. selector: "onDebuggerStepped:",
  432. protocol: 'reactions',
  433. fn: function (anAnnouncement){
  434. var self=this;
  435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  436. return $core.withContext(function($ctx1) {
  437. //>>excludeEnd("ctx");
  438. var $1;
  439. $1=$recv(self._model())._atEnd();
  440. if($core.assert($1)){
  441. self._removeTab();
  442. };
  443. $recv(self._inspectorWidget())._inspect_($recv($globals.HLContextInspectorDecorator)._on_($recv(anAnnouncement)._context()));
  444. $recv(self._stackListWidget())._refresh();
  445. return self;
  446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  447. }, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement},$globals.HLDebugger)});
  448. //>>excludeEnd("ctx");
  449. },
  450. //>>excludeStart("ide", pragmas.excludeIdeData);
  451. args: ["anAnnouncement"],
  452. source: "onDebuggerStepped: anAnnouncement\x0a\x09self model atEnd ifTrue: [ self removeTab ].\x0a\x09\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context).\x0a\x09self stackListWidget refresh",
  453. referencedClasses: ["HLContextInspectorDecorator"],
  454. //>>excludeEnd("ide");
  455. messageSends: ["ifTrue:", "atEnd", "model", "removeTab", "inspect:", "inspectorWidget", "on:", "context", "refresh", "stackListWidget"]
  456. }),
  457. $globals.HLDebugger);
  458. $core.addMethod(
  459. $core.method({
  460. selector: "registerBindingsOn:",
  461. protocol: 'keybindings',
  462. fn: function (aBindingGroup){
  463. var self=this;
  464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  465. return $core.withContext(function($ctx1) {
  466. //>>excludeEnd("ctx");
  467. $recv($globals.HLToolCommand)._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  468. return self;
  469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  470. }, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},$globals.HLDebugger)});
  471. //>>excludeEnd("ctx");
  472. },
  473. //>>excludeStart("ide", pragmas.excludeIdeData);
  474. args: ["aBindingGroup"],
  475. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  476. referencedClasses: ["HLToolCommand"],
  477. //>>excludeEnd("ide");
  478. messageSends: ["registerConcreteClassesOn:for:", "model"]
  479. }),
  480. $globals.HLDebugger);
  481. $core.addMethod(
  482. $core.method({
  483. selector: "renderContentOn:",
  484. protocol: 'rendering',
  485. fn: function (html){
  486. var self=this;
  487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  488. return $core.withContext(function($ctx1) {
  489. //>>excludeEnd("ctx");
  490. var $2,$1;
  491. self._renderHeadOn_(html);
  492. $2=$recv($globals.HLVerticalSplitter)._with_with_(self._codeWidget(),$recv($globals.HLHorizontalSplitter)._with_with_(self._stackListWidget(),self._inspectorWidget()));
  493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  494. $ctx1.sendIdx["with:with:"]=1;
  495. //>>excludeEnd("ctx");
  496. $1=$recv($globals.HLContainer)._with_($2);
  497. $recv(html)._with_($1);
  498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  499. $ctx1.sendIdx["with:"]=1;
  500. //>>excludeEnd("ctx");
  501. return self;
  502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  503. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLDebugger)});
  504. //>>excludeEnd("ctx");
  505. },
  506. //>>excludeStart("ide", pragmas.excludeIdeData);
  507. args: ["html"],
  508. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09html with: (HLContainer with: (HLVerticalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: (HLHorizontalSplitter\x0a\x09\x09\x09with: self stackListWidget\x0a\x09\x09\x09with: self inspectorWidget)))",
  509. referencedClasses: ["HLContainer", "HLVerticalSplitter", "HLHorizontalSplitter"],
  510. //>>excludeEnd("ide");
  511. messageSends: ["renderHeadOn:", "with:", "with:with:", "codeWidget", "stackListWidget", "inspectorWidget"]
  512. }),
  513. $globals.HLDebugger);
  514. $core.addMethod(
  515. $core.method({
  516. selector: "renderHeadOn:",
  517. protocol: 'rendering',
  518. fn: function (html){
  519. var self=this;
  520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  521. return $core.withContext(function($ctx1) {
  522. //>>excludeEnd("ctx");
  523. var $1,$2;
  524. $1=$recv(html)._div();
  525. $recv($1)._class_("head");
  526. $2=$recv($1)._with_((function(){
  527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  528. return $core.withContext(function($ctx2) {
  529. //>>excludeEnd("ctx");
  530. return $recv($recv(html)._h2())._with_($recv($recv(self._model())._error())._messageText());
  531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  532. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  533. //>>excludeEnd("ctx");
  534. }));
  535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  536. $ctx1.sendIdx["with:"]=1;
  537. //>>excludeEnd("ctx");
  538. return self;
  539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  540. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},$globals.HLDebugger)});
  541. //>>excludeEnd("ctx");
  542. },
  543. //>>excludeStart("ide", pragmas.excludeIdeData);
  544. args: ["html"],
  545. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'head'; \x0a\x09\x09with: [ html h2 with: self model error messageText ]",
  546. referencedClasses: [],
  547. //>>excludeEnd("ide");
  548. messageSends: ["class:", "div", "with:", "h2", "messageText", "error", "model"]
  549. }),
  550. $globals.HLDebugger);
  551. $core.addMethod(
  552. $core.method({
  553. selector: "stackListWidget",
  554. protocol: 'widgets',
  555. fn: function (){
  556. var self=this;
  557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  558. return $core.withContext(function($ctx1) {
  559. //>>excludeEnd("ctx");
  560. var $1,$2,$receiver;
  561. $1=self["@stackListWidget"];
  562. if(($receiver = $1) == null || $receiver.isNil){
  563. $2=$recv($globals.HLStackListWidget)._on_(self._model());
  564. $recv($2)._next_(self._codeWidget());
  565. self["@stackListWidget"]=$recv($2)._yourself();
  566. return self["@stackListWidget"];
  567. } else {
  568. return $1;
  569. };
  570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  571. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{},$globals.HLDebugger)});
  572. //>>excludeEnd("ctx");
  573. },
  574. //>>excludeStart("ide", pragmas.excludeIdeData);
  575. args: [],
  576. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  577. referencedClasses: ["HLStackListWidget"],
  578. //>>excludeEnd("ide");
  579. messageSends: ["ifNil:", "next:", "on:", "model", "codeWidget", "yourself"]
  580. }),
  581. $globals.HLDebugger);
  582. $core.addMethod(
  583. $core.method({
  584. selector: "unregister",
  585. protocol: 'actions',
  586. fn: function (){
  587. var self=this;
  588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  589. return $core.withContext(function($ctx1) {
  590. //>>excludeEnd("ctx");
  591. (
  592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  593. $ctx1.supercall = true,
  594. //>>excludeEnd("ctx");
  595. ($globals.HLDebugger.superclass||$boot.dnu).fn.prototype._unregister.apply($recv(self), []));
  596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  597. $ctx1.supercall = false;
  598. //>>excludeEnd("ctx");;
  599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  600. $ctx1.sendIdx["unregister"]=1;
  601. //>>excludeEnd("ctx");
  602. $recv(self._inspectorWidget())._unregister();
  603. return self;
  604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  605. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLDebugger)});
  606. //>>excludeEnd("ctx");
  607. },
  608. //>>excludeStart("ide", pragmas.excludeIdeData);
  609. args: [],
  610. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  611. referencedClasses: [],
  612. //>>excludeEnd("ide");
  613. messageSends: ["unregister", "inspectorWidget"]
  614. }),
  615. $globals.HLDebugger);
  616. $core.addMethod(
  617. $core.method({
  618. selector: "on:",
  619. protocol: 'instance creation',
  620. fn: function (anError){
  621. var self=this;
  622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  623. return $core.withContext(function($ctx1) {
  624. //>>excludeEnd("ctx");
  625. var $1;
  626. $1=self._new();
  627. $recv($1)._initializeFromError_(anError);
  628. return $recv($1)._yourself();
  629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  630. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError},$globals.HLDebugger.klass)});
  631. //>>excludeEnd("ctx");
  632. },
  633. //>>excludeStart("ide", pragmas.excludeIdeData);
  634. args: ["anError"],
  635. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  636. referencedClasses: [],
  637. //>>excludeEnd("ide");
  638. messageSends: ["initializeFromError:", "new", "yourself"]
  639. }),
  640. $globals.HLDebugger.klass);
  641. $core.addMethod(
  642. $core.method({
  643. selector: "tabClass",
  644. protocol: 'accessing',
  645. fn: function (){
  646. var self=this;
  647. return "debugger";
  648. },
  649. //>>excludeStart("ide", pragmas.excludeIdeData);
  650. args: [],
  651. source: "tabClass\x0a\x09^ 'debugger'",
  652. referencedClasses: [],
  653. //>>excludeEnd("ide");
  654. messageSends: []
  655. }),
  656. $globals.HLDebugger.klass);
  657. $core.addMethod(
  658. $core.method({
  659. selector: "tabLabel",
  660. protocol: 'accessing',
  661. fn: function (){
  662. var self=this;
  663. return "Debugger";
  664. },
  665. //>>excludeStart("ide", pragmas.excludeIdeData);
  666. args: [],
  667. source: "tabLabel\x0a\x09^ 'Debugger'",
  668. referencedClasses: [],
  669. //>>excludeEnd("ide");
  670. messageSends: []
  671. }),
  672. $globals.HLDebugger.klass);
  673. $core.addClass('HLDebuggerCodeModel', $globals.HLCodeModel, ['debuggerModel'], 'Helios-Debugger');
  674. $core.addMethod(
  675. $core.method({
  676. selector: "debuggerModel",
  677. protocol: 'accessing',
  678. fn: function (){
  679. var self=this;
  680. return self["@debuggerModel"];
  681. },
  682. //>>excludeStart("ide", pragmas.excludeIdeData);
  683. args: [],
  684. source: "debuggerModel\x0a\x09^ debuggerModel",
  685. referencedClasses: [],
  686. //>>excludeEnd("ide");
  687. messageSends: []
  688. }),
  689. $globals.HLDebuggerCodeModel);
  690. $core.addMethod(
  691. $core.method({
  692. selector: "debuggerModel:",
  693. protocol: 'accessing',
  694. fn: function (anObject){
  695. var self=this;
  696. self["@debuggerModel"]=anObject;
  697. return self;
  698. },
  699. //>>excludeStart("ide", pragmas.excludeIdeData);
  700. args: ["anObject"],
  701. source: "debuggerModel: anObject\x0a\x09debuggerModel := anObject",
  702. referencedClasses: [],
  703. //>>excludeEnd("ide");
  704. messageSends: []
  705. }),
  706. $globals.HLDebuggerCodeModel);
  707. $core.addMethod(
  708. $core.method({
  709. selector: "doIt:",
  710. protocol: 'actions',
  711. fn: function (aString){
  712. var self=this;
  713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  714. return $core.withContext(function($ctx1) {
  715. //>>excludeEnd("ctx");
  716. return $recv((function(){
  717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  718. return $core.withContext(function($ctx2) {
  719. //>>excludeEnd("ctx");
  720. return $recv(self._debuggerModel())._evaluate_(aString);
  721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  722. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  723. //>>excludeEnd("ctx");
  724. }))._tryCatch_((function(e){
  725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  726. return $core.withContext(function($ctx2) {
  727. //>>excludeEnd("ctx");
  728. $recv($globals.ErrorHandler)._handleError_(e);
  729. return nil;
  730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  731. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  732. //>>excludeEnd("ctx");
  733. }));
  734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  735. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString},$globals.HLDebuggerCodeModel)});
  736. //>>excludeEnd("ctx");
  737. },
  738. //>>excludeStart("ide", pragmas.excludeIdeData);
  739. args: ["aString"],
  740. source: "doIt: aString\x0a\x09^ [ self debuggerModel evaluate: aString ]\x0a\x09\x09tryCatch: [ :e | \x0a\x09\x09\x09ErrorHandler handleError: e.\x0a\x09\x09\x09nil ]",
  741. referencedClasses: ["ErrorHandler"],
  742. //>>excludeEnd("ide");
  743. messageSends: ["tryCatch:", "evaluate:", "debuggerModel", "handleError:"]
  744. }),
  745. $globals.HLDebuggerCodeModel);
  746. $core.addClass('HLDebuggerCodeWidget', $globals.HLBrowserCodeWidget, [], 'Helios-Debugger');
  747. $core.addMethod(
  748. $core.method({
  749. selector: "addStopAt:",
  750. protocol: 'actions',
  751. fn: function (anInteger){
  752. var self=this;
  753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  754. return $core.withContext(function($ctx1) {
  755. //>>excludeEnd("ctx");
  756. $recv(self["@editor"])._setGutterMarker_gutter_value_(anInteger,"stops",$recv($recv("<div class=\x22stop\x22></div>"._asJQuery())._toArray())._first());
  757. return self;
  758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  759. }, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger},$globals.HLDebuggerCodeWidget)});
  760. //>>excludeEnd("ctx");
  761. },
  762. //>>excludeStart("ide", pragmas.excludeIdeData);
  763. args: ["anInteger"],
  764. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></div>' asJQuery toArray first",
  765. referencedClasses: [],
  766. //>>excludeEnd("ide");
  767. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"]
  768. }),
  769. $globals.HLDebuggerCodeWidget);
  770. $core.addMethod(
  771. $core.method({
  772. selector: "clearHighlight",
  773. protocol: 'actions',
  774. fn: function (){
  775. var self=this;
  776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  777. return $core.withContext(function($ctx1) {
  778. //>>excludeEnd("ctx");
  779. $recv(self._editor())._clearGutter_("stops");
  780. return self;
  781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  782. }, function($ctx1) {$ctx1.fill(self,"clearHighlight",{},$globals.HLDebuggerCodeWidget)});
  783. //>>excludeEnd("ctx");
  784. },
  785. //>>excludeStart("ide", pragmas.excludeIdeData);
  786. args: [],
  787. source: "clearHighlight\x0a\x09self editor clearGutter: 'stops'",
  788. referencedClasses: [],
  789. //>>excludeEnd("ide");
  790. messageSends: ["clearGutter:", "editor"]
  791. }),
  792. $globals.HLDebuggerCodeWidget);
  793. $core.addMethod(
  794. $core.method({
  795. selector: "contents:",
  796. protocol: 'accessing',
  797. fn: function (aString){
  798. var self=this;
  799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  800. return $core.withContext(function($ctx1) {
  801. //>>excludeEnd("ctx");
  802. self._clearHighlight();
  803. (
  804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  805. $ctx1.supercall = true,
  806. //>>excludeEnd("ctx");
  807. ($globals.HLDebuggerCodeWidget.superclass||$boot.dnu).fn.prototype._contents_.apply($recv(self), [aString]));
  808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  809. $ctx1.supercall = false;
  810. //>>excludeEnd("ctx");;
  811. return self;
  812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  813. }, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},$globals.HLDebuggerCodeWidget)});
  814. //>>excludeEnd("ctx");
  815. },
  816. //>>excludeStart("ide", pragmas.excludeIdeData);
  817. args: ["aString"],
  818. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  819. referencedClasses: [],
  820. //>>excludeEnd("ide");
  821. messageSends: ["clearHighlight", "contents:"]
  822. }),
  823. $globals.HLDebuggerCodeWidget);
  824. $core.addMethod(
  825. $core.method({
  826. selector: "editorOptions",
  827. protocol: 'accessing',
  828. fn: function (){
  829. var self=this;
  830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  831. return $core.withContext(function($ctx1) {
  832. //>>excludeEnd("ctx");
  833. var $1;
  834. $1=(
  835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  836. $ctx1.supercall = true,
  837. //>>excludeEnd("ctx");
  838. ($globals.HLDebuggerCodeWidget.superclass||$boot.dnu).fn.prototype._editorOptions.apply($recv(self), []));
  839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  840. $ctx1.supercall = false;
  841. //>>excludeEnd("ctx");;
  842. $recv($1)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  843. return $recv($1)._yourself();
  844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  845. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},$globals.HLDebuggerCodeWidget)});
  846. //>>excludeEnd("ctx");
  847. },
  848. //>>excludeStart("ide", pragmas.excludeIdeData);
  849. args: [],
  850. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  851. referencedClasses: [],
  852. //>>excludeEnd("ide");
  853. messageSends: ["at:put:", "editorOptions", "yourself"]
  854. }),
  855. $globals.HLDebuggerCodeWidget);
  856. $core.addMethod(
  857. $core.method({
  858. selector: "highlight",
  859. protocol: 'actions',
  860. fn: function (){
  861. var self=this;
  862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  863. return $core.withContext(function($ctx1) {
  864. //>>excludeEnd("ctx");
  865. var $1,$receiver;
  866. $1=$recv(self._browserModel())._nextNode();
  867. if(($receiver = $1) == null || $receiver.isNil){
  868. $1;
  869. } else {
  870. var node;
  871. node=$receiver;
  872. self._highlightNode_(node);
  873. };
  874. return self;
  875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  876. }, function($ctx1) {$ctx1.fill(self,"highlight",{},$globals.HLDebuggerCodeWidget)});
  877. //>>excludeEnd("ctx");
  878. },
  879. //>>excludeStart("ide", pragmas.excludeIdeData);
  880. args: [],
  881. source: "highlight\x0a\x09self browserModel nextNode ifNotNil: [ :node |\x0a\x09\x09self highlightNode: node ]",
  882. referencedClasses: [],
  883. //>>excludeEnd("ide");
  884. messageSends: ["ifNotNil:", "nextNode", "browserModel", "highlightNode:"]
  885. }),
  886. $globals.HLDebuggerCodeWidget);
  887. $core.addMethod(
  888. $core.method({
  889. selector: "highlightNode:",
  890. protocol: 'actions',
  891. fn: function (aNode){
  892. var self=this;
  893. var token;
  894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  895. return $core.withContext(function($ctx1) {
  896. //>>excludeEnd("ctx");
  897. var $3,$2,$1,$4,$8,$7,$6,$10,$9,$5,$14,$13,$12,$11,$receiver;
  898. if(($receiver = aNode) == null || $receiver.isNil){
  899. aNode;
  900. } else {
  901. self._clearHighlight();
  902. $3=$recv(aNode)._positionStart();
  903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  904. $ctx1.sendIdx["positionStart"]=1;
  905. //>>excludeEnd("ctx");
  906. $2=$recv($3)._x();
  907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  908. $ctx1.sendIdx["x"]=1;
  909. //>>excludeEnd("ctx");
  910. $1=$recv($2).__minus((1));
  911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  912. $ctx1.sendIdx["-"]=1;
  913. //>>excludeEnd("ctx");
  914. self._addStopAt_($1);
  915. $4=self._editor();
  916. $8=$recv(aNode)._positionStart();
  917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  918. $ctx1.sendIdx["positionStart"]=2;
  919. //>>excludeEnd("ctx");
  920. $7=$recv($8)._x();
  921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  922. $ctx1.sendIdx["x"]=2;
  923. //>>excludeEnd("ctx");
  924. $6=$recv($7).__minus((1));
  925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  926. $ctx1.sendIdx["-"]=2;
  927. //>>excludeEnd("ctx");
  928. $10=$recv($recv(aNode)._positionStart())._y();
  929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  930. $ctx1.sendIdx["y"]=1;
  931. //>>excludeEnd("ctx");
  932. $9=$recv($10).__minus((1));
  933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  934. $ctx1.sendIdx["-"]=3;
  935. //>>excludeEnd("ctx");
  936. $5=$globals.HashedCollection._newFromPairs_(["line",$6,"ch",$9]);
  937. $14=$recv(aNode)._positionEnd();
  938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  939. $ctx1.sendIdx["positionEnd"]=1;
  940. //>>excludeEnd("ctx");
  941. $13=$recv($14)._x();
  942. $12=$recv($13).__minus((1));
  943. $11=$globals.HashedCollection._newFromPairs_(["line",$12,"ch",$recv($recv(aNode)._positionEnd())._y()]);
  944. $recv($4)._setSelection_to_($5,$11);
  945. };
  946. return self;
  947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  948. }, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token},$globals.HLDebuggerCodeWidget)});
  949. //>>excludeEnd("ctx");
  950. },
  951. //>>excludeStart("ide", pragmas.excludeIdeData);
  952. args: ["aNode"],
  953. source: "highlightNode: aNode\x0a\x09| token |\x0a\x09\x0a\x09aNode ifNotNil: [\x0a\x09\x09self\x0a\x09\x09\x09clearHighlight;\x0a\x09\x09\x09addStopAt: aNode positionStart x - 1.\x0a\x0a\x09\x09self editor \x0a\x09\x09\x09setSelection: #{ 'line' -> (aNode positionStart x - 1). 'ch' -> (aNode positionStart y - 1) }\x0a\x09\x09\x09to: #{ 'line' -> (aNode positionEnd x - 1). 'ch' -> (aNode positionEnd y) } ]",
  954. referencedClasses: [],
  955. //>>excludeEnd("ide");
  956. messageSends: ["ifNotNil:", "clearHighlight", "addStopAt:", "-", "x", "positionStart", "setSelection:to:", "editor", "y", "positionEnd"]
  957. }),
  958. $globals.HLDebuggerCodeWidget);
  959. $core.addMethod(
  960. $core.method({
  961. selector: "observeBrowserModel",
  962. protocol: 'actions',
  963. fn: function (){
  964. var self=this;
  965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  966. return $core.withContext(function($ctx1) {
  967. //>>excludeEnd("ctx");
  968. var $2,$1,$4,$3;
  969. (
  970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  971. $ctx1.supercall = true,
  972. //>>excludeEnd("ctx");
  973. ($globals.HLDebuggerCodeWidget.superclass||$boot.dnu).fn.prototype._observeBrowserModel.apply($recv(self), []));
  974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  975. $ctx1.supercall = false;
  976. //>>excludeEnd("ctx");;
  977. $2=self._browserModel();
  978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  979. $ctx1.sendIdx["browserModel"]=1;
  980. //>>excludeEnd("ctx");
  981. $1=$recv($2)._announcer();
  982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  983. $ctx1.sendIdx["announcer"]=1;
  984. //>>excludeEnd("ctx");
  985. $recv($1)._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected",self);
  986. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  987. $ctx1.sendIdx["on:send:to:"]=1;
  988. //>>excludeEnd("ctx");
  989. $4=self._browserModel();
  990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  991. $ctx1.sendIdx["browserModel"]=2;
  992. //>>excludeEnd("ctx");
  993. $3=$recv($4)._announcer();
  994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  995. $ctx1.sendIdx["announcer"]=2;
  996. //>>excludeEnd("ctx");
  997. $recv($3)._on_send_to_($globals.HLDebuggerStepped,"onContextSelected",self);
  998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  999. $ctx1.sendIdx["on:send:to:"]=2;
  1000. //>>excludeEnd("ctx");
  1001. $recv($recv(self._browserModel())._announcer())._on_send_to_($globals.HLDebuggerWhere,"onContextSelected",self);
  1002. return self;
  1003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1004. }, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},$globals.HLDebuggerCodeWidget)});
  1005. //>>excludeEnd("ctx");
  1006. },
  1007. //>>excludeStart("ide", pragmas.excludeIdeData);
  1008. args: [],
  1009. source: "observeBrowserModel\x0a\x09super observeBrowserModel.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerWhere\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self",
  1010. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerWhere"],
  1011. //>>excludeEnd("ide");
  1012. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"]
  1013. }),
  1014. $globals.HLDebuggerCodeWidget);
  1015. $core.addMethod(
  1016. $core.method({
  1017. selector: "onContextSelected",
  1018. protocol: 'reactions',
  1019. fn: function (){
  1020. var self=this;
  1021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1022. return $core.withContext(function($ctx1) {
  1023. //>>excludeEnd("ctx");
  1024. self._highlight();
  1025. return self;
  1026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1027. }, function($ctx1) {$ctx1.fill(self,"onContextSelected",{},$globals.HLDebuggerCodeWidget)});
  1028. //>>excludeEnd("ctx");
  1029. },
  1030. //>>excludeStart("ide", pragmas.excludeIdeData);
  1031. args: [],
  1032. source: "onContextSelected\x0a\x09self highlight",
  1033. referencedClasses: [],
  1034. //>>excludeEnd("ide");
  1035. messageSends: ["highlight"]
  1036. }),
  1037. $globals.HLDebuggerCodeWidget);
  1038. $core.addMethod(
  1039. $core.method({
  1040. selector: "renderOn:",
  1041. protocol: 'rendering',
  1042. fn: function (html){
  1043. var self=this;
  1044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1045. return $core.withContext(function($ctx1) {
  1046. //>>excludeEnd("ctx");
  1047. (
  1048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1049. $ctx1.supercall = true,
  1050. //>>excludeEnd("ctx");
  1051. ($globals.HLDebuggerCodeWidget.superclass||$boot.dnu).fn.prototype._renderOn_.apply($recv(self), [html]));
  1052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1053. $ctx1.supercall = false;
  1054. //>>excludeEnd("ctx");;
  1055. self._contents_($recv($recv(self._browserModel())._selectedMethod())._source());
  1056. return self;
  1057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1058. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLDebuggerCodeWidget)});
  1059. //>>excludeEnd("ctx");
  1060. },
  1061. //>>excludeStart("ide", pragmas.excludeIdeData);
  1062. args: ["html"],
  1063. source: "renderOn: html\x0a\x09super renderOn: html.\x0a\x09self contents: self browserModel selectedMethod source",
  1064. referencedClasses: [],
  1065. //>>excludeEnd("ide");
  1066. messageSends: ["renderOn:", "contents:", "source", "selectedMethod", "browserModel"]
  1067. }),
  1068. $globals.HLDebuggerCodeWidget);
  1069. $core.addClass('HLDebuggerModel', $globals.HLToolModel, ['rootContext', 'debugger', 'error'], 'Helios-Debugger');
  1070. //>>excludeStart("ide", pragmas.excludeIdeData);
  1071. $globals.HLDebuggerModel.comment="I am a model for debugging Amber code in Helios.\x0a\x0aMy instances hold a reference to an `ASTDebugger` instance, itself referencing the current `context`. The context should be the root of the context stack.";
  1072. //>>excludeEnd("ide");
  1073. $core.addMethod(
  1074. $core.method({
  1075. selector: "atEnd",
  1076. protocol: 'testing',
  1077. fn: function (){
  1078. var self=this;
  1079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1080. return $core.withContext(function($ctx1) {
  1081. //>>excludeEnd("ctx");
  1082. return $recv(self._debugger())._atEnd();
  1083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1084. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},$globals.HLDebuggerModel)});
  1085. //>>excludeEnd("ctx");
  1086. },
  1087. //>>excludeStart("ide", pragmas.excludeIdeData);
  1088. args: [],
  1089. source: "atEnd\x0a\x09^ self debugger atEnd",
  1090. referencedClasses: [],
  1091. //>>excludeEnd("ide");
  1092. messageSends: ["atEnd", "debugger"]
  1093. }),
  1094. $globals.HLDebuggerModel);
  1095. $core.addMethod(
  1096. $core.method({
  1097. selector: "contexts",
  1098. protocol: 'accessing',
  1099. fn: function (){
  1100. var self=this;
  1101. var contexts,context;
  1102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1103. return $core.withContext(function($ctx1) {
  1104. //>>excludeEnd("ctx");
  1105. contexts=$recv($globals.OrderedCollection)._new();
  1106. context=self._rootContext();
  1107. $recv((function(){
  1108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1109. return $core.withContext(function($ctx2) {
  1110. //>>excludeEnd("ctx");
  1111. return $recv(context)._notNil();
  1112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1113. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1114. //>>excludeEnd("ctx");
  1115. }))._whileTrue_((function(){
  1116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1117. return $core.withContext(function($ctx2) {
  1118. //>>excludeEnd("ctx");
  1119. $recv(contexts)._add_(context);
  1120. context=$recv(context)._outerContext();
  1121. return context;
  1122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1123. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1124. //>>excludeEnd("ctx");
  1125. }));
  1126. return contexts;
  1127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1128. }, function($ctx1) {$ctx1.fill(self,"contexts",{contexts:contexts,context:context},$globals.HLDebuggerModel)});
  1129. //>>excludeEnd("ctx");
  1130. },
  1131. //>>excludeStart("ide", pragmas.excludeIdeData);
  1132. args: [],
  1133. source: "contexts\x0a\x09| contexts context |\x0a\x09\x0a\x09contexts := OrderedCollection new.\x0a\x09context := self rootContext.\x0a\x09\x0a\x09[ context notNil ] whileTrue: [\x0a\x09\x09contexts add: context.\x0a\x09\x09context := context outerContext ].\x0a\x09\x09\x0a\x09^ contexts",
  1134. referencedClasses: ["OrderedCollection"],
  1135. //>>excludeEnd("ide");
  1136. messageSends: ["new", "rootContext", "whileTrue:", "notNil", "add:", "outerContext"]
  1137. }),
  1138. $globals.HLDebuggerModel);
  1139. $core.addMethod(
  1140. $core.method({
  1141. selector: "currentContext",
  1142. protocol: 'accessing',
  1143. fn: function (){
  1144. var self=this;
  1145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1146. return $core.withContext(function($ctx1) {
  1147. //>>excludeEnd("ctx");
  1148. return $recv(self._debugger())._context();
  1149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1150. }, function($ctx1) {$ctx1.fill(self,"currentContext",{},$globals.HLDebuggerModel)});
  1151. //>>excludeEnd("ctx");
  1152. },
  1153. //>>excludeStart("ide", pragmas.excludeIdeData);
  1154. args: [],
  1155. source: "currentContext\x0a\x09^ self debugger context",
  1156. referencedClasses: [],
  1157. //>>excludeEnd("ide");
  1158. messageSends: ["context", "debugger"]
  1159. }),
  1160. $globals.HLDebuggerModel);
  1161. $core.addMethod(
  1162. $core.method({
  1163. selector: "currentContext:",
  1164. protocol: 'accessing',
  1165. fn: function (aContext){
  1166. var self=this;
  1167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1168. return $core.withContext(function($ctx1) {
  1169. //>>excludeEnd("ctx");
  1170. var $1,$3,$2;
  1171. self._withChangesDo_((function(){
  1172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1173. return $core.withContext(function($ctx2) {
  1174. //>>excludeEnd("ctx");
  1175. self._selectedMethod_($recv(aContext)._method());
  1176. $recv(self._debugger())._context_(aContext);
  1177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1178. $ctx2.sendIdx["context:"]=1;
  1179. //>>excludeEnd("ctx");
  1180. $1=self._announcer();
  1181. $3=$recv($globals.HLDebuggerContextSelected)._new();
  1182. $recv($3)._context_(aContext);
  1183. $2=$recv($3)._yourself();
  1184. return $recv($1)._announce_($2);
  1185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1186. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1187. //>>excludeEnd("ctx");
  1188. }));
  1189. return self;
  1190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1191. }, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext},$globals.HLDebuggerModel)});
  1192. //>>excludeEnd("ctx");
  1193. },
  1194. //>>excludeStart("ide", pragmas.excludeIdeData);
  1195. args: ["aContext"],
  1196. source: "currentContext: aContext\x0a\x09self withChangesDo: [ \x0a\x09\x09self selectedMethod: aContext method.\x0a\x09\x09self debugger context: aContext.\x0a\x09\x09self announcer announce: (HLDebuggerContextSelected new\x0a\x09\x09\x09context: aContext;\x0a\x09\x09\x09yourself) ]",
  1197. referencedClasses: ["HLDebuggerContextSelected"],
  1198. //>>excludeEnd("ide");
  1199. messageSends: ["withChangesDo:", "selectedMethod:", "method", "context:", "debugger", "announce:", "announcer", "new", "yourself"]
  1200. }),
  1201. $globals.HLDebuggerModel);
  1202. $core.addMethod(
  1203. $core.method({
  1204. selector: "debugger",
  1205. protocol: 'accessing',
  1206. fn: function (){
  1207. var self=this;
  1208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1209. return $core.withContext(function($ctx1) {
  1210. //>>excludeEnd("ctx");
  1211. var $1,$receiver;
  1212. $1=self["@debugger"];
  1213. if(($receiver = $1) == null || $receiver.isNil){
  1214. self["@debugger"]=$recv($globals.ASTDebugger)._new();
  1215. return self["@debugger"];
  1216. } else {
  1217. return $1;
  1218. };
  1219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1220. }, function($ctx1) {$ctx1.fill(self,"debugger",{},$globals.HLDebuggerModel)});
  1221. //>>excludeEnd("ctx");
  1222. },
  1223. //>>excludeStart("ide", pragmas.excludeIdeData);
  1224. args: [],
  1225. source: "debugger\x0a\x09^ debugger ifNil: [ debugger := ASTDebugger new ]",
  1226. referencedClasses: ["ASTDebugger"],
  1227. //>>excludeEnd("ide");
  1228. messageSends: ["ifNil:", "new"]
  1229. }),
  1230. $globals.HLDebuggerModel);
  1231. $core.addMethod(
  1232. $core.method({
  1233. selector: "error",
  1234. protocol: 'accessing',
  1235. fn: function (){
  1236. var self=this;
  1237. return self["@error"];
  1238. },
  1239. //>>excludeStart("ide", pragmas.excludeIdeData);
  1240. args: [],
  1241. source: "error\x0a\x09^ error",
  1242. referencedClasses: [],
  1243. //>>excludeEnd("ide");
  1244. messageSends: []
  1245. }),
  1246. $globals.HLDebuggerModel);
  1247. $core.addMethod(
  1248. $core.method({
  1249. selector: "evaluate:",
  1250. protocol: 'evaluating',
  1251. fn: function (aString){
  1252. var self=this;
  1253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1254. return $core.withContext(function($ctx1) {
  1255. //>>excludeEnd("ctx");
  1256. return $recv(self._environment())._evaluate_for_(aString,self._currentContext());
  1257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1258. }, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString},$globals.HLDebuggerModel)});
  1259. //>>excludeEnd("ctx");
  1260. },
  1261. //>>excludeStart("ide", pragmas.excludeIdeData);
  1262. args: ["aString"],
  1263. source: "evaluate: aString\x0a\x09^ self environment \x0a\x09\x09evaluate: aString \x0a\x09\x09for: self currentContext",
  1264. referencedClasses: [],
  1265. //>>excludeEnd("ide");
  1266. messageSends: ["evaluate:for:", "environment", "currentContext"]
  1267. }),
  1268. $globals.HLDebuggerModel);
  1269. $core.addMethod(
  1270. $core.method({
  1271. selector: "flushInnerContexts",
  1272. protocol: 'private',
  1273. fn: function (){
  1274. var self=this;
  1275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1276. return $core.withContext(function($ctx1) {
  1277. //>>excludeEnd("ctx");
  1278. var $1;
  1279. $1=self._currentContext();
  1280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1281. $ctx1.sendIdx["currentContext"]=1;
  1282. //>>excludeEnd("ctx");
  1283. $recv($1)._innerContext_(nil);
  1284. self["@rootContext"]=self._currentContext();
  1285. self._initializeContexts();
  1286. return self;
  1287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1288. }, function($ctx1) {$ctx1.fill(self,"flushInnerContexts",{},$globals.HLDebuggerModel)});
  1289. //>>excludeEnd("ctx");
  1290. },
  1291. //>>excludeStart("ide", pragmas.excludeIdeData);
  1292. args: [],
  1293. source: "flushInnerContexts\x0a\x09\x22When stepping, the inner contexts are not relevent anymore,\x0a\x09and can be flushed\x22\x0a\x09\x0a\x09self currentContext innerContext: nil.\x0a\x09rootContext := self currentContext.\x0a\x09self initializeContexts",
  1294. referencedClasses: [],
  1295. //>>excludeEnd("ide");
  1296. messageSends: ["innerContext:", "currentContext", "initializeContexts"]
  1297. }),
  1298. $globals.HLDebuggerModel);
  1299. $core.addMethod(
  1300. $core.method({
  1301. selector: "initializeFromError:",
  1302. protocol: 'initialization',
  1303. fn: function (anError){
  1304. var self=this;
  1305. var errorContext;
  1306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1307. return $core.withContext(function($ctx1) {
  1308. //>>excludeEnd("ctx");
  1309. self["@error"]=anError;
  1310. errorContext=$recv($globals.AIContext)._fromMethodContext_($recv(self["@error"])._context());
  1311. self["@rootContext"]=$recv(self["@error"])._signalerContextFrom_(errorContext);
  1312. self._selectedMethod_($recv(self["@rootContext"])._method());
  1313. return self;
  1314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1315. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError,errorContext:errorContext},$globals.HLDebuggerModel)});
  1316. //>>excludeEnd("ctx");
  1317. },
  1318. //>>excludeStart("ide", pragmas.excludeIdeData);
  1319. args: ["anError"],
  1320. source: "initializeFromError: anError\x0a\x09| errorContext |\x0a\x09\x0a\x09error := anError.\x0a\x09errorContext := (AIContext fromMethodContext: error context).\x0a\x09rootContext := error signalerContextFrom: errorContext.\x0a\x09self selectedMethod: rootContext method",
  1321. referencedClasses: ["AIContext"],
  1322. //>>excludeEnd("ide");
  1323. messageSends: ["fromMethodContext:", "context", "signalerContextFrom:", "selectedMethod:", "method"]
  1324. }),
  1325. $globals.HLDebuggerModel);
  1326. $core.addMethod(
  1327. $core.method({
  1328. selector: "nextNode",
  1329. protocol: 'accessing',
  1330. fn: function (){
  1331. var self=this;
  1332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1333. return $core.withContext(function($ctx1) {
  1334. //>>excludeEnd("ctx");
  1335. return $recv(self._debugger())._node();
  1336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1337. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},$globals.HLDebuggerModel)});
  1338. //>>excludeEnd("ctx");
  1339. },
  1340. //>>excludeStart("ide", pragmas.excludeIdeData);
  1341. args: [],
  1342. source: "nextNode\x0a\x09^ self debugger node",
  1343. referencedClasses: [],
  1344. //>>excludeEnd("ide");
  1345. messageSends: ["node", "debugger"]
  1346. }),
  1347. $globals.HLDebuggerModel);
  1348. $core.addMethod(
  1349. $core.method({
  1350. selector: "onStep",
  1351. protocol: 'reactions',
  1352. fn: function (){
  1353. var self=this;
  1354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1355. return $core.withContext(function($ctx1) {
  1356. //>>excludeEnd("ctx");
  1357. var $2,$1,$3,$5,$4;
  1358. self["@rootContext"]=self._currentContext();
  1359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1360. $ctx1.sendIdx["currentContext"]=1;
  1361. //>>excludeEnd("ctx");
  1362. $2=self._currentContext();
  1363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1364. $ctx1.sendIdx["currentContext"]=2;
  1365. //>>excludeEnd("ctx");
  1366. $1=$recv($2)._method();
  1367. self._selectedMethod_($1);
  1368. $3=self._announcer();
  1369. $5=$recv($globals.HLDebuggerContextSelected)._new();
  1370. $recv($5)._context_(self._currentContext());
  1371. $4=$recv($5)._yourself();
  1372. $recv($3)._announce_($4);
  1373. return self;
  1374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1375. }, function($ctx1) {$ctx1.fill(self,"onStep",{},$globals.HLDebuggerModel)});
  1376. //>>excludeEnd("ctx");
  1377. },
  1378. //>>excludeStart("ide", pragmas.excludeIdeData);
  1379. args: [],
  1380. source: "onStep\x0a\x09rootContext := self currentContext.\x0a\x09\x0a\x09\x22Force a refresh of the context list and code widget\x22\x0a\x09self selectedMethod: self currentContext method.\x0a\x09self announcer announce: (HLDebuggerContextSelected new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  1381. referencedClasses: ["HLDebuggerContextSelected"],
  1382. //>>excludeEnd("ide");
  1383. messageSends: ["currentContext", "selectedMethod:", "method", "announce:", "announcer", "context:", "new", "yourself"]
  1384. }),
  1385. $globals.HLDebuggerModel);
  1386. $core.addMethod(
  1387. $core.method({
  1388. selector: "proceed",
  1389. protocol: 'actions',
  1390. fn: function (){
  1391. var self=this;
  1392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1393. return $core.withContext(function($ctx1) {
  1394. //>>excludeEnd("ctx");
  1395. $recv(self._debugger())._proceed();
  1396. $recv(self._announcer())._announce_($recv($globals.HLDebuggerProceeded)._new());
  1397. return self;
  1398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1399. }, function($ctx1) {$ctx1.fill(self,"proceed",{},$globals.HLDebuggerModel)});
  1400. //>>excludeEnd("ctx");
  1401. },
  1402. //>>excludeStart("ide", pragmas.excludeIdeData);
  1403. args: [],
  1404. source: "proceed\x0a\x09self debugger proceed.\x0a\x09\x0a\x09self announcer announce: HLDebuggerProceeded new",
  1405. referencedClasses: ["HLDebuggerProceeded"],
  1406. //>>excludeEnd("ide");
  1407. messageSends: ["proceed", "debugger", "announce:", "announcer", "new"]
  1408. }),
  1409. $globals.HLDebuggerModel);
  1410. $core.addMethod(
  1411. $core.method({
  1412. selector: "restart",
  1413. protocol: 'actions',
  1414. fn: function (){
  1415. var self=this;
  1416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1417. return $core.withContext(function($ctx1) {
  1418. //>>excludeEnd("ctx");
  1419. var $1,$3,$2;
  1420. $recv(self._debugger())._restart();
  1421. self._onStep();
  1422. $1=self._announcer();
  1423. $3=$recv($globals.HLDebuggerStepped)._new();
  1424. $recv($3)._context_(self._currentContext());
  1425. $2=$recv($3)._yourself();
  1426. $recv($1)._announce_($2);
  1427. return self;
  1428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1429. }, function($ctx1) {$ctx1.fill(self,"restart",{},$globals.HLDebuggerModel)});
  1430. //>>excludeEnd("ctx");
  1431. },
  1432. //>>excludeStart("ide", pragmas.excludeIdeData);
  1433. args: [],
  1434. source: "restart\x0a\x09self debugger restart.\x0a\x09self onStep.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  1435. referencedClasses: ["HLDebuggerStepped"],
  1436. //>>excludeEnd("ide");
  1437. messageSends: ["restart", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1438. }),
  1439. $globals.HLDebuggerModel);
  1440. $core.addMethod(
  1441. $core.method({
  1442. selector: "rootContext",
  1443. protocol: 'accessing',
  1444. fn: function (){
  1445. var self=this;
  1446. return self["@rootContext"];
  1447. },
  1448. //>>excludeStart("ide", pragmas.excludeIdeData);
  1449. args: [],
  1450. source: "rootContext\x0a\x09^ rootContext",
  1451. referencedClasses: [],
  1452. //>>excludeEnd("ide");
  1453. messageSends: []
  1454. }),
  1455. $globals.HLDebuggerModel);
  1456. $core.addMethod(
  1457. $core.method({
  1458. selector: "stepOver",
  1459. protocol: 'actions',
  1460. fn: function (){
  1461. var self=this;
  1462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1463. return $core.withContext(function($ctx1) {
  1464. //>>excludeEnd("ctx");
  1465. var $1,$3,$2;
  1466. $recv(self._debugger())._stepOver();
  1467. self._onStep();
  1468. $1=self._announcer();
  1469. $3=$recv($globals.HLDebuggerStepped)._new();
  1470. $recv($3)._context_(self._currentContext());
  1471. $2=$recv($3)._yourself();
  1472. $recv($1)._announce_($2);
  1473. return self;
  1474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1475. }, function($ctx1) {$ctx1.fill(self,"stepOver",{},$globals.HLDebuggerModel)});
  1476. //>>excludeEnd("ctx");
  1477. },
  1478. //>>excludeStart("ide", pragmas.excludeIdeData);
  1479. args: [],
  1480. source: "stepOver\x0a\x09self debugger stepOver.\x0a\x09self onStep.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  1481. referencedClasses: ["HLDebuggerStepped"],
  1482. //>>excludeEnd("ide");
  1483. messageSends: ["stepOver", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1484. }),
  1485. $globals.HLDebuggerModel);
  1486. $core.addMethod(
  1487. $core.method({
  1488. selector: "where",
  1489. protocol: 'actions',
  1490. fn: function (){
  1491. var self=this;
  1492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1493. return $core.withContext(function($ctx1) {
  1494. //>>excludeEnd("ctx");
  1495. $recv(self._announcer())._announce_($recv($globals.HLDebuggerWhere)._new());
  1496. return self;
  1497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1498. }, function($ctx1) {$ctx1.fill(self,"where",{},$globals.HLDebuggerModel)});
  1499. //>>excludeEnd("ctx");
  1500. },
  1501. //>>excludeStart("ide", pragmas.excludeIdeData);
  1502. args: [],
  1503. source: "where\x0a\x09self announcer announce: HLDebuggerWhere new",
  1504. referencedClasses: ["HLDebuggerWhere"],
  1505. //>>excludeEnd("ide");
  1506. messageSends: ["announce:", "announcer", "new"]
  1507. }),
  1508. $globals.HLDebuggerModel);
  1509. $core.addMethod(
  1510. $core.method({
  1511. selector: "on:",
  1512. protocol: 'instance creation',
  1513. fn: function (anError){
  1514. var self=this;
  1515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1516. return $core.withContext(function($ctx1) {
  1517. //>>excludeEnd("ctx");
  1518. var $1;
  1519. $1=self._new();
  1520. $recv($1)._initializeFromError_(anError);
  1521. return $recv($1)._yourself();
  1522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1523. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError},$globals.HLDebuggerModel.klass)});
  1524. //>>excludeEnd("ctx");
  1525. },
  1526. //>>excludeStart("ide", pragmas.excludeIdeData);
  1527. args: ["anError"],
  1528. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  1529. referencedClasses: [],
  1530. //>>excludeEnd("ide");
  1531. messageSends: ["initializeFromError:", "new", "yourself"]
  1532. }),
  1533. $globals.HLDebuggerModel.klass);
  1534. $core.addClass('HLErrorHandler', $globals.Object, [], 'Helios-Debugger');
  1535. $core.addMethod(
  1536. $core.method({
  1537. selector: "confirmDebugError:",
  1538. protocol: 'error handling',
  1539. fn: function (anError){
  1540. var self=this;
  1541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1542. return $core.withContext(function($ctx1) {
  1543. //>>excludeEnd("ctx");
  1544. var $1;
  1545. $1=$recv($globals.HLConfirmationWidget)._new();
  1546. $recv($1)._confirmationString_($recv(anError)._messageText());
  1547. $recv($1)._actionBlock_((function(){
  1548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1549. return $core.withContext(function($ctx2) {
  1550. //>>excludeEnd("ctx");
  1551. return self._debugError_(anError);
  1552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1553. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1554. //>>excludeEnd("ctx");
  1555. }));
  1556. $recv($1)._cancelButtonLabel_("Abandon");
  1557. $recv($1)._confirmButtonLabel_("Debug");
  1558. $recv($1)._show();
  1559. return self;
  1560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1561. }, function($ctx1) {$ctx1.fill(self,"confirmDebugError:",{anError:anError},$globals.HLErrorHandler)});
  1562. //>>excludeEnd("ctx");
  1563. },
  1564. //>>excludeStart("ide", pragmas.excludeIdeData);
  1565. args: ["anError"],
  1566. source: "confirmDebugError: anError\x0a\x09HLConfirmationWidget new\x0a\x09\x09confirmationString: anError messageText;\x0a\x09\x09actionBlock: [ self debugError: anError ];\x0a\x09\x09cancelButtonLabel: 'Abandon';\x0a\x09\x09confirmButtonLabel: 'Debug';\x0a\x09\x09show",
  1567. referencedClasses: ["HLConfirmationWidget"],
  1568. //>>excludeEnd("ide");
  1569. messageSends: ["confirmationString:", "new", "messageText", "actionBlock:", "debugError:", "cancelButtonLabel:", "confirmButtonLabel:", "show"]
  1570. }),
  1571. $globals.HLErrorHandler);
  1572. $core.addMethod(
  1573. $core.method({
  1574. selector: "debugError:",
  1575. protocol: 'error handling',
  1576. fn: function (anError){
  1577. var self=this;
  1578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1579. return $core.withContext(function($ctx1) {
  1580. //>>excludeEnd("ctx");
  1581. $recv((function(){
  1582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1583. return $core.withContext(function($ctx2) {
  1584. //>>excludeEnd("ctx");
  1585. return $recv($recv($globals.HLDebugger)._on_(anError))._openAsTab();
  1586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1587. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1588. //>>excludeEnd("ctx");
  1589. }))._on_do_($globals.Error,(function(error){
  1590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1591. return $core.withContext(function($ctx2) {
  1592. //>>excludeEnd("ctx");
  1593. return $recv($recv($globals.ConsoleErrorHandler)._new())._handleError_(error);
  1594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1595. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  1596. //>>excludeEnd("ctx");
  1597. }));
  1598. return self;
  1599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1600. }, function($ctx1) {$ctx1.fill(self,"debugError:",{anError:anError},$globals.HLErrorHandler)});
  1601. //>>excludeEnd("ctx");
  1602. },
  1603. //>>excludeStart("ide", pragmas.excludeIdeData);
  1604. args: ["anError"],
  1605. source: "debugError: anError\x0a\x0a\x09[ \x0a\x09\x09(HLDebugger on: anError) openAsTab \x0a\x09] \x0a\x09\x09on: Error \x0a\x09\x09do: [ :error | ConsoleErrorHandler new handleError: error ]",
  1606. referencedClasses: ["HLDebugger", "Error", "ConsoleErrorHandler"],
  1607. //>>excludeEnd("ide");
  1608. messageSends: ["on:do:", "openAsTab", "on:", "handleError:", "new"]
  1609. }),
  1610. $globals.HLErrorHandler);
  1611. $core.addMethod(
  1612. $core.method({
  1613. selector: "handleError:",
  1614. protocol: 'error handling',
  1615. fn: function (anError){
  1616. var self=this;
  1617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1618. return $core.withContext(function($ctx1) {
  1619. //>>excludeEnd("ctx");
  1620. self._confirmDebugError_(anError);
  1621. return self;
  1622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1623. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.HLErrorHandler)});
  1624. //>>excludeEnd("ctx");
  1625. },
  1626. //>>excludeStart("ide", pragmas.excludeIdeData);
  1627. args: ["anError"],
  1628. source: "handleError: anError\x0a\x09self confirmDebugError: anError",
  1629. referencedClasses: [],
  1630. //>>excludeEnd("ide");
  1631. messageSends: ["confirmDebugError:"]
  1632. }),
  1633. $globals.HLErrorHandler);
  1634. $core.addMethod(
  1635. $core.method({
  1636. selector: "onErrorHandled",
  1637. protocol: 'error handling',
  1638. fn: function (){
  1639. var self=this;
  1640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1641. return $core.withContext(function($ctx1) {
  1642. //>>excludeEnd("ctx");
  1643. var $1;
  1644. $1=$recv($globals.HLProgressWidget)._default();
  1645. $recv($1)._flush();
  1646. $recv($1)._remove();
  1647. return self;
  1648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1649. }, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{},$globals.HLErrorHandler)});
  1650. //>>excludeEnd("ctx");
  1651. },
  1652. //>>excludeStart("ide", pragmas.excludeIdeData);
  1653. args: [],
  1654. source: "onErrorHandled\x0a\x09\x22when an error is handled, we need to make sure that\x0a\x09any progress bar widget gets removed. Because HLProgressBarWidget is asynchronous,\x0a\x09it has to be done here.\x22\x0a\x09\x0a\x09HLProgressWidget default \x0a\x09\x09flush; \x0a\x09\x09remove",
  1655. referencedClasses: ["HLProgressWidget"],
  1656. //>>excludeEnd("ide");
  1657. messageSends: ["flush", "default", "remove"]
  1658. }),
  1659. $globals.HLErrorHandler);
  1660. $core.addClass('HLStackListWidget', $globals.HLToolListWidget, [], 'Helios-Debugger');
  1661. $core.addMethod(
  1662. $core.method({
  1663. selector: "items",
  1664. protocol: 'accessing',
  1665. fn: function (){
  1666. var self=this;
  1667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1668. return $core.withContext(function($ctx1) {
  1669. //>>excludeEnd("ctx");
  1670. return $recv(self._model())._contexts();
  1671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1672. }, function($ctx1) {$ctx1.fill(self,"items",{},$globals.HLStackListWidget)});
  1673. //>>excludeEnd("ctx");
  1674. },
  1675. //>>excludeStart("ide", pragmas.excludeIdeData);
  1676. args: [],
  1677. source: "items\x0a\x09^ self model contexts",
  1678. referencedClasses: [],
  1679. //>>excludeEnd("ide");
  1680. messageSends: ["contexts", "model"]
  1681. }),
  1682. $globals.HLStackListWidget);
  1683. $core.addMethod(
  1684. $core.method({
  1685. selector: "label",
  1686. protocol: 'accessing',
  1687. fn: function (){
  1688. var self=this;
  1689. return "Call stack";
  1690. },
  1691. //>>excludeStart("ide", pragmas.excludeIdeData);
  1692. args: [],
  1693. source: "label\x0a\x09^ 'Call stack'",
  1694. referencedClasses: [],
  1695. //>>excludeEnd("ide");
  1696. messageSends: []
  1697. }),
  1698. $globals.HLStackListWidget);
  1699. $core.addMethod(
  1700. $core.method({
  1701. selector: "observeModel",
  1702. protocol: 'actions',
  1703. fn: function (){
  1704. var self=this;
  1705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1706. return $core.withContext(function($ctx1) {
  1707. //>>excludeEnd("ctx");
  1708. (
  1709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1710. $ctx1.supercall = true,
  1711. //>>excludeEnd("ctx");
  1712. ($globals.HLStackListWidget.superclass||$boot.dnu).fn.prototype._observeModel.apply($recv(self), []));
  1713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1714. $ctx1.supercall = false;
  1715. //>>excludeEnd("ctx");;
  1716. $recv($recv(self._model())._announcer())._on_send_to_($globals.HLDebuggerStepped,"onDebuggerStepped:",self);
  1717. return self;
  1718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1719. }, function($ctx1) {$ctx1.fill(self,"observeModel",{},$globals.HLStackListWidget)});
  1720. //>>excludeEnd("ctx");
  1721. },
  1722. //>>excludeStart("ide", pragmas.excludeIdeData);
  1723. args: [],
  1724. source: "observeModel\x0a\x09super observeModel.\x0a\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self",
  1725. referencedClasses: ["HLDebuggerStepped"],
  1726. //>>excludeEnd("ide");
  1727. messageSends: ["observeModel", "on:send:to:", "announcer", "model"]
  1728. }),
  1729. $globals.HLStackListWidget);
  1730. $core.addMethod(
  1731. $core.method({
  1732. selector: "onDebuggerStepped:",
  1733. protocol: 'reactions',
  1734. fn: function (anAnnouncement){
  1735. var self=this;
  1736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1737. return $core.withContext(function($ctx1) {
  1738. //>>excludeEnd("ctx");
  1739. self["@items"]=nil;
  1740. self._refresh();
  1741. return self;
  1742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1743. }, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement},$globals.HLStackListWidget)});
  1744. //>>excludeEnd("ctx");
  1745. },
  1746. //>>excludeStart("ide", pragmas.excludeIdeData);
  1747. args: ["anAnnouncement"],
  1748. source: "onDebuggerStepped: anAnnouncement\x0a\x09items := nil.\x0a\x09self refresh",
  1749. referencedClasses: [],
  1750. //>>excludeEnd("ide");
  1751. messageSends: ["refresh"]
  1752. }),
  1753. $globals.HLStackListWidget);
  1754. $core.addMethod(
  1755. $core.method({
  1756. selector: "proceed",
  1757. protocol: 'actions',
  1758. fn: function (){
  1759. var self=this;
  1760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1761. return $core.withContext(function($ctx1) {
  1762. //>>excludeEnd("ctx");
  1763. $recv(self._model())._proceed();
  1764. return self;
  1765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1766. }, function($ctx1) {$ctx1.fill(self,"proceed",{},$globals.HLStackListWidget)});
  1767. //>>excludeEnd("ctx");
  1768. },
  1769. //>>excludeStart("ide", pragmas.excludeIdeData);
  1770. args: [],
  1771. source: "proceed\x0a\x09self model proceed",
  1772. referencedClasses: [],
  1773. //>>excludeEnd("ide");
  1774. messageSends: ["proceed", "model"]
  1775. }),
  1776. $globals.HLStackListWidget);
  1777. $core.addMethod(
  1778. $core.method({
  1779. selector: "renderButtonsOn:",
  1780. protocol: 'rendering',
  1781. fn: function (html){
  1782. var self=this;
  1783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1784. return $core.withContext(function($ctx1) {
  1785. //>>excludeEnd("ctx");
  1786. var $1,$3,$4,$5,$6,$7,$8,$9,$2;
  1787. $1=$recv(html)._div();
  1788. $recv($1)._class_("debugger_bar");
  1789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1790. $ctx1.sendIdx["class:"]=1;
  1791. //>>excludeEnd("ctx");
  1792. $2=$recv($1)._with_((function(){
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. return $core.withContext(function($ctx2) {
  1795. //>>excludeEnd("ctx");
  1796. $3=$recv(html)._button();
  1797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1798. $ctx2.sendIdx["button"]=1;
  1799. //>>excludeEnd("ctx");
  1800. $recv($3)._class_("btn btn-default restart");
  1801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1802. $ctx2.sendIdx["class:"]=2;
  1803. //>>excludeEnd("ctx");
  1804. $recv($3)._with_("Restart");
  1805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1806. $ctx2.sendIdx["with:"]=2;
  1807. //>>excludeEnd("ctx");
  1808. $4=$recv($3)._onClick_((function(){
  1809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1810. return $core.withContext(function($ctx3) {
  1811. //>>excludeEnd("ctx");
  1812. return self._restart();
  1813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1814. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1815. //>>excludeEnd("ctx");
  1816. }));
  1817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1818. $ctx2.sendIdx["onClick:"]=1;
  1819. //>>excludeEnd("ctx");
  1820. $4;
  1821. $5=$recv(html)._button();
  1822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1823. $ctx2.sendIdx["button"]=2;
  1824. //>>excludeEnd("ctx");
  1825. $recv($5)._class_("btn btn-default where");
  1826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1827. $ctx2.sendIdx["class:"]=3;
  1828. //>>excludeEnd("ctx");
  1829. $recv($5)._with_("Where");
  1830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1831. $ctx2.sendIdx["with:"]=3;
  1832. //>>excludeEnd("ctx");
  1833. $6=$recv($5)._onClick_((function(){
  1834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1835. return $core.withContext(function($ctx3) {
  1836. //>>excludeEnd("ctx");
  1837. return self._where();
  1838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1839. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1840. //>>excludeEnd("ctx");
  1841. }));
  1842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1843. $ctx2.sendIdx["onClick:"]=2;
  1844. //>>excludeEnd("ctx");
  1845. $6;
  1846. $7=$recv(html)._button();
  1847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1848. $ctx2.sendIdx["button"]=3;
  1849. //>>excludeEnd("ctx");
  1850. $recv($7)._class_("btn btn-default stepOver");
  1851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1852. $ctx2.sendIdx["class:"]=4;
  1853. //>>excludeEnd("ctx");
  1854. $recv($7)._with_("Step over");
  1855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1856. $ctx2.sendIdx["with:"]=4;
  1857. //>>excludeEnd("ctx");
  1858. $8=$recv($7)._onClick_((function(){
  1859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1860. return $core.withContext(function($ctx3) {
  1861. //>>excludeEnd("ctx");
  1862. return self._stepOver();
  1863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1864. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1865. //>>excludeEnd("ctx");
  1866. }));
  1867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1868. $ctx2.sendIdx["onClick:"]=3;
  1869. //>>excludeEnd("ctx");
  1870. $8;
  1871. $9=$recv(html)._button();
  1872. $recv($9)._class_("btn btn-default proceed");
  1873. $recv($9)._with_("Proceed");
  1874. return $recv($9)._onClick_((function(){
  1875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1876. return $core.withContext(function($ctx3) {
  1877. //>>excludeEnd("ctx");
  1878. return self._proceed();
  1879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1880. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  1881. //>>excludeEnd("ctx");
  1882. }));
  1883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1884. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1885. //>>excludeEnd("ctx");
  1886. }));
  1887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1888. $ctx1.sendIdx["with:"]=1;
  1889. //>>excludeEnd("ctx");
  1890. return self;
  1891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1892. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLStackListWidget)});
  1893. //>>excludeEnd("ctx");
  1894. },
  1895. //>>excludeStart("ide", pragmas.excludeIdeData);
  1896. args: ["html"],
  1897. source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'debugger_bar'; \x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn btn-default restart';\x0a\x09\x09\x09\x09with: 'Restart';\x0a\x09\x09\x09\x09onClick: [ self restart ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn btn-default where';\x0a\x09\x09\x09\x09with: 'Where';\x0a\x09\x09\x09\x09onClick: [ self where ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn btn-default stepOver';\x0a\x09\x09\x09\x09with: 'Step over';\x0a\x09\x09\x09\x09onClick: [ self stepOver ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn btn-default proceed';\x0a\x09\x09\x09\x09with: 'Proceed';\x0a\x09\x09\x09\x09onClick: [ self proceed ] ]",
  1898. referencedClasses: [],
  1899. //>>excludeEnd("ide");
  1900. messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver", "proceed"]
  1901. }),
  1902. $globals.HLStackListWidget);
  1903. $core.addMethod(
  1904. $core.method({
  1905. selector: "restart",
  1906. protocol: 'actions',
  1907. fn: function (){
  1908. var self=this;
  1909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1910. return $core.withContext(function($ctx1) {
  1911. //>>excludeEnd("ctx");
  1912. $recv(self._model())._restart();
  1913. return self;
  1914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1915. }, function($ctx1) {$ctx1.fill(self,"restart",{},$globals.HLStackListWidget)});
  1916. //>>excludeEnd("ctx");
  1917. },
  1918. //>>excludeStart("ide", pragmas.excludeIdeData);
  1919. args: [],
  1920. source: "restart\x0a\x09self model restart",
  1921. referencedClasses: [],
  1922. //>>excludeEnd("ide");
  1923. messageSends: ["restart", "model"]
  1924. }),
  1925. $globals.HLStackListWidget);
  1926. $core.addMethod(
  1927. $core.method({
  1928. selector: "selectItem:",
  1929. protocol: 'actions',
  1930. fn: function (aContext){
  1931. var self=this;
  1932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1933. return $core.withContext(function($ctx1) {
  1934. //>>excludeEnd("ctx");
  1935. $recv(self._model())._currentContext_(aContext);
  1936. (
  1937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1938. $ctx1.supercall = true,
  1939. //>>excludeEnd("ctx");
  1940. ($globals.HLStackListWidget.superclass||$boot.dnu).fn.prototype._selectItem_.apply($recv(self), [aContext]));
  1941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1942. $ctx1.supercall = false;
  1943. //>>excludeEnd("ctx");;
  1944. return self;
  1945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1946. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext},$globals.HLStackListWidget)});
  1947. //>>excludeEnd("ctx");
  1948. },
  1949. //>>excludeStart("ide", pragmas.excludeIdeData);
  1950. args: ["aContext"],
  1951. source: "selectItem: aContext\x0a \x09self model currentContext: aContext.\x0a\x09super selectItem: aContext",
  1952. referencedClasses: [],
  1953. //>>excludeEnd("ide");
  1954. messageSends: ["currentContext:", "model", "selectItem:"]
  1955. }),
  1956. $globals.HLStackListWidget);
  1957. $core.addMethod(
  1958. $core.method({
  1959. selector: "selectedItem",
  1960. protocol: 'actions',
  1961. fn: function (){
  1962. var self=this;
  1963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1964. return $core.withContext(function($ctx1) {
  1965. //>>excludeEnd("ctx");
  1966. return $recv(self._model())._currentContext();
  1967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1968. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{},$globals.HLStackListWidget)});
  1969. //>>excludeEnd("ctx");
  1970. },
  1971. //>>excludeStart("ide", pragmas.excludeIdeData);
  1972. args: [],
  1973. source: "selectedItem\x0a \x09^ self model currentContext",
  1974. referencedClasses: [],
  1975. //>>excludeEnd("ide");
  1976. messageSends: ["currentContext", "model"]
  1977. }),
  1978. $globals.HLStackListWidget);
  1979. $core.addMethod(
  1980. $core.method({
  1981. selector: "stepOver",
  1982. protocol: 'actions',
  1983. fn: function (){
  1984. var self=this;
  1985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1986. return $core.withContext(function($ctx1) {
  1987. //>>excludeEnd("ctx");
  1988. $recv(self._model())._stepOver();
  1989. return self;
  1990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1991. }, function($ctx1) {$ctx1.fill(self,"stepOver",{},$globals.HLStackListWidget)});
  1992. //>>excludeEnd("ctx");
  1993. },
  1994. //>>excludeStart("ide", pragmas.excludeIdeData);
  1995. args: [],
  1996. source: "stepOver\x0a\x09self model stepOver",
  1997. referencedClasses: [],
  1998. //>>excludeEnd("ide");
  1999. messageSends: ["stepOver", "model"]
  2000. }),
  2001. $globals.HLStackListWidget);
  2002. $core.addMethod(
  2003. $core.method({
  2004. selector: "where",
  2005. protocol: 'actions',
  2006. fn: function (){
  2007. var self=this;
  2008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2009. return $core.withContext(function($ctx1) {
  2010. //>>excludeEnd("ctx");
  2011. $recv(self._model())._where();
  2012. return self;
  2013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2014. }, function($ctx1) {$ctx1.fill(self,"where",{},$globals.HLStackListWidget)});
  2015. //>>excludeEnd("ctx");
  2016. },
  2017. //>>excludeStart("ide", pragmas.excludeIdeData);
  2018. args: [],
  2019. source: "where\x0a\x09self model where",
  2020. referencedClasses: [],
  2021. //>>excludeEnd("ide");
  2022. messageSends: ["where", "model"]
  2023. }),
  2024. $globals.HLStackListWidget);
  2025. });