Helios-Debugger.js 74 KB

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