Helios-Debugger.js 76 KB

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