Helios-Debugger.js 72 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174
  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((function(){
  737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  738. return $core.withContext(function($ctx2) {
  739. //>>excludeEnd("ctx");
  740. return $recv($self._debuggerModel())._evaluate_(aString);
  741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  742. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  743. //>>excludeEnd("ctx");
  744. }))._tryCatch_((function(e){
  745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  746. return $core.withContext(function($ctx2) {
  747. //>>excludeEnd("ctx");
  748. $recv($globals.ErrorHandler)._handleError_(e);
  749. return nil;
  750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  751. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  752. //>>excludeEnd("ctx");
  753. }));
  754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  755. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString})});
  756. //>>excludeEnd("ctx");
  757. },
  758. //>>excludeStart("ide", pragmas.excludeIdeData);
  759. args: ["aString"],
  760. source: "doIt: aString\x0a\x09^ [ self debuggerModel evaluate: aString ]\x0a\x09\x09tryCatch: [ :e | \x0a\x09\x09\x09ErrorHandler handleError: e.\x0a\x09\x09\x09nil ]",
  761. referencedClasses: ["ErrorHandler"],
  762. //>>excludeEnd("ide");
  763. pragmas: [],
  764. messageSends: ["tryCatch:", "evaluate:", "debuggerModel", "handleError:"]
  765. }),
  766. $globals.HLDebuggerCodeModel);
  767. $core.addClass("HLDebuggerCodeWidget", $globals.HLBrowserCodeWidget, [], "Helios-Debugger");
  768. $core.addMethod(
  769. $core.method({
  770. selector: "addStopAt:",
  771. protocol: "actions",
  772. fn: function (anInteger){
  773. var self=this,$self=this;
  774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  775. return $core.withContext(function($ctx1) {
  776. //>>excludeEnd("ctx");
  777. $recv($self.editor)._setGutterMarker_gutter_value_(anInteger,"stops",$recv($recv("<div class=\x22stop\x22></div>"._asJQuery())._toArray())._first());
  778. return self;
  779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  780. }, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger})});
  781. //>>excludeEnd("ctx");
  782. },
  783. //>>excludeStart("ide", pragmas.excludeIdeData);
  784. args: ["anInteger"],
  785. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></div>' asJQuery toArray first",
  786. referencedClasses: [],
  787. //>>excludeEnd("ide");
  788. pragmas: [],
  789. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"]
  790. }),
  791. $globals.HLDebuggerCodeWidget);
  792. $core.addMethod(
  793. $core.method({
  794. selector: "clearHighlight",
  795. protocol: "actions",
  796. fn: function (){
  797. var self=this,$self=this;
  798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  799. return $core.withContext(function($ctx1) {
  800. //>>excludeEnd("ctx");
  801. $recv($self._editor())._clearGutter_("stops");
  802. return self;
  803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  804. }, function($ctx1) {$ctx1.fill(self,"clearHighlight",{})});
  805. //>>excludeEnd("ctx");
  806. },
  807. //>>excludeStart("ide", pragmas.excludeIdeData);
  808. args: [],
  809. source: "clearHighlight\x0a\x09self editor clearGutter: 'stops'",
  810. referencedClasses: [],
  811. //>>excludeEnd("ide");
  812. pragmas: [],
  813. messageSends: ["clearGutter:", "editor"]
  814. }),
  815. $globals.HLDebuggerCodeWidget);
  816. $core.addMethod(
  817. $core.method({
  818. selector: "contents:",
  819. protocol: "accessing",
  820. fn: function (aString){
  821. var self=this,$self=this;
  822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  823. return $core.withContext(function($ctx1) {
  824. //>>excludeEnd("ctx");
  825. $self._clearHighlight();
  826. (
  827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  828. $ctx1.supercall = true,
  829. //>>excludeEnd("ctx");
  830. ($globals.HLDebuggerCodeWidget.superclass||$boot.nilAsClass).fn.prototype._contents_.apply($self, [aString]));
  831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  832. $ctx1.supercall = false;
  833. //>>excludeEnd("ctx");;
  834. return self;
  835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  836. }, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString})});
  837. //>>excludeEnd("ctx");
  838. },
  839. //>>excludeStart("ide", pragmas.excludeIdeData);
  840. args: ["aString"],
  841. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  842. referencedClasses: [],
  843. //>>excludeEnd("ide");
  844. pragmas: [],
  845. messageSends: ["clearHighlight", "contents:"]
  846. }),
  847. $globals.HLDebuggerCodeWidget);
  848. $core.addMethod(
  849. $core.method({
  850. selector: "editorOptions",
  851. protocol: "accessing",
  852. fn: function (){
  853. var self=this,$self=this;
  854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  855. return $core.withContext(function($ctx1) {
  856. //>>excludeEnd("ctx");
  857. var $1;
  858. $1=(
  859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  860. $ctx1.supercall = true,
  861. //>>excludeEnd("ctx");
  862. ($globals.HLDebuggerCodeWidget.superclass||$boot.nilAsClass).fn.prototype._editorOptions.apply($self, []));
  863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  864. $ctx1.supercall = false;
  865. //>>excludeEnd("ctx");;
  866. $recv($1)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  867. return $recv($1)._yourself();
  868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  869. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{})});
  870. //>>excludeEnd("ctx");
  871. },
  872. //>>excludeStart("ide", pragmas.excludeIdeData);
  873. args: [],
  874. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  875. referencedClasses: [],
  876. //>>excludeEnd("ide");
  877. pragmas: [],
  878. messageSends: ["at:put:", "editorOptions", "yourself"]
  879. }),
  880. $globals.HLDebuggerCodeWidget);
  881. $core.addMethod(
  882. $core.method({
  883. selector: "highlight",
  884. protocol: "actions",
  885. fn: function (){
  886. var self=this,$self=this;
  887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  888. return $core.withContext(function($ctx1) {
  889. //>>excludeEnd("ctx");
  890. var $1,$receiver;
  891. $1=$recv($self._browserModel())._nextNode();
  892. if(($receiver = $1) == null || $receiver.a$nil){
  893. $1;
  894. } else {
  895. var node;
  896. node=$receiver;
  897. $self._highlightNode_(node);
  898. }
  899. return self;
  900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  901. }, function($ctx1) {$ctx1.fill(self,"highlight",{})});
  902. //>>excludeEnd("ctx");
  903. },
  904. //>>excludeStart("ide", pragmas.excludeIdeData);
  905. args: [],
  906. source: "highlight\x0a\x09self browserModel nextNode ifNotNil: [ :node |\x0a\x09\x09self highlightNode: node ]",
  907. referencedClasses: [],
  908. //>>excludeEnd("ide");
  909. pragmas: [],
  910. messageSends: ["ifNotNil:", "nextNode", "browserModel", "highlightNode:"]
  911. }),
  912. $globals.HLDebuggerCodeWidget);
  913. $core.addMethod(
  914. $core.method({
  915. selector: "highlightNode:",
  916. protocol: "actions",
  917. fn: function (aNode){
  918. var self=this,$self=this;
  919. var token;
  920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  921. return $core.withContext(function($ctx1) {
  922. //>>excludeEnd("ctx");
  923. var $3,$2,$1,$4,$8,$7,$6,$10,$9,$5,$14,$13,$12,$11,$receiver;
  924. if(($receiver = aNode) == null || $receiver.a$nil){
  925. aNode;
  926. } else {
  927. $self._clearHighlight();
  928. $3=$recv(aNode)._positionStart();
  929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  930. $ctx1.sendIdx["positionStart"]=1;
  931. //>>excludeEnd("ctx");
  932. $2=$recv($3)._x();
  933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  934. $ctx1.sendIdx["x"]=1;
  935. //>>excludeEnd("ctx");
  936. $1=$recv($2).__minus((1));
  937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  938. $ctx1.sendIdx["-"]=1;
  939. //>>excludeEnd("ctx");
  940. $self._addStopAt_($1);
  941. $4=$self._editor();
  942. $8=$recv(aNode)._positionStart();
  943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  944. $ctx1.sendIdx["positionStart"]=2;
  945. //>>excludeEnd("ctx");
  946. $7=$recv($8)._x();
  947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  948. $ctx1.sendIdx["x"]=2;
  949. //>>excludeEnd("ctx");
  950. $6=$recv($7).__minus((1));
  951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  952. $ctx1.sendIdx["-"]=2;
  953. //>>excludeEnd("ctx");
  954. $10=$recv($recv(aNode)._positionStart())._y();
  955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  956. $ctx1.sendIdx["y"]=1;
  957. //>>excludeEnd("ctx");
  958. $9=$recv($10).__minus((1));
  959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  960. $ctx1.sendIdx["-"]=3;
  961. //>>excludeEnd("ctx");
  962. $5=$globals.HashedCollection._newFromPairs_(["line",$6,"ch",$9]);
  963. $14=$recv(aNode)._positionEnd();
  964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  965. $ctx1.sendIdx["positionEnd"]=1;
  966. //>>excludeEnd("ctx");
  967. $13=$recv($14)._x();
  968. $12=$recv($13).__minus((1));
  969. $11=$globals.HashedCollection._newFromPairs_(["line",$12,"ch",$recv($recv(aNode)._positionEnd())._y()]);
  970. $recv($4)._setSelection_to_($5,$11);
  971. }
  972. return self;
  973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  974. }, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token})});
  975. //>>excludeEnd("ctx");
  976. },
  977. //>>excludeStart("ide", pragmas.excludeIdeData);
  978. args: ["aNode"],
  979. 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) } ]",
  980. referencedClasses: [],
  981. //>>excludeEnd("ide");
  982. pragmas: [],
  983. messageSends: ["ifNotNil:", "clearHighlight", "addStopAt:", "-", "x", "positionStart", "setSelection:to:", "editor", "y", "positionEnd"]
  984. }),
  985. $globals.HLDebuggerCodeWidget);
  986. $core.addMethod(
  987. $core.method({
  988. selector: "observeBrowserModel",
  989. protocol: "actions",
  990. fn: function (){
  991. var self=this,$self=this;
  992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  993. return $core.withContext(function($ctx1) {
  994. //>>excludeEnd("ctx");
  995. var $2,$1,$4,$3;
  996. (
  997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  998. $ctx1.supercall = true,
  999. //>>excludeEnd("ctx");
  1000. ($globals.HLDebuggerCodeWidget.superclass||$boot.nilAsClass).fn.prototype._observeBrowserModel.apply($self, []));
  1001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1002. $ctx1.supercall = false;
  1003. //>>excludeEnd("ctx");;
  1004. $2=$self._browserModel();
  1005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1006. $ctx1.sendIdx["browserModel"]=1;
  1007. //>>excludeEnd("ctx");
  1008. $1=$recv($2)._announcer();
  1009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1010. $ctx1.sendIdx["announcer"]=1;
  1011. //>>excludeEnd("ctx");
  1012. $recv($1)._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected",self);
  1013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1014. $ctx1.sendIdx["on:send:to:"]=1;
  1015. //>>excludeEnd("ctx");
  1016. $4=$self._browserModel();
  1017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1018. $ctx1.sendIdx["browserModel"]=2;
  1019. //>>excludeEnd("ctx");
  1020. $3=$recv($4)._announcer();
  1021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1022. $ctx1.sendIdx["announcer"]=2;
  1023. //>>excludeEnd("ctx");
  1024. $recv($3)._on_send_to_($globals.HLDebuggerStepped,"onContextSelected",self);
  1025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1026. $ctx1.sendIdx["on:send:to:"]=2;
  1027. //>>excludeEnd("ctx");
  1028. $recv($recv($self._browserModel())._announcer())._on_send_to_($globals.HLDebuggerWhere,"onContextSelected",self);
  1029. return self;
  1030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1031. }, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{})});
  1032. //>>excludeEnd("ctx");
  1033. },
  1034. //>>excludeStart("ide", pragmas.excludeIdeData);
  1035. args: [],
  1036. 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",
  1037. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerWhere"],
  1038. //>>excludeEnd("ide");
  1039. pragmas: [],
  1040. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"]
  1041. }),
  1042. $globals.HLDebuggerCodeWidget);
  1043. $core.addMethod(
  1044. $core.method({
  1045. selector: "onContextSelected",
  1046. protocol: "reactions",
  1047. fn: function (){
  1048. var self=this,$self=this;
  1049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1050. return $core.withContext(function($ctx1) {
  1051. //>>excludeEnd("ctx");
  1052. $self._highlight();
  1053. return self;
  1054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1055. }, function($ctx1) {$ctx1.fill(self,"onContextSelected",{})});
  1056. //>>excludeEnd("ctx");
  1057. },
  1058. //>>excludeStart("ide", pragmas.excludeIdeData);
  1059. args: [],
  1060. source: "onContextSelected\x0a\x09self highlight",
  1061. referencedClasses: [],
  1062. //>>excludeEnd("ide");
  1063. pragmas: [],
  1064. messageSends: ["highlight"]
  1065. }),
  1066. $globals.HLDebuggerCodeWidget);
  1067. $core.addMethod(
  1068. $core.method({
  1069. selector: "renderOn:",
  1070. protocol: "rendering",
  1071. fn: function (html){
  1072. var self=this,$self=this;
  1073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1074. return $core.withContext(function($ctx1) {
  1075. //>>excludeEnd("ctx");
  1076. (
  1077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1078. $ctx1.supercall = true,
  1079. //>>excludeEnd("ctx");
  1080. ($globals.HLDebuggerCodeWidget.superclass||$boot.nilAsClass).fn.prototype._renderOn_.apply($self, [html]));
  1081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1082. $ctx1.supercall = false;
  1083. //>>excludeEnd("ctx");;
  1084. $self._contents_($recv($recv($self._browserModel())._selectedMethod())._source());
  1085. return self;
  1086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1087. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html})});
  1088. //>>excludeEnd("ctx");
  1089. },
  1090. //>>excludeStart("ide", pragmas.excludeIdeData);
  1091. args: ["html"],
  1092. source: "renderOn: html\x0a\x09super renderOn: html.\x0a\x09self contents: self browserModel selectedMethod source",
  1093. referencedClasses: [],
  1094. //>>excludeEnd("ide");
  1095. pragmas: [],
  1096. messageSends: ["renderOn:", "contents:", "source", "selectedMethod", "browserModel"]
  1097. }),
  1098. $globals.HLDebuggerCodeWidget);
  1099. $core.addClass("HLDebuggerModel", $globals.HLToolModel, ["rootContext", "debugger", "error"], "Helios-Debugger");
  1100. //>>excludeStart("ide", pragmas.excludeIdeData);
  1101. $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.";
  1102. //>>excludeEnd("ide");
  1103. $core.addMethod(
  1104. $core.method({
  1105. selector: "atEnd",
  1106. protocol: "testing",
  1107. fn: function (){
  1108. var self=this,$self=this;
  1109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1110. return $core.withContext(function($ctx1) {
  1111. //>>excludeEnd("ctx");
  1112. return $recv($self._debugger())._atEnd();
  1113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1114. }, function($ctx1) {$ctx1.fill(self,"atEnd",{})});
  1115. //>>excludeEnd("ctx");
  1116. },
  1117. //>>excludeStart("ide", pragmas.excludeIdeData);
  1118. args: [],
  1119. source: "atEnd\x0a\x09^ self debugger atEnd",
  1120. referencedClasses: [],
  1121. //>>excludeEnd("ide");
  1122. pragmas: [],
  1123. messageSends: ["atEnd", "debugger"]
  1124. }),
  1125. $globals.HLDebuggerModel);
  1126. $core.addMethod(
  1127. $core.method({
  1128. selector: "contexts",
  1129. protocol: "accessing",
  1130. fn: function (){
  1131. var self=this,$self=this;
  1132. var contexts,context;
  1133. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1134. return $core.withContext(function($ctx1) {
  1135. //>>excludeEnd("ctx");
  1136. contexts=$recv($globals.OrderedCollection)._new();
  1137. context=$self._rootContext();
  1138. $recv((function(){
  1139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1140. return $core.withContext(function($ctx2) {
  1141. //>>excludeEnd("ctx");
  1142. return $recv(context)._notNil();
  1143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1144. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1145. //>>excludeEnd("ctx");
  1146. }))._whileTrue_((function(){
  1147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1148. return $core.withContext(function($ctx2) {
  1149. //>>excludeEnd("ctx");
  1150. $recv(contexts)._add_(context);
  1151. context=$recv(context)._outerContext();
  1152. return context;
  1153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1154. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1155. //>>excludeEnd("ctx");
  1156. }));
  1157. return contexts;
  1158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1159. }, function($ctx1) {$ctx1.fill(self,"contexts",{contexts:contexts,context:context})});
  1160. //>>excludeEnd("ctx");
  1161. },
  1162. //>>excludeStart("ide", pragmas.excludeIdeData);
  1163. args: [],
  1164. 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",
  1165. referencedClasses: ["OrderedCollection"],
  1166. //>>excludeEnd("ide");
  1167. pragmas: [],
  1168. messageSends: ["new", "rootContext", "whileTrue:", "notNil", "add:", "outerContext"]
  1169. }),
  1170. $globals.HLDebuggerModel);
  1171. $core.addMethod(
  1172. $core.method({
  1173. selector: "currentContext",
  1174. protocol: "accessing",
  1175. fn: function (){
  1176. var self=this,$self=this;
  1177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1178. return $core.withContext(function($ctx1) {
  1179. //>>excludeEnd("ctx");
  1180. return $recv($self._debugger())._context();
  1181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1182. }, function($ctx1) {$ctx1.fill(self,"currentContext",{})});
  1183. //>>excludeEnd("ctx");
  1184. },
  1185. //>>excludeStart("ide", pragmas.excludeIdeData);
  1186. args: [],
  1187. source: "currentContext\x0a\x09^ self debugger context",
  1188. referencedClasses: [],
  1189. //>>excludeEnd("ide");
  1190. pragmas: [],
  1191. messageSends: ["context", "debugger"]
  1192. }),
  1193. $globals.HLDebuggerModel);
  1194. $core.addMethod(
  1195. $core.method({
  1196. selector: "currentContext:",
  1197. protocol: "accessing",
  1198. fn: function (aContext){
  1199. var self=this,$self=this;
  1200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1201. return $core.withContext(function($ctx1) {
  1202. //>>excludeEnd("ctx");
  1203. var $1,$3,$2;
  1204. $self._withChangesDo_((function(){
  1205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1206. return $core.withContext(function($ctx2) {
  1207. //>>excludeEnd("ctx");
  1208. $self._selectedMethod_($recv(aContext)._method());
  1209. $recv($self._debugger())._context_(aContext);
  1210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1211. $ctx2.sendIdx["context:"]=1;
  1212. //>>excludeEnd("ctx");
  1213. $1=$self._announcer();
  1214. $3=$recv($globals.HLDebuggerContextSelected)._new();
  1215. $recv($3)._context_(aContext);
  1216. $2=$recv($3)._yourself();
  1217. return $recv($1)._announce_($2);
  1218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1219. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1220. //>>excludeEnd("ctx");
  1221. }));
  1222. return self;
  1223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1224. }, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext})});
  1225. //>>excludeEnd("ctx");
  1226. },
  1227. //>>excludeStart("ide", pragmas.excludeIdeData);
  1228. args: ["aContext"],
  1229. 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) ]",
  1230. referencedClasses: ["HLDebuggerContextSelected"],
  1231. //>>excludeEnd("ide");
  1232. pragmas: [],
  1233. messageSends: ["withChangesDo:", "selectedMethod:", "method", "context:", "debugger", "announce:", "announcer", "new", "yourself"]
  1234. }),
  1235. $globals.HLDebuggerModel);
  1236. $core.addMethod(
  1237. $core.method({
  1238. selector: "debugger",
  1239. protocol: "accessing",
  1240. fn: function (){
  1241. var self=this,$self=this;
  1242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1243. return $core.withContext(function($ctx1) {
  1244. //>>excludeEnd("ctx");
  1245. var $1,$receiver;
  1246. $1=$self.debugger;
  1247. if(($receiver = $1) == null || $receiver.a$nil){
  1248. $self.debugger=$recv($globals.ASTDebugger)._new();
  1249. return $self.debugger;
  1250. } else {
  1251. return $1;
  1252. }
  1253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1254. }, function($ctx1) {$ctx1.fill(self,"debugger",{})});
  1255. //>>excludeEnd("ctx");
  1256. },
  1257. //>>excludeStart("ide", pragmas.excludeIdeData);
  1258. args: [],
  1259. source: "debugger\x0a\x09^ debugger ifNil: [ debugger := ASTDebugger new ]",
  1260. referencedClasses: ["ASTDebugger"],
  1261. //>>excludeEnd("ide");
  1262. pragmas: [],
  1263. messageSends: ["ifNil:", "new"]
  1264. }),
  1265. $globals.HLDebuggerModel);
  1266. $core.addMethod(
  1267. $core.method({
  1268. selector: "error",
  1269. protocol: "accessing",
  1270. fn: function (){
  1271. var self=this,$self=this;
  1272. return $self.error;
  1273. },
  1274. //>>excludeStart("ide", pragmas.excludeIdeData);
  1275. args: [],
  1276. source: "error\x0a\x09^ error",
  1277. referencedClasses: [],
  1278. //>>excludeEnd("ide");
  1279. pragmas: [],
  1280. messageSends: []
  1281. }),
  1282. $globals.HLDebuggerModel);
  1283. $core.addMethod(
  1284. $core.method({
  1285. selector: "evaluate:",
  1286. protocol: "evaluating",
  1287. fn: function (aString){
  1288. var self=this,$self=this;
  1289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1290. return $core.withContext(function($ctx1) {
  1291. //>>excludeEnd("ctx");
  1292. return $recv($self._environment())._evaluate_for_(aString,$self._currentContext());
  1293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1294. }, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString})});
  1295. //>>excludeEnd("ctx");
  1296. },
  1297. //>>excludeStart("ide", pragmas.excludeIdeData);
  1298. args: ["aString"],
  1299. source: "evaluate: aString\x0a\x09^ self environment \x0a\x09\x09evaluate: aString \x0a\x09\x09for: self currentContext",
  1300. referencedClasses: [],
  1301. //>>excludeEnd("ide");
  1302. pragmas: [],
  1303. messageSends: ["evaluate:for:", "environment", "currentContext"]
  1304. }),
  1305. $globals.HLDebuggerModel);
  1306. $core.addMethod(
  1307. $core.method({
  1308. selector: "flushInnerContexts",
  1309. protocol: "private",
  1310. fn: function (){
  1311. var self=this,$self=this;
  1312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1313. return $core.withContext(function($ctx1) {
  1314. //>>excludeEnd("ctx");
  1315. var $1;
  1316. $1=$self._currentContext();
  1317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1318. $ctx1.sendIdx["currentContext"]=1;
  1319. //>>excludeEnd("ctx");
  1320. $recv($1)._innerContext_(nil);
  1321. $self.rootContext=$self._currentContext();
  1322. $self._initializeContexts();
  1323. return self;
  1324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1325. }, function($ctx1) {$ctx1.fill(self,"flushInnerContexts",{})});
  1326. //>>excludeEnd("ctx");
  1327. },
  1328. //>>excludeStart("ide", pragmas.excludeIdeData);
  1329. args: [],
  1330. 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",
  1331. referencedClasses: [],
  1332. //>>excludeEnd("ide");
  1333. pragmas: [],
  1334. messageSends: ["innerContext:", "currentContext", "initializeContexts"]
  1335. }),
  1336. $globals.HLDebuggerModel);
  1337. $core.addMethod(
  1338. $core.method({
  1339. selector: "initializeFromError:",
  1340. protocol: "initialization",
  1341. fn: function (anError){
  1342. var self=this,$self=this;
  1343. var errorContext;
  1344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1345. return $core.withContext(function($ctx1) {
  1346. //>>excludeEnd("ctx");
  1347. $self.error=anError;
  1348. errorContext=$recv($globals.AIContext)._fromMethodContext_($recv($self.error)._context());
  1349. $self.rootContext=$recv($self.error)._signalerContextFrom_(errorContext);
  1350. $self._selectedMethod_($recv($self.rootContext)._method());
  1351. return self;
  1352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1353. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError,errorContext:errorContext})});
  1354. //>>excludeEnd("ctx");
  1355. },
  1356. //>>excludeStart("ide", pragmas.excludeIdeData);
  1357. args: ["anError"],
  1358. 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",
  1359. referencedClasses: ["AIContext"],
  1360. //>>excludeEnd("ide");
  1361. pragmas: [],
  1362. messageSends: ["fromMethodContext:", "context", "signalerContextFrom:", "selectedMethod:", "method"]
  1363. }),
  1364. $globals.HLDebuggerModel);
  1365. $core.addMethod(
  1366. $core.method({
  1367. selector: "nextNode",
  1368. protocol: "accessing",
  1369. fn: function (){
  1370. var self=this,$self=this;
  1371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1372. return $core.withContext(function($ctx1) {
  1373. //>>excludeEnd("ctx");
  1374. return $recv($self._debugger())._node();
  1375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1376. }, function($ctx1) {$ctx1.fill(self,"nextNode",{})});
  1377. //>>excludeEnd("ctx");
  1378. },
  1379. //>>excludeStart("ide", pragmas.excludeIdeData);
  1380. args: [],
  1381. source: "nextNode\x0a\x09^ self debugger node",
  1382. referencedClasses: [],
  1383. //>>excludeEnd("ide");
  1384. pragmas: [],
  1385. messageSends: ["node", "debugger"]
  1386. }),
  1387. $globals.HLDebuggerModel);
  1388. $core.addMethod(
  1389. $core.method({
  1390. selector: "onStep",
  1391. protocol: "reactions",
  1392. fn: function (){
  1393. var self=this,$self=this;
  1394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1395. return $core.withContext(function($ctx1) {
  1396. //>>excludeEnd("ctx");
  1397. var $2,$1,$3,$5,$4;
  1398. $self.rootContext=$self._currentContext();
  1399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1400. $ctx1.sendIdx["currentContext"]=1;
  1401. //>>excludeEnd("ctx");
  1402. $2=$self._currentContext();
  1403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1404. $ctx1.sendIdx["currentContext"]=2;
  1405. //>>excludeEnd("ctx");
  1406. $1=$recv($2)._method();
  1407. $self._selectedMethod_($1);
  1408. $3=$self._announcer();
  1409. $5=$recv($globals.HLDebuggerContextSelected)._new();
  1410. $recv($5)._context_($self._currentContext());
  1411. $4=$recv($5)._yourself();
  1412. $recv($3)._announce_($4);
  1413. return self;
  1414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1415. }, function($ctx1) {$ctx1.fill(self,"onStep",{})});
  1416. //>>excludeEnd("ctx");
  1417. },
  1418. //>>excludeStart("ide", pragmas.excludeIdeData);
  1419. args: [],
  1420. 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)",
  1421. referencedClasses: ["HLDebuggerContextSelected"],
  1422. //>>excludeEnd("ide");
  1423. pragmas: [],
  1424. messageSends: ["currentContext", "selectedMethod:", "method", "announce:", "announcer", "context:", "new", "yourself"]
  1425. }),
  1426. $globals.HLDebuggerModel);
  1427. $core.addMethod(
  1428. $core.method({
  1429. selector: "proceed",
  1430. protocol: "actions",
  1431. fn: function (){
  1432. var self=this,$self=this;
  1433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1434. return $core.withContext(function($ctx1) {
  1435. //>>excludeEnd("ctx");
  1436. $recv($self._debugger())._proceed();
  1437. $recv($self._announcer())._announce_($recv($globals.HLDebuggerProceeded)._new());
  1438. return self;
  1439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1440. }, function($ctx1) {$ctx1.fill(self,"proceed",{})});
  1441. //>>excludeEnd("ctx");
  1442. },
  1443. //>>excludeStart("ide", pragmas.excludeIdeData);
  1444. args: [],
  1445. source: "proceed\x0a\x09self debugger proceed.\x0a\x09\x0a\x09self announcer announce: HLDebuggerProceeded new",
  1446. referencedClasses: ["HLDebuggerProceeded"],
  1447. //>>excludeEnd("ide");
  1448. pragmas: [],
  1449. messageSends: ["proceed", "debugger", "announce:", "announcer", "new"]
  1450. }),
  1451. $globals.HLDebuggerModel);
  1452. $core.addMethod(
  1453. $core.method({
  1454. selector: "restart",
  1455. protocol: "actions",
  1456. fn: function (){
  1457. var self=this,$self=this;
  1458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1459. return $core.withContext(function($ctx1) {
  1460. //>>excludeEnd("ctx");
  1461. var $1,$3,$2;
  1462. $recv($self._debugger())._restart();
  1463. $self._onStep();
  1464. $1=$self._announcer();
  1465. $3=$recv($globals.HLDebuggerStepped)._new();
  1466. $recv($3)._context_($self._currentContext());
  1467. $2=$recv($3)._yourself();
  1468. $recv($1)._announce_($2);
  1469. return self;
  1470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1471. }, function($ctx1) {$ctx1.fill(self,"restart",{})});
  1472. //>>excludeEnd("ctx");
  1473. },
  1474. //>>excludeStart("ide", pragmas.excludeIdeData);
  1475. args: [],
  1476. 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)",
  1477. referencedClasses: ["HLDebuggerStepped"],
  1478. //>>excludeEnd("ide");
  1479. pragmas: [],
  1480. messageSends: ["restart", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1481. }),
  1482. $globals.HLDebuggerModel);
  1483. $core.addMethod(
  1484. $core.method({
  1485. selector: "rootContext",
  1486. protocol: "accessing",
  1487. fn: function (){
  1488. var self=this,$self=this;
  1489. return $self.rootContext;
  1490. },
  1491. //>>excludeStart("ide", pragmas.excludeIdeData);
  1492. args: [],
  1493. source: "rootContext\x0a\x09^ rootContext",
  1494. referencedClasses: [],
  1495. //>>excludeEnd("ide");
  1496. pragmas: [],
  1497. messageSends: []
  1498. }),
  1499. $globals.HLDebuggerModel);
  1500. $core.addMethod(
  1501. $core.method({
  1502. selector: "stepOver",
  1503. protocol: "actions",
  1504. fn: function (){
  1505. var self=this,$self=this;
  1506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1507. return $core.withContext(function($ctx1) {
  1508. //>>excludeEnd("ctx");
  1509. var $1,$3,$2;
  1510. $recv($self._debugger())._stepOver();
  1511. $self._onStep();
  1512. $1=$self._announcer();
  1513. $3=$recv($globals.HLDebuggerStepped)._new();
  1514. $recv($3)._context_($self._currentContext());
  1515. $2=$recv($3)._yourself();
  1516. $recv($1)._announce_($2);
  1517. return self;
  1518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1519. }, function($ctx1) {$ctx1.fill(self,"stepOver",{})});
  1520. //>>excludeEnd("ctx");
  1521. },
  1522. //>>excludeStart("ide", pragmas.excludeIdeData);
  1523. args: [],
  1524. 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)",
  1525. referencedClasses: ["HLDebuggerStepped"],
  1526. //>>excludeEnd("ide");
  1527. pragmas: [],
  1528. messageSends: ["stepOver", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1529. }),
  1530. $globals.HLDebuggerModel);
  1531. $core.addMethod(
  1532. $core.method({
  1533. selector: "where",
  1534. protocol: "actions",
  1535. fn: function (){
  1536. var self=this,$self=this;
  1537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1538. return $core.withContext(function($ctx1) {
  1539. //>>excludeEnd("ctx");
  1540. $recv($self._announcer())._announce_($recv($globals.HLDebuggerWhere)._new());
  1541. return self;
  1542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1543. }, function($ctx1) {$ctx1.fill(self,"where",{})});
  1544. //>>excludeEnd("ctx");
  1545. },
  1546. //>>excludeStart("ide", pragmas.excludeIdeData);
  1547. args: [],
  1548. source: "where\x0a\x09self announcer announce: HLDebuggerWhere new",
  1549. referencedClasses: ["HLDebuggerWhere"],
  1550. //>>excludeEnd("ide");
  1551. pragmas: [],
  1552. messageSends: ["announce:", "announcer", "new"]
  1553. }),
  1554. $globals.HLDebuggerModel);
  1555. $core.addMethod(
  1556. $core.method({
  1557. selector: "on:",
  1558. protocol: "instance creation",
  1559. fn: function (anError){
  1560. var self=this,$self=this;
  1561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1562. return $core.withContext(function($ctx1) {
  1563. //>>excludeEnd("ctx");
  1564. var $1;
  1565. $1=$self._new();
  1566. $recv($1)._initializeFromError_(anError);
  1567. return $recv($1)._yourself();
  1568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1569. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError})});
  1570. //>>excludeEnd("ctx");
  1571. },
  1572. //>>excludeStart("ide", pragmas.excludeIdeData);
  1573. args: ["anError"],
  1574. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  1575. referencedClasses: [],
  1576. //>>excludeEnd("ide");
  1577. pragmas: [],
  1578. messageSends: ["initializeFromError:", "new", "yourself"]
  1579. }),
  1580. $globals.HLDebuggerModel.a$cls);
  1581. $core.addClass("HLErrorHandler", $globals.Object, [], "Helios-Debugger");
  1582. $core.addMethod(
  1583. $core.method({
  1584. selector: "confirmDebugError:",
  1585. protocol: "error handling",
  1586. fn: function (anError){
  1587. var self=this,$self=this;
  1588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1589. return $core.withContext(function($ctx1) {
  1590. //>>excludeEnd("ctx");
  1591. var $1;
  1592. $1=$recv($globals.HLConfirmationWidget)._new();
  1593. $recv($1)._confirmationString_($recv(anError)._messageText());
  1594. $recv($1)._actionBlock_((function(){
  1595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1596. return $core.withContext(function($ctx2) {
  1597. //>>excludeEnd("ctx");
  1598. return $self._debugError_(anError);
  1599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1600. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1601. //>>excludeEnd("ctx");
  1602. }));
  1603. $recv($1)._cancelButtonLabel_("Abandon");
  1604. $recv($1)._confirmButtonLabel_("Debug");
  1605. $recv($1)._show();
  1606. return self;
  1607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1608. }, function($ctx1) {$ctx1.fill(self,"confirmDebugError:",{anError:anError})});
  1609. //>>excludeEnd("ctx");
  1610. },
  1611. //>>excludeStart("ide", pragmas.excludeIdeData);
  1612. args: ["anError"],
  1613. source: "confirmDebugError: anError\x0a\x09HLConfirmationWidget new\x0a\x09\x09confirmationString: anError messageText;\x0a\x09\x09actionBlock: [ self debugError: anError ];\x0a\x09\x09cancelButtonLabel: 'Abandon';\x0a\x09\x09confirmButtonLabel: 'Debug';\x0a\x09\x09show",
  1614. referencedClasses: ["HLConfirmationWidget"],
  1615. //>>excludeEnd("ide");
  1616. pragmas: [],
  1617. messageSends: ["confirmationString:", "new", "messageText", "actionBlock:", "debugError:", "cancelButtonLabel:", "confirmButtonLabel:", "show"]
  1618. }),
  1619. $globals.HLErrorHandler);
  1620. $core.addMethod(
  1621. $core.method({
  1622. selector: "debugError:",
  1623. protocol: "error handling",
  1624. fn: function (anError){
  1625. var self=this,$self=this;
  1626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1627. return $core.withContext(function($ctx1) {
  1628. //>>excludeEnd("ctx");
  1629. $recv((function(){
  1630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1631. return $core.withContext(function($ctx2) {
  1632. //>>excludeEnd("ctx");
  1633. return $recv($recv($globals.HLDebugger)._on_(anError))._openAsTab();
  1634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1635. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1636. //>>excludeEnd("ctx");
  1637. }))._on_do_($globals.Error,(function(error){
  1638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1639. return $core.withContext(function($ctx2) {
  1640. //>>excludeEnd("ctx");
  1641. return $recv($recv($globals.ConsoleErrorHandler)._new())._handleError_(error);
  1642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1643. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  1644. //>>excludeEnd("ctx");
  1645. }));
  1646. return self;
  1647. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1648. }, function($ctx1) {$ctx1.fill(self,"debugError:",{anError:anError})});
  1649. //>>excludeEnd("ctx");
  1650. },
  1651. //>>excludeStart("ide", pragmas.excludeIdeData);
  1652. args: ["anError"],
  1653. source: "debugError: anError\x0a\x0a\x09[ \x0a\x09\x09(HLDebugger on: anError) openAsTab \x0a\x09] \x0a\x09\x09on: Error \x0a\x09\x09do: [ :error | ConsoleErrorHandler new handleError: error ]",
  1654. referencedClasses: ["HLDebugger", "Error", "ConsoleErrorHandler"],
  1655. //>>excludeEnd("ide");
  1656. pragmas: [],
  1657. messageSends: ["on:do:", "openAsTab", "on:", "handleError:", "new"]
  1658. }),
  1659. $globals.HLErrorHandler);
  1660. $core.addMethod(
  1661. $core.method({
  1662. selector: "handleError:",
  1663. protocol: "error handling",
  1664. fn: function (anError){
  1665. var self=this,$self=this;
  1666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1667. return $core.withContext(function($ctx1) {
  1668. //>>excludeEnd("ctx");
  1669. $self._confirmDebugError_(anError);
  1670. return self;
  1671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1672. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError})});
  1673. //>>excludeEnd("ctx");
  1674. },
  1675. //>>excludeStart("ide", pragmas.excludeIdeData);
  1676. args: ["anError"],
  1677. source: "handleError: anError\x0a\x09self confirmDebugError: anError",
  1678. referencedClasses: [],
  1679. //>>excludeEnd("ide");
  1680. pragmas: [],
  1681. messageSends: ["confirmDebugError:"]
  1682. }),
  1683. $globals.HLErrorHandler);
  1684. $core.addMethod(
  1685. $core.method({
  1686. selector: "onErrorHandled",
  1687. protocol: "error handling",
  1688. fn: function (){
  1689. var self=this,$self=this;
  1690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1691. return $core.withContext(function($ctx1) {
  1692. //>>excludeEnd("ctx");
  1693. var $1;
  1694. $1=$recv($globals.HLProgressWidget)._default();
  1695. $recv($1)._flush();
  1696. $recv($1)._remove();
  1697. return self;
  1698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1699. }, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{})});
  1700. //>>excludeEnd("ctx");
  1701. },
  1702. //>>excludeStart("ide", pragmas.excludeIdeData);
  1703. args: [],
  1704. 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",
  1705. referencedClasses: ["HLProgressWidget"],
  1706. //>>excludeEnd("ide");
  1707. pragmas: [],
  1708. messageSends: ["flush", "default", "remove"]
  1709. }),
  1710. $globals.HLErrorHandler);
  1711. $core.addClass("HLStackListWidget", $globals.HLToolListWidget, [], "Helios-Debugger");
  1712. $core.addMethod(
  1713. $core.method({
  1714. selector: "items",
  1715. protocol: "accessing",
  1716. fn: function (){
  1717. var self=this,$self=this;
  1718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1719. return $core.withContext(function($ctx1) {
  1720. //>>excludeEnd("ctx");
  1721. return $recv($self._model())._contexts();
  1722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1723. }, function($ctx1) {$ctx1.fill(self,"items",{})});
  1724. //>>excludeEnd("ctx");
  1725. },
  1726. //>>excludeStart("ide", pragmas.excludeIdeData);
  1727. args: [],
  1728. source: "items\x0a\x09^ self model contexts",
  1729. referencedClasses: [],
  1730. //>>excludeEnd("ide");
  1731. pragmas: [],
  1732. messageSends: ["contexts", "model"]
  1733. }),
  1734. $globals.HLStackListWidget);
  1735. $core.addMethod(
  1736. $core.method({
  1737. selector: "label",
  1738. protocol: "accessing",
  1739. fn: function (){
  1740. var self=this,$self=this;
  1741. return "Call stack";
  1742. },
  1743. //>>excludeStart("ide", pragmas.excludeIdeData);
  1744. args: [],
  1745. source: "label\x0a\x09^ 'Call stack'",
  1746. referencedClasses: [],
  1747. //>>excludeEnd("ide");
  1748. pragmas: [],
  1749. messageSends: []
  1750. }),
  1751. $globals.HLStackListWidget);
  1752. $core.addMethod(
  1753. $core.method({
  1754. selector: "observeModel",
  1755. protocol: "actions",
  1756. fn: function (){
  1757. var self=this,$self=this;
  1758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1759. return $core.withContext(function($ctx1) {
  1760. //>>excludeEnd("ctx");
  1761. (
  1762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1763. $ctx1.supercall = true,
  1764. //>>excludeEnd("ctx");
  1765. ($globals.HLStackListWidget.superclass||$boot.nilAsClass).fn.prototype._observeModel.apply($self, []));
  1766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1767. $ctx1.supercall = false;
  1768. //>>excludeEnd("ctx");;
  1769. $recv($recv($self._model())._announcer())._on_send_to_($globals.HLDebuggerStepped,"onDebuggerStepped:",self);
  1770. return self;
  1771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1772. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  1773. //>>excludeEnd("ctx");
  1774. },
  1775. //>>excludeStart("ide", pragmas.excludeIdeData);
  1776. args: [],
  1777. source: "observeModel\x0a\x09super observeModel.\x0a\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self",
  1778. referencedClasses: ["HLDebuggerStepped"],
  1779. //>>excludeEnd("ide");
  1780. pragmas: [],
  1781. messageSends: ["observeModel", "on:send:to:", "announcer", "model"]
  1782. }),
  1783. $globals.HLStackListWidget);
  1784. $core.addMethod(
  1785. $core.method({
  1786. selector: "onDebuggerStepped:",
  1787. protocol: "reactions",
  1788. fn: function (anAnnouncement){
  1789. var self=this,$self=this;
  1790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1791. return $core.withContext(function($ctx1) {
  1792. //>>excludeEnd("ctx");
  1793. $self.items=nil;
  1794. $self._refresh();
  1795. return self;
  1796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1797. }, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement})});
  1798. //>>excludeEnd("ctx");
  1799. },
  1800. //>>excludeStart("ide", pragmas.excludeIdeData);
  1801. args: ["anAnnouncement"],
  1802. source: "onDebuggerStepped: anAnnouncement\x0a\x09items := nil.\x0a\x09self refresh",
  1803. referencedClasses: [],
  1804. //>>excludeEnd("ide");
  1805. pragmas: [],
  1806. messageSends: ["refresh"]
  1807. }),
  1808. $globals.HLStackListWidget);
  1809. $core.addMethod(
  1810. $core.method({
  1811. selector: "proceed",
  1812. protocol: "actions",
  1813. fn: function (){
  1814. var self=this,$self=this;
  1815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1816. return $core.withContext(function($ctx1) {
  1817. //>>excludeEnd("ctx");
  1818. $recv($self._model())._proceed();
  1819. return self;
  1820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1821. }, function($ctx1) {$ctx1.fill(self,"proceed",{})});
  1822. //>>excludeEnd("ctx");
  1823. },
  1824. //>>excludeStart("ide", pragmas.excludeIdeData);
  1825. args: [],
  1826. source: "proceed\x0a\x09self model proceed",
  1827. referencedClasses: [],
  1828. //>>excludeEnd("ide");
  1829. pragmas: [],
  1830. messageSends: ["proceed", "model"]
  1831. }),
  1832. $globals.HLStackListWidget);
  1833. $core.addMethod(
  1834. $core.method({
  1835. selector: "renderButtonsOn:",
  1836. protocol: "rendering",
  1837. fn: function (html){
  1838. var self=this,$self=this;
  1839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1840. return $core.withContext(function($ctx1) {
  1841. //>>excludeEnd("ctx");
  1842. var $1,$2,$3,$4,$5;
  1843. $1=$recv(html)._div();
  1844. $recv($1)._class_("debugger_bar");
  1845. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1846. $ctx1.sendIdx["class:"]=1;
  1847. //>>excludeEnd("ctx");
  1848. $recv($1)._with_((function(){
  1849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1850. return $core.withContext(function($ctx2) {
  1851. //>>excludeEnd("ctx");
  1852. $2=$recv(html)._button();
  1853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1854. $ctx2.sendIdx["button"]=1;
  1855. //>>excludeEnd("ctx");
  1856. $recv($2)._class_("btn btn-default restart");
  1857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1858. $ctx2.sendIdx["class:"]=2;
  1859. //>>excludeEnd("ctx");
  1860. $recv($2)._with_("Restart");
  1861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1862. $ctx2.sendIdx["with:"]=2;
  1863. //>>excludeEnd("ctx");
  1864. $recv($2)._onClick_((function(){
  1865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1866. return $core.withContext(function($ctx3) {
  1867. //>>excludeEnd("ctx");
  1868. return $self._restart();
  1869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1870. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1871. //>>excludeEnd("ctx");
  1872. }));
  1873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1874. $ctx2.sendIdx["onClick:"]=1;
  1875. //>>excludeEnd("ctx");
  1876. $3=$recv(html)._button();
  1877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1878. $ctx2.sendIdx["button"]=2;
  1879. //>>excludeEnd("ctx");
  1880. $recv($3)._class_("btn btn-default where");
  1881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1882. $ctx2.sendIdx["class:"]=3;
  1883. //>>excludeEnd("ctx");
  1884. $recv($3)._with_("Where");
  1885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1886. $ctx2.sendIdx["with:"]=3;
  1887. //>>excludeEnd("ctx");
  1888. $recv($3)._onClick_((function(){
  1889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1890. return $core.withContext(function($ctx3) {
  1891. //>>excludeEnd("ctx");
  1892. return $self._where();
  1893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1894. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1895. //>>excludeEnd("ctx");
  1896. }));
  1897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1898. $ctx2.sendIdx["onClick:"]=2;
  1899. //>>excludeEnd("ctx");
  1900. $4=$recv(html)._button();
  1901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1902. $ctx2.sendIdx["button"]=3;
  1903. //>>excludeEnd("ctx");
  1904. $recv($4)._class_("btn btn-default stepOver");
  1905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1906. $ctx2.sendIdx["class:"]=4;
  1907. //>>excludeEnd("ctx");
  1908. $recv($4)._with_("Step over");
  1909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1910. $ctx2.sendIdx["with:"]=4;
  1911. //>>excludeEnd("ctx");
  1912. $recv($4)._onClick_((function(){
  1913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1914. return $core.withContext(function($ctx3) {
  1915. //>>excludeEnd("ctx");
  1916. return $self._stepOver();
  1917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1918. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1919. //>>excludeEnd("ctx");
  1920. }));
  1921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1922. $ctx2.sendIdx["onClick:"]=3;
  1923. //>>excludeEnd("ctx");
  1924. $5=$recv(html)._button();
  1925. $recv($5)._class_("btn btn-default proceed");
  1926. $recv($5)._with_("Proceed");
  1927. return $recv($5)._onClick_((function(){
  1928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1929. return $core.withContext(function($ctx3) {
  1930. //>>excludeEnd("ctx");
  1931. return $self._proceed();
  1932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1933. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  1934. //>>excludeEnd("ctx");
  1935. }));
  1936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1937. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1938. //>>excludeEnd("ctx");
  1939. }));
  1940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1941. $ctx1.sendIdx["with:"]=1;
  1942. //>>excludeEnd("ctx");
  1943. return self;
  1944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1945. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html})});
  1946. //>>excludeEnd("ctx");
  1947. },
  1948. //>>excludeStart("ide", pragmas.excludeIdeData);
  1949. args: ["html"],
  1950. 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 ] ]",
  1951. referencedClasses: [],
  1952. //>>excludeEnd("ide");
  1953. pragmas: [],
  1954. messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver", "proceed"]
  1955. }),
  1956. $globals.HLStackListWidget);
  1957. $core.addMethod(
  1958. $core.method({
  1959. selector: "restart",
  1960. protocol: "actions",
  1961. fn: function (){
  1962. var self=this,$self=this;
  1963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1964. return $core.withContext(function($ctx1) {
  1965. //>>excludeEnd("ctx");
  1966. $recv($self._model())._restart();
  1967. return self;
  1968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1969. }, function($ctx1) {$ctx1.fill(self,"restart",{})});
  1970. //>>excludeEnd("ctx");
  1971. },
  1972. //>>excludeStart("ide", pragmas.excludeIdeData);
  1973. args: [],
  1974. source: "restart\x0a\x09self model restart",
  1975. referencedClasses: [],
  1976. //>>excludeEnd("ide");
  1977. pragmas: [],
  1978. messageSends: ["restart", "model"]
  1979. }),
  1980. $globals.HLStackListWidget);
  1981. $core.addMethod(
  1982. $core.method({
  1983. selector: "selectItem:",
  1984. protocol: "actions",
  1985. fn: function (aContext){
  1986. var self=this,$self=this;
  1987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1988. return $core.withContext(function($ctx1) {
  1989. //>>excludeEnd("ctx");
  1990. $recv($self._model())._currentContext_(aContext);
  1991. (
  1992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1993. $ctx1.supercall = true,
  1994. //>>excludeEnd("ctx");
  1995. ($globals.HLStackListWidget.superclass||$boot.nilAsClass).fn.prototype._selectItem_.apply($self, [aContext]));
  1996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1997. $ctx1.supercall = false;
  1998. //>>excludeEnd("ctx");;
  1999. return self;
  2000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2001. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext})});
  2002. //>>excludeEnd("ctx");
  2003. },
  2004. //>>excludeStart("ide", pragmas.excludeIdeData);
  2005. args: ["aContext"],
  2006. source: "selectItem: aContext\x0a \x09self model currentContext: aContext.\x0a\x09super selectItem: aContext",
  2007. referencedClasses: [],
  2008. //>>excludeEnd("ide");
  2009. pragmas: [],
  2010. messageSends: ["currentContext:", "model", "selectItem:"]
  2011. }),
  2012. $globals.HLStackListWidget);
  2013. $core.addMethod(
  2014. $core.method({
  2015. selector: "selectedItem",
  2016. protocol: "actions",
  2017. fn: function (){
  2018. var self=this,$self=this;
  2019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2020. return $core.withContext(function($ctx1) {
  2021. //>>excludeEnd("ctx");
  2022. return $recv($self._model())._currentContext();
  2023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2024. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{})});
  2025. //>>excludeEnd("ctx");
  2026. },
  2027. //>>excludeStart("ide", pragmas.excludeIdeData);
  2028. args: [],
  2029. source: "selectedItem\x0a \x09^ self model currentContext",
  2030. referencedClasses: [],
  2031. //>>excludeEnd("ide");
  2032. pragmas: [],
  2033. messageSends: ["currentContext", "model"]
  2034. }),
  2035. $globals.HLStackListWidget);
  2036. $core.addMethod(
  2037. $core.method({
  2038. selector: "stepOver",
  2039. protocol: "actions",
  2040. fn: function (){
  2041. var self=this,$self=this;
  2042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2043. return $core.withContext(function($ctx1) {
  2044. //>>excludeEnd("ctx");
  2045. $recv($self._model())._stepOver();
  2046. return self;
  2047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2048. }, function($ctx1) {$ctx1.fill(self,"stepOver",{})});
  2049. //>>excludeEnd("ctx");
  2050. },
  2051. //>>excludeStart("ide", pragmas.excludeIdeData);
  2052. args: [],
  2053. source: "stepOver\x0a\x09self model stepOver",
  2054. referencedClasses: [],
  2055. //>>excludeEnd("ide");
  2056. pragmas: [],
  2057. messageSends: ["stepOver", "model"]
  2058. }),
  2059. $globals.HLStackListWidget);
  2060. $core.addMethod(
  2061. $core.method({
  2062. selector: "where",
  2063. protocol: "actions",
  2064. fn: function (){
  2065. var self=this,$self=this;
  2066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2067. return $core.withContext(function($ctx1) {
  2068. //>>excludeEnd("ctx");
  2069. $recv($self._model())._where();
  2070. return self;
  2071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2072. }, function($ctx1) {$ctx1.fill(self,"where",{})});
  2073. //>>excludeEnd("ctx");
  2074. },
  2075. //>>excludeStart("ide", pragmas.excludeIdeData);
  2076. args: [],
  2077. source: "where\x0a\x09self model where",
  2078. referencedClasses: [],
  2079. //>>excludeEnd("ide");
  2080. pragmas: [],
  2081. messageSends: ["where", "model"]
  2082. }),
  2083. $globals.HLStackListWidget);
  2084. });