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.imports = ["amber/core/Compiler-Interpreter"];
  5. //>>excludeStart("imports", pragmas.excludeImports);
  6. $pkg.isReady = new Promise(function (resolve, reject) { requirejs(["amber/core/Compiler-Interpreter"], function () {resolve();}, reject); });
  7. //>>excludeEnd("imports");
  8. $pkg.transport = {"type":"amd","amdNamespace":"helios"};
  9. $core.addClass("HLContextInspectorDecorator", $globals.Object, "Helios-Debugger");
  10. $core.setSlots($globals.HLContextInspectorDecorator, ["context"]);
  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. if($core.assert($recv(inspectedContext)._notNil())){
  108. return $recv(inspectedContext)._isBlockContext();
  109. } else {
  110. return false;
  111. }
  112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  113. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  114. //>>excludeEnd("ctx");
  115. }))._whileTrue_((function(){
  116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  117. return $core.withContext(function($ctx3) {
  118. //>>excludeEnd("ctx");
  119. inspectedContext=$recv(inspectedContext)._outerContext();
  120. $1=inspectedContext;
  121. if($1 == null || $1.a$nil){
  122. return $1;
  123. } else {
  124. return $recv(stream)._nextPutAll_($recv($recv(inspectedContext)._locals())._associations());
  125. }
  126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  127. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  128. //>>excludeEnd("ctx");
  129. }));
  130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  131. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)});
  132. //>>excludeEnd("ctx");
  133. }));
  134. $recv(anInspector)._setLabel_("Context");
  135. $recv(anInspector)._setVariables_(variables);
  136. return self;
  137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  138. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext})});
  139. //>>excludeEnd("ctx");
  140. }; }),
  141. $globals.HLContextInspectorDecorator);
  142. $core.addMethod(
  143. $core.method({
  144. selector: "on:",
  145. protocol: "instance creation",
  146. //>>excludeStart("ide", pragmas.excludeIdeData);
  147. args: ["aContext"],
  148. source: "on: aContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aContext;\x0a\x09\x09yourself",
  149. referencedClasses: [],
  150. //>>excludeEnd("ide");
  151. pragmas: [],
  152. messageSends: ["initializeFromContext:", "new", "yourself"]
  153. }, function ($methodClass){ return function (aContext){
  154. var self=this,$self=this;
  155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  156. return $core.withContext(function($ctx1) {
  157. //>>excludeEnd("ctx");
  158. var $1;
  159. $1=$self._new();
  160. $recv($1)._initializeFromContext_(aContext);
  161. return $recv($1)._yourself();
  162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  163. }, function($ctx1) {$ctx1.fill(self,"on:",{aContext:aContext})});
  164. //>>excludeEnd("ctx");
  165. }; }),
  166. $globals.HLContextInspectorDecorator.a$cls);
  167. $core.addClass("HLDebugger", $globals.HLFocusableWidget, "Helios-Debugger");
  168. $core.setSlots($globals.HLDebugger, ["model", "stackListWidget", "codeWidget", "inspectorWidget"]);
  169. //>>excludeStart("ide", pragmas.excludeIdeData);
  170. $globals.HLDebugger.comment="I am the main widget for the Helios debugger.";
  171. //>>excludeEnd("ide");
  172. $core.addMethod(
  173. $core.method({
  174. selector: "codeWidget",
  175. protocol: "widgets",
  176. //>>excludeStart("ide", pragmas.excludeIdeData);
  177. args: [],
  178. 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 ]",
  179. referencedClasses: ["HLDebuggerCodeWidget", "HLDebuggerCodeModel"],
  180. //>>excludeEnd("ide");
  181. pragmas: [],
  182. messageSends: ["ifNil:", "model:", "new", "debuggerModel:", "model", "yourself", "browserModel:"]
  183. }, function ($methodClass){ return function (){
  184. var self=this,$self=this;
  185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  186. return $core.withContext(function($ctx1) {
  187. //>>excludeEnd("ctx");
  188. var $1,$2,$3;
  189. $1=$self.codeWidget;
  190. if($1 == null || $1.a$nil){
  191. $2=[$recv($globals.HLDebuggerCodeWidget)._new()
  192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  193. ,$ctx1.sendIdx["new"]=1
  194. //>>excludeEnd("ctx");
  195. ][0];
  196. $3=$recv($globals.HLDebuggerCodeModel)._new();
  197. $recv($3)._debuggerModel_([$self._model()
  198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  199. ,$ctx1.sendIdx["model"]=1
  200. //>>excludeEnd("ctx");
  201. ][0]);
  202. $recv($2)._model_([$recv($3)._yourself()
  203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  204. ,$ctx1.sendIdx["yourself"]=1
  205. //>>excludeEnd("ctx");
  206. ][0]);
  207. $recv($2)._browserModel_($self._model());
  208. $self.codeWidget=$recv($2)._yourself();
  209. return $self.codeWidget;
  210. } else {
  211. return $1;
  212. }
  213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  214. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{})});
  215. //>>excludeEnd("ctx");
  216. }; }),
  217. $globals.HLDebugger);
  218. $core.addMethod(
  219. $core.method({
  220. selector: "cssClass",
  221. protocol: "accessing",
  222. //>>excludeStart("ide", pragmas.excludeIdeData);
  223. args: [],
  224. source: "cssClass\x0a\x09^ super cssClass, ' hl_debugger'",
  225. referencedClasses: [],
  226. //>>excludeEnd("ide");
  227. pragmas: [],
  228. messageSends: [",", "cssClass"]
  229. }, function ($methodClass){ return function (){
  230. var self=this,$self=this;
  231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  232. return $core.withContext(function($ctx1) {
  233. //>>excludeEnd("ctx");
  234. return $recv([(
  235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  236. $ctx1.supercall = true,
  237. //>>excludeEnd("ctx");
  238. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._cssClass.call($self))
  239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  240. ,$ctx1.supercall = false
  241. //>>excludeEnd("ctx");
  242. ][0]).__comma(" hl_debugger");
  243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  244. }, function($ctx1) {$ctx1.fill(self,"cssClass",{})});
  245. //>>excludeEnd("ctx");
  246. }; }),
  247. $globals.HLDebugger);
  248. $core.addMethod(
  249. $core.method({
  250. selector: "focus",
  251. protocol: "actions",
  252. //>>excludeStart("ide", pragmas.excludeIdeData);
  253. args: [],
  254. source: "focus\x0a\x09self stackListWidget focus",
  255. referencedClasses: [],
  256. //>>excludeEnd("ide");
  257. pragmas: [],
  258. messageSends: ["focus", "stackListWidget"]
  259. }, function ($methodClass){ return function (){
  260. var self=this,$self=this;
  261. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  262. return $core.withContext(function($ctx1) {
  263. //>>excludeEnd("ctx");
  264. $recv($self._stackListWidget())._focus();
  265. return self;
  266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  267. }, function($ctx1) {$ctx1.fill(self,"focus",{})});
  268. //>>excludeEnd("ctx");
  269. }; }),
  270. $globals.HLDebugger);
  271. $core.addMethod(
  272. $core.method({
  273. selector: "initializeFromError:",
  274. protocol: "initialization",
  275. //>>excludeStart("ide", pragmas.excludeIdeData);
  276. args: ["anError"],
  277. source: "initializeFromError: anError\x0a\x09model := HLDebuggerModel on: anError.\x0a\x09self observeModel",
  278. referencedClasses: ["HLDebuggerModel"],
  279. //>>excludeEnd("ide");
  280. pragmas: [],
  281. messageSends: ["on:", "observeModel"]
  282. }, function ($methodClass){ return function (anError){
  283. var self=this,$self=this;
  284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  285. return $core.withContext(function($ctx1) {
  286. //>>excludeEnd("ctx");
  287. $self.model=$recv($globals.HLDebuggerModel)._on_(anError);
  288. $self._observeModel();
  289. return self;
  290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  291. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError})});
  292. //>>excludeEnd("ctx");
  293. }; }),
  294. $globals.HLDebugger);
  295. $core.addMethod(
  296. $core.method({
  297. selector: "inspectorWidget",
  298. protocol: "widgets",
  299. //>>excludeStart("ide", pragmas.excludeIdeData);
  300. args: [],
  301. source: "inspectorWidget\x0a\x09^ inspectorWidget ifNil: [ \x0a\x09\x09inspectorWidget := HLInspectorWidget new ]",
  302. referencedClasses: ["HLInspectorWidget"],
  303. //>>excludeEnd("ide");
  304. pragmas: [],
  305. messageSends: ["ifNil:", "new"]
  306. }, function ($methodClass){ return function (){
  307. var self=this,$self=this;
  308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  309. return $core.withContext(function($ctx1) {
  310. //>>excludeEnd("ctx");
  311. var $1;
  312. $1=$self.inspectorWidget;
  313. if($1 == null || $1.a$nil){
  314. $self.inspectorWidget=$recv($globals.HLInspectorWidget)._new();
  315. return $self.inspectorWidget;
  316. } else {
  317. return $1;
  318. }
  319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  320. }, function($ctx1) {$ctx1.fill(self,"inspectorWidget",{})});
  321. //>>excludeEnd("ctx");
  322. }; }),
  323. $globals.HLDebugger);
  324. $core.addMethod(
  325. $core.method({
  326. selector: "model",
  327. protocol: "accessing",
  328. //>>excludeStart("ide", pragmas.excludeIdeData);
  329. args: [],
  330. source: "model\x0a\x09^ model ifNil: [ model := HLDebuggerModel new ]",
  331. referencedClasses: ["HLDebuggerModel"],
  332. //>>excludeEnd("ide");
  333. pragmas: [],
  334. messageSends: ["ifNil:", "new"]
  335. }, function ($methodClass){ return function (){
  336. var self=this,$self=this;
  337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  338. return $core.withContext(function($ctx1) {
  339. //>>excludeEnd("ctx");
  340. var $1;
  341. $1=$self.model;
  342. if($1 == null || $1.a$nil){
  343. $self.model=$recv($globals.HLDebuggerModel)._new();
  344. return $self.model;
  345. } else {
  346. return $1;
  347. }
  348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  349. }, function($ctx1) {$ctx1.fill(self,"model",{})});
  350. //>>excludeEnd("ctx");
  351. }; }),
  352. $globals.HLDebugger);
  353. $core.addMethod(
  354. $core.method({
  355. selector: "observeModel",
  356. protocol: "actions",
  357. //>>excludeStart("ide", pragmas.excludeIdeData);
  358. args: [],
  359. 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",
  360. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerProceeded"],
  361. //>>excludeEnd("ide");
  362. pragmas: [],
  363. messageSends: ["on:send:to:", "announcer", "model"]
  364. }, function ($methodClass){ return function (){
  365. var self=this,$self=this;
  366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  367. return $core.withContext(function($ctx1) {
  368. //>>excludeEnd("ctx");
  369. var $1;
  370. $1=$recv($self._model())._announcer();
  371. [$recv($1)._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected:",self)
  372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  373. ,$ctx1.sendIdx["on:send:to:"]=1
  374. //>>excludeEnd("ctx");
  375. ][0];
  376. [$recv($1)._on_send_to_($globals.HLDebuggerStepped,"onDebuggerStepped:",self)
  377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  378. ,$ctx1.sendIdx["on:send:to:"]=2
  379. //>>excludeEnd("ctx");
  380. ][0];
  381. $recv($1)._on_send_to_($globals.HLDebuggerProceeded,"onDebuggerProceeded",self);
  382. return self;
  383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  384. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  385. //>>excludeEnd("ctx");
  386. }; }),
  387. $globals.HLDebugger);
  388. $core.addMethod(
  389. $core.method({
  390. selector: "onContextSelected:",
  391. protocol: "reactions",
  392. //>>excludeStart("ide", pragmas.excludeIdeData);
  393. args: ["anAnnouncement"],
  394. source: "onContextSelected: anAnnouncement\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context)",
  395. referencedClasses: ["HLContextInspectorDecorator"],
  396. //>>excludeEnd("ide");
  397. pragmas: [],
  398. messageSends: ["inspect:", "inspectorWidget", "on:", "context"]
  399. }, function ($methodClass){ return function (anAnnouncement){
  400. var self=this,$self=this;
  401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  402. return $core.withContext(function($ctx1) {
  403. //>>excludeEnd("ctx");
  404. $recv($self._inspectorWidget())._inspect_($recv($globals.HLContextInspectorDecorator)._on_($recv(anAnnouncement)._context()));
  405. return self;
  406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  407. }, function($ctx1) {$ctx1.fill(self,"onContextSelected:",{anAnnouncement:anAnnouncement})});
  408. //>>excludeEnd("ctx");
  409. }; }),
  410. $globals.HLDebugger);
  411. $core.addMethod(
  412. $core.method({
  413. selector: "onDebuggerProceeded",
  414. protocol: "reactions",
  415. //>>excludeStart("ide", pragmas.excludeIdeData);
  416. args: [],
  417. source: "onDebuggerProceeded\x0a\x09self removeTab",
  418. referencedClasses: [],
  419. //>>excludeEnd("ide");
  420. pragmas: [],
  421. messageSends: ["removeTab"]
  422. }, function ($methodClass){ return function (){
  423. var self=this,$self=this;
  424. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  425. return $core.withContext(function($ctx1) {
  426. //>>excludeEnd("ctx");
  427. $self._removeTab();
  428. return self;
  429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  430. }, function($ctx1) {$ctx1.fill(self,"onDebuggerProceeded",{})});
  431. //>>excludeEnd("ctx");
  432. }; }),
  433. $globals.HLDebugger);
  434. $core.addMethod(
  435. $core.method({
  436. selector: "onDebuggerStepped:",
  437. protocol: "reactions",
  438. //>>excludeStart("ide", pragmas.excludeIdeData);
  439. args: ["anAnnouncement"],
  440. source: "onDebuggerStepped: anAnnouncement\x0a\x09self model atEnd ifTrue: [ self removeTab ].\x0a\x09\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context).\x0a\x09self stackListWidget refresh",
  441. referencedClasses: ["HLContextInspectorDecorator"],
  442. //>>excludeEnd("ide");
  443. pragmas: [],
  444. messageSends: ["ifTrue:", "atEnd", "model", "removeTab", "inspect:", "inspectorWidget", "on:", "context", "refresh", "stackListWidget"]
  445. }, function ($methodClass){ return function (anAnnouncement){
  446. var self=this,$self=this;
  447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  448. return $core.withContext(function($ctx1) {
  449. //>>excludeEnd("ctx");
  450. if($core.assert($recv($self._model())._atEnd())){
  451. $self._removeTab();
  452. }
  453. $recv($self._inspectorWidget())._inspect_($recv($globals.HLContextInspectorDecorator)._on_($recv(anAnnouncement)._context()));
  454. $recv($self._stackListWidget())._refresh();
  455. return self;
  456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  457. }, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement})});
  458. //>>excludeEnd("ctx");
  459. }; }),
  460. $globals.HLDebugger);
  461. $core.addMethod(
  462. $core.method({
  463. selector: "registerBindingsOn:",
  464. protocol: "keybindings",
  465. //>>excludeStart("ide", pragmas.excludeIdeData);
  466. args: ["aBindingGroup"],
  467. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  468. referencedClasses: ["HLToolCommand"],
  469. //>>excludeEnd("ide");
  470. pragmas: [],
  471. messageSends: ["registerConcreteClassesOn:for:", "model"]
  472. }, function ($methodClass){ return function (aBindingGroup){
  473. var self=this,$self=this;
  474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  475. return $core.withContext(function($ctx1) {
  476. //>>excludeEnd("ctx");
  477. $recv($globals.HLToolCommand)._registerConcreteClassesOn_for_(aBindingGroup,$self._model());
  478. return self;
  479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  480. }, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup})});
  481. //>>excludeEnd("ctx");
  482. }; }),
  483. $globals.HLDebugger);
  484. $core.addMethod(
  485. $core.method({
  486. selector: "renderContentOn:",
  487. protocol: "rendering",
  488. //>>excludeStart("ide", pragmas.excludeIdeData);
  489. args: ["html"],
  490. 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)))",
  491. referencedClasses: ["HLContainer", "HLVerticalSplitter", "HLHorizontalSplitter"],
  492. //>>excludeEnd("ide");
  493. pragmas: [],
  494. messageSends: ["renderHeadOn:", "with:", "with:with:", "codeWidget", "stackListWidget", "inspectorWidget"]
  495. }, function ($methodClass){ return function (html){
  496. var self=this,$self=this;
  497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  498. return $core.withContext(function($ctx1) {
  499. //>>excludeEnd("ctx");
  500. $self._renderHeadOn_(html);
  501. [$recv(html)._with_($recv($globals.HLContainer)._with_([$recv($globals.HLVerticalSplitter)._with_with_($self._codeWidget(),$recv($globals.HLHorizontalSplitter)._with_with_($self._stackListWidget(),$self._inspectorWidget()))
  502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  503. ,$ctx1.sendIdx["with:with:"]=1
  504. //>>excludeEnd("ctx");
  505. ][0]))
  506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  507. ,$ctx1.sendIdx["with:"]=1
  508. //>>excludeEnd("ctx");
  509. ][0];
  510. return self;
  511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  512. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html})});
  513. //>>excludeEnd("ctx");
  514. }; }),
  515. $globals.HLDebugger);
  516. $core.addMethod(
  517. $core.method({
  518. selector: "renderHeadOn:",
  519. protocol: "rendering",
  520. //>>excludeStart("ide", pragmas.excludeIdeData);
  521. args: ["html"],
  522. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'head'; \x0a\x09\x09with: [ html h2 with: self model error messageText ]",
  523. referencedClasses: [],
  524. //>>excludeEnd("ide");
  525. pragmas: [],
  526. messageSends: ["class:", "div", "with:", "h2", "messageText", "error", "model"]
  527. }, function ($methodClass){ return function (html){
  528. var self=this,$self=this;
  529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  530. return $core.withContext(function($ctx1) {
  531. //>>excludeEnd("ctx");
  532. var $1;
  533. $1=$recv(html)._div();
  534. $recv($1)._class_("head");
  535. [$recv($1)._with_((function(){
  536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  537. return $core.withContext(function($ctx2) {
  538. //>>excludeEnd("ctx");
  539. return $recv($recv(html)._h2())._with_($recv($recv($self._model())._error())._messageText());
  540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  541. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  542. //>>excludeEnd("ctx");
  543. }))
  544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  545. ,$ctx1.sendIdx["with:"]=1
  546. //>>excludeEnd("ctx");
  547. ][0];
  548. return self;
  549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  550. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html})});
  551. //>>excludeEnd("ctx");
  552. }; }),
  553. $globals.HLDebugger);
  554. $core.addMethod(
  555. $core.method({
  556. selector: "stackListWidget",
  557. protocol: "widgets",
  558. //>>excludeStart("ide", pragmas.excludeIdeData);
  559. args: [],
  560. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  561. referencedClasses: ["HLStackListWidget"],
  562. //>>excludeEnd("ide");
  563. pragmas: [],
  564. messageSends: ["ifNil:", "next:", "on:", "model", "codeWidget", "yourself"]
  565. }, function ($methodClass){ return function (){
  566. var self=this,$self=this;
  567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  568. return $core.withContext(function($ctx1) {
  569. //>>excludeEnd("ctx");
  570. var $1,$2;
  571. $1=$self.stackListWidget;
  572. if($1 == null || $1.a$nil){
  573. $2=$recv($globals.HLStackListWidget)._on_($self._model());
  574. $recv($2)._next_($self._codeWidget());
  575. $self.stackListWidget=$recv($2)._yourself();
  576. return $self.stackListWidget;
  577. } else {
  578. return $1;
  579. }
  580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  581. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{})});
  582. //>>excludeEnd("ctx");
  583. }; }),
  584. $globals.HLDebugger);
  585. $core.addMethod(
  586. $core.method({
  587. selector: "unregister",
  588. protocol: "actions",
  589. //>>excludeStart("ide", pragmas.excludeIdeData);
  590. args: [],
  591. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  592. referencedClasses: [],
  593. //>>excludeEnd("ide");
  594. pragmas: [],
  595. messageSends: ["unregister", "inspectorWidget"]
  596. }, function ($methodClass){ return function (){
  597. var self=this,$self=this;
  598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  599. return $core.withContext(function($ctx1) {
  600. //>>excludeEnd("ctx");
  601. [(
  602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  603. $ctx1.supercall = true,
  604. //>>excludeEnd("ctx");
  605. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._unregister.call($self))
  606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  607. ,$ctx1.sendIdx["unregister"]=1,$ctx1.supercall = false
  608. //>>excludeEnd("ctx");
  609. ][0];
  610. $recv($self._inspectorWidget())._unregister();
  611. return self;
  612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  613. }, function($ctx1) {$ctx1.fill(self,"unregister",{})});
  614. //>>excludeEnd("ctx");
  615. }; }),
  616. $globals.HLDebugger);
  617. $core.addMethod(
  618. $core.method({
  619. selector: "on:",
  620. protocol: "instance creation",
  621. //>>excludeStart("ide", pragmas.excludeIdeData);
  622. args: ["anError"],
  623. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  624. referencedClasses: [],
  625. //>>excludeEnd("ide");
  626. pragmas: [],
  627. messageSends: ["initializeFromError:", "new", "yourself"]
  628. }, function ($methodClass){ return function (anError){
  629. var self=this,$self=this;
  630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  631. return $core.withContext(function($ctx1) {
  632. //>>excludeEnd("ctx");
  633. var $1;
  634. $1=$self._new();
  635. $recv($1)._initializeFromError_(anError);
  636. return $recv($1)._yourself();
  637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  638. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError})});
  639. //>>excludeEnd("ctx");
  640. }; }),
  641. $globals.HLDebugger.a$cls);
  642. $core.addMethod(
  643. $core.method({
  644. selector: "tabClass",
  645. protocol: "accessing",
  646. //>>excludeStart("ide", pragmas.excludeIdeData);
  647. args: [],
  648. source: "tabClass\x0a\x09^ 'debugger'",
  649. referencedClasses: [],
  650. //>>excludeEnd("ide");
  651. pragmas: [],
  652. messageSends: []
  653. }, function ($methodClass){ return function (){
  654. var self=this,$self=this;
  655. return "debugger";
  656. }; }),
  657. $globals.HLDebugger.a$cls);
  658. $core.addMethod(
  659. $core.method({
  660. selector: "tabLabel",
  661. protocol: "accessing",
  662. //>>excludeStart("ide", pragmas.excludeIdeData);
  663. args: [],
  664. source: "tabLabel\x0a\x09^ 'Debugger'",
  665. referencedClasses: [],
  666. //>>excludeEnd("ide");
  667. pragmas: [],
  668. messageSends: []
  669. }, function ($methodClass){ return function (){
  670. var self=this,$self=this;
  671. return "Debugger";
  672. }; }),
  673. $globals.HLDebugger.a$cls);
  674. $core.addClass("HLDebuggerCodeModel", $globals.HLCodeModel, "Helios-Debugger");
  675. $core.setSlots($globals.HLDebuggerCodeModel, ["debuggerModel"]);
  676. $core.addMethod(
  677. $core.method({
  678. selector: "debuggerModel",
  679. protocol: "accessing",
  680. //>>excludeStart("ide", pragmas.excludeIdeData);
  681. args: [],
  682. source: "debuggerModel\x0a\x09^ debuggerModel",
  683. referencedClasses: [],
  684. //>>excludeEnd("ide");
  685. pragmas: [],
  686. messageSends: []
  687. }, function ($methodClass){ return function (){
  688. var self=this,$self=this;
  689. return $self.debuggerModel;
  690. }; }),
  691. $globals.HLDebuggerCodeModel);
  692. $core.addMethod(
  693. $core.method({
  694. selector: "debuggerModel:",
  695. protocol: "accessing",
  696. //>>excludeStart("ide", pragmas.excludeIdeData);
  697. args: ["anObject"],
  698. source: "debuggerModel: anObject\x0a\x09debuggerModel := anObject",
  699. referencedClasses: [],
  700. //>>excludeEnd("ide");
  701. pragmas: [],
  702. messageSends: []
  703. }, function ($methodClass){ return function (anObject){
  704. var self=this,$self=this;
  705. $self.debuggerModel=anObject;
  706. return self;
  707. }; }),
  708. $globals.HLDebuggerCodeModel);
  709. $core.addMethod(
  710. $core.method({
  711. selector: "doIt:",
  712. protocol: "actions",
  713. //>>excludeStart("ide", pragmas.excludeIdeData);
  714. args: ["aString"],
  715. source: "doIt: aString\x0a\x09^ self debuggerModel evaluate: aString",
  716. referencedClasses: [],
  717. //>>excludeEnd("ide");
  718. pragmas: [],
  719. messageSends: ["evaluate:", "debuggerModel"]
  720. }, function ($methodClass){ return function (aString){
  721. var self=this,$self=this;
  722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  723. return $core.withContext(function($ctx1) {
  724. //>>excludeEnd("ctx");
  725. return $recv($self._debuggerModel())._evaluate_(aString);
  726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  727. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString})});
  728. //>>excludeEnd("ctx");
  729. }; }),
  730. $globals.HLDebuggerCodeModel);
  731. $core.addClass("HLDebuggerCodeWidget", $globals.HLBrowserCodeWidget, "Helios-Debugger");
  732. $core.addMethod(
  733. $core.method({
  734. selector: "addStopAt:",
  735. protocol: "actions",
  736. //>>excludeStart("ide", pragmas.excludeIdeData);
  737. args: ["anInteger"],
  738. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></div>' asJQuery toArray first",
  739. referencedClasses: [],
  740. //>>excludeEnd("ide");
  741. pragmas: [],
  742. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"]
  743. }, function ($methodClass){ return function (anInteger){
  744. var self=this,$self=this;
  745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  746. return $core.withContext(function($ctx1) {
  747. //>>excludeEnd("ctx");
  748. $recv($self.editor)._setGutterMarker_gutter_value_(anInteger,"stops",$recv($recv("<div class=\x22stop\x22></div>"._asJQuery())._toArray())._first());
  749. return self;
  750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  751. }, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger})});
  752. //>>excludeEnd("ctx");
  753. }; }),
  754. $globals.HLDebuggerCodeWidget);
  755. $core.addMethod(
  756. $core.method({
  757. selector: "clearHighlight",
  758. protocol: "actions",
  759. //>>excludeStart("ide", pragmas.excludeIdeData);
  760. args: [],
  761. source: "clearHighlight\x0a\x09self editor clearGutter: 'stops'",
  762. referencedClasses: [],
  763. //>>excludeEnd("ide");
  764. pragmas: [],
  765. messageSends: ["clearGutter:", "editor"]
  766. }, function ($methodClass){ return function (){
  767. var self=this,$self=this;
  768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  769. return $core.withContext(function($ctx1) {
  770. //>>excludeEnd("ctx");
  771. $recv($self._editor())._clearGutter_("stops");
  772. return self;
  773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  774. }, function($ctx1) {$ctx1.fill(self,"clearHighlight",{})});
  775. //>>excludeEnd("ctx");
  776. }; }),
  777. $globals.HLDebuggerCodeWidget);
  778. $core.addMethod(
  779. $core.method({
  780. selector: "contents:",
  781. protocol: "accessing",
  782. //>>excludeStart("ide", pragmas.excludeIdeData);
  783. args: ["aString"],
  784. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  785. referencedClasses: [],
  786. //>>excludeEnd("ide");
  787. pragmas: [],
  788. messageSends: ["clearHighlight", "contents:"]
  789. }, function ($methodClass){ return function (aString){
  790. var self=this,$self=this;
  791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  792. return $core.withContext(function($ctx1) {
  793. //>>excludeEnd("ctx");
  794. $self._clearHighlight();
  795. [(
  796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  797. $ctx1.supercall = true,
  798. //>>excludeEnd("ctx");
  799. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._contents_.call($self,aString))
  800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  801. ,$ctx1.supercall = false
  802. //>>excludeEnd("ctx");
  803. ][0];
  804. return self;
  805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  806. }, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString})});
  807. //>>excludeEnd("ctx");
  808. }; }),
  809. $globals.HLDebuggerCodeWidget);
  810. $core.addMethod(
  811. $core.method({
  812. selector: "editorOptions",
  813. protocol: "accessing",
  814. //>>excludeStart("ide", pragmas.excludeIdeData);
  815. args: [],
  816. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  817. referencedClasses: [],
  818. //>>excludeEnd("ide");
  819. pragmas: [],
  820. messageSends: ["at:put:", "editorOptions", "yourself"]
  821. }, function ($methodClass){ return function (){
  822. var self=this,$self=this;
  823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  824. return $core.withContext(function($ctx1) {
  825. //>>excludeEnd("ctx");
  826. var $1;
  827. $1=[(
  828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  829. $ctx1.supercall = true,
  830. //>>excludeEnd("ctx");
  831. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._editorOptions.call($self))
  832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  833. ,$ctx1.supercall = false
  834. //>>excludeEnd("ctx");
  835. ][0];
  836. $recv($1)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  837. return $recv($1)._yourself();
  838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  839. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{})});
  840. //>>excludeEnd("ctx");
  841. }; }),
  842. $globals.HLDebuggerCodeWidget);
  843. $core.addMethod(
  844. $core.method({
  845. selector: "highlight",
  846. protocol: "actions",
  847. //>>excludeStart("ide", pragmas.excludeIdeData);
  848. args: [],
  849. source: "highlight\x0a\x09self browserModel nextNode ifNotNil: [ :node |\x0a\x09\x09self highlightNode: node ]",
  850. referencedClasses: [],
  851. //>>excludeEnd("ide");
  852. pragmas: [],
  853. messageSends: ["ifNotNil:", "nextNode", "browserModel", "highlightNode:"]
  854. }, function ($methodClass){ return function (){
  855. var self=this,$self=this;
  856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  857. return $core.withContext(function($ctx1) {
  858. //>>excludeEnd("ctx");
  859. var $1;
  860. $1=$recv($self._browserModel())._nextNode();
  861. if($1 == null || $1.a$nil){
  862. $1;
  863. } else {
  864. var node;
  865. node=$1;
  866. $self._highlightNode_(node);
  867. }
  868. return self;
  869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  870. }, function($ctx1) {$ctx1.fill(self,"highlight",{})});
  871. //>>excludeEnd("ctx");
  872. }; }),
  873. $globals.HLDebuggerCodeWidget);
  874. $core.addMethod(
  875. $core.method({
  876. selector: "highlightNode:",
  877. protocol: "actions",
  878. //>>excludeStart("ide", pragmas.excludeIdeData);
  879. args: ["aNode"],
  880. 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) } ]",
  881. referencedClasses: [],
  882. //>>excludeEnd("ide");
  883. pragmas: [],
  884. messageSends: ["ifNotNil:", "clearHighlight", "addStopAt:", "-", "x", "positionStart", "setSelection:to:", "editor", "y", "positionEnd"]
  885. }, function ($methodClass){ return function (aNode){
  886. var self=this,$self=this;
  887. var token;
  888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  889. return $core.withContext(function($ctx1) {
  890. //>>excludeEnd("ctx");
  891. if(aNode == null || aNode.a$nil){
  892. aNode;
  893. } else {
  894. $self._clearHighlight();
  895. $self._addStopAt_([$recv([$recv([$recv(aNode)._positionStart()
  896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  897. ,$ctx1.sendIdx["positionStart"]=1
  898. //>>excludeEnd("ctx");
  899. ][0])._x()
  900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  901. ,$ctx1.sendIdx["x"]=1
  902. //>>excludeEnd("ctx");
  903. ][0]).__minus((1))
  904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  905. ,$ctx1.sendIdx["-"]=1
  906. //>>excludeEnd("ctx");
  907. ][0]);
  908. $recv($self._editor())._setSelection_to_($globals.HashedCollection._newFromPairs_(["line",[$recv([$recv([$recv(aNode)._positionStart()
  909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  910. ,$ctx1.sendIdx["positionStart"]=2
  911. //>>excludeEnd("ctx");
  912. ][0])._x()
  913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  914. ,$ctx1.sendIdx["x"]=2
  915. //>>excludeEnd("ctx");
  916. ][0]).__minus((1))
  917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  918. ,$ctx1.sendIdx["-"]=2
  919. //>>excludeEnd("ctx");
  920. ][0],"ch",[$recv([$recv($recv(aNode)._positionStart())._y()
  921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  922. ,$ctx1.sendIdx["y"]=1
  923. //>>excludeEnd("ctx");
  924. ][0]).__minus((1))
  925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  926. ,$ctx1.sendIdx["-"]=3
  927. //>>excludeEnd("ctx");
  928. ][0]]),$globals.HashedCollection._newFromPairs_(["line",$recv($recv([$recv(aNode)._positionEnd()
  929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  930. ,$ctx1.sendIdx["positionEnd"]=1
  931. //>>excludeEnd("ctx");
  932. ][0])._x()).__minus((1)),"ch",$recv($recv(aNode)._positionEnd())._y()]));
  933. }
  934. return self;
  935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  936. }, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token})});
  937. //>>excludeEnd("ctx");
  938. }; }),
  939. $globals.HLDebuggerCodeWidget);
  940. $core.addMethod(
  941. $core.method({
  942. selector: "observeBrowserModel",
  943. protocol: "actions",
  944. //>>excludeStart("ide", pragmas.excludeIdeData);
  945. args: [],
  946. 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",
  947. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerWhere"],
  948. //>>excludeEnd("ide");
  949. pragmas: [],
  950. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"]
  951. }, function ($methodClass){ return function (){
  952. var self=this,$self=this;
  953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  954. return $core.withContext(function($ctx1) {
  955. //>>excludeEnd("ctx");
  956. [(
  957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  958. $ctx1.supercall = true,
  959. //>>excludeEnd("ctx");
  960. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._observeBrowserModel.call($self))
  961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  962. ,$ctx1.supercall = false
  963. //>>excludeEnd("ctx");
  964. ][0];
  965. [$recv([$recv([$self._browserModel()
  966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  967. ,$ctx1.sendIdx["browserModel"]=1
  968. //>>excludeEnd("ctx");
  969. ][0])._announcer()
  970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  971. ,$ctx1.sendIdx["announcer"]=1
  972. //>>excludeEnd("ctx");
  973. ][0])._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected",self)
  974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  975. ,$ctx1.sendIdx["on:send:to:"]=1
  976. //>>excludeEnd("ctx");
  977. ][0];
  978. [$recv([$recv([$self._browserModel()
  979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  980. ,$ctx1.sendIdx["browserModel"]=2
  981. //>>excludeEnd("ctx");
  982. ][0])._announcer()
  983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  984. ,$ctx1.sendIdx["announcer"]=2
  985. //>>excludeEnd("ctx");
  986. ][0])._on_send_to_($globals.HLDebuggerStepped,"onContextSelected",self)
  987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  988. ,$ctx1.sendIdx["on:send:to:"]=2
  989. //>>excludeEnd("ctx");
  990. ][0];
  991. $recv($recv($self._browserModel())._announcer())._on_send_to_($globals.HLDebuggerWhere,"onContextSelected",self);
  992. return self;
  993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  994. }, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{})});
  995. //>>excludeEnd("ctx");
  996. }; }),
  997. $globals.HLDebuggerCodeWidget);
  998. $core.addMethod(
  999. $core.method({
  1000. selector: "onContextSelected",
  1001. protocol: "reactions",
  1002. //>>excludeStart("ide", pragmas.excludeIdeData);
  1003. args: [],
  1004. source: "onContextSelected\x0a\x09self highlight",
  1005. referencedClasses: [],
  1006. //>>excludeEnd("ide");
  1007. pragmas: [],
  1008. messageSends: ["highlight"]
  1009. }, function ($methodClass){ return function (){
  1010. var self=this,$self=this;
  1011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1012. return $core.withContext(function($ctx1) {
  1013. //>>excludeEnd("ctx");
  1014. $self._highlight();
  1015. return self;
  1016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1017. }, function($ctx1) {$ctx1.fill(self,"onContextSelected",{})});
  1018. //>>excludeEnd("ctx");
  1019. }; }),
  1020. $globals.HLDebuggerCodeWidget);
  1021. $core.addMethod(
  1022. $core.method({
  1023. selector: "renderOn:",
  1024. protocol: "rendering",
  1025. //>>excludeStart("ide", pragmas.excludeIdeData);
  1026. args: ["html"],
  1027. source: "renderOn: html\x0a\x09super renderOn: html.\x0a\x09self contents: self browserModel selectedMethod source",
  1028. referencedClasses: [],
  1029. //>>excludeEnd("ide");
  1030. pragmas: [],
  1031. messageSends: ["renderOn:", "contents:", "source", "selectedMethod", "browserModel"]
  1032. }, function ($methodClass){ return function (html){
  1033. var self=this,$self=this;
  1034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1035. return $core.withContext(function($ctx1) {
  1036. //>>excludeEnd("ctx");
  1037. [(
  1038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1039. $ctx1.supercall = true,
  1040. //>>excludeEnd("ctx");
  1041. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._renderOn_.call($self,html))
  1042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1043. ,$ctx1.supercall = false
  1044. //>>excludeEnd("ctx");
  1045. ][0];
  1046. $self._contents_($recv($recv($self._browserModel())._selectedMethod())._source());
  1047. return self;
  1048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1049. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html})});
  1050. //>>excludeEnd("ctx");
  1051. }; }),
  1052. $globals.HLDebuggerCodeWidget);
  1053. $core.addClass("HLDebuggerModel", $globals.HLToolModel, "Helios-Debugger");
  1054. $core.setSlots($globals.HLDebuggerModel, ["rootContext", "debugger", "error"]);
  1055. //>>excludeStart("ide", pragmas.excludeIdeData);
  1056. $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.";
  1057. //>>excludeEnd("ide");
  1058. $core.addMethod(
  1059. $core.method({
  1060. selector: "atEnd",
  1061. protocol: "testing",
  1062. //>>excludeStart("ide", pragmas.excludeIdeData);
  1063. args: [],
  1064. source: "atEnd\x0a\x09^ self debugger atEnd",
  1065. referencedClasses: [],
  1066. //>>excludeEnd("ide");
  1067. pragmas: [],
  1068. messageSends: ["atEnd", "debugger"]
  1069. }, function ($methodClass){ return function (){
  1070. var self=this,$self=this;
  1071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1072. return $core.withContext(function($ctx1) {
  1073. //>>excludeEnd("ctx");
  1074. return $recv($self._debugger())._atEnd();
  1075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1076. }, function($ctx1) {$ctx1.fill(self,"atEnd",{})});
  1077. //>>excludeEnd("ctx");
  1078. }; }),
  1079. $globals.HLDebuggerModel);
  1080. $core.addMethod(
  1081. $core.method({
  1082. selector: "contexts",
  1083. protocol: "accessing",
  1084. //>>excludeStart("ide", pragmas.excludeIdeData);
  1085. args: [],
  1086. 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",
  1087. referencedClasses: ["OrderedCollection"],
  1088. //>>excludeEnd("ide");
  1089. pragmas: [],
  1090. messageSends: ["new", "rootContext", "whileTrue:", "notNil", "add:", "outerContext"]
  1091. }, function ($methodClass){ return function (){
  1092. var self=this,$self=this;
  1093. var contexts,context;
  1094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1095. return $core.withContext(function($ctx1) {
  1096. //>>excludeEnd("ctx");
  1097. contexts=$recv($globals.OrderedCollection)._new();
  1098. context=$self._rootContext();
  1099. $recv((function(){
  1100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1101. return $core.withContext(function($ctx2) {
  1102. //>>excludeEnd("ctx");
  1103. return $recv(context)._notNil();
  1104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1105. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1106. //>>excludeEnd("ctx");
  1107. }))._whileTrue_((function(){
  1108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1109. return $core.withContext(function($ctx2) {
  1110. //>>excludeEnd("ctx");
  1111. $recv(contexts)._add_(context);
  1112. context=$recv(context)._outerContext();
  1113. return context;
  1114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1115. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1116. //>>excludeEnd("ctx");
  1117. }));
  1118. return contexts;
  1119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1120. }, function($ctx1) {$ctx1.fill(self,"contexts",{contexts:contexts,context:context})});
  1121. //>>excludeEnd("ctx");
  1122. }; }),
  1123. $globals.HLDebuggerModel);
  1124. $core.addMethod(
  1125. $core.method({
  1126. selector: "currentContext",
  1127. protocol: "accessing",
  1128. //>>excludeStart("ide", pragmas.excludeIdeData);
  1129. args: [],
  1130. source: "currentContext\x0a\x09^ self debugger context",
  1131. referencedClasses: [],
  1132. //>>excludeEnd("ide");
  1133. pragmas: [],
  1134. messageSends: ["context", "debugger"]
  1135. }, function ($methodClass){ return function (){
  1136. var self=this,$self=this;
  1137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1138. return $core.withContext(function($ctx1) {
  1139. //>>excludeEnd("ctx");
  1140. return $recv($self._debugger())._context();
  1141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1142. }, function($ctx1) {$ctx1.fill(self,"currentContext",{})});
  1143. //>>excludeEnd("ctx");
  1144. }; }),
  1145. $globals.HLDebuggerModel);
  1146. $core.addMethod(
  1147. $core.method({
  1148. selector: "currentContext:",
  1149. protocol: "accessing",
  1150. //>>excludeStart("ide", pragmas.excludeIdeData);
  1151. args: ["aContext"],
  1152. 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) ]",
  1153. referencedClasses: ["HLDebuggerContextSelected"],
  1154. //>>excludeEnd("ide");
  1155. pragmas: [],
  1156. messageSends: ["withChangesDo:", "selectedMethod:", "method", "context:", "debugger", "announce:", "announcer", "new", "yourself"]
  1157. }, function ($methodClass){ return function (aContext){
  1158. var self=this,$self=this;
  1159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1160. return $core.withContext(function($ctx1) {
  1161. //>>excludeEnd("ctx");
  1162. var $1,$2;
  1163. $self._withChangesDo_((function(){
  1164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1165. return $core.withContext(function($ctx2) {
  1166. //>>excludeEnd("ctx");
  1167. $self._selectedMethod_($recv(aContext)._method());
  1168. [$recv($self._debugger())._context_(aContext)
  1169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1170. ,$ctx2.sendIdx["context:"]=1
  1171. //>>excludeEnd("ctx");
  1172. ][0];
  1173. $1=$self._announcer();
  1174. $2=$recv($globals.HLDebuggerContextSelected)._new();
  1175. $recv($2)._context_(aContext);
  1176. return $recv($1)._announce_($recv($2)._yourself());
  1177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1178. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1179. //>>excludeEnd("ctx");
  1180. }));
  1181. return self;
  1182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1183. }, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext})});
  1184. //>>excludeEnd("ctx");
  1185. }; }),
  1186. $globals.HLDebuggerModel);
  1187. $core.addMethod(
  1188. $core.method({
  1189. selector: "debugger",
  1190. protocol: "accessing",
  1191. //>>excludeStart("ide", pragmas.excludeIdeData);
  1192. args: [],
  1193. source: "debugger\x0a\x09^ debugger ifNil: [ debugger := ASTDebugger new ]",
  1194. referencedClasses: ["ASTDebugger"],
  1195. //>>excludeEnd("ide");
  1196. pragmas: [],
  1197. messageSends: ["ifNil:", "new"]
  1198. }, function ($methodClass){ return function (){
  1199. var self=this,$self=this;
  1200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1201. return $core.withContext(function($ctx1) {
  1202. //>>excludeEnd("ctx");
  1203. var $1;
  1204. $1=$self.debugger;
  1205. if($1 == null || $1.a$nil){
  1206. $self.debugger=$recv($globals.ASTDebugger)._new();
  1207. return $self.debugger;
  1208. } else {
  1209. return $1;
  1210. }
  1211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1212. }, function($ctx1) {$ctx1.fill(self,"debugger",{})});
  1213. //>>excludeEnd("ctx");
  1214. }; }),
  1215. $globals.HLDebuggerModel);
  1216. $core.addMethod(
  1217. $core.method({
  1218. selector: "error",
  1219. protocol: "accessing",
  1220. //>>excludeStart("ide", pragmas.excludeIdeData);
  1221. args: [],
  1222. source: "error\x0a\x09^ error",
  1223. referencedClasses: [],
  1224. //>>excludeEnd("ide");
  1225. pragmas: [],
  1226. messageSends: []
  1227. }, function ($methodClass){ return function (){
  1228. var self=this,$self=this;
  1229. return $self.error;
  1230. }; }),
  1231. $globals.HLDebuggerModel);
  1232. $core.addMethod(
  1233. $core.method({
  1234. selector: "evaluate:",
  1235. protocol: "evaluating",
  1236. //>>excludeStart("ide", pragmas.excludeIdeData);
  1237. args: ["aString"],
  1238. source: "evaluate: aString\x0a\x09^ self environment \x0a\x09\x09evaluate: aString \x0a\x09\x09for: self currentContext",
  1239. referencedClasses: [],
  1240. //>>excludeEnd("ide");
  1241. pragmas: [],
  1242. messageSends: ["evaluate:for:", "environment", "currentContext"]
  1243. }, function ($methodClass){ return function (aString){
  1244. var self=this,$self=this;
  1245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1246. return $core.withContext(function($ctx1) {
  1247. //>>excludeEnd("ctx");
  1248. return $recv($self._environment())._evaluate_for_(aString,$self._currentContext());
  1249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1250. }, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString})});
  1251. //>>excludeEnd("ctx");
  1252. }; }),
  1253. $globals.HLDebuggerModel);
  1254. $core.addMethod(
  1255. $core.method({
  1256. selector: "flushInnerContexts",
  1257. protocol: "private",
  1258. //>>excludeStart("ide", pragmas.excludeIdeData);
  1259. args: [],
  1260. 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",
  1261. referencedClasses: [],
  1262. //>>excludeEnd("ide");
  1263. pragmas: [],
  1264. messageSends: ["innerContext:", "currentContext", "initializeContexts"]
  1265. }, function ($methodClass){ return function (){
  1266. var self=this,$self=this;
  1267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1268. return $core.withContext(function($ctx1) {
  1269. //>>excludeEnd("ctx");
  1270. $recv([$self._currentContext()
  1271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1272. ,$ctx1.sendIdx["currentContext"]=1
  1273. //>>excludeEnd("ctx");
  1274. ][0])._innerContext_(nil);
  1275. $self.rootContext=$self._currentContext();
  1276. $self._initializeContexts();
  1277. return self;
  1278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1279. }, function($ctx1) {$ctx1.fill(self,"flushInnerContexts",{})});
  1280. //>>excludeEnd("ctx");
  1281. }; }),
  1282. $globals.HLDebuggerModel);
  1283. $core.addMethod(
  1284. $core.method({
  1285. selector: "initializeFromError:",
  1286. protocol: "initialization",
  1287. //>>excludeStart("ide", pragmas.excludeIdeData);
  1288. args: ["anError"],
  1289. 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",
  1290. referencedClasses: ["AIContext"],
  1291. //>>excludeEnd("ide");
  1292. pragmas: [],
  1293. messageSends: ["fromMethodContext:", "context", "signalerContextFrom:", "selectedMethod:", "method"]
  1294. }, function ($methodClass){ return function (anError){
  1295. var self=this,$self=this;
  1296. var errorContext;
  1297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1298. return $core.withContext(function($ctx1) {
  1299. //>>excludeEnd("ctx");
  1300. $self.error=anError;
  1301. errorContext=$recv($globals.AIContext)._fromMethodContext_($recv($self.error)._context());
  1302. $self.rootContext=$recv($self.error)._signalerContextFrom_(errorContext);
  1303. $self._selectedMethod_($recv($self.rootContext)._method());
  1304. return self;
  1305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1306. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError,errorContext:errorContext})});
  1307. //>>excludeEnd("ctx");
  1308. }; }),
  1309. $globals.HLDebuggerModel);
  1310. $core.addMethod(
  1311. $core.method({
  1312. selector: "nextNode",
  1313. protocol: "accessing",
  1314. //>>excludeStart("ide", pragmas.excludeIdeData);
  1315. args: [],
  1316. source: "nextNode\x0a\x09^ self debugger node",
  1317. referencedClasses: [],
  1318. //>>excludeEnd("ide");
  1319. pragmas: [],
  1320. messageSends: ["node", "debugger"]
  1321. }, function ($methodClass){ return function (){
  1322. var self=this,$self=this;
  1323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1324. return $core.withContext(function($ctx1) {
  1325. //>>excludeEnd("ctx");
  1326. return $recv($self._debugger())._node();
  1327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1328. }, function($ctx1) {$ctx1.fill(self,"nextNode",{})});
  1329. //>>excludeEnd("ctx");
  1330. }; }),
  1331. $globals.HLDebuggerModel);
  1332. $core.addMethod(
  1333. $core.method({
  1334. selector: "onStep",
  1335. protocol: "reactions",
  1336. //>>excludeStart("ide", pragmas.excludeIdeData);
  1337. args: [],
  1338. 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)",
  1339. referencedClasses: ["HLDebuggerContextSelected"],
  1340. //>>excludeEnd("ide");
  1341. pragmas: [],
  1342. messageSends: ["currentContext", "selectedMethod:", "method", "announce:", "announcer", "context:", "new", "yourself"]
  1343. }, function ($methodClass){ return function (){
  1344. var self=this,$self=this;
  1345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1346. return $core.withContext(function($ctx1) {
  1347. //>>excludeEnd("ctx");
  1348. var $1,$2;
  1349. $self.rootContext=[$self._currentContext()
  1350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1351. ,$ctx1.sendIdx["currentContext"]=1
  1352. //>>excludeEnd("ctx");
  1353. ][0];
  1354. $self._selectedMethod_($recv([$self._currentContext()
  1355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1356. ,$ctx1.sendIdx["currentContext"]=2
  1357. //>>excludeEnd("ctx");
  1358. ][0])._method());
  1359. $1=$self._announcer();
  1360. $2=$recv($globals.HLDebuggerContextSelected)._new();
  1361. $recv($2)._context_($self._currentContext());
  1362. $recv($1)._announce_($recv($2)._yourself());
  1363. return self;
  1364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1365. }, function($ctx1) {$ctx1.fill(self,"onStep",{})});
  1366. //>>excludeEnd("ctx");
  1367. }; }),
  1368. $globals.HLDebuggerModel);
  1369. $core.addMethod(
  1370. $core.method({
  1371. selector: "proceed",
  1372. protocol: "actions",
  1373. //>>excludeStart("ide", pragmas.excludeIdeData);
  1374. args: [],
  1375. source: "proceed\x0a\x09self debugger proceed.\x0a\x09\x0a\x09self announcer announce: HLDebuggerProceeded new",
  1376. referencedClasses: ["HLDebuggerProceeded"],
  1377. //>>excludeEnd("ide");
  1378. pragmas: [],
  1379. messageSends: ["proceed", "debugger", "announce:", "announcer", "new"]
  1380. }, function ($methodClass){ return function (){
  1381. var self=this,$self=this;
  1382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1383. return $core.withContext(function($ctx1) {
  1384. //>>excludeEnd("ctx");
  1385. $recv($self._debugger())._proceed();
  1386. $recv($self._announcer())._announce_($recv($globals.HLDebuggerProceeded)._new());
  1387. return self;
  1388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1389. }, function($ctx1) {$ctx1.fill(self,"proceed",{})});
  1390. //>>excludeEnd("ctx");
  1391. }; }),
  1392. $globals.HLDebuggerModel);
  1393. $core.addMethod(
  1394. $core.method({
  1395. selector: "restart",
  1396. protocol: "actions",
  1397. //>>excludeStart("ide", pragmas.excludeIdeData);
  1398. args: [],
  1399. 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)",
  1400. referencedClasses: ["HLDebuggerStepped"],
  1401. //>>excludeEnd("ide");
  1402. pragmas: [],
  1403. messageSends: ["restart", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1404. }, function ($methodClass){ return function (){
  1405. var self=this,$self=this;
  1406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1407. return $core.withContext(function($ctx1) {
  1408. //>>excludeEnd("ctx");
  1409. var $1,$2;
  1410. $recv($self._debugger())._restart();
  1411. $self._onStep();
  1412. $1=$self._announcer();
  1413. $2=$recv($globals.HLDebuggerStepped)._new();
  1414. $recv($2)._context_($self._currentContext());
  1415. $recv($1)._announce_($recv($2)._yourself());
  1416. return self;
  1417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1418. }, function($ctx1) {$ctx1.fill(self,"restart",{})});
  1419. //>>excludeEnd("ctx");
  1420. }; }),
  1421. $globals.HLDebuggerModel);
  1422. $core.addMethod(
  1423. $core.method({
  1424. selector: "rootContext",
  1425. protocol: "accessing",
  1426. //>>excludeStart("ide", pragmas.excludeIdeData);
  1427. args: [],
  1428. source: "rootContext\x0a\x09^ rootContext",
  1429. referencedClasses: [],
  1430. //>>excludeEnd("ide");
  1431. pragmas: [],
  1432. messageSends: []
  1433. }, function ($methodClass){ return function (){
  1434. var self=this,$self=this;
  1435. return $self.rootContext;
  1436. }; }),
  1437. $globals.HLDebuggerModel);
  1438. $core.addMethod(
  1439. $core.method({
  1440. selector: "stepOver",
  1441. protocol: "actions",
  1442. //>>excludeStart("ide", pragmas.excludeIdeData);
  1443. args: [],
  1444. 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)",
  1445. referencedClasses: ["HLDebuggerStepped"],
  1446. //>>excludeEnd("ide");
  1447. pragmas: [],
  1448. messageSends: ["stepOver", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1449. }, function ($methodClass){ return function (){
  1450. var self=this,$self=this;
  1451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1452. return $core.withContext(function($ctx1) {
  1453. //>>excludeEnd("ctx");
  1454. var $1,$2;
  1455. $recv($self._debugger())._stepOver();
  1456. $self._onStep();
  1457. $1=$self._announcer();
  1458. $2=$recv($globals.HLDebuggerStepped)._new();
  1459. $recv($2)._context_($self._currentContext());
  1460. $recv($1)._announce_($recv($2)._yourself());
  1461. return self;
  1462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1463. }, function($ctx1) {$ctx1.fill(self,"stepOver",{})});
  1464. //>>excludeEnd("ctx");
  1465. }; }),
  1466. $globals.HLDebuggerModel);
  1467. $core.addMethod(
  1468. $core.method({
  1469. selector: "where",
  1470. protocol: "actions",
  1471. //>>excludeStart("ide", pragmas.excludeIdeData);
  1472. args: [],
  1473. source: "where\x0a\x09self announcer announce: HLDebuggerWhere new",
  1474. referencedClasses: ["HLDebuggerWhere"],
  1475. //>>excludeEnd("ide");
  1476. pragmas: [],
  1477. messageSends: ["announce:", "announcer", "new"]
  1478. }, function ($methodClass){ return function (){
  1479. var self=this,$self=this;
  1480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1481. return $core.withContext(function($ctx1) {
  1482. //>>excludeEnd("ctx");
  1483. $recv($self._announcer())._announce_($recv($globals.HLDebuggerWhere)._new());
  1484. return self;
  1485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1486. }, function($ctx1) {$ctx1.fill(self,"where",{})});
  1487. //>>excludeEnd("ctx");
  1488. }; }),
  1489. $globals.HLDebuggerModel);
  1490. $core.addMethod(
  1491. $core.method({
  1492. selector: "on:",
  1493. protocol: "instance creation",
  1494. //>>excludeStart("ide", pragmas.excludeIdeData);
  1495. args: ["anError"],
  1496. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  1497. referencedClasses: [],
  1498. //>>excludeEnd("ide");
  1499. pragmas: [],
  1500. messageSends: ["initializeFromError:", "new", "yourself"]
  1501. }, function ($methodClass){ return function (anError){
  1502. var self=this,$self=this;
  1503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1504. return $core.withContext(function($ctx1) {
  1505. //>>excludeEnd("ctx");
  1506. var $1;
  1507. $1=$self._new();
  1508. $recv($1)._initializeFromError_(anError);
  1509. return $recv($1)._yourself();
  1510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1511. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError})});
  1512. //>>excludeEnd("ctx");
  1513. }; }),
  1514. $globals.HLDebuggerModel.a$cls);
  1515. $core.addClass("HLErrorHandler", $globals.Object, "Helios-Debugger");
  1516. $core.setSlots($globals.HLErrorHandler, ["confirms"]);
  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. });