Helios-Debugger.js 72 KB

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