1
0

Helios-Debugger.js 72 KB

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