1
0

IDE.deploy.js 191 KB

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