Helios-Debugger.js 55 KB

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