Helios-Debugger.js 72 KB

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