Helios-Debugger.js 54 KB

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