Helios-Debugger.js 72 KB

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