Helios-Debugger.js 52 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416
  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. return smalltalk.withContext(function($ctx1) {
  262. var $2,$1;
  263. $2=self._model();
  264. $ctx1.sendIdx["model"]=1;
  265. $1=_st($2)._announcer();
  266. $ctx1.sendIdx["announcer"]=1;
  267. _st($1)._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
  268. $ctx1.sendIdx["on:send:to:"]=1;
  269. _st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onDebuggerStepped:",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\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self",
  273. messageSends: ["on:send:to:", "announcer", "model"],
  274. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped"]
  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: "onDebuggerStepped:",
  296. protocol: 'reactions',
  297. fn: function (anAnnouncement){
  298. var self=this;
  299. function $HLContextInspectorDecorator(){return globals.HLContextInspectorDecorator||(typeof HLContextInspectorDecorator=="undefined"?nil:HLContextInspectorDecorator)}
  300. return smalltalk.withContext(function($ctx1) {
  301. var $1,$2;
  302. $1=_st(self._model())._atEnd();
  303. if(smalltalk.assert($1)){
  304. $2=_st(self._manager())._removeActiveTab();
  305. return $2;
  306. };
  307. _st(self._inspectorWidget())._inspect_(_st($HLContextInspectorDecorator())._on_(_st(anAnnouncement)._context()));
  308. _st(self._stackListWidget())._refresh();
  309. return self}, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement},globals.HLDebugger)})},
  310. args: ["anAnnouncement"],
  311. source: "onDebuggerStepped: anAnnouncement\x0a\x09self model atEnd ifTrue: [ ^ self manager removeActiveTab ].\x0a\x09\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context).\x0a\x09self stackListWidget refresh",
  312. messageSends: ["ifTrue:", "atEnd", "model", "removeActiveTab", "manager", "inspect:", "inspectorWidget", "on:", "context", "refresh", "stackListWidget"],
  313. referencedClasses: ["HLContextInspectorDecorator"]
  314. }),
  315. globals.HLDebugger);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "registerBindingsOn:",
  319. protocol: 'keybindings',
  320. fn: function (aBindingGroup){
  321. var self=this;
  322. function $HLToolCommand(){return globals.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  323. return smalltalk.withContext(function($ctx1) {
  324. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  325. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},globals.HLDebugger)})},
  326. args: ["aBindingGroup"],
  327. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  328. messageSends: ["registerConcreteClassesOn:for:", "model"],
  329. referencedClasses: ["HLToolCommand"]
  330. }),
  331. globals.HLDebugger);
  332. smalltalk.addMethod(
  333. smalltalk.method({
  334. selector: "renderContentOn:",
  335. protocol: 'rendering',
  336. fn: function (html){
  337. var self=this;
  338. function $HLContainer(){return globals.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  339. function $HLHorizontalSplitter(){return globals.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  340. function $HLVerticalSplitter(){return globals.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  341. return smalltalk.withContext(function($ctx1) {
  342. var $2,$1;
  343. self._renderHeadOn_(html);
  344. $2=_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()));
  345. $ctx1.sendIdx["with:with:"]=1;
  346. $1=_st($HLContainer())._with_($2);
  347. _st(html)._with_($1);
  348. $ctx1.sendIdx["with:"]=1;
  349. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},globals.HLDebugger)})},
  350. args: ["html"],
  351. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self stackListWidget\x0a\x09\x09with: (HLVerticalSplitter\x0a\x09\x09\x09with: self codeWidget\x0a\x09\x09\x09with: self inspectorWidget)))",
  352. messageSends: ["renderHeadOn:", "with:", "with:with:", "stackListWidget", "codeWidget", "inspectorWidget"],
  353. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  354. }),
  355. globals.HLDebugger);
  356. smalltalk.addMethod(
  357. smalltalk.method({
  358. selector: "renderHeadOn:",
  359. protocol: 'rendering',
  360. fn: function (html){
  361. var self=this;
  362. return smalltalk.withContext(function($ctx1) {
  363. var $1,$2;
  364. $1=_st(html)._div();
  365. _st($1)._class_("head");
  366. $2=_st($1)._with_((function(){
  367. return smalltalk.withContext(function($ctx2) {
  368. return _st(_st(html)._h2())._with_(_st(_st(self._model())._error())._messageText());
  369. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  370. $ctx1.sendIdx["with:"]=1;
  371. return self}, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},globals.HLDebugger)})},
  372. args: ["html"],
  373. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'head'; \x0a\x09\x09with: [ html h2 with: self model error messageText ]",
  374. messageSends: ["class:", "div", "with:", "h2", "messageText", "error", "model"],
  375. referencedClasses: []
  376. }),
  377. globals.HLDebugger);
  378. smalltalk.addMethod(
  379. smalltalk.method({
  380. selector: "stackListWidget",
  381. protocol: 'widgets',
  382. fn: function (){
  383. var self=this;
  384. function $HLStackListWidget(){return globals.HLStackListWidget||(typeof HLStackListWidget=="undefined"?nil:HLStackListWidget)}
  385. return smalltalk.withContext(function($ctx1) {
  386. var $2,$3,$4,$1,$receiver;
  387. $2=self["@stackListWidget"];
  388. if(($receiver = $2) == nil || $receiver == null){
  389. $3=_st($HLStackListWidget())._on_(self._model());
  390. _st($3)._next_(self._codeWidget());
  391. $4=_st($3)._yourself();
  392. self["@stackListWidget"]=$4;
  393. $1=self["@stackListWidget"];
  394. } else {
  395. $1=$2;
  396. };
  397. return $1;
  398. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{},globals.HLDebugger)})},
  399. args: [],
  400. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  401. messageSends: ["ifNil:", "next:", "on:", "model", "codeWidget", "yourself"],
  402. referencedClasses: ["HLStackListWidget"]
  403. }),
  404. globals.HLDebugger);
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "unregister",
  408. protocol: 'actions',
  409. fn: function (){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) {
  412. globals.HLDebugger.superclass.fn.prototype._unregister.apply(_st(self), []);
  413. $ctx1.sendIdx["unregister"]=1;
  414. _st(self._inspectorWidget())._unregister();
  415. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},globals.HLDebugger)})},
  416. args: [],
  417. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  418. messageSends: ["unregister", "inspectorWidget"],
  419. referencedClasses: []
  420. }),
  421. globals.HLDebugger);
  422. smalltalk.addMethod(
  423. smalltalk.method({
  424. selector: "on:",
  425. protocol: 'instance creation',
  426. fn: function (anError){
  427. var self=this;
  428. return smalltalk.withContext(function($ctx1) {
  429. var $2,$3,$1;
  430. $2=self._new();
  431. _st($2)._initializeFromError_(anError);
  432. $3=_st($2)._yourself();
  433. $1=$3;
  434. return $1;
  435. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError},globals.HLDebugger.klass)})},
  436. args: ["anError"],
  437. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  438. messageSends: ["initializeFromError:", "new", "yourself"],
  439. referencedClasses: []
  440. }),
  441. globals.HLDebugger.klass);
  442. smalltalk.addMethod(
  443. smalltalk.method({
  444. selector: "tabClass",
  445. protocol: 'accessing',
  446. fn: function (){
  447. var self=this;
  448. return "debugger";
  449. },
  450. args: [],
  451. source: "tabClass\x0a\x09^ 'debugger'",
  452. messageSends: [],
  453. referencedClasses: []
  454. }),
  455. globals.HLDebugger.klass);
  456. smalltalk.addMethod(
  457. smalltalk.method({
  458. selector: "tabLabel",
  459. protocol: 'accessing',
  460. fn: function (){
  461. var self=this;
  462. return "Debugger";
  463. },
  464. args: [],
  465. source: "tabLabel\x0a\x09^ 'Debugger'",
  466. messageSends: [],
  467. referencedClasses: []
  468. }),
  469. globals.HLDebugger.klass);
  470. smalltalk.addClass('HLDebuggerCodeModel', globals.HLCodeModel, ['debuggerModel'], 'Helios-Debugger');
  471. smalltalk.addMethod(
  472. smalltalk.method({
  473. selector: "debuggerModel",
  474. protocol: 'accessing',
  475. fn: function (){
  476. var self=this;
  477. var $1;
  478. $1=self["@debuggerModel"];
  479. return $1;
  480. },
  481. args: [],
  482. source: "debuggerModel\x0a\x09^ debuggerModel",
  483. messageSends: [],
  484. referencedClasses: []
  485. }),
  486. globals.HLDebuggerCodeModel);
  487. smalltalk.addMethod(
  488. smalltalk.method({
  489. selector: "debuggerModel:",
  490. protocol: 'accessing',
  491. fn: function (anObject){
  492. var self=this;
  493. self["@debuggerModel"]=anObject;
  494. return self},
  495. args: ["anObject"],
  496. source: "debuggerModel: anObject\x0a\x09debuggerModel := anObject",
  497. messageSends: [],
  498. referencedClasses: []
  499. }),
  500. globals.HLDebuggerCodeModel);
  501. smalltalk.addMethod(
  502. smalltalk.method({
  503. selector: "doIt:",
  504. protocol: 'actions',
  505. fn: function (aString){
  506. var self=this;
  507. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  508. return smalltalk.withContext(function($ctx1) {
  509. var $1;
  510. $1=_st((function(){
  511. return smalltalk.withContext(function($ctx2) {
  512. return _st(self._debuggerModel())._evaluate_(aString);
  513. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._tryCatch_((function(e){
  514. return smalltalk.withContext(function($ctx2) {
  515. _st($ErrorHandler())._handleError_(e);
  516. return nil;
  517. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  518. return $1;
  519. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString},globals.HLDebuggerCodeModel)})},
  520. args: ["aString"],
  521. source: "doIt: aString\x0a\x09^ [ self debuggerModel evaluate: aString ]\x0a\x09\x09tryCatch: [ :e | \x0a\x09\x09\x09ErrorHandler handleError: e.\x0a\x09\x09\x09nil ]",
  522. messageSends: ["tryCatch:", "evaluate:", "debuggerModel", "handleError:"],
  523. referencedClasses: ["ErrorHandler"]
  524. }),
  525. globals.HLDebuggerCodeModel);
  526. smalltalk.addClass('HLDebuggerCodeWidget', globals.HLBrowserCodeWidget, [], 'Helios-Debugger');
  527. smalltalk.addMethod(
  528. smalltalk.method({
  529. selector: "addStopAt:",
  530. protocol: 'actions',
  531. fn: function (anInteger){
  532. var self=this;
  533. return smalltalk.withContext(function($ctx1) {
  534. _st(self["@editor"])._setGutterMarker_gutter_value_(anInteger,"stops",_st(_st("<div class=\x22stop\x22></stop>"._asJQuery())._toArray())._first());
  535. return self}, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger},globals.HLDebuggerCodeWidget)})},
  536. args: ["anInteger"],
  537. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></stop>' asJQuery toArray first",
  538. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"],
  539. referencedClasses: []
  540. }),
  541. globals.HLDebuggerCodeWidget);
  542. smalltalk.addMethod(
  543. smalltalk.method({
  544. selector: "clearHighlight",
  545. protocol: 'actions',
  546. fn: function (){
  547. var self=this;
  548. return smalltalk.withContext(function($ctx1) {
  549. _st(self._editor())._clearGutter_("stops");
  550. return self}, function($ctx1) {$ctx1.fill(self,"clearHighlight",{},globals.HLDebuggerCodeWidget)})},
  551. args: [],
  552. source: "clearHighlight\x0a\x09self editor clearGutter: 'stops'",
  553. messageSends: ["clearGutter:", "editor"],
  554. referencedClasses: []
  555. }),
  556. globals.HLDebuggerCodeWidget);
  557. smalltalk.addMethod(
  558. smalltalk.method({
  559. selector: "contents:",
  560. protocol: 'accessing',
  561. fn: function (aString){
  562. var self=this;
  563. return smalltalk.withContext(function($ctx1) {
  564. self._clearHighlight();
  565. globals.HLDebuggerCodeWidget.superclass.fn.prototype._contents_.apply(_st(self), [aString]);
  566. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},globals.HLDebuggerCodeWidget)})},
  567. args: ["aString"],
  568. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  569. messageSends: ["clearHighlight", "contents:"],
  570. referencedClasses: []
  571. }),
  572. globals.HLDebuggerCodeWidget);
  573. smalltalk.addMethod(
  574. smalltalk.method({
  575. selector: "editorOptions",
  576. protocol: 'accessing',
  577. fn: function (){
  578. var self=this;
  579. return smalltalk.withContext(function($ctx1) {
  580. var $2,$3,$1;
  581. $2=globals.HLDebuggerCodeWidget.superclass.fn.prototype._editorOptions.apply(_st(self), []);
  582. _st($2)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  583. $3=_st($2)._yourself();
  584. $1=$3;
  585. return $1;
  586. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},globals.HLDebuggerCodeWidget)})},
  587. args: [],
  588. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  589. messageSends: ["at:put:", "editorOptions", "yourself"],
  590. referencedClasses: []
  591. }),
  592. globals.HLDebuggerCodeWidget);
  593. smalltalk.addMethod(
  594. smalltalk.method({
  595. selector: "highlight",
  596. protocol: 'actions',
  597. fn: function (){
  598. var self=this;
  599. return smalltalk.withContext(function($ctx1) {
  600. var $1,$receiver;
  601. $1=_st(self._browserModel())._nextNode();
  602. if(($receiver = $1) == nil || $receiver == null){
  603. $1;
  604. } else {
  605. var node;
  606. node=$receiver;
  607. self._highlightNode_(node);
  608. };
  609. return self}, function($ctx1) {$ctx1.fill(self,"highlight",{},globals.HLDebuggerCodeWidget)})},
  610. args: [],
  611. source: "highlight\x0a\x09self browserModel nextNode ifNotNil: [ :node |\x0a\x09\x09self highlightNode: node ]",
  612. messageSends: ["ifNotNil:", "nextNode", "browserModel", "highlightNode:"],
  613. referencedClasses: []
  614. }),
  615. globals.HLDebuggerCodeWidget);
  616. smalltalk.addMethod(
  617. smalltalk.method({
  618. selector: "highlightNode:",
  619. protocol: 'actions',
  620. fn: function (aNode){
  621. var self=this;
  622. var token;
  623. return smalltalk.withContext(function($ctx1) {
  624. var $4,$3,$2,$1,$5,$9,$8,$7,$11,$10,$6,$15,$14,$13,$12,$receiver;
  625. if(($receiver = aNode) == nil || $receiver == null){
  626. aNode;
  627. } else {
  628. self._clearHighlight();
  629. $4=_st(aNode)._positionStart();
  630. $ctx1.sendIdx["positionStart"]=1;
  631. $3=_st($4)._x();
  632. $ctx1.sendIdx["x"]=1;
  633. $2=_st($3).__minus((1));
  634. $ctx1.sendIdx["-"]=1;
  635. $1=self._addStopAt_($2);
  636. $1;
  637. $5=self._editor();
  638. $9=_st(aNode)._positionStart();
  639. $ctx1.sendIdx["positionStart"]=2;
  640. $8=_st($9)._x();
  641. $ctx1.sendIdx["x"]=2;
  642. $7=_st($8).__minus((1));
  643. $ctx1.sendIdx["-"]=2;
  644. $11=_st(_st(aNode)._positionStart())._y();
  645. $ctx1.sendIdx["y"]=1;
  646. $10=_st($11).__minus((1));
  647. $ctx1.sendIdx["-"]=3;
  648. $6=globals.HashedCollection._newFromPairs_(["line",$7,"ch",$10]);
  649. $15=_st(aNode)._positionEnd();
  650. $ctx1.sendIdx["positionEnd"]=1;
  651. $14=_st($15)._x();
  652. $13=_st($14).__minus((1));
  653. $12=globals.HashedCollection._newFromPairs_(["line",$13,"ch",_st(_st(aNode)._positionEnd())._y()]);
  654. _st($5)._setSelection_to_($6,$12);
  655. };
  656. return self}, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token},globals.HLDebuggerCodeWidget)})},
  657. args: ["aNode"],
  658. 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) } ]",
  659. messageSends: ["ifNotNil:", "clearHighlight", "addStopAt:", "-", "x", "positionStart", "setSelection:to:", "editor", "y", "positionEnd"],
  660. referencedClasses: []
  661. }),
  662. globals.HLDebuggerCodeWidget);
  663. smalltalk.addMethod(
  664. smalltalk.method({
  665. selector: "observeBrowserModel",
  666. protocol: 'actions',
  667. fn: function (){
  668. var self=this;
  669. function $HLDebuggerContextSelected(){return globals.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  670. function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  671. function $HLDebuggerWhere(){return globals.HLDebuggerWhere||(typeof HLDebuggerWhere=="undefined"?nil:HLDebuggerWhere)}
  672. return smalltalk.withContext(function($ctx1) {
  673. var $2,$1,$4,$3;
  674. globals.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
  675. $2=self._browserModel();
  676. $ctx1.sendIdx["browserModel"]=1;
  677. $1=_st($2)._announcer();
  678. $ctx1.sendIdx["announcer"]=1;
  679. _st($1)._on_send_to_($HLDebuggerContextSelected(),"onContextSelected",self);
  680. $ctx1.sendIdx["on:send:to:"]=1;
  681. $4=self._browserModel();
  682. $ctx1.sendIdx["browserModel"]=2;
  683. $3=_st($4)._announcer();
  684. $ctx1.sendIdx["announcer"]=2;
  685. _st($3)._on_send_to_($HLDebuggerStepped(),"onContextSelected",self);
  686. $ctx1.sendIdx["on:send:to:"]=2;
  687. _st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
  688. return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},globals.HLDebuggerCodeWidget)})},
  689. args: [],
  690. 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",
  691. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"],
  692. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerWhere"]
  693. }),
  694. globals.HLDebuggerCodeWidget);
  695. smalltalk.addMethod(
  696. smalltalk.method({
  697. selector: "onContextSelected",
  698. protocol: 'reactions',
  699. fn: function (){
  700. var self=this;
  701. return smalltalk.withContext(function($ctx1) {
  702. self._highlight();
  703. return self}, function($ctx1) {$ctx1.fill(self,"onContextSelected",{},globals.HLDebuggerCodeWidget)})},
  704. args: [],
  705. source: "onContextSelected\x0a\x09self highlight",
  706. messageSends: ["highlight"],
  707. referencedClasses: []
  708. }),
  709. globals.HLDebuggerCodeWidget);
  710. smalltalk.addClass('HLDebuggerModel', globals.HLToolModel, ['rootContext', 'debugger', 'error'], 'Helios-Debugger');
  711. 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.";
  712. smalltalk.addMethod(
  713. smalltalk.method({
  714. selector: "atEnd",
  715. protocol: 'testing',
  716. fn: function (){
  717. var self=this;
  718. return smalltalk.withContext(function($ctx1) {
  719. var $1;
  720. $1=_st(self._debugger())._atEnd();
  721. return $1;
  722. }, function($ctx1) {$ctx1.fill(self,"atEnd",{},globals.HLDebuggerModel)})},
  723. args: [],
  724. source: "atEnd\x0a\x09^ self debugger atEnd",
  725. messageSends: ["atEnd", "debugger"],
  726. referencedClasses: []
  727. }),
  728. globals.HLDebuggerModel);
  729. smalltalk.addMethod(
  730. smalltalk.method({
  731. selector: "contexts",
  732. protocol: 'accessing',
  733. fn: function (){
  734. var self=this;
  735. var contexts,context;
  736. function $OrderedCollection(){return globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  737. return smalltalk.withContext(function($ctx1) {
  738. var $1;
  739. contexts=_st($OrderedCollection())._new();
  740. context=self._rootContext();
  741. _st((function(){
  742. return smalltalk.withContext(function($ctx2) {
  743. return _st(context)._notNil();
  744. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
  745. return smalltalk.withContext(function($ctx2) {
  746. _st(contexts)._add_(context);
  747. context=_st(context)._outerContext();
  748. return context;
  749. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  750. $1=contexts;
  751. return $1;
  752. }, function($ctx1) {$ctx1.fill(self,"contexts",{contexts:contexts,context:context},globals.HLDebuggerModel)})},
  753. args: [],
  754. 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",
  755. messageSends: ["new", "rootContext", "whileTrue:", "notNil", "add:", "outerContext"],
  756. referencedClasses: ["OrderedCollection"]
  757. }),
  758. globals.HLDebuggerModel);
  759. smalltalk.addMethod(
  760. smalltalk.method({
  761. selector: "currentContext",
  762. protocol: 'accessing',
  763. fn: function (){
  764. var self=this;
  765. return smalltalk.withContext(function($ctx1) {
  766. var $1;
  767. $1=_st(self._debugger())._context();
  768. return $1;
  769. }, function($ctx1) {$ctx1.fill(self,"currentContext",{},globals.HLDebuggerModel)})},
  770. args: [],
  771. source: "currentContext\x0a\x09^ self debugger context",
  772. messageSends: ["context", "debugger"],
  773. referencedClasses: []
  774. }),
  775. globals.HLDebuggerModel);
  776. smalltalk.addMethod(
  777. smalltalk.method({
  778. selector: "currentContext:",
  779. protocol: 'accessing',
  780. fn: function (aContext){
  781. var self=this;
  782. function $HLDebuggerContextSelected(){return globals.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  783. return smalltalk.withContext(function($ctx1) {
  784. var $1,$2;
  785. self._withChangesDo_((function(){
  786. return smalltalk.withContext(function($ctx2) {
  787. self._selectedMethod_(_st(aContext)._method());
  788. _st(self._debugger())._context_(aContext);
  789. $ctx2.sendIdx["context:"]=1;
  790. $1=_st($HLDebuggerContextSelected())._new();
  791. _st($1)._context_(aContext);
  792. $2=_st($1)._yourself();
  793. return _st(self._announcer())._announce_($2);
  794. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  795. return self}, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext},globals.HLDebuggerModel)})},
  796. args: ["aContext"],
  797. 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) ]",
  798. messageSends: ["withChangesDo:", "selectedMethod:", "method", "context:", "debugger", "announce:", "announcer", "new", "yourself"],
  799. referencedClasses: ["HLDebuggerContextSelected"]
  800. }),
  801. globals.HLDebuggerModel);
  802. smalltalk.addMethod(
  803. smalltalk.method({
  804. selector: "debugger",
  805. protocol: 'accessing',
  806. fn: function (){
  807. var self=this;
  808. function $ASTDebugger(){return globals.ASTDebugger||(typeof ASTDebugger=="undefined"?nil:ASTDebugger)}
  809. return smalltalk.withContext(function($ctx1) {
  810. var $2,$1,$receiver;
  811. $2=self["@debugger"];
  812. if(($receiver = $2) == nil || $receiver == null){
  813. self["@debugger"]=_st($ASTDebugger())._new();
  814. $1=self["@debugger"];
  815. } else {
  816. $1=$2;
  817. };
  818. return $1;
  819. }, function($ctx1) {$ctx1.fill(self,"debugger",{},globals.HLDebuggerModel)})},
  820. args: [],
  821. source: "debugger\x0a\x09^ debugger ifNil: [ debugger := ASTDebugger new ]",
  822. messageSends: ["ifNil:", "new"],
  823. referencedClasses: ["ASTDebugger"]
  824. }),
  825. globals.HLDebuggerModel);
  826. smalltalk.addMethod(
  827. smalltalk.method({
  828. selector: "error",
  829. protocol: 'accessing',
  830. fn: function (){
  831. var self=this;
  832. var $1;
  833. $1=self["@error"];
  834. return $1;
  835. },
  836. args: [],
  837. source: "error\x0a\x09^ error",
  838. messageSends: [],
  839. referencedClasses: []
  840. }),
  841. globals.HLDebuggerModel);
  842. smalltalk.addMethod(
  843. smalltalk.method({
  844. selector: "evaluate:",
  845. protocol: 'evaluating',
  846. fn: function (aString){
  847. var self=this;
  848. return smalltalk.withContext(function($ctx1) {
  849. var $1;
  850. $1=_st(self._environment())._evaluate_for_(aString,self._currentContext());
  851. return $1;
  852. }, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString},globals.HLDebuggerModel)})},
  853. args: ["aString"],
  854. source: "evaluate: aString\x0a\x09^ self environment \x0a\x09\x09evaluate: aString \x0a\x09\x09for: self currentContext",
  855. messageSends: ["evaluate:for:", "environment", "currentContext"],
  856. referencedClasses: []
  857. }),
  858. globals.HLDebuggerModel);
  859. smalltalk.addMethod(
  860. smalltalk.method({
  861. selector: "flushInnerContexts",
  862. protocol: 'private',
  863. fn: function (){
  864. var self=this;
  865. return smalltalk.withContext(function($ctx1) {
  866. var $1;
  867. $1=self._currentContext();
  868. $ctx1.sendIdx["currentContext"]=1;
  869. _st($1)._innerContext_(nil);
  870. self["@rootContext"]=self._currentContext();
  871. self._initializeContexts();
  872. return self}, function($ctx1) {$ctx1.fill(self,"flushInnerContexts",{},globals.HLDebuggerModel)})},
  873. args: [],
  874. 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",
  875. messageSends: ["innerContext:", "currentContext", "initializeContexts"],
  876. referencedClasses: []
  877. }),
  878. globals.HLDebuggerModel);
  879. smalltalk.addMethod(
  880. smalltalk.method({
  881. selector: "initializeFromError:",
  882. protocol: 'initialization',
  883. fn: function (anError){
  884. var self=this;
  885. function $AIContext(){return globals.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  886. return smalltalk.withContext(function($ctx1) {
  887. self["@error"]=anError;
  888. self["@rootContext"]=_st($AIContext())._fromMethodContext_(_st(self["@error"])._context());
  889. _st(self._debugger())._context_(self["@rootContext"]);
  890. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError},globals.HLDebuggerModel)})},
  891. args: ["anError"],
  892. source: "initializeFromError: anError\x0a\x09error := anError.\x0a\x09rootContext := (AIContext fromMethodContext: error context).\x0a\x09self debugger context: rootContext",
  893. messageSends: ["fromMethodContext:", "context", "context:", "debugger"],
  894. referencedClasses: ["AIContext"]
  895. }),
  896. globals.HLDebuggerModel);
  897. smalltalk.addMethod(
  898. smalltalk.method({
  899. selector: "nextNode",
  900. protocol: 'accessing',
  901. fn: function (){
  902. var self=this;
  903. return smalltalk.withContext(function($ctx1) {
  904. var $1;
  905. $1=_st(self._debugger())._node();
  906. return $1;
  907. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},globals.HLDebuggerModel)})},
  908. args: [],
  909. source: "nextNode\x0a\x09^ self debugger node",
  910. messageSends: ["node", "debugger"],
  911. referencedClasses: []
  912. }),
  913. globals.HLDebuggerModel);
  914. smalltalk.addMethod(
  915. smalltalk.method({
  916. selector: "onStep",
  917. protocol: 'reactions',
  918. fn: function (){
  919. var self=this;
  920. return smalltalk.withContext(function($ctx1) {
  921. self["@rootContext"]=self._currentContext();
  922. return self}, function($ctx1) {$ctx1.fill(self,"onStep",{},globals.HLDebuggerModel)})},
  923. args: [],
  924. source: "onStep\x0a\x09rootContext := self currentContext",
  925. messageSends: ["currentContext"],
  926. referencedClasses: []
  927. }),
  928. globals.HLDebuggerModel);
  929. smalltalk.addMethod(
  930. smalltalk.method({
  931. selector: "restart",
  932. protocol: 'actions',
  933. fn: function (){
  934. var self=this;
  935. function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  936. return smalltalk.withContext(function($ctx1) {
  937. var $1,$2;
  938. _st(self._debugger())._restart();
  939. self._onStep();
  940. $1=_st($HLDebuggerStepped())._new();
  941. _st($1)._context_(self._currentContext());
  942. $2=_st($1)._yourself();
  943. _st(self._announcer())._announce_($2);
  944. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},globals.HLDebuggerModel)})},
  945. args: [],
  946. 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)",
  947. messageSends: ["restart", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
  948. referencedClasses: ["HLDebuggerStepped"]
  949. }),
  950. globals.HLDebuggerModel);
  951. smalltalk.addMethod(
  952. smalltalk.method({
  953. selector: "rootContext",
  954. protocol: 'accessing',
  955. fn: function (){
  956. var self=this;
  957. var $1;
  958. $1=self["@rootContext"];
  959. return $1;
  960. },
  961. args: [],
  962. source: "rootContext\x0a\x09^ rootContext",
  963. messageSends: [],
  964. referencedClasses: []
  965. }),
  966. globals.HLDebuggerModel);
  967. smalltalk.addMethod(
  968. smalltalk.method({
  969. selector: "skip",
  970. protocol: 'actions',
  971. fn: function (){
  972. var self=this;
  973. function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  974. return smalltalk.withContext(function($ctx1) {
  975. var $1,$2;
  976. _st(self._debugger())._skip();
  977. self._onStep();
  978. $1=_st($HLDebuggerStepped())._new();
  979. _st($1)._context_(self._currentContext());
  980. $2=_st($1)._yourself();
  981. _st(self._announcer())._announce_($2);
  982. return self}, function($ctx1) {$ctx1.fill(self,"skip",{},globals.HLDebuggerModel)})},
  983. args: [],
  984. source: "skip\x0a\x09self debugger skip.\x0a\x09self onStep.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  985. messageSends: ["skip", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
  986. referencedClasses: ["HLDebuggerStepped"]
  987. }),
  988. globals.HLDebuggerModel);
  989. smalltalk.addMethod(
  990. smalltalk.method({
  991. selector: "stepOver",
  992. protocol: 'actions',
  993. fn: function (){
  994. var self=this;
  995. function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  996. return smalltalk.withContext(function($ctx1) {
  997. var $1,$2;
  998. _st(self._debugger())._stepOver();
  999. self._onStep();
  1000. $1=_st($HLDebuggerStepped())._new();
  1001. _st($1)._context_(self._currentContext());
  1002. $2=_st($1)._yourself();
  1003. _st(self._announcer())._announce_($2);
  1004. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},globals.HLDebuggerModel)})},
  1005. args: [],
  1006. 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)",
  1007. messageSends: ["stepOver", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
  1008. referencedClasses: ["HLDebuggerStepped"]
  1009. }),
  1010. globals.HLDebuggerModel);
  1011. smalltalk.addMethod(
  1012. smalltalk.method({
  1013. selector: "where",
  1014. protocol: 'actions',
  1015. fn: function (){
  1016. var self=this;
  1017. function $HLDebuggerWhere(){return globals.HLDebuggerWhere||(typeof HLDebuggerWhere=="undefined"?nil:HLDebuggerWhere)}
  1018. return smalltalk.withContext(function($ctx1) {
  1019. _st(self._announcer())._announce_(_st($HLDebuggerWhere())._new());
  1020. return self}, function($ctx1) {$ctx1.fill(self,"where",{},globals.HLDebuggerModel)})},
  1021. args: [],
  1022. source: "where\x0a\x09self announcer announce: HLDebuggerWhere new",
  1023. messageSends: ["announce:", "announcer", "new"],
  1024. referencedClasses: ["HLDebuggerWhere"]
  1025. }),
  1026. globals.HLDebuggerModel);
  1027. smalltalk.addMethod(
  1028. smalltalk.method({
  1029. selector: "on:",
  1030. protocol: 'instance creation',
  1031. fn: function (anError){
  1032. var self=this;
  1033. return smalltalk.withContext(function($ctx1) {
  1034. var $2,$3,$1;
  1035. $2=self._new();
  1036. _st($2)._initializeFromError_(anError);
  1037. $3=_st($2)._yourself();
  1038. $1=$3;
  1039. return $1;
  1040. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError},globals.HLDebuggerModel.klass)})},
  1041. args: ["anError"],
  1042. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  1043. messageSends: ["initializeFromError:", "new", "yourself"],
  1044. referencedClasses: []
  1045. }),
  1046. globals.HLDebuggerModel.klass);
  1047. smalltalk.addClass('HLErrorHandler', globals.Object, [], 'Helios-Debugger');
  1048. smalltalk.addMethod(
  1049. smalltalk.method({
  1050. selector: "confirmDebugError:",
  1051. protocol: 'error handling',
  1052. fn: function (anError){
  1053. var self=this;
  1054. function $HLConfirmationWidget(){return globals.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  1055. return smalltalk.withContext(function($ctx1) {
  1056. var $1,$2;
  1057. $1=_st($HLConfirmationWidget())._new();
  1058. _st($1)._confirmationString_(_st(anError)._messageText());
  1059. _st($1)._actionBlock_((function(){
  1060. return smalltalk.withContext(function($ctx2) {
  1061. return self._debugError_(anError);
  1062. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1063. _st($1)._cancelButtonLabel_("Abandon");
  1064. _st($1)._confirmButtonLabel_("Debug");
  1065. $2=_st($1)._show();
  1066. return self}, function($ctx1) {$ctx1.fill(self,"confirmDebugError:",{anError:anError},globals.HLErrorHandler)})},
  1067. args: ["anError"],
  1068. 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",
  1069. messageSends: ["confirmationString:", "new", "messageText", "actionBlock:", "debugError:", "cancelButtonLabel:", "confirmButtonLabel:", "show"],
  1070. referencedClasses: ["HLConfirmationWidget"]
  1071. }),
  1072. globals.HLErrorHandler);
  1073. smalltalk.addMethod(
  1074. smalltalk.method({
  1075. selector: "debugError:",
  1076. protocol: 'error handling',
  1077. fn: function (anError){
  1078. var self=this;
  1079. function $HLDebugger(){return globals.HLDebugger||(typeof HLDebugger=="undefined"?nil:HLDebugger)}
  1080. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  1081. function $ConsoleErrorHandler(){return globals.ConsoleErrorHandler||(typeof ConsoleErrorHandler=="undefined"?nil:ConsoleErrorHandler)}
  1082. return smalltalk.withContext(function($ctx1) {
  1083. _st((function(){
  1084. return smalltalk.withContext(function($ctx2) {
  1085. return _st(_st($HLDebugger())._on_(anError))._openAsTab();
  1086. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  1087. return smalltalk.withContext(function($ctx2) {
  1088. return _st(_st($ConsoleErrorHandler())._new())._handleError_(error);
  1089. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  1090. return self}, function($ctx1) {$ctx1.fill(self,"debugError:",{anError:anError},globals.HLErrorHandler)})},
  1091. args: ["anError"],
  1092. 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 ]",
  1093. messageSends: ["on:do:", "openAsTab", "on:", "handleError:", "new"],
  1094. referencedClasses: ["HLDebugger", "Error", "ConsoleErrorHandler"]
  1095. }),
  1096. globals.HLErrorHandler);
  1097. smalltalk.addMethod(
  1098. smalltalk.method({
  1099. selector: "handleError:",
  1100. protocol: 'error handling',
  1101. fn: function (anError){
  1102. var self=this;
  1103. return smalltalk.withContext(function($ctx1) {
  1104. self._confirmDebugError_(anError);
  1105. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},globals.HLErrorHandler)})},
  1106. args: ["anError"],
  1107. source: "handleError: anError\x0a\x09self confirmDebugError: anError",
  1108. messageSends: ["confirmDebugError:"],
  1109. referencedClasses: []
  1110. }),
  1111. globals.HLErrorHandler);
  1112. smalltalk.addMethod(
  1113. smalltalk.method({
  1114. selector: "onErrorHandled",
  1115. protocol: 'error handling',
  1116. fn: function (){
  1117. var self=this;
  1118. function $HLProgressWidget(){return globals.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  1119. return smalltalk.withContext(function($ctx1) {
  1120. var $1,$2;
  1121. $1=_st($HLProgressWidget())._default();
  1122. _st($1)._flush();
  1123. $2=_st($1)._remove();
  1124. return self}, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{},globals.HLErrorHandler)})},
  1125. args: [],
  1126. 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",
  1127. messageSends: ["flush", "default", "remove"],
  1128. referencedClasses: ["HLProgressWidget"]
  1129. }),
  1130. globals.HLErrorHandler);
  1131. smalltalk.addClass('HLStackListWidget', globals.HLToolListWidget, [], 'Helios-Debugger');
  1132. smalltalk.addMethod(
  1133. smalltalk.method({
  1134. selector: "items",
  1135. protocol: 'accessing',
  1136. fn: function (){
  1137. var self=this;
  1138. return smalltalk.withContext(function($ctx1) {
  1139. var $1;
  1140. $1=_st(self._model())._contexts();
  1141. return $1;
  1142. }, function($ctx1) {$ctx1.fill(self,"items",{},globals.HLStackListWidget)})},
  1143. args: [],
  1144. source: "items\x0a\x09^ self model contexts",
  1145. messageSends: ["contexts", "model"],
  1146. referencedClasses: []
  1147. }),
  1148. globals.HLStackListWidget);
  1149. smalltalk.addMethod(
  1150. smalltalk.method({
  1151. selector: "label",
  1152. protocol: 'accessing',
  1153. fn: function (){
  1154. var self=this;
  1155. return "Call stack";
  1156. },
  1157. args: [],
  1158. source: "label\x0a\x09^ 'Call stack'",
  1159. messageSends: [],
  1160. referencedClasses: []
  1161. }),
  1162. globals.HLStackListWidget);
  1163. smalltalk.addMethod(
  1164. smalltalk.method({
  1165. selector: "observeModel",
  1166. protocol: 'actions',
  1167. fn: function (){
  1168. var self=this;
  1169. function $HLDebuggerStepped(){return globals.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  1170. return smalltalk.withContext(function($ctx1) {
  1171. globals.HLStackListWidget.superclass.fn.prototype._observeModel.apply(_st(self), []);
  1172. _st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onDebuggerStepped:",self);
  1173. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},globals.HLStackListWidget)})},
  1174. args: [],
  1175. source: "observeModel\x0a\x09super observeModel.\x0a\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self",
  1176. messageSends: ["observeModel", "on:send:to:", "announcer", "model"],
  1177. referencedClasses: ["HLDebuggerStepped"]
  1178. }),
  1179. globals.HLStackListWidget);
  1180. smalltalk.addMethod(
  1181. smalltalk.method({
  1182. selector: "onDebuggerStepped:",
  1183. protocol: 'reactions',
  1184. fn: function (anAnnouncement){
  1185. var self=this;
  1186. return smalltalk.withContext(function($ctx1) {
  1187. self["@items"]=nil;
  1188. self._refresh();
  1189. return self}, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement},globals.HLStackListWidget)})},
  1190. args: ["anAnnouncement"],
  1191. source: "onDebuggerStepped: anAnnouncement\x0a\x09items := nil.\x0a\x09self refresh",
  1192. messageSends: ["refresh"],
  1193. referencedClasses: []
  1194. }),
  1195. globals.HLStackListWidget);
  1196. smalltalk.addMethod(
  1197. smalltalk.method({
  1198. selector: "renderButtonsOn:",
  1199. protocol: 'rendering',
  1200. fn: function (html){
  1201. var self=this;
  1202. return smalltalk.withContext(function($ctx1) {
  1203. var $1,$3,$4,$5,$6,$7,$8,$9,$10,$2;
  1204. $1=_st(html)._div();
  1205. _st($1)._class_("debugger_bar");
  1206. $ctx1.sendIdx["class:"]=1;
  1207. $2=_st($1)._with_((function(){
  1208. return smalltalk.withContext(function($ctx2) {
  1209. $3=_st(html)._button();
  1210. $ctx2.sendIdx["button"]=1;
  1211. _st($3)._class_("btn restart");
  1212. $ctx2.sendIdx["class:"]=2;
  1213. _st($3)._with_("Restart");
  1214. $ctx2.sendIdx["with:"]=2;
  1215. $4=_st($3)._onClick_((function(){
  1216. return smalltalk.withContext(function($ctx3) {
  1217. return self._restart();
  1218. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1219. $ctx2.sendIdx["onClick:"]=1;
  1220. $4;
  1221. $5=_st(html)._button();
  1222. $ctx2.sendIdx["button"]=2;
  1223. _st($5)._class_("btn where");
  1224. $ctx2.sendIdx["class:"]=3;
  1225. _st($5)._with_("Where");
  1226. $ctx2.sendIdx["with:"]=3;
  1227. $6=_st($5)._onClick_((function(){
  1228. return smalltalk.withContext(function($ctx3) {
  1229. return self._where();
  1230. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1231. $ctx2.sendIdx["onClick:"]=2;
  1232. $6;
  1233. $7=_st(html)._button();
  1234. $ctx2.sendIdx["button"]=3;
  1235. _st($7)._class_("btn stepOver");
  1236. $ctx2.sendIdx["class:"]=4;
  1237. _st($7)._with_("Step over");
  1238. $ctx2.sendIdx["with:"]=4;
  1239. $8=_st($7)._onClick_((function(){
  1240. return smalltalk.withContext(function($ctx3) {
  1241. return self._stepOver();
  1242. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1243. $ctx2.sendIdx["onClick:"]=3;
  1244. $8;
  1245. $9=_st(html)._button();
  1246. _st($9)._class_("btn skip");
  1247. _st($9)._with_("Skip");
  1248. $10=_st($9)._onClick_((function(){
  1249. return smalltalk.withContext(function($ctx3) {
  1250. return self._skip();
  1251. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  1252. return $10;
  1253. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1254. $ctx1.sendIdx["with:"]=1;
  1255. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.HLStackListWidget)})},
  1256. args: ["html"],
  1257. 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 skip';\x0a\x09\x09\x09\x09with: 'Skip';\x0a\x09\x09\x09\x09onClick: [ self skip ] ]",
  1258. messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver", "skip"],
  1259. referencedClasses: []
  1260. }),
  1261. globals.HLStackListWidget);
  1262. smalltalk.addMethod(
  1263. smalltalk.method({
  1264. selector: "restart",
  1265. protocol: 'actions',
  1266. fn: function (){
  1267. var self=this;
  1268. return smalltalk.withContext(function($ctx1) {
  1269. _st(self._model())._restart();
  1270. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},globals.HLStackListWidget)})},
  1271. args: [],
  1272. source: "restart\x0a\x09self model restart",
  1273. messageSends: ["restart", "model"],
  1274. referencedClasses: []
  1275. }),
  1276. globals.HLStackListWidget);
  1277. smalltalk.addMethod(
  1278. smalltalk.method({
  1279. selector: "selectItem:",
  1280. protocol: 'actions',
  1281. fn: function (aContext){
  1282. var self=this;
  1283. return smalltalk.withContext(function($ctx1) {
  1284. _st(self._model())._currentContext_(aContext);
  1285. globals.HLStackListWidget.superclass.fn.prototype._selectItem_.apply(_st(self), [aContext]);
  1286. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext},globals.HLStackListWidget)})},
  1287. args: ["aContext"],
  1288. source: "selectItem: aContext\x0a \x09self model currentContext: aContext.\x0a\x09super selectItem: aContext",
  1289. messageSends: ["currentContext:", "model", "selectItem:"],
  1290. referencedClasses: []
  1291. }),
  1292. globals.HLStackListWidget);
  1293. smalltalk.addMethod(
  1294. smalltalk.method({
  1295. selector: "skip",
  1296. protocol: 'actions',
  1297. fn: function (){
  1298. var self=this;
  1299. return smalltalk.withContext(function($ctx1) {
  1300. _st(self._model())._skip();
  1301. return self}, function($ctx1) {$ctx1.fill(self,"skip",{},globals.HLStackListWidget)})},
  1302. args: [],
  1303. source: "skip\x0a\x09self model skip",
  1304. messageSends: ["skip", "model"],
  1305. referencedClasses: []
  1306. }),
  1307. globals.HLStackListWidget);
  1308. smalltalk.addMethod(
  1309. smalltalk.method({
  1310. selector: "stepOver",
  1311. protocol: 'actions',
  1312. fn: function (){
  1313. var self=this;
  1314. return smalltalk.withContext(function($ctx1) {
  1315. _st(self._model())._stepOver();
  1316. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},globals.HLStackListWidget)})},
  1317. args: [],
  1318. source: "stepOver\x0a\x09self model stepOver",
  1319. messageSends: ["stepOver", "model"],
  1320. referencedClasses: []
  1321. }),
  1322. globals.HLStackListWidget);
  1323. smalltalk.addMethod(
  1324. smalltalk.method({
  1325. selector: "where",
  1326. protocol: 'actions',
  1327. fn: function (){
  1328. var self=this;
  1329. return smalltalk.withContext(function($ctx1) {
  1330. _st(self._model())._where();
  1331. return self}, function($ctx1) {$ctx1.fill(self,"where",{},globals.HLStackListWidget)})},
  1332. args: [],
  1333. source: "where\x0a\x09self model where",
  1334. messageSends: ["where", "model"],
  1335. referencedClasses: []
  1336. }),
  1337. globals.HLStackListWidget);
  1338. });