Helios-Debugger.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926
  1. define("amber/Helios-Debugger", ["amber_vm/smalltalk","amber_vm/nil","amber_vm/_st"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-Debugger');
  3. smalltalk.packages["Helios-Debugger"].transport = {"type":"amd","amdNamespace":"amber"};
  4. smalltalk.addClass('HLContextInspectorDecorator', smalltalk.Object, ['context'], 'Helios-Debugger');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "context",
  8. category: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. var $1;
  13. $1=self["@context"];
  14. return $1;
  15. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.HLContextInspectorDecorator)})},
  16. args: [],
  17. source: "context\x0a\x09^ context",
  18. messageSends: [],
  19. referencedClasses: []
  20. }),
  21. smalltalk.HLContextInspectorDecorator);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "initializeFromContext:",
  25. category: 'initialization',
  26. fn: function (aContext){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. self["@context"]=aContext;
  30. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromContext:",{aContext:aContext},smalltalk.HLContextInspectorDecorator)})},
  31. args: ["aContext"],
  32. source: "initializeFromContext: aContext\x0a\x09context := aContext",
  33. messageSends: [],
  34. referencedClasses: []
  35. }),
  36. smalltalk.HLContextInspectorDecorator);
  37. smalltalk.addMethod(
  38. smalltalk.method({
  39. selector: "inspectOn:",
  40. category: 'inspecting',
  41. fn: function (anInspector){
  42. var self=this;
  43. var variables,inspectedContext;
  44. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  45. return smalltalk.withContext(function($ctx1) {
  46. var $1,$2,$3;
  47. variables=_st($Dictionary())._new();
  48. inspectedContext=self._context();
  49. _st(variables)._addAll_(_st(inspectedContext)._locals());
  50. _st((function(){
  51. return smalltalk.withContext(function($ctx2) {
  52. return _st(_st(inspectedContext)._notNil())._and_((function(){
  53. return smalltalk.withContext(function($ctx3) {
  54. return _st(inspectedContext)._isBlockContext();
  55. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  56. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  57. return smalltalk.withContext(function($ctx2) {
  58. inspectedContext=_st(inspectedContext)._outerContext();
  59. inspectedContext;
  60. $1=inspectedContext;
  61. if(($receiver = $1) == nil || $receiver == undefined){
  62. return $1;
  63. } else {
  64. return _st(variables)._addAll_(_st(inspectedContext)._locals());
  65. };
  66. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  67. $2=anInspector;
  68. _st($2)._setLabel_("Context");
  69. $3=_st($2)._setVariables_(variables);
  70. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext},smalltalk.HLContextInspectorDecorator)})},
  71. args: ["anInspector"],
  72. 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",
  73. messageSends: ["new", "context", "addAll:", "locals", "whileTrue:", "outerContext", "ifNotNil:", "and:", "isBlockContext", "notNil", "setLabel:", "setVariables:"],
  74. referencedClasses: ["Dictionary"]
  75. }),
  76. smalltalk.HLContextInspectorDecorator);
  77. smalltalk.addMethod(
  78. smalltalk.method({
  79. selector: "on:",
  80. category: 'instance creation',
  81. fn: function (aContext){
  82. var self=this;
  83. return smalltalk.withContext(function($ctx1) {
  84. var $2,$3,$1;
  85. $2=self._new();
  86. _st($2)._initializeFromContext_(aContext);
  87. $3=_st($2)._yourself();
  88. $1=$3;
  89. return $1;
  90. }, function($ctx1) {$ctx1.fill(self,"on:",{aContext:aContext},smalltalk.HLContextInspectorDecorator.klass)})},
  91. args: ["aContext"],
  92. source: "on: aContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aContext;\x0a\x09\x09yourself",
  93. messageSends: ["initializeFromContext:", "new", "yourself"],
  94. referencedClasses: []
  95. }),
  96. smalltalk.HLContextInspectorDecorator.klass);
  97. smalltalk.addClass('HLDebugger', smalltalk.HLFocusableWidget, ['model', 'stackListWidget', 'codeWidget', 'inspectorWidget'], 'Helios-Debugger');
  98. smalltalk.HLDebugger.comment="I am the main widget for the Helios debugger.";
  99. smalltalk.addMethod(
  100. smalltalk.method({
  101. selector: "codeWidget",
  102. category: 'accessing',
  103. fn: function (){
  104. var self=this;
  105. function $HLDebuggerCodeWidget(){return smalltalk.HLDebuggerCodeWidget||(typeof HLDebuggerCodeWidget=="undefined"?nil:HLDebuggerCodeWidget)}
  106. return smalltalk.withContext(function($ctx1) {
  107. var $2,$3,$4,$1;
  108. $2=self["@codeWidget"];
  109. if(($receiver = $2) == nil || $receiver == undefined){
  110. $3=_st($HLDebuggerCodeWidget())._new();
  111. _st($3)._browserModel_(self._model());
  112. $4=_st($3)._yourself();
  113. self["@codeWidget"]=$4;
  114. $1=self["@codeWidget"];
  115. } else {
  116. $1=$2;
  117. };
  118. return $1;
  119. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLDebugger)})},
  120. args: [],
  121. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLDebuggerCodeWidget new\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
  122. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"],
  123. referencedClasses: ["HLDebuggerCodeWidget"]
  124. }),
  125. smalltalk.HLDebugger);
  126. smalltalk.addMethod(
  127. smalltalk.method({
  128. selector: "focus",
  129. category: 'actions',
  130. fn: function (){
  131. var self=this;
  132. return smalltalk.withContext(function($ctx1) {
  133. _st(self._stackListWidget())._focus();
  134. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLDebugger)})},
  135. args: [],
  136. source: "focus\x0a\x09self stackListWidget focus",
  137. messageSends: ["focus", "stackListWidget"],
  138. referencedClasses: []
  139. }),
  140. smalltalk.HLDebugger);
  141. smalltalk.addMethod(
  142. smalltalk.method({
  143. selector: "initializeFromMethodContext:",
  144. category: 'accessing',
  145. fn: function (aMethodContext){
  146. var self=this;
  147. function $HLDebuggerModel(){return smalltalk.HLDebuggerModel||(typeof HLDebuggerModel=="undefined"?nil:HLDebuggerModel)}
  148. return smalltalk.withContext(function($ctx1) {
  149. self["@model"]=_st($HLDebuggerModel())._on_(aMethodContext);
  150. self._observeModel();
  151. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.HLDebugger)})},
  152. args: ["aMethodContext"],
  153. source: "initializeFromMethodContext: aMethodContext\x0a\x09model := HLDebuggerModel on: aMethodContext.\x0a\x09self observeModel",
  154. messageSends: ["on:", "observeModel"],
  155. referencedClasses: ["HLDebuggerModel"]
  156. }),
  157. smalltalk.HLDebugger);
  158. smalltalk.addMethod(
  159. smalltalk.method({
  160. selector: "inspectorWidget",
  161. category: 'accessing',
  162. fn: function (){
  163. var self=this;
  164. function $HLInspectorWidget(){return smalltalk.HLInspectorWidget||(typeof HLInspectorWidget=="undefined"?nil:HLInspectorWidget)}
  165. return smalltalk.withContext(function($ctx1) {
  166. var $2,$1;
  167. $2=self["@inspectorWidget"];
  168. if(($receiver = $2) == nil || $receiver == undefined){
  169. self["@inspectorWidget"]=_st($HLInspectorWidget())._new();
  170. $1=self["@inspectorWidget"];
  171. } else {
  172. $1=$2;
  173. };
  174. return $1;
  175. }, function($ctx1) {$ctx1.fill(self,"inspectorWidget",{},smalltalk.HLDebugger)})},
  176. args: [],
  177. source: "inspectorWidget\x0a\x09^ inspectorWidget ifNil: [ \x0a\x09\x09inspectorWidget := HLInspectorWidget new ]",
  178. messageSends: ["ifNil:", "new"],
  179. referencedClasses: ["HLInspectorWidget"]
  180. }),
  181. smalltalk.HLDebugger);
  182. smalltalk.addMethod(
  183. smalltalk.method({
  184. selector: "model",
  185. category: 'accessing',
  186. fn: function (){
  187. var self=this;
  188. function $HLDebuggerModel(){return smalltalk.HLDebuggerModel||(typeof HLDebuggerModel=="undefined"?nil:HLDebuggerModel)}
  189. return smalltalk.withContext(function($ctx1) {
  190. var $2,$1;
  191. $2=self["@model"];
  192. if(($receiver = $2) == nil || $receiver == undefined){
  193. self["@model"]=_st($HLDebuggerModel())._new();
  194. $1=self["@model"];
  195. } else {
  196. $1=$2;
  197. };
  198. return $1;
  199. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDebugger)})},
  200. args: [],
  201. source: "model\x0a\x09^ model ifNil: [ model := HLDebuggerModel new ]",
  202. messageSends: ["ifNil:", "new"],
  203. referencedClasses: ["HLDebuggerModel"]
  204. }),
  205. smalltalk.HLDebugger);
  206. smalltalk.addMethod(
  207. smalltalk.method({
  208. selector: "observeModel",
  209. category: 'actions',
  210. fn: function (){
  211. var self=this;
  212. function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  213. return smalltalk.withContext(function($ctx1) {
  214. _st(_st(self._model())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
  215. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDebugger)})},
  216. args: [],
  217. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self",
  218. messageSends: ["on:send:to:", "announcer", "model"],
  219. referencedClasses: ["HLDebuggerContextSelected"]
  220. }),
  221. smalltalk.HLDebugger);
  222. smalltalk.addMethod(
  223. smalltalk.method({
  224. selector: "onContextSelected:",
  225. category: 'reactions',
  226. fn: function (anAnnouncement){
  227. var self=this;
  228. function $HLContextInspectorDecorator(){return smalltalk.HLContextInspectorDecorator||(typeof HLContextInspectorDecorator=="undefined"?nil:HLContextInspectorDecorator)}
  229. return smalltalk.withContext(function($ctx1) {
  230. _st(self._inspectorWidget())._inspect_(_st($HLContextInspectorDecorator())._on_(_st(anAnnouncement)._context()));
  231. return self}, function($ctx1) {$ctx1.fill(self,"onContextSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLDebugger)})},
  232. args: ["anAnnouncement"],
  233. source: "onContextSelected: anAnnouncement\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context)",
  234. messageSends: ["inspect:", "on:", "context", "inspectorWidget"],
  235. referencedClasses: ["HLContextInspectorDecorator"]
  236. }),
  237. smalltalk.HLDebugger);
  238. smalltalk.addMethod(
  239. smalltalk.method({
  240. selector: "registerBindingsOn:",
  241. category: 'keybindings',
  242. fn: function (aBindingGroup){
  243. var self=this;
  244. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  245. return smalltalk.withContext(function($ctx1) {
  246. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  247. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLDebugger)})},
  248. args: ["aBindingGroup"],
  249. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  250. messageSends: ["registerConcreteClassesOn:for:", "model"],
  251. referencedClasses: ["HLToolCommand"]
  252. }),
  253. smalltalk.HLDebugger);
  254. smalltalk.addMethod(
  255. smalltalk.method({
  256. selector: "renderContentOn:",
  257. category: 'rendering',
  258. fn: function (html){
  259. var self=this;
  260. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  261. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  262. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  263. return smalltalk.withContext(function($ctx1) {
  264. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()))));
  265. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDebugger)})},
  266. args: ["html"],
  267. source: "renderContentOn: html\x0a\x09html with: (HLContainer with: (HLHorizontalSplitter\x0a\x09\x09with: self stackListWidget\x0a\x09\x09with: (HLVerticalSplitter\x0a\x09\x09\x09with: self codeWidget\x0a\x09\x09\x09with: self inspectorWidget)))",
  268. messageSends: ["with:", "with:with:", "stackListWidget", "codeWidget", "inspectorWidget"],
  269. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  270. }),
  271. smalltalk.HLDebugger);
  272. smalltalk.addMethod(
  273. smalltalk.method({
  274. selector: "stackListWidget",
  275. category: 'accessing',
  276. fn: function (){
  277. var self=this;
  278. function $HLStackListWidget(){return smalltalk.HLStackListWidget||(typeof HLStackListWidget=="undefined"?nil:HLStackListWidget)}
  279. return smalltalk.withContext(function($ctx1) {
  280. var $2,$3,$4,$1;
  281. $2=self["@stackListWidget"];
  282. if(($receiver = $2) == nil || $receiver == undefined){
  283. $3=_st($HLStackListWidget())._on_(self._model());
  284. _st($3)._next_(self._codeWidget());
  285. $4=_st($3)._yourself();
  286. self["@stackListWidget"]=$4;
  287. $1=self["@stackListWidget"];
  288. } else {
  289. $1=$2;
  290. };
  291. return $1;
  292. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{},smalltalk.HLDebugger)})},
  293. args: [],
  294. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  295. messageSends: ["ifNil:", "next:", "codeWidget", "on:", "model", "yourself"],
  296. referencedClasses: ["HLStackListWidget"]
  297. }),
  298. smalltalk.HLDebugger);
  299. smalltalk.addMethod(
  300. smalltalk.method({
  301. selector: "unregister",
  302. category: 'actions',
  303. fn: function (){
  304. var self=this;
  305. return smalltalk.withContext(function($ctx1) {
  306. smalltalk.HLDebugger.superclass.fn.prototype._unregister.apply(_st(self), []);
  307. _st(self._inspectorWidget())._unregister();
  308. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLDebugger)})},
  309. args: [],
  310. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  311. messageSends: ["unregister", "inspectorWidget"],
  312. referencedClasses: []
  313. }),
  314. smalltalk.HLDebugger);
  315. smalltalk.addMethod(
  316. smalltalk.method({
  317. selector: "on:",
  318. category: 'instance creation',
  319. fn: function (aMethodContext){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) {
  322. var $2,$3,$1;
  323. $2=self._new();
  324. _st($2)._initializeFromMethodContext_(aMethodContext);
  325. $3=_st($2)._yourself();
  326. $1=$3;
  327. return $1;
  328. }, function($ctx1) {$ctx1.fill(self,"on:",{aMethodContext:aMethodContext},smalltalk.HLDebugger.klass)})},
  329. args: ["aMethodContext"],
  330. source: "on: aMethodContext\x0a\x09^ self new\x0a\x09\x09initializeFromMethodContext: aMethodContext;\x0a\x09\x09yourself",
  331. messageSends: ["initializeFromMethodContext:", "new", "yourself"],
  332. referencedClasses: []
  333. }),
  334. smalltalk.HLDebugger.klass);
  335. smalltalk.addMethod(
  336. smalltalk.method({
  337. selector: "tabClass",
  338. category: 'accessing',
  339. fn: function (){
  340. var self=this;
  341. return smalltalk.withContext(function($ctx1) {
  342. return "debugger";
  343. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLDebugger.klass)})},
  344. args: [],
  345. source: "tabClass\x0a\x09^ 'debugger'",
  346. messageSends: [],
  347. referencedClasses: []
  348. }),
  349. smalltalk.HLDebugger.klass);
  350. smalltalk.addMethod(
  351. smalltalk.method({
  352. selector: "tabLabel",
  353. category: 'accessing',
  354. fn: function (){
  355. var self=this;
  356. return smalltalk.withContext(function($ctx1) {
  357. return "Debugger";
  358. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLDebugger.klass)})},
  359. args: [],
  360. source: "tabLabel\x0a\x09^ 'Debugger'",
  361. messageSends: [],
  362. referencedClasses: []
  363. }),
  364. smalltalk.HLDebugger.klass);
  365. smalltalk.addClass('HLDebuggerCodeWidget', smalltalk.HLBrowserCodeWidget, ['highlightedNode'], 'Helios-Debugger');
  366. smalltalk.addMethod(
  367. smalltalk.method({
  368. selector: "addStopAt:",
  369. category: 'actions',
  370. fn: function (anInteger){
  371. var self=this;
  372. return smalltalk.withContext(function($ctx1) {
  373. _st(self["@editor"])._setGutterMarker_gutter_value_(anInteger,"stops",_st(_st("<div class=\x22stop\x22></stop>"._asJQuery())._toArray())._first());
  374. return self}, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger},smalltalk.HLDebuggerCodeWidget)})},
  375. args: ["anInteger"],
  376. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></stop>' asJQuery toArray first",
  377. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.HLDebuggerCodeWidget);
  381. smalltalk.addMethod(
  382. smalltalk.method({
  383. selector: "clearHighlight",
  384. category: 'actions',
  385. fn: function (){
  386. var self=this;
  387. return smalltalk.withContext(function($ctx1) {
  388. var $1;
  389. _st(self["@editor"])._clearGutter_("stops");
  390. $1=self._highlightedNode();
  391. if(($receiver = $1) == nil || $receiver == undefined){
  392. $1;
  393. } else {
  394. var node;
  395. node=$receiver;
  396. _st(self["@editor"])._removeLineClass_where_class_(_st(_st(_st(node)._position())._x()).__minus((1)),"background","highlighted");
  397. };
  398. return self}, function($ctx1) {$ctx1.fill(self,"clearHighlight",{},smalltalk.HLDebuggerCodeWidget)})},
  399. args: [],
  400. source: "clearHighlight\x0a\x09editor clearGutter: 'stops'.\x0a\x09self highlightedNode ifNotNil: [ :node |\x0a\x09\x09editor \x0a\x09\x09\x09removeLineClass: node position x - 1\x0a\x09\x09\x09where: 'background'\x0a\x09\x09\x09class: 'highlighted' ]",
  401. messageSends: ["clearGutter:", "ifNotNil:", "removeLineClass:where:class:", "-", "x", "position", "highlightedNode"],
  402. referencedClasses: []
  403. }),
  404. smalltalk.HLDebuggerCodeWidget);
  405. smalltalk.addMethod(
  406. smalltalk.method({
  407. selector: "contents:",
  408. category: 'accessing',
  409. fn: function (aString){
  410. var self=this;
  411. return smalltalk.withContext(function($ctx1) {
  412. self._clearHighlight();
  413. smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._contents_.apply(_st(self), [aString]);
  414. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},smalltalk.HLDebuggerCodeWidget)})},
  415. args: ["aString"],
  416. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  417. messageSends: ["clearHighlight", "contents:"],
  418. referencedClasses: []
  419. }),
  420. smalltalk.HLDebuggerCodeWidget);
  421. smalltalk.addMethod(
  422. smalltalk.method({
  423. selector: "editorOptions",
  424. category: 'accessing',
  425. fn: function (){
  426. var self=this;
  427. return smalltalk.withContext(function($ctx1) {
  428. var $2,$3,$1;
  429. $2=smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._editorOptions.apply(_st(self), []);
  430. _st($2)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  431. $3=_st($2)._yourself();
  432. $1=$3;
  433. return $1;
  434. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},smalltalk.HLDebuggerCodeWidget)})},
  435. args: [],
  436. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  437. messageSends: ["at:put:", "editorOptions", "yourself"],
  438. referencedClasses: []
  439. }),
  440. smalltalk.HLDebuggerCodeWidget);
  441. smalltalk.addMethod(
  442. smalltalk.method({
  443. selector: "highlight",
  444. category: 'actions',
  445. fn: function (){
  446. var self=this;
  447. var anchor,head,selection;
  448. return smalltalk.withContext(function($ctx1) {
  449. head=smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(self._highlightedNode())._position())._x()).__minus((1))),"ch".__minus_gt(_st(_st(_st(self._highlightedNode())._position())._y()).__minus((1)))]);
  450. anchor=smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(self._highlightedNode())._extent())._x()).__minus((1))),"ch".__minus_gt(_st(_st(_st(self._highlightedNode())._extent())._y()).__minus((1)))]);
  451. _st(self["@editor"])._setSelection_to_(head,anchor);
  452. return self}, function($ctx1) {$ctx1.fill(self,"highlight",{anchor:anchor,head:head,selection:selection},smalltalk.HLDebuggerCodeWidget)})},
  453. args: [],
  454. source: "highlight\x0a\x09| anchor head selection |\x0a\x09\x0a\x09head := #{\x0a\x09\x09'line' -> (self highlightedNode position x - 1).\x0a\x09\x09'ch' -> (self highlightedNode position y - 1)\x0a\x09}.\x0a\x09\x0a\x09anchor := #{\x0a\x09\x09'line' -> (self highlightedNode extent x - 1).\x0a\x09\x09'ch' -> (self highlightedNode extent y - 1)\x0a\x09}.\x0a\x09\x0a\x09editor setSelection: head to: anchor",
  455. messageSends: ["->", "-", "x", "position", "highlightedNode", "y", "extent", "setSelection:to:"],
  456. referencedClasses: []
  457. }),
  458. smalltalk.HLDebuggerCodeWidget);
  459. smalltalk.addMethod(
  460. smalltalk.method({
  461. selector: "highlightLine:",
  462. category: 'actions',
  463. fn: function (anInteger){
  464. var self=this;
  465. return smalltalk.withContext(function($ctx1) {
  466. _st(self["@editor"])._addLineClass_where_class_(anInteger,"background","highlighted");
  467. return self}, function($ctx1) {$ctx1.fill(self,"highlightLine:",{anInteger:anInteger},smalltalk.HLDebuggerCodeWidget)})},
  468. args: ["anInteger"],
  469. source: "highlightLine: anInteger\x0a\x09editor \x0a\x09\x09addLineClass: anInteger\x0a\x09\x09where: 'background'\x0a\x09\x09class: 'highlighted'",
  470. messageSends: ["addLineClass:where:class:"],
  471. referencedClasses: []
  472. }),
  473. smalltalk.HLDebuggerCodeWidget);
  474. smalltalk.addMethod(
  475. smalltalk.method({
  476. selector: "highlightNode:",
  477. category: 'actions',
  478. fn: function (aNode){
  479. var self=this;
  480. var line;
  481. return smalltalk.withContext(function($ctx1) {
  482. var $1,$2,$3;
  483. $1=aNode;
  484. if(($receiver = $1) == nil || $receiver == undefined){
  485. $1;
  486. } else {
  487. line=_st(_st(_st(aNode)._position())._x()).__minus((1));
  488. line;
  489. $2=self;
  490. _st($2)._clearHighlight();
  491. _st($2)._addStopAt_(line);
  492. _st($2)._highlightLine_(line);
  493. $3=_st($2)._highlightedNode_(aNode);
  494. $3;
  495. };
  496. return self}, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,line:line},smalltalk.HLDebuggerCodeWidget)})},
  497. args: ["aNode"],
  498. source: "highlightNode: aNode\x0a\x09| line |\x0a\x09aNode ifNotNil: [\x0a\x09\x09line := aNode position x - 1.\x0a\x09\x09self \x0a\x09\x09\x09clearHighlight; \x0a\x09\x09\x09addStopAt: line;\x0a\x09\x09\x09highlightLine: line;\x0a\x09\x09\x09highlightedNode: aNode\x0a\x09\x09]",
  499. messageSends: ["ifNotNil:", "-", "x", "position", "clearHighlight", "addStopAt:", "highlightLine:", "highlightedNode:"],
  500. referencedClasses: []
  501. }),
  502. smalltalk.HLDebuggerCodeWidget);
  503. smalltalk.addMethod(
  504. smalltalk.method({
  505. selector: "highlightedNode",
  506. category: 'accessing',
  507. fn: function (){
  508. var self=this;
  509. return smalltalk.withContext(function($ctx1) {
  510. var $1;
  511. $1=self["@highlightedNode"];
  512. return $1;
  513. }, function($ctx1) {$ctx1.fill(self,"highlightedNode",{},smalltalk.HLDebuggerCodeWidget)})},
  514. args: [],
  515. source: "highlightedNode\x0a\x09^ highlightedNode",
  516. messageSends: [],
  517. referencedClasses: []
  518. }),
  519. smalltalk.HLDebuggerCodeWidget);
  520. smalltalk.addMethod(
  521. smalltalk.method({
  522. selector: "highlightedNode:",
  523. category: 'accessing',
  524. fn: function (aNode){
  525. var self=this;
  526. return smalltalk.withContext(function($ctx1) {
  527. self["@highlightedNode"]=aNode;
  528. return self}, function($ctx1) {$ctx1.fill(self,"highlightedNode:",{aNode:aNode},smalltalk.HLDebuggerCodeWidget)})},
  529. args: ["aNode"],
  530. source: "highlightedNode: aNode\x0a\x09highlightedNode := aNode",
  531. messageSends: [],
  532. referencedClasses: []
  533. }),
  534. smalltalk.HLDebuggerCodeWidget);
  535. smalltalk.addMethod(
  536. smalltalk.method({
  537. selector: "observeBrowserModel",
  538. category: 'actions',
  539. fn: function (){
  540. var self=this;
  541. function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  542. return smalltalk.withContext(function($ctx1) {
  543. smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
  544. _st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected",self);
  545. return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLDebuggerCodeWidget)})},
  546. args: [],
  547. source: "observeBrowserModel\x0a\x09super observeBrowserModel.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self",
  548. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"],
  549. referencedClasses: ["HLDebuggerContextSelected"]
  550. }),
  551. smalltalk.HLDebuggerCodeWidget);
  552. smalltalk.addMethod(
  553. smalltalk.method({
  554. selector: "onContextSelected",
  555. category: 'reactions',
  556. fn: function (){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) {
  559. self._highlightNode_(_st(self._browserModel())._nextNode());
  560. return self}, function($ctx1) {$ctx1.fill(self,"onContextSelected",{},smalltalk.HLDebuggerCodeWidget)})},
  561. args: [],
  562. source: "onContextSelected\x0a\x09self highlightNode: self browserModel nextNode",
  563. messageSends: ["highlightNode:", "nextNode", "browserModel"],
  564. referencedClasses: []
  565. }),
  566. smalltalk.HLDebuggerCodeWidget);
  567. smalltalk.addClass('HLDebuggerModel', smalltalk.HLToolModel, ['rootContext', 'currentContext', 'contexts', 'interpreter'], 'Helios-Debugger');
  568. smalltalk.HLDebuggerModel.comment="I am a model for Helios debugging.\x0a\x0aMy instances hold a reference to an `AIContext` instance, built from a `MethodContext`. The context should be the root of the context stack.";
  569. smalltalk.addMethod(
  570. smalltalk.method({
  571. selector: "contexts",
  572. category: 'accessing',
  573. fn: function (){
  574. var self=this;
  575. return smalltalk.withContext(function($ctx1) {
  576. var $1;
  577. $1=self["@contexts"];
  578. return $1;
  579. }, function($ctx1) {$ctx1.fill(self,"contexts",{},smalltalk.HLDebuggerModel)})},
  580. args: [],
  581. source: "contexts\x0a\x09^ contexts",
  582. messageSends: [],
  583. referencedClasses: []
  584. }),
  585. smalltalk.HLDebuggerModel);
  586. smalltalk.addMethod(
  587. smalltalk.method({
  588. selector: "currentContext",
  589. category: 'accessing',
  590. fn: function (){
  591. var self=this;
  592. return smalltalk.withContext(function($ctx1) {
  593. var $1,$2;
  594. $1=self["@currentContext"];
  595. if(($receiver = $1) == nil || $receiver == undefined){
  596. self._currentContext_(self._rootContext());
  597. } else {
  598. $1;
  599. };
  600. $2=self["@currentContext"];
  601. return $2;
  602. }, function($ctx1) {$ctx1.fill(self,"currentContext",{},smalltalk.HLDebuggerModel)})},
  603. args: [],
  604. source: "currentContext\x0a\x09currentContext ifNil: [ self currentContext: self rootContext ].\x0a\x09^ currentContext",
  605. messageSends: ["ifNil:", "currentContext:", "rootContext"],
  606. referencedClasses: []
  607. }),
  608. smalltalk.HLDebuggerModel);
  609. smalltalk.addMethod(
  610. smalltalk.method({
  611. selector: "currentContext:",
  612. category: 'accessing',
  613. fn: function (aContext){
  614. var self=this;
  615. function $ASTDebugger(){return smalltalk.ASTDebugger||(typeof ASTDebugger=="undefined"?nil:ASTDebugger)}
  616. function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  617. return smalltalk.withContext(function($ctx1) {
  618. var $1,$2;
  619. self._withChangesDo_((function(){
  620. return smalltalk.withContext(function($ctx2) {
  621. self._selectedMethod_(_st(aContext)._method());
  622. self["@currentContext"]=aContext;
  623. self["@currentContext"];
  624. self["@interpreter"]=_st($ASTDebugger())._context_(aContext);
  625. self["@interpreter"];
  626. $1=_st($HLDebuggerContextSelected())._new();
  627. _st($1)._context_(aContext);
  628. $2=_st($1)._yourself();
  629. return _st(self._announcer())._announce_($2);
  630. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  631. return self}, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext},smalltalk.HLDebuggerModel)})},
  632. args: ["aContext"],
  633. source: "currentContext: aContext\x0a\x09self withChangesDo: [ \x0a\x09\x09self selectedMethod: aContext method.\x0a\x09\x09currentContext := aContext.\x0a\x09\x09interpreter := ASTDebugger context: aContext.\x0a\x09\x09self announcer announce: (HLDebuggerContextSelected new\x0a\x09\x09\x09context: aContext;\x0a\x09\x09\x09yourself) ]",
  634. messageSends: ["withChangesDo:", "selectedMethod:", "method", "context:", "announce:", "new", "yourself", "announcer"],
  635. referencedClasses: ["ASTDebugger", "HLDebuggerContextSelected"]
  636. }),
  637. smalltalk.HLDebuggerModel);
  638. smalltalk.addMethod(
  639. smalltalk.method({
  640. selector: "initializeContexts",
  641. category: 'initialization',
  642. fn: function (){
  643. var self=this;
  644. var context;
  645. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  646. return smalltalk.withContext(function($ctx1) {
  647. self["@contexts"]=_st($OrderedCollection())._new();
  648. context=self._rootContext();
  649. _st((function(){
  650. return smalltalk.withContext(function($ctx2) {
  651. return _st(context)._notNil();
  652. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  653. return smalltalk.withContext(function($ctx2) {
  654. _st(self["@contexts"])._add_(context);
  655. context=_st(context)._outerContext();
  656. return context;
  657. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  658. return self}, function($ctx1) {$ctx1.fill(self,"initializeContexts",{context:context},smalltalk.HLDebuggerModel)})},
  659. args: [],
  660. source: "initializeContexts\x0a\x09\x22Flatten the context stack into an OrderedCollection\x22\x0a\x09\x0a\x09| 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 ]",
  661. messageSends: ["new", "rootContext", "whileTrue:", "add:", "outerContext", "notNil"],
  662. referencedClasses: ["OrderedCollection"]
  663. }),
  664. smalltalk.HLDebuggerModel);
  665. smalltalk.addMethod(
  666. smalltalk.method({
  667. selector: "initializeFromContext:",
  668. category: 'initialization',
  669. fn: function (aMethodContext){
  670. var self=this;
  671. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  672. return smalltalk.withContext(function($ctx1) {
  673. self["@rootContext"]=_st($AIContext())._fromMethodContext_(aMethodContext);
  674. self._initializeContexts();
  675. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromContext:",{aMethodContext:aMethodContext},smalltalk.HLDebuggerModel)})},
  676. args: ["aMethodContext"],
  677. source: "initializeFromContext: aMethodContext\x0a\x09rootContext := AIContext fromMethodContext: aMethodContext.\x0a\x09self initializeContexts",
  678. messageSends: ["fromMethodContext:", "initializeContexts"],
  679. referencedClasses: ["AIContext"]
  680. }),
  681. smalltalk.HLDebuggerModel);
  682. smalltalk.addMethod(
  683. smalltalk.method({
  684. selector: "interpreter",
  685. category: 'accessing',
  686. fn: function (){
  687. var self=this;
  688. return smalltalk.withContext(function($ctx1) {
  689. var $1;
  690. $1=self["@interpreter"];
  691. return $1;
  692. }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.HLDebuggerModel)})},
  693. args: [],
  694. source: "interpreter\x0a\x09^ interpreter",
  695. messageSends: [],
  696. referencedClasses: []
  697. }),
  698. smalltalk.HLDebuggerModel);
  699. smalltalk.addMethod(
  700. smalltalk.method({
  701. selector: "nextNode",
  702. category: 'accessing',
  703. fn: function (){
  704. var self=this;
  705. return smalltalk.withContext(function($ctx1) {
  706. var $1;
  707. $1=_st(self._interpreter())._nextNode();
  708. return $1;
  709. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.HLDebuggerModel)})},
  710. args: [],
  711. source: "nextNode\x0a\x09^ self interpreter nextNode",
  712. messageSends: ["nextNode", "interpreter"],
  713. referencedClasses: []
  714. }),
  715. smalltalk.HLDebuggerModel);
  716. smalltalk.addMethod(
  717. smalltalk.method({
  718. selector: "rootContext",
  719. category: 'accessing',
  720. fn: function (){
  721. var self=this;
  722. return smalltalk.withContext(function($ctx1) {
  723. var $1;
  724. $1=self["@rootContext"];
  725. return $1;
  726. }, function($ctx1) {$ctx1.fill(self,"rootContext",{},smalltalk.HLDebuggerModel)})},
  727. args: [],
  728. source: "rootContext\x0a\x09^ rootContext",
  729. messageSends: [],
  730. referencedClasses: []
  731. }),
  732. smalltalk.HLDebuggerModel);
  733. smalltalk.addMethod(
  734. smalltalk.method({
  735. selector: "on:",
  736. category: 'instance creation',
  737. fn: function (aMethodContext){
  738. var self=this;
  739. return smalltalk.withContext(function($ctx1) {
  740. var $2,$3,$1;
  741. $2=self._new();
  742. _st($2)._initializeFromContext_(aMethodContext);
  743. $3=_st($2)._yourself();
  744. $1=$3;
  745. return $1;
  746. }, function($ctx1) {$ctx1.fill(self,"on:",{aMethodContext:aMethodContext},smalltalk.HLDebuggerModel.klass)})},
  747. args: ["aMethodContext"],
  748. source: "on: aMethodContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aMethodContext;\x0a\x09\x09yourself",
  749. messageSends: ["initializeFromContext:", "new", "yourself"],
  750. referencedClasses: []
  751. }),
  752. smalltalk.HLDebuggerModel.klass);
  753. smalltalk.addClass('HLErrorHandler', smalltalk.ErrorHandler, [], 'Helios-Debugger');
  754. smalltalk.addMethod(
  755. smalltalk.method({
  756. selector: "handleError:",
  757. category: 'error handling',
  758. fn: function (anError){
  759. var self=this;
  760. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  761. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  762. function $HLDebugger(){return smalltalk.HLDebugger||(typeof HLDebugger=="undefined"?nil:HLDebugger)}
  763. return smalltalk.withContext(function($ctx1) {
  764. self._onErrorHandled();
  765. _st((function(){
  766. return smalltalk.withContext(function($ctx2) {
  767. return _st(_st($HLDebugger())._on_(_st(anError)._context()))._openAsTab();
  768. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(error){
  769. return smalltalk.withContext(function($ctx2) {
  770. return _st(_st($ErrorHandler())._new())._handleError_(error);
  771. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1)})}));
  772. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler)})},
  773. args: ["anError"],
  774. source: "handleError: anError\x0a\x09self onErrorHandled.\x0a\x0a\x09[ \x0a\x09\x09(HLDebugger on: anError context) openAsTab \x0a\x09] \x0a\x09\x09on: Error \x0a\x09\x09do: [ :error | ErrorHandler new handleError: error ]",
  775. messageSends: ["onErrorHandled", "on:do:", "handleError:", "new", "openAsTab", "on:", "context"],
  776. referencedClasses: ["Error", "ErrorHandler", "HLDebugger"]
  777. }),
  778. smalltalk.HLErrorHandler);
  779. smalltalk.addMethod(
  780. smalltalk.method({
  781. selector: "onErrorHandled",
  782. category: 'error handling',
  783. fn: function (){
  784. var self=this;
  785. function $HLProgressWidget(){return smalltalk.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  786. return smalltalk.withContext(function($ctx1) {
  787. var $1,$2;
  788. $1=_st($HLProgressWidget())._default();
  789. _st($1)._flush();
  790. $2=_st($1)._remove();
  791. return self}, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{},smalltalk.HLErrorHandler)})},
  792. args: [],
  793. 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",
  794. messageSends: ["flush", "default", "remove"],
  795. referencedClasses: ["HLProgressWidget"]
  796. }),
  797. smalltalk.HLErrorHandler);
  798. smalltalk.addMethod(
  799. smalltalk.method({
  800. selector: "handleError:",
  801. category: 'error handling',
  802. fn: function (anError){
  803. var self=this;
  804. return smalltalk.withContext(function($ctx1) {
  805. var $1;
  806. $1=_st(self._new())._handleError_(anError);
  807. return $1;
  808. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler.klass)})},
  809. args: ["anError"],
  810. source: "handleError: anError\x0a\x09^ self new handleError: anError",
  811. messageSends: ["handleError:", "new"],
  812. referencedClasses: []
  813. }),
  814. smalltalk.HLErrorHandler.klass);
  815. smalltalk.addClass('HLStackListWidget', smalltalk.HLToolListWidget, [], 'Helios-Debugger');
  816. smalltalk.addMethod(
  817. smalltalk.method({
  818. selector: "items",
  819. category: 'accessing',
  820. fn: function (){
  821. var self=this;
  822. return smalltalk.withContext(function($ctx1) {
  823. var $2,$1;
  824. $2=self["@items"];
  825. if(($receiver = $2) == nil || $receiver == undefined){
  826. self["@items"]=_st(self._model())._contexts();
  827. $1=self["@items"];
  828. } else {
  829. $1=$2;
  830. };
  831. return $1;
  832. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLStackListWidget)})},
  833. args: [],
  834. source: "items\x0a\x09^ items ifNil: [ items := self model contexts ]",
  835. messageSends: ["ifNil:", "contexts", "model"],
  836. referencedClasses: []
  837. }),
  838. smalltalk.HLStackListWidget);
  839. smalltalk.addMethod(
  840. smalltalk.method({
  841. selector: "label",
  842. category: 'accessing',
  843. fn: function (){
  844. var self=this;
  845. return smalltalk.withContext(function($ctx1) {
  846. return "Call stack";
  847. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLStackListWidget)})},
  848. args: [],
  849. source: "label\x0a\x09^ 'Call stack'",
  850. messageSends: [],
  851. referencedClasses: []
  852. }),
  853. smalltalk.HLStackListWidget);
  854. smalltalk.addMethod(
  855. smalltalk.method({
  856. selector: "selectItem:",
  857. category: 'actions',
  858. fn: function (aContext){
  859. var self=this;
  860. return smalltalk.withContext(function($ctx1) {
  861. _st(self._model())._currentContext_(aContext);
  862. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext},smalltalk.HLStackListWidget)})},
  863. args: ["aContext"],
  864. source: "selectItem: aContext\x0a \x09self model currentContext: aContext",
  865. messageSends: ["currentContext:", "model"],
  866. referencedClasses: []
  867. }),
  868. smalltalk.HLStackListWidget);
  869. });