Helios-Debugger.js 35 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924
  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.addClass('HLContextInspectorDecorator', smalltalk.Object, ['context'], 'Helios-Debugger');
  4. smalltalk.addMethod(
  5. smalltalk.method({
  6. selector: "context",
  7. category: 'accessing',
  8. fn: function (){
  9. var self=this;
  10. return smalltalk.withContext(function($ctx1) {
  11. var $1;
  12. $1=self["@context"];
  13. return $1;
  14. }, function($ctx1) {$ctx1.fill(self,"context",{},smalltalk.HLContextInspectorDecorator)})},
  15. args: [],
  16. source: "context\x0a\x09^ context",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. smalltalk.HLContextInspectorDecorator);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "initializeFromContext:",
  24. category: 'initialization',
  25. fn: function (aContext){
  26. var self=this;
  27. return smalltalk.withContext(function($ctx1) {
  28. self["@context"]=aContext;
  29. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromContext:",{aContext:aContext},smalltalk.HLContextInspectorDecorator)})},
  30. args: ["aContext"],
  31. source: "initializeFromContext: aContext\x0a\x09context := aContext",
  32. messageSends: [],
  33. referencedClasses: []
  34. }),
  35. smalltalk.HLContextInspectorDecorator);
  36. smalltalk.addMethod(
  37. smalltalk.method({
  38. selector: "inspectOn:",
  39. category: 'inspecting',
  40. fn: function (anInspector){
  41. var self=this;
  42. var variables,inspectedContext;
  43. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  44. return smalltalk.withContext(function($ctx1) {
  45. var $1,$2,$3;
  46. variables=_st($Dictionary())._new();
  47. inspectedContext=self._context();
  48. _st(variables)._addAll_(_st(inspectedContext)._locals());
  49. _st((function(){
  50. return smalltalk.withContext(function($ctx2) {
  51. return _st(_st(inspectedContext)._notNil())._and_((function(){
  52. return smalltalk.withContext(function($ctx3) {
  53. return _st(inspectedContext)._isBlockContext();
  54. }, function($ctx3) {$ctx3.fillBlock({},$ctx2)})}));
  55. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._whileTrue_((function(){
  56. return smalltalk.withContext(function($ctx2) {
  57. inspectedContext=_st(inspectedContext)._outerContext();
  58. inspectedContext;
  59. $1=inspectedContext;
  60. if(($receiver = $1) == nil || $receiver == undefined){
  61. return $1;
  62. } else {
  63. return _st(variables)._addAll_(_st(inspectedContext)._locals());
  64. };
  65. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  66. $2=anInspector;
  67. _st($2)._setLabel_("Context");
  68. $3=_st($2)._setVariables_(variables);
  69. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext},smalltalk.HLContextInspectorDecorator)})},
  70. args: ["anInspector"],
  71. 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",
  72. messageSends: ["new", "context", "addAll:", "locals", "whileTrue:", "outerContext", "ifNotNil:", "and:", "isBlockContext", "notNil", "setLabel:", "setVariables:"],
  73. referencedClasses: ["Dictionary"]
  74. }),
  75. smalltalk.HLContextInspectorDecorator);
  76. smalltalk.addMethod(
  77. smalltalk.method({
  78. selector: "on:",
  79. category: 'instance creation',
  80. fn: function (aContext){
  81. var self=this;
  82. return smalltalk.withContext(function($ctx1) {
  83. var $2,$3,$1;
  84. $2=self._new();
  85. _st($2)._initializeFromContext_(aContext);
  86. $3=_st($2)._yourself();
  87. $1=$3;
  88. return $1;
  89. }, function($ctx1) {$ctx1.fill(self,"on:",{aContext:aContext},smalltalk.HLContextInspectorDecorator.klass)})},
  90. args: ["aContext"],
  91. source: "on: aContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aContext;\x0a\x09\x09yourself",
  92. messageSends: ["initializeFromContext:", "new", "yourself"],
  93. referencedClasses: []
  94. }),
  95. smalltalk.HLContextInspectorDecorator.klass);
  96. smalltalk.addClass('HLDebugger', smalltalk.HLFocusableWidget, ['model', 'stackListWidget', 'codeWidget', 'inspectorWidget'], 'Helios-Debugger');
  97. smalltalk.HLDebugger.comment="I am the main widget for the Helios debugger.";
  98. smalltalk.addMethod(
  99. smalltalk.method({
  100. selector: "codeWidget",
  101. category: 'accessing',
  102. fn: function (){
  103. var self=this;
  104. function $HLDebuggerCodeWidget(){return smalltalk.HLDebuggerCodeWidget||(typeof HLDebuggerCodeWidget=="undefined"?nil:HLDebuggerCodeWidget)}
  105. return smalltalk.withContext(function($ctx1) {
  106. var $2,$3,$4,$1;
  107. $2=self["@codeWidget"];
  108. if(($receiver = $2) == nil || $receiver == undefined){
  109. $3=_st($HLDebuggerCodeWidget())._new();
  110. _st($3)._browserModel_(self._model());
  111. $4=_st($3)._yourself();
  112. self["@codeWidget"]=$4;
  113. $1=self["@codeWidget"];
  114. } else {
  115. $1=$2;
  116. };
  117. return $1;
  118. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{},smalltalk.HLDebugger)})},
  119. args: [],
  120. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLDebuggerCodeWidget new\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
  121. messageSends: ["ifNil:", "browserModel:", "model", "new", "yourself"],
  122. referencedClasses: ["HLDebuggerCodeWidget"]
  123. }),
  124. smalltalk.HLDebugger);
  125. smalltalk.addMethod(
  126. smalltalk.method({
  127. selector: "focus",
  128. category: 'actions',
  129. fn: function (){
  130. var self=this;
  131. return smalltalk.withContext(function($ctx1) {
  132. _st(self._stackListWidget())._focus();
  133. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.HLDebugger)})},
  134. args: [],
  135. source: "focus\x0a\x09self stackListWidget focus",
  136. messageSends: ["focus", "stackListWidget"],
  137. referencedClasses: []
  138. }),
  139. smalltalk.HLDebugger);
  140. smalltalk.addMethod(
  141. smalltalk.method({
  142. selector: "initializeFromMethodContext:",
  143. category: 'accessing',
  144. fn: function (aMethodContext){
  145. var self=this;
  146. function $HLDebuggerModel(){return smalltalk.HLDebuggerModel||(typeof HLDebuggerModel=="undefined"?nil:HLDebuggerModel)}
  147. return smalltalk.withContext(function($ctx1) {
  148. self["@model"]=_st($HLDebuggerModel())._on_(aMethodContext);
  149. self._observeModel();
  150. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromMethodContext:",{aMethodContext:aMethodContext},smalltalk.HLDebugger)})},
  151. args: ["aMethodContext"],
  152. source: "initializeFromMethodContext: aMethodContext\x0a\x09model := HLDebuggerModel on: aMethodContext.\x0a\x09self observeModel",
  153. messageSends: ["on:", "observeModel"],
  154. referencedClasses: ["HLDebuggerModel"]
  155. }),
  156. smalltalk.HLDebugger);
  157. smalltalk.addMethod(
  158. smalltalk.method({
  159. selector: "inspectorWidget",
  160. category: 'accessing',
  161. fn: function (){
  162. var self=this;
  163. function $HLInspectorWidget(){return smalltalk.HLInspectorWidget||(typeof HLInspectorWidget=="undefined"?nil:HLInspectorWidget)}
  164. return smalltalk.withContext(function($ctx1) {
  165. var $2,$1;
  166. $2=self["@inspectorWidget"];
  167. if(($receiver = $2) == nil || $receiver == undefined){
  168. self["@inspectorWidget"]=_st($HLInspectorWidget())._new();
  169. $1=self["@inspectorWidget"];
  170. } else {
  171. $1=$2;
  172. };
  173. return $1;
  174. }, function($ctx1) {$ctx1.fill(self,"inspectorWidget",{},smalltalk.HLDebugger)})},
  175. args: [],
  176. source: "inspectorWidget\x0a\x09^ inspectorWidget ifNil: [ \x0a\x09\x09inspectorWidget := HLInspectorWidget new ]",
  177. messageSends: ["ifNil:", "new"],
  178. referencedClasses: ["HLInspectorWidget"]
  179. }),
  180. smalltalk.HLDebugger);
  181. smalltalk.addMethod(
  182. smalltalk.method({
  183. selector: "model",
  184. category: 'accessing',
  185. fn: function (){
  186. var self=this;
  187. function $HLDebuggerModel(){return smalltalk.HLDebuggerModel||(typeof HLDebuggerModel=="undefined"?nil:HLDebuggerModel)}
  188. return smalltalk.withContext(function($ctx1) {
  189. var $2,$1;
  190. $2=self["@model"];
  191. if(($receiver = $2) == nil || $receiver == undefined){
  192. self["@model"]=_st($HLDebuggerModel())._new();
  193. $1=self["@model"];
  194. } else {
  195. $1=$2;
  196. };
  197. return $1;
  198. }, function($ctx1) {$ctx1.fill(self,"model",{},smalltalk.HLDebugger)})},
  199. args: [],
  200. source: "model\x0a\x09^ model ifNil: [ model := HLDebuggerModel new ]",
  201. messageSends: ["ifNil:", "new"],
  202. referencedClasses: ["HLDebuggerModel"]
  203. }),
  204. smalltalk.HLDebugger);
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "observeModel",
  208. category: 'actions',
  209. fn: function (){
  210. var self=this;
  211. function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  212. return smalltalk.withContext(function($ctx1) {
  213. _st(_st(self._model())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
  214. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDebugger)})},
  215. args: [],
  216. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self",
  217. messageSends: ["on:send:to:", "announcer", "model"],
  218. referencedClasses: ["HLDebuggerContextSelected"]
  219. }),
  220. smalltalk.HLDebugger);
  221. smalltalk.addMethod(
  222. smalltalk.method({
  223. selector: "onContextSelected:",
  224. category: 'reactions',
  225. fn: function (anAnnouncement){
  226. var self=this;
  227. function $HLContextInspectorDecorator(){return smalltalk.HLContextInspectorDecorator||(typeof HLContextInspectorDecorator=="undefined"?nil:HLContextInspectorDecorator)}
  228. return smalltalk.withContext(function($ctx1) {
  229. _st(self._inspectorWidget())._inspect_(_st($HLContextInspectorDecorator())._on_(_st(anAnnouncement)._context()));
  230. return self}, function($ctx1) {$ctx1.fill(self,"onContextSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLDebugger)})},
  231. args: ["anAnnouncement"],
  232. source: "onContextSelected: anAnnouncement\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context)",
  233. messageSends: ["inspect:", "on:", "context", "inspectorWidget"],
  234. referencedClasses: ["HLContextInspectorDecorator"]
  235. }),
  236. smalltalk.HLDebugger);
  237. smalltalk.addMethod(
  238. smalltalk.method({
  239. selector: "registerBindingsOn:",
  240. category: 'keybindings',
  241. fn: function (aBindingGroup){
  242. var self=this;
  243. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  244. return smalltalk.withContext(function($ctx1) {
  245. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  246. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLDebugger)})},
  247. args: ["aBindingGroup"],
  248. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  249. messageSends: ["registerConcreteClassesOn:for:", "model"],
  250. referencedClasses: ["HLToolCommand"]
  251. }),
  252. smalltalk.HLDebugger);
  253. smalltalk.addMethod(
  254. smalltalk.method({
  255. selector: "renderContentOn:",
  256. category: 'rendering',
  257. fn: function (html){
  258. var self=this;
  259. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  260. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  261. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  262. return smalltalk.withContext(function($ctx1) {
  263. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()))));
  264. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDebugger)})},
  265. args: ["html"],
  266. 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)))",
  267. messageSends: ["with:", "with:with:", "stackListWidget", "codeWidget", "inspectorWidget"],
  268. referencedClasses: ["HLVerticalSplitter", "HLHorizontalSplitter", "HLContainer"]
  269. }),
  270. smalltalk.HLDebugger);
  271. smalltalk.addMethod(
  272. smalltalk.method({
  273. selector: "stackListWidget",
  274. category: 'accessing',
  275. fn: function (){
  276. var self=this;
  277. function $HLStackListWidget(){return smalltalk.HLStackListWidget||(typeof HLStackListWidget=="undefined"?nil:HLStackListWidget)}
  278. return smalltalk.withContext(function($ctx1) {
  279. var $2,$3,$4,$1;
  280. $2=self["@stackListWidget"];
  281. if(($receiver = $2) == nil || $receiver == undefined){
  282. $3=_st($HLStackListWidget())._on_(self._model());
  283. _st($3)._next_(self._codeWidget());
  284. $4=_st($3)._yourself();
  285. self["@stackListWidget"]=$4;
  286. $1=self["@stackListWidget"];
  287. } else {
  288. $1=$2;
  289. };
  290. return $1;
  291. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{},smalltalk.HLDebugger)})},
  292. args: [],
  293. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  294. messageSends: ["ifNil:", "next:", "codeWidget", "on:", "model", "yourself"],
  295. referencedClasses: ["HLStackListWidget"]
  296. }),
  297. smalltalk.HLDebugger);
  298. smalltalk.addMethod(
  299. smalltalk.method({
  300. selector: "unregister",
  301. category: 'actions',
  302. fn: function (){
  303. var self=this;
  304. return smalltalk.withContext(function($ctx1) {
  305. smalltalk.HLDebugger.superclass.fn.prototype._unregister.apply(_st(self), []);
  306. _st(self._inspectorWidget())._unregister();
  307. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLDebugger)})},
  308. args: [],
  309. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  310. messageSends: ["unregister", "inspectorWidget"],
  311. referencedClasses: []
  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=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("<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=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. self._clearHighlight();
  412. smalltalk.HLDebuggerCodeWidget.superclass.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.HLDebuggerCodeWidget.superclass.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._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)))]);
  449. 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)))]);
  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.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
  543. _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. self._highlightNode_(_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. self._currentContext_(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. self._withChangesDo_((function(){
  619. return smalltalk.withContext(function($ctx2) {
  620. 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(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=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. 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(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=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. self._onErrorHandled();
  764. _st((function(){
  765. return smalltalk.withContext(function($ctx2) {
  766. return _st(_st($HLDebugger())._on_(_st(anError)._context()))._openAsTab();
  767. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}))._on_do_($Error(),(function(error){
  768. return smalltalk.withContext(function($ctx2) {
  769. return _st(_st($ErrorHandler())._new())._handleError_(error);
  770. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1)})}));
  771. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler)})},
  772. args: ["anError"],
  773. 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 ]",
  774. messageSends: ["onErrorHandled", "on:do:", "handleError:", "new", "openAsTab", "on:", "context"],
  775. referencedClasses: ["Error", "ErrorHandler", "HLDebugger"]
  776. }),
  777. smalltalk.HLErrorHandler);
  778. smalltalk.addMethod(
  779. smalltalk.method({
  780. selector: "onErrorHandled",
  781. category: 'error handling',
  782. fn: function (){
  783. var self=this;
  784. function $HLProgressWidget(){return smalltalk.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  785. return smalltalk.withContext(function($ctx1) {
  786. var $1,$2;
  787. $1=_st($HLProgressWidget())._default();
  788. _st($1)._flush();
  789. $2=_st($1)._remove();
  790. return self}, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{},smalltalk.HLErrorHandler)})},
  791. args: [],
  792. 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",
  793. messageSends: ["flush", "default", "remove"],
  794. referencedClasses: ["HLProgressWidget"]
  795. }),
  796. smalltalk.HLErrorHandler);
  797. smalltalk.addMethod(
  798. smalltalk.method({
  799. selector: "handleError:",
  800. category: 'error handling',
  801. fn: function (anError){
  802. var self=this;
  803. return smalltalk.withContext(function($ctx1) {
  804. var $1;
  805. $1=_st(self._new())._handleError_(anError);
  806. return $1;
  807. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler.klass)})},
  808. args: ["anError"],
  809. source: "handleError: anError\x0a\x09^ self new handleError: anError",
  810. messageSends: ["handleError:", "new"],
  811. referencedClasses: []
  812. }),
  813. smalltalk.HLErrorHandler.klass);
  814. smalltalk.addClass('HLStackListWidget', smalltalk.HLToolListWidget, [], 'Helios-Debugger');
  815. smalltalk.addMethod(
  816. smalltalk.method({
  817. selector: "items",
  818. category: 'accessing',
  819. fn: function (){
  820. var self=this;
  821. return smalltalk.withContext(function($ctx1) {
  822. var $2,$1;
  823. $2=self["@items"];
  824. if(($receiver = $2) == nil || $receiver == undefined){
  825. self["@items"]=_st(self._model())._contexts();
  826. $1=self["@items"];
  827. } else {
  828. $1=$2;
  829. };
  830. return $1;
  831. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLStackListWidget)})},
  832. args: [],
  833. source: "items\x0a\x09^ items ifNil: [ items := self model contexts ]",
  834. messageSends: ["ifNil:", "contexts", "model"],
  835. referencedClasses: []
  836. }),
  837. smalltalk.HLStackListWidget);
  838. smalltalk.addMethod(
  839. smalltalk.method({
  840. selector: "label",
  841. category: 'accessing',
  842. fn: function (){
  843. var self=this;
  844. return smalltalk.withContext(function($ctx1) {
  845. return "Call stack";
  846. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLStackListWidget)})},
  847. args: [],
  848. source: "label\x0a\x09^ 'Call stack'",
  849. messageSends: [],
  850. referencedClasses: []
  851. }),
  852. smalltalk.HLStackListWidget);
  853. smalltalk.addMethod(
  854. smalltalk.method({
  855. selector: "selectItem:",
  856. category: 'actions',
  857. fn: function (aContext){
  858. var self=this;
  859. return smalltalk.withContext(function($ctx1) {
  860. _st(self._model())._currentContext_(aContext);
  861. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext},smalltalk.HLStackListWidget)})},
  862. args: ["aContext"],
  863. source: "selectItem: aContext\x0a \x09self model currentContext: aContext",
  864. messageSends: ["currentContext:", "model"],
  865. referencedClasses: []
  866. }),
  867. smalltalk.HLStackListWidget);
  868. });