Helios-Debugger.js 74 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141
  1. define(["amber/boot", "require", "amber/core/Kernel-Objects", "helios/Helios-Core", "helios/Helios-Workspace"], function($boot,requirejs){"use strict";
  2. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var $pkg = $core.addPackage("Helios-Debugger");
  4. $pkg.innerEval = function (expr) { return eval(expr); };
  5. $pkg.imports = ["amber/core/Compiler-Interpreter"];
  6. //>>excludeStart("imports", pragmas.excludeImports);
  7. $pkg.isReady = new Promise(function (resolve, reject) { requirejs(["amber/core/Compiler-Interpreter"], function () {resolve();}, reject); });
  8. //>>excludeEnd("imports");
  9. $pkg.transport = {"type":"amd","amdNamespace":"helios"};
  10. $core.addClass("HLContextInspectorDecorator", $globals.Object, ["context"], "Helios-Debugger");
  11. $core.addMethod(
  12. $core.method({
  13. selector: "context",
  14. protocol: "accessing",
  15. //>>excludeStart("ide", pragmas.excludeIdeData);
  16. args: [],
  17. source: "context\x0a\x09^ context",
  18. referencedClasses: [],
  19. //>>excludeEnd("ide");
  20. pragmas: [],
  21. messageSends: []
  22. }, function ($methodClass){ return function (){
  23. var self=this,$self=this;
  24. return $self.context;
  25. }; }),
  26. $globals.HLContextInspectorDecorator);
  27. $core.addMethod(
  28. $core.method({
  29. selector: "evaluate:on:",
  30. protocol: "evaluating",
  31. //>>excludeStart("ide", pragmas.excludeIdeData);
  32. args: ["aString", "anEvaluator"],
  33. source: "evaluate: aString on: anEvaluator\x0a\x09^ self context evaluate: aString on: anEvaluator",
  34. referencedClasses: [],
  35. //>>excludeEnd("ide");
  36. pragmas: [],
  37. messageSends: ["evaluate:on:", "context"]
  38. }, function ($methodClass){ return function (aString,anEvaluator){
  39. var self=this,$self=this;
  40. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  41. return $core.withContext(function($ctx1) {
  42. //>>excludeEnd("ctx");
  43. return $recv($self._context())._evaluate_on_(aString,anEvaluator);
  44. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  45. }, function($ctx1) {$ctx1.fill(self,"evaluate:on:",{aString:aString,anEvaluator:anEvaluator})});
  46. //>>excludeEnd("ctx");
  47. }; }),
  48. $globals.HLContextInspectorDecorator);
  49. $core.addMethod(
  50. $core.method({
  51. selector: "initializeFromContext:",
  52. protocol: "initialization",
  53. //>>excludeStart("ide", pragmas.excludeIdeData);
  54. args: ["aContext"],
  55. source: "initializeFromContext: aContext\x0a\x09context := aContext",
  56. referencedClasses: [],
  57. //>>excludeEnd("ide");
  58. pragmas: [],
  59. messageSends: []
  60. }, function ($methodClass){ return function (aContext){
  61. var self=this,$self=this;
  62. $self.context=aContext;
  63. return self;
  64. }; }),
  65. $globals.HLContextInspectorDecorator);
  66. $core.addMethod(
  67. $core.method({
  68. selector: "inspectOn:",
  69. protocol: "inspecting",
  70. //>>excludeStart("ide", pragmas.excludeIdeData);
  71. args: ["anInspector"],
  72. source: "inspectOn: anInspector\x0a\x09| variables inspectedContext |\x0a\x0a\x09inspectedContext := self context. console log: 'paso por aqui'.\x0a\x09variables := Array streamContents: [ :stream |\x0a\x09\x09stream nextPutAll: inspectedContext locals associations.\x0a\x09\x09\x0a\x09\x09[ inspectedContext notNil and: [ inspectedContext isBlockContext ] ] whileTrue: [\x0a\x09\x09\x09inspectedContext := inspectedContext outerContext.\x0a\x09\x09\x09inspectedContext ifNotNil: [\x0a\x09\x09\x09\x09stream nextPutAll: inspectedContext locals associations ] ] ].\x0a\x09\x0a\x09anInspector\x0a\x09\x09setLabel: 'Context';\x0a\x09\x09setVariables: variables",
  73. referencedClasses: ["Array"],
  74. //>>excludeEnd("ide");
  75. pragmas: [],
  76. messageSends: ["context", "log:", "streamContents:", "nextPutAll:", "associations", "locals", "whileTrue:", "and:", "notNil", "isBlockContext", "outerContext", "ifNotNil:", "setLabel:", "setVariables:"]
  77. }, function ($methodClass){ return function (anInspector){
  78. var self=this,$self=this;
  79. var variables,inspectedContext;
  80. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  81. return $core.withContext(function($ctx1) {
  82. //>>excludeEnd("ctx");
  83. var $1;
  84. inspectedContext=$self._context();
  85. $recv(console)._log_("paso por aqui");
  86. variables=$recv($globals.Array)._streamContents_((function(stream){
  87. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  88. return $core.withContext(function($ctx2) {
  89. //>>excludeEnd("ctx");
  90. [$recv(stream)._nextPutAll_([$recv([$recv(inspectedContext)._locals()
  91. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  92. ,$ctx2.sendIdx["locals"]=1
  93. //>>excludeEnd("ctx");
  94. ][0])._associations()
  95. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  96. ,$ctx2.sendIdx["associations"]=1
  97. //>>excludeEnd("ctx");
  98. ][0])
  99. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  100. ,$ctx2.sendIdx["nextPutAll:"]=1
  101. //>>excludeEnd("ctx");
  102. ][0];
  103. return $recv((function(){
  104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  105. return $core.withContext(function($ctx3) {
  106. //>>excludeEnd("ctx");
  107. if($core.assert($recv(inspectedContext)._notNil())){
  108. return $recv(inspectedContext)._isBlockContext();
  109. } else {
  110. return false;
  111. }
  112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  113. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  114. //>>excludeEnd("ctx");
  115. }))._whileTrue_((function(){
  116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  117. return $core.withContext(function($ctx3) {
  118. //>>excludeEnd("ctx");
  119. inspectedContext=$recv(inspectedContext)._outerContext();
  120. $1=inspectedContext;
  121. if($1 == null || $1.a$nil){
  122. return $1;
  123. } else {
  124. return $recv(stream)._nextPutAll_($recv($recv(inspectedContext)._locals())._associations());
  125. }
  126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  127. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  128. //>>excludeEnd("ctx");
  129. }));
  130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  131. }, function($ctx2) {$ctx2.fillBlock({stream:stream},$ctx1,1)});
  132. //>>excludeEnd("ctx");
  133. }));
  134. $recv(anInspector)._setLabel_("Context");
  135. $recv(anInspector)._setVariables_(variables);
  136. return self;
  137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  138. }, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,inspectedContext:inspectedContext})});
  139. //>>excludeEnd("ctx");
  140. }; }),
  141. $globals.HLContextInspectorDecorator);
  142. $core.addMethod(
  143. $core.method({
  144. selector: "on:",
  145. protocol: "instance creation",
  146. //>>excludeStart("ide", pragmas.excludeIdeData);
  147. args: ["aContext"],
  148. source: "on: aContext\x0a\x09^ self new\x0a\x09\x09initializeFromContext: aContext;\x0a\x09\x09yourself",
  149. referencedClasses: [],
  150. //>>excludeEnd("ide");
  151. pragmas: [],
  152. messageSends: ["initializeFromContext:", "new", "yourself"]
  153. }, function ($methodClass){ return function (aContext){
  154. var self=this,$self=this;
  155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  156. return $core.withContext(function($ctx1) {
  157. //>>excludeEnd("ctx");
  158. var $1;
  159. $1=$self._new();
  160. $recv($1)._initializeFromContext_(aContext);
  161. return $recv($1)._yourself();
  162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  163. }, function($ctx1) {$ctx1.fill(self,"on:",{aContext:aContext})});
  164. //>>excludeEnd("ctx");
  165. }; }),
  166. $globals.HLContextInspectorDecorator.a$cls);
  167. $core.addClass("HLDebugger", $globals.HLFocusableWidget, ["model", "stackListWidget", "codeWidget", "inspectorWidget"], "Helios-Debugger");
  168. //>>excludeStart("ide", pragmas.excludeIdeData);
  169. $globals.HLDebugger.comment="I am the main widget for the Helios debugger.";
  170. //>>excludeEnd("ide");
  171. $core.addMethod(
  172. $core.method({
  173. selector: "codeWidget",
  174. protocol: "widgets",
  175. //>>excludeStart("ide", pragmas.excludeIdeData);
  176. args: [],
  177. source: "codeWidget\x0a\x09^ codeWidget ifNil: [ codeWidget := HLDebuggerCodeWidget new\x0a\x09\x09model: (HLDebuggerCodeModel new\x0a\x09\x09\x09debuggerModel: self model;\x0a\x09\x09\x09yourself);\x0a\x09\x09browserModel: self model;\x0a\x09\x09yourself ]",
  178. referencedClasses: ["HLDebuggerCodeWidget", "HLDebuggerCodeModel"],
  179. //>>excludeEnd("ide");
  180. pragmas: [],
  181. messageSends: ["ifNil:", "model:", "new", "debuggerModel:", "model", "yourself", "browserModel:"]
  182. }, function ($methodClass){ return function (){
  183. var self=this,$self=this;
  184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  185. return $core.withContext(function($ctx1) {
  186. //>>excludeEnd("ctx");
  187. var $1,$2,$3;
  188. $1=$self.codeWidget;
  189. if($1 == null || $1.a$nil){
  190. $2=[$recv($globals.HLDebuggerCodeWidget)._new()
  191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  192. ,$ctx1.sendIdx["new"]=1
  193. //>>excludeEnd("ctx");
  194. ][0];
  195. $3=$recv($globals.HLDebuggerCodeModel)._new();
  196. $recv($3)._debuggerModel_([$self._model()
  197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  198. ,$ctx1.sendIdx["model"]=1
  199. //>>excludeEnd("ctx");
  200. ][0]);
  201. $recv($2)._model_([$recv($3)._yourself()
  202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  203. ,$ctx1.sendIdx["yourself"]=1
  204. //>>excludeEnd("ctx");
  205. ][0]);
  206. $recv($2)._browserModel_($self._model());
  207. $self.codeWidget=$recv($2)._yourself();
  208. return $self.codeWidget;
  209. } else {
  210. return $1;
  211. }
  212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  213. }, function($ctx1) {$ctx1.fill(self,"codeWidget",{})});
  214. //>>excludeEnd("ctx");
  215. }; }),
  216. $globals.HLDebugger);
  217. $core.addMethod(
  218. $core.method({
  219. selector: "cssClass",
  220. protocol: "accessing",
  221. //>>excludeStart("ide", pragmas.excludeIdeData);
  222. args: [],
  223. source: "cssClass\x0a\x09^ super cssClass, ' hl_debugger'",
  224. referencedClasses: [],
  225. //>>excludeEnd("ide");
  226. pragmas: [],
  227. messageSends: [",", "cssClass"]
  228. }, function ($methodClass){ return function (){
  229. var self=this,$self=this;
  230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  231. return $core.withContext(function($ctx1) {
  232. //>>excludeEnd("ctx");
  233. return $recv([(
  234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  235. $ctx1.supercall = true,
  236. //>>excludeEnd("ctx");
  237. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._cssClass.call($self))
  238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  239. ,$ctx1.supercall = false
  240. //>>excludeEnd("ctx");
  241. ][0]).__comma(" hl_debugger");
  242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  243. }, function($ctx1) {$ctx1.fill(self,"cssClass",{})});
  244. //>>excludeEnd("ctx");
  245. }; }),
  246. $globals.HLDebugger);
  247. $core.addMethod(
  248. $core.method({
  249. selector: "focus",
  250. protocol: "actions",
  251. //>>excludeStart("ide", pragmas.excludeIdeData);
  252. args: [],
  253. source: "focus\x0a\x09self stackListWidget focus",
  254. referencedClasses: [],
  255. //>>excludeEnd("ide");
  256. pragmas: [],
  257. messageSends: ["focus", "stackListWidget"]
  258. }, function ($methodClass){ return function (){
  259. var self=this,$self=this;
  260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  261. return $core.withContext(function($ctx1) {
  262. //>>excludeEnd("ctx");
  263. $recv($self._stackListWidget())._focus();
  264. return self;
  265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  266. }, function($ctx1) {$ctx1.fill(self,"focus",{})});
  267. //>>excludeEnd("ctx");
  268. }; }),
  269. $globals.HLDebugger);
  270. $core.addMethod(
  271. $core.method({
  272. selector: "initializeFromError:",
  273. protocol: "initialization",
  274. //>>excludeStart("ide", pragmas.excludeIdeData);
  275. args: ["anError"],
  276. source: "initializeFromError: anError\x0a\x09model := HLDebuggerModel on: anError.\x0a\x09self observeModel",
  277. referencedClasses: ["HLDebuggerModel"],
  278. //>>excludeEnd("ide");
  279. pragmas: [],
  280. messageSends: ["on:", "observeModel"]
  281. }, function ($methodClass){ return function (anError){
  282. var self=this,$self=this;
  283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  284. return $core.withContext(function($ctx1) {
  285. //>>excludeEnd("ctx");
  286. $self.model=$recv($globals.HLDebuggerModel)._on_(anError);
  287. $self._observeModel();
  288. return self;
  289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  290. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError})});
  291. //>>excludeEnd("ctx");
  292. }; }),
  293. $globals.HLDebugger);
  294. $core.addMethod(
  295. $core.method({
  296. selector: "inspectorWidget",
  297. protocol: "widgets",
  298. //>>excludeStart("ide", pragmas.excludeIdeData);
  299. args: [],
  300. source: "inspectorWidget\x0a\x09^ inspectorWidget ifNil: [ \x0a\x09\x09inspectorWidget := HLInspectorWidget new ]",
  301. referencedClasses: ["HLInspectorWidget"],
  302. //>>excludeEnd("ide");
  303. pragmas: [],
  304. messageSends: ["ifNil:", "new"]
  305. }, function ($methodClass){ return function (){
  306. var self=this,$self=this;
  307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  308. return $core.withContext(function($ctx1) {
  309. //>>excludeEnd("ctx");
  310. var $1;
  311. $1=$self.inspectorWidget;
  312. if($1 == null || $1.a$nil){
  313. $self.inspectorWidget=$recv($globals.HLInspectorWidget)._new();
  314. return $self.inspectorWidget;
  315. } else {
  316. return $1;
  317. }
  318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  319. }, function($ctx1) {$ctx1.fill(self,"inspectorWidget",{})});
  320. //>>excludeEnd("ctx");
  321. }; }),
  322. $globals.HLDebugger);
  323. $core.addMethod(
  324. $core.method({
  325. selector: "model",
  326. protocol: "accessing",
  327. //>>excludeStart("ide", pragmas.excludeIdeData);
  328. args: [],
  329. source: "model\x0a\x09^ model ifNil: [ model := HLDebuggerModel new ]",
  330. referencedClasses: ["HLDebuggerModel"],
  331. //>>excludeEnd("ide");
  332. pragmas: [],
  333. messageSends: ["ifNil:", "new"]
  334. }, function ($methodClass){ return function (){
  335. var self=this,$self=this;
  336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  337. return $core.withContext(function($ctx1) {
  338. //>>excludeEnd("ctx");
  339. var $1;
  340. $1=$self.model;
  341. if($1 == null || $1.a$nil){
  342. $self.model=$recv($globals.HLDebuggerModel)._new();
  343. return $self.model;
  344. } else {
  345. return $1;
  346. }
  347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  348. }, function($ctx1) {$ctx1.fill(self,"model",{})});
  349. //>>excludeEnd("ctx");
  350. }; }),
  351. $globals.HLDebugger);
  352. $core.addMethod(
  353. $core.method({
  354. selector: "observeModel",
  355. protocol: "actions",
  356. //>>excludeStart("ide", pragmas.excludeIdeData);
  357. args: [],
  358. source: "observeModel\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerContextSelected\x0a\x09\x09send: #onContextSelected:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self;\x0a\x09\x09\x0a\x09\x09on: HLDebuggerProceeded\x0a\x09\x09send: #onDebuggerProceeded\x0a\x09\x09to: self",
  359. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerProceeded"],
  360. //>>excludeEnd("ide");
  361. pragmas: [],
  362. messageSends: ["on:send:to:", "announcer", "model"]
  363. }, function ($methodClass){ return function (){
  364. var self=this,$self=this;
  365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  366. return $core.withContext(function($ctx1) {
  367. //>>excludeEnd("ctx");
  368. var $1;
  369. $1=$recv($self._model())._announcer();
  370. [$recv($1)._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected:",self)
  371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  372. ,$ctx1.sendIdx["on:send:to:"]=1
  373. //>>excludeEnd("ctx");
  374. ][0];
  375. [$recv($1)._on_send_to_($globals.HLDebuggerStepped,"onDebuggerStepped:",self)
  376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  377. ,$ctx1.sendIdx["on:send:to:"]=2
  378. //>>excludeEnd("ctx");
  379. ][0];
  380. $recv($1)._on_send_to_($globals.HLDebuggerProceeded,"onDebuggerProceeded",self);
  381. return self;
  382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  383. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  384. //>>excludeEnd("ctx");
  385. }; }),
  386. $globals.HLDebugger);
  387. $core.addMethod(
  388. $core.method({
  389. selector: "onContextSelected:",
  390. protocol: "reactions",
  391. //>>excludeStart("ide", pragmas.excludeIdeData);
  392. args: ["anAnnouncement"],
  393. source: "onContextSelected: anAnnouncement\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context)",
  394. referencedClasses: ["HLContextInspectorDecorator"],
  395. //>>excludeEnd("ide");
  396. pragmas: [],
  397. messageSends: ["inspect:", "inspectorWidget", "on:", "context"]
  398. }, function ($methodClass){ return function (anAnnouncement){
  399. var self=this,$self=this;
  400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  401. return $core.withContext(function($ctx1) {
  402. //>>excludeEnd("ctx");
  403. $recv($self._inspectorWidget())._inspect_($recv($globals.HLContextInspectorDecorator)._on_($recv(anAnnouncement)._context()));
  404. return self;
  405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  406. }, function($ctx1) {$ctx1.fill(self,"onContextSelected:",{anAnnouncement:anAnnouncement})});
  407. //>>excludeEnd("ctx");
  408. }; }),
  409. $globals.HLDebugger);
  410. $core.addMethod(
  411. $core.method({
  412. selector: "onDebuggerProceeded",
  413. protocol: "reactions",
  414. //>>excludeStart("ide", pragmas.excludeIdeData);
  415. args: [],
  416. source: "onDebuggerProceeded\x0a\x09self removeTab",
  417. referencedClasses: [],
  418. //>>excludeEnd("ide");
  419. pragmas: [],
  420. messageSends: ["removeTab"]
  421. }, function ($methodClass){ return function (){
  422. var self=this,$self=this;
  423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  424. return $core.withContext(function($ctx1) {
  425. //>>excludeEnd("ctx");
  426. $self._removeTab();
  427. return self;
  428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  429. }, function($ctx1) {$ctx1.fill(self,"onDebuggerProceeded",{})});
  430. //>>excludeEnd("ctx");
  431. }; }),
  432. $globals.HLDebugger);
  433. $core.addMethod(
  434. $core.method({
  435. selector: "onDebuggerStepped:",
  436. protocol: "reactions",
  437. //>>excludeStart("ide", pragmas.excludeIdeData);
  438. args: ["anAnnouncement"],
  439. source: "onDebuggerStepped: anAnnouncement\x0a\x09self model atEnd ifTrue: [ self removeTab ].\x0a\x09\x0a\x09self inspectorWidget inspect: (HLContextInspectorDecorator on: anAnnouncement context).\x0a\x09self stackListWidget refresh",
  440. referencedClasses: ["HLContextInspectorDecorator"],
  441. //>>excludeEnd("ide");
  442. pragmas: [],
  443. messageSends: ["ifTrue:", "atEnd", "model", "removeTab", "inspect:", "inspectorWidget", "on:", "context", "refresh", "stackListWidget"]
  444. }, function ($methodClass){ return function (anAnnouncement){
  445. var self=this,$self=this;
  446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  447. return $core.withContext(function($ctx1) {
  448. //>>excludeEnd("ctx");
  449. if($core.assert($recv($self._model())._atEnd())){
  450. $self._removeTab();
  451. }
  452. $recv($self._inspectorWidget())._inspect_($recv($globals.HLContextInspectorDecorator)._on_($recv(anAnnouncement)._context()));
  453. $recv($self._stackListWidget())._refresh();
  454. return self;
  455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  456. }, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement})});
  457. //>>excludeEnd("ctx");
  458. }; }),
  459. $globals.HLDebugger);
  460. $core.addMethod(
  461. $core.method({
  462. selector: "registerBindingsOn:",
  463. protocol: "keybindings",
  464. //>>excludeStart("ide", pragmas.excludeIdeData);
  465. args: ["aBindingGroup"],
  466. source: "registerBindingsOn: aBindingGroup\x0a\x09HLToolCommand \x0a\x09\x09registerConcreteClassesOn: aBindingGroup \x0a\x09\x09for: self model",
  467. referencedClasses: ["HLToolCommand"],
  468. //>>excludeEnd("ide");
  469. pragmas: [],
  470. messageSends: ["registerConcreteClassesOn:for:", "model"]
  471. }, function ($methodClass){ return function (aBindingGroup){
  472. var self=this,$self=this;
  473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  474. return $core.withContext(function($ctx1) {
  475. //>>excludeEnd("ctx");
  476. $recv($globals.HLToolCommand)._registerConcreteClassesOn_for_(aBindingGroup,$self._model());
  477. return self;
  478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  479. }, function($ctx1) {$ctx1.fill(self,"registerBindingsOn:",{aBindingGroup:aBindingGroup})});
  480. //>>excludeEnd("ctx");
  481. }; }),
  482. $globals.HLDebugger);
  483. $core.addMethod(
  484. $core.method({
  485. selector: "renderContentOn:",
  486. protocol: "rendering",
  487. //>>excludeStart("ide", pragmas.excludeIdeData);
  488. args: ["html"],
  489. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x0a\x09html with: (HLContainer with: (HLVerticalSplitter\x0a\x09\x09with: self codeWidget\x0a\x09\x09with: (HLHorizontalSplitter\x0a\x09\x09\x09with: self stackListWidget\x0a\x09\x09\x09with: self inspectorWidget)))",
  490. referencedClasses: ["HLContainer", "HLVerticalSplitter", "HLHorizontalSplitter"],
  491. //>>excludeEnd("ide");
  492. pragmas: [],
  493. messageSends: ["renderHeadOn:", "with:", "with:with:", "codeWidget", "stackListWidget", "inspectorWidget"]
  494. }, function ($methodClass){ return function (html){
  495. var self=this,$self=this;
  496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  497. return $core.withContext(function($ctx1) {
  498. //>>excludeEnd("ctx");
  499. $self._renderHeadOn_(html);
  500. [$recv(html)._with_($recv($globals.HLContainer)._with_([$recv($globals.HLVerticalSplitter)._with_with_($self._codeWidget(),$recv($globals.HLHorizontalSplitter)._with_with_($self._stackListWidget(),$self._inspectorWidget()))
  501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  502. ,$ctx1.sendIdx["with:with:"]=1
  503. //>>excludeEnd("ctx");
  504. ][0]))
  505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  506. ,$ctx1.sendIdx["with:"]=1
  507. //>>excludeEnd("ctx");
  508. ][0];
  509. return self;
  510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  511. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html})});
  512. //>>excludeEnd("ctx");
  513. }; }),
  514. $globals.HLDebugger);
  515. $core.addMethod(
  516. $core.method({
  517. selector: "renderHeadOn:",
  518. protocol: "rendering",
  519. //>>excludeStart("ide", pragmas.excludeIdeData);
  520. args: ["html"],
  521. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'head'; \x0a\x09\x09with: [ html h2 with: self model error messageText ]",
  522. referencedClasses: [],
  523. //>>excludeEnd("ide");
  524. pragmas: [],
  525. messageSends: ["class:", "div", "with:", "h2", "messageText", "error", "model"]
  526. }, function ($methodClass){ return function (html){
  527. var self=this,$self=this;
  528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  529. return $core.withContext(function($ctx1) {
  530. //>>excludeEnd("ctx");
  531. var $1;
  532. $1=$recv(html)._div();
  533. $recv($1)._class_("head");
  534. [$recv($1)._with_((function(){
  535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  536. return $core.withContext(function($ctx2) {
  537. //>>excludeEnd("ctx");
  538. return $recv($recv(html)._h2())._with_($recv($recv($self._model())._error())._messageText());
  539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  540. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  541. //>>excludeEnd("ctx");
  542. }))
  543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  544. ,$ctx1.sendIdx["with:"]=1
  545. //>>excludeEnd("ctx");
  546. ][0];
  547. return self;
  548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  549. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html})});
  550. //>>excludeEnd("ctx");
  551. }; }),
  552. $globals.HLDebugger);
  553. $core.addMethod(
  554. $core.method({
  555. selector: "stackListWidget",
  556. protocol: "widgets",
  557. //>>excludeStart("ide", pragmas.excludeIdeData);
  558. args: [],
  559. source: "stackListWidget\x0a\x09^ stackListWidget ifNil: [ \x0a\x09\x09stackListWidget := (HLStackListWidget on: self model)\x0a\x09\x09\x09next: self codeWidget;\x0a\x09\x09\x09yourself ]",
  560. referencedClasses: ["HLStackListWidget"],
  561. //>>excludeEnd("ide");
  562. pragmas: [],
  563. messageSends: ["ifNil:", "next:", "on:", "model", "codeWidget", "yourself"]
  564. }, function ($methodClass){ return function (){
  565. var self=this,$self=this;
  566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  567. return $core.withContext(function($ctx1) {
  568. //>>excludeEnd("ctx");
  569. var $1,$2;
  570. $1=$self.stackListWidget;
  571. if($1 == null || $1.a$nil){
  572. $2=$recv($globals.HLStackListWidget)._on_($self._model());
  573. $recv($2)._next_($self._codeWidget());
  574. $self.stackListWidget=$recv($2)._yourself();
  575. return $self.stackListWidget;
  576. } else {
  577. return $1;
  578. }
  579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  580. }, function($ctx1) {$ctx1.fill(self,"stackListWidget",{})});
  581. //>>excludeEnd("ctx");
  582. }; }),
  583. $globals.HLDebugger);
  584. $core.addMethod(
  585. $core.method({
  586. selector: "unregister",
  587. protocol: "actions",
  588. //>>excludeStart("ide", pragmas.excludeIdeData);
  589. args: [],
  590. source: "unregister\x0a\x09super unregister.\x0a\x09self inspectorWidget unregister",
  591. referencedClasses: [],
  592. //>>excludeEnd("ide");
  593. pragmas: [],
  594. messageSends: ["unregister", "inspectorWidget"]
  595. }, function ($methodClass){ return function (){
  596. var self=this,$self=this;
  597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  598. return $core.withContext(function($ctx1) {
  599. //>>excludeEnd("ctx");
  600. [(
  601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  602. $ctx1.supercall = true,
  603. //>>excludeEnd("ctx");
  604. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._unregister.call($self))
  605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  606. ,$ctx1.sendIdx["unregister"]=1,$ctx1.supercall = false
  607. //>>excludeEnd("ctx");
  608. ][0];
  609. $recv($self._inspectorWidget())._unregister();
  610. return self;
  611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  612. }, function($ctx1) {$ctx1.fill(self,"unregister",{})});
  613. //>>excludeEnd("ctx");
  614. }; }),
  615. $globals.HLDebugger);
  616. $core.addMethod(
  617. $core.method({
  618. selector: "on:",
  619. protocol: "instance creation",
  620. //>>excludeStart("ide", pragmas.excludeIdeData);
  621. args: ["anError"],
  622. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  623. referencedClasses: [],
  624. //>>excludeEnd("ide");
  625. pragmas: [],
  626. messageSends: ["initializeFromError:", "new", "yourself"]
  627. }, function ($methodClass){ return function (anError){
  628. var self=this,$self=this;
  629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  630. return $core.withContext(function($ctx1) {
  631. //>>excludeEnd("ctx");
  632. var $1;
  633. $1=$self._new();
  634. $recv($1)._initializeFromError_(anError);
  635. return $recv($1)._yourself();
  636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  637. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError})});
  638. //>>excludeEnd("ctx");
  639. }; }),
  640. $globals.HLDebugger.a$cls);
  641. $core.addMethod(
  642. $core.method({
  643. selector: "tabClass",
  644. protocol: "accessing",
  645. //>>excludeStart("ide", pragmas.excludeIdeData);
  646. args: [],
  647. source: "tabClass\x0a\x09^ 'debugger'",
  648. referencedClasses: [],
  649. //>>excludeEnd("ide");
  650. pragmas: [],
  651. messageSends: []
  652. }, function ($methodClass){ return function (){
  653. var self=this,$self=this;
  654. return "debugger";
  655. }; }),
  656. $globals.HLDebugger.a$cls);
  657. $core.addMethod(
  658. $core.method({
  659. selector: "tabLabel",
  660. protocol: "accessing",
  661. //>>excludeStart("ide", pragmas.excludeIdeData);
  662. args: [],
  663. source: "tabLabel\x0a\x09^ 'Debugger'",
  664. referencedClasses: [],
  665. //>>excludeEnd("ide");
  666. pragmas: [],
  667. messageSends: []
  668. }, function ($methodClass){ return function (){
  669. var self=this,$self=this;
  670. return "Debugger";
  671. }; }),
  672. $globals.HLDebugger.a$cls);
  673. $core.addClass("HLDebuggerCodeModel", $globals.HLCodeModel, ["debuggerModel"], "Helios-Debugger");
  674. $core.addMethod(
  675. $core.method({
  676. selector: "debuggerModel",
  677. protocol: "accessing",
  678. //>>excludeStart("ide", pragmas.excludeIdeData);
  679. args: [],
  680. source: "debuggerModel\x0a\x09^ debuggerModel",
  681. referencedClasses: [],
  682. //>>excludeEnd("ide");
  683. pragmas: [],
  684. messageSends: []
  685. }, function ($methodClass){ return function (){
  686. var self=this,$self=this;
  687. return $self.debuggerModel;
  688. }; }),
  689. $globals.HLDebuggerCodeModel);
  690. $core.addMethod(
  691. $core.method({
  692. selector: "debuggerModel:",
  693. protocol: "accessing",
  694. //>>excludeStart("ide", pragmas.excludeIdeData);
  695. args: ["anObject"],
  696. source: "debuggerModel: anObject\x0a\x09debuggerModel := anObject",
  697. referencedClasses: [],
  698. //>>excludeEnd("ide");
  699. pragmas: [],
  700. messageSends: []
  701. }, function ($methodClass){ return function (anObject){
  702. var self=this,$self=this;
  703. $self.debuggerModel=anObject;
  704. return self;
  705. }; }),
  706. $globals.HLDebuggerCodeModel);
  707. $core.addMethod(
  708. $core.method({
  709. selector: "doIt:",
  710. protocol: "actions",
  711. //>>excludeStart("ide", pragmas.excludeIdeData);
  712. args: ["aString"],
  713. source: "doIt: aString\x0a\x09^ self debuggerModel evaluate: aString",
  714. referencedClasses: [],
  715. //>>excludeEnd("ide");
  716. pragmas: [],
  717. messageSends: ["evaluate:", "debuggerModel"]
  718. }, function ($methodClass){ return function (aString){
  719. var self=this,$self=this;
  720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  721. return $core.withContext(function($ctx1) {
  722. //>>excludeEnd("ctx");
  723. return $recv($self._debuggerModel())._evaluate_(aString);
  724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  725. }, function($ctx1) {$ctx1.fill(self,"doIt:",{aString:aString})});
  726. //>>excludeEnd("ctx");
  727. }; }),
  728. $globals.HLDebuggerCodeModel);
  729. $core.addClass("HLDebuggerCodeWidget", $globals.HLBrowserCodeWidget, [], "Helios-Debugger");
  730. $core.addMethod(
  731. $core.method({
  732. selector: "addStopAt:",
  733. protocol: "actions",
  734. //>>excludeStart("ide", pragmas.excludeIdeData);
  735. args: ["anInteger"],
  736. source: "addStopAt: anInteger\x0a\x09editor\x0a\x09\x09setGutterMarker: anInteger\x0a\x09\x09gutter: 'stops'\x0a\x09\x09value: '<div class=\x22stop\x22></div>' asJQuery toArray first",
  737. referencedClasses: [],
  738. //>>excludeEnd("ide");
  739. pragmas: [],
  740. messageSends: ["setGutterMarker:gutter:value:", "first", "toArray", "asJQuery"]
  741. }, function ($methodClass){ return function (anInteger){
  742. var self=this,$self=this;
  743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  744. return $core.withContext(function($ctx1) {
  745. //>>excludeEnd("ctx");
  746. $recv($self.editor)._setGutterMarker_gutter_value_(anInteger,"stops",$recv($recv("<div class=\x22stop\x22></div>"._asJQuery())._toArray())._first());
  747. return self;
  748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  749. }, function($ctx1) {$ctx1.fill(self,"addStopAt:",{anInteger:anInteger})});
  750. //>>excludeEnd("ctx");
  751. }; }),
  752. $globals.HLDebuggerCodeWidget);
  753. $core.addMethod(
  754. $core.method({
  755. selector: "clearHighlight",
  756. protocol: "actions",
  757. //>>excludeStart("ide", pragmas.excludeIdeData);
  758. args: [],
  759. source: "clearHighlight\x0a\x09self editor clearGutter: 'stops'",
  760. referencedClasses: [],
  761. //>>excludeEnd("ide");
  762. pragmas: [],
  763. messageSends: ["clearGutter:", "editor"]
  764. }, function ($methodClass){ return function (){
  765. var self=this,$self=this;
  766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  767. return $core.withContext(function($ctx1) {
  768. //>>excludeEnd("ctx");
  769. $recv($self._editor())._clearGutter_("stops");
  770. return self;
  771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  772. }, function($ctx1) {$ctx1.fill(self,"clearHighlight",{})});
  773. //>>excludeEnd("ctx");
  774. }; }),
  775. $globals.HLDebuggerCodeWidget);
  776. $core.addMethod(
  777. $core.method({
  778. selector: "contents:",
  779. protocol: "accessing",
  780. //>>excludeStart("ide", pragmas.excludeIdeData);
  781. args: ["aString"],
  782. source: "contents: aString\x0a\x09self clearHighlight.\x0a\x09super contents: aString",
  783. referencedClasses: [],
  784. //>>excludeEnd("ide");
  785. pragmas: [],
  786. messageSends: ["clearHighlight", "contents:"]
  787. }, function ($methodClass){ return function (aString){
  788. var self=this,$self=this;
  789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  790. return $core.withContext(function($ctx1) {
  791. //>>excludeEnd("ctx");
  792. $self._clearHighlight();
  793. [(
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. $ctx1.supercall = true,
  796. //>>excludeEnd("ctx");
  797. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._contents_.call($self,aString))
  798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  799. ,$ctx1.supercall = false
  800. //>>excludeEnd("ctx");
  801. ][0];
  802. return self;
  803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  804. }, function($ctx1) {$ctx1.fill(self,"contents:",{aString:aString})});
  805. //>>excludeEnd("ctx");
  806. }; }),
  807. $globals.HLDebuggerCodeWidget);
  808. $core.addMethod(
  809. $core.method({
  810. selector: "editorOptions",
  811. protocol: "accessing",
  812. //>>excludeStart("ide", pragmas.excludeIdeData);
  813. args: [],
  814. source: "editorOptions\x0a\x09^ super editorOptions\x0a\x09\x09at: 'gutters' put: #('CodeMirror-linenumbers' 'stops');\x0a\x09\x09yourself",
  815. referencedClasses: [],
  816. //>>excludeEnd("ide");
  817. pragmas: [],
  818. messageSends: ["at:put:", "editorOptions", "yourself"]
  819. }, function ($methodClass){ return function (){
  820. var self=this,$self=this;
  821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  822. return $core.withContext(function($ctx1) {
  823. //>>excludeEnd("ctx");
  824. var $1;
  825. $1=[(
  826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  827. $ctx1.supercall = true,
  828. //>>excludeEnd("ctx");
  829. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._editorOptions.call($self))
  830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  831. ,$ctx1.supercall = false
  832. //>>excludeEnd("ctx");
  833. ][0];
  834. $recv($1)._at_put_("gutters",["CodeMirror-linenumbers", "stops"]);
  835. return $recv($1)._yourself();
  836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  837. }, function($ctx1) {$ctx1.fill(self,"editorOptions",{})});
  838. //>>excludeEnd("ctx");
  839. }; }),
  840. $globals.HLDebuggerCodeWidget);
  841. $core.addMethod(
  842. $core.method({
  843. selector: "highlight",
  844. protocol: "actions",
  845. //>>excludeStart("ide", pragmas.excludeIdeData);
  846. args: [],
  847. source: "highlight\x0a\x09self browserModel nextNode ifNotNil: [ :node |\x0a\x09\x09self highlightNode: node ]",
  848. referencedClasses: [],
  849. //>>excludeEnd("ide");
  850. pragmas: [],
  851. messageSends: ["ifNotNil:", "nextNode", "browserModel", "highlightNode:"]
  852. }, function ($methodClass){ return function (){
  853. var self=this,$self=this;
  854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  855. return $core.withContext(function($ctx1) {
  856. //>>excludeEnd("ctx");
  857. var $1;
  858. $1=$recv($self._browserModel())._nextNode();
  859. if($1 == null || $1.a$nil){
  860. $1;
  861. } else {
  862. var node;
  863. node=$1;
  864. $self._highlightNode_(node);
  865. }
  866. return self;
  867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  868. }, function($ctx1) {$ctx1.fill(self,"highlight",{})});
  869. //>>excludeEnd("ctx");
  870. }; }),
  871. $globals.HLDebuggerCodeWidget);
  872. $core.addMethod(
  873. $core.method({
  874. selector: "highlightNode:",
  875. protocol: "actions",
  876. //>>excludeStart("ide", pragmas.excludeIdeData);
  877. args: ["aNode"],
  878. source: "highlightNode: aNode\x0a\x09| token |\x0a\x09\x0a\x09aNode ifNotNil: [\x0a\x09\x09self\x0a\x09\x09\x09clearHighlight;\x0a\x09\x09\x09addStopAt: aNode positionStart x - 1.\x0a\x0a\x09\x09self editor \x0a\x09\x09\x09setSelection: #{ 'line' -> (aNode positionStart x - 1). 'ch' -> (aNode positionStart y - 1) }\x0a\x09\x09\x09to: #{ 'line' -> (aNode positionEnd x - 1). 'ch' -> (aNode positionEnd y) } ]",
  879. referencedClasses: [],
  880. //>>excludeEnd("ide");
  881. pragmas: [],
  882. messageSends: ["ifNotNil:", "clearHighlight", "addStopAt:", "-", "x", "positionStart", "setSelection:to:", "editor", "y", "positionEnd"]
  883. }, function ($methodClass){ return function (aNode){
  884. var self=this,$self=this;
  885. var token;
  886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  887. return $core.withContext(function($ctx1) {
  888. //>>excludeEnd("ctx");
  889. if(aNode == null || aNode.a$nil){
  890. aNode;
  891. } else {
  892. $self._clearHighlight();
  893. $self._addStopAt_([$recv([$recv([$recv(aNode)._positionStart()
  894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  895. ,$ctx1.sendIdx["positionStart"]=1
  896. //>>excludeEnd("ctx");
  897. ][0])._x()
  898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  899. ,$ctx1.sendIdx["x"]=1
  900. //>>excludeEnd("ctx");
  901. ][0]).__minus((1))
  902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  903. ,$ctx1.sendIdx["-"]=1
  904. //>>excludeEnd("ctx");
  905. ][0]);
  906. $recv($self._editor())._setSelection_to_($globals.HashedCollection._newFromPairs_(["line",[$recv([$recv([$recv(aNode)._positionStart()
  907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  908. ,$ctx1.sendIdx["positionStart"]=2
  909. //>>excludeEnd("ctx");
  910. ][0])._x()
  911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  912. ,$ctx1.sendIdx["x"]=2
  913. //>>excludeEnd("ctx");
  914. ][0]).__minus((1))
  915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  916. ,$ctx1.sendIdx["-"]=2
  917. //>>excludeEnd("ctx");
  918. ][0],"ch",[$recv([$recv($recv(aNode)._positionStart())._y()
  919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  920. ,$ctx1.sendIdx["y"]=1
  921. //>>excludeEnd("ctx");
  922. ][0]).__minus((1))
  923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  924. ,$ctx1.sendIdx["-"]=3
  925. //>>excludeEnd("ctx");
  926. ][0]]),$globals.HashedCollection._newFromPairs_(["line",$recv($recv([$recv(aNode)._positionEnd()
  927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  928. ,$ctx1.sendIdx["positionEnd"]=1
  929. //>>excludeEnd("ctx");
  930. ][0])._x()).__minus((1)),"ch",$recv($recv(aNode)._positionEnd())._y()]));
  931. }
  932. return self;
  933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  934. }, function($ctx1) {$ctx1.fill(self,"highlightNode:",{aNode:aNode,token:token})});
  935. //>>excludeEnd("ctx");
  936. }; }),
  937. $globals.HLDebuggerCodeWidget);
  938. $core.addMethod(
  939. $core.method({
  940. selector: "observeBrowserModel",
  941. protocol: "actions",
  942. //>>excludeStart("ide", pragmas.excludeIdeData);
  943. args: [],
  944. 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",
  945. referencedClasses: ["HLDebuggerContextSelected", "HLDebuggerStepped", "HLDebuggerWhere"],
  946. //>>excludeEnd("ide");
  947. pragmas: [],
  948. messageSends: ["observeBrowserModel", "on:send:to:", "announcer", "browserModel"]
  949. }, function ($methodClass){ return function (){
  950. var self=this,$self=this;
  951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  952. return $core.withContext(function($ctx1) {
  953. //>>excludeEnd("ctx");
  954. [(
  955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  956. $ctx1.supercall = true,
  957. //>>excludeEnd("ctx");
  958. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._observeBrowserModel.call($self))
  959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  960. ,$ctx1.supercall = false
  961. //>>excludeEnd("ctx");
  962. ][0];
  963. [$recv([$recv([$self._browserModel()
  964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  965. ,$ctx1.sendIdx["browserModel"]=1
  966. //>>excludeEnd("ctx");
  967. ][0])._announcer()
  968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  969. ,$ctx1.sendIdx["announcer"]=1
  970. //>>excludeEnd("ctx");
  971. ][0])._on_send_to_($globals.HLDebuggerContextSelected,"onContextSelected",self)
  972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  973. ,$ctx1.sendIdx["on:send:to:"]=1
  974. //>>excludeEnd("ctx");
  975. ][0];
  976. [$recv([$recv([$self._browserModel()
  977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  978. ,$ctx1.sendIdx["browserModel"]=2
  979. //>>excludeEnd("ctx");
  980. ][0])._announcer()
  981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  982. ,$ctx1.sendIdx["announcer"]=2
  983. //>>excludeEnd("ctx");
  984. ][0])._on_send_to_($globals.HLDebuggerStepped,"onContextSelected",self)
  985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  986. ,$ctx1.sendIdx["on:send:to:"]=2
  987. //>>excludeEnd("ctx");
  988. ][0];
  989. $recv($recv($self._browserModel())._announcer())._on_send_to_($globals.HLDebuggerWhere,"onContextSelected",self);
  990. return self;
  991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  992. }, function($ctx1) {$ctx1.fill(self,"observeBrowserModel",{})});
  993. //>>excludeEnd("ctx");
  994. }; }),
  995. $globals.HLDebuggerCodeWidget);
  996. $core.addMethod(
  997. $core.method({
  998. selector: "onContextSelected",
  999. protocol: "reactions",
  1000. //>>excludeStart("ide", pragmas.excludeIdeData);
  1001. args: [],
  1002. source: "onContextSelected\x0a\x09self highlight",
  1003. referencedClasses: [],
  1004. //>>excludeEnd("ide");
  1005. pragmas: [],
  1006. messageSends: ["highlight"]
  1007. }, function ($methodClass){ return function (){
  1008. var self=this,$self=this;
  1009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1010. return $core.withContext(function($ctx1) {
  1011. //>>excludeEnd("ctx");
  1012. $self._highlight();
  1013. return self;
  1014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1015. }, function($ctx1) {$ctx1.fill(self,"onContextSelected",{})});
  1016. //>>excludeEnd("ctx");
  1017. }; }),
  1018. $globals.HLDebuggerCodeWidget);
  1019. $core.addMethod(
  1020. $core.method({
  1021. selector: "renderOn:",
  1022. protocol: "rendering",
  1023. //>>excludeStart("ide", pragmas.excludeIdeData);
  1024. args: ["html"],
  1025. source: "renderOn: html\x0a\x09super renderOn: html.\x0a\x09self contents: self browserModel selectedMethod source",
  1026. referencedClasses: [],
  1027. //>>excludeEnd("ide");
  1028. pragmas: [],
  1029. messageSends: ["renderOn:", "contents:", "source", "selectedMethod", "browserModel"]
  1030. }, function ($methodClass){ return function (html){
  1031. var self=this,$self=this;
  1032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1033. return $core.withContext(function($ctx1) {
  1034. //>>excludeEnd("ctx");
  1035. [(
  1036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1037. $ctx1.supercall = true,
  1038. //>>excludeEnd("ctx");
  1039. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._renderOn_.call($self,html))
  1040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1041. ,$ctx1.supercall = false
  1042. //>>excludeEnd("ctx");
  1043. ][0];
  1044. $self._contents_($recv($recv($self._browserModel())._selectedMethod())._source());
  1045. return self;
  1046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1047. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html})});
  1048. //>>excludeEnd("ctx");
  1049. }; }),
  1050. $globals.HLDebuggerCodeWidget);
  1051. $core.addClass("HLDebuggerModel", $globals.HLToolModel, ["rootContext", "debugger", "error"], "Helios-Debugger");
  1052. //>>excludeStart("ide", pragmas.excludeIdeData);
  1053. $globals.HLDebuggerModel.comment="I am a model for debugging Amber code in Helios.\x0a\x0aMy instances hold a reference to an `ASTDebugger` instance, itself referencing the current `context`. The context should be the root of the context stack.";
  1054. //>>excludeEnd("ide");
  1055. $core.addMethod(
  1056. $core.method({
  1057. selector: "atEnd",
  1058. protocol: "testing",
  1059. //>>excludeStart("ide", pragmas.excludeIdeData);
  1060. args: [],
  1061. source: "atEnd\x0a\x09^ self debugger atEnd",
  1062. referencedClasses: [],
  1063. //>>excludeEnd("ide");
  1064. pragmas: [],
  1065. messageSends: ["atEnd", "debugger"]
  1066. }, function ($methodClass){ return function (){
  1067. var self=this,$self=this;
  1068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1069. return $core.withContext(function($ctx1) {
  1070. //>>excludeEnd("ctx");
  1071. return $recv($self._debugger())._atEnd();
  1072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1073. }, function($ctx1) {$ctx1.fill(self,"atEnd",{})});
  1074. //>>excludeEnd("ctx");
  1075. }; }),
  1076. $globals.HLDebuggerModel);
  1077. $core.addMethod(
  1078. $core.method({
  1079. selector: "contexts",
  1080. protocol: "accessing",
  1081. //>>excludeStart("ide", pragmas.excludeIdeData);
  1082. args: [],
  1083. source: "contexts\x0a\x09| contexts context |\x0a\x09\x0a\x09contexts := OrderedCollection new.\x0a\x09context := self rootContext.\x0a\x09\x0a\x09[ context notNil ] whileTrue: [\x0a\x09\x09contexts add: context.\x0a\x09\x09context := context outerContext ].\x0a\x09\x09\x0a\x09^ contexts",
  1084. referencedClasses: ["OrderedCollection"],
  1085. //>>excludeEnd("ide");
  1086. pragmas: [],
  1087. messageSends: ["new", "rootContext", "whileTrue:", "notNil", "add:", "outerContext"]
  1088. }, function ($methodClass){ return function (){
  1089. var self=this,$self=this;
  1090. var contexts,context;
  1091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1092. return $core.withContext(function($ctx1) {
  1093. //>>excludeEnd("ctx");
  1094. contexts=$recv($globals.OrderedCollection)._new();
  1095. context=$self._rootContext();
  1096. $recv((function(){
  1097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1098. return $core.withContext(function($ctx2) {
  1099. //>>excludeEnd("ctx");
  1100. return $recv(context)._notNil();
  1101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1102. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1103. //>>excludeEnd("ctx");
  1104. }))._whileTrue_((function(){
  1105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1106. return $core.withContext(function($ctx2) {
  1107. //>>excludeEnd("ctx");
  1108. $recv(contexts)._add_(context);
  1109. context=$recv(context)._outerContext();
  1110. return context;
  1111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1112. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1113. //>>excludeEnd("ctx");
  1114. }));
  1115. return contexts;
  1116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1117. }, function($ctx1) {$ctx1.fill(self,"contexts",{contexts:contexts,context:context})});
  1118. //>>excludeEnd("ctx");
  1119. }; }),
  1120. $globals.HLDebuggerModel);
  1121. $core.addMethod(
  1122. $core.method({
  1123. selector: "currentContext",
  1124. protocol: "accessing",
  1125. //>>excludeStart("ide", pragmas.excludeIdeData);
  1126. args: [],
  1127. source: "currentContext\x0a\x09^ self debugger context",
  1128. referencedClasses: [],
  1129. //>>excludeEnd("ide");
  1130. pragmas: [],
  1131. messageSends: ["context", "debugger"]
  1132. }, function ($methodClass){ return function (){
  1133. var self=this,$self=this;
  1134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1135. return $core.withContext(function($ctx1) {
  1136. //>>excludeEnd("ctx");
  1137. return $recv($self._debugger())._context();
  1138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1139. }, function($ctx1) {$ctx1.fill(self,"currentContext",{})});
  1140. //>>excludeEnd("ctx");
  1141. }; }),
  1142. $globals.HLDebuggerModel);
  1143. $core.addMethod(
  1144. $core.method({
  1145. selector: "currentContext:",
  1146. protocol: "accessing",
  1147. //>>excludeStart("ide", pragmas.excludeIdeData);
  1148. args: ["aContext"],
  1149. source: "currentContext: aContext\x0a\x09self withChangesDo: [ \x0a\x09\x09self selectedMethod: aContext method.\x0a\x09\x09self debugger context: aContext.\x0a\x09\x09self announcer announce: (HLDebuggerContextSelected new\x0a\x09\x09\x09context: aContext;\x0a\x09\x09\x09yourself) ]",
  1150. referencedClasses: ["HLDebuggerContextSelected"],
  1151. //>>excludeEnd("ide");
  1152. pragmas: [],
  1153. messageSends: ["withChangesDo:", "selectedMethod:", "method", "context:", "debugger", "announce:", "announcer", "new", "yourself"]
  1154. }, function ($methodClass){ return function (aContext){
  1155. var self=this,$self=this;
  1156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1157. return $core.withContext(function($ctx1) {
  1158. //>>excludeEnd("ctx");
  1159. var $1,$2;
  1160. $self._withChangesDo_((function(){
  1161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1162. return $core.withContext(function($ctx2) {
  1163. //>>excludeEnd("ctx");
  1164. $self._selectedMethod_($recv(aContext)._method());
  1165. [$recv($self._debugger())._context_(aContext)
  1166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1167. ,$ctx2.sendIdx["context:"]=1
  1168. //>>excludeEnd("ctx");
  1169. ][0];
  1170. $1=$self._announcer();
  1171. $2=$recv($globals.HLDebuggerContextSelected)._new();
  1172. $recv($2)._context_(aContext);
  1173. return $recv($1)._announce_($recv($2)._yourself());
  1174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1175. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1176. //>>excludeEnd("ctx");
  1177. }));
  1178. return self;
  1179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1180. }, function($ctx1) {$ctx1.fill(self,"currentContext:",{aContext:aContext})});
  1181. //>>excludeEnd("ctx");
  1182. }; }),
  1183. $globals.HLDebuggerModel);
  1184. $core.addMethod(
  1185. $core.method({
  1186. selector: "debugger",
  1187. protocol: "accessing",
  1188. //>>excludeStart("ide", pragmas.excludeIdeData);
  1189. args: [],
  1190. source: "debugger\x0a\x09^ debugger ifNil: [ debugger := ASTDebugger new ]",
  1191. referencedClasses: ["ASTDebugger"],
  1192. //>>excludeEnd("ide");
  1193. pragmas: [],
  1194. messageSends: ["ifNil:", "new"]
  1195. }, function ($methodClass){ return function (){
  1196. var self=this,$self=this;
  1197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1198. return $core.withContext(function($ctx1) {
  1199. //>>excludeEnd("ctx");
  1200. var $1;
  1201. $1=$self.debugger;
  1202. if($1 == null || $1.a$nil){
  1203. $self.debugger=$recv($globals.ASTDebugger)._new();
  1204. return $self.debugger;
  1205. } else {
  1206. return $1;
  1207. }
  1208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1209. }, function($ctx1) {$ctx1.fill(self,"debugger",{})});
  1210. //>>excludeEnd("ctx");
  1211. }; }),
  1212. $globals.HLDebuggerModel);
  1213. $core.addMethod(
  1214. $core.method({
  1215. selector: "error",
  1216. protocol: "accessing",
  1217. //>>excludeStart("ide", pragmas.excludeIdeData);
  1218. args: [],
  1219. source: "error\x0a\x09^ error",
  1220. referencedClasses: [],
  1221. //>>excludeEnd("ide");
  1222. pragmas: [],
  1223. messageSends: []
  1224. }, function ($methodClass){ return function (){
  1225. var self=this,$self=this;
  1226. return $self.error;
  1227. }; }),
  1228. $globals.HLDebuggerModel);
  1229. $core.addMethod(
  1230. $core.method({
  1231. selector: "evaluate:",
  1232. protocol: "evaluating",
  1233. //>>excludeStart("ide", pragmas.excludeIdeData);
  1234. args: ["aString"],
  1235. source: "evaluate: aString\x0a\x09^ self environment \x0a\x09\x09evaluate: aString \x0a\x09\x09for: self currentContext",
  1236. referencedClasses: [],
  1237. //>>excludeEnd("ide");
  1238. pragmas: [],
  1239. messageSends: ["evaluate:for:", "environment", "currentContext"]
  1240. }, function ($methodClass){ return function (aString){
  1241. var self=this,$self=this;
  1242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1243. return $core.withContext(function($ctx1) {
  1244. //>>excludeEnd("ctx");
  1245. return $recv($self._environment())._evaluate_for_(aString,$self._currentContext());
  1246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1247. }, function($ctx1) {$ctx1.fill(self,"evaluate:",{aString:aString})});
  1248. //>>excludeEnd("ctx");
  1249. }; }),
  1250. $globals.HLDebuggerModel);
  1251. $core.addMethod(
  1252. $core.method({
  1253. selector: "flushInnerContexts",
  1254. protocol: "private",
  1255. //>>excludeStart("ide", pragmas.excludeIdeData);
  1256. args: [],
  1257. source: "flushInnerContexts\x0a\x09\x22When stepping, the inner contexts are not relevent anymore,\x0a\x09and can be flushed\x22\x0a\x09\x0a\x09self currentContext innerContext: nil.\x0a\x09rootContext := self currentContext.\x0a\x09self initializeContexts",
  1258. referencedClasses: [],
  1259. //>>excludeEnd("ide");
  1260. pragmas: [],
  1261. messageSends: ["innerContext:", "currentContext", "initializeContexts"]
  1262. }, function ($methodClass){ return function (){
  1263. var self=this,$self=this;
  1264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1265. return $core.withContext(function($ctx1) {
  1266. //>>excludeEnd("ctx");
  1267. $recv([$self._currentContext()
  1268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1269. ,$ctx1.sendIdx["currentContext"]=1
  1270. //>>excludeEnd("ctx");
  1271. ][0])._innerContext_(nil);
  1272. $self.rootContext=$self._currentContext();
  1273. $self._initializeContexts();
  1274. return self;
  1275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1276. }, function($ctx1) {$ctx1.fill(self,"flushInnerContexts",{})});
  1277. //>>excludeEnd("ctx");
  1278. }; }),
  1279. $globals.HLDebuggerModel);
  1280. $core.addMethod(
  1281. $core.method({
  1282. selector: "initializeFromError:",
  1283. protocol: "initialization",
  1284. //>>excludeStart("ide", pragmas.excludeIdeData);
  1285. args: ["anError"],
  1286. source: "initializeFromError: anError\x0a\x09| errorContext |\x0a\x09\x0a\x09error := anError.\x0a\x09errorContext := (AIContext fromMethodContext: error context).\x0a\x09rootContext := error signalerContextFrom: errorContext.\x0a\x09self selectedMethod: rootContext method",
  1287. referencedClasses: ["AIContext"],
  1288. //>>excludeEnd("ide");
  1289. pragmas: [],
  1290. messageSends: ["fromMethodContext:", "context", "signalerContextFrom:", "selectedMethod:", "method"]
  1291. }, function ($methodClass){ return function (anError){
  1292. var self=this,$self=this;
  1293. var errorContext;
  1294. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1295. return $core.withContext(function($ctx1) {
  1296. //>>excludeEnd("ctx");
  1297. $self.error=anError;
  1298. errorContext=$recv($globals.AIContext)._fromMethodContext_($recv($self.error)._context());
  1299. $self.rootContext=$recv($self.error)._signalerContextFrom_(errorContext);
  1300. $self._selectedMethod_($recv($self.rootContext)._method());
  1301. return self;
  1302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1303. }, function($ctx1) {$ctx1.fill(self,"initializeFromError:",{anError:anError,errorContext:errorContext})});
  1304. //>>excludeEnd("ctx");
  1305. }; }),
  1306. $globals.HLDebuggerModel);
  1307. $core.addMethod(
  1308. $core.method({
  1309. selector: "nextNode",
  1310. protocol: "accessing",
  1311. //>>excludeStart("ide", pragmas.excludeIdeData);
  1312. args: [],
  1313. source: "nextNode\x0a\x09^ self debugger node",
  1314. referencedClasses: [],
  1315. //>>excludeEnd("ide");
  1316. pragmas: [],
  1317. messageSends: ["node", "debugger"]
  1318. }, function ($methodClass){ return function (){
  1319. var self=this,$self=this;
  1320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1321. return $core.withContext(function($ctx1) {
  1322. //>>excludeEnd("ctx");
  1323. return $recv($self._debugger())._node();
  1324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1325. }, function($ctx1) {$ctx1.fill(self,"nextNode",{})});
  1326. //>>excludeEnd("ctx");
  1327. }; }),
  1328. $globals.HLDebuggerModel);
  1329. $core.addMethod(
  1330. $core.method({
  1331. selector: "onStep",
  1332. protocol: "reactions",
  1333. //>>excludeStart("ide", pragmas.excludeIdeData);
  1334. args: [],
  1335. source: "onStep\x0a\x09rootContext := self currentContext.\x0a\x09\x0a\x09\x22Force a refresh of the context list and code widget\x22\x0a\x09self selectedMethod: self currentContext method.\x0a\x09self announcer announce: (HLDebuggerContextSelected new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  1336. referencedClasses: ["HLDebuggerContextSelected"],
  1337. //>>excludeEnd("ide");
  1338. pragmas: [],
  1339. messageSends: ["currentContext", "selectedMethod:", "method", "announce:", "announcer", "context:", "new", "yourself"]
  1340. }, function ($methodClass){ return function (){
  1341. var self=this,$self=this;
  1342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1343. return $core.withContext(function($ctx1) {
  1344. //>>excludeEnd("ctx");
  1345. var $1,$2;
  1346. $self.rootContext=[$self._currentContext()
  1347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1348. ,$ctx1.sendIdx["currentContext"]=1
  1349. //>>excludeEnd("ctx");
  1350. ][0];
  1351. $self._selectedMethod_($recv([$self._currentContext()
  1352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1353. ,$ctx1.sendIdx["currentContext"]=2
  1354. //>>excludeEnd("ctx");
  1355. ][0])._method());
  1356. $1=$self._announcer();
  1357. $2=$recv($globals.HLDebuggerContextSelected)._new();
  1358. $recv($2)._context_($self._currentContext());
  1359. $recv($1)._announce_($recv($2)._yourself());
  1360. return self;
  1361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1362. }, function($ctx1) {$ctx1.fill(self,"onStep",{})});
  1363. //>>excludeEnd("ctx");
  1364. }; }),
  1365. $globals.HLDebuggerModel);
  1366. $core.addMethod(
  1367. $core.method({
  1368. selector: "proceed",
  1369. protocol: "actions",
  1370. //>>excludeStart("ide", pragmas.excludeIdeData);
  1371. args: [],
  1372. source: "proceed\x0a\x09self debugger proceed.\x0a\x09\x0a\x09self announcer announce: HLDebuggerProceeded new",
  1373. referencedClasses: ["HLDebuggerProceeded"],
  1374. //>>excludeEnd("ide");
  1375. pragmas: [],
  1376. messageSends: ["proceed", "debugger", "announce:", "announcer", "new"]
  1377. }, function ($methodClass){ return function (){
  1378. var self=this,$self=this;
  1379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1380. return $core.withContext(function($ctx1) {
  1381. //>>excludeEnd("ctx");
  1382. $recv($self._debugger())._proceed();
  1383. $recv($self._announcer())._announce_($recv($globals.HLDebuggerProceeded)._new());
  1384. return self;
  1385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1386. }, function($ctx1) {$ctx1.fill(self,"proceed",{})});
  1387. //>>excludeEnd("ctx");
  1388. }; }),
  1389. $globals.HLDebuggerModel);
  1390. $core.addMethod(
  1391. $core.method({
  1392. selector: "restart",
  1393. protocol: "actions",
  1394. //>>excludeStart("ide", pragmas.excludeIdeData);
  1395. args: [],
  1396. source: "restart\x0a\x09self debugger restart.\x0a\x09self onStep.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  1397. referencedClasses: ["HLDebuggerStepped"],
  1398. //>>excludeEnd("ide");
  1399. pragmas: [],
  1400. messageSends: ["restart", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1401. }, function ($methodClass){ return function (){
  1402. var self=this,$self=this;
  1403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1404. return $core.withContext(function($ctx1) {
  1405. //>>excludeEnd("ctx");
  1406. var $1,$2;
  1407. $recv($self._debugger())._restart();
  1408. $self._onStep();
  1409. $1=$self._announcer();
  1410. $2=$recv($globals.HLDebuggerStepped)._new();
  1411. $recv($2)._context_($self._currentContext());
  1412. $recv($1)._announce_($recv($2)._yourself());
  1413. return self;
  1414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1415. }, function($ctx1) {$ctx1.fill(self,"restart",{})});
  1416. //>>excludeEnd("ctx");
  1417. }; }),
  1418. $globals.HLDebuggerModel);
  1419. $core.addMethod(
  1420. $core.method({
  1421. selector: "rootContext",
  1422. protocol: "accessing",
  1423. //>>excludeStart("ide", pragmas.excludeIdeData);
  1424. args: [],
  1425. source: "rootContext\x0a\x09^ rootContext",
  1426. referencedClasses: [],
  1427. //>>excludeEnd("ide");
  1428. pragmas: [],
  1429. messageSends: []
  1430. }, function ($methodClass){ return function (){
  1431. var self=this,$self=this;
  1432. return $self.rootContext;
  1433. }; }),
  1434. $globals.HLDebuggerModel);
  1435. $core.addMethod(
  1436. $core.method({
  1437. selector: "stepOver",
  1438. protocol: "actions",
  1439. //>>excludeStart("ide", pragmas.excludeIdeData);
  1440. args: [],
  1441. source: "stepOver\x0a\x09self debugger stepOver.\x0a\x09self onStep.\x0a\x09\x0a\x09self announcer announce: (HLDebuggerStepped new\x0a\x09\x09context: self currentContext;\x0a\x09\x09yourself)",
  1442. referencedClasses: ["HLDebuggerStepped"],
  1443. //>>excludeEnd("ide");
  1444. pragmas: [],
  1445. messageSends: ["stepOver", "debugger", "onStep", "announce:", "announcer", "context:", "new", "currentContext", "yourself"]
  1446. }, function ($methodClass){ return function (){
  1447. var self=this,$self=this;
  1448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1449. return $core.withContext(function($ctx1) {
  1450. //>>excludeEnd("ctx");
  1451. var $1,$2;
  1452. $recv($self._debugger())._stepOver();
  1453. $self._onStep();
  1454. $1=$self._announcer();
  1455. $2=$recv($globals.HLDebuggerStepped)._new();
  1456. $recv($2)._context_($self._currentContext());
  1457. $recv($1)._announce_($recv($2)._yourself());
  1458. return self;
  1459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1460. }, function($ctx1) {$ctx1.fill(self,"stepOver",{})});
  1461. //>>excludeEnd("ctx");
  1462. }; }),
  1463. $globals.HLDebuggerModel);
  1464. $core.addMethod(
  1465. $core.method({
  1466. selector: "where",
  1467. protocol: "actions",
  1468. //>>excludeStart("ide", pragmas.excludeIdeData);
  1469. args: [],
  1470. source: "where\x0a\x09self announcer announce: HLDebuggerWhere new",
  1471. referencedClasses: ["HLDebuggerWhere"],
  1472. //>>excludeEnd("ide");
  1473. pragmas: [],
  1474. messageSends: ["announce:", "announcer", "new"]
  1475. }, function ($methodClass){ return function (){
  1476. var self=this,$self=this;
  1477. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1478. return $core.withContext(function($ctx1) {
  1479. //>>excludeEnd("ctx");
  1480. $recv($self._announcer())._announce_($recv($globals.HLDebuggerWhere)._new());
  1481. return self;
  1482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1483. }, function($ctx1) {$ctx1.fill(self,"where",{})});
  1484. //>>excludeEnd("ctx");
  1485. }; }),
  1486. $globals.HLDebuggerModel);
  1487. $core.addMethod(
  1488. $core.method({
  1489. selector: "on:",
  1490. protocol: "instance creation",
  1491. //>>excludeStart("ide", pragmas.excludeIdeData);
  1492. args: ["anError"],
  1493. source: "on: anError\x0a\x09^ self new\x0a\x09\x09initializeFromError: anError;\x0a\x09\x09yourself",
  1494. referencedClasses: [],
  1495. //>>excludeEnd("ide");
  1496. pragmas: [],
  1497. messageSends: ["initializeFromError:", "new", "yourself"]
  1498. }, function ($methodClass){ return function (anError){
  1499. var self=this,$self=this;
  1500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1501. return $core.withContext(function($ctx1) {
  1502. //>>excludeEnd("ctx");
  1503. var $1;
  1504. $1=$self._new();
  1505. $recv($1)._initializeFromError_(anError);
  1506. return $recv($1)._yourself();
  1507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1508. }, function($ctx1) {$ctx1.fill(self,"on:",{anError:anError})});
  1509. //>>excludeEnd("ctx");
  1510. }; }),
  1511. $globals.HLDebuggerModel.a$cls);
  1512. $core.addClass("HLErrorHandler", $globals.Object, ["confirms"], "Helios-Debugger");
  1513. $core.addMethod(
  1514. $core.method({
  1515. selector: "confirmDebugError:",
  1516. protocol: "error handling",
  1517. //>>excludeStart("ide", pragmas.excludeIdeData);
  1518. args: ["anError"],
  1519. source: "confirmDebugError: anError\x0a\x09confirms ifFalse: [\x0a\x09\x09confirms := true.\x0a\x09\x09HLConfirmationWidget new\x0a\x09\x09\x09confirmationString: anError messageText;\x0a\x09\x09\x09cancelBlock: [ confirms := false ];\x0a\x09\x09\x09actionBlock: [ confirms := false. self debugError: anError ];\x0a\x09\x09\x09cancelButtonLabel: 'Abandon';\x0a\x09\x09\x09confirmButtonLabel: 'Debug';\x0a\x09\x09\x09show ]",
  1520. referencedClasses: ["HLConfirmationWidget"],
  1521. //>>excludeEnd("ide");
  1522. pragmas: [],
  1523. messageSends: ["ifFalse:", "confirmationString:", "new", "messageText", "cancelBlock:", "actionBlock:", "debugError:", "cancelButtonLabel:", "confirmButtonLabel:", "show"]
  1524. }, function ($methodClass){ return function (anError){
  1525. var self=this,$self=this;
  1526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1527. return $core.withContext(function($ctx1) {
  1528. //>>excludeEnd("ctx");
  1529. var $1;
  1530. if(!$core.assert($self.confirms)){
  1531. $self.confirms=true;
  1532. $1=$recv($globals.HLConfirmationWidget)._new();
  1533. $recv($1)._confirmationString_($recv(anError)._messageText());
  1534. $recv($1)._cancelBlock_((function(){
  1535. $self.confirms=false;
  1536. return $self.confirms;
  1537. }));
  1538. $recv($1)._actionBlock_((function(){
  1539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1540. return $core.withContext(function($ctx2) {
  1541. //>>excludeEnd("ctx");
  1542. $self.confirms=false;
  1543. return $self._debugError_(anError);
  1544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1545. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1546. //>>excludeEnd("ctx");
  1547. }));
  1548. $recv($1)._cancelButtonLabel_("Abandon");
  1549. $recv($1)._confirmButtonLabel_("Debug");
  1550. $recv($1)._show();
  1551. }
  1552. return self;
  1553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1554. }, function($ctx1) {$ctx1.fill(self,"confirmDebugError:",{anError:anError})});
  1555. //>>excludeEnd("ctx");
  1556. }; }),
  1557. $globals.HLErrorHandler);
  1558. $core.addMethod(
  1559. $core.method({
  1560. selector: "debugError:",
  1561. protocol: "error handling",
  1562. //>>excludeStart("ide", pragmas.excludeIdeData);
  1563. args: ["anError"],
  1564. source: "debugError: anError\x0a\x0a\x09[\x0a\x09\x09anError context ifNil: [ anError context: thisContext ].\x0a\x09\x09(HLDebugger on: anError) openAsTab ]\x0a\x09on: Error do: [ :error | ConsoleErrorHandler new handleError: error ]",
  1565. referencedClasses: ["HLDebugger", "Error", "ConsoleErrorHandler"],
  1566. //>>excludeEnd("ide");
  1567. pragmas: [],
  1568. messageSends: ["on:do:", "ifNil:", "context", "context:", "openAsTab", "on:", "handleError:", "new"]
  1569. }, function ($methodClass){ return function (anError){
  1570. var self=this,$self=this;
  1571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1572. return $core.withContext(function($ctx1) {
  1573. //>>excludeEnd("ctx");
  1574. var $1;
  1575. $recv((function(){
  1576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1577. return $core.withContext(function($ctx2) {
  1578. //>>excludeEnd("ctx");
  1579. $1=$recv(anError)._context();
  1580. if($1 == null || $1.a$nil){
  1581. $recv(anError)._context_($core.getThisContext());
  1582. } else {
  1583. $1;
  1584. }
  1585. return $recv($recv($globals.HLDebugger)._on_(anError))._openAsTab();
  1586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1587. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1588. //>>excludeEnd("ctx");
  1589. }))._on_do_($globals.Error,(function(error){
  1590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1591. return $core.withContext(function($ctx2) {
  1592. //>>excludeEnd("ctx");
  1593. return $recv($recv($globals.ConsoleErrorHandler)._new())._handleError_(error);
  1594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1595. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,3)});
  1596. //>>excludeEnd("ctx");
  1597. }));
  1598. return self;
  1599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1600. }, function($ctx1) {$ctx1.fill(self,"debugError:",{anError:anError})});
  1601. //>>excludeEnd("ctx");
  1602. }; }),
  1603. $globals.HLErrorHandler);
  1604. $core.addMethod(
  1605. $core.method({
  1606. selector: "handleError:",
  1607. protocol: "error handling",
  1608. //>>excludeStart("ide", pragmas.excludeIdeData);
  1609. args: ["anError"],
  1610. source: "handleError: anError\x0a\x09self confirmDebugError: anError",
  1611. referencedClasses: [],
  1612. //>>excludeEnd("ide");
  1613. pragmas: [],
  1614. messageSends: ["confirmDebugError:"]
  1615. }, function ($methodClass){ return function (anError){
  1616. var self=this,$self=this;
  1617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1618. return $core.withContext(function($ctx1) {
  1619. //>>excludeEnd("ctx");
  1620. $self._confirmDebugError_(anError);
  1621. return self;
  1622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1623. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError})});
  1624. //>>excludeEnd("ctx");
  1625. }; }),
  1626. $globals.HLErrorHandler);
  1627. $core.addMethod(
  1628. $core.method({
  1629. selector: "initialize",
  1630. protocol: "error handling",
  1631. //>>excludeStart("ide", pragmas.excludeIdeData);
  1632. args: [],
  1633. source: "initialize\x0a\x09confirms := false",
  1634. referencedClasses: [],
  1635. //>>excludeEnd("ide");
  1636. pragmas: [],
  1637. messageSends: []
  1638. }, function ($methodClass){ return function (){
  1639. var self=this,$self=this;
  1640. $self.confirms=false;
  1641. return self;
  1642. }; }),
  1643. $globals.HLErrorHandler);
  1644. $core.addMethod(
  1645. $core.method({
  1646. selector: "onErrorHandled",
  1647. protocol: "error handling",
  1648. //>>excludeStart("ide", pragmas.excludeIdeData);
  1649. args: [],
  1650. 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",
  1651. referencedClasses: ["HLProgressWidget"],
  1652. //>>excludeEnd("ide");
  1653. pragmas: [],
  1654. messageSends: ["flush", "default", "remove"]
  1655. }, function ($methodClass){ return function (){
  1656. var self=this,$self=this;
  1657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1658. return $core.withContext(function($ctx1) {
  1659. //>>excludeEnd("ctx");
  1660. var $1;
  1661. $1=$recv($globals.HLProgressWidget)._default();
  1662. $recv($1)._flush();
  1663. $recv($1)._remove();
  1664. return self;
  1665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1666. }, function($ctx1) {$ctx1.fill(self,"onErrorHandled",{})});
  1667. //>>excludeEnd("ctx");
  1668. }; }),
  1669. $globals.HLErrorHandler);
  1670. $core.addClass("HLStackListWidget", $globals.HLToolListWidget, [], "Helios-Debugger");
  1671. $core.addMethod(
  1672. $core.method({
  1673. selector: "items",
  1674. protocol: "accessing",
  1675. //>>excludeStart("ide", pragmas.excludeIdeData);
  1676. args: [],
  1677. source: "items\x0a\x09^ self model contexts",
  1678. referencedClasses: [],
  1679. //>>excludeEnd("ide");
  1680. pragmas: [],
  1681. messageSends: ["contexts", "model"]
  1682. }, function ($methodClass){ return function (){
  1683. var self=this,$self=this;
  1684. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1685. return $core.withContext(function($ctx1) {
  1686. //>>excludeEnd("ctx");
  1687. return $recv($self._model())._contexts();
  1688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1689. }, function($ctx1) {$ctx1.fill(self,"items",{})});
  1690. //>>excludeEnd("ctx");
  1691. }; }),
  1692. $globals.HLStackListWidget);
  1693. $core.addMethod(
  1694. $core.method({
  1695. selector: "label",
  1696. protocol: "accessing",
  1697. //>>excludeStart("ide", pragmas.excludeIdeData);
  1698. args: [],
  1699. source: "label\x0a\x09^ 'Call stack'",
  1700. referencedClasses: [],
  1701. //>>excludeEnd("ide");
  1702. pragmas: [],
  1703. messageSends: []
  1704. }, function ($methodClass){ return function (){
  1705. var self=this,$self=this;
  1706. return "Call stack";
  1707. }; }),
  1708. $globals.HLStackListWidget);
  1709. $core.addMethod(
  1710. $core.method({
  1711. selector: "observeModel",
  1712. protocol: "actions",
  1713. //>>excludeStart("ide", pragmas.excludeIdeData);
  1714. args: [],
  1715. source: "observeModel\x0a\x09super observeModel.\x0a\x09\x0a\x09self model announcer \x0a\x09\x09on: HLDebuggerStepped\x0a\x09\x09send: #onDebuggerStepped:\x0a\x09\x09to: self",
  1716. referencedClasses: ["HLDebuggerStepped"],
  1717. //>>excludeEnd("ide");
  1718. pragmas: [],
  1719. messageSends: ["observeModel", "on:send:to:", "announcer", "model"]
  1720. }, function ($methodClass){ return function (){
  1721. var self=this,$self=this;
  1722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1723. return $core.withContext(function($ctx1) {
  1724. //>>excludeEnd("ctx");
  1725. [(
  1726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1727. $ctx1.supercall = true,
  1728. //>>excludeEnd("ctx");
  1729. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._observeModel.call($self))
  1730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1731. ,$ctx1.supercall = false
  1732. //>>excludeEnd("ctx");
  1733. ][0];
  1734. $recv($recv($self._model())._announcer())._on_send_to_($globals.HLDebuggerStepped,"onDebuggerStepped:",self);
  1735. return self;
  1736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1737. }, function($ctx1) {$ctx1.fill(self,"observeModel",{})});
  1738. //>>excludeEnd("ctx");
  1739. }; }),
  1740. $globals.HLStackListWidget);
  1741. $core.addMethod(
  1742. $core.method({
  1743. selector: "onDebuggerStepped:",
  1744. protocol: "reactions",
  1745. //>>excludeStart("ide", pragmas.excludeIdeData);
  1746. args: ["anAnnouncement"],
  1747. source: "onDebuggerStepped: anAnnouncement\x0a\x09items := nil.\x0a\x09self refresh",
  1748. referencedClasses: [],
  1749. //>>excludeEnd("ide");
  1750. pragmas: [],
  1751. messageSends: ["refresh"]
  1752. }, function ($methodClass){ return function (anAnnouncement){
  1753. var self=this,$self=this;
  1754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1755. return $core.withContext(function($ctx1) {
  1756. //>>excludeEnd("ctx");
  1757. $self.items=nil;
  1758. $self._refresh();
  1759. return self;
  1760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1761. }, function($ctx1) {$ctx1.fill(self,"onDebuggerStepped:",{anAnnouncement:anAnnouncement})});
  1762. //>>excludeEnd("ctx");
  1763. }; }),
  1764. $globals.HLStackListWidget);
  1765. $core.addMethod(
  1766. $core.method({
  1767. selector: "proceed",
  1768. protocol: "actions",
  1769. //>>excludeStart("ide", pragmas.excludeIdeData);
  1770. args: [],
  1771. source: "proceed\x0a\x09self model proceed",
  1772. referencedClasses: [],
  1773. //>>excludeEnd("ide");
  1774. pragmas: [],
  1775. messageSends: ["proceed", "model"]
  1776. }, function ($methodClass){ return function (){
  1777. var self=this,$self=this;
  1778. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1779. return $core.withContext(function($ctx1) {
  1780. //>>excludeEnd("ctx");
  1781. $recv($self._model())._proceed();
  1782. return self;
  1783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1784. }, function($ctx1) {$ctx1.fill(self,"proceed",{})});
  1785. //>>excludeEnd("ctx");
  1786. }; }),
  1787. $globals.HLStackListWidget);
  1788. $core.addMethod(
  1789. $core.method({
  1790. selector: "renderButtonsOn:",
  1791. protocol: "rendering",
  1792. //>>excludeStart("ide", pragmas.excludeIdeData);
  1793. args: ["html"],
  1794. 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 btn-default 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 btn-default 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 btn-default stepOver';\x0a\x09\x09\x09\x09with: 'Step over';\x0a\x09\x09\x09\x09onClick: [ self stepOver ].\x0a\x09\x09\x09html button \x0a\x09\x09\x09\x09class: 'btn btn-default proceed';\x0a\x09\x09\x09\x09with: 'Proceed';\x0a\x09\x09\x09\x09onClick: [ self proceed ] ]",
  1795. referencedClasses: [],
  1796. //>>excludeEnd("ide");
  1797. pragmas: [],
  1798. messageSends: ["class:", "div", "with:", "button", "onClick:", "restart", "where", "stepOver", "proceed"]
  1799. }, function ($methodClass){ return function (html){
  1800. var self=this,$self=this;
  1801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1802. return $core.withContext(function($ctx1) {
  1803. //>>excludeEnd("ctx");
  1804. var $1,$2,$3,$4,$5;
  1805. $1=$recv(html)._div();
  1806. [$recv($1)._class_("debugger_bar")
  1807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1808. ,$ctx1.sendIdx["class:"]=1
  1809. //>>excludeEnd("ctx");
  1810. ][0];
  1811. [$recv($1)._with_((function(){
  1812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1813. return $core.withContext(function($ctx2) {
  1814. //>>excludeEnd("ctx");
  1815. $2=[$recv(html)._button()
  1816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1817. ,$ctx2.sendIdx["button"]=1
  1818. //>>excludeEnd("ctx");
  1819. ][0];
  1820. [$recv($2)._class_("btn btn-default restart")
  1821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1822. ,$ctx2.sendIdx["class:"]=2
  1823. //>>excludeEnd("ctx");
  1824. ][0];
  1825. [$recv($2)._with_("Restart")
  1826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1827. ,$ctx2.sendIdx["with:"]=2
  1828. //>>excludeEnd("ctx");
  1829. ][0];
  1830. [$recv($2)._onClick_((function(){
  1831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1832. return $core.withContext(function($ctx3) {
  1833. //>>excludeEnd("ctx");
  1834. return $self._restart();
  1835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1836. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1837. //>>excludeEnd("ctx");
  1838. }))
  1839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1840. ,$ctx2.sendIdx["onClick:"]=1
  1841. //>>excludeEnd("ctx");
  1842. ][0];
  1843. $3=[$recv(html)._button()
  1844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1845. ,$ctx2.sendIdx["button"]=2
  1846. //>>excludeEnd("ctx");
  1847. ][0];
  1848. [$recv($3)._class_("btn btn-default where")
  1849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1850. ,$ctx2.sendIdx["class:"]=3
  1851. //>>excludeEnd("ctx");
  1852. ][0];
  1853. [$recv($3)._with_("Where")
  1854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1855. ,$ctx2.sendIdx["with:"]=3
  1856. //>>excludeEnd("ctx");
  1857. ][0];
  1858. [$recv($3)._onClick_((function(){
  1859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1860. return $core.withContext(function($ctx3) {
  1861. //>>excludeEnd("ctx");
  1862. return $self._where();
  1863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1864. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1865. //>>excludeEnd("ctx");
  1866. }))
  1867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1868. ,$ctx2.sendIdx["onClick:"]=2
  1869. //>>excludeEnd("ctx");
  1870. ][0];
  1871. $4=[$recv(html)._button()
  1872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1873. ,$ctx2.sendIdx["button"]=3
  1874. //>>excludeEnd("ctx");
  1875. ][0];
  1876. [$recv($4)._class_("btn btn-default stepOver")
  1877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1878. ,$ctx2.sendIdx["class:"]=4
  1879. //>>excludeEnd("ctx");
  1880. ][0];
  1881. [$recv($4)._with_("Step over")
  1882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1883. ,$ctx2.sendIdx["with:"]=4
  1884. //>>excludeEnd("ctx");
  1885. ][0];
  1886. [$recv($4)._onClick_((function(){
  1887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1888. return $core.withContext(function($ctx3) {
  1889. //>>excludeEnd("ctx");
  1890. return $self._stepOver();
  1891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1892. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1893. //>>excludeEnd("ctx");
  1894. }))
  1895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1896. ,$ctx2.sendIdx["onClick:"]=3
  1897. //>>excludeEnd("ctx");
  1898. ][0];
  1899. $5=$recv(html)._button();
  1900. $recv($5)._class_("btn btn-default proceed");
  1901. $recv($5)._with_("Proceed");
  1902. return $recv($5)._onClick_((function(){
  1903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1904. return $core.withContext(function($ctx3) {
  1905. //>>excludeEnd("ctx");
  1906. return $self._proceed();
  1907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1908. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  1909. //>>excludeEnd("ctx");
  1910. }));
  1911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1912. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1913. //>>excludeEnd("ctx");
  1914. }))
  1915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1916. ,$ctx1.sendIdx["with:"]=1
  1917. //>>excludeEnd("ctx");
  1918. ][0];
  1919. return self;
  1920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1921. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html})});
  1922. //>>excludeEnd("ctx");
  1923. }; }),
  1924. $globals.HLStackListWidget);
  1925. $core.addMethod(
  1926. $core.method({
  1927. selector: "restart",
  1928. protocol: "actions",
  1929. //>>excludeStart("ide", pragmas.excludeIdeData);
  1930. args: [],
  1931. source: "restart\x0a\x09self model restart",
  1932. referencedClasses: [],
  1933. //>>excludeEnd("ide");
  1934. pragmas: [],
  1935. messageSends: ["restart", "model"]
  1936. }, function ($methodClass){ return function (){
  1937. var self=this,$self=this;
  1938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1939. return $core.withContext(function($ctx1) {
  1940. //>>excludeEnd("ctx");
  1941. $recv($self._model())._restart();
  1942. return self;
  1943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1944. }, function($ctx1) {$ctx1.fill(self,"restart",{})});
  1945. //>>excludeEnd("ctx");
  1946. }; }),
  1947. $globals.HLStackListWidget);
  1948. $core.addMethod(
  1949. $core.method({
  1950. selector: "selectItem:",
  1951. protocol: "actions",
  1952. //>>excludeStart("ide", pragmas.excludeIdeData);
  1953. args: ["aContext"],
  1954. source: "selectItem: aContext\x0a \x09self model currentContext: aContext.\x0a\x09super selectItem: aContext",
  1955. referencedClasses: [],
  1956. //>>excludeEnd("ide");
  1957. pragmas: [],
  1958. messageSends: ["currentContext:", "model", "selectItem:"]
  1959. }, function ($methodClass){ return function (aContext){
  1960. var self=this,$self=this;
  1961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1962. return $core.withContext(function($ctx1) {
  1963. //>>excludeEnd("ctx");
  1964. $recv($self._model())._currentContext_(aContext);
  1965. [(
  1966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1967. $ctx1.supercall = true,
  1968. //>>excludeEnd("ctx");
  1969. ($methodClass.superclass||$boot.nilAsClass).fn.prototype._selectItem_.call($self,aContext))
  1970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1971. ,$ctx1.supercall = false
  1972. //>>excludeEnd("ctx");
  1973. ][0];
  1974. return self;
  1975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1976. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aContext:aContext})});
  1977. //>>excludeEnd("ctx");
  1978. }; }),
  1979. $globals.HLStackListWidget);
  1980. $core.addMethod(
  1981. $core.method({
  1982. selector: "selectedItem",
  1983. protocol: "actions",
  1984. //>>excludeStart("ide", pragmas.excludeIdeData);
  1985. args: [],
  1986. source: "selectedItem\x0a \x09^ self model currentContext",
  1987. referencedClasses: [],
  1988. //>>excludeEnd("ide");
  1989. pragmas: [],
  1990. messageSends: ["currentContext", "model"]
  1991. }, function ($methodClass){ return function (){
  1992. var self=this,$self=this;
  1993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1994. return $core.withContext(function($ctx1) {
  1995. //>>excludeEnd("ctx");
  1996. return $recv($self._model())._currentContext();
  1997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1998. }, function($ctx1) {$ctx1.fill(self,"selectedItem",{})});
  1999. //>>excludeEnd("ctx");
  2000. }; }),
  2001. $globals.HLStackListWidget);
  2002. $core.addMethod(
  2003. $core.method({
  2004. selector: "stepOver",
  2005. protocol: "actions",
  2006. //>>excludeStart("ide", pragmas.excludeIdeData);
  2007. args: [],
  2008. source: "stepOver\x0a\x09self model stepOver",
  2009. referencedClasses: [],
  2010. //>>excludeEnd("ide");
  2011. pragmas: [],
  2012. messageSends: ["stepOver", "model"]
  2013. }, function ($methodClass){ return function (){
  2014. var self=this,$self=this;
  2015. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2016. return $core.withContext(function($ctx1) {
  2017. //>>excludeEnd("ctx");
  2018. $recv($self._model())._stepOver();
  2019. return self;
  2020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2021. }, function($ctx1) {$ctx1.fill(self,"stepOver",{})});
  2022. //>>excludeEnd("ctx");
  2023. }; }),
  2024. $globals.HLStackListWidget);
  2025. $core.addMethod(
  2026. $core.method({
  2027. selector: "where",
  2028. protocol: "actions",
  2029. //>>excludeStart("ide", pragmas.excludeIdeData);
  2030. args: [],
  2031. source: "where\x0a\x09self model where",
  2032. referencedClasses: [],
  2033. //>>excludeEnd("ide");
  2034. pragmas: [],
  2035. messageSends: ["where", "model"]
  2036. }, function ($methodClass){ return function (){
  2037. var self=this,$self=this;
  2038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2039. return $core.withContext(function($ctx1) {
  2040. //>>excludeEnd("ctx");
  2041. $recv($self._model())._where();
  2042. return self;
  2043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2044. }, function($ctx1) {$ctx1.fill(self,"where",{})});
  2045. //>>excludeEnd("ctx");
  2046. }; }),
  2047. $globals.HLStackListWidget);
  2048. });