1
0

IDE.deploy.js 198 KB

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