Helios-Debugger.js 54 KB

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