Helios-Debugger.js 52 KB

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