IDE.deploy.js 157 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217
  1. smalltalk.addPackage('IDE', {});
  2. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  3. smalltalk.addMethod(
  4. "_browser",
  5. smalltalk.method({
  6. selector: "browser",
  7. fn: function (){
  8. var self=this;
  9. return smalltalk.withContext(function($ctx1) { return self["@browser"];
  10. }, self, "browser", [], smalltalk.ClassesList)}
  11. }),
  12. smalltalk.ClassesList);
  13. smalltalk.addMethod(
  14. "_browser_",
  15. smalltalk.method({
  16. selector: "browser:",
  17. fn: function (aBrowser){
  18. var self=this;
  19. return smalltalk.withContext(function($ctx1) { self["@browser"]=aBrowser;
  20. return self}, self, "browser:", [aBrowser], smalltalk.ClassesList)}
  21. }),
  22. smalltalk.ClassesList);
  23. smalltalk.addMethod(
  24. "_category",
  25. smalltalk.method({
  26. selector: "category",
  27. fn: function (){
  28. var self=this;
  29. return smalltalk.withContext(function($ctx1) { var $1;
  30. $1=_st(_st(self)._browser())._selectedPackage();
  31. return $1;
  32. }, self, "category", [], smalltalk.ClassesList)}
  33. }),
  34. smalltalk.ClassesList);
  35. smalltalk.addMethod(
  36. "_getNodes",
  37. smalltalk.method({
  38. selector: "getNodes",
  39. fn: function (){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) { var $1,$2;
  42. $ctx1.classes=nil;
  43. $ctx1.children=nil;
  44. $ctx1.others=nil;
  45. $ctx1.locals.classes=_st(_st(self)._browser())._classes();
  46. $ctx1.locals.children=[];
  47. $ctx1.locals.others=[];
  48. _st($ctx1.locals.classes)._do_((function(each){
  49. return smalltalk.withContext(function($ctx2) { $1=_st($ctx1.locals.classes)._includes_(_st(each)._superclass());
  50. if(smalltalk.assert($1)){
  51. return _st($ctx1.locals.others)._add_(each);
  52. } else {
  53. return _st($ctx1.locals.children)._add_(each);
  54. };
  55. })}));
  56. $2=_st($ctx1.locals.children)._collect_((function(each){
  57. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.ClassesListNode || ClassesListNode))._on_browser_classes_level_(each,_st(self)._browser(),$ctx1.locals.others,(0));
  58. })}));
  59. return $2;
  60. }, self, "getNodes", [], smalltalk.ClassesList)}
  61. }),
  62. smalltalk.ClassesList);
  63. smalltalk.addMethod(
  64. "_nodes",
  65. smalltalk.method({
  66. selector: "nodes",
  67. fn: function (){
  68. var self=this;
  69. return smalltalk.withContext(function($ctx1) { if(($receiver = self["@nodes"]) == nil || $receiver == undefined){
  70. self["@nodes"]=_st(self)._getNodes();
  71. self["@nodes"];
  72. } else {
  73. self["@nodes"];
  74. };
  75. return self["@nodes"];
  76. }, self, "nodes", [], smalltalk.ClassesList)}
  77. }),
  78. smalltalk.ClassesList);
  79. smalltalk.addMethod(
  80. "_renderOn_",
  81. smalltalk.method({
  82. selector: "renderOn:",
  83. fn: function (html){
  84. var self=this;
  85. return smalltalk.withContext(function($ctx1) { var $1,$2;
  86. $1=_st(html)._ul();
  87. _st($1)._class_("amber_column browser classes");
  88. $2=_st($1)._yourself();
  89. self["@ul"]=$2;
  90. _st(self)._updateNodes();
  91. return self}, self, "renderOn:", [html], smalltalk.ClassesList)}
  92. }),
  93. smalltalk.ClassesList);
  94. smalltalk.addMethod(
  95. "_resetNodes",
  96. smalltalk.method({
  97. selector: "resetNodes",
  98. fn: function (){
  99. var self=this;
  100. return smalltalk.withContext(function($ctx1) { self["@nodes"]=nil;
  101. return self}, self, "resetNodes", [], smalltalk.ClassesList)}
  102. }),
  103. smalltalk.ClassesList);
  104. smalltalk.addMethod(
  105. "_updateNodes",
  106. smalltalk.method({
  107. selector: "updateNodes",
  108. fn: function (){
  109. var self=this;
  110. return smalltalk.withContext(function($ctx1) { _st(self["@ul"])._contents_((function(html){
  111. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._nodes())._do_((function(each){
  112. return smalltalk.withContext(function($ctx3) { return _st(each)._renderOn_(html);
  113. })}));
  114. })}));
  115. return self}, self, "updateNodes", [], smalltalk.ClassesList)}
  116. }),
  117. smalltalk.ClassesList);
  118. smalltalk.addMethod(
  119. "_on_",
  120. smalltalk.method({
  121. selector: "on:",
  122. fn: function (aBrowser){
  123. var self=this;
  124. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  125. $2=_st(self)._new();
  126. _st($2)._browser_(aBrowser);
  127. $3=_st($2)._yourself();
  128. $1=$3;
  129. return $1;
  130. }, self, "on:", [aBrowser], smalltalk.ClassesList.klass)}
  131. }),
  132. smalltalk.ClassesList.klass);
  133. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  134. smalltalk.addMethod(
  135. "_browser",
  136. smalltalk.method({
  137. selector: "browser",
  138. fn: function (){
  139. var self=this;
  140. return smalltalk.withContext(function($ctx1) { return self["@browser"];
  141. }, self, "browser", [], smalltalk.ClassesListNode)}
  142. }),
  143. smalltalk.ClassesListNode);
  144. smalltalk.addMethod(
  145. "_browser_",
  146. smalltalk.method({
  147. selector: "browser:",
  148. fn: function (aBrowser){
  149. var self=this;
  150. return smalltalk.withContext(function($ctx1) { self["@browser"]=aBrowser;
  151. return self}, self, "browser:", [aBrowser], smalltalk.ClassesListNode)}
  152. }),
  153. smalltalk.ClassesListNode);
  154. smalltalk.addMethod(
  155. "_getNodesFrom_",
  156. smalltalk.method({
  157. selector: "getNodesFrom:",
  158. fn: function (aCollection){
  159. var self=this;
  160. return smalltalk.withContext(function($ctx1) { var $1;
  161. $ctx1.children=nil;
  162. $ctx1.others=nil;
  163. $ctx1.locals.children=[];
  164. $ctx1.locals.others=[];
  165. _st(aCollection)._do_((function(each){
  166. return smalltalk.withContext(function($ctx2) { $1=_st(_st(each)._superclass()).__eq(_st(self)._theClass());
  167. if(smalltalk.assert($1)){
  168. return _st($ctx1.locals.children)._add_(each);
  169. } else {
  170. return _st($ctx1.locals.others)._add_(each);
  171. };
  172. })}));
  173. self["@nodes"]=_st($ctx1.locals.children)._collect_((function(each){
  174. return smalltalk.withContext(function($ctx2) { return _st((smalltalk.ClassesListNode || ClassesListNode))._on_browser_classes_level_(each,_st(self)._browser(),$ctx1.locals.others,_st(_st(self)._level()).__plus((1)));
  175. })}));
  176. return self}, self, "getNodesFrom:", [aCollection], smalltalk.ClassesListNode)}
  177. }),
  178. smalltalk.ClassesListNode);
  179. smalltalk.addMethod(
  180. "_label",
  181. smalltalk.method({
  182. selector: "label",
  183. fn: function (){
  184. var self=this;
  185. return smalltalk.withContext(function($ctx1) { var $1;
  186. $ctx1.str=nil;
  187. $ctx1.locals.str=_st(_st((smalltalk.String || String))._new())._writeStream();
  188. _st(_st(self)._level())._timesRepeat_((function(){
  189. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.str)._nextPutAll_("    ");
  190. })}));
  191. _st($ctx1.locals.str)._nextPutAll_(_st(_st(self)._theClass())._name());
  192. $1=_st($ctx1.locals.str)._contents();
  193. return $1;
  194. }, self, "label", [], smalltalk.ClassesListNode)}
  195. }),
  196. smalltalk.ClassesListNode);
  197. smalltalk.addMethod(
  198. "_level",
  199. smalltalk.method({
  200. selector: "level",
  201. fn: function (){
  202. var self=this;
  203. return smalltalk.withContext(function($ctx1) { return self["@level"];
  204. }, self, "level", [], smalltalk.ClassesListNode)}
  205. }),
  206. smalltalk.ClassesListNode);
  207. smalltalk.addMethod(
  208. "_level_",
  209. smalltalk.method({
  210. selector: "level:",
  211. fn: function (anInteger){
  212. var self=this;
  213. return smalltalk.withContext(function($ctx1) { self["@level"]=anInteger;
  214. return self}, self, "level:", [anInteger], smalltalk.ClassesListNode)}
  215. }),
  216. smalltalk.ClassesListNode);
  217. smalltalk.addMethod(
  218. "_nodes",
  219. smalltalk.method({
  220. selector: "nodes",
  221. fn: function (){
  222. var self=this;
  223. return smalltalk.withContext(function($ctx1) { return self["@nodes"];
  224. }, self, "nodes", [], smalltalk.ClassesListNode)}
  225. }),
  226. smalltalk.ClassesListNode);
  227. smalltalk.addMethod(
  228. "_renderOn_",
  229. smalltalk.method({
  230. selector: "renderOn:",
  231. fn: function (html){
  232. var self=this;
  233. return smalltalk.withContext(function($ctx1) { var $1,$2;
  234. $ctx1.li=nil;
  235. $ctx1.cssClass=nil;
  236. $ctx1.locals.cssClass="";
  237. $ctx1.locals.li=_st(_st(html)._li())._onClick_((function(){
  238. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._browser())._selectClass_(_st(self)._theClass());
  239. })}));
  240. _st(_st($ctx1.locals.li)._asJQuery())._html_(_st(self)._label());
  241. $1=_st(_st(_st(self)._browser())._selectedClass()).__eq(_st(self)._theClass());
  242. if(smalltalk.assert($1)){
  243. $ctx1.locals.cssClass=_st($ctx1.locals.cssClass).__comma(" selected");
  244. $ctx1.locals.cssClass;
  245. };
  246. $2=_st(_st(_st(self)._theClass())._comment())._isEmpty();
  247. if(! smalltalk.assert($2)){
  248. $ctx1.locals.cssClass=_st($ctx1.locals.cssClass).__comma(" commented");
  249. $ctx1.locals.cssClass;
  250. };
  251. _st($ctx1.locals.li)._class_($ctx1.locals.cssClass);
  252. _st(_st(self)._nodes())._do_((function(each){
  253. return smalltalk.withContext(function($ctx2) { return _st(each)._renderOn_(html);
  254. })}));
  255. return self}, self, "renderOn:", [html], smalltalk.ClassesListNode)}
  256. }),
  257. smalltalk.ClassesListNode);
  258. smalltalk.addMethod(
  259. "_theClass",
  260. smalltalk.method({
  261. selector: "theClass",
  262. fn: function (){
  263. var self=this;
  264. return smalltalk.withContext(function($ctx1) { return self["@theClass"];
  265. }, self, "theClass", [], smalltalk.ClassesListNode)}
  266. }),
  267. smalltalk.ClassesListNode);
  268. smalltalk.addMethod(
  269. "_theClass_",
  270. smalltalk.method({
  271. selector: "theClass:",
  272. fn: function (aClass){
  273. var self=this;
  274. return smalltalk.withContext(function($ctx1) { self["@theClass"]=aClass;
  275. return self}, self, "theClass:", [aClass], smalltalk.ClassesListNode)}
  276. }),
  277. smalltalk.ClassesListNode);
  278. smalltalk.addMethod(
  279. "_on_browser_classes_level_",
  280. smalltalk.method({
  281. selector: "on:browser:classes:level:",
  282. fn: function (aClass,aBrowser,aCollection,anInteger){
  283. var self=this;
  284. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  285. $2=_st(self)._new();
  286. _st($2)._theClass_(aClass);
  287. _st($2)._browser_(aBrowser);
  288. _st($2)._level_(anInteger);
  289. _st($2)._getNodesFrom_(aCollection);
  290. $3=_st($2)._yourself();
  291. $1=$3;
  292. return $1;
  293. }, self, "on:browser:classes:level:", [aClass,aBrowser,aCollection,anInteger], smalltalk.ClassesListNode.klass)}
  294. }),
  295. smalltalk.ClassesListNode.klass);
  296. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  297. smalltalk.addMethod(
  298. "_handleError_",
  299. smalltalk.method({
  300. selector: "handleError:",
  301. fn: function (anError){
  302. var self=this;
  303. return smalltalk.withContext(function($ctx1) { var $1,$2;
  304. _st((function(){
  305. return smalltalk.withContext(function($ctx2) { $1=_st((smalltalk.Debugger || Debugger))._new();
  306. _st($1)._error_(anError);
  307. $2=_st($1)._open();
  308. return $2;
  309. })}))._on_do_((smalltalk.Error || Error),(function(error){
  310. return smalltalk.withContext(function($ctx2) { return _st(_st((smalltalk.ErrorHandler || ErrorHandler))._new())._handleError_(error);
  311. })}));
  312. return self}, self, "handleError:", [anError], smalltalk.DebugErrorHandler)}
  313. }),
  314. smalltalk.DebugErrorHandler);
  315. smalltalk.addMethod(
  316. "_initialize",
  317. smalltalk.method({
  318. selector: "initialize",
  319. fn: function (){
  320. var self=this;
  321. return smalltalk.withContext(function($ctx1) { _st(self)._register();
  322. return self}, self, "initialize", [], smalltalk.DebugErrorHandler.klass)}
  323. }),
  324. smalltalk.DebugErrorHandler.klass);
  325. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  326. smalltalk.addMethod(
  327. "_clear",
  328. smalltalk.method({
  329. selector: "clear",
  330. fn: function (){
  331. var self=this;
  332. return smalltalk.withContext(function($ctx1) { _st(self)._val_("");
  333. return self}, self, "clear", [], smalltalk.SourceArea)}
  334. }),
  335. smalltalk.SourceArea);
  336. smalltalk.addMethod(
  337. "_currentLine",
  338. smalltalk.method({
  339. selector: "currentLine",
  340. fn: function (){
  341. var self=this;
  342. return smalltalk.withContext(function($ctx1) { var $1;
  343. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  344. return $1;
  345. }, self, "currentLine", [], smalltalk.SourceArea)}
  346. }),
  347. smalltalk.SourceArea);
  348. smalltalk.addMethod(
  349. "_currentLineOrSelection",
  350. smalltalk.method({
  351. selector: "currentLineOrSelection",
  352. fn: function (){
  353. var self=this;
  354. return smalltalk.withContext(function($ctx1) { var $2,$1;
  355. $2=_st(self["@editor"])._somethingSelected();
  356. if(smalltalk.assert($2)){
  357. $1=_st(self)._selection();
  358. } else {
  359. $1=_st(self)._currentLine();
  360. };
  361. return $1;
  362. }, self, "currentLineOrSelection", [], smalltalk.SourceArea)}
  363. }),
  364. smalltalk.SourceArea);
  365. smalltalk.addMethod(
  366. "_doIt",
  367. smalltalk.method({
  368. selector: "doIt",
  369. fn: function (){
  370. var self=this;
  371. return smalltalk.withContext(function($ctx1) { var $1;
  372. $ctx1.result=nil;
  373. $ctx1.locals.result=_st(self)._eval_(_st(self)._currentLineOrSelection());
  374. $1=_st(self)._onDoIt();
  375. if(($receiver = $1) == nil || $receiver == undefined){
  376. $1;
  377. } else {
  378. _st(_st(self)._onDoIt())._value();
  379. };
  380. return $ctx1.locals.result;
  381. }, self, "doIt", [], smalltalk.SourceArea)}
  382. }),
  383. smalltalk.SourceArea);
  384. smalltalk.addMethod(
  385. "_editor",
  386. smalltalk.method({
  387. selector: "editor",
  388. fn: function (){
  389. var self=this;
  390. return smalltalk.withContext(function($ctx1) { return self["@editor"];
  391. }, self, "editor", [], smalltalk.SourceArea)}
  392. }),
  393. smalltalk.SourceArea);
  394. smalltalk.addMethod(
  395. "_eval_",
  396. smalltalk.method({
  397. selector: "eval:",
  398. fn: function (aString){
  399. var self=this;
  400. return smalltalk.withContext(function($ctx1) { var $1,$2;
  401. var $early={};
  402. try {
  403. $ctx1.compiler=nil;
  404. $ctx1.locals.compiler=_st((smalltalk.Compiler || Compiler))._new();
  405. _st((function(){
  406. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.compiler)._parseExpression_(aString);
  407. })}))._on_do_((smalltalk.Error || Error),(function(ex){
  408. return smalltalk.withContext(function($ctx2) { $1=_st(window)._alert_(_st(ex)._messageText());
  409. throw $early=[$1];
  410. })}));
  411. $2=_st(_st(_st($ctx1.locals.compiler)._eval_(_st($ctx1.locals.compiler)._compile_forClass_(_st(_st("doIt ^[").__comma(aString)).__comma("] value"),(smalltalk.DoIt || DoIt))))._fn())._applyTo_arguments_(_st(self)._receiver(),[]);
  412. return $2;
  413. }
  414. catch(e) {if(e===$early)return e[0]; throw e}
  415. }, self, "eval:", [aString], smalltalk.SourceArea)}
  416. }),
  417. smalltalk.SourceArea);
  418. smalltalk.addMethod(
  419. "_fileIn",
  420. smalltalk.method({
  421. selector: "fileIn",
  422. fn: function (){
  423. var self=this;
  424. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.Importer || Importer))._new())._import_(_st(_st(self)._currentLineOrSelection())._readStream());
  425. return self}, self, "fileIn", [], smalltalk.SourceArea)}
  426. }),
  427. smalltalk.SourceArea);
  428. smalltalk.addMethod(
  429. "_focus",
  430. smalltalk.method({
  431. selector: "focus",
  432. fn: function (){
  433. var self=this;
  434. return smalltalk.withContext(function($ctx1) { _st(_st(self)._editor())._focus();
  435. return self}, self, "focus", [], smalltalk.SourceArea)}
  436. }),
  437. smalltalk.SourceArea);
  438. smalltalk.addMethod(
  439. "_handleKeyDown_",
  440. smalltalk.method({
  441. selector: "handleKeyDown:",
  442. fn: function (anEvent){
  443. var self=this;
  444. return smalltalk.withContext(function($ctx1) { if(anEvent.ctrlKey) {
  445. if(anEvent.keyCode === 80) { //ctrl+p
  446. self._printIt();
  447. anEvent.preventDefault();
  448. return false;
  449. }
  450. if(anEvent.keyCode === 68) { //ctrl+d
  451. self._doIt();
  452. anEvent.preventDefault();
  453. return false;
  454. }
  455. if(anEvent.keyCode === 73) { //ctrl+i
  456. self._inspectIt();
  457. anEvent.preventDefault();
  458. return false;
  459. }
  460. };
  461. ;
  462. return self}, self, "handleKeyDown:", [anEvent], smalltalk.SourceArea)}
  463. }),
  464. smalltalk.SourceArea);
  465. smalltalk.addMethod(
  466. "_inspectIt",
  467. smalltalk.method({
  468. selector: "inspectIt",
  469. fn: function (){
  470. var self=this;
  471. return smalltalk.withContext(function($ctx1) { _st(_st(self)._doIt())._inspect();
  472. return self}, self, "inspectIt", [], smalltalk.SourceArea)}
  473. }),
  474. smalltalk.SourceArea);
  475. smalltalk.addMethod(
  476. "_onDoIt",
  477. smalltalk.method({
  478. selector: "onDoIt",
  479. fn: function (){
  480. var self=this;
  481. return smalltalk.withContext(function($ctx1) { return self["@onDoIt"];
  482. }, self, "onDoIt", [], smalltalk.SourceArea)}
  483. }),
  484. smalltalk.SourceArea);
  485. smalltalk.addMethod(
  486. "_onDoIt_",
  487. smalltalk.method({
  488. selector: "onDoIt:",
  489. fn: function (aBlock){
  490. var self=this;
  491. return smalltalk.withContext(function($ctx1) { self["@onDoIt"]=aBlock;
  492. return self}, self, "onDoIt:", [aBlock], smalltalk.SourceArea)}
  493. }),
  494. smalltalk.SourceArea);
  495. smalltalk.addMethod(
  496. "_onKeyDown_",
  497. smalltalk.method({
  498. selector: "onKeyDown:",
  499. fn: function (aBlock){
  500. var self=this;
  501. return smalltalk.withContext(function($ctx1) { _st(self["@div"])._onKeyDown_(aBlock);
  502. return self}, self, "onKeyDown:", [aBlock], smalltalk.SourceArea)}
  503. }),
  504. smalltalk.SourceArea);
  505. smalltalk.addMethod(
  506. "_onKeyUp_",
  507. smalltalk.method({
  508. selector: "onKeyUp:",
  509. fn: function (aBlock){
  510. var self=this;
  511. return smalltalk.withContext(function($ctx1) { _st(self["@div"])._onKeyUp_(aBlock);
  512. return self}, self, "onKeyUp:", [aBlock], smalltalk.SourceArea)}
  513. }),
  514. smalltalk.SourceArea);
  515. smalltalk.addMethod(
  516. "_print_",
  517. smalltalk.method({
  518. selector: "print:",
  519. fn: function (aString){
  520. var self=this;
  521. return smalltalk.withContext(function($ctx1) { $ctx1.start=nil;
  522. $ctx1.stop=nil;
  523. $ctx1.currentLine=nil;
  524. $ctx1.locals.currentLine=_st(_st(self["@editor"])._getCursor_(false))._line();
  525. $ctx1.locals.start=_st((smalltalk.HashedCollection || HashedCollection))._new();
  526. _st($ctx1.locals.start)._at_put_("line",$ctx1.locals.currentLine);
  527. _st($ctx1.locals.start)._at_put_("ch",_st(_st(self["@editor"])._getCursor_(false))._ch());
  528. _st(_st(self["@editor"])._getSelection())._ifEmpty_((function(){
  529. return smalltalk.withContext(function($ctx2) { _st($ctx1.locals.start)._at_put_("ch",_st(_st(self["@editor"])._getLine_($ctx1.locals.currentLine))._size());
  530. return _st(self["@editor"])._setSelection_end_(smalltalk.HashedCollection._fromPairs_([_st("line").__minus_gt($ctx1.locals.currentLine),_st("ch").__minus_gt((0))]),$ctx1.locals.start);
  531. })}));
  532. $ctx1.locals.stop=_st((smalltalk.HashedCollection || HashedCollection))._new();
  533. _st($ctx1.locals.stop)._at_put_("line",$ctx1.locals.currentLine);
  534. _st($ctx1.locals.stop)._at_put_("ch",_st(_st(_st($ctx1.locals.start)._at_("ch")).__plus(_st(aString)._size())).__plus((2)));
  535. _st(self["@editor"])._replaceSelection_(_st(_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString)).__comma(" "));
  536. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  537. _st(self["@editor"])._setSelection_end_($ctx1.locals.stop,$ctx1.locals.start);
  538. return self}, self, "print:", [aString], smalltalk.SourceArea)}
  539. }),
  540. smalltalk.SourceArea);
  541. smalltalk.addMethod(
  542. "_printIt",
  543. smalltalk.method({
  544. selector: "printIt",
  545. fn: function (){
  546. var self=this;
  547. return smalltalk.withContext(function($ctx1) { _st(self)._print_(_st(_st(self)._doIt())._printString());
  548. _st(self)._focus();
  549. return self}, self, "printIt", [], smalltalk.SourceArea)}
  550. }),
  551. smalltalk.SourceArea);
  552. smalltalk.addMethod(
  553. "_receiver",
  554. smalltalk.method({
  555. selector: "receiver",
  556. fn: function (){
  557. var self=this;
  558. return smalltalk.withContext(function($ctx1) { var $1;
  559. if(($receiver = self["@receiver"]) == nil || $receiver == undefined){
  560. $1=_st((smalltalk.DoIt || DoIt))._new();
  561. } else {
  562. $1=self["@receiver"];
  563. };
  564. return $1;
  565. }, self, "receiver", [], smalltalk.SourceArea)}
  566. }),
  567. smalltalk.SourceArea);
  568. smalltalk.addMethod(
  569. "_receiver_",
  570. smalltalk.method({
  571. selector: "receiver:",
  572. fn: function (anObject){
  573. var self=this;
  574. return smalltalk.withContext(function($ctx1) { self["@receiver"]=anObject;
  575. return self}, self, "receiver:", [anObject], smalltalk.SourceArea)}
  576. }),
  577. smalltalk.SourceArea);
  578. smalltalk.addMethod(
  579. "_renderOn_",
  580. smalltalk.method({
  581. selector: "renderOn:",
  582. fn: function (html){
  583. var self=this;
  584. return smalltalk.withContext(function($ctx1) { $ctx1.textarea=nil;
  585. self["@div"]=_st(_st(html)._div())._class_("source");
  586. _st(self["@div"])._with_((function(){
  587. return smalltalk.withContext(function($ctx2) { $ctx1.locals.textarea=_st(html)._textarea();
  588. return $ctx1.locals.textarea;
  589. })}));
  590. _st(self)._setEditorOn_(_st($ctx1.locals.textarea)._element());
  591. _st(self["@div"])._onKeyDown_((function(e){
  592. return smalltalk.withContext(function($ctx2) { return _st(self)._handleKeyDown_(e);
  593. })}));
  594. return self}, self, "renderOn:", [html], smalltalk.SourceArea)}
  595. }),
  596. smalltalk.SourceArea);
  597. smalltalk.addMethod(
  598. "_selection",
  599. smalltalk.method({
  600. selector: "selection",
  601. fn: function (){
  602. var self=this;
  603. return smalltalk.withContext(function($ctx1) { var $1;
  604. $1=_st(self["@editor"])._getSelection();
  605. return $1;
  606. }, self, "selection", [], smalltalk.SourceArea)}
  607. }),
  608. smalltalk.SourceArea);
  609. smalltalk.addMethod(
  610. "_selectionEnd",
  611. smalltalk.method({
  612. selector: "selectionEnd",
  613. fn: function () {
  614. var self = this;
  615. var $1;
  616. $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd", []);
  617. return $1;
  618. }
  619. }),
  620. smalltalk.SourceArea);
  621. smalltalk.addMethod(
  622. "_selectionEnd_",
  623. smalltalk.method({
  624. selector: "selectionEnd:",
  625. fn: function (anInteger) {
  626. var self = this;
  627. smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd_", [anInteger]);
  628. return self;
  629. }
  630. }),
  631. smalltalk.SourceArea);
  632. smalltalk.addMethod(
  633. "_selectionStart",
  634. smalltalk.method({
  635. selector: "selectionStart",
  636. fn: function () {
  637. var self = this;
  638. var $1;
  639. $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart", []);
  640. return $1;
  641. }
  642. }),
  643. smalltalk.SourceArea);
  644. smalltalk.addMethod(
  645. "_selectionStart_",
  646. smalltalk.method({
  647. selector: "selectionStart:",
  648. fn: function (anInteger) {
  649. var self = this;
  650. smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart_", [anInteger]);
  651. return self;
  652. }
  653. }),
  654. smalltalk.SourceArea);
  655. smalltalk.addMethod(
  656. "_setEditorOn_",
  657. smalltalk.method({
  658. selector: "setEditorOn:",
  659. fn: function (aTextarea) {
  660. var self = this;
  661. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
  662. return self;
  663. }
  664. }),
  665. smalltalk.SourceArea);
  666. smalltalk.addMethod(
  667. "_val",
  668. smalltalk.method({
  669. selector: "val",
  670. fn: function () {
  671. var self = this;
  672. var $1;
  673. $1 = smalltalk.send(self['@editor'], "_getValue", []);
  674. return $1;
  675. }
  676. }),
  677. smalltalk.SourceArea);
  678. smalltalk.addMethod(
  679. "_val_",
  680. smalltalk.method({
  681. selector: "val:",
  682. fn: function (aString) {
  683. var self = this;
  684. smalltalk.send(self['@editor'], "_setValue_", [aString]);
  685. return self;
  686. }
  687. }),
  688. smalltalk.SourceArea);
  689. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  690. smalltalk.addMethod(
  691. "_addTab_",
  692. smalltalk.method({
  693. selector: "addTab:",
  694. fn: function (aWidget){
  695. var self=this;
  696. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._add_(aWidget);
  697. _st(aWidget)._appendToJQuery_(_st("#amber")._asJQuery());
  698. _st(aWidget)._hide();
  699. return self}, self, "addTab:", [aWidget], smalltalk.TabManager)}
  700. }),
  701. smalltalk.TabManager);
  702. smalltalk.addMethod(
  703. "_close",
  704. smalltalk.method({
  705. selector: "close",
  706. fn: function (){
  707. var self=this;
  708. return smalltalk.withContext(function($ctx1) { if(smalltalk.assert(self["@opened"])){
  709. _st(_st("#amber")._asJQuery())._hide();
  710. _st(_st(self["@ul"])._asJQuery())._hide();
  711. _st(self["@selectedTab"])._hide();
  712. _st(self)._removeBodyMargin();
  713. _st(_st("body")._asJQuery())._removeClass_("amberBody");
  714. self["@opened"]=false;
  715. self["@opened"];
  716. };
  717. return self}, self, "close", [], smalltalk.TabManager)}
  718. }),
  719. smalltalk.TabManager);
  720. smalltalk.addMethod(
  721. "_closeTab_",
  722. smalltalk.method({
  723. selector: "closeTab:",
  724. fn: function (aWidget){
  725. var self=this;
  726. return smalltalk.withContext(function($ctx1) { _st(self)._removeTab_(aWidget);
  727. _st(self)._selectTab_(_st(_st(self)._tabs())._last());
  728. _st(aWidget)._remove();
  729. _st(self)._update();
  730. return self}, self, "closeTab:", [aWidget], smalltalk.TabManager)}
  731. }),
  732. smalltalk.TabManager);
  733. smalltalk.addMethod(
  734. "_initialize",
  735. smalltalk.method({
  736. selector: "initialize",
  737. fn: function (){
  738. var self=this;
  739. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  740. smalltalk.Widget.fn.prototype._initialize.apply(_st(self), []);
  741. self["@opened"]=true;
  742. _st((function(html){
  743. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._div())._id_("amber");
  744. })}))._appendToJQuery_(_st("body")._asJQuery());
  745. _st(_st("body")._asJQuery())._addClass_("amberBody");
  746. _st(self)._appendToJQuery_(_st("#amber")._asJQuery());
  747. _st(self)._addTab_(_st((smalltalk.IDETranscript || IDETranscript))._current());
  748. _st(self)._addTab_(_st((smalltalk.Workspace || Workspace))._new());
  749. $1=_st(self)._addTab_(_st((smalltalk.TestRunner || TestRunner))._new());
  750. _st(self)._selectTab_(_st(_st(self)._tabs())._last());
  751. _st(self)._onResize_((function(){
  752. return smalltalk.withContext(function($ctx2) { _st(self)._updateBodyMargin();
  753. $2=_st(self)._updatePosition();
  754. return $2;
  755. })}));
  756. $3=_st(self)._onWindowResize_((function(){
  757. return smalltalk.withContext(function($ctx2) { return _st(self)._updatePosition();
  758. })}));
  759. return self}, self, "initialize", [], smalltalk.TabManager)}
  760. }),
  761. smalltalk.TabManager);
  762. smalltalk.addMethod(
  763. "_labelFor_",
  764. smalltalk.method({
  765. selector: "labelFor:",
  766. fn: function (aWidget){
  767. var self=this;
  768. return smalltalk.withContext(function($ctx1) { var $1;
  769. $ctx1.label=nil;
  770. $ctx1.maxSize=nil;
  771. $ctx1.locals.maxSize=(15);
  772. $ctx1.locals.label=_st(_st(aWidget)._label())._copyFrom_to_((0),_st(_st(_st(aWidget)._label())._size())._min_($ctx1.locals.maxSize));
  773. $1=_st(_st(_st(aWidget)._label())._size()).__gt($ctx1.locals.maxSize);
  774. if(smalltalk.assert($1)){
  775. $ctx1.locals.label=_st($ctx1.locals.label).__comma("...");
  776. $ctx1.locals.label;
  777. };
  778. return $ctx1.locals.label;
  779. }, self, "labelFor:", [aWidget], smalltalk.TabManager)}
  780. }),
  781. smalltalk.TabManager);
  782. smalltalk.addMethod(
  783. "_newBrowserTab",
  784. smalltalk.method({
  785. selector: "newBrowserTab",
  786. fn: function (){
  787. var self=this;
  788. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Browser || Browser))._open();
  789. return self}, self, "newBrowserTab", [], smalltalk.TabManager)}
  790. }),
  791. smalltalk.TabManager);
  792. smalltalk.addMethod(
  793. "_onResize_",
  794. smalltalk.method({
  795. selector: "onResize:",
  796. fn: function (aBlock){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) { jQuery('#amber').resizable({
  799. handles: 'n',
  800. resize: aBlock,
  801. minHeight: 230
  802. });
  803. ;
  804. return self}, self, "onResize:", [aBlock], smalltalk.TabManager)}
  805. }),
  806. smalltalk.TabManager);
  807. smalltalk.addMethod(
  808. "_onWindowResize_",
  809. smalltalk.method({
  810. selector: "onWindowResize:",
  811. fn: function (aBlock){
  812. var self=this;
  813. return smalltalk.withContext(function($ctx1) { jQuery(window).resize(aBlock);
  814. ;
  815. return self}, self, "onWindowResize:", [aBlock], smalltalk.TabManager)}
  816. }),
  817. smalltalk.TabManager);
  818. smalltalk.addMethod(
  819. "_open",
  820. smalltalk.method({
  821. selector: "open",
  822. fn: function (){
  823. var self=this;
  824. return smalltalk.withContext(function($ctx1) { if(! smalltalk.assert(self["@opened"])){
  825. _st(_st("body")._asJQuery())._addClass_("amberBody");
  826. _st(_st("#amber")._asJQuery())._show();
  827. _st(_st(self["@ul"])._asJQuery())._show();
  828. _st(self)._updateBodyMargin();
  829. _st(self["@selectedTab"])._show();
  830. self["@opened"]=true;
  831. self["@opened"];
  832. };
  833. return self}, self, "open", [], smalltalk.TabManager)}
  834. }),
  835. smalltalk.TabManager);
  836. smalltalk.addMethod(
  837. "_removeBodyMargin",
  838. smalltalk.method({
  839. selector: "removeBodyMargin",
  840. fn: function (){
  841. var self=this;
  842. return smalltalk.withContext(function($ctx1) { _st(self)._setBodyMargin_((0));
  843. return self}, self, "removeBodyMargin", [], smalltalk.TabManager)}
  844. }),
  845. smalltalk.TabManager);
  846. smalltalk.addMethod(
  847. "_removeTab_",
  848. smalltalk.method({
  849. selector: "removeTab:",
  850. fn: function (aWidget){
  851. var self=this;
  852. return smalltalk.withContext(function($ctx1) { _st(_st(self)._tabs())._remove_(aWidget);
  853. _st(self)._update();
  854. return self}, self, "removeTab:", [aWidget], smalltalk.TabManager)}
  855. }),
  856. smalltalk.TabManager);
  857. smalltalk.addMethod(
  858. "_renderOn_",
  859. smalltalk.method({
  860. selector: "renderOn:",
  861. fn: function (html){
  862. var self=this;
  863. return smalltalk.withContext(function($ctx1) { var $1,$2;
  864. _st(_st(html)._div())._id_("logo");
  865. _st(self)._renderToolbarOn_(html);
  866. $1=_st(html)._ul();
  867. _st($1)._id_("amberTabs");
  868. $2=_st($1)._yourself();
  869. self["@ul"]=$2;
  870. _st(self)._renderTabs();
  871. return self}, self, "renderOn:", [html], smalltalk.TabManager)}
  872. }),
  873. smalltalk.TabManager);
  874. smalltalk.addMethod(
  875. "_renderTabFor_on_",
  876. smalltalk.method({
  877. selector: "renderTabFor:on:",
  878. fn: function (aWidget,html){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$5,$6,$3,$7;
  881. $ctx1.li=nil;
  882. $ctx1.locals.li=_st(html)._li();
  883. $1=_st(self["@selectedTab"]).__eq(aWidget);
  884. if(smalltalk.assert($1)){
  885. _st($ctx1.locals.li)._class_("selected");
  886. };
  887. _st($ctx1.locals.li)._with_((function(){
  888. return smalltalk.withContext(function($ctx2) { _st(_st(html)._span())._class_("ltab");
  889. $2=_st(html)._span();
  890. _st($2)._class_("mtab");
  891. $3=_st($2)._with_((function(){
  892. return smalltalk.withContext(function($ctx3) { $4=_st(aWidget)._canBeClosed();
  893. if(smalltalk.assert($4)){
  894. $5=_st(html)._span();
  895. _st($5)._class_("close");
  896. _st($5)._with_("x");
  897. $6=_st($5)._onClick_((function(){
  898. return smalltalk.withContext(function($ctx4) { return _st(self)._closeTab_(aWidget);
  899. })}));
  900. $6;
  901. };
  902. return _st(_st(html)._span())._with_(_st(self)._labelFor_(aWidget));
  903. })}));
  904. $3;
  905. return _st(_st(html)._span())._class_("rtab");
  906. })}));
  907. $7=_st($ctx1.locals.li)._onClick_((function(){
  908. return smalltalk.withContext(function($ctx2) { return _st(self)._selectTab_(aWidget);
  909. })}));
  910. return self}, self, "renderTabFor:on:", [aWidget,html], smalltalk.TabManager)}
  911. }),
  912. smalltalk.TabManager);
  913. smalltalk.addMethod(
  914. "_renderTabs",
  915. smalltalk.method({
  916. selector: "renderTabs",
  917. fn: function (){
  918. var self=this;
  919. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  920. _st(self["@ul"])._contents_((function(html){
  921. return smalltalk.withContext(function($ctx2) { _st(_st(self)._tabs())._do_((function(each){
  922. return smalltalk.withContext(function($ctx3) { return _st(self)._renderTabFor_on_(each,html);
  923. })}));
  924. $1=_st(html)._li();
  925. _st($1)._class_("newtab");
  926. _st($1)._with_((function(){
  927. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  928. $2=_st(html)._span();
  929. _st($2)._class_("mtab");
  930. $3=_st($2)._with_(" + ");
  931. $3;
  932. return _st(_st(html)._span())._class_("rtab");
  933. })}));
  934. $4=_st($1)._onClick_((function(){
  935. return smalltalk.withContext(function($ctx3) { return _st(self)._newBrowserTab();
  936. })}));
  937. return $4;
  938. })}));
  939. return self}, self, "renderTabs", [], smalltalk.TabManager)}
  940. }),
  941. smalltalk.TabManager);
  942. smalltalk.addMethod(
  943. "_renderToolbarOn_",
  944. smalltalk.method({
  945. selector: "renderToolbarOn:",
  946. fn: function (html){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$7,$2;
  949. $1=_st(html)._div();
  950. _st($1)._id_("amber_toolbar");
  951. $2=_st($1)._with_((function(){
  952. return smalltalk.withContext(function($ctx2) { $3=_st(html)._input();
  953. _st($3)._class_("implementors");
  954. $4=_st($3)._yourself();
  955. self["@input"]=$4;
  956. self["@input"];
  957. _st(self["@input"])._onKeyPress_((function(event){
  958. return smalltalk.withContext(function($ctx3) { $5=_st(_st(event)._keyCode()).__eq((13));
  959. if(smalltalk.assert($5)){
  960. return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
  961. };
  962. })}));
  963. $6=_st(html)._div();
  964. _st($6)._id_("amber_close");
  965. $7=_st($6)._onClick_((function(){
  966. return smalltalk.withContext(function($ctx3) { return _st(self)._close();
  967. })}));
  968. return $7;
  969. })}));
  970. return self}, self, "renderToolbarOn:", [html], smalltalk.TabManager)}
  971. }),
  972. smalltalk.TabManager);
  973. smalltalk.addMethod(
  974. "_search_",
  975. smalltalk.method({
  976. selector: "search:",
  977. fn: function (aString){
  978. var self=this;
  979. return smalltalk.withContext(function($ctx1) { var $1;
  980. $ctx1.searchedClass=nil;
  981. $ctx1.locals.searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  982. $1=_st($ctx1.locals.searchedClass)._isClass();
  983. if(smalltalk.assert($1)){
  984. _st((smalltalk.Browser || Browser))._openOn_($ctx1.locals.searchedClass);
  985. } else {
  986. _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
  987. };
  988. return self}, self, "search:", [aString], smalltalk.TabManager)}
  989. }),
  990. smalltalk.TabManager);
  991. smalltalk.addMethod(
  992. "_selectTab_",
  993. smalltalk.method({
  994. selector: "selectTab:",
  995. fn: function (aWidget){
  996. var self=this;
  997. return smalltalk.withContext(function($ctx1) { _st(self)._open();
  998. self["@selectedTab"]=aWidget;
  999. _st(_st(self)._tabs())._do_((function(each){
  1000. return smalltalk.withContext(function($ctx2) { return _st(each)._hide();
  1001. })}));
  1002. _st(aWidget)._show();
  1003. _st(self)._update();
  1004. return self}, self, "selectTab:", [aWidget], smalltalk.TabManager)}
  1005. }),
  1006. smalltalk.TabManager);
  1007. smalltalk.addMethod(
  1008. "_setBodyMargin_",
  1009. smalltalk.method({
  1010. selector: "setBodyMargin:",
  1011. fn: function (anInteger){
  1012. var self=this;
  1013. return smalltalk.withContext(function($ctx1) { _st(_st(".amberBody")._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1014. return self}, self, "setBodyMargin:", [anInteger], smalltalk.TabManager)}
  1015. }),
  1016. smalltalk.TabManager);
  1017. smalltalk.addMethod(
  1018. "_tabs",
  1019. smalltalk.method({
  1020. selector: "tabs",
  1021. fn: function (){
  1022. var self=this;
  1023. return smalltalk.withContext(function($ctx1) { var $1;
  1024. if(($receiver = self["@tabs"]) == nil || $receiver == undefined){
  1025. self["@tabs"]=_st((smalltalk.Array || Array))._new();
  1026. $1=self["@tabs"];
  1027. } else {
  1028. $1=self["@tabs"];
  1029. };
  1030. return $1;
  1031. }, self, "tabs", [], smalltalk.TabManager)}
  1032. }),
  1033. smalltalk.TabManager);
  1034. smalltalk.addMethod(
  1035. "_update",
  1036. smalltalk.method({
  1037. selector: "update",
  1038. fn: function (){
  1039. var self=this;
  1040. return smalltalk.withContext(function($ctx1) { _st(self)._renderTabs();
  1041. return self}, self, "update", [], smalltalk.TabManager)}
  1042. }),
  1043. smalltalk.TabManager);
  1044. smalltalk.addMethod(
  1045. "_updateBodyMargin",
  1046. smalltalk.method({
  1047. selector: "updateBodyMargin",
  1048. fn: function (){
  1049. var self=this;
  1050. return smalltalk.withContext(function($ctx1) { _st(self)._setBodyMargin_(_st(_st("#amber")._asJQuery())._height());
  1051. return self}, self, "updateBodyMargin", [], smalltalk.TabManager)}
  1052. }),
  1053. smalltalk.TabManager);
  1054. smalltalk.addMethod(
  1055. "_updatePosition",
  1056. smalltalk.method({
  1057. selector: "updatePosition",
  1058. fn: function (){
  1059. var self=this;
  1060. return smalltalk.withContext(function($ctx1) { jQuery('#amber').css('top', '').css('bottom', '0px');
  1061. ;
  1062. return self}, self, "updatePosition", [], smalltalk.TabManager)}
  1063. }),
  1064. smalltalk.TabManager);
  1065. smalltalk.TabManager.klass.iVarNames = ['current'];
  1066. smalltalk.addMethod(
  1067. "_current",
  1068. smalltalk.method({
  1069. selector: "current",
  1070. fn: function (){
  1071. var self=this;
  1072. return smalltalk.withContext(function($ctx1) { var $1;
  1073. if(($receiver = self["@current"]) == nil || $receiver == undefined){
  1074. self["@current"]=smalltalk.Widget.klass.fn.prototype._new.apply(_st(self), []);
  1075. $1=self["@current"];
  1076. } else {
  1077. $1=self["@current"];
  1078. };
  1079. return $1;
  1080. }, self, "current", [], smalltalk.TabManager.klass)}
  1081. }),
  1082. smalltalk.TabManager.klass);
  1083. smalltalk.addMethod(
  1084. "_new",
  1085. smalltalk.method({
  1086. selector: "new",
  1087. fn: function (){
  1088. var self=this;
  1089. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  1090. return self}, self, "new", [], smalltalk.TabManager.klass)}
  1091. }),
  1092. smalltalk.TabManager.klass);
  1093. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1094. smalltalk.addMethod(
  1095. "_canBeClosed",
  1096. smalltalk.method({
  1097. selector: "canBeClosed",
  1098. fn: function (){
  1099. var self=this;
  1100. return smalltalk.withContext(function($ctx1) { return false;
  1101. }, self, "canBeClosed", [], smalltalk.TabWidget)}
  1102. }),
  1103. smalltalk.TabWidget);
  1104. smalltalk.addMethod(
  1105. "_close",
  1106. smalltalk.method({
  1107. selector: "close",
  1108. fn: function (){
  1109. var self=this;
  1110. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._closeTab_(self);
  1111. return self}, self, "close", [], smalltalk.TabWidget)}
  1112. }),
  1113. smalltalk.TabWidget);
  1114. smalltalk.addMethod(
  1115. "_hide",
  1116. smalltalk.method({
  1117. selector: "hide",
  1118. fn: function (){
  1119. var self=this;
  1120. return smalltalk.withContext(function($ctx1) { _st(_st(self["@div"])._asJQuery())._hide();
  1121. return self}, self, "hide", [], smalltalk.TabWidget)}
  1122. }),
  1123. smalltalk.TabWidget);
  1124. smalltalk.addMethod(
  1125. "_label",
  1126. smalltalk.method({
  1127. selector: "label",
  1128. fn: function (){
  1129. var self=this;
  1130. return smalltalk.withContext(function($ctx1) { _st(self)._subclassResponsibility();
  1131. return self}, self, "label", [], smalltalk.TabWidget)}
  1132. }),
  1133. smalltalk.TabWidget);
  1134. smalltalk.addMethod(
  1135. "_open",
  1136. smalltalk.method({
  1137. selector: "open",
  1138. fn: function (){
  1139. var self=this;
  1140. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._addTab_(self);
  1141. _st(_st((smalltalk.TabManager || TabManager))._current())._selectTab_(self);
  1142. return self}, self, "open", [], smalltalk.TabWidget)}
  1143. }),
  1144. smalltalk.TabWidget);
  1145. smalltalk.addMethod(
  1146. "_remove",
  1147. smalltalk.method({
  1148. selector: "remove",
  1149. fn: function (){
  1150. var self=this;
  1151. return smalltalk.withContext(function($ctx1) { _st(_st(self["@div"])._asJQuery())._remove();
  1152. return self}, self, "remove", [], smalltalk.TabWidget)}
  1153. }),
  1154. smalltalk.TabWidget);
  1155. smalltalk.addMethod(
  1156. "_renderBoxOn_",
  1157. smalltalk.method({
  1158. selector: "renderBoxOn:",
  1159. fn: function (html){
  1160. var self=this;
  1161. return smalltalk.withContext(function($ctx1) { return self}, self, "renderBoxOn:", [html], smalltalk.TabWidget)}
  1162. }),
  1163. smalltalk.TabWidget);
  1164. smalltalk.addMethod(
  1165. "_renderButtonsOn_",
  1166. smalltalk.method({
  1167. selector: "renderButtonsOn:",
  1168. fn: function (html){
  1169. var self=this;
  1170. return smalltalk.withContext(function($ctx1) { return self}, self, "renderButtonsOn:", [html], smalltalk.TabWidget)}
  1171. }),
  1172. smalltalk.TabWidget);
  1173. smalltalk.addMethod(
  1174. "_renderOn_",
  1175. smalltalk.method({
  1176. selector: "renderOn:",
  1177. fn: function (html){
  1178. var self=this;
  1179. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1180. $1=_st(html)._div();
  1181. _st($1)._class_("amberTool");
  1182. $2=_st($1)._yourself();
  1183. self["@div"]=$2;
  1184. _st(self)._renderTab();
  1185. return self}, self, "renderOn:", [html], smalltalk.TabWidget)}
  1186. }),
  1187. smalltalk.TabWidget);
  1188. smalltalk.addMethod(
  1189. "_renderTab",
  1190. smalltalk.method({
  1191. selector: "renderTab",
  1192. fn: function (){
  1193. var self=this;
  1194. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1195. _st(self["@div"])._contents_((function(html){
  1196. return smalltalk.withContext(function($ctx2) { $1=_st(html)._div();
  1197. _st($1)._class_("amber_box");
  1198. $2=_st($1)._with_((function(){
  1199. return smalltalk.withContext(function($ctx3) { return _st(self)._renderBoxOn_(html);
  1200. })}));
  1201. $2;
  1202. $3=_st(html)._div();
  1203. _st($3)._class_("amber_buttons");
  1204. $4=_st($3)._with_((function(){
  1205. return smalltalk.withContext(function($ctx3) { return _st(self)._renderButtonsOn_(html);
  1206. })}));
  1207. return $4;
  1208. })}));
  1209. return self}, self, "renderTab", [], smalltalk.TabWidget)}
  1210. }),
  1211. smalltalk.TabWidget);
  1212. smalltalk.addMethod(
  1213. "_show",
  1214. smalltalk.method({
  1215. selector: "show",
  1216. fn: function (){
  1217. var self=this;
  1218. return smalltalk.withContext(function($ctx1) { _st(_st(self["@div"])._asJQuery())._show();
  1219. return self}, self, "show", [], smalltalk.TabWidget)}
  1220. }),
  1221. smalltalk.TabWidget);
  1222. smalltalk.addMethod(
  1223. "_update",
  1224. smalltalk.method({
  1225. selector: "update",
  1226. fn: function (){
  1227. var self=this;
  1228. return smalltalk.withContext(function($ctx1) { _st(self)._renderTab();
  1229. return self}, self, "update", [], smalltalk.TabWidget)}
  1230. }),
  1231. smalltalk.TabWidget);
  1232. smalltalk.addMethod(
  1233. "_open",
  1234. smalltalk.method({
  1235. selector: "open",
  1236. fn: function (){
  1237. var self=this;
  1238. return smalltalk.withContext(function($ctx1) { var $1;
  1239. $1=_st(_st(self)._new())._open();
  1240. return $1;
  1241. }, self, "open", [], smalltalk.TabWidget.klass)}
  1242. }),
  1243. smalltalk.TabWidget.klass);
  1244. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1245. smalltalk.addMethod(
  1246. "_addInstanceVariableNamed_toClass_",
  1247. smalltalk.method({
  1248. selector: "addInstanceVariableNamed:toClass:",
  1249. fn: function (aString,aClass){
  1250. var self=this;
  1251. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1252. $1=_st(_st(aClass)._instanceVariableNames())._copy();
  1253. _st($1)._add_(aString);
  1254. $2=_st($1)._yourself();
  1255. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._addSubclassOf_named_instanceVariableNames_package_(_st(aClass)._superclass(),_st(aClass)._name(),$2,_st(_st(aClass)._package())._name());
  1256. return self}, self, "addInstanceVariableNamed:toClass:", [aString,aClass], smalltalk.Browser)}
  1257. }),
  1258. smalltalk.Browser);
  1259. smalltalk.addMethod(
  1260. "_addNewClass",
  1261. smalltalk.method({
  1262. selector: "addNewClass",
  1263. fn: function (){
  1264. var self=this;
  1265. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1266. $ctx1.className=nil;
  1267. $ctx1.locals.className=_st(window)._prompt_("New class");
  1268. $1=_st(_st($ctx1.locals.className)._notNil())._and_((function(){
  1269. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.className)._notEmpty();
  1270. })}));
  1271. if(smalltalk.assert($1)){
  1272. _st((smalltalk.Object || Object))._subclass_instanceVariableNames_package_($ctx1.locals.className,"",_st(self)._selectedPackage());
  1273. _st(self)._resetClassesList();
  1274. $2=_st(self)._updateClassesList();
  1275. $2;
  1276. _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_($ctx1.locals.className));
  1277. };
  1278. return self}, self, "addNewClass", [], smalltalk.Browser)}
  1279. }),
  1280. smalltalk.Browser);
  1281. smalltalk.addMethod(
  1282. "_addNewProtocol",
  1283. smalltalk.method({
  1284. selector: "addNewProtocol",
  1285. fn: function (){
  1286. var self=this;
  1287. return smalltalk.withContext(function($ctx1) { var $1;
  1288. $ctx1.newProtocol=nil;
  1289. $ctx1.locals.newProtocol=_st(window)._prompt_("New method protocol");
  1290. $1=_st(_st($ctx1.locals.newProtocol)._notNil())._and_((function(){
  1291. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.newProtocol)._notEmpty();
  1292. })}));
  1293. if(smalltalk.assert($1)){
  1294. _st(self["@selectedMethod"])._category_($ctx1.locals.newProtocol);
  1295. _st(self)._setMethodProtocol_($ctx1.locals.newProtocol);
  1296. };
  1297. return self}, self, "addNewProtocol", [], smalltalk.Browser)}
  1298. }),
  1299. smalltalk.Browser);
  1300. smalltalk.addMethod(
  1301. "_ajaxPutAt_data_",
  1302. smalltalk.method({
  1303. selector: "ajaxPutAt:data:",
  1304. fn: function (aURL,aString){
  1305. var self=this;
  1306. return smalltalk.withContext(function($ctx1) { _st(jQuery)._ajax_options_(aURL,smalltalk.HashedCollection._fromPairs_([_st("type").__minus_gt("PUT"),_st("data").__minus_gt(aString),_st("contentType").__minus_gt("text/plain;charset=UTF-8"),_st("error").__minus_gt((function(xhr){
  1307. return smalltalk.withContext(function($ctx2) { return _st(window)._alert_(_st(_st(_st(_st("Commiting ").__comma(aURL)).__comma(" failed with reason: \x22")).__comma(_st(xhr)._responseText())).__comma("\x22"));
  1308. })}))]));
  1309. return self}, self, "ajaxPutAt:data:", [aURL,aString], smalltalk.Browser)}
  1310. }),
  1311. smalltalk.Browser);
  1312. smalltalk.addMethod(
  1313. "_canBeClosed",
  1314. smalltalk.method({
  1315. selector: "canBeClosed",
  1316. fn: function (){
  1317. var self=this;
  1318. return smalltalk.withContext(function($ctx1) { return true;
  1319. }, self, "canBeClosed", [], smalltalk.Browser)}
  1320. }),
  1321. smalltalk.Browser);
  1322. smalltalk.addMethod(
  1323. "_cancelChanges",
  1324. smalltalk.method({
  1325. selector: "cancelChanges",
  1326. fn: function (){
  1327. var self=this;
  1328. return smalltalk.withContext(function($ctx1) { var $1;
  1329. if(smalltalk.assert(self["@unsavedChanges"])){
  1330. $1=_st(window)._confirm_("Cancel changes?");
  1331. } else {
  1332. $1=true;
  1333. };
  1334. return $1;
  1335. }, self, "cancelChanges", [], smalltalk.Browser)}
  1336. }),
  1337. smalltalk.Browser);
  1338. smalltalk.addMethod(
  1339. "_classCommentSource",
  1340. smalltalk.method({
  1341. selector: "classCommentSource",
  1342. fn: function (){
  1343. var self=this;
  1344. return smalltalk.withContext(function($ctx1) { var $1;
  1345. $1=_st(self["@selectedClass"])._comment();
  1346. return $1;
  1347. }, self, "classCommentSource", [], smalltalk.Browser)}
  1348. }),
  1349. smalltalk.Browser);
  1350. smalltalk.addMethod(
  1351. "_classDeclarationSource",
  1352. smalltalk.method({
  1353. selector: "classDeclarationSource",
  1354. fn: function (){
  1355. var self=this;
  1356. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  1357. $ctx1.stream=nil;
  1358. $ctx1.locals.stream=_st("")._writeStream();
  1359. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  1360. $1=_st(self)._classDeclarationTemplate();
  1361. return $1;
  1362. } else {
  1363. self["@selectedClass"];
  1364. };
  1365. _st($ctx1.locals.stream)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  1366. _st($ctx1.locals.stream)._nextPutAll_(" subclass: #");
  1367. _st($ctx1.locals.stream)._nextPutAll_(_st(self["@selectedClass"])._name());
  1368. _st($ctx1.locals.stream)._nextPutAll_(_st(_st((smalltalk.String || String))._lf()).__comma(_st((smalltalk.String || String))._tab()));
  1369. $2=_st($ctx1.locals.stream)._nextPutAll_("instanceVariableNames: '");
  1370. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  1371. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.stream)._nextPutAll_(each);
  1372. })}),(function(){
  1373. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.stream)._nextPutAll_(" ");
  1374. })}));
  1375. _st($ctx1.locals.stream)._nextPutAll_(_st(_st("'").__comma(_st((smalltalk.String || String))._lf())).__comma(_st((smalltalk.String || String))._tab()));
  1376. _st($ctx1.locals.stream)._nextPutAll_("package: '");
  1377. _st($ctx1.locals.stream)._nextPutAll_(_st(self["@selectedClass"])._category());
  1378. $3=_st($ctx1.locals.stream)._nextPutAll_("'");
  1379. $4=_st($ctx1.locals.stream)._contents();
  1380. return $4;
  1381. }, self, "classDeclarationSource", [], smalltalk.Browser)}
  1382. }),
  1383. smalltalk.Browser);
  1384. smalltalk.addMethod(
  1385. "_classDeclarationTemplate",
  1386. smalltalk.method({
  1387. selector: "classDeclarationTemplate",
  1388. fn: function (){
  1389. var self=this;
  1390. return smalltalk.withContext(function($ctx1) { var $1;
  1391. $1=_st(_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '").__comma(_st(self)._selectedPackage())).__comma("'");
  1392. return $1;
  1393. }, self, "classDeclarationTemplate", [], smalltalk.Browser)}
  1394. }),
  1395. smalltalk.Browser);
  1396. smalltalk.addMethod(
  1397. "_classes",
  1398. smalltalk.method({
  1399. selector: "classes",
  1400. fn: function (){
  1401. var self=this;
  1402. return smalltalk.withContext(function($ctx1) { var $1;
  1403. $1=_st(_st(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._select_((function(each){
  1404. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  1405. })})))._sort_((function(a,b){
  1406. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__lt(_st(b)._name());
  1407. })})))._asSet();
  1408. return $1;
  1409. }, self, "classes", [], smalltalk.Browser)}
  1410. }),
  1411. smalltalk.Browser);
  1412. smalltalk.addMethod(
  1413. "_commitPackage",
  1414. smalltalk.method({
  1415. selector: "commitPackage",
  1416. fn: function (){
  1417. var self=this;
  1418. return smalltalk.withContext(function($ctx1) { if(($receiver = self["@selectedPackage"]) == nil || $receiver == undefined){
  1419. self["@selectedPackage"];
  1420. } else {
  1421. $ctx1.package=nil;
  1422. $ctx1.locals.package_=_st((smalltalk.Package || Package))._named_(self["@selectedPackage"]);
  1423. $ctx1.locals.package_;
  1424. _st([_st((smalltalk.Exporter || Exporter)).__minus_gt(_st(_st(_st(_st($ctx1.locals.package_)._commitPathJs()).__comma("/")).__comma(self["@selectedPackage"])).__comma(".js")),_st((smalltalk.StrippedExporter || StrippedExporter)).__minus_gt(_st(_st(_st(_st($ctx1.locals.package_)._commitPathJs()).__comma("/")).__comma(self["@selectedPackage"])).__comma(".deploy.js")),_st((smalltalk.ChunkExporter || ChunkExporter)).__minus_gt(_st(_st(_st(_st($ctx1.locals.package_)._commitPathSt()).__comma("/")).__comma(self["@selectedPackage"])).__comma(".st"))])._do_((function(commitStrategy){
  1425. return smalltalk.withContext(function($ctx2) { $ctx2.fileContents=nil;
  1426. $ctx2.locals.fileContents=_st(_st(_st(commitStrategy)._key())._new())._exportPackage_(self["@selectedPackage"]);
  1427. $ctx2.locals.fileContents;
  1428. return _st(self)._ajaxPutAt_data_(_st(commitStrategy)._value(),$ctx2.locals.fileContents);
  1429. })}));
  1430. };
  1431. return self}, self, "commitPackage", [], smalltalk.Browser)}
  1432. }),
  1433. smalltalk.Browser);
  1434. smalltalk.addMethod(
  1435. "_compile",
  1436. smalltalk.method({
  1437. selector: "compile",
  1438. fn: function (){
  1439. var self=this;
  1440. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1441. $ctx1.currentEditLine=nil;
  1442. _st(self)._disableSaveButton();
  1443. $ctx1.locals.currentEditLine=_st(_st(self["@sourceArea"])._editor())._getCursor();
  1444. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1445. if(smalltalk.assert($1)){
  1446. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  1447. self["@selectedClass"];
  1448. } else {
  1449. _st(self)._compileClassComment();
  1450. };
  1451. } else {
  1452. $2=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  1453. return smalltalk.withContext(function($ctx2) { return _st(self["@selectedMethod"])._notNil();
  1454. })}));
  1455. if(smalltalk.assert($2)){
  1456. _st(self)._compileMethodDefinition();
  1457. } else {
  1458. _st(self)._compileDefinition();
  1459. };
  1460. };
  1461. _st(_st(self["@sourceArea"])._editor())._setCursor_($ctx1.locals.currentEditLine);
  1462. return self}, self, "compile", [], smalltalk.Browser)}
  1463. }),
  1464. smalltalk.Browser);
  1465. smalltalk.addMethod(
  1466. "_compileClassComment",
  1467. smalltalk.method({
  1468. selector: "compileClassComment",
  1469. fn: function (){
  1470. var self=this;
  1471. return smalltalk.withContext(function($ctx1) { _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  1472. return self}, self, "compileClassComment", [], smalltalk.Browser)}
  1473. }),
  1474. smalltalk.Browser);
  1475. smalltalk.addMethod(
  1476. "_compileDefinition",
  1477. smalltalk.method({
  1478. selector: "compileDefinition",
  1479. fn: function (){
  1480. var self=this;
  1481. return smalltalk.withContext(function($ctx1) { var $1;
  1482. $ctx1.newClass=nil;
  1483. $ctx1.locals.newClass=_st(_st((smalltalk.Compiler || Compiler))._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  1484. _st(self)._resetClassesList();
  1485. _st(self)._updateCategoriesList();
  1486. $1=_st(self)._updateClassesList();
  1487. _st(self)._selectClass_($ctx1.locals.newClass);
  1488. return self}, self, "compileDefinition", [], smalltalk.Browser)}
  1489. }),
  1490. smalltalk.Browser);
  1491. smalltalk.addMethod(
  1492. "_compileMethodDefinition",
  1493. smalltalk.method({
  1494. selector: "compileMethodDefinition",
  1495. fn: function (){
  1496. var self=this;
  1497. return smalltalk.withContext(function($ctx1) { var $1;
  1498. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1499. if(smalltalk.assert($1)){
  1500. _st(self)._compileMethodDefinitionFor_(self["@selectedClass"]);
  1501. } else {
  1502. _st(self)._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  1503. };
  1504. return self}, self, "compileMethodDefinition", [], smalltalk.Browser)}
  1505. }),
  1506. smalltalk.Browser);
  1507. smalltalk.addMethod(
  1508. "_compileMethodDefinitionFor_",
  1509. smalltalk.method({
  1510. selector: "compileMethodDefinitionFor:",
  1511. fn: function (aClass){
  1512. var self=this;
  1513. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  1514. var $early={};
  1515. try {
  1516. $ctx1.compiler=nil;
  1517. $ctx1.method=nil;
  1518. $ctx1.source=nil;
  1519. $ctx1.node=nil;
  1520. $ctx1.locals.source=_st(self["@sourceArea"])._val();
  1521. if(($receiver = self["@selectedProtocol"]) == nil || $receiver == undefined){
  1522. self["@selectedProtocol"]=_st(self["@selectedMethod"])._category();
  1523. self["@selectedProtocol"];
  1524. } else {
  1525. self["@selectedProtocol"];
  1526. };
  1527. $ctx1.locals.compiler=_st((smalltalk.Compiler || Compiler))._new();
  1528. _st($ctx1.locals.compiler)._source_($ctx1.locals.source);
  1529. $ctx1.locals.node=_st($ctx1.locals.compiler)._parse_($ctx1.locals.source);
  1530. $1=_st($ctx1.locals.node)._isParseFailure();
  1531. if(smalltalk.assert($1)){
  1532. $2=_st(window)._alert_(_st(_st(_st("PARSE ERROR: ").__comma(_st($ctx1.locals.node)._reason())).__comma(", position: ")).__comma(_st(_st($ctx1.locals.node)._position())._asString()));
  1533. return $2;
  1534. };
  1535. _st($ctx1.locals.compiler)._currentClass_(aClass);
  1536. $ctx1.locals.method=_st($ctx1.locals.compiler)._eval_(_st($ctx1.locals.compiler)._compileNode_($ctx1.locals.node));
  1537. _st($ctx1.locals.method)._category_(self["@selectedProtocol"]);
  1538. _st(_st($ctx1.locals.compiler)._unknownVariables())._do_((function(each){
  1539. return smalltalk.withContext(function($ctx2) { $3=_st(window)._at_(each);
  1540. if(($receiver = $3) == nil || $receiver == undefined){
  1541. $4=_st(window)._confirm_(_st(_st("Declare '").__comma(each)).__comma("' as instance variable?"));
  1542. if(smalltalk.assert($4)){
  1543. _st(self)._addInstanceVariableNamed_toClass_(each,aClass);
  1544. $5=_st(self)._compileMethodDefinitionFor_(aClass);
  1545. throw $early=[$5];
  1546. };
  1547. } else {
  1548. return $3;
  1549. };
  1550. })}));
  1551. _st(aClass)._addCompiledMethod_($ctx1.locals.method);
  1552. _st($ctx1.locals.compiler)._setupClass_(aClass);
  1553. _st(self)._updateMethodsList();
  1554. _st(self)._selectMethod_($ctx1.locals.method);
  1555. return self}
  1556. catch(e) {if(e===$early)return e[0]; throw e}
  1557. }, self, "compileMethodDefinitionFor:", [aClass], smalltalk.Browser)}
  1558. }),
  1559. smalltalk.Browser);
  1560. smalltalk.addMethod(
  1561. "_copyClass",
  1562. smalltalk.method({
  1563. selector: "copyClass",
  1564. fn: function (){
  1565. var self=this;
  1566. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1567. $ctx1.className=nil;
  1568. $ctx1.locals.className=_st(window)._prompt_("Copy class");
  1569. $1=_st(_st($ctx1.locals.className)._notNil())._and_((function(){
  1570. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.className)._notEmpty();
  1571. })}));
  1572. if(smalltalk.assert($1)){
  1573. _st(_st((smalltalk.ClassBuilder || ClassBuilder))._new())._copyClass_named_(_st(self)._selectedClass(),$ctx1.locals.className);
  1574. _st(self)._resetClassesList();
  1575. $2=_st(self)._updateClassesList();
  1576. $2;
  1577. _st(self)._selectClass_(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_($ctx1.locals.className));
  1578. };
  1579. return self}, self, "copyClass", [], smalltalk.Browser)}
  1580. }),
  1581. smalltalk.Browser);
  1582. smalltalk.addMethod(
  1583. "_declarationSource",
  1584. smalltalk.method({
  1585. selector: "declarationSource",
  1586. fn: function (){
  1587. var self=this;
  1588. return smalltalk.withContext(function($ctx1) { var $2,$1;
  1589. $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1590. if(smalltalk.assert($2)){
  1591. $1=_st(self)._classDeclarationSource();
  1592. } else {
  1593. $1=_st(self)._metaclassDeclarationSource();
  1594. };
  1595. return $1;
  1596. }, self, "declarationSource", [], smalltalk.Browser)}
  1597. }),
  1598. smalltalk.Browser);
  1599. smalltalk.addMethod(
  1600. "_disableSaveButton",
  1601. smalltalk.method({
  1602. selector: "disableSaveButton",
  1603. fn: function (){
  1604. var self=this;
  1605. return smalltalk.withContext(function($ctx1) { if(($receiver = self["@saveButton"]) == nil || $receiver == undefined){
  1606. self["@saveButton"];
  1607. } else {
  1608. _st(self["@saveButton"])._at_put_("disabled",true);
  1609. };
  1610. self["@unsavedChanges"]=false;
  1611. return self}, self, "disableSaveButton", [], smalltalk.Browser)}
  1612. }),
  1613. smalltalk.Browser);
  1614. smalltalk.addMethod(
  1615. "_dummyMethodSource",
  1616. smalltalk.method({
  1617. selector: "dummyMethodSource",
  1618. fn: function (){
  1619. var self=this;
  1620. return smalltalk.withContext(function($ctx1) { return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  1621. }, self, "dummyMethodSource", [], smalltalk.Browser)}
  1622. }),
  1623. smalltalk.Browser);
  1624. smalltalk.addMethod(
  1625. "_handleSourceAreaKeyDown_",
  1626. smalltalk.method({
  1627. selector: "handleSourceAreaKeyDown:",
  1628. fn: function (anEvent){
  1629. var self=this;
  1630. return smalltalk.withContext(function($ctx1) { if(anEvent.ctrlKey) {
  1631. if(anEvent.keyCode === 83) { //ctrl+s
  1632. self._compile();
  1633. anEvent.preventDefault();
  1634. return false;
  1635. }
  1636. }
  1637. ;
  1638. ;
  1639. return self}, self, "handleSourceAreaKeyDown:", [anEvent], smalltalk.Browser)}
  1640. }),
  1641. smalltalk.Browser);
  1642. smalltalk.addMethod(
  1643. "_hideClassButtons",
  1644. smalltalk.method({
  1645. selector: "hideClassButtons",
  1646. fn: function (){
  1647. var self=this;
  1648. return smalltalk.withContext(function($ctx1) { _st(_st(self["@classButtons"])._asJQuery())._hide();
  1649. return self}, self, "hideClassButtons", [], smalltalk.Browser)}
  1650. }),
  1651. smalltalk.Browser);
  1652. smalltalk.addMethod(
  1653. "_hideMethodButtons",
  1654. smalltalk.method({
  1655. selector: "hideMethodButtons",
  1656. fn: function (){
  1657. var self=this;
  1658. return smalltalk.withContext(function($ctx1) { _st(_st(self["@methodButtons"])._asJQuery())._hide();
  1659. return self}, self, "hideMethodButtons", [], smalltalk.Browser)}
  1660. }),
  1661. smalltalk.Browser);
  1662. smalltalk.addMethod(
  1663. "_initialize",
  1664. smalltalk.method({
  1665. selector: "initialize",
  1666. fn: function (){
  1667. var self=this;
  1668. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  1669. self["@selectedTab"]=smalltalk.symbolFor("instance");
  1670. self["@selectedPackage"]=_st(_st(self)._packages())._first();
  1671. self["@unsavedChanges"]=false;
  1672. return self}, self, "initialize", [], smalltalk.Browser)}
  1673. }),
  1674. smalltalk.Browser);
  1675. smalltalk.addMethod(
  1676. "_label",
  1677. smalltalk.method({
  1678. selector: "label",
  1679. fn: function (){
  1680. var self=this;
  1681. return smalltalk.withContext(function($ctx1) { var $1;
  1682. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  1683. $1="Browser (nil)";
  1684. } else {
  1685. $1=_st("Browser: ").__comma(_st(self["@selectedClass"])._name());
  1686. };
  1687. return $1;
  1688. }, self, "label", [], smalltalk.Browser)}
  1689. }),
  1690. smalltalk.Browser);
  1691. smalltalk.addMethod(
  1692. "_metaclassDeclarationSource",
  1693. smalltalk.method({
  1694. selector: "metaclassDeclarationSource",
  1695. fn: function (){
  1696. var self=this;
  1697. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1698. $ctx1.stream=nil;
  1699. $ctx1.locals.stream=_st("")._writeStream();
  1700. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  1701. self["@selectedClass"];
  1702. } else {
  1703. _st($ctx1.locals.stream)._nextPutAll_(_st(self["@selectedClass"])._asString());
  1704. _st($ctx1.locals.stream)._nextPutAll_(" class ");
  1705. $1=_st($ctx1.locals.stream)._nextPutAll_("instanceVariableNames: '");
  1706. $1;
  1707. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  1708. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.stream)._nextPutAll_(each);
  1709. })}),(function(){
  1710. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.stream)._nextPutAll_(" ");
  1711. })}));
  1712. _st($ctx1.locals.stream)._nextPutAll_("'");
  1713. };
  1714. $2=_st($ctx1.locals.stream)._contents();
  1715. return $2;
  1716. }, self, "metaclassDeclarationSource", [], smalltalk.Browser)}
  1717. }),
  1718. smalltalk.Browser);
  1719. smalltalk.addMethod(
  1720. "_methodSource",
  1721. smalltalk.method({
  1722. selector: "methodSource",
  1723. fn: function (){
  1724. var self=this;
  1725. return smalltalk.withContext(function($ctx1) { var $1;
  1726. if(($receiver = self["@selectedMethod"]) == nil || $receiver == undefined){
  1727. $1=_st(self)._dummyMethodSource();
  1728. } else {
  1729. $1=_st(self["@selectedMethod"])._source();
  1730. };
  1731. return $1;
  1732. }, self, "methodSource", [], smalltalk.Browser)}
  1733. }),
  1734. smalltalk.Browser);
  1735. smalltalk.addMethod(
  1736. "_methods",
  1737. smalltalk.method({
  1738. selector: "methods",
  1739. fn: function (){
  1740. var self=this;
  1741. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$3;
  1742. $ctx1.klass=nil;
  1743. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1744. if(smalltalk.assert($1)){
  1745. return [];
  1746. };
  1747. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  1748. self["@selectedClass"];
  1749. } else {
  1750. $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1751. if(smalltalk.assert($2)){
  1752. $ctx1.locals.klass=self["@selectedClass"];
  1753. } else {
  1754. $ctx1.locals.klass=_st(self["@selectedClass"])._class();
  1755. };
  1756. $ctx1.locals.klass;
  1757. };
  1758. if(($receiver = self["@selectedProtocol"]) == nil || $receiver == undefined){
  1759. if(($receiver = $ctx1.locals.klass) == nil || $receiver == undefined){
  1760. $4=[];
  1761. } else {
  1762. $4=_st(_st($ctx1.locals.klass)._methodDictionary())._values();
  1763. };
  1764. } else {
  1765. $4=_st(_st(_st($ctx1.locals.klass)._methodDictionary())._values())._select_((function(each){
  1766. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
  1767. })}));
  1768. };
  1769. $3=_st($4)._sort_((function(a,b){
  1770. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._selector()).__lt(_st(b)._selector());
  1771. })}));
  1772. return $3;
  1773. }, self, "methods", [], smalltalk.Browser)}
  1774. }),
  1775. smalltalk.Browser);
  1776. smalltalk.addMethod(
  1777. "_packages",
  1778. smalltalk.method({
  1779. selector: "packages",
  1780. fn: function (){
  1781. var self=this;
  1782. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1783. $ctx1.packages=nil;
  1784. $ctx1.locals.packages=_st((smalltalk.Array || Array))._new();
  1785. _st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._do_((function(each){
  1786. return smalltalk.withContext(function($ctx2) { $1=_st($ctx1.locals.packages)._includes_(_st(each)._category());
  1787. if(! smalltalk.assert($1)){
  1788. return _st($ctx1.locals.packages)._add_(_st(each)._category());
  1789. };
  1790. })}));
  1791. $2=_st($ctx1.locals.packages)._sort();
  1792. return $2;
  1793. }, self, "packages", [], smalltalk.Browser)}
  1794. }),
  1795. smalltalk.Browser);
  1796. smalltalk.addMethod(
  1797. "_protocols",
  1798. smalltalk.method({
  1799. selector: "protocols",
  1800. fn: function (){
  1801. var self=this;
  1802. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  1803. $ctx1.klass=nil;
  1804. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  1805. self["@selectedClass"];
  1806. } else {
  1807. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  1808. if(smalltalk.assert($1)){
  1809. return [];
  1810. };
  1811. $2=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1812. if(smalltalk.assert($2)){
  1813. $ctx1.locals.klass=self["@selectedClass"];
  1814. } else {
  1815. $ctx1.locals.klass=_st(self["@selectedClass"])._class();
  1816. };
  1817. $ctx1.locals.klass;
  1818. $3=_st(_st($ctx1.locals.klass)._methodDictionary())._isEmpty();
  1819. if(smalltalk.assert($3)){
  1820. $4=_st((smalltalk.Array || Array))._with_("not yet classified");
  1821. return $4;
  1822. };
  1823. $5=_st($ctx1.locals.klass)._protocols();
  1824. return $5;
  1825. };
  1826. $6=_st((smalltalk.Array || Array))._new();
  1827. return $6;
  1828. }, self, "protocols", [], smalltalk.Browser)}
  1829. }),
  1830. smalltalk.Browser);
  1831. smalltalk.addMethod(
  1832. "_removeClass",
  1833. smalltalk.method({
  1834. selector: "removeClass",
  1835. fn: function (){
  1836. var self=this;
  1837. return smalltalk.withContext(function($ctx1) { var $1;
  1838. $1=_st(window)._confirm_(_st(_st("Do you really want to remove ").__comma(_st(self["@selectedClass"])._name())).__comma("?"));
  1839. if(smalltalk.assert($1)){
  1840. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removeClass_(self["@selectedClass"]);
  1841. _st(self)._resetClassesList();
  1842. _st(self)._selectClass_(nil);
  1843. };
  1844. return self}, self, "removeClass", [], smalltalk.Browser)}
  1845. }),
  1846. smalltalk.Browser);
  1847. smalltalk.addMethod(
  1848. "_removeMethod",
  1849. smalltalk.method({
  1850. selector: "removeMethod",
  1851. fn: function (){
  1852. var self=this;
  1853. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  1854. $1=_st(self)._cancelChanges();
  1855. if(smalltalk.assert($1)){
  1856. $2=_st(window)._confirm_(_st(_st("Do you really want to remove #").__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
  1857. if(smalltalk.assert($2)){
  1858. $3=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  1859. if(smalltalk.assert($3)){
  1860. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  1861. } else {
  1862. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  1863. };
  1864. _st(self)._selectMethod_(nil);
  1865. };
  1866. };
  1867. return self}, self, "removeMethod", [], smalltalk.Browser)}
  1868. }),
  1869. smalltalk.Browser);
  1870. smalltalk.addMethod(
  1871. "_removePackage",
  1872. smalltalk.method({
  1873. selector: "removePackage",
  1874. fn: function (){
  1875. var self=this;
  1876. return smalltalk.withContext(function($ctx1) { var $1;
  1877. $1=_st(window)._confirm_(_st(_st("Do you really want to remove the whole package ").__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
  1878. if(smalltalk.assert($1)){
  1879. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._removePackage_(self["@selectedPackage"]);
  1880. _st(self)._updateCategoriesList();
  1881. };
  1882. return self}, self, "removePackage", [], smalltalk.Browser)}
  1883. }),
  1884. smalltalk.Browser);
  1885. smalltalk.addMethod(
  1886. "_renameClass",
  1887. smalltalk.method({
  1888. selector: "renameClass",
  1889. fn: function (){
  1890. var self=this;
  1891. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1892. $ctx1.newName=nil;
  1893. $ctx1.locals.newName=_st(window)._prompt_(_st("Rename class ").__comma(_st(self["@selectedClass"])._name()));
  1894. $1=_st(_st($ctx1.locals.newName)._notNil())._and_((function(){
  1895. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.newName)._notEmpty();
  1896. })}));
  1897. if(smalltalk.assert($1)){
  1898. _st(self["@selectedClass"])._rename_($ctx1.locals.newName);
  1899. _st(self)._updateClassesList();
  1900. $2=_st(self)._updateSourceAndButtons();
  1901. $2;
  1902. };
  1903. return self}, self, "renameClass", [], smalltalk.Browser)}
  1904. }),
  1905. smalltalk.Browser);
  1906. smalltalk.addMethod(
  1907. "_renamePackage",
  1908. smalltalk.method({
  1909. selector: "renamePackage",
  1910. fn: function (){
  1911. var self=this;
  1912. return smalltalk.withContext(function($ctx1) { var $1;
  1913. $ctx1.newName=nil;
  1914. $ctx1.locals.newName=_st(window)._prompt_(_st("Rename package ").__comma(self["@selectedPackage"]));
  1915. if(($receiver = $ctx1.locals.newName) == nil || $receiver == undefined){
  1916. $ctx1.locals.newName;
  1917. } else {
  1918. $1=_st($ctx1.locals.newName)._notEmpty();
  1919. if(smalltalk.assert($1)){
  1920. _st(_st((smalltalk.Smalltalk || Smalltalk))._current())._renamePackage_to_(self["@selectedPackage"],$ctx1.locals.newName);
  1921. _st(self)._updateCategoriesList();
  1922. };
  1923. };
  1924. return self}, self, "renamePackage", [], smalltalk.Browser)}
  1925. }),
  1926. smalltalk.Browser);
  1927. smalltalk.addMethod(
  1928. "_renderBottomPanelOn_",
  1929. smalltalk.method({
  1930. selector: "renderBottomPanelOn:",
  1931. fn: function (html){
  1932. var self=this;
  1933. return smalltalk.withContext(function($ctx1) { var $1,$2;
  1934. $1=_st(html)._div();
  1935. _st($1)._class_("amber_sourceCode");
  1936. $2=_st($1)._with_((function(){
  1937. return smalltalk.withContext(function($ctx2) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  1938. self["@sourceArea"];
  1939. _st(self["@sourceArea"])._renderOn_(html);
  1940. _st(self["@sourceArea"])._onKeyDown_((function(e){
  1941. return smalltalk.withContext(function($ctx3) { return _st(self)._handleSourceAreaKeyDown_(e);
  1942. })}));
  1943. return _st(self["@sourceArea"])._onKeyUp_((function(){
  1944. return smalltalk.withContext(function($ctx3) { return _st(self)._updateStatus();
  1945. })}));
  1946. })}));
  1947. return self}, self, "renderBottomPanelOn:", [html], smalltalk.Browser)}
  1948. }),
  1949. smalltalk.Browser);
  1950. smalltalk.addMethod(
  1951. "_renderBoxOn_",
  1952. smalltalk.method({
  1953. selector: "renderBoxOn:",
  1954. fn: function (html){
  1955. var self=this;
  1956. return smalltalk.withContext(function($ctx1) { var $1;
  1957. _st(self)._renderTopPanelOn_(html);
  1958. _st(self)._renderTabsOn_(html);
  1959. $1=_st(self)._renderBottomPanelOn_(html);
  1960. return self}, self, "renderBoxOn:", [html], smalltalk.Browser)}
  1961. }),
  1962. smalltalk.Browser);
  1963. smalltalk.addMethod(
  1964. "_renderButtonsOn_",
  1965. smalltalk.method({
  1966. selector: "renderButtonsOn:",
  1967. fn: function (html){
  1968. var self=this;
  1969. return smalltalk.withContext(function($ctx1) { var $1,$2,$4,$5,$6,$7,$8,$9,$3;
  1970. self["@saveButton"]=_st(html)._button();
  1971. _st(self["@saveButton"])._with_("Save");
  1972. $1=_st(self["@saveButton"])._onClick_((function(){
  1973. return smalltalk.withContext(function($ctx2) { return _st(self)._compile();
  1974. })}));
  1975. self["@methodButtons"]=_st(html)._span();
  1976. self["@classButtons"]=_st(html)._span();
  1977. $2=_st(html)._div();
  1978. _st($2)._class_("right");
  1979. $3=_st($2)._with_((function(){
  1980. return smalltalk.withContext(function($ctx2) { $4=_st(html)._button();
  1981. _st($4)._with_("DoIt");
  1982. $5=_st($4)._onClick_((function(){
  1983. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._doIt();
  1984. })}));
  1985. $5;
  1986. $6=_st(html)._button();
  1987. _st($6)._with_("PrintIt");
  1988. $7=_st($6)._onClick_((function(){
  1989. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._printIt();
  1990. })}));
  1991. $7;
  1992. $8=_st(html)._button();
  1993. _st($8)._with_("InspectIt");
  1994. $9=_st($8)._onClick_((function(){
  1995. return smalltalk.withContext(function($ctx3) { return _st(self["@sourceArea"])._inspectIt();
  1996. })}));
  1997. return $9;
  1998. })}));
  1999. _st(self)._updateSourceAndButtons();
  2000. return self}, self, "renderButtonsOn:", [html], smalltalk.Browser)}
  2001. }),
  2002. smalltalk.Browser);
  2003. smalltalk.addMethod(
  2004. "_renderTabsOn_",
  2005. smalltalk.method({
  2006. selector: "renderTabsOn:",
  2007. fn: function (html){
  2008. var self=this;
  2009. return smalltalk.withContext(function($ctx1) { self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2010. _st(self)._updateTabsList();
  2011. return self}, self, "renderTabsOn:", [html], smalltalk.Browser)}
  2012. }),
  2013. smalltalk.Browser);
  2014. smalltalk.addMethod(
  2015. "_renderTopPanelOn_",
  2016. smalltalk.method({
  2017. selector: "renderTopPanelOn:",
  2018. fn: function (html){
  2019. var self=this;
  2020. return smalltalk.withContext(function($ctx1) { var $1,$3,$5,$6,$7,$8,$9,$10,$4,$11,$2;
  2021. $1=_st(html)._div();
  2022. _st($1)._class_("top");
  2023. $2=_st($1)._with_((function(){
  2024. return smalltalk.withContext(function($ctx2) { self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column browser packages");
  2025. self["@packagesList"];
  2026. $3=_st(html)._div();
  2027. _st($3)._class_("amber_packagesButtons");
  2028. $4=_st($3)._with_((function(){
  2029. return smalltalk.withContext(function($ctx3) { $5=_st(html)._button();
  2030. _st($5)._title_("Commit classes in this package to disk");
  2031. _st($5)._onClick_((function(){
  2032. return smalltalk.withContext(function($ctx4) { return _st(self)._commitPackage();
  2033. })}));
  2034. $6=_st($5)._with_("Commit");
  2035. $6;
  2036. $7=_st(html)._button();
  2037. _st($7)._title_("Rename package");
  2038. _st($7)._onClick_((function(){
  2039. return smalltalk.withContext(function($ctx4) { return _st(self)._renamePackage();
  2040. })}));
  2041. $8=_st($7)._with_("Rename");
  2042. $8;
  2043. $9=_st(html)._button();
  2044. _st($9)._title_("Remove this package from the system");
  2045. _st($9)._onClick_((function(){
  2046. return smalltalk.withContext(function($ctx4) { return _st(self)._removePackage();
  2047. })}));
  2048. $10=_st($9)._with_("Remove");
  2049. return $10;
  2050. })}));
  2051. $4;
  2052. self["@classesList"]=_st((smalltalk.ClassesList || ClassesList))._on_(self);
  2053. self["@classesList"];
  2054. _st(self["@classesList"])._renderOn_(html);
  2055. self["@protocolsList"]=_st(_st(html)._ul())._class_("amber_column browser protocols");
  2056. self["@protocolsList"];
  2057. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2058. self["@methodsList"];
  2059. _st(self)._updateCategoriesList();
  2060. _st(self)._updateClassesList();
  2061. _st(self)._updateProtocolsList();
  2062. $11=_st(self)._updateMethodsList();
  2063. $11;
  2064. return _st(_st(html)._div())._class_("amber_clear");
  2065. })}));
  2066. return self}, self, "renderTopPanelOn:", [html], smalltalk.Browser)}
  2067. }),
  2068. smalltalk.Browser);
  2069. smalltalk.addMethod(
  2070. "_resetClassesList",
  2071. smalltalk.method({
  2072. selector: "resetClassesList",
  2073. fn: function (){
  2074. var self=this;
  2075. return smalltalk.withContext(function($ctx1) { _st(self["@classesList"])._resetNodes();
  2076. return self}, self, "resetClassesList", [], smalltalk.Browser)}
  2077. }),
  2078. smalltalk.Browser);
  2079. smalltalk.addMethod(
  2080. "_search_",
  2081. smalltalk.method({
  2082. selector: "search:",
  2083. fn: function (aString){
  2084. var self=this;
  2085. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2086. $1=_st(self)._cancelChanges();
  2087. if(smalltalk.assert($1)){
  2088. $ctx1.searchedClass=nil;
  2089. $ctx1.locals.searchedClass=_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._at_(aString);
  2090. $ctx1.locals.searchedClass;
  2091. $2=_st($ctx1.locals.searchedClass)._isClass();
  2092. if(smalltalk.assert($2)){
  2093. _st(_st(self)._class())._openOn_($ctx1.locals.searchedClass);
  2094. } else {
  2095. _st(self)._searchReferencesOf_(aString);
  2096. };
  2097. };
  2098. return self}, self, "search:", [aString], smalltalk.Browser)}
  2099. }),
  2100. smalltalk.Browser);
  2101. smalltalk.addMethod(
  2102. "_searchClassReferences",
  2103. smalltalk.method({
  2104. selector: "searchClassReferences",
  2105. fn: function (){
  2106. var self=this;
  2107. return smalltalk.withContext(function($ctx1) { _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(_st(self["@selectedClass"])._name());
  2108. return self}, self, "searchClassReferences", [], smalltalk.Browser)}
  2109. }),
  2110. smalltalk.Browser);
  2111. smalltalk.addMethod(
  2112. "_searchReferencesOf_",
  2113. smalltalk.method({
  2114. selector: "searchReferencesOf:",
  2115. fn: function (aString){
  2116. var self=this;
  2117. return smalltalk.withContext(function($ctx1) { _st((smalltalk.ReferencesBrowser || ReferencesBrowser))._search_(aString);
  2118. return self}, self, "searchReferencesOf:", [aString], smalltalk.Browser)}
  2119. }),
  2120. smalltalk.Browser);
  2121. smalltalk.addMethod(
  2122. "_selectCategory_",
  2123. smalltalk.method({
  2124. selector: "selectCategory:",
  2125. fn: function (aCategory){
  2126. var self=this;
  2127. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2128. $1=_st(self)._cancelChanges();
  2129. if(smalltalk.assert($1)){
  2130. self["@selectedPackage"]=aCategory;
  2131. self["@selectedPackage"];
  2132. self["@selectedMethod"]=nil;
  2133. self["@selectedProtocol"]=self["@selectedMethod"];
  2134. self["@selectedClass"]=self["@selectedProtocol"];
  2135. self["@selectedClass"];
  2136. _st(self)._resetClassesList();
  2137. _st(self)._updateCategoriesList();
  2138. _st(self)._updateClassesList();
  2139. _st(self)._updateProtocolsList();
  2140. _st(self)._updateMethodsList();
  2141. $2=_st(self)._updateSourceAndButtons();
  2142. $2;
  2143. };
  2144. return self}, self, "selectCategory:", [aCategory], smalltalk.Browser)}
  2145. }),
  2146. smalltalk.Browser);
  2147. smalltalk.addMethod(
  2148. "_selectClass_",
  2149. smalltalk.method({
  2150. selector: "selectClass:",
  2151. fn: function (aClass){
  2152. var self=this;
  2153. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2154. $1=_st(self)._cancelChanges();
  2155. if(smalltalk.assert($1)){
  2156. self["@selectedClass"]=aClass;
  2157. self["@selectedClass"];
  2158. self["@selectedMethod"]=nil;
  2159. self["@selectedProtocol"]=self["@selectedMethod"];
  2160. self["@selectedProtocol"];
  2161. _st(self)._updateClassesList();
  2162. _st(self)._updateProtocolsList();
  2163. _st(self)._updateMethodsList();
  2164. $2=_st(self)._updateSourceAndButtons();
  2165. $2;
  2166. };
  2167. return self}, self, "selectClass:", [aClass], smalltalk.Browser)}
  2168. }),
  2169. smalltalk.Browser);
  2170. smalltalk.addMethod(
  2171. "_selectMethod_",
  2172. smalltalk.method({
  2173. selector: "selectMethod:",
  2174. fn: function (aMethod){
  2175. var self=this;
  2176. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2177. $1=_st(self)._cancelChanges();
  2178. if(smalltalk.assert($1)){
  2179. self["@selectedMethod"]=aMethod;
  2180. self["@selectedMethod"];
  2181. _st(self)._updateProtocolsList();
  2182. _st(self)._updateMethodsList();
  2183. $2=_st(self)._updateSourceAndButtons();
  2184. $2;
  2185. };
  2186. return self}, self, "selectMethod:", [aMethod], smalltalk.Browser)}
  2187. }),
  2188. smalltalk.Browser);
  2189. smalltalk.addMethod(
  2190. "_selectProtocol_",
  2191. smalltalk.method({
  2192. selector: "selectProtocol:",
  2193. fn: function (aString){
  2194. var self=this;
  2195. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2196. $1=_st(self)._cancelChanges();
  2197. if(smalltalk.assert($1)){
  2198. self["@selectedProtocol"]=aString;
  2199. self["@selectedProtocol"];
  2200. self["@selectedMethod"]=nil;
  2201. self["@selectedMethod"];
  2202. _st(self)._updateProtocolsList();
  2203. _st(self)._updateMethodsList();
  2204. $2=_st(self)._updateSourceAndButtons();
  2205. $2;
  2206. };
  2207. return self}, self, "selectProtocol:", [aString], smalltalk.Browser)}
  2208. }),
  2209. smalltalk.Browser);
  2210. smalltalk.addMethod(
  2211. "_selectTab_",
  2212. smalltalk.method({
  2213. selector: "selectTab:",
  2214. fn: function (aString){
  2215. var self=this;
  2216. return smalltalk.withContext(function($ctx1) { var $1;
  2217. $1=_st(self)._cancelChanges();
  2218. if(smalltalk.assert($1)){
  2219. self["@selectedTab"]=aString;
  2220. self["@selectedTab"];
  2221. _st(self)._selectProtocol_(nil);
  2222. _st(self)._updateTabsList();
  2223. };
  2224. return self}, self, "selectTab:", [aString], smalltalk.Browser)}
  2225. }),
  2226. smalltalk.Browser);
  2227. smalltalk.addMethod(
  2228. "_selectedClass",
  2229. smalltalk.method({
  2230. selector: "selectedClass",
  2231. fn: function (){
  2232. var self=this;
  2233. return smalltalk.withContext(function($ctx1) { return self["@selectedClass"];
  2234. }, self, "selectedClass", [], smalltalk.Browser)}
  2235. }),
  2236. smalltalk.Browser);
  2237. smalltalk.addMethod(
  2238. "_selectedPackage",
  2239. smalltalk.method({
  2240. selector: "selectedPackage",
  2241. fn: function (){
  2242. var self=this;
  2243. return smalltalk.withContext(function($ctx1) { return self["@selectedPackage"];
  2244. }, self, "selectedPackage", [], smalltalk.Browser)}
  2245. }),
  2246. smalltalk.Browser);
  2247. smalltalk.addMethod(
  2248. "_setMethodProtocol_",
  2249. smalltalk.method({
  2250. selector: "setMethodProtocol:",
  2251. fn: function (aString){
  2252. var self=this;
  2253. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2254. $1=_st(self)._cancelChanges();
  2255. if(smalltalk.assert($1)){
  2256. $2=_st(_st(self)._protocols())._includes_(aString);
  2257. if(smalltalk.assert($2)){
  2258. _st(self["@selectedMethod"])._category_(aString);
  2259. self["@selectedProtocol"]=aString;
  2260. self["@selectedProtocol"];
  2261. self["@selectedMethod"]=self["@selectedMethod"];
  2262. self["@selectedMethod"];
  2263. _st(self)._updateProtocolsList();
  2264. _st(self)._updateMethodsList();
  2265. $3=_st(self)._updateSourceAndButtons();
  2266. $3;
  2267. } else {
  2268. _st(self)._addNewProtocol();
  2269. };
  2270. };
  2271. return self}, self, "setMethodProtocol:", [aString], smalltalk.Browser)}
  2272. }),
  2273. smalltalk.Browser);
  2274. smalltalk.addMethod(
  2275. "_showClassButtons",
  2276. smalltalk.method({
  2277. selector: "showClassButtons",
  2278. fn: function (){
  2279. var self=this;
  2280. return smalltalk.withContext(function($ctx1) { _st(_st(self["@classButtons"])._asJQuery())._show();
  2281. return self}, self, "showClassButtons", [], smalltalk.Browser)}
  2282. }),
  2283. smalltalk.Browser);
  2284. smalltalk.addMethod(
  2285. "_showMethodButtons",
  2286. smalltalk.method({
  2287. selector: "showMethodButtons",
  2288. fn: function (){
  2289. var self=this;
  2290. return smalltalk.withContext(function($ctx1) { _st(_st(self["@methodButtons"])._asJQuery())._show();
  2291. return self}, self, "showMethodButtons", [], smalltalk.Browser)}
  2292. }),
  2293. smalltalk.Browser);
  2294. smalltalk.addMethod(
  2295. "_source",
  2296. smalltalk.method({
  2297. selector: "source",
  2298. fn: function (){
  2299. var self=this;
  2300. return smalltalk.withContext(function($ctx1) { var $1,$3,$2,$4;
  2301. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  2302. if(! smalltalk.assert($1)){
  2303. $3=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  2304. return smalltalk.withContext(function($ctx2) { return _st(self["@selectedMethod"])._notNil();
  2305. })}));
  2306. if(smalltalk.assert($3)){
  2307. $2=_st(self)._methodSource();
  2308. } else {
  2309. $2=_st(self)._declarationSource();
  2310. };
  2311. return $2;
  2312. };
  2313. if(($receiver = self["@selectedClass"]) == nil || $receiver == undefined){
  2314. $4="";
  2315. } else {
  2316. $4=_st(self)._classCommentSource();
  2317. };
  2318. return $4;
  2319. }, self, "source", [], smalltalk.Browser)}
  2320. }),
  2321. smalltalk.Browser);
  2322. smalltalk.addMethod(
  2323. "_updateCategoriesList",
  2324. smalltalk.method({
  2325. selector: "updateCategoriesList",
  2326. fn: function (){
  2327. var self=this;
  2328. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2329. _st(self["@packagesList"])._contents_((function(html){
  2330. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._packages())._do_((function(each){
  2331. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  2332. $ctx3.label=nil;
  2333. $1=_st(each)._isEmpty();
  2334. if(smalltalk.assert($1)){
  2335. $ctx3.locals.label="Unclassified";
  2336. $ctx3.locals.label;
  2337. } else {
  2338. $ctx3.locals.label=each;
  2339. $ctx3.locals.label;
  2340. };
  2341. $ctx3.locals.li=_st(html)._li();
  2342. $ctx3.locals.li;
  2343. $2=_st(self["@selectedPackage"]).__eq(each);
  2344. if(smalltalk.assert($2)){
  2345. _st($ctx3.locals.li)._class_("selected");
  2346. };
  2347. _st($ctx3.locals.li)._with_($ctx3.locals.label);
  2348. $3=_st($ctx3.locals.li)._onClick_((function(){
  2349. return smalltalk.withContext(function($ctx4) { return _st(self)._selectCategory_(each);
  2350. })}));
  2351. return $3;
  2352. })}));
  2353. })}));
  2354. return self}, self, "updateCategoriesList", [], smalltalk.Browser)}
  2355. }),
  2356. smalltalk.Browser);
  2357. smalltalk.addMethod(
  2358. "_updateClassesList",
  2359. smalltalk.method({
  2360. selector: "updateClassesList",
  2361. fn: function (){
  2362. var self=this;
  2363. return smalltalk.withContext(function($ctx1) { _st(_st((smalltalk.TabManager || TabManager))._current())._update();
  2364. _st(self["@classesList"])._updateNodes();
  2365. return self}, self, "updateClassesList", [], smalltalk.Browser)}
  2366. }),
  2367. smalltalk.Browser);
  2368. smalltalk.addMethod(
  2369. "_updateMethodsList",
  2370. smalltalk.method({
  2371. selector: "updateMethodsList",
  2372. fn: function (){
  2373. var self=this;
  2374. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2375. _st(self["@methodsList"])._contents_((function(html){
  2376. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._methods())._do_((function(each){
  2377. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  2378. $ctx3.locals.li=_st(html)._li();
  2379. $ctx3.locals.li;
  2380. $1=_st(self["@selectedMethod"]).__eq(each);
  2381. if(smalltalk.assert($1)){
  2382. _st($ctx3.locals.li)._class_("selected");
  2383. };
  2384. _st($ctx3.locals.li)._with_(_st(each)._selector());
  2385. $2=_st($ctx3.locals.li)._onClick_((function(){
  2386. return smalltalk.withContext(function($ctx4) { return _st(self)._selectMethod_(each);
  2387. })}));
  2388. return $2;
  2389. })}));
  2390. })}));
  2391. return self}, self, "updateMethodsList", [], smalltalk.Browser)}
  2392. }),
  2393. smalltalk.Browser);
  2394. smalltalk.addMethod(
  2395. "_updateProtocolsList",
  2396. smalltalk.method({
  2397. selector: "updateProtocolsList",
  2398. fn: function (){
  2399. var self=this;
  2400. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2401. _st(self["@protocolsList"])._contents_((function(html){
  2402. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._protocols())._do_((function(each){
  2403. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  2404. $ctx3.locals.li=_st(html)._li();
  2405. $ctx3.locals.li;
  2406. $1=_st(self["@selectedProtocol"]).__eq(each);
  2407. if(smalltalk.assert($1)){
  2408. _st($ctx3.locals.li)._class_("selected");
  2409. };
  2410. _st($ctx3.locals.li)._with_(each);
  2411. $2=_st($ctx3.locals.li)._onClick_((function(){
  2412. return smalltalk.withContext(function($ctx4) { return _st(self)._selectProtocol_(each);
  2413. })}));
  2414. return $2;
  2415. })}));
  2416. })}));
  2417. return self}, self, "updateProtocolsList", [], smalltalk.Browser)}
  2418. }),
  2419. smalltalk.Browser);
  2420. smalltalk.addMethod(
  2421. "_updateSourceAndButtons",
  2422. smalltalk.method({
  2423. selector: "updateSourceAndButtons",
  2424. fn: function (){
  2425. var self=this;
  2426. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$15,$16,$17,$18,$19,$13,$20,$22,$23,$24,$25,$21,$26,$27;
  2427. $ctx1.currentProtocol=nil;
  2428. _st(self)._disableSaveButton();
  2429. _st(self["@classButtons"])._contents_((function(html){
  2430. return smalltalk.withContext(function($ctx2) { $1=_st(html)._button();
  2431. _st($1)._title_("Create a new class");
  2432. _st($1)._onClick_((function(){
  2433. return smalltalk.withContext(function($ctx3) { return _st(self)._addNewClass();
  2434. })}));
  2435. $2=_st($1)._with_("New class");
  2436. $2;
  2437. $3=_st(html)._button();
  2438. _st($3)._with_("Rename class");
  2439. $4=_st($3)._onClick_((function(){
  2440. return smalltalk.withContext(function($ctx3) { return _st(self)._renameClass();
  2441. })}));
  2442. $4;
  2443. $5=_st(html)._button();
  2444. _st($5)._with_("Copy class");
  2445. $6=_st($5)._onClick_((function(){
  2446. return smalltalk.withContext(function($ctx3) { return _st(self)._copyClass();
  2447. })}));
  2448. $6;
  2449. $7=_st(html)._button();
  2450. _st($7)._with_("Remove class");
  2451. $8=_st($7)._onClick_((function(){
  2452. return smalltalk.withContext(function($ctx3) { return _st(self)._removeClass();
  2453. })}));
  2454. $8;
  2455. $9=_st(html)._button();
  2456. _st($9)._with_("References");
  2457. $10=_st($9)._onClick_((function(){
  2458. return smalltalk.withContext(function($ctx3) { return _st(self)._searchClassReferences();
  2459. })}));
  2460. return $10;
  2461. })}));
  2462. _st(self["@methodButtons"])._contents_((function(html){
  2463. return smalltalk.withContext(function($ctx2) { $ctx2.protocolSelect=nil;
  2464. $ctx2.referencesSelect=nil;
  2465. $11=_st(html)._button();
  2466. _st($11)._with_("Remove method");
  2467. $12=_st($11)._onClick_((function(){
  2468. return smalltalk.withContext(function($ctx3) { return _st(self)._removeMethod();
  2469. })}));
  2470. $12;
  2471. $ctx2.locals.protocolSelect=_st(html)._select();
  2472. $ctx2.locals.protocolSelect;
  2473. _st($ctx2.locals.protocolSelect)._onChange_((function(){
  2474. return smalltalk.withContext(function($ctx3) { return _st(self)._setMethodProtocol_(_st(_st($ctx2.locals.protocolSelect)._asJQuery())._val());
  2475. })}));
  2476. $13=_st($ctx2.locals.protocolSelect)._with_((function(){
  2477. return smalltalk.withContext(function($ctx3) { $14=_st(html)._option();
  2478. _st($14)._with_("Method protocol");
  2479. $15=_st($14)._at_put_("disabled","disabled");
  2480. $15;
  2481. $16=_st(html)._option();
  2482. _st($16)._class_("important");
  2483. $17=_st($16)._with_("New...");
  2484. $17;
  2485. $ctx1.locals.currentProtocol=self["@selectedProtocol"];
  2486. $ctx1.locals.currentProtocol;
  2487. $18=_st(_st($ctx1.locals.currentProtocol)._isNil())._and_((function(){
  2488. return smalltalk.withContext(function($ctx4) { return _st(self["@selectedMethod"])._notNil();
  2489. })}));
  2490. if(smalltalk.assert($18)){
  2491. $ctx1.locals.currentProtocol=_st(self["@selectedMethod"])._category();
  2492. $ctx1.locals.currentProtocol;
  2493. };
  2494. return _st(_st(self)._protocols())._do_((function(each){
  2495. return smalltalk.withContext(function($ctx4) { option=_st(_st(html)._option())._with_(each);
  2496. option;
  2497. $19=_st($ctx1.locals.currentProtocol).__eq(each);
  2498. if(smalltalk.assert($19)){
  2499. return _st(option)._at_put_("selected","selected");
  2500. };
  2501. })}));
  2502. })}));
  2503. $13;
  2504. $20=_st(self["@selectedMethod"])._isNil();
  2505. if(! smalltalk.assert($20)){
  2506. $ctx2.locals.referencesSelect=_st(html)._select();
  2507. $ctx2.locals.referencesSelect;
  2508. _st($ctx2.locals.referencesSelect)._onChange_((function(){
  2509. return smalltalk.withContext(function($ctx3) { return _st(self)._searchReferencesOf_(_st(_st($ctx2.locals.referencesSelect)._asJQuery())._val());
  2510. })}));
  2511. $21=_st($ctx2.locals.referencesSelect)._with_((function(){
  2512. return smalltalk.withContext(function($ctx3) { $ctx3.option=nil;
  2513. $22=_st(html)._option();
  2514. _st($22)._with_("References");
  2515. _st($22)._at_put_("disabled","disabled");
  2516. $23=_st($22)._at_put_("selected","selected");
  2517. $23;
  2518. $24=_st(html)._option();
  2519. _st($24)._class_("important");
  2520. $25=_st($24)._with_(_st(self["@selectedMethod"])._selector());
  2521. $25;
  2522. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  2523. return smalltalk.withContext(function($ctx4) { return _st(_st(html)._option())._with_(each);
  2524. })}));
  2525. })}));
  2526. return $21;
  2527. };
  2528. })}));
  2529. $26=_st(self["@selectedMethod"])._isNil();
  2530. if(smalltalk.assert($26)){
  2531. _st(self)._hideMethodButtons();
  2532. $27=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  2533. return smalltalk.withContext(function($ctx2) { return _st(self["@selectedProtocol"])._notNil();
  2534. })}));
  2535. if(smalltalk.assert($27)){
  2536. _st(self)._hideClassButtons();
  2537. } else {
  2538. _st(self)._showClassButtons();
  2539. };
  2540. } else {
  2541. _st(self)._hideClassButtons();
  2542. _st(self)._showMethodButtons();
  2543. };
  2544. _st(self["@sourceArea"])._val_(_st(self)._source());
  2545. return self}, self, "updateSourceAndButtons", [], smalltalk.Browser)}
  2546. }),
  2547. smalltalk.Browser);
  2548. smalltalk.addMethod(
  2549. "_updateStatus",
  2550. smalltalk.method({
  2551. selector: "updateStatus",
  2552. fn: function (){
  2553. var self=this;
  2554. return smalltalk.withContext(function($ctx1) { var $1;
  2555. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  2556. if(smalltalk.assert($1)){
  2557. if(($receiver = self["@saveButton"]) == nil || $receiver == undefined){
  2558. self["@saveButton"];
  2559. } else {
  2560. _st(self["@saveButton"])._at_put_("disabled",true);
  2561. };
  2562. self["@unsavedChanges"]=false;
  2563. self["@unsavedChanges"];
  2564. } else {
  2565. if(($receiver = self["@saveButton"]) == nil || $receiver == undefined){
  2566. self["@saveButton"];
  2567. } else {
  2568. _st(self["@saveButton"])._removeAt_("disabled");
  2569. };
  2570. self["@unsavedChanges"]=true;
  2571. self["@unsavedChanges"];
  2572. };
  2573. return self}, self, "updateStatus", [], smalltalk.Browser)}
  2574. }),
  2575. smalltalk.Browser);
  2576. smalltalk.addMethod(
  2577. "_updateTabsList",
  2578. smalltalk.method({
  2579. selector: "updateTabsList",
  2580. fn: function (){
  2581. var self=this;
  2582. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12;
  2583. _st(self["@tabsList"])._contents_((function(html){
  2584. return smalltalk.withContext(function($ctx2) { $ctx2.li=nil;
  2585. $ctx2.locals.li=_st(html)._li();
  2586. $ctx2.locals.li;
  2587. $1=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("instance"));
  2588. if(smalltalk.assert($1)){
  2589. _st($ctx2.locals.li)._class_("selected");
  2590. };
  2591. _st($ctx2.locals.li)._with_((function(){
  2592. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2593. $2=_st(html)._span();
  2594. _st($2)._class_("mtab");
  2595. $3=_st($2)._with_("Instance");
  2596. $3;
  2597. return _st(_st(html)._span())._class_("rtab");
  2598. })}));
  2599. $4=_st($ctx2.locals.li)._onClick_((function(){
  2600. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("instance"));
  2601. })}));
  2602. $4;
  2603. $ctx2.locals.li=_st(html)._li();
  2604. $ctx2.locals.li;
  2605. $5=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("class"));
  2606. if(smalltalk.assert($5)){
  2607. _st($ctx2.locals.li)._class_("selected");
  2608. };
  2609. _st($ctx2.locals.li)._with_((function(){
  2610. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2611. $6=_st(html)._span();
  2612. _st($6)._class_("mtab");
  2613. $7=_st($6)._with_("Class");
  2614. $7;
  2615. return _st(_st(html)._span())._class_("rtab");
  2616. })}));
  2617. $8=_st($ctx2.locals.li)._onClick_((function(){
  2618. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("class"));
  2619. })}));
  2620. $8;
  2621. $ctx2.locals.li=_st(html)._li();
  2622. $ctx2.locals.li;
  2623. $9=_st(self["@selectedTab"]).__eq(smalltalk.symbolFor("comment"));
  2624. if(smalltalk.assert($9)){
  2625. _st($ctx2.locals.li)._class_("selected");
  2626. };
  2627. _st($ctx2.locals.li)._with_((function(){
  2628. return smalltalk.withContext(function($ctx3) { _st(_st(html)._span())._class_("ltab");
  2629. $10=_st(html)._span();
  2630. _st($10)._class_("mtab");
  2631. $11=_st($10)._with_("Comment");
  2632. $11;
  2633. return _st(_st(html)._span())._class_("rtab");
  2634. })}));
  2635. $12=_st($ctx2.locals.li)._onClick_((function(){
  2636. return smalltalk.withContext(function($ctx3) { return _st(self)._selectTab_(smalltalk.symbolFor("comment"));
  2637. })}));
  2638. return $12;
  2639. })}));
  2640. return self}, self, "updateTabsList", [], smalltalk.Browser)}
  2641. }),
  2642. smalltalk.Browser);
  2643. smalltalk.addMethod(
  2644. "_open",
  2645. smalltalk.method({
  2646. selector: "open",
  2647. fn: function (){
  2648. var self=this;
  2649. return smalltalk.withContext(function($ctx1) { _st(_st(self)._new())._open();
  2650. return self}, self, "open", [], smalltalk.Browser.klass)}
  2651. }),
  2652. smalltalk.Browser.klass);
  2653. smalltalk.addMethod(
  2654. "_openOn_",
  2655. smalltalk.method({
  2656. selector: "openOn:",
  2657. fn: function (aClass){
  2658. var self=this;
  2659. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  2660. $2=_st(self)._new();
  2661. _st($2)._open();
  2662. _st($2)._selectCategory_(_st(aClass)._category());
  2663. $3=_st($2)._selectClass_(aClass);
  2664. $1=$3;
  2665. return $1;
  2666. }, self, "openOn:", [aClass], smalltalk.Browser.klass)}
  2667. }),
  2668. smalltalk.Browser.klass);
  2669. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  2670. smalltalk.addMethod(
  2671. "_arguments",
  2672. smalltalk.method({
  2673. selector: "arguments",
  2674. fn: function (){
  2675. var self=this;
  2676. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2677. $2=_st(self)._method();
  2678. if(($receiver = $2) == nil || $receiver == undefined){
  2679. $1=_st(_st(self["@selectedContext"])._temps())._collect_((function(each){
  2680. return smalltalk.withContext(function($ctx2) { return nil;
  2681. })}));
  2682. } else {
  2683. $1=_st(_st(self)._method())._arguments();
  2684. };
  2685. return $1;
  2686. }, self, "arguments", [], smalltalk.Debugger)}
  2687. }),
  2688. smalltalk.Debugger);
  2689. smalltalk.addMethod(
  2690. "_canBeClosed",
  2691. smalltalk.method({
  2692. selector: "canBeClosed",
  2693. fn: function (){
  2694. var self=this;
  2695. return smalltalk.withContext(function($ctx1) { return true;
  2696. }, self, "canBeClosed", [], smalltalk.Debugger)}
  2697. }),
  2698. smalltalk.Debugger);
  2699. smalltalk.addMethod(
  2700. "_error",
  2701. smalltalk.method({
  2702. selector: "error",
  2703. fn: function (){
  2704. var self=this;
  2705. return smalltalk.withContext(function($ctx1) { return self["@error"];
  2706. }, self, "error", [], smalltalk.Debugger)}
  2707. }),
  2708. smalltalk.Debugger);
  2709. smalltalk.addMethod(
  2710. "_error_",
  2711. smalltalk.method({
  2712. selector: "error:",
  2713. fn: function (anError){
  2714. var self=this;
  2715. return smalltalk.withContext(function($ctx1) { self["@error"]=anError;
  2716. return self}, self, "error:", [anError], smalltalk.Debugger)}
  2717. }),
  2718. smalltalk.Debugger);
  2719. smalltalk.addMethod(
  2720. "_initialize",
  2721. smalltalk.method({
  2722. selector: "initialize",
  2723. fn: function (){
  2724. var self=this;
  2725. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  2726. _st(self["@unsavedChanges"]).__eq(false);
  2727. return self}, self, "initialize", [], smalltalk.Debugger)}
  2728. }),
  2729. smalltalk.Debugger);
  2730. smalltalk.addMethod(
  2731. "_inspectSelectedVariable",
  2732. smalltalk.method({
  2733. selector: "inspectSelectedVariable",
  2734. fn: function (){
  2735. var self=this;
  2736. return smalltalk.withContext(function($ctx1) { _st(self["@selectedVariable"])._inspect();
  2737. return self}, self, "inspectSelectedVariable", [], smalltalk.Debugger)}
  2738. }),
  2739. smalltalk.Debugger);
  2740. smalltalk.addMethod(
  2741. "_label",
  2742. smalltalk.method({
  2743. selector: "label",
  2744. fn: function (){
  2745. var self=this;
  2746. return smalltalk.withContext(function($ctx1) { return "[Debugger]";
  2747. }, self, "label", [], smalltalk.Debugger)}
  2748. }),
  2749. smalltalk.Debugger);
  2750. smalltalk.addMethod(
  2751. "_method",
  2752. smalltalk.method({
  2753. selector: "method",
  2754. fn: function (){
  2755. var self=this;
  2756. return smalltalk.withContext(function($ctx1) { var $1;
  2757. $1=_st(_st(_st(self["@selectedContext"])._receiver())._class())._lookupSelector_(_st(self["@selectedContext"])._selector());
  2758. return $1;
  2759. }, self, "method", [], smalltalk.Debugger)}
  2760. }),
  2761. smalltalk.Debugger);
  2762. smalltalk.addMethod(
  2763. "_proceed",
  2764. smalltalk.method({
  2765. selector: "proceed",
  2766. fn: function (){
  2767. var self=this;
  2768. return smalltalk.withContext(function($ctx1) { _st(self)._close();
  2769. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  2770. return self}, self, "proceed", [], smalltalk.Debugger)}
  2771. }),
  2772. smalltalk.Debugger);
  2773. smalltalk.addMethod(
  2774. "_receiver",
  2775. smalltalk.method({
  2776. selector: "receiver",
  2777. fn: function (){
  2778. var self=this;
  2779. return smalltalk.withContext(function($ctx1) { var $1;
  2780. $1=_st(self["@selectedContext"])._receiver();
  2781. return $1;
  2782. }, self, "receiver", [], smalltalk.Debugger)}
  2783. }),
  2784. smalltalk.Debugger);
  2785. smalltalk.addMethod(
  2786. "_renderBottomPanelOn_",
  2787. smalltalk.method({
  2788. selector: "renderBottomPanelOn:",
  2789. fn: function (html){
  2790. var self=this;
  2791. return smalltalk.withContext(function($ctx1) { var $1,$2;
  2792. $1=_st(html)._div();
  2793. _st($1)._class_("amber_sourceCode debugger");
  2794. $2=_st($1)._with_((function(){
  2795. return smalltalk.withContext(function($ctx2) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  2796. self["@sourceArea"];
  2797. return _st(self["@sourceArea"])._renderOn_(html);
  2798. })}));
  2799. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  2800. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  2801. _st(self["@sourceArea"])._onKeyUp_((function(){
  2802. return smalltalk.withContext(function($ctx2) { return _st(self)._updateStatus();
  2803. })}));
  2804. return self}, self, "renderBottomPanelOn:", [html], smalltalk.Debugger)}
  2805. }),
  2806. smalltalk.Debugger);
  2807. smalltalk.addMethod(
  2808. "_renderBoxOn_",
  2809. smalltalk.method({
  2810. selector: "renderBoxOn:",
  2811. fn: function (html){
  2812. var self=this;
  2813. return smalltalk.withContext(function($ctx1) { var $1;
  2814. _st(self)._renderTopPanelOn_(html);
  2815. $1=_st(self)._renderBottomPanelOn_(html);
  2816. return self}, self, "renderBoxOn:", [html], smalltalk.Debugger)}
  2817. }),
  2818. smalltalk.Debugger);
  2819. smalltalk.addMethod(
  2820. "_renderButtonsOn_",
  2821. smalltalk.method({
  2822. selector: "renderButtonsOn:",
  2823. fn: function (html){
  2824. var self=this;
  2825. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  2826. _st(self)._inspect();
  2827. $1=_st(html)._button();
  2828. _st($1)._with_("Save");
  2829. $2=_st($1)._onClick_((function(){
  2830. return smalltalk.withContext(function($ctx2) { return _st(self)._save();
  2831. })}));
  2832. self["@saveButton"]=$2;
  2833. $3=_st(html)._button();
  2834. _st($3)._with_("DoIt");
  2835. $4=_st($3)._onClick_((function(){
  2836. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._doIt();
  2837. })}));
  2838. $5=_st(html)._button();
  2839. _st($5)._with_("PrintIt");
  2840. $6=_st($5)._onClick_((function(){
  2841. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._printIt();
  2842. })}));
  2843. $7=_st(html)._button();
  2844. _st($7)._with_("InspectIt");
  2845. $8=_st($7)._onClick_((function(){
  2846. return smalltalk.withContext(function($ctx2) { return _st(self["@sourceArea"])._inspectIt();
  2847. })}));
  2848. $9=_st(html)._button();
  2849. _st($9)._with_("Proceed");
  2850. $10=_st($9)._onClick_((function(){
  2851. return smalltalk.withContext(function($ctx2) { return _st(self)._proceed();
  2852. })}));
  2853. $11=_st(html)._button();
  2854. _st($11)._with_("Abandon");
  2855. $12=_st($11)._onClick_((function(){
  2856. return smalltalk.withContext(function($ctx2) { return _st(self)._close();
  2857. })}));
  2858. $13=_st(html)._button();
  2859. _st($13)._class_("amber_button debugger inspect");
  2860. _st($13)._with_("Inspect");
  2861. $14=_st($13)._onClick_((function(){
  2862. return smalltalk.withContext(function($ctx2) { return _st(self)._inspectSelectedVariable();
  2863. })}));
  2864. self["@inspectButton"]=$14;
  2865. _st(self)._updateSourceArea();
  2866. _st(self)._updateStatus();
  2867. _st(self)._updateVariablesList();
  2868. $15=_st(self)._updateInspector();
  2869. return self}, self, "renderButtonsOn:", [html], smalltalk.Debugger)}
  2870. }),
  2871. smalltalk.Debugger);
  2872. smalltalk.addMethod(
  2873. "_renderContext_on_",
  2874. smalltalk.method({
  2875. selector: "renderContext:on:",
  2876. fn: function (aContext,html){
  2877. var self=this;
  2878. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  2879. $ctx1.li=nil;
  2880. $ctx1.locals.li=_st(html)._li();
  2881. $1=_st(self["@selectedContext"]).__eq(aContext);
  2882. if(smalltalk.assert($1)){
  2883. _st($ctx1.locals.li)._class_("selected");
  2884. };
  2885. _st($ctx1.locals.li)._with_(_st(aContext)._asString());
  2886. $2=_st($ctx1.locals.li)._onClick_((function(){
  2887. return smalltalk.withContext(function($ctx2) { return _st(self)._selectContext_(aContext);
  2888. })}));
  2889. $3=_st(aContext)._home();
  2890. if(($receiver = $3) == nil || $receiver == undefined){
  2891. $3;
  2892. } else {
  2893. _st(self)._renderContext_on_(_st(aContext)._home(),html);
  2894. };
  2895. return self}, self, "renderContext:on:", [aContext,html], smalltalk.Debugger)}
  2896. }),
  2897. smalltalk.Debugger);
  2898. smalltalk.addMethod(
  2899. "_renderTopPanelOn_",
  2900. smalltalk.method({
  2901. selector: "renderTopPanelOn:",
  2902. fn: function (html){
  2903. var self=this;
  2904. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$6,$2;
  2905. self["@selectedContext"]=_st(_st(self)._error())._context();
  2906. $1=_st(html)._div();
  2907. _st($1)._class_("top");
  2908. $2=_st($1)._with_((function(){
  2909. return smalltalk.withContext(function($ctx2) { $3=_st(html)._div();
  2910. _st($3)._class_("label");
  2911. $4=_st($3)._with_(_st(_st(self)._error())._messageText());
  2912. $4;
  2913. $5=_st(html)._ul();
  2914. _st($5)._class_("amber_column debugger contexts");
  2915. $6=_st($5)._with_((function(){
  2916. return smalltalk.withContext(function($ctx3) { return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  2917. })}));
  2918. self["@ul"]=$6;
  2919. return self["@ul"];
  2920. })}));
  2921. return self}, self, "renderTopPanelOn:", [html], smalltalk.Debugger)}
  2922. }),
  2923. smalltalk.Debugger);
  2924. smalltalk.addMethod(
  2925. "_save",
  2926. smalltalk.method({
  2927. selector: "save",
  2928. fn: function (){
  2929. var self=this;
  2930. return smalltalk.withContext(function($ctx1) { $ctx1.protocol=nil;
  2931. $ctx1.locals.protocol=_st(_st(_st(_st(_st(self["@selectedContext"])._receiver())._class())._methodDictionary())._at_(_st(self["@selectedContext"])._selector()))._category();
  2932. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),$ctx1.locals.protocol);
  2933. _st(self)._updateStatus();
  2934. return self}, self, "save", [], smalltalk.Debugger)}
  2935. }),
  2936. smalltalk.Debugger);
  2937. smalltalk.addMethod(
  2938. "_selectContext_",
  2939. smalltalk.method({
  2940. selector: "selectContext:",
  2941. fn: function (aContext){
  2942. var self=this;
  2943. return smalltalk.withContext(function($ctx1) { var $1;
  2944. self["@selectedContext"]=aContext;
  2945. self["@selectedVariable"]=nil;
  2946. self["@selectedVariableName"]=nil;
  2947. _st(self)._updateContextsList();
  2948. _st(self)._updateSourceArea();
  2949. _st(self)._updateInspector();
  2950. _st(self)._updateVariablesList();
  2951. $1=_st(self)._updateStatus();
  2952. return self}, self, "selectContext:", [aContext], smalltalk.Debugger)}
  2953. }),
  2954. smalltalk.Debugger);
  2955. smalltalk.addMethod(
  2956. "_selectVariable_named_",
  2957. smalltalk.method({
  2958. selector: "selectVariable:named:",
  2959. fn: function (anObject,aString){
  2960. var self=this;
  2961. return smalltalk.withContext(function($ctx1) { self["@selectedVariable"]=anObject;
  2962. self["@selectedVariableName"]=aString;
  2963. _st(self["@inspector"])._contents_((function(html){
  2964. return smalltalk.withContext(function($ctx2) { return _st(html)._with_(_st(anObject)._printString());
  2965. })}));
  2966. _st(self)._updateVariablesList();
  2967. return self}, self, "selectVariable:named:", [anObject,aString], smalltalk.Debugger)}
  2968. }),
  2969. smalltalk.Debugger);
  2970. smalltalk.addMethod(
  2971. "_source",
  2972. smalltalk.method({
  2973. selector: "source",
  2974. fn: function (){
  2975. var self=this;
  2976. return smalltalk.withContext(function($ctx1) { var $2,$1;
  2977. $2=_st(self)._method();
  2978. if(($receiver = $2) == nil || $receiver == undefined){
  2979. $1="Method doesn't exist!";
  2980. } else {
  2981. $1=_st(_st(self)._method())._source();
  2982. };
  2983. return $1;
  2984. }, self, "source", [], smalltalk.Debugger)}
  2985. }),
  2986. smalltalk.Debugger);
  2987. smalltalk.addMethod(
  2988. "_updateContextsList",
  2989. smalltalk.method({
  2990. selector: "updateContextsList",
  2991. fn: function (){
  2992. var self=this;
  2993. return smalltalk.withContext(function($ctx1) { _st(self["@ul"])._contents_((function(html){
  2994. return smalltalk.withContext(function($ctx2) { return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  2995. })}));
  2996. return self}, self, "updateContextsList", [], smalltalk.Debugger)}
  2997. }),
  2998. smalltalk.Debugger);
  2999. smalltalk.addMethod(
  3000. "_updateInspector",
  3001. smalltalk.method({
  3002. selector: "updateInspector",
  3003. fn: function (){
  3004. var self=this;
  3005. return smalltalk.withContext(function($ctx1) { _st(self["@inspector"])._contents_((function(html){
  3006. return smalltalk.withContext(function($ctx2) { })}));
  3007. return self}, self, "updateInspector", [], smalltalk.Debugger)}
  3008. }),
  3009. smalltalk.Debugger);
  3010. smalltalk.addMethod(
  3011. "_updateSourceArea",
  3012. smalltalk.method({
  3013. selector: "updateSourceArea",
  3014. fn: function (){
  3015. var self=this;
  3016. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._val_(_st(self)._source());
  3017. return self}, self, "updateSourceArea", [], smalltalk.Debugger)}
  3018. }),
  3019. smalltalk.Debugger);
  3020. smalltalk.addMethod(
  3021. "_updateStatus",
  3022. smalltalk.method({
  3023. selector: "updateStatus",
  3024. fn: function (){
  3025. var self=this;
  3026. return smalltalk.withContext(function($ctx1) { var $1;
  3027. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  3028. if(smalltalk.assert($1)){
  3029. if(($receiver = self["@saveButton"]) == nil || $receiver == undefined){
  3030. self["@saveButton"];
  3031. } else {
  3032. _st(self["@saveButton"])._at_put_("disabled",true);
  3033. };
  3034. self["@unsavedChanges"]=false;
  3035. self["@unsavedChanges"];
  3036. } else {
  3037. if(($receiver = self["@saveButton"]) == nil || $receiver == undefined){
  3038. self["@saveButton"];
  3039. } else {
  3040. _st(self["@saveButton"])._removeAt_("disabled");
  3041. };
  3042. self["@unsavedChanges"]=true;
  3043. self["@unsavedChanges"];
  3044. };
  3045. return self}, self, "updateStatus", [], smalltalk.Debugger)}
  3046. }),
  3047. smalltalk.Debugger);
  3048. smalltalk.addMethod(
  3049. "_updateVariablesList",
  3050. smalltalk.method({
  3051. selector: "updateVariablesList",
  3052. fn: function (){
  3053. var self=this;
  3054. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9;
  3055. _st(self["@ul2"])._contents_((function(html){
  3056. return smalltalk.withContext(function($ctx2) { $ctx2.li=nil;
  3057. $1=_st(html)._li();
  3058. _st($1)._with_("self");
  3059. $2=_st($1)._onClick_((function(){
  3060. return smalltalk.withContext(function($ctx3) { return _st(self)._selectVariable_named_(_st(self)._receiver(),"self");
  3061. })}));
  3062. $ctx2.locals.li=$2;
  3063. $ctx2.locals.li;
  3064. $3=_st(self["@selectedVariableName"]).__eq("self");
  3065. if(smalltalk.assert($3)){
  3066. _st($ctx2.locals.li)._class_("selected");
  3067. };
  3068. _st(_st(self)._arguments())._withIndexDo_((function(each,index){
  3069. return smalltalk.withContext(function($ctx3) { $ctx3.param=nil;
  3070. $ctx3.locals.param=_st(_st(self["@selectedContext"])._temps())._at_(index);
  3071. $ctx3.locals.param;
  3072. $4=_st(html)._li();
  3073. _st($4)._with_(each);
  3074. $5=_st($4)._onClick_((function(){
  3075. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_named_($ctx3.locals.param,each);
  3076. })}));
  3077. $ctx2.locals.li=$5;
  3078. $ctx2.locals.li;
  3079. $6=_st(self["@selectedVariableName"]).__eq(each);
  3080. if(smalltalk.assert($6)){
  3081. return _st($ctx2.locals.li)._class_("selected");
  3082. };
  3083. })}));
  3084. return _st(_st(_st(_st(self)._receiver())._class())._allInstanceVariableNames())._do_((function(each){
  3085. return smalltalk.withContext(function($ctx3) { $ctx3.ivar=nil;
  3086. $ctx3.locals.ivar=_st(_st(self)._receiver())._instVarAt_(each);
  3087. $ctx3.locals.ivar;
  3088. $7=_st(html)._li();
  3089. _st($7)._with_(each);
  3090. $8=_st($7)._onClick_((function(){
  3091. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_named_($ctx3.locals.ivar,each);
  3092. })}));
  3093. $ctx2.locals.li=$8;
  3094. $ctx2.locals.li;
  3095. $9=_st(self["@selectedVariableName"]).__eq(each);
  3096. if(smalltalk.assert($9)){
  3097. return _st($ctx2.locals.li)._class_("selected");
  3098. };
  3099. })}));
  3100. })}));
  3101. if(($receiver = self["@selectedVariable"]) == nil || $receiver == undefined){
  3102. _st(self["@inspectButton"])._at_put_("disabled",true);
  3103. } else {
  3104. _st(self["@inspectButton"])._removeAt_("disabled");
  3105. };
  3106. return self}, self, "updateVariablesList", [], smalltalk.Debugger)}
  3107. }),
  3108. smalltalk.Debugger);
  3109. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  3110. smalltalk.addMethod(
  3111. "_clear",
  3112. smalltalk.method({
  3113. selector: "clear",
  3114. fn: function (){
  3115. var self=this;
  3116. return smalltalk.withContext(function($ctx1) { _st(_st(self["@textarea"])._asJQuery())._val_("");
  3117. return self}, self, "clear", [], smalltalk.IDETranscript)}
  3118. }),
  3119. smalltalk.IDETranscript);
  3120. smalltalk.addMethod(
  3121. "_cr",
  3122. smalltalk.method({
  3123. selector: "cr",
  3124. fn: function (){
  3125. var self=this;
  3126. return smalltalk.withContext(function($ctx1) { _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st((smalltalk.String || String))._cr()));
  3127. return self}, self, "cr", [], smalltalk.IDETranscript)}
  3128. }),
  3129. smalltalk.IDETranscript);
  3130. smalltalk.addMethod(
  3131. "_label",
  3132. smalltalk.method({
  3133. selector: "label",
  3134. fn: function (){
  3135. var self=this;
  3136. return smalltalk.withContext(function($ctx1) { return "Transcript";
  3137. }, self, "label", [], smalltalk.IDETranscript)}
  3138. }),
  3139. smalltalk.IDETranscript);
  3140. smalltalk.addMethod(
  3141. "_open",
  3142. smalltalk.method({
  3143. selector: "open",
  3144. fn: function (){
  3145. var self=this;
  3146. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3147. $1=_st((smalltalk.TabManager || TabManager))._current();
  3148. _st($1)._open();
  3149. $2=_st($1)._selectTab_(self);
  3150. return self}, self, "open", [], smalltalk.IDETranscript)}
  3151. }),
  3152. smalltalk.IDETranscript);
  3153. smalltalk.addMethod(
  3154. "_renderBoxOn_",
  3155. smalltalk.method({
  3156. selector: "renderBoxOn:",
  3157. fn: function (html){
  3158. var self=this;
  3159. return smalltalk.withContext(function($ctx1) { var $1;
  3160. self["@textarea"]=_st(html)._textarea();
  3161. _st(self["@textarea"])._class_("amber_transcript");
  3162. $1=_st(self["@textarea"])._at_put_("spellcheck","false");
  3163. return self}, self, "renderBoxOn:", [html], smalltalk.IDETranscript)}
  3164. }),
  3165. smalltalk.IDETranscript);
  3166. smalltalk.addMethod(
  3167. "_renderButtonsOn_",
  3168. smalltalk.method({
  3169. selector: "renderButtonsOn:",
  3170. fn: function (html){
  3171. var self=this;
  3172. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3173. $1=_st(html)._button();
  3174. _st($1)._with_("Clear transcript");
  3175. $2=_st($1)._onClick_((function(){
  3176. return smalltalk.withContext(function($ctx2) { return _st(self)._clear();
  3177. })}));
  3178. return self}, self, "renderButtonsOn:", [html], smalltalk.IDETranscript)}
  3179. }),
  3180. smalltalk.IDETranscript);
  3181. smalltalk.addMethod(
  3182. "_show_",
  3183. smalltalk.method({
  3184. selector: "show:",
  3185. fn: function (anObject){
  3186. var self=this;
  3187. return smalltalk.withContext(function($ctx1) { if(($receiver = self["@textarea"]) == nil || $receiver == undefined){
  3188. _st(self)._open();
  3189. } else {
  3190. self["@textarea"];
  3191. };
  3192. _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  3193. return self}, self, "show:", [anObject], smalltalk.IDETranscript)}
  3194. }),
  3195. smalltalk.IDETranscript);
  3196. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  3197. smalltalk.addMethod(
  3198. "_current",
  3199. smalltalk.method({
  3200. selector: "current",
  3201. fn: function (){
  3202. var self=this;
  3203. return smalltalk.withContext(function($ctx1) { var $1;
  3204. if(($receiver = self["@current"]) == nil || $receiver == undefined){
  3205. self["@current"]=smalltalk.TabWidget.klass.fn.prototype._new.apply(_st(self), []);
  3206. $1=self["@current"];
  3207. } else {
  3208. $1=self["@current"];
  3209. };
  3210. return $1;
  3211. }, self, "current", [], smalltalk.IDETranscript.klass)}
  3212. }),
  3213. smalltalk.IDETranscript.klass);
  3214. smalltalk.addMethod(
  3215. "_initialize",
  3216. smalltalk.method({
  3217. selector: "initialize",
  3218. fn: function (){
  3219. var self=this;
  3220. return smalltalk.withContext(function($ctx1) { _st((smalltalk.Transcript || Transcript))._register_(_st(self)._current());
  3221. return self}, self, "initialize", [], smalltalk.IDETranscript.klass)}
  3222. }),
  3223. smalltalk.IDETranscript.klass);
  3224. smalltalk.addMethod(
  3225. "_new",
  3226. smalltalk.method({
  3227. selector: "new",
  3228. fn: function (){
  3229. var self=this;
  3230. return smalltalk.withContext(function($ctx1) { _st(self)._shouldNotImplement();
  3231. return self}, self, "new", [], smalltalk.IDETranscript.klass)}
  3232. }),
  3233. smalltalk.IDETranscript.klass);
  3234. smalltalk.addMethod(
  3235. "_open",
  3236. smalltalk.method({
  3237. selector: "open",
  3238. fn: function (){
  3239. var self=this;
  3240. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3241. $1=_st((smalltalk.TabManager || TabManager))._current();
  3242. _st($1)._open();
  3243. $2=_st($1)._selectTab_(_st(self)._current());
  3244. return self}, self, "open", [], smalltalk.IDETranscript.klass)}
  3245. }),
  3246. smalltalk.IDETranscript.klass);
  3247. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  3248. smalltalk.addMethod(
  3249. "_canBeClosed",
  3250. smalltalk.method({
  3251. selector: "canBeClosed",
  3252. fn: function (){
  3253. var self=this;
  3254. return smalltalk.withContext(function($ctx1) { return true;
  3255. }, self, "canBeClosed", [], smalltalk.Inspector)}
  3256. }),
  3257. smalltalk.Inspector);
  3258. smalltalk.addMethod(
  3259. "_dive",
  3260. smalltalk.method({
  3261. selector: "dive",
  3262. fn: function (){
  3263. var self=this;
  3264. return smalltalk.withContext(function($ctx1) { _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._inspect();
  3265. return self}, self, "dive", [], smalltalk.Inspector)}
  3266. }),
  3267. smalltalk.Inspector);
  3268. smalltalk.addMethod(
  3269. "_inspect_",
  3270. smalltalk.method({
  3271. selector: "inspect:",
  3272. fn: function (anObject){
  3273. var self=this;
  3274. return smalltalk.withContext(function($ctx1) { self["@object"]=anObject;
  3275. self["@variables"]=[];
  3276. _st(self["@object"])._inspectOn_(self);
  3277. return self}, self, "inspect:", [anObject], smalltalk.Inspector)}
  3278. }),
  3279. smalltalk.Inspector);
  3280. smalltalk.addMethod(
  3281. "_label",
  3282. smalltalk.method({
  3283. selector: "label",
  3284. fn: function (){
  3285. var self=this;
  3286. return smalltalk.withContext(function($ctx1) { var $1;
  3287. if(($receiver = self["@label"]) == nil || $receiver == undefined){
  3288. $1="Inspector (nil)";
  3289. } else {
  3290. $1=self["@label"];
  3291. };
  3292. return $1;
  3293. }, self, "label", [], smalltalk.Inspector)}
  3294. }),
  3295. smalltalk.Inspector);
  3296. smalltalk.addMethod(
  3297. "_refresh",
  3298. smalltalk.method({
  3299. selector: "refresh",
  3300. fn: function (){
  3301. var self=this;
  3302. return smalltalk.withContext(function($ctx1) { var $1;
  3303. _st(self)._inspect_(self["@object"]);
  3304. _st(self)._updateVariablesList();
  3305. $1=_st(self)._updateValueTextarea();
  3306. return self}, self, "refresh", [], smalltalk.Inspector)}
  3307. }),
  3308. smalltalk.Inspector);
  3309. smalltalk.addMethod(
  3310. "_renderBottomPanelOn_",
  3311. smalltalk.method({
  3312. selector: "renderBottomPanelOn:",
  3313. fn: function (html){
  3314. var self=this;
  3315. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$2;
  3316. $1=_st(html)._div();
  3317. _st($1)._class_("amber_sourceCode");
  3318. $2=_st($1)._with_((function(){
  3319. return smalltalk.withContext(function($ctx2) { $3=_st((smalltalk.SourceArea || SourceArea))._new();
  3320. _st($3)._receiver_(self["@object"]);
  3321. _st($3)._onDoIt_((function(){
  3322. return smalltalk.withContext(function($ctx3) { return _st(self)._refresh();
  3323. })}));
  3324. $4=_st($3)._yourself();
  3325. self["@sourceArea"]=$4;
  3326. self["@sourceArea"];
  3327. return _st(self["@sourceArea"])._renderOn_(html);
  3328. })}));
  3329. return self}, self, "renderBottomPanelOn:", [html], smalltalk.Inspector)}
  3330. }),
  3331. smalltalk.Inspector);
  3332. smalltalk.addMethod(
  3333. "_renderBoxOn_",
  3334. smalltalk.method({
  3335. selector: "renderBoxOn:",
  3336. fn: function (html){
  3337. var self=this;
  3338. return smalltalk.withContext(function($ctx1) { var $1;
  3339. _st(self)._renderTopPanelOn_(html);
  3340. $1=_st(self)._renderBottomPanelOn_(html);
  3341. return self}, self, "renderBoxOn:", [html], smalltalk.Inspector)}
  3342. }),
  3343. smalltalk.Inspector);
  3344. smalltalk.addMethod(
  3345. "_renderButtonsOn_",
  3346. smalltalk.method({
  3347. selector: "renderButtonsOn:",
  3348. fn: function (html){
  3349. var self=this;
  3350. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6;
  3351. $1=_st(html)._button();
  3352. _st($1)._with_("DoIt");
  3353. $2=_st($1)._onClick_((function(){
  3354. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._doIt();
  3355. })}));
  3356. $3=_st(html)._button();
  3357. _st($3)._with_("PrintIt");
  3358. $4=_st($3)._onClick_((function(){
  3359. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._printIt();
  3360. })}));
  3361. $5=_st(html)._button();
  3362. _st($5)._with_("InspectIt");
  3363. $6=_st($5)._onClick_((function(){
  3364. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._sourceArea())._inspectIt();
  3365. })}));
  3366. _st(self)._updateButtons();
  3367. return self}, self, "renderButtonsOn:", [html], smalltalk.Inspector)}
  3368. }),
  3369. smalltalk.Inspector);
  3370. smalltalk.addMethod(
  3371. "_renderTopPanelOn_",
  3372. smalltalk.method({
  3373. selector: "renderTopPanelOn:",
  3374. fn: function (html){
  3375. var self=this;
  3376. return smalltalk.withContext(function($ctx1) { var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11;
  3377. $1=_st(html)._div();
  3378. _st($1)._class_("top");
  3379. $2=_st($1)._with_((function(){
  3380. return smalltalk.withContext(function($ctx2) { self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  3381. self["@variablesList"];
  3382. $3=_st(html)._textarea();
  3383. _st($3)._class_("amber_column value");
  3384. $4=_st($3)._at_put_("readonly","readonly");
  3385. self["@valueTextarea"]=$4;
  3386. self["@valueTextarea"];
  3387. $5=_st(html)._div();
  3388. _st($5)._class_("amber_tabs inspector");
  3389. $6=_st($5)._with_((function(){
  3390. return smalltalk.withContext(function($ctx3) { $7=_st(html)._button();
  3391. _st($7)._class_("amber_button inspector refresh");
  3392. _st($7)._with_("Refresh");
  3393. $8=_st($7)._onClick_((function(){
  3394. return smalltalk.withContext(function($ctx4) { return _st(self)._refresh();
  3395. })}));
  3396. $8;
  3397. $9=_st(html)._button();
  3398. _st($9)._class_("amber_button inspector dive");
  3399. _st($9)._with_("Dive");
  3400. $10=_st($9)._onClick_((function(){
  3401. return smalltalk.withContext(function($ctx4) { return _st(self)._dive();
  3402. })}));
  3403. self["@diveButton"]=$10;
  3404. return self["@diveButton"];
  3405. })}));
  3406. $6;
  3407. return _st(_st(html)._div())._class_("amber_clear");
  3408. })}));
  3409. _st(self)._updateVariablesList();
  3410. $11=_st(self)._updateValueTextarea();
  3411. return self}, self, "renderTopPanelOn:", [html], smalltalk.Inspector)}
  3412. }),
  3413. smalltalk.Inspector);
  3414. smalltalk.addMethod(
  3415. "_selectVariable_",
  3416. smalltalk.method({
  3417. selector: "selectVariable:",
  3418. fn: function (aString){
  3419. var self=this;
  3420. return smalltalk.withContext(function($ctx1) { var $1;
  3421. _st(self)._selectedVariable_(aString);
  3422. _st(self)._updateVariablesList();
  3423. _st(self)._updateValueTextarea();
  3424. $1=_st(self)._updateButtons();
  3425. return self}, self, "selectVariable:", [aString], smalltalk.Inspector)}
  3426. }),
  3427. smalltalk.Inspector);
  3428. smalltalk.addMethod(
  3429. "_selectedVariable",
  3430. smalltalk.method({
  3431. selector: "selectedVariable",
  3432. fn: function (){
  3433. var self=this;
  3434. return smalltalk.withContext(function($ctx1) { return self["@selectedVariable"];
  3435. }, self, "selectedVariable", [], smalltalk.Inspector)}
  3436. }),
  3437. smalltalk.Inspector);
  3438. smalltalk.addMethod(
  3439. "_selectedVariable_",
  3440. smalltalk.method({
  3441. selector: "selectedVariable:",
  3442. fn: function (aString){
  3443. var self=this;
  3444. return smalltalk.withContext(function($ctx1) { self["@selectedVariable"]=aString;
  3445. return self}, self, "selectedVariable:", [aString], smalltalk.Inspector)}
  3446. }),
  3447. smalltalk.Inspector);
  3448. smalltalk.addMethod(
  3449. "_setLabel_",
  3450. smalltalk.method({
  3451. selector: "setLabel:",
  3452. fn: function (aString){
  3453. var self=this;
  3454. return smalltalk.withContext(function($ctx1) { self["@label"]=aString;
  3455. return self}, self, "setLabel:", [aString], smalltalk.Inspector)}
  3456. }),
  3457. smalltalk.Inspector);
  3458. smalltalk.addMethod(
  3459. "_setVariables_",
  3460. smalltalk.method({
  3461. selector: "setVariables:",
  3462. fn: function (aCollection){
  3463. var self=this;
  3464. return smalltalk.withContext(function($ctx1) { self["@variables"]=aCollection;
  3465. return self}, self, "setVariables:", [aCollection], smalltalk.Inspector)}
  3466. }),
  3467. smalltalk.Inspector);
  3468. smalltalk.addMethod(
  3469. "_sourceArea",
  3470. smalltalk.method({
  3471. selector: "sourceArea",
  3472. fn: function (){
  3473. var self=this;
  3474. return smalltalk.withContext(function($ctx1) { return self["@sourceArea"];
  3475. }, self, "sourceArea", [], smalltalk.Inspector)}
  3476. }),
  3477. smalltalk.Inspector);
  3478. smalltalk.addMethod(
  3479. "_updateButtons",
  3480. smalltalk.method({
  3481. selector: "updateButtons",
  3482. fn: function (){
  3483. var self=this;
  3484. return smalltalk.withContext(function($ctx1) { var $1;
  3485. $1=_st(_st(_st(self)._selectedVariable())._notNil())._and_((function(){
  3486. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._notNil();
  3487. })}));
  3488. if(smalltalk.assert($1)){
  3489. _st(self["@diveButton"])._removeAt_("disabled");
  3490. } else {
  3491. _st(self["@diveButton"])._at_put_("disabled",true);
  3492. };
  3493. return self}, self, "updateButtons", [], smalltalk.Inspector)}
  3494. }),
  3495. smalltalk.Inspector);
  3496. smalltalk.addMethod(
  3497. "_updateValueTextarea",
  3498. smalltalk.method({
  3499. selector: "updateValueTextarea",
  3500. fn: function (){
  3501. var self=this;
  3502. return smalltalk.withContext(function($ctx1) { var $2,$1;
  3503. $2=_st(_st(self)._selectedVariable())._isNil();
  3504. if(smalltalk.assert($2)){
  3505. $1="";
  3506. } else {
  3507. $1=_st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._printString();
  3508. };
  3509. _st(_st(self["@valueTextarea"])._asJQuery())._val_($1);
  3510. return self}, self, "updateValueTextarea", [], smalltalk.Inspector)}
  3511. }),
  3512. smalltalk.Inspector);
  3513. smalltalk.addMethod(
  3514. "_updateVariablesList",
  3515. smalltalk.method({
  3516. selector: "updateVariablesList",
  3517. fn: function (){
  3518. var self=this;
  3519. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3520. _st(self["@variablesList"])._contents_((function(html){
  3521. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(self)._variables())._keys())._do_((function(each){
  3522. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  3523. $ctx3.locals.li=_st(html)._li();
  3524. $ctx3.locals.li;
  3525. _st($ctx3.locals.li)._with_(each);
  3526. $1=_st($ctx3.locals.li)._onClick_((function(){
  3527. return smalltalk.withContext(function($ctx4) { return _st(self)._selectVariable_(each);
  3528. })}));
  3529. $1;
  3530. $2=_st(_st(self)._selectedVariable()).__eq(each);
  3531. if(smalltalk.assert($2)){
  3532. return _st($ctx3.locals.li)._class_("selected");
  3533. };
  3534. })}));
  3535. })}));
  3536. return self}, self, "updateVariablesList", [], smalltalk.Inspector)}
  3537. }),
  3538. smalltalk.Inspector);
  3539. smalltalk.addMethod(
  3540. "_variables",
  3541. smalltalk.method({
  3542. selector: "variables",
  3543. fn: function (){
  3544. var self=this;
  3545. return smalltalk.withContext(function($ctx1) { return self["@variables"];
  3546. }, self, "variables", [], smalltalk.Inspector)}
  3547. }),
  3548. smalltalk.Inspector);
  3549. smalltalk.addMethod(
  3550. "_on_",
  3551. smalltalk.method({
  3552. selector: "on:",
  3553. fn: function (anObject){
  3554. var self=this;
  3555. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  3556. $2=_st(self)._new();
  3557. _st($2)._inspect_(anObject);
  3558. $3=_st($2)._yourself();
  3559. $1=$3;
  3560. return $1;
  3561. }, self, "on:", [anObject], smalltalk.Inspector.klass)}
  3562. }),
  3563. smalltalk.Inspector.klass);
  3564. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  3565. smalltalk.addMethod(
  3566. "_percent",
  3567. smalltalk.method({
  3568. selector: "percent",
  3569. fn: function (){
  3570. var self=this;
  3571. return smalltalk.withContext(function($ctx1) { var $1;
  3572. if(($receiver = self["@percent"]) == nil || $receiver == undefined){
  3573. $1=(0);
  3574. } else {
  3575. $1=self["@percent"];
  3576. };
  3577. return $1;
  3578. }, self, "percent", [], smalltalk.ProgressBar)}
  3579. }),
  3580. smalltalk.ProgressBar);
  3581. smalltalk.addMethod(
  3582. "_percent_",
  3583. smalltalk.method({
  3584. selector: "percent:",
  3585. fn: function (aNumber){
  3586. var self=this;
  3587. return smalltalk.withContext(function($ctx1) { self["@percent"]=aNumber;
  3588. return self}, self, "percent:", [aNumber], smalltalk.ProgressBar)}
  3589. }),
  3590. smalltalk.ProgressBar);
  3591. smalltalk.addMethod(
  3592. "_renderOn_",
  3593. smalltalk.method({
  3594. selector: "renderOn:",
  3595. fn: function (html){
  3596. var self=this;
  3597. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3598. $1=_st(html)._div();
  3599. _st($1)._class_("progress_bar");
  3600. $2=_st($1)._yourself();
  3601. self["@div"]=$2;
  3602. _st(self)._renderProgressBar();
  3603. return self}, self, "renderOn:", [html], smalltalk.ProgressBar)}
  3604. }),
  3605. smalltalk.ProgressBar);
  3606. smalltalk.addMethod(
  3607. "_renderProgressBar",
  3608. smalltalk.method({
  3609. selector: "renderProgressBar",
  3610. fn: function (){
  3611. var self=this;
  3612. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3613. _st(self["@div"])._contents_((function(html){
  3614. return smalltalk.withContext(function($ctx2) { $1=_st(html)._div();
  3615. _st($1)._class_("progress");
  3616. $2=_st($1)._style_(_st(_st("width:").__comma(_st(_st(self)._percent())._asString())).__comma("%"));
  3617. return $2;
  3618. })}));
  3619. return self}, self, "renderProgressBar", [], smalltalk.ProgressBar)}
  3620. }),
  3621. smalltalk.ProgressBar);
  3622. smalltalk.addMethod(
  3623. "_updatePercent_",
  3624. smalltalk.method({
  3625. selector: "updatePercent:",
  3626. fn: function (aNumber){
  3627. var self=this;
  3628. return smalltalk.withContext(function($ctx1) { _st(self)._percent_(aNumber);
  3629. _st(self)._renderProgressBar();
  3630. return self}, self, "updatePercent:", [aNumber], smalltalk.ProgressBar)}
  3631. }),
  3632. smalltalk.ProgressBar);
  3633. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  3634. smalltalk.addMethod(
  3635. "_canBeClosed",
  3636. smalltalk.method({
  3637. selector: "canBeClosed",
  3638. fn: function (){
  3639. var self=this;
  3640. return smalltalk.withContext(function($ctx1) { return true;
  3641. }, self, "canBeClosed", [], smalltalk.ReferencesBrowser)}
  3642. }),
  3643. smalltalk.ReferencesBrowser);
  3644. smalltalk.addMethod(
  3645. "_classesAndMetaclasses",
  3646. smalltalk.method({
  3647. selector: "classesAndMetaclasses",
  3648. fn: function (){
  3649. var self=this;
  3650. return smalltalk.withContext(function($ctx1) { var $1;
  3651. $1=_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes()).__comma(_st(_st(_st((smalltalk.Smalltalk || Smalltalk))._current())._classes())._collect_((function(each){
  3652. return smalltalk.withContext(function($ctx2) { return _st(each)._class();
  3653. })})));
  3654. return $1;
  3655. }, self, "classesAndMetaclasses", [], smalltalk.ReferencesBrowser)}
  3656. }),
  3657. smalltalk.ReferencesBrowser);
  3658. smalltalk.addMethod(
  3659. "_implementors",
  3660. smalltalk.method({
  3661. selector: "implementors",
  3662. fn: function (){
  3663. var self=this;
  3664. return smalltalk.withContext(function($ctx1) { var $1;
  3665. if(($receiver = self["@implementors"]) == nil || $receiver == undefined){
  3666. self["@implementors"]=_st((smalltalk.Array || Array))._new();
  3667. $1=self["@implementors"];
  3668. } else {
  3669. $1=self["@implementors"];
  3670. };
  3671. return $1;
  3672. }, self, "implementors", [], smalltalk.ReferencesBrowser)}
  3673. }),
  3674. smalltalk.ReferencesBrowser);
  3675. smalltalk.addMethod(
  3676. "_initialize",
  3677. smalltalk.method({
  3678. selector: "initialize",
  3679. fn: function (){
  3680. var self=this;
  3681. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  3682. self["@selector"]="";
  3683. return self}, self, "initialize", [], smalltalk.ReferencesBrowser)}
  3684. }),
  3685. smalltalk.ReferencesBrowser);
  3686. smalltalk.addMethod(
  3687. "_label",
  3688. smalltalk.method({
  3689. selector: "label",
  3690. fn: function (){
  3691. var self=this;
  3692. return smalltalk.withContext(function($ctx1) { return "[References]";
  3693. }, self, "label", [], smalltalk.ReferencesBrowser)}
  3694. }),
  3695. smalltalk.ReferencesBrowser);
  3696. smalltalk.addMethod(
  3697. "_matches",
  3698. smalltalk.method({
  3699. selector: "matches",
  3700. fn: function (){
  3701. var self=this;
  3702. return smalltalk.withContext(function($ctx1) { var $1;
  3703. if(($receiver = self["@matches"]) == nil || $receiver == undefined){
  3704. self["@matches"]=_st((smalltalk.Array || Array))._new();
  3705. $1=self["@matches"];
  3706. } else {
  3707. $1=self["@matches"];
  3708. };
  3709. return $1;
  3710. }, self, "matches", [], smalltalk.ReferencesBrowser)}
  3711. }),
  3712. smalltalk.ReferencesBrowser);
  3713. smalltalk.addMethod(
  3714. "_openBrowserOn_",
  3715. smalltalk.method({
  3716. selector: "openBrowserOn:",
  3717. fn: function (aMethod){
  3718. var self=this;
  3719. return smalltalk.withContext(function($ctx1) { var $2,$1,$3,$4;
  3720. $ctx1.browser=nil;
  3721. $2=_st(_st(aMethod)._methodClass())._isMetaclass();
  3722. if(smalltalk.assert($2)){
  3723. $1=_st(_st(aMethod)._methodClass())._instanceClass();
  3724. } else {
  3725. $1=_st(aMethod)._methodClass();
  3726. };
  3727. $ctx1.locals.browser=_st((smalltalk.Browser || Browser))._openOn_($1);
  3728. $3=_st(_st(aMethod)._methodClass())._isMetaclass();
  3729. if(smalltalk.assert($3)){
  3730. _st($ctx1.locals.browser)._selectTab_(smalltalk.symbolFor("class"));
  3731. };
  3732. _st($ctx1.locals.browser)._selectProtocol_(_st(aMethod)._category());
  3733. $4=_st($ctx1.locals.browser)._selectMethod_(aMethod);
  3734. return self}, self, "openBrowserOn:", [aMethod], smalltalk.ReferencesBrowser)}
  3735. }),
  3736. smalltalk.ReferencesBrowser);
  3737. smalltalk.addMethod(
  3738. "_referencedClasses",
  3739. smalltalk.method({
  3740. selector: "referencedClasses",
  3741. fn: function (){
  3742. var self=this;
  3743. return smalltalk.withContext(function($ctx1) { var $1;
  3744. if(($receiver = self["@referencedClasses"]) == nil || $receiver == undefined){
  3745. self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
  3746. $1=self["@referencedClasses"];
  3747. } else {
  3748. $1=self["@referencedClasses"];
  3749. };
  3750. return $1;
  3751. }, self, "referencedClasses", [], smalltalk.ReferencesBrowser)}
  3752. }),
  3753. smalltalk.ReferencesBrowser);
  3754. smalltalk.addMethod(
  3755. "_renderBoxOn_",
  3756. smalltalk.method({
  3757. selector: "renderBoxOn:",
  3758. fn: function (html){
  3759. var self=this;
  3760. return smalltalk.withContext(function($ctx1) { var $1;
  3761. _st(self)._renderInputOn_(html);
  3762. _st(self)._renderImplementorsOn_(html);
  3763. _st(self)._renderSendersOn_(html);
  3764. _st(self)._renderReferencedClassesOn_(html);
  3765. $1=_st(self)._renderMatchesOn_(html);
  3766. return self}, self, "renderBoxOn:", [html], smalltalk.ReferencesBrowser)}
  3767. }),
  3768. smalltalk.ReferencesBrowser);
  3769. smalltalk.addMethod(
  3770. "_renderImplementorsOn_",
  3771. smalltalk.method({
  3772. selector: "renderImplementorsOn:",
  3773. fn: function (html){
  3774. var self=this;
  3775. return smalltalk.withContext(function($ctx1) { self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  3776. _st(self)._updateImplementorsList();
  3777. return self}, self, "renderImplementorsOn:", [html], smalltalk.ReferencesBrowser)}
  3778. }),
  3779. smalltalk.ReferencesBrowser);
  3780. smalltalk.addMethod(
  3781. "_renderInputOn_",
  3782. smalltalk.method({
  3783. selector: "renderInputOn:",
  3784. fn: function (html){
  3785. var self=this;
  3786. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3787. $1=_st(html)._input();
  3788. _st($1)._class_("implementors");
  3789. $2=_st($1)._yourself();
  3790. self["@input"]=$2;
  3791. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  3792. _st(self)._setInputEvents();
  3793. return self}, self, "renderInputOn:", [html], smalltalk.ReferencesBrowser)}
  3794. }),
  3795. smalltalk.ReferencesBrowser);
  3796. smalltalk.addMethod(
  3797. "_renderMatchesOn_",
  3798. smalltalk.method({
  3799. selector: "renderMatchesOn:",
  3800. fn: function (html){
  3801. var self=this;
  3802. return smalltalk.withContext(function($ctx1) { self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  3803. _st(self)._updateMatchesList();
  3804. return self}, self, "renderMatchesOn:", [html], smalltalk.ReferencesBrowser)}
  3805. }),
  3806. smalltalk.ReferencesBrowser);
  3807. smalltalk.addMethod(
  3808. "_renderReferencedClassesOn_",
  3809. smalltalk.method({
  3810. selector: "renderReferencedClassesOn:",
  3811. fn: function (html){
  3812. var self=this;
  3813. return smalltalk.withContext(function($ctx1) { self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  3814. _st(self)._updateReferencedClassesList();
  3815. return self}, self, "renderReferencedClassesOn:", [html], smalltalk.ReferencesBrowser)}
  3816. }),
  3817. smalltalk.ReferencesBrowser);
  3818. smalltalk.addMethod(
  3819. "_renderSendersOn_",
  3820. smalltalk.method({
  3821. selector: "renderSendersOn:",
  3822. fn: function (html){
  3823. var self=this;
  3824. return smalltalk.withContext(function($ctx1) { self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  3825. _st(self)._updateSendersList();
  3826. return self}, self, "renderSendersOn:", [html], smalltalk.ReferencesBrowser)}
  3827. }),
  3828. smalltalk.ReferencesBrowser);
  3829. smalltalk.addMethod(
  3830. "_search_",
  3831. smalltalk.method({
  3832. selector: "search:",
  3833. fn: function (aString){
  3834. var self=this;
  3835. return smalltalk.withContext(function($ctx1) { var $1;
  3836. _st(self)._searchReferencesFor_(aString);
  3837. _st(self)._updateImplementorsList();
  3838. _st(self)._updateSendersList();
  3839. _st(self)._updateReferencedClassesList();
  3840. $1=_st(self)._updateMatchesList();
  3841. return self}, self, "search:", [aString], smalltalk.ReferencesBrowser)}
  3842. }),
  3843. smalltalk.ReferencesBrowser);
  3844. smalltalk.addMethod(
  3845. "_searchMethodSource",
  3846. smalltalk.method({
  3847. selector: "searchMethodSource",
  3848. fn: function (){
  3849. var self=this;
  3850. return smalltalk.withContext(function($ctx1) { var $1;
  3851. $ctx1.regex=nil;
  3852. $ctx1.locals.regex=_st(self["@selector"])._allButFirst();
  3853. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  3854. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  3855. return smalltalk.withContext(function($ctx3) { $1=_st(_st(value)._source())._match_($ctx1.locals.regex);
  3856. if(smalltalk.assert($1)){
  3857. return _st(_st(self)._matches())._add_(value);
  3858. };
  3859. })}));
  3860. })}));
  3861. return self}, self, "searchMethodSource", [], smalltalk.ReferencesBrowser)}
  3862. }),
  3863. smalltalk.ReferencesBrowser);
  3864. smalltalk.addMethod(
  3865. "_searchReferencedClasses",
  3866. smalltalk.method({
  3867. selector: "searchReferencedClasses",
  3868. fn: function (){
  3869. var self=this;
  3870. return smalltalk.withContext(function($ctx1) { var $1;
  3871. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  3872. return smalltalk.withContext(function($ctx2) { return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  3873. return smalltalk.withContext(function($ctx3) { $1=_st(_st(value)._referencedClasses())._includes_(self["@selector"]);
  3874. if(smalltalk.assert($1)){
  3875. return _st(_st(self)._referencedClasses())._add_(value);
  3876. };
  3877. })}));
  3878. })}));
  3879. return self}, self, "searchReferencedClasses", [], smalltalk.ReferencesBrowser)}
  3880. }),
  3881. smalltalk.ReferencesBrowser);
  3882. smalltalk.addMethod(
  3883. "_searchReferencesFor_",
  3884. smalltalk.method({
  3885. selector: "searchReferencesFor:",
  3886. fn: function (aString){
  3887. var self=this;
  3888. return smalltalk.withContext(function($ctx1) { var $1;
  3889. self["@selector"]=aString;
  3890. self["@implementors"]=_st((smalltalk.Array || Array))._new();
  3891. self["@senders"]=_st((smalltalk.Array || Array))._new();
  3892. self["@referencedClasses"]=_st((smalltalk.Array || Array))._new();
  3893. self["@matches"]=_st((smalltalk.Array || Array))._new();
  3894. _st(self)._searchMethodSource();
  3895. $1=_st(self["@selector"])._match_("^[A-Z]");
  3896. if(smalltalk.assert($1)){
  3897. _st(self)._searchReferencedClasses();
  3898. } else {
  3899. _st(self)._searchSelectorReferences();
  3900. };
  3901. return self}, self, "searchReferencesFor:", [aString], smalltalk.ReferencesBrowser)}
  3902. }),
  3903. smalltalk.ReferencesBrowser);
  3904. smalltalk.addMethod(
  3905. "_searchSelectorReferences",
  3906. smalltalk.method({
  3907. selector: "searchSelectorReferences",
  3908. fn: function (){
  3909. var self=this;
  3910. return smalltalk.withContext(function($ctx1) { var $1,$2;
  3911. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  3912. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  3913. return smalltalk.withContext(function($ctx3) { $1=_st(key).__eq(self["@selector"]);
  3914. if(smalltalk.assert($1)){
  3915. _st(_st(self)._implementors())._add_(value);
  3916. };
  3917. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  3918. if(smalltalk.assert($2)){
  3919. return _st(_st(self)._senders())._add_(value);
  3920. };
  3921. })}));
  3922. })}));
  3923. return self}, self, "searchSelectorReferences", [], smalltalk.ReferencesBrowser)}
  3924. }),
  3925. smalltalk.ReferencesBrowser);
  3926. smalltalk.addMethod(
  3927. "_selector",
  3928. smalltalk.method({
  3929. selector: "selector",
  3930. fn: function (){
  3931. var self=this;
  3932. return smalltalk.withContext(function($ctx1) { return self["@selector"];
  3933. }, self, "selector", [], smalltalk.ReferencesBrowser)}
  3934. }),
  3935. smalltalk.ReferencesBrowser);
  3936. smalltalk.addMethod(
  3937. "_senders",
  3938. smalltalk.method({
  3939. selector: "senders",
  3940. fn: function (){
  3941. var self=this;
  3942. return smalltalk.withContext(function($ctx1) { var $1;
  3943. if(($receiver = self["@senders"]) == nil || $receiver == undefined){
  3944. self["@senders"]=_st((smalltalk.Array || Array))._new();
  3945. $1=self["@senders"];
  3946. } else {
  3947. $1=self["@senders"];
  3948. };
  3949. return $1;
  3950. }, self, "senders", [], smalltalk.ReferencesBrowser)}
  3951. }),
  3952. smalltalk.ReferencesBrowser);
  3953. smalltalk.addMethod(
  3954. "_setInputEvents",
  3955. smalltalk.method({
  3956. selector: "setInputEvents",
  3957. fn: function (){
  3958. var self=this;
  3959. return smalltalk.withContext(function($ctx1) { var $1;
  3960. _st(self["@input"])._onKeyUp_((function(){
  3961. return smalltalk.withContext(function($ctx2) { self["@timer"]=_st((function(){
  3962. return smalltalk.withContext(function($ctx3) { return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
  3963. })}))._valueWithTimeout_((100));
  3964. return self["@timer"];
  3965. })}));
  3966. $1=_st(self["@input"])._onKeyDown_((function(){
  3967. return smalltalk.withContext(function($ctx2) { if(($receiver = self["@timer"]) == nil || $receiver == undefined){
  3968. return self["@timer"];
  3969. } else {
  3970. return _st(self["@timer"])._clearTimeout();
  3971. };
  3972. })}));
  3973. return self}, self, "setInputEvents", [], smalltalk.ReferencesBrowser)}
  3974. }),
  3975. smalltalk.ReferencesBrowser);
  3976. smalltalk.addMethod(
  3977. "_updateImplementorsList",
  3978. smalltalk.method({
  3979. selector: "updateImplementorsList",
  3980. fn: function (){
  3981. var self=this;
  3982. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  3983. _st(self["@implementorsList"])._contents_((function(html){
  3984. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  3985. _st($1)._class_("column_label");
  3986. _st($1)._with_(_st(_st("Implementors (").__comma(_st(_st(_st(self)._implementors())._size())._asString())).__comma(")"));
  3987. $2=_st($1)._style_("font-weight: bold");
  3988. $2;
  3989. return _st(_st(self)._implementors())._do_((function(each){
  3990. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  3991. $ctx3.locals.li=_st(html)._li();
  3992. $ctx3.locals.li;
  3993. _st($ctx3.locals.li)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(self)._selector()));
  3994. $3=_st($ctx3.locals.li)._onClick_((function(){
  3995. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  3996. })}));
  3997. return $3;
  3998. })}));
  3999. })}));
  4000. return self}, self, "updateImplementorsList", [], smalltalk.ReferencesBrowser)}
  4001. }),
  4002. smalltalk.ReferencesBrowser);
  4003. smalltalk.addMethod(
  4004. "_updateMatchesList",
  4005. smalltalk.method({
  4006. selector: "updateMatchesList",
  4007. fn: function (){
  4008. var self=this;
  4009. return smalltalk.withContext(function($ctx1) { var $1,$2,$3;
  4010. _st(self["@matchesList"])._contents_((function(html){
  4011. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4012. _st($1)._class_("column_label");
  4013. _st($1)._with_(_st(_st("Regex matches (").__comma(_st(_st(_st(self)._matches())._size())._asString())).__comma(")"));
  4014. $2=_st($1)._style_("font-weight: bold");
  4015. $2;
  4016. return _st(_st(self)._matches())._do_((function(each){
  4017. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  4018. $ctx3.locals.li=_st(html)._li();
  4019. $ctx3.locals.li;
  4020. _st($ctx3.locals.li)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4021. $3=_st($ctx3.locals.li)._onClick_((function(){
  4022. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4023. })}));
  4024. return $3;
  4025. })}));
  4026. })}));
  4027. return self}, self, "updateMatchesList", [], smalltalk.ReferencesBrowser)}
  4028. }),
  4029. smalltalk.ReferencesBrowser);
  4030. smalltalk.addMethod(
  4031. "_updateReferencedClassesList",
  4032. smalltalk.method({
  4033. selector: "updateReferencedClassesList",
  4034. fn: function (){
  4035. var self=this;
  4036. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4037. _st(self["@referencedClassesList"])._contents_((function(html){
  4038. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4039. _st($1)._class_("column_label");
  4040. _st($1)._with_(_st(_st("Class references (").__comma(_st(_st(_st(self)._referencedClasses())._size())._asString())).__comma(")"));
  4041. $2=_st($1)._style_("font-weight: bold");
  4042. $2;
  4043. return _st(_st(self)._referencedClasses())._do_((function(each){
  4044. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  4045. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4046. $4=_st($3)._onClick_((function(){
  4047. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4048. })}));
  4049. return $4;
  4050. })}));
  4051. })}));
  4052. return self}, self, "updateReferencedClassesList", [], smalltalk.ReferencesBrowser)}
  4053. }),
  4054. smalltalk.ReferencesBrowser);
  4055. smalltalk.addMethod(
  4056. "_updateSendersList",
  4057. smalltalk.method({
  4058. selector: "updateSendersList",
  4059. fn: function (){
  4060. var self=this;
  4061. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4062. _st(self["@sendersList"])._contents_((function(html){
  4063. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4064. _st($1)._class_("column_label");
  4065. _st($1)._with_(_st(_st("Senders (").__comma(_st(_st(_st(self)._senders())._size())._asString())).__comma(")"));
  4066. $2=_st($1)._style_("font-weight: bold");
  4067. $2;
  4068. return _st(_st(self)._senders())._do_((function(each){
  4069. return smalltalk.withContext(function($ctx3) { $3=_st(html)._li();
  4070. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4071. $4=_st($3)._onClick_((function(){
  4072. return smalltalk.withContext(function($ctx4) { return _st(self)._openBrowserOn_(each);
  4073. })}));
  4074. return $4;
  4075. })}));
  4076. })}));
  4077. return self}, self, "updateSendersList", [], smalltalk.ReferencesBrowser)}
  4078. }),
  4079. smalltalk.ReferencesBrowser);
  4080. smalltalk.addMethod(
  4081. "_search_",
  4082. smalltalk.method({
  4083. selector: "search:",
  4084. fn: function (aString){
  4085. var self=this;
  4086. return smalltalk.withContext(function($ctx1) { var $2,$3,$1;
  4087. $2=_st(self)._new();
  4088. _st($2)._searchReferencesFor_(aString);
  4089. $3=_st($2)._open();
  4090. $1=$3;
  4091. return $1;
  4092. }, self, "search:", [aString], smalltalk.ReferencesBrowser.klass)}
  4093. }),
  4094. smalltalk.ReferencesBrowser.klass);
  4095. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  4096. smalltalk.addMethod(
  4097. "_allClasses",
  4098. smalltalk.method({
  4099. selector: "allClasses",
  4100. fn: function (){
  4101. var self=this;
  4102. return smalltalk.withContext(function($ctx1) { var $1;
  4103. $1=_st(_st((smalltalk.TestCase || TestCase))._allSubclasses())._select_((function(each){
  4104. return smalltalk.withContext(function($ctx2) { return _st(_st(each)._isAbstract())._not();
  4105. })}));
  4106. return $1;
  4107. }, self, "allClasses", [], smalltalk.TestRunner)}
  4108. }),
  4109. smalltalk.TestRunner);
  4110. smalltalk.addMethod(
  4111. "_classes",
  4112. smalltalk.method({
  4113. selector: "classes",
  4114. fn: function (){
  4115. var self=this;
  4116. return smalltalk.withContext(function($ctx1) { var $1;
  4117. $1=_st(_st(_st(self)._allClasses())._select_((function(each){
  4118. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4119. })})))._sort_((function(a,b){
  4120. return smalltalk.withContext(function($ctx2) { return _st(_st(a)._name()).__gt(_st(b)._name());
  4121. })}));
  4122. return $1;
  4123. }, self, "classes", [], smalltalk.TestRunner)}
  4124. }),
  4125. smalltalk.TestRunner);
  4126. smalltalk.addMethod(
  4127. "_initialize",
  4128. smalltalk.method({
  4129. selector: "initialize",
  4130. fn: function (){
  4131. var self=this;
  4132. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  4133. self["@result"]=_st((smalltalk.TestResult || TestResult))._new();
  4134. return self}, self, "initialize", [], smalltalk.TestRunner)}
  4135. }),
  4136. smalltalk.TestRunner);
  4137. smalltalk.addMethod(
  4138. "_isSelectedCategory_",
  4139. smalltalk.method({
  4140. selector: "isSelectedCategory:",
  4141. fn: function (aCategory){
  4142. var self=this;
  4143. return smalltalk.withContext(function($ctx1) { var $1;
  4144. $1=_st(_st(self)._selectedCategories())._includes_(aCategory);
  4145. return $1;
  4146. }, self, "isSelectedCategory:", [aCategory], smalltalk.TestRunner)}
  4147. }),
  4148. smalltalk.TestRunner);
  4149. smalltalk.addMethod(
  4150. "_isSelectedClass_",
  4151. smalltalk.method({
  4152. selector: "isSelectedClass:",
  4153. fn: function (aClass){
  4154. var self=this;
  4155. return smalltalk.withContext(function($ctx1) { var $1;
  4156. $1=_st(_st(self)._selectedClasses())._includes_(aClass);
  4157. return $1;
  4158. }, self, "isSelectedClass:", [aClass], smalltalk.TestRunner)}
  4159. }),
  4160. smalltalk.TestRunner);
  4161. smalltalk.addMethod(
  4162. "_label",
  4163. smalltalk.method({
  4164. selector: "label",
  4165. fn: function (){
  4166. var self=this;
  4167. return smalltalk.withContext(function($ctx1) { return "SUnit";
  4168. }, self, "label", [], smalltalk.TestRunner)}
  4169. }),
  4170. smalltalk.TestRunner);
  4171. smalltalk.addMethod(
  4172. "_packages",
  4173. smalltalk.method({
  4174. selector: "packages",
  4175. fn: function (){
  4176. var self=this;
  4177. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4178. $ctx1.packages=nil;
  4179. $ctx1.locals.packages=_st((smalltalk.Array || Array))._new();
  4180. _st(_st(self)._allClasses())._do_((function(each){
  4181. return smalltalk.withContext(function($ctx2) { $1=_st($ctx1.locals.packages)._includes_(_st(each)._category());
  4182. if(! smalltalk.assert($1)){
  4183. return _st($ctx1.locals.packages)._add_(_st(each)._category());
  4184. };
  4185. })}));
  4186. $2=_st($ctx1.locals.packages)._sort();
  4187. return $2;
  4188. }, self, "packages", [], smalltalk.TestRunner)}
  4189. }),
  4190. smalltalk.TestRunner);
  4191. smalltalk.addMethod(
  4192. "_performFailure_",
  4193. smalltalk.method({
  4194. selector: "performFailure:",
  4195. fn: function (aTestCase){
  4196. var self=this;
  4197. return smalltalk.withContext(function($ctx1) { _st(aTestCase)._runCase();
  4198. return self}, self, "performFailure:", [aTestCase], smalltalk.TestRunner)}
  4199. }),
  4200. smalltalk.TestRunner);
  4201. smalltalk.addMethod(
  4202. "_printErrors",
  4203. smalltalk.method({
  4204. selector: "printErrors",
  4205. fn: function (){
  4206. var self=this;
  4207. return smalltalk.withContext(function($ctx1) { var $1;
  4208. $1=_st(_st(_st(_st(_st(self)._result())._errors())._size())._asString()).__comma(" errors, ");
  4209. return $1;
  4210. }, self, "printErrors", [], smalltalk.TestRunner)}
  4211. }),
  4212. smalltalk.TestRunner);
  4213. smalltalk.addMethod(
  4214. "_printFailures",
  4215. smalltalk.method({
  4216. selector: "printFailures",
  4217. fn: function (){
  4218. var self=this;
  4219. return smalltalk.withContext(function($ctx1) { var $1;
  4220. $1=_st(_st(_st(_st(_st(self)._result())._failures())._size())._asString()).__comma(" failures");
  4221. return $1;
  4222. }, self, "printFailures", [], smalltalk.TestRunner)}
  4223. }),
  4224. smalltalk.TestRunner);
  4225. smalltalk.addMethod(
  4226. "_printPasses",
  4227. smalltalk.method({
  4228. selector: "printPasses",
  4229. fn: function (){
  4230. var self=this;
  4231. return smalltalk.withContext(function($ctx1) { var $1;
  4232. $1=_st(_st(_st(_st(_st(_st(self)._result())._runs()).__minus(_st(_st(_st(self)._result())._errors())._size())).__minus(_st(_st(_st(self)._result())._failures())._size()))._asString()).__comma(" passes, ");
  4233. return $1;
  4234. }, self, "printPasses", [], smalltalk.TestRunner)}
  4235. }),
  4236. smalltalk.TestRunner);
  4237. smalltalk.addMethod(
  4238. "_printTotal",
  4239. smalltalk.method({
  4240. selector: "printTotal",
  4241. fn: function (){
  4242. var self=this;
  4243. return smalltalk.withContext(function($ctx1) { var $1;
  4244. $1=_st(_st(_st(_st(self)._result())._total())._asString()).__comma(" runs, ");
  4245. return $1;
  4246. }, self, "printTotal", [], smalltalk.TestRunner)}
  4247. }),
  4248. smalltalk.TestRunner);
  4249. smalltalk.addMethod(
  4250. "_progressBar",
  4251. smalltalk.method({
  4252. selector: "progressBar",
  4253. fn: function (){
  4254. var self=this;
  4255. return smalltalk.withContext(function($ctx1) { var $1;
  4256. if(($receiver = self["@progressBar"]) == nil || $receiver == undefined){
  4257. self["@progressBar"]=_st((smalltalk.ProgressBar || ProgressBar))._new();
  4258. $1=self["@progressBar"];
  4259. } else {
  4260. $1=self["@progressBar"];
  4261. };
  4262. return $1;
  4263. }, self, "progressBar", [], smalltalk.TestRunner)}
  4264. }),
  4265. smalltalk.TestRunner);
  4266. smalltalk.addMethod(
  4267. "_renderBoxOn_",
  4268. smalltalk.method({
  4269. selector: "renderBoxOn:",
  4270. fn: function (html){
  4271. var self=this;
  4272. return smalltalk.withContext(function($ctx1) { var $1;
  4273. _st(self)._renderCategoriesOn_(html);
  4274. _st(self)._renderClassesOn_(html);
  4275. $1=_st(self)._renderResultsOn_(html);
  4276. return self}, self, "renderBoxOn:", [html], smalltalk.TestRunner)}
  4277. }),
  4278. smalltalk.TestRunner);
  4279. smalltalk.addMethod(
  4280. "_renderButtonsOn_",
  4281. smalltalk.method({
  4282. selector: "renderButtonsOn:",
  4283. fn: function (html){
  4284. var self=this;
  4285. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4286. $1=_st(html)._button();
  4287. _st($1)._with_("Run selected");
  4288. $2=_st($1)._onClick_((function(){
  4289. return smalltalk.withContext(function($ctx2) { return _st(self)._run_(_st(self)._testCases());
  4290. })}));
  4291. return self}, self, "renderButtonsOn:", [html], smalltalk.TestRunner)}
  4292. }),
  4293. smalltalk.TestRunner);
  4294. smalltalk.addMethod(
  4295. "_renderCategoriesOn_",
  4296. smalltalk.method({
  4297. selector: "renderCategoriesOn:",
  4298. fn: function (html){
  4299. var self=this;
  4300. return smalltalk.withContext(function($ctx1) { self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  4301. _st(self)._updateCategoriesList();
  4302. return self}, self, "renderCategoriesOn:", [html], smalltalk.TestRunner)}
  4303. }),
  4304. smalltalk.TestRunner);
  4305. smalltalk.addMethod(
  4306. "_renderClassesOn_",
  4307. smalltalk.method({
  4308. selector: "renderClassesOn:",
  4309. fn: function (html){
  4310. var self=this;
  4311. return smalltalk.withContext(function($ctx1) { self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  4312. _st(self)._updateClassesList();
  4313. return self}, self, "renderClassesOn:", [html], smalltalk.TestRunner)}
  4314. }),
  4315. smalltalk.TestRunner);
  4316. smalltalk.addMethod(
  4317. "_renderErrorsOn_",
  4318. smalltalk.method({
  4319. selector: "renderErrorsOn:",
  4320. fn: function (html){
  4321. var self=this;
  4322. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4323. _st(_st(_st(self)._result())._errors())._do_((function(each){
  4324. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4325. _st($1)._class_("errors");
  4326. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4327. $2=_st($1)._onClick_((function(){
  4328. return smalltalk.withContext(function($ctx3) { return _st(self)._performFailure_(each);
  4329. })}));
  4330. return $2;
  4331. })}));
  4332. return self}, self, "renderErrorsOn:", [html], smalltalk.TestRunner)}
  4333. }),
  4334. smalltalk.TestRunner);
  4335. smalltalk.addMethod(
  4336. "_renderFailuresOn_",
  4337. smalltalk.method({
  4338. selector: "renderFailuresOn:",
  4339. fn: function (html){
  4340. var self=this;
  4341. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4342. _st(_st(_st(self)._result())._failures())._do_((function(each){
  4343. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4344. _st($1)._class_("failures");
  4345. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4346. $2=_st($1)._onClick_((function(){
  4347. return smalltalk.withContext(function($ctx3) { return _st(self)._performFailure_(each);
  4348. })}));
  4349. return $2;
  4350. })}));
  4351. return self}, self, "renderFailuresOn:", [html], smalltalk.TestRunner)}
  4352. }),
  4353. smalltalk.TestRunner);
  4354. smalltalk.addMethod(
  4355. "_renderResultsOn_",
  4356. smalltalk.method({
  4357. selector: "renderResultsOn:",
  4358. fn: function (html){
  4359. var self=this;
  4360. return smalltalk.withContext(function($ctx1) { self["@statusDiv"]=_st(html)._div();
  4361. _st(html)._with_(_st(self)._progressBar());
  4362. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  4363. _st(self)._updateMethodsList();
  4364. _st(self)._updateStatusDiv();
  4365. return self}, self, "renderResultsOn:", [html], smalltalk.TestRunner)}
  4366. }),
  4367. smalltalk.TestRunner);
  4368. smalltalk.addMethod(
  4369. "_result",
  4370. smalltalk.method({
  4371. selector: "result",
  4372. fn: function (){
  4373. var self=this;
  4374. return smalltalk.withContext(function($ctx1) { return self["@result"];
  4375. }, self, "result", [], smalltalk.TestRunner)}
  4376. }),
  4377. smalltalk.TestRunner);
  4378. smalltalk.addMethod(
  4379. "_run_",
  4380. smalltalk.method({
  4381. selector: "run:",
  4382. fn: function (aCollection){
  4383. var self=this;
  4384. return smalltalk.withContext(function($ctx1) { var $1;
  4385. $ctx1.worker=nil;
  4386. $ctx1.locals.worker=_st((smalltalk.TestSuiteRunner || TestSuiteRunner))._on_(aCollection);
  4387. self["@result"]=_st($ctx1.locals.worker)._result();
  4388. _st(_st($ctx1.locals.worker)._announcer())._on_do_((smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
  4389. return smalltalk.withContext(function($ctx2) { $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  4390. if(smalltalk.assert($1)){
  4391. _st(_st(self)._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  4392. _st(self)._updateStatusDiv();
  4393. return _st(self)._updateMethodsList();
  4394. };
  4395. })}));
  4396. _st($ctx1.locals.worker)._run();
  4397. return self}, self, "run:", [aCollection], smalltalk.TestRunner)}
  4398. }),
  4399. smalltalk.TestRunner);
  4400. smalltalk.addMethod(
  4401. "_selectAllCategories",
  4402. smalltalk.method({
  4403. selector: "selectAllCategories",
  4404. fn: function (){
  4405. var self=this;
  4406. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4407. _st(_st(self)._packages())._do_((function(each){
  4408. return smalltalk.withContext(function($ctx2) { $1=_st(self["@selectedCategories"])._includes_(each);
  4409. if(! smalltalk.assert($1)){
  4410. return _st(_st(self)._selectedCategories())._add_(each);
  4411. };
  4412. })}));
  4413. _st(self)._updateCategoriesList();
  4414. $2=_st(self)._updateClassesList();
  4415. return self}, self, "selectAllCategories", [], smalltalk.TestRunner)}
  4416. }),
  4417. smalltalk.TestRunner);
  4418. smalltalk.addMethod(
  4419. "_selectAllClasses",
  4420. smalltalk.method({
  4421. selector: "selectAllClasses",
  4422. fn: function (){
  4423. var self=this;
  4424. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4425. _st(_st(self)._classes())._do_((function(each){
  4426. return smalltalk.withContext(function($ctx2) { $1=_st(self["@selectedClasses"])._includes_(each);
  4427. if(! smalltalk.assert($1)){
  4428. return _st(_st(self)._selectedClasses())._add_(each);
  4429. };
  4430. })}));
  4431. _st(self)._updateCategoriesList();
  4432. $2=_st(self)._updateClassesList();
  4433. return self}, self, "selectAllClasses", [], smalltalk.TestRunner)}
  4434. }),
  4435. smalltalk.TestRunner);
  4436. smalltalk.addMethod(
  4437. "_selectedCategories",
  4438. smalltalk.method({
  4439. selector: "selectedCategories",
  4440. fn: function (){
  4441. var self=this;
  4442. return smalltalk.withContext(function($ctx1) { var $1;
  4443. if(($receiver = self["@selectedCategories"]) == nil || $receiver == undefined){
  4444. self["@selectedCategories"]=_st((smalltalk.Array || Array))._new();
  4445. $1=self["@selectedCategories"];
  4446. } else {
  4447. $1=self["@selectedCategories"];
  4448. };
  4449. return $1;
  4450. }, self, "selectedCategories", [], smalltalk.TestRunner)}
  4451. }),
  4452. smalltalk.TestRunner);
  4453. smalltalk.addMethod(
  4454. "_selectedClasses",
  4455. smalltalk.method({
  4456. selector: "selectedClasses",
  4457. fn: function (){
  4458. var self=this;
  4459. return smalltalk.withContext(function($ctx1) { var $1;
  4460. if(($receiver = self["@selectedClasses"]) == nil || $receiver == undefined){
  4461. self["@selectedClasses"]=_st((smalltalk.Array || Array))._new();
  4462. $1=self["@selectedClasses"];
  4463. } else {
  4464. $1=self["@selectedClasses"];
  4465. };
  4466. return $1;
  4467. }, self, "selectedClasses", [], smalltalk.TestRunner)}
  4468. }),
  4469. smalltalk.TestRunner);
  4470. smalltalk.addMethod(
  4471. "_statusInfo",
  4472. smalltalk.method({
  4473. selector: "statusInfo",
  4474. fn: function (){
  4475. var self=this;
  4476. return smalltalk.withContext(function($ctx1) { var $1;
  4477. $1=_st(_st(_st(_st(self)._printTotal()).__comma(_st(self)._printPasses())).__comma(_st(self)._printErrors())).__comma(_st(self)._printFailures());
  4478. return $1;
  4479. }, self, "statusInfo", [], smalltalk.TestRunner)}
  4480. }),
  4481. smalltalk.TestRunner);
  4482. smalltalk.addMethod(
  4483. "_testCases",
  4484. smalltalk.method({
  4485. selector: "testCases",
  4486. fn: function (){
  4487. var self=this;
  4488. return smalltalk.withContext(function($ctx1) { $ctx1.testCases=nil;
  4489. $ctx1.locals.testCases=[];
  4490. _st(_st(_st(self)._selectedClasses())._select_((function(each){
  4491. return smalltalk.withContext(function($ctx2) { return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4492. })})))._do_((function(each){
  4493. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.testCases)._addAll_(_st(each)._buildSuite());
  4494. })}));
  4495. return $ctx1.locals.testCases;
  4496. }, self, "testCases", [], smalltalk.TestRunner)}
  4497. }),
  4498. smalltalk.TestRunner);
  4499. smalltalk.addMethod(
  4500. "_toggleCategory_",
  4501. smalltalk.method({
  4502. selector: "toggleCategory:",
  4503. fn: function (aCategory){
  4504. var self=this;
  4505. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4506. $1=_st(self)._isSelectedCategory_(aCategory);
  4507. if(smalltalk.assert($1)){
  4508. _st(self["@selectedCategories"])._remove_(aCategory);
  4509. } else {
  4510. _st(self["@selectedCategories"])._add_(aCategory);
  4511. };
  4512. _st(self)._updateCategoriesList();
  4513. $2=_st(self)._updateClassesList();
  4514. return self}, self, "toggleCategory:", [aCategory], smalltalk.TestRunner)}
  4515. }),
  4516. smalltalk.TestRunner);
  4517. smalltalk.addMethod(
  4518. "_toggleClass_",
  4519. smalltalk.method({
  4520. selector: "toggleClass:",
  4521. fn: function (aClass){
  4522. var self=this;
  4523. return smalltalk.withContext(function($ctx1) { var $1;
  4524. $1=_st(self)._isSelectedClass_(aClass);
  4525. if(smalltalk.assert($1)){
  4526. _st(self["@selectedClasses"])._remove_(aClass);
  4527. } else {
  4528. _st(self["@selectedClasses"])._add_(aClass);
  4529. };
  4530. _st(self)._updateClassesList();
  4531. return self}, self, "toggleClass:", [aClass], smalltalk.TestRunner)}
  4532. }),
  4533. smalltalk.TestRunner);
  4534. smalltalk.addMethod(
  4535. "_updateCategoriesList",
  4536. smalltalk.method({
  4537. selector: "updateCategoriesList",
  4538. fn: function (){
  4539. var self=this;
  4540. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4;
  4541. _st(self["@packagesList"])._contents_((function(html){
  4542. return smalltalk.withContext(function($ctx2) { $1=_st(html)._li();
  4543. _st($1)._class_("all");
  4544. _st($1)._with_("All");
  4545. $2=_st($1)._onClick_((function(){
  4546. return smalltalk.withContext(function($ctx3) { return _st(self)._selectAllCategories();
  4547. })}));
  4548. $2;
  4549. return _st(_st(self)._packages())._do_((function(each){
  4550. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  4551. $ctx3.locals.li=_st(html)._li();
  4552. $ctx3.locals.li;
  4553. $3=_st(_st(self)._selectedCategories())._includes_(each);
  4554. if(smalltalk.assert($3)){
  4555. _st($ctx3.locals.li)._class_("selected");
  4556. };
  4557. _st($ctx3.locals.li)._with_(each);
  4558. $4=_st($ctx3.locals.li)._onClick_((function(){
  4559. return smalltalk.withContext(function($ctx4) { return _st(self)._toggleCategory_(each);
  4560. })}));
  4561. return $4;
  4562. })}));
  4563. })}));
  4564. return self}, self, "updateCategoriesList", [], smalltalk.TestRunner)}
  4565. }),
  4566. smalltalk.TestRunner);
  4567. smalltalk.addMethod(
  4568. "_updateClassesList",
  4569. smalltalk.method({
  4570. selector: "updateClassesList",
  4571. fn: function (){
  4572. var self=this;
  4573. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5;
  4574. _st(self["@classesList"])._contents_((function(html){
  4575. return smalltalk.withContext(function($ctx2) { $1=_st(_st(self)._selectedCategories())._isEmpty();
  4576. if(! smalltalk.assert($1)){
  4577. $2=_st(html)._li();
  4578. _st($2)._class_("all");
  4579. _st($2)._with_("All");
  4580. $3=_st($2)._onClick_((function(){
  4581. return smalltalk.withContext(function($ctx3) { return _st(self)._selectAllClasses();
  4582. })}));
  4583. $3;
  4584. };
  4585. return _st(_st(self)._classes())._do_((function(each){
  4586. return smalltalk.withContext(function($ctx3) { $ctx3.li=nil;
  4587. $ctx3.locals.li=_st(html)._li();
  4588. $ctx3.locals.li;
  4589. $4=_st(_st(self)._selectedClasses())._includes_(each);
  4590. if(smalltalk.assert($4)){
  4591. _st($ctx3.locals.li)._class_("selected");
  4592. };
  4593. _st($ctx3.locals.li)._with_(_st(each)._name());
  4594. $5=_st($ctx3.locals.li)._onClick_((function(){
  4595. return smalltalk.withContext(function($ctx4) { return _st(self)._toggleClass_(each);
  4596. })}));
  4597. return $5;
  4598. })}));
  4599. })}));
  4600. return self}, self, "updateClassesList", [], smalltalk.TestRunner)}
  4601. }),
  4602. smalltalk.TestRunner);
  4603. smalltalk.addMethod(
  4604. "_updateMethodsList",
  4605. smalltalk.method({
  4606. selector: "updateMethodsList",
  4607. fn: function (){
  4608. var self=this;
  4609. return smalltalk.withContext(function($ctx1) { _st(self["@methodsList"])._contents_((function(html){
  4610. return smalltalk.withContext(function($ctx2) { _st(self)._renderErrorsOn_(html);
  4611. return _st(self)._renderFailuresOn_(html);
  4612. })}));
  4613. return self}, self, "updateMethodsList", [], smalltalk.TestRunner)}
  4614. }),
  4615. smalltalk.TestRunner);
  4616. smalltalk.addMethod(
  4617. "_updateStatusDiv",
  4618. smalltalk.method({
  4619. selector: "updateStatusDiv",
  4620. fn: function (){
  4621. var self=this;
  4622. return smalltalk.withContext(function($ctx1) { _st(self["@statusDiv"])._class_(_st("sunit status ").__comma(_st(self["@result"])._status()));
  4623. _st(self["@statusDiv"])._contents_((function(html){
  4624. return smalltalk.withContext(function($ctx2) { return _st(_st(html)._span())._with_(_st(self)._statusInfo());
  4625. })}));
  4626. return self}, self, "updateStatusDiv", [], smalltalk.TestRunner)}
  4627. }),
  4628. smalltalk.TestRunner);
  4629. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  4630. smalltalk.addMethod(
  4631. "_clearWorkspace",
  4632. smalltalk.method({
  4633. selector: "clearWorkspace",
  4634. fn: function (){
  4635. var self=this;
  4636. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._clear();
  4637. return self}, self, "clearWorkspace", [], smalltalk.Workspace)}
  4638. }),
  4639. smalltalk.Workspace);
  4640. smalltalk.addMethod(
  4641. "_doIt",
  4642. smalltalk.method({
  4643. selector: "doIt",
  4644. fn: function (){
  4645. var self=this;
  4646. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._doIt();
  4647. return self}, self, "doIt", [], smalltalk.Workspace)}
  4648. }),
  4649. smalltalk.Workspace);
  4650. smalltalk.addMethod(
  4651. "_fileIn",
  4652. smalltalk.method({
  4653. selector: "fileIn",
  4654. fn: function (){
  4655. var self=this;
  4656. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._fileIn();
  4657. return self}, self, "fileIn", [], smalltalk.Workspace)}
  4658. }),
  4659. smalltalk.Workspace);
  4660. smalltalk.addMethod(
  4661. "_inspectIt",
  4662. smalltalk.method({
  4663. selector: "inspectIt",
  4664. fn: function (){
  4665. var self=this;
  4666. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._inspectIt();
  4667. return self}, self, "inspectIt", [], smalltalk.Workspace)}
  4668. }),
  4669. smalltalk.Workspace);
  4670. smalltalk.addMethod(
  4671. "_label",
  4672. smalltalk.method({
  4673. selector: "label",
  4674. fn: function (){
  4675. var self=this;
  4676. return smalltalk.withContext(function($ctx1) { return "Workspace";
  4677. }, self, "label", [], smalltalk.Workspace)}
  4678. }),
  4679. smalltalk.Workspace);
  4680. smalltalk.addMethod(
  4681. "_printIt",
  4682. smalltalk.method({
  4683. selector: "printIt",
  4684. fn: function (){
  4685. var self=this;
  4686. return smalltalk.withContext(function($ctx1) { _st(self["@sourceArea"])._printIt();
  4687. return self}, self, "printIt", [], smalltalk.Workspace)}
  4688. }),
  4689. smalltalk.Workspace);
  4690. smalltalk.addMethod(
  4691. "_renderBoxOn_",
  4692. smalltalk.method({
  4693. selector: "renderBoxOn:",
  4694. fn: function (html){
  4695. var self=this;
  4696. return smalltalk.withContext(function($ctx1) { self["@sourceArea"]=_st((smalltalk.SourceArea || SourceArea))._new();
  4697. _st(self["@sourceArea"])._renderOn_(html);
  4698. return self}, self, "renderBoxOn:", [html], smalltalk.Workspace)}
  4699. }),
  4700. smalltalk.Workspace);
  4701. smalltalk.addMethod(
  4702. "_renderButtonsOn_",
  4703. smalltalk.method({
  4704. selector: "renderButtonsOn:",
  4705. fn: function (html){
  4706. var self=this;
  4707. return smalltalk.withContext(function($ctx1) { var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  4708. $1=_st(html)._button();
  4709. _st($1)._with_("DoIt");
  4710. _st($1)._title_("ctrl+d");
  4711. $2=_st($1)._onClick_((function(){
  4712. return smalltalk.withContext(function($ctx2) { return _st(self)._doIt();
  4713. })}));
  4714. $3=_st(html)._button();
  4715. _st($3)._with_("PrintIt");
  4716. _st($3)._title_("ctrl+p");
  4717. $4=_st($3)._onClick_((function(){
  4718. return smalltalk.withContext(function($ctx2) { return _st(self)._printIt();
  4719. })}));
  4720. $5=_st(html)._button();
  4721. _st($5)._with_("InspectIt");
  4722. _st($5)._title_("ctrl+i");
  4723. $6=_st($5)._onClick_((function(){
  4724. return smalltalk.withContext(function($ctx2) { return _st(self)._inspectIt();
  4725. })}));
  4726. $7=_st(html)._button();
  4727. _st($7)._with_("FileIn");
  4728. _st($7)._title_("ctrl+f");
  4729. $8=_st($7)._onClick_((function(){
  4730. return smalltalk.withContext(function($ctx2) { return _st(self)._fileIn();
  4731. })}));
  4732. $9=_st(html)._button();
  4733. _st($9)._with_("Clear workspace");
  4734. $10=_st($9)._onClick_((function(){
  4735. return smalltalk.withContext(function($ctx2) { return _st(self)._clearWorkspace();
  4736. })}));
  4737. return self}, self, "renderButtonsOn:", [html], smalltalk.Workspace)}
  4738. }),
  4739. smalltalk.Workspace);
  4740. smalltalk.addMethod(
  4741. "_show",
  4742. smalltalk.method({
  4743. selector: "show",
  4744. fn: function (){
  4745. var self=this;
  4746. return smalltalk.withContext(function($ctx1) { smalltalk.TabWidget.fn.prototype._show.apply(_st(self), []);
  4747. _st(self["@sourceArea"])._focus();
  4748. return self}, self, "show", [], smalltalk.Workspace)}
  4749. }),
  4750. smalltalk.Workspace);
  4751. smalltalk.addMethod(
  4752. "_inspect",
  4753. smalltalk.method({
  4754. selector: "inspect",
  4755. fn: function (){
  4756. var self=this;
  4757. return smalltalk.withContext(function($ctx1) { var $1,$2;
  4758. $1=_st((smalltalk.Inspector || Inspector))._new();
  4759. _st($1)._inspect_(self);
  4760. $2=_st($1)._open();
  4761. return self}, self, "inspect", [], smalltalk.Object)}
  4762. }),
  4763. smalltalk.Object);
  4764. smalltalk.addMethod(
  4765. "_inspectOn_",
  4766. smalltalk.method({
  4767. selector: "inspectOn:",
  4768. fn: function (anInspector){
  4769. var self=this;
  4770. return smalltalk.withContext(function($ctx1) { var $1;
  4771. $ctx1.variables=nil;
  4772. $ctx1.locals.variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4773. _st($ctx1.locals.variables)._at_put_("#self",self);
  4774. _st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
  4775. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.variables)._at_put_(each,_st(self)._instVarAt_(each));
  4776. })}));
  4777. _st(anInspector)._setLabel_(_st(self)._printString());
  4778. $1=_st(anInspector)._setVariables_($ctx1.locals.variables);
  4779. return self}, self, "inspectOn:", [anInspector], smalltalk.Object)}
  4780. }),
  4781. smalltalk.Object);
  4782. smalltalk.addMethod(
  4783. "_inspectOn_",
  4784. smalltalk.method({
  4785. selector: "inspectOn:",
  4786. fn: function (anInspector){
  4787. var self=this;
  4788. return smalltalk.withContext(function($ctx1) { var $1;
  4789. $ctx1.variables=nil;
  4790. $ctx1.locals.variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4791. _st($ctx1.locals.variables)._at_put_("#self",self);
  4792. _st(self)._withIndexDo_((function(each,i){
  4793. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.variables)._at_put_(i,each);
  4794. })}));
  4795. _st(anInspector)._setLabel_(_st(self)._printString());
  4796. $1=_st(anInspector)._setVariables_($ctx1.locals.variables);
  4797. return self}, self, "inspectOn:", [anInspector], smalltalk.Collection)}
  4798. }),
  4799. smalltalk.Collection);
  4800. smalltalk.addMethod(
  4801. "_inspectOn_",
  4802. smalltalk.method({
  4803. selector: "inspectOn:",
  4804. fn: function (anInspector){
  4805. var self=this;
  4806. return smalltalk.withContext(function($ctx1) { var $1;
  4807. $ctx1.variables=nil;
  4808. $ctx1.locals.variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4809. _st($ctx1.locals.variables)._at_put_("#self",self);
  4810. _st($ctx1.locals.variables)._at_put_("#keys",_st(self)._keys());
  4811. _st(self)._keysAndValuesDo_((function(key,value){
  4812. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.variables)._at_put_(key,value);
  4813. })}));
  4814. _st(anInspector)._setLabel_(_st(self)._printString());
  4815. $1=_st(anInspector)._setVariables_($ctx1.locals.variables);
  4816. return self}, self, "inspectOn:", [anInspector], smalltalk.HashedCollection)}
  4817. }),
  4818. smalltalk.HashedCollection);
  4819. smalltalk.addMethod(
  4820. "_inspectOn_",
  4821. smalltalk.method({
  4822. selector: "inspectOn:",
  4823. fn: function (anInspector){
  4824. var self=this;
  4825. return smalltalk.withContext(function($ctx1) { var $1;
  4826. $ctx1.label=nil;
  4827. smalltalk.CharacterArray.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  4828. $1=_st(_st(_st(self)._printString())._size()).__gt((30));
  4829. if(smalltalk.assert($1)){
  4830. $ctx1.locals.label=_st(_st(_st(self)._printString())._copyFrom_to_((1),(30))).__comma("...'");
  4831. $ctx1.locals.label;
  4832. } else {
  4833. $ctx1.locals.label=_st(self)._printString();
  4834. $ctx1.locals.label;
  4835. };
  4836. _st(anInspector)._setLabel_($ctx1.locals.label);
  4837. return self}, self, "inspectOn:", [anInspector], smalltalk.String)}
  4838. }),
  4839. smalltalk.String);
  4840. smalltalk.addMethod(
  4841. "_inspectOn_",
  4842. smalltalk.method({
  4843. selector: "inspectOn:",
  4844. fn: function (anInspector){
  4845. var self=this;
  4846. return smalltalk.withContext(function($ctx1) { var $1;
  4847. $ctx1.variables=nil;
  4848. $ctx1.locals.variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4849. _st($ctx1.locals.variables)._at_put_("#self",self);
  4850. _st(self["@elements"])._withIndexDo_((function(each,i){
  4851. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.variables)._at_put_(i,each);
  4852. })}));
  4853. _st(anInspector)._setLabel_(_st(self)._printString());
  4854. $1=_st(anInspector)._setVariables_($ctx1.locals.variables);
  4855. return self}, self, "inspectOn:", [anInspector], smalltalk.Set)}
  4856. }),
  4857. smalltalk.Set);
  4858. smalltalk.addMethod(
  4859. "_inspectOn_",
  4860. smalltalk.method({
  4861. selector: "inspectOn:",
  4862. fn: function (anInspector){
  4863. var self=this;
  4864. return smalltalk.withContext(function($ctx1) { var $1;
  4865. $ctx1.variables=nil;
  4866. $ctx1.locals.variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4867. _st($ctx1.locals.variables)._at_put_("#self",self);
  4868. _st($ctx1.locals.variables)._at_put_("#year",_st(self)._year());
  4869. _st($ctx1.locals.variables)._at_put_("#month",_st(self)._month());
  4870. _st($ctx1.locals.variables)._at_put_("#day",_st(self)._day());
  4871. _st($ctx1.locals.variables)._at_put_("#hours",_st(self)._hours());
  4872. _st($ctx1.locals.variables)._at_put_("#minutes",_st(self)._minutes());
  4873. _st($ctx1.locals.variables)._at_put_("#seconds",_st(self)._seconds());
  4874. _st($ctx1.locals.variables)._at_put_("#milliseconds",_st(self)._milliseconds());
  4875. _st(anInspector)._setLabel_(_st(self)._printString());
  4876. $1=_st(anInspector)._setVariables_($ctx1.locals.variables);
  4877. return self}, self, "inspectOn:", [anInspector], smalltalk.Date)}
  4878. }),
  4879. smalltalk.Date);
  4880. smalltalk.addMethod(
  4881. "_inspectOn_",
  4882. smalltalk.method({
  4883. selector: "inspectOn:",
  4884. fn: function (anInspector){
  4885. var self=this;
  4886. return smalltalk.withContext(function($ctx1) { var $1;
  4887. $ctx1.variables=nil;
  4888. $ctx1.locals.variables=_st((smalltalk.Dictionary || Dictionary))._new();
  4889. _st($ctx1.locals.variables)._at_put_("#self",self);
  4890. _st($ctx1.locals.variables)._at_put_("#home",_st(self)._home());
  4891. _st($ctx1.locals.variables)._at_put_("#receiver",_st(self)._receiver());
  4892. _st($ctx1.locals.variables)._at_put_("#selector",_st(self)._selector());
  4893. _st($ctx1.locals.variables)._at_put_("#temps",_st(self)._temps());
  4894. _st(_st(_st(self)._class())._instanceVariableNames())._do_((function(each){
  4895. return smalltalk.withContext(function($ctx2) { return _st($ctx1.locals.variables)._at_put_(each,_st(self)._instVarAt_(each));
  4896. })}));
  4897. _st(anInspector)._setLabel_(_st(self)._printString());
  4898. $1=_st(anInspector)._setVariables_($ctx1.locals.variables);
  4899. return self}, self, "inspectOn:", [anInspector], smalltalk.MethodContext)}
  4900. }),
  4901. smalltalk.MethodContext);