1
0

Helios-Debugger.js 34 KB

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