Helios-Debugger.js 55 KB

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