2
0

Helios-Debugger.js 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019
  1. define("amber_core/Helios-Debugger", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Kernel-Objects", "amber_core/Helios-Core", "amber_core/Helios-Workspace", "amber_core/Kernel-Exceptions"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('Helios-Debugger');
  3. smalltalk.packages["Helios-Debugger"].transport = {"type":"amd","amdNamespace":"amber_core"};
  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,2)})}));
  56. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
  57. return smalltalk.withContext(function($ctx2) {
  58. inspectedContext=_st(inspectedContext)._outerContext();
  59. inspectedContext;
  60. $1=inspectedContext;
  61. if(($receiver = $1) == nil || $receiver == null){
  62. return $1;
  63. } else {
  64. return _st(variables)._addAll_(_st(inspectedContext)._locals());
  65. };
  66. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  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:", "and:", "notNil", "isBlockContext", "outerContext", "ifNotNil:", "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 == null){
  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:", "new", "model", "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 == null){
  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 == null){
  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. function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  214. return smalltalk.withContext(function($ctx1) {
  215. _st(_st(self._model())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected:",self);
  216. _st(_st(self._model())._announcer())._on_send_to_($HLDebuggerStepped(),"onContextSelected:",self);
  217. return self}, function($ctx1) {$ctx1.fill(self,"observeModel",{},smalltalk.HLDebugger)})},
  218. args: [],
  219. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self.\x0a\x09\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self",
  220. messageSends: ["on:send:to:", "announcer", "model"],
  221. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped"]
  222. }),
  223. smalltalk.HLDebugger);
  224. smalltalk.addMethod(
  225. smalltalk.method({
  226. selector: "onContextSelected:",
  227. category: 'reactions',
  228. fn: function (anAnnouncement){
  229. var self=this;
  230. function $HLContextInspectorDecorator(){return smalltalk.HLContextInspectorDecorator||(typeof HLContextInspectorDecorator=="undefined"?nil:HLContextInspectorDecorator)}
  231. return smalltalk.withContext(function($ctx1) {
  232. _st(self._inspectorWidget())._inspect_(_st($HLContextInspectorDecorator())._on_(_st(anAnnouncement)._context()));
  233. return self}, function($ctx1) {$ctx1.fill(self,"onContextSelected:",{anAnnouncement:anAnnouncement},smalltalk.HLDebugger)})},
  234. args: ["anAnnouncement"],
  235. source: "onContextSelected: anAnnouncement\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context)",
  236. messageSends: ["inspect:", "inspectorWidget", "on:", "context"],
  237. referencedClasses: ["HLContextInspectorDecorator"]
  238. }),
  239. smalltalk.HLDebugger);
  240. smalltalk.addMethod(
  241. smalltalk.method({
  242. selector: "registerBindingsOn:",
  243. category: 'keybindings',
  244. fn: function (aBindingGroup){
  245. var self=this;
  246. function $HLToolCommand(){return smalltalk.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  247. return smalltalk.withContext(function($ctx1) {
  248. _st($HLToolCommand())._registerConcreteClassesOn_for_(aBindingGroup,self._model());
  249. return self}, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup},smalltalk.HLDebugger)})},
  250. args: ["aBindingGroup"],
  251. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  252. messageSends: ["registerConcreteClassesOn:for:", "model"],
  253. referencedClasses: ["HLToolCommand"]
  254. }),
  255. smalltalk.HLDebugger);
  256. smalltalk.addMethod(
  257. smalltalk.method({
  258. selector: "renderContentOn:",
  259. category: 'rendering',
  260. fn: function (html){
  261. var self=this;
  262. function $HLContainer(){return smalltalk.HLContainer||(typeof HLContainer=="undefined"?nil:HLContainer)}
  263. function $HLHorizontalSplitter(){return smalltalk.HLHorizontalSplitter||(typeof HLHorizontalSplitter=="undefined"?nil:HLHorizontalSplitter)}
  264. function $HLVerticalSplitter(){return smalltalk.HLVerticalSplitter||(typeof HLVerticalSplitter=="undefined"?nil:HLVerticalSplitter)}
  265. return smalltalk.withContext(function($ctx1) {
  266. _st(html)._with_(_st($HLContainer())._with_(_st($HLHorizontalSplitter())._with_with_(self._stackListWidget(),_st($HLVerticalSplitter())._with_with_(self._codeWidget(),self._inspectorWidget()))));
  267. return self}, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},smalltalk.HLDebugger)})},
  268. args: ["html"],
  269. 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)))",
  270. messageSends: ["with:", "with:with:", "stackListWidget", "codeWidget", "inspectorWidget"],
  271. referencedClasses: ["HLContainer", "HLHorizontalSplitter", "HLVerticalSplitter"]
  272. }),
  273. smalltalk.HLDebugger);
  274. smalltalk.addMethod(
  275. smalltalk.method({
  276. selector: "stackListWidget",
  277. category: 'accessing',
  278. fn: function (){
  279. var self=this;
  280. function $HLStackListWidget(){return smalltalk.HLStackListWidget||(typeof HLStackListWidget=="undefined"?nil:HLStackListWidget)}
  281. return smalltalk.withContext(function($ctx1) {
  282. var $2,$3,$4,$1;
  283. $2=self["@stackListWidget"];
  284. if(($receiver = $2) == nil || $receiver == null){
  285. $3=_st($HLStackListWidget())._on_(self._model());
  286. _st($3)._next_(self._codeWidget());
  287. $4=_st($3)._yourself();
  288. self["@stackListWidget"]=$4;
  289. $1=self["@stackListWidget"];
  290. } else {
  291. $1=$2;
  292. };
  293. return $1;
  294. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{},smalltalk.HLDebugger)})},
  295. args: [],
  296. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  297. messageSends: ["ifNil:", "next:", "on:", "model", "codeWidget", "yourself"],
  298. referencedClasses: ["HLStackListWidget"]
  299. }),
  300. smalltalk.HLDebugger);
  301. smalltalk.addMethod(
  302. smalltalk.method({
  303. selector: "unregister",
  304. category: 'actions',
  305. fn: function (){
  306. var self=this;
  307. return smalltalk.withContext(function($ctx1) {
  308. smalltalk.HLDebugger.superclass.fn.prototype._unregister.apply(_st(self), []);
  309. _st(self._inspectorWidget())._unregister();
  310. return self}, function($ctx1) {$ctx1.fill(self,"unregister",{},smalltalk.HLDebugger)})},
  311. args: [],
  312. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  313. messageSends: ["unregister", "inspectorWidget"],
  314. referencedClasses: []
  315. }),
  316. smalltalk.HLDebugger);
  317. smalltalk.addMethod(
  318. smalltalk.method({
  319. selector: "on:",
  320. category: 'instance creation',
  321. fn: function (aMethodContext){
  322. var self=this;
  323. return smalltalk.withContext(function($ctx1) {
  324. var $2,$3,$1;
  325. $2=self._new();
  326. _st($2)._initializeFromMethodContext_(aMethodContext);
  327. $3=_st($2)._yourself();
  328. $1=$3;
  329. return $1;
  330. }, function($ctx1) {$ctx1.fill(self,"on:",{aMethodContext:aMethodContext},smalltalk.HLDebugger.klass)})},
  331. args: ["aMethodContext"],
  332. source: "on: aMethodContext\x0a\x09^ self new\x0a\x09\x09initializeFromMethodContext: aMethodContext;\x0a\x09\x09yourself",
  333. messageSends: ["initializeFromMethodContext:", "new", "yourself"],
  334. referencedClasses: []
  335. }),
  336. smalltalk.HLDebugger.klass);
  337. smalltalk.addMethod(
  338. smalltalk.method({
  339. selector: "tabClass",
  340. category: 'accessing',
  341. fn: function (){
  342. var self=this;
  343. return smalltalk.withContext(function($ctx1) {
  344. return "debugger";
  345. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},smalltalk.HLDebugger.klass)})},
  346. args: [],
  347. source: "tabClass\x0a\x09^ 'debugger'",
  348. messageSends: [],
  349. referencedClasses: []
  350. }),
  351. smalltalk.HLDebugger.klass);
  352. smalltalk.addMethod(
  353. smalltalk.method({
  354. selector: "tabLabel",
  355. category: 'accessing',
  356. fn: function (){
  357. var self=this;
  358. return smalltalk.withContext(function($ctx1) {
  359. return "Debugger";
  360. }, function($ctx1) {$ctx1.fill(self,"tabLabel",{},smalltalk.HLDebugger.klass)})},
  361. args: [],
  362. source: "tabLabel\x0a\x09^ 'Debugger'",
  363. messageSends: [],
  364. referencedClasses: []
  365. }),
  366. smalltalk.HLDebugger.klass);
  367. smalltalk.addClass('HLDebuggerCodeWidget', smalltalk.HLBrowserCodeWidget, [], 'Helios-Debugger');
  368. smalltalk.addMethod(
  369. smalltalk.method({
  370. selector: "addStopAt:",
  371. category: 'actions',
  372. fn: function (anInteger){
  373. var self=this;
  374. return smalltalk.withContext(function($ctx1) {
  375. _st(self["@editor"])._setGutterMarker_gutter_value_(anInteger,"stops",_st(_st("<div class=\x22stop\x22></stop>"._asJQuery())._toArray())._first());
  376. return self}, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger},smalltalk.HLDebuggerCodeWidget)})},
  377. args: ["anInteger"],
  378. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></stop>' asJQuery toArray first",
  379. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"],
  380. referencedClasses: []
  381. }),
  382. smalltalk.HLDebuggerCodeWidget);
  383. smalltalk.addMethod(
  384. smalltalk.method({
  385. selector: "clearHighlight",
  386. category: 'actions',
  387. fn: function (){
  388. var self=this;
  389. return smalltalk.withContext(function($ctx1) {
  390. _st(self._editor())._clearGutter_("stops");
  391. return self}, function($ctx1) {$ctx1.fill(self,"clearHighlight",{},smalltalk.HLDebuggerCodeWidget)})},
  392. args: [],
  393. source: "clearHighlight\x0a\x09self editor clearGutter: 'stops'",
  394. messageSends: ["clearGutter:", "editor"],
  395. referencedClasses: []
  396. }),
  397. smalltalk.HLDebuggerCodeWidget);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "contents:",
  401. category: 'accessing',
  402. fn: function (aString){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. self._clearHighlight();
  406. smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._contents_.apply(_st(self), [aString]);
  407. return self}, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString},smalltalk.HLDebuggerCodeWidget)})},
  408. args: ["aString"],
  409. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  410. messageSends: ["clearHighlight", "contents:"],
  411. referencedClasses: []
  412. }),
  413. smalltalk.HLDebuggerCodeWidget);
  414. smalltalk.addMethod(
  415. smalltalk.method({
  416. selector: "editorOptions",
  417. category: 'accessing',
  418. fn: function (){
  419. var self=this;
  420. return smalltalk.withContext(function($ctx1) {
  421. var $2,$3,$1;
  422. $2=smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._editorOptions.apply(_st(self), []);
  423. _st($2)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  424. $3=_st($2)._yourself();
  425. $1=$3;
  426. return $1;
  427. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{},smalltalk.HLDebuggerCodeWidget)})},
  428. args: [],
  429. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  430. messageSends: ["at:put:", "editorOptions", "yourself"],
  431. referencedClasses: []
  432. }),
  433. smalltalk.HLDebuggerCodeWidget);
  434. smalltalk.addMethod(
  435. smalltalk.method({
  436. selector: "highlight",
  437. category: 'actions',
  438. fn: function (){
  439. var self=this;
  440. return smalltalk.withContext(function($ctx1) {
  441. self._highlightNode_(_st(self._browserModel())._nextNode());
  442. return self}, function($ctx1) {$ctx1.fill(self,"highlight",{},smalltalk.HLDebuggerCodeWidget)})},
  443. args: [],
  444. source: "highlight\x0a\x09self highlightNode: self browserModel nextNode",
  445. messageSends: ["highlightNode:", "nextNode", "browserModel"],
  446. referencedClasses: []
  447. }),
  448. smalltalk.HLDebuggerCodeWidget);
  449. smalltalk.addMethod(
  450. smalltalk.method({
  451. selector: "highlightNode:",
  452. category: 'actions',
  453. fn: function (aNode){
  454. var self=this;
  455. var token;
  456. return smalltalk.withContext(function($ctx1) {
  457. var $1,$2,$3;
  458. $1=aNode;
  459. if(($receiver = $1) == nil || $receiver == null){
  460. $1;
  461. } else {
  462. token=_st(self._editor())._getTokenAt_(smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1))),"ch".__minus_gt(_st(_st(aNode)._position())._y())]));
  463. token;
  464. $2=self;
  465. _st($2)._clearHighlight();
  466. $3=_st($2)._addStopAt_(_st(_st(_st(aNode)._position())._x()).__minus((1)));
  467. $3;
  468. _st(self._editor())._setSelection_to_(smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1))),"ch".__minus_gt(_st(token)._start())]),smalltalk.HashedCollection._from_(["line".__minus_gt(_st(_st(_st(aNode)._position())._x()).__minus((1))),"ch".__minus_gt(_st(token)._end())]));
  469. };
  470. return self}, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token},smalltalk.HLDebuggerCodeWidget)})},
  471. args: ["aNode"],
  472. source: "highlightNode: aNode\x0a\x09| token |\x0a\x09\x0a\x09aNode ifNotNil: [\x0a\x09\x09token := self editor getTokenAt: #{ \x0a\x09\x09\x09'line' -> (aNode position x - 1). \x0a\x09\x09\x09'ch' -> aNode position y \x0a\x09\x09}.\x0a\x0a\x09\x09self\x0a\x09\x09\x09clearHighlight;\x0a\x09\x09\x09addStopAt: aNode position x - 1.\x0a\x0a\x09\x09self editor \x0a\x09\x09\x09setSelection: #{ 'line' -> (aNode position x - 1). 'ch' -> token start }\x0a\x09\x09\x09to: #{ 'line' -> (aNode position x - 1). 'ch' -> token end } ]",
  473. messageSends: ["ifNotNil:", "getTokenAt:", "editor", "->", "-", "x", "position", "y", "clearHighlight", "addStopAt:", "setSelection:to:", "start", "end"],
  474. referencedClasses: []
  475. }),
  476. smalltalk.HLDebuggerCodeWidget);
  477. smalltalk.addMethod(
  478. smalltalk.method({
  479. selector: "observeBrowserModel",
  480. category: 'actions',
  481. fn: function (){
  482. var self=this;
  483. function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  484. function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  485. function $HLDebuggerWhere(){return smalltalk.HLDebuggerWhere||(typeof HLDebuggerWhere=="undefined"?nil:HLDebuggerWhere)}
  486. return smalltalk.withContext(function($ctx1) {
  487. smalltalk.HLDebuggerCodeWidget.superclass.fn.prototype._observeBrowserModel.apply(_st(self), []);
  488. _st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerContextSelected(),"onContextSelected",self);
  489. _st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerStepped(),"onContextSelected",self);
  490. _st(_st(self._browserModel())._announcer())._on_send_to_($HLDebuggerWhere(),"onContextSelected",self);
  491. return self}, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{},smalltalk.HLDebuggerCodeWidget)})},
  492. args: [],
  493. source: "observeBrowserModel\x0a\x09super observeBrowserModel.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self.\x0a\x09\x0a\x09self browserModel announcer \x0a\x09\x09on: HLDebuggerWhere\x0a\x09\x09send: #onContextSelected\x0a\x09\x09to: self",
  494. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"],
  495. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerWhere"]
  496. }),
  497. smalltalk.HLDebuggerCodeWidget);
  498. smalltalk.addMethod(
  499. smalltalk.method({
  500. selector: "onContextSelected",
  501. category: 'reactions',
  502. fn: function (){
  503. var self=this;
  504. return smalltalk.withContext(function($ctx1) {
  505. self._highlight();
  506. return self}, function($ctx1) {$ctx1.fill(self,"onContextSelected",{},smalltalk.HLDebuggerCodeWidget)})},
  507. args: [],
  508. source: "onContextSelected\x0a\x09self highlight",
  509. messageSends: ["highlight"],
  510. referencedClasses: []
  511. }),
  512. smalltalk.HLDebuggerCodeWidget);
  513. smalltalk.addClass('HLDebuggerModel', smalltalk.HLToolModel, ['rootContext', 'currentContext', 'contexts'], 'Helios-Debugger');
  514. 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.";
  515. smalltalk.addMethod(
  516. smalltalk.method({
  517. selector: "contexts",
  518. category: 'accessing',
  519. fn: function (){
  520. var self=this;
  521. return smalltalk.withContext(function($ctx1) {
  522. var $1;
  523. $1=self["@contexts"];
  524. return $1;
  525. }, function($ctx1) {$ctx1.fill(self,"contexts",{},smalltalk.HLDebuggerModel)})},
  526. args: [],
  527. source: "contexts\x0a\x09^ contexts",
  528. messageSends: [],
  529. referencedClasses: []
  530. }),
  531. smalltalk.HLDebuggerModel);
  532. smalltalk.addMethod(
  533. smalltalk.method({
  534. selector: "currentContext",
  535. category: 'accessing',
  536. fn: function (){
  537. var self=this;
  538. return smalltalk.withContext(function($ctx1) {
  539. var $1,$2;
  540. $1=self["@currentContext"];
  541. if(($receiver = $1) == nil || $receiver == null){
  542. self._currentContext_(self._rootContext());
  543. } else {
  544. $1;
  545. };
  546. $2=self["@currentContext"];
  547. return $2;
  548. }, function($ctx1) {$ctx1.fill(self,"currentContext",{},smalltalk.HLDebuggerModel)})},
  549. args: [],
  550. source: "currentContext\x0a\x09currentContext ifNil: [ self currentContext: self rootContext ].\x0a\x09^ currentContext",
  551. messageSends: ["ifNil:", "currentContext:", "rootContext"],
  552. referencedClasses: []
  553. }),
  554. smalltalk.HLDebuggerModel);
  555. smalltalk.addMethod(
  556. smalltalk.method({
  557. selector: "currentContext:",
  558. category: 'accessing',
  559. fn: function (aContext){
  560. var self=this;
  561. function $HLDebuggerContextSelected(){return smalltalk.HLDebuggerContextSelected||(typeof HLDebuggerContextSelected=="undefined"?nil:HLDebuggerContextSelected)}
  562. return smalltalk.withContext(function($ctx1) {
  563. var $1,$2;
  564. self._withChangesDo_((function(){
  565. return smalltalk.withContext(function($ctx2) {
  566. self._selectedMethod_(_st(aContext)._method());
  567. self["@currentContext"]=aContext;
  568. self["@currentContext"];
  569. $1=_st($HLDebuggerContextSelected())._new();
  570. _st($1)._context_(aContext);
  571. $2=_st($1)._yourself();
  572. return _st(self._announcer())._announce_($2);
  573. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  574. return self}, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext},smalltalk.HLDebuggerModel)})},
  575. args: ["aContext"],
  576. source: "currentContext: aContext\x0a\x09self withChangesDo: [ \x0a\x09\x09self selectedMethod: aContext method.\x0a\x09\x09currentContext := aContext.\x0a\x09\x09self announcer announce: (HLDebuggerContextSelected new\x0a\x09\x09\x09context: aContext;\x0a\x09\x09\x09yourself) ]",
  577. messageSends: ["withChangesDo:", "selectedMethod:", "method", "announce:", "announcer", "context:", "new", "yourself"],
  578. referencedClasses: ["HLDebuggerContextSelected"]
  579. }),
  580. smalltalk.HLDebuggerModel);
  581. smalltalk.addMethod(
  582. smalltalk.method({
  583. selector: "initializeContexts",
  584. category: 'initialization',
  585. fn: function (){
  586. var self=this;
  587. var context;
  588. function $OrderedCollection(){return smalltalk.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  589. return smalltalk.withContext(function($ctx1) {
  590. self["@contexts"]=_st($OrderedCollection())._new();
  591. context=self._rootContext();
  592. _st((function(){
  593. return smalltalk.withContext(function($ctx2) {
  594. return _st(context)._notNil();
  595. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._whileTrue_((function(){
  596. return smalltalk.withContext(function($ctx2) {
  597. _st(self["@contexts"])._add_(context);
  598. context=_st(context)._outerContext();
  599. return context;
  600. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  601. return self}, function($ctx1) {$ctx1.fill(self,"initializeContexts",{context:context},smalltalk.HLDebuggerModel)})},
  602. args: [],
  603. 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 ]",
  604. messageSends: ["new", "rootContext", "whileTrue:", "notNil", "add:", "outerContext"],
  605. referencedClasses: ["OrderedCollection"]
  606. }),
  607. smalltalk.HLDebuggerModel);
  608. smalltalk.addMethod(
  609. smalltalk.method({
  610. selector: "initializeFromContext:",
  611. category: 'initialization',
  612. fn: function (aMethodContext){
  613. var self=this;
  614. function $AIContext(){return smalltalk.AIContext||(typeof AIContext=="undefined"?nil:AIContext)}
  615. return smalltalk.withContext(function($ctx1) {
  616. self["@rootContext"]=_st($AIContext())._fromMethodContext_(aMethodContext);
  617. self._initializeContexts();
  618. return self}, function($ctx1) {$ctx1.fill(self,"initializeFromContext:",{aMethodContext:aMethodContext},smalltalk.HLDebuggerModel)})},
  619. args: ["aMethodContext"],
  620. source: "initializeFromContext: aMethodContext\x0a\x09rootContext := AIContext fromMethodContext: aMethodContext.\x0a\x09self initializeContexts",
  621. messageSends: ["fromMethodContext:", "initializeContexts"],
  622. referencedClasses: ["AIContext"]
  623. }),
  624. smalltalk.HLDebuggerModel);
  625. smalltalk.addMethod(
  626. smalltalk.method({
  627. selector: "interpreter",
  628. category: 'accessing',
  629. fn: function (){
  630. var self=this;
  631. return smalltalk.withContext(function($ctx1) {
  632. var $1;
  633. $1=_st(self._currentContext())._interpreter();
  634. return $1;
  635. }, function($ctx1) {$ctx1.fill(self,"interpreter",{},smalltalk.HLDebuggerModel)})},
  636. args: [],
  637. source: "interpreter\x0a\x09^ self currentContext interpreter",
  638. messageSends: ["interpreter", "currentContext"],
  639. referencedClasses: []
  640. }),
  641. smalltalk.HLDebuggerModel);
  642. smalltalk.addMethod(
  643. smalltalk.method({
  644. selector: "nextNode",
  645. category: 'accessing',
  646. fn: function (){
  647. var self=this;
  648. return smalltalk.withContext(function($ctx1) {
  649. var $1;
  650. $1=_st(self._interpreter())._node();
  651. return $1;
  652. }, function($ctx1) {$ctx1.fill(self,"nextNode",{},smalltalk.HLDebuggerModel)})},
  653. args: [],
  654. source: "nextNode\x0a\x09^ self interpreter node",
  655. messageSends: ["node", "interpreter"],
  656. referencedClasses: []
  657. }),
  658. smalltalk.HLDebuggerModel);
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "restart",
  662. category: 'actions',
  663. fn: function (){
  664. var self=this;
  665. function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  666. return smalltalk.withContext(function($ctx1) {
  667. var $1,$2;
  668. _st(self._interpreter())._restart();
  669. $1=_st($HLDebuggerStepped())._new();
  670. _st($1)._context_(self._currentContext());
  671. $2=_st($1)._yourself();
  672. _st(self._announcer())._announce_($2);
  673. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},smalltalk.HLDebuggerModel)})},
  674. args: [],
  675. source: "restart\x0a\x09self interpreter restart.\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  676. messageSends: ["restart", "interpreter", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
  677. referencedClasses: ["HLDebuggerStepped"]
  678. }),
  679. smalltalk.HLDebuggerModel);
  680. smalltalk.addMethod(
  681. smalltalk.method({
  682. selector: "rootContext",
  683. category: 'accessing',
  684. fn: function (){
  685. var self=this;
  686. return smalltalk.withContext(function($ctx1) {
  687. var $1;
  688. $1=self["@rootContext"];
  689. return $1;
  690. }, function($ctx1) {$ctx1.fill(self,"rootContext",{},smalltalk.HLDebuggerModel)})},
  691. args: [],
  692. source: "rootContext\x0a\x09^ rootContext",
  693. messageSends: [],
  694. referencedClasses: []
  695. }),
  696. smalltalk.HLDebuggerModel);
  697. smalltalk.addMethod(
  698. smalltalk.method({
  699. selector: "stepOver",
  700. category: 'actions',
  701. fn: function (){
  702. var self=this;
  703. function $HLDebuggerStepped(){return smalltalk.HLDebuggerStepped||(typeof HLDebuggerStepped=="undefined"?nil:HLDebuggerStepped)}
  704. return smalltalk.withContext(function($ctx1) {
  705. var $1,$2;
  706. _st(self._interpreter())._stepOver();
  707. $1=_st($HLDebuggerStepped())._new();
  708. _st($1)._context_(self._currentContext());
  709. $2=_st($1)._yourself();
  710. _st(self._announcer())._announce_($2);
  711. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},smalltalk.HLDebuggerModel)})},
  712. args: [],
  713. source: "stepOver\x0a\x09self interpreter stepOver.\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  714. messageSends: ["stepOver", "interpreter", "announce:", "announcer", "context:", "new", "currentContext", "yourself"],
  715. referencedClasses: ["HLDebuggerStepped"]
  716. }),
  717. smalltalk.HLDebuggerModel);
  718. smalltalk.addMethod(
  719. smalltalk.method({
  720. selector: "where",
  721. category: 'actions',
  722. fn: function (){
  723. var self=this;
  724. function $HLDebuggerWhere(){return smalltalk.HLDebuggerWhere||(typeof HLDebuggerWhere=="undefined"?nil:HLDebuggerWhere)}
  725. return smalltalk.withContext(function($ctx1) {
  726. _st(self._announcer())._announce_(_st($HLDebuggerWhere())._new());
  727. return self}, function($ctx1) {$ctx1.fill(self,"where",{},smalltalk.HLDebuggerModel)})},
  728. args: [],
  729. source: "where\x0a\x09self announcer announce: HLDebuggerWhere new",
  730. messageSends: ["announce:", "announcer", "new"],
  731. referencedClasses: ["HLDebuggerWhere"]
  732. }),
  733. smalltalk.HLDebuggerModel);
  734. smalltalk.addMethod(
  735. smalltalk.method({
  736. selector: "on:",
  737. category: 'instance creation',
  738. fn: function (aMethodContext){
  739. var self=this;
  740. return smalltalk.withContext(function($ctx1) {
  741. var $2,$3,$1;
  742. $2=self._new();
  743. _st($2)._initializeFromContext_(aMethodContext);
  744. $3=_st($2)._yourself();
  745. $1=$3;
  746. return $1;
  747. }, function($ctx1) {$ctx1.fill(self,"on:",{aMethodContext:aMethodContext},smalltalk.HLDebuggerModel.klass)})},
  748. args: ["aMethodContext"],
  749. source: "on: aMethodContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aMethodContext;\x0a\x09\x09yourself",
  750. messageSends: ["initializeFromContext:", "new", "yourself"],
  751. referencedClasses: []
  752. }),
  753. smalltalk.HLDebuggerModel.klass);
  754. smalltalk.addClass('HLErrorHandler', smalltalk.ErrorHandler, [], 'Helios-Debugger');
  755. smalltalk.addMethod(
  756. smalltalk.method({
  757. selector: "handleError:",
  758. category: 'error handling',
  759. fn: function (anError){
  760. var self=this;
  761. function $HLDebugger(){return smalltalk.HLDebugger||(typeof HLDebugger=="undefined"?nil:HLDebugger)}
  762. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  763. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  764. return smalltalk.withContext(function($ctx1) {
  765. self._onErrorHandled();
  766. _st((function(){
  767. return smalltalk.withContext(function($ctx2) {
  768. return _st(_st($HLDebugger())._on_(_st(anError)._context()))._openAsTab();
  769. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  770. return smalltalk.withContext(function($ctx2) {
  771. return _st(_st($ErrorHandler())._new())._handleError_(error);
  772. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  773. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler)})},
  774. args: ["anError"],
  775. 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 ]",
  776. messageSends: ["onErrorHandled", "on:do:", "openAsTab", "on:", "context", "handleError:", "new"],
  777. referencedClasses: ["HLDebugger", "Error", "ErrorHandler"]
  778. }),
  779. smalltalk.HLErrorHandler);
  780. smalltalk.addMethod(
  781. smalltalk.method({
  782. selector: "onErrorHandled",
  783. category: 'error handling',
  784. fn: function (){
  785. var self=this;
  786. function $HLProgressWidget(){return smalltalk.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  787. return smalltalk.withContext(function($ctx1) {
  788. var $1,$2;
  789. $1=_st($HLProgressWidget())._default();
  790. _st($1)._flush();
  791. $2=_st($1)._remove();
  792. return self}, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{},smalltalk.HLErrorHandler)})},
  793. args: [],
  794. 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",
  795. messageSends: ["flush", "default", "remove"],
  796. referencedClasses: ["HLProgressWidget"]
  797. }),
  798. smalltalk.HLErrorHandler);
  799. smalltalk.addMethod(
  800. smalltalk.method({
  801. selector: "handleError:",
  802. category: 'error handling',
  803. fn: function (anError){
  804. var self=this;
  805. return smalltalk.withContext(function($ctx1) {
  806. var $1;
  807. $1=_st(self._new())._handleError_(anError);
  808. return $1;
  809. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.HLErrorHandler.klass)})},
  810. args: ["anError"],
  811. source: "handleError: anError\x0a\x09^ self new handleError: anError",
  812. messageSends: ["handleError:", "new"],
  813. referencedClasses: []
  814. }),
  815. smalltalk.HLErrorHandler.klass);
  816. smalltalk.addClass('HLStackListWidget', smalltalk.HLToolListWidget, [], 'Helios-Debugger');
  817. smalltalk.addMethod(
  818. smalltalk.method({
  819. selector: "items",
  820. category: 'accessing',
  821. fn: function (){
  822. var self=this;
  823. return smalltalk.withContext(function($ctx1) {
  824. var $2,$1;
  825. $2=self["@items"];
  826. if(($receiver = $2) == nil || $receiver == null){
  827. self["@items"]=_st(self._model())._contexts();
  828. $1=self["@items"];
  829. } else {
  830. $1=$2;
  831. };
  832. return $1;
  833. }, function($ctx1) {$ctx1.fill(self,"items",{},smalltalk.HLStackListWidget)})},
  834. args: [],
  835. source: "items\x0a\x09^ items ifNil: [ items := self model contexts ]",
  836. messageSends: ["ifNil:", "contexts", "model"],
  837. referencedClasses: []
  838. }),
  839. smalltalk.HLStackListWidget);
  840. smalltalk.addMethod(
  841. smalltalk.method({
  842. selector: "label",
  843. category: 'accessing',
  844. fn: function (){
  845. var self=this;
  846. return smalltalk.withContext(function($ctx1) {
  847. return "Call stack";
  848. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.HLStackListWidget)})},
  849. args: [],
  850. source: "label\x0a\x09^ 'Call stack'",
  851. messageSends: [],
  852. referencedClasses: []
  853. }),
  854. smalltalk.HLStackListWidget);
  855. smalltalk.addMethod(
  856. smalltalk.method({
  857. selector: "renderButtonsOn:",
  858. category: 'rendering',
  859. fn: function (html){
  860. var self=this;
  861. return smalltalk.withContext(function($ctx1) {
  862. var $1,$3,$4,$5,$6,$7,$8,$2;
  863. $1=_st(html)._div();
  864. _st($1)._class_("debugger_bar");
  865. $2=_st($1)._with_((function(){
  866. return smalltalk.withContext(function($ctx2) {
  867. $3=_st(html)._button();
  868. _st($3)._class_("btn restart");
  869. _st($3)._with_("Restart");
  870. $4=_st($3)._onClick_((function(){
  871. return smalltalk.withContext(function($ctx3) {
  872. return self._restart();
  873. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  874. $4;
  875. $5=_st(html)._button();
  876. _st($5)._class_("btn where");
  877. _st($5)._with_("Where");
  878. $6=_st($5)._onClick_((function(){
  879. return smalltalk.withContext(function($ctx3) {
  880. return self._where();
  881. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  882. $6;
  883. $7=_st(html)._button();
  884. _st($7)._class_("btn stepOver");
  885. _st($7)._with_("Step over");
  886. $8=_st($7)._onClick_((function(){
  887. return smalltalk.withContext(function($ctx3) {
  888. return self._stepOver();
  889. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  890. return $8;
  891. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  892. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.HLStackListWidget)})},
  893. args: ["html"],
  894. source: "renderButtonsOn: html\x0a\x09html div \x0a\x09\x09class: 'debugger_bar'; \x0a\x09\x09with: [\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn restart';\x0a\x09\x09\x09\x09with: 'Restart';\x0a\x09\x09\x09\x09onClick: [ self restart ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn where';\x0a\x09\x09\x09\x09with: 'Where';\x0a\x09\x09\x09\x09onClick: [ self where ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn stepOver';\x0a\x09\x09\x09\x09with: 'Step over';\x0a\x09\x09\x09\x09onClick: [ self stepOver ] ]",
  895. messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver"],
  896. referencedClasses: []
  897. }),
  898. smalltalk.HLStackListWidget);
  899. smalltalk.addMethod(
  900. smalltalk.method({
  901. selector: "restart",
  902. category: 'actions',
  903. fn: function (){
  904. var self=this;
  905. return smalltalk.withContext(function($ctx1) {
  906. _st(self._model())._restart();
  907. return self}, function($ctx1) {$ctx1.fill(self,"restart",{},smalltalk.HLStackListWidget)})},
  908. args: [],
  909. source: "restart\x0a\x09self model restart",
  910. messageSends: ["restart", "model"],
  911. referencedClasses: []
  912. }),
  913. smalltalk.HLStackListWidget);
  914. smalltalk.addMethod(
  915. smalltalk.method({
  916. selector: "selectItem:",
  917. category: 'actions',
  918. fn: function (aContext){
  919. var self=this;
  920. return smalltalk.withContext(function($ctx1) {
  921. _st(self._model())._currentContext_(aContext);
  922. return self}, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext},smalltalk.HLStackListWidget)})},
  923. args: ["aContext"],
  924. source: "selectItem: aContext\x0a \x09self model currentContext: aContext",
  925. messageSends: ["currentContext:", "model"],
  926. referencedClasses: []
  927. }),
  928. smalltalk.HLStackListWidget);
  929. smalltalk.addMethod(
  930. smalltalk.method({
  931. selector: "stepOver",
  932. category: 'actions',
  933. fn: function (){
  934. var self=this;
  935. return smalltalk.withContext(function($ctx1) {
  936. _st(self._model())._stepOver();
  937. return self}, function($ctx1) {$ctx1.fill(self,"stepOver",{},smalltalk.HLStackListWidget)})},
  938. args: [],
  939. source: "stepOver\x0a\x09self model stepOver",
  940. messageSends: ["stepOver", "model"],
  941. referencedClasses: []
  942. }),
  943. smalltalk.HLStackListWidget);
  944. smalltalk.addMethod(
  945. smalltalk.method({
  946. selector: "where",
  947. category: 'actions',
  948. fn: function (){
  949. var self=this;
  950. return smalltalk.withContext(function($ctx1) {
  951. _st(self._model())._where();
  952. return self}, function($ctx1) {$ctx1.fill(self,"where",{},smalltalk.HLStackListWidget)})},
  953. args: [],
  954. source: "where\x0a\x09self model where",
  955. messageSends: ["where", "model"],
  956. referencedClasses: []
  957. }),
  958. smalltalk.HLStackListWidget);
  959. });