IDE.deploy.js 196 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847
  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. "_canBeClosed",
  1474. smalltalk.method({
  1475. selector: "canBeClosed",
  1476. fn: function () {
  1477. var self=this;
  1478. return smalltalk.withContext(function($ctx1) {
  1479. return true;
  1480. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Browser)});},
  1481. messageSends: []}),
  1482. smalltalk.Browser);
  1483. smalltalk.addMethod(
  1484. "_cancelChanges",
  1485. smalltalk.method({
  1486. selector: "cancelChanges",
  1487. fn: function () {
  1488. var self=this;
  1489. return smalltalk.withContext(function($ctx1) {
  1490. var $2,$1;
  1491. $2=self["@unsavedChanges"];
  1492. if(smalltalk.assert($2)){
  1493. $1=_st(window)._confirm_("Cancel changes?");
  1494. } else {
  1495. $1=true;
  1496. };
  1497. return $1;
  1498. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)});},
  1499. messageSends: ["ifTrue:ifFalse:", "confirm:"]}),
  1500. smalltalk.Browser);
  1501. smalltalk.addMethod(
  1502. "_classCommentSource",
  1503. smalltalk.method({
  1504. selector: "classCommentSource",
  1505. fn: function () {
  1506. var self=this;
  1507. return smalltalk.withContext(function($ctx1) {
  1508. var $1;
  1509. $1=_st(self["@selectedClass"])._comment();
  1510. return $1;
  1511. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},smalltalk.Browser)});},
  1512. messageSends: ["comment"]}),
  1513. smalltalk.Browser);
  1514. smalltalk.addMethod(
  1515. "_classDeclarationSource",
  1516. smalltalk.method({
  1517. selector: "classDeclarationSource",
  1518. fn: function () {
  1519. var self=this;
  1520. var stream;
  1521. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  1522. return smalltalk.withContext(function($ctx1) {
  1523. var $1,$2,$3,$4,$5,$6,$7;
  1524. stream=_st("")._writeStream();
  1525. $1=self["@selectedClass"];
  1526. if(($receiver = $1) == nil || $receiver == undefined){
  1527. $2=_st(self)._classDeclarationTemplate();
  1528. return $2;
  1529. } else {
  1530. $1;
  1531. };
  1532. $3=stream;
  1533. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  1534. _st($3)._nextPutAll_(" subclass: #");
  1535. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  1536. _st($3)._nextPutAll_(_st(_st($String())._lf()).__comma(_st($String())._tab()));
  1537. $4=_st($3)._nextPutAll_("instanceVariableNames: '");
  1538. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  1539. return smalltalk.withContext(function($ctx2) {
  1540. return _st(stream)._nextPutAll_(each);
  1541. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1542. return smalltalk.withContext(function($ctx2) {
  1543. return _st(stream)._nextPutAll_(" ");
  1544. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1545. $5=stream;
  1546. _st($5)._nextPutAll_(_st(_st("'").__comma(_st($String())._lf())).__comma(_st($String())._tab()));
  1547. _st($5)._nextPutAll_("package: '");
  1548. _st($5)._nextPutAll_(_st(self["@selectedClass"])._category());
  1549. $6=_st($5)._nextPutAll_("'");
  1550. $7=_st(stream)._contents();
  1551. return $7;
  1552. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},smalltalk.Browser)});},
  1553. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "tab", "lf", "do:separatedBy:", "instanceVariableNames", "category", "contents"]}),
  1554. smalltalk.Browser);
  1555. smalltalk.addMethod(
  1556. "_classDeclarationTemplate",
  1557. smalltalk.method({
  1558. selector: "classDeclarationTemplate",
  1559. fn: function () {
  1560. var self=this;
  1561. return smalltalk.withContext(function($ctx1) {
  1562. var $1;
  1563. $1=_st(_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '").__comma(_st(self)._selectedPackage())).__comma("'");
  1564. return $1;
  1565. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},smalltalk.Browser)});},
  1566. messageSends: [",", "selectedPackage"]}),
  1567. smalltalk.Browser);
  1568. smalltalk.addMethod(
  1569. "_classes",
  1570. smalltalk.method({
  1571. selector: "classes",
  1572. fn: function () {
  1573. var self=this;
  1574. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1575. return smalltalk.withContext(function($ctx1) {
  1576. var $1;
  1577. $1=_st(_st(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
  1578. return smalltalk.withContext(function($ctx2) {
  1579. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  1580. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
  1581. return smalltalk.withContext(function($ctx2) {
  1582. return _st(_st(a)._name()).__lt(_st(b)._name());
  1583. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})})))._asSet();
  1584. return $1;
  1585. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Browser)});},
  1586. messageSends: ["asSet", "sort:", "<", "name", "select:", "=", "category", "classes", "current"]}),
  1587. smalltalk.Browser);
  1588. smalltalk.addMethod(
  1589. "_commitPackage",
  1590. smalltalk.method({
  1591. selector: "commitPackage",
  1592. fn: function () {
  1593. var self=this;
  1594. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  1595. return smalltalk.withContext(function($ctx1) {
  1596. var $1;
  1597. $1=self["@selectedPackage"];
  1598. if(($receiver = $1) == nil || $receiver == undefined){
  1599. $1;
  1600. } else {
  1601. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  1602. };
  1603. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.Browser)});},
  1604. messageSends: ["ifNotNil:", "commit", "named:"]}),
  1605. smalltalk.Browser);
  1606. smalltalk.addMethod(
  1607. "_compile",
  1608. smalltalk.method({
  1609. selector: "compile",
  1610. fn: function () {
  1611. var self=this;
  1612. var currentEditLine;
  1613. return smalltalk.withContext(function($ctx1) {
  1614. var $1,$2,$3;
  1615. _st(self)._disableSaveButton();
  1616. currentEditLine=_st(_st(self["@sourceArea"])._editor())._getCursor();
  1617. $1=_st(self["@selectedTab"]).__eq("comment");
  1618. if(smalltalk.assert($1)){
  1619. $2=self["@selectedClass"];
  1620. if(($receiver = $2) == nil || $receiver == undefined){
  1621. $2;
  1622. } else {
  1623. _st(self)._compileClassComment();
  1624. };
  1625. } else {
  1626. $3=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  1627. return smalltalk.withContext(function($ctx2) {
  1628. return _st(self["@selectedMethod"])._notNil();
  1629. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1630. if(smalltalk.assert($3)){
  1631. _st(self)._compileMethodDefinition();
  1632. } else {
  1633. _st(self)._compileDefinition();
  1634. };
  1635. };
  1636. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  1637. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},smalltalk.Browser)});},
  1638. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "compileDefinition", "compileMethodDefinition", "or:", "notNil", "=", "setCursor:"]}),
  1639. smalltalk.Browser);
  1640. smalltalk.addMethod(
  1641. "_compileClassComment",
  1642. smalltalk.method({
  1643. selector: "compileClassComment",
  1644. fn: function () {
  1645. var self=this;
  1646. return smalltalk.withContext(function($ctx1) {
  1647. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  1648. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},smalltalk.Browser)});},
  1649. messageSends: ["comment:", "val"]}),
  1650. smalltalk.Browser);
  1651. smalltalk.addMethod(
  1652. "_compileDefinition",
  1653. smalltalk.method({
  1654. selector: "compileDefinition",
  1655. fn: function () {
  1656. var self=this;
  1657. var newClass;
  1658. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1659. return smalltalk.withContext(function($ctx1) {
  1660. var $1,$2;
  1661. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  1662. $1=self;
  1663. _st($1)._resetClassesList();
  1664. _st($1)._updateCategoriesList();
  1665. $2=_st($1)._updateClassesList();
  1666. _st(self)._selectClass_(newClass);
  1667. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},smalltalk.Browser)});},
  1668. messageSends: ["evaluateExpression:", "val", "new", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"]}),
  1669. smalltalk.Browser);
  1670. smalltalk.addMethod(
  1671. "_compileMethodDefinition",
  1672. smalltalk.method({
  1673. selector: "compileMethodDefinition",
  1674. fn: function () {
  1675. var self=this;
  1676. return smalltalk.withContext(function($ctx1) {
  1677. var $1;
  1678. $1=_st(self["@selectedTab"]).__eq("instance");
  1679. if(smalltalk.assert($1)){
  1680. _st(self)._compileMethodDefinitionFor_(self["@selectedClass"]);
  1681. } else {
  1682. _st(self)._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  1683. };
  1684. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},smalltalk.Browser)});},
  1685. messageSends: ["ifTrue:ifFalse:", "compileMethodDefinitionFor:", "class", "="]}),
  1686. smalltalk.Browser);
  1687. smalltalk.addMethod(
  1688. "_compileMethodDefinitionFor_",
  1689. smalltalk.method({
  1690. selector: "compileMethodDefinitionFor:",
  1691. fn: function (aClass) {
  1692. var self=this;
  1693. var compiler,method,source,node;
  1694. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  1695. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1696. return smalltalk.withContext(function($ctx1) {
  1697. var $1,$2,$3,$4,$5,$6;
  1698. var $early={};
  1699. try {
  1700. source=_st(self["@sourceArea"])._val();
  1701. $1=self["@selectedProtocol"];
  1702. if(($receiver = $1) == nil || $receiver == undefined){
  1703. self["@selectedProtocol"]=_st(self["@selectedMethod"])._category();
  1704. self["@selectedProtocol"];
  1705. } else {
  1706. $1;
  1707. };
  1708. compiler=_st($Compiler())._new();
  1709. _st(compiler)._source_(source);
  1710. node=_st(compiler)._parse_(source);
  1711. $2=_st(node)._isParseFailure();
  1712. if(smalltalk.assert($2)){
  1713. $3=_st(window)._alert_(_st(_st(_st("PARSE ERROR: ").__comma(_st(node)._reason())).__comma(", position: ")).__comma(_st(_st(node)._position())._asString()));
  1714. return $3;
  1715. };
  1716. _st(compiler)._currentClass_(aClass);
  1717. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  1718. _st(_st(compiler)._unknownVariables())._do_((function(each){
  1719. return smalltalk.withContext(function($ctx2) {
  1720. $4=_st(window)._at_(each);
  1721. if(($receiver = $4) == nil || $receiver == undefined){
  1722. $5=_st(window)._confirm_(_st(_st("Declare '").__comma(each)).__comma("' as instance variable?"));
  1723. if(smalltalk.assert($5)){
  1724. _st(self)._addInstanceVariableNamed_toClass_(each,aClass);
  1725. $6=_st(self)._compileMethodDefinitionFor_(aClass);
  1726. throw $early=[$6];
  1727. };
  1728. } else {
  1729. return $4;
  1730. };
  1731. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1732. _st(_st($ClassBuilder())._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
  1733. _st(self)._updateMethodsList();
  1734. _st(self)._selectMethod_(method);
  1735. return self}
  1736. catch(e) {if(e===$early)return e[0]; throw e}
  1737. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)});},
  1738. 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:"]}),
  1739. smalltalk.Browser);
  1740. smalltalk.addMethod(
  1741. "_copyClass",
  1742. smalltalk.method({
  1743. selector: "copyClass",
  1744. fn: function () {
  1745. var self=this;
  1746. var className;
  1747. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1748. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1749. return smalltalk.withContext(function($ctx1) {
  1750. var $1,$2,$3;
  1751. className=_st(window)._prompt_("Copy class");
  1752. $1=_st(_st(className)._notNil())._and_((function(){
  1753. return smalltalk.withContext(function($ctx2) {
  1754. return _st(className)._notEmpty();
  1755. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1756. if(smalltalk.assert($1)){
  1757. _st(_st($ClassBuilder())._new())._copyClass_named_(_st(self)._selectedClass(),className);
  1758. $2=self;
  1759. _st($2)._resetClassesList();
  1760. $3=_st($2)._updateClassesList();
  1761. $3;
  1762. _st(self)._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  1763. };
  1764. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)});},
  1765. messageSends: ["prompt:", "ifTrue:", "copyClass:named:", "selectedClass", "new", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"]}),
  1766. smalltalk.Browser);
  1767. smalltalk.addMethod(
  1768. "_declarationSource",
  1769. smalltalk.method({
  1770. selector: "declarationSource",
  1771. fn: function () {
  1772. var self=this;
  1773. return smalltalk.withContext(function($ctx1) {
  1774. var $2,$1;
  1775. $2=_st(self["@selectedTab"]).__eq("instance");
  1776. if(smalltalk.assert($2)){
  1777. $1=_st(self)._classDeclarationSource();
  1778. } else {
  1779. $1=_st(self)._metaclassDeclarationSource();
  1780. };
  1781. return $1;
  1782. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},smalltalk.Browser)});},
  1783. messageSends: ["ifTrue:ifFalse:", "classDeclarationSource", "metaclassDeclarationSource", "="]}),
  1784. smalltalk.Browser);
  1785. smalltalk.addMethod(
  1786. "_disableSaveButton",
  1787. smalltalk.method({
  1788. selector: "disableSaveButton",
  1789. fn: function () {
  1790. var self=this;
  1791. return smalltalk.withContext(function($ctx1) {
  1792. var $1;
  1793. $1=self["@saveButton"];
  1794. if(($receiver = $1) == nil || $receiver == undefined){
  1795. $1;
  1796. } else {
  1797. _st(self["@saveButton"])._at_put_("disabled",true);
  1798. };
  1799. self["@unsavedChanges"]=false;
  1800. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},smalltalk.Browser)});},
  1801. messageSends: ["ifNotNil:", "at:put:"]}),
  1802. smalltalk.Browser);
  1803. smalltalk.addMethod(
  1804. "_dummyMethodSource",
  1805. smalltalk.method({
  1806. selector: "dummyMethodSource",
  1807. fn: function () {
  1808. var self=this;
  1809. return smalltalk.withContext(function($ctx1) {
  1810. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  1811. }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{},smalltalk.Browser)});},
  1812. messageSends: []}),
  1813. smalltalk.Browser);
  1814. smalltalk.addMethod(
  1815. "_handleSourceAreaKeyDown_",
  1816. smalltalk.method({
  1817. selector: "handleSourceAreaKeyDown:",
  1818. fn: function (anEvent) {
  1819. var self=this;
  1820. return smalltalk.withContext(function($ctx1) {
  1821. if(anEvent.ctrlKey) {
  1822. if(anEvent.keyCode === 83) { //ctrl+s
  1823. self._compile();
  1824. anEvent.preventDefault();
  1825. return false;
  1826. }
  1827. }
  1828. ;
  1829. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},smalltalk.Browser)});},
  1830. messageSends: []}),
  1831. smalltalk.Browser);
  1832. smalltalk.addMethod(
  1833. "_hideClassButtons",
  1834. smalltalk.method({
  1835. selector: "hideClassButtons",
  1836. fn: function () {
  1837. var self=this;
  1838. return smalltalk.withContext(function($ctx1) {
  1839. _st(_st(self["@classButtons"])._asJQuery())._hide();
  1840. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},smalltalk.Browser)});},
  1841. messageSends: ["hide", "asJQuery"]}),
  1842. smalltalk.Browser);
  1843. smalltalk.addMethod(
  1844. "_hideMethodButtons",
  1845. smalltalk.method({
  1846. selector: "hideMethodButtons",
  1847. fn: function () {
  1848. var self=this;
  1849. return smalltalk.withContext(function($ctx1) {
  1850. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  1851. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},smalltalk.Browser)});},
  1852. messageSends: ["hide", "asJQuery"]}),
  1853. smalltalk.Browser);
  1854. smalltalk.addMethod(
  1855. "_initialize",
  1856. smalltalk.method({
  1857. selector: "initialize",
  1858. fn: function () {
  1859. var self=this;
  1860. return smalltalk.withContext(function($ctx1) {
  1861. smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  1862. self["@selectedTab"]="instance";
  1863. self["@selectedPackage"]=_st(_st(self)._packages())._first();
  1864. self["@unsavedChanges"]=false;
  1865. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Browser)});},
  1866. messageSends: ["initialize", "first", "packages"]}),
  1867. smalltalk.Browser);
  1868. smalltalk.addMethod(
  1869. "_label",
  1870. smalltalk.method({
  1871. selector: "label",
  1872. fn: function () {
  1873. var self=this;
  1874. return smalltalk.withContext(function($ctx1) {
  1875. var $2,$1;
  1876. $2=self["@selectedClass"];
  1877. if(($receiver = $2) == nil || $receiver == undefined){
  1878. $1="Browser (nil)";
  1879. } else {
  1880. $1=_st("Browser: ").__comma(_st(self["@selectedClass"])._name());
  1881. };
  1882. return $1;
  1883. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Browser)});},
  1884. messageSends: ["ifNil:ifNotNil:", ",", "name"]}),
  1885. smalltalk.Browser);
  1886. smalltalk.addMethod(
  1887. "_metaclassDeclarationSource",
  1888. smalltalk.method({
  1889. selector: "metaclassDeclarationSource",
  1890. fn: function () {
  1891. var self=this;
  1892. var stream;
  1893. return smalltalk.withContext(function($ctx1) {
  1894. var $1,$2,$3,$4;
  1895. stream=_st("")._writeStream();
  1896. $1=self["@selectedClass"];
  1897. if(($receiver = $1) == nil || $receiver == undefined){
  1898. $1;
  1899. } else {
  1900. $2=stream;
  1901. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  1902. _st($2)._nextPutAll_(" class ");
  1903. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  1904. $3;
  1905. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  1906. return smalltalk.withContext(function($ctx2) {
  1907. return _st(stream)._nextPutAll_(each);
  1908. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}),(function(){
  1909. return smalltalk.withContext(function($ctx2) {
  1910. return _st(stream)._nextPutAll_(" ");
  1911. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  1912. _st(stream)._nextPutAll_("'");
  1913. };
  1914. $4=_st(stream)._contents();
  1915. return $4;
  1916. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},smalltalk.Browser)});},
  1917. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"]}),
  1918. smalltalk.Browser);
  1919. smalltalk.addMethod(
  1920. "_methodSource",
  1921. smalltalk.method({
  1922. selector: "methodSource",
  1923. fn: function () {
  1924. var self=this;
  1925. return smalltalk.withContext(function($ctx1) {
  1926. var $2,$1;
  1927. $2=self["@selectedMethod"];
  1928. if(($receiver = $2) == nil || $receiver == undefined){
  1929. $1=_st(self)._dummyMethodSource();
  1930. } else {
  1931. $1=_st(self["@selectedMethod"])._source();
  1932. };
  1933. return $1;
  1934. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},smalltalk.Browser)});},
  1935. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"]}),
  1936. smalltalk.Browser);
  1937. smalltalk.addMethod(
  1938. "_methods",
  1939. smalltalk.method({
  1940. selector: "methods",
  1941. fn: function () {
  1942. var self=this;
  1943. var klass;
  1944. return smalltalk.withContext(function($ctx1) {
  1945. var $1,$2,$3,$4,$7,$8,$6,$5;
  1946. $1=_st(self["@selectedTab"]).__eq("comment");
  1947. if(smalltalk.assert($1)){
  1948. $2=[];
  1949. return $2;
  1950. };
  1951. $3=self["@selectedClass"];
  1952. if(($receiver = $3) == nil || $receiver == undefined){
  1953. $3;
  1954. } else {
  1955. $4=_st(self["@selectedTab"]).__eq("instance");
  1956. if(smalltalk.assert($4)){
  1957. klass=self["@selectedClass"];
  1958. } else {
  1959. klass=_st(self["@selectedClass"])._class();
  1960. };
  1961. klass;
  1962. };
  1963. $7=self["@selectedProtocol"];
  1964. if(($receiver = $7) == nil || $receiver == undefined){
  1965. $8=klass;
  1966. if(($receiver = $8) == nil || $receiver == undefined){
  1967. $6=[];
  1968. } else {
  1969. $6=_st(_st(klass)._methodDictionary())._values();
  1970. };
  1971. } else {
  1972. $6=_st(_st(_st(klass)._methodDictionary())._values())._select_((function(each){
  1973. return smalltalk.withContext(function($ctx2) {
  1974. return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
  1975. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  1976. };
  1977. $5=_st($6)._sort_((function(a,b){
  1978. return smalltalk.withContext(function($ctx2) {
  1979. return _st(_st(a)._selector()).__lt(_st(b)._selector());
  1980. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  1981. return $5;
  1982. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},smalltalk.Browser)});},
  1983. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "<", "selector", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category"]}),
  1984. smalltalk.Browser);
  1985. smalltalk.addMethod(
  1986. "_packages",
  1987. smalltalk.method({
  1988. selector: "packages",
  1989. fn: function () {
  1990. var self=this;
  1991. var packages;
  1992. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1993. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1994. return smalltalk.withContext(function($ctx1) {
  1995. var $1,$2;
  1996. packages=_st($Array())._new();
  1997. _st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
  1998. return smalltalk.withContext(function($ctx2) {
  1999. $1=_st(packages)._includes_(_st(each)._category());
  2000. if(! smalltalk.assert($1)){
  2001. return _st(packages)._add_(_st(each)._category());
  2002. };
  2003. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  2004. $2=_st(packages)._sort();
  2005. return $2;
  2006. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.Browser)});},
  2007. messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "classes", "current", "sort"]}),
  2008. smalltalk.Browser);
  2009. smalltalk.addMethod(
  2010. "_protocols",
  2011. smalltalk.method({
  2012. selector: "protocols",
  2013. fn: function () {
  2014. var self=this;
  2015. var klass;
  2016. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2017. return smalltalk.withContext(function($ctx1) {
  2018. var $1,$2,$3,$4,$5,$6,$7,$8;
  2019. $1=self["@selectedClass"];
  2020. if(($receiver = $1) == nil || $receiver == undefined){
  2021. $1;
  2022. } else {
  2023. $2=_st(self["@selectedTab"]).__eq("comment");
  2024. if(smalltalk.assert($2)){
  2025. $3=[];
  2026. return $3;
  2027. };
  2028. $4=_st(self["@selectedTab"]).__eq("instance");
  2029. if(smalltalk.assert($4)){
  2030. klass=self["@selectedClass"];
  2031. } else {
  2032. klass=_st(self["@selectedClass"])._class();
  2033. };
  2034. klass;
  2035. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2036. if(smalltalk.assert($5)){
  2037. $6=_st($Array())._with_("not yet classified");
  2038. return $6;
  2039. };
  2040. $7=_st(klass)._protocols();
  2041. return $7;
  2042. };
  2043. $8=_st($Array())._new();
  2044. return $8;
  2045. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},smalltalk.Browser)});},
  2046. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "with:", "isEmpty", "methodDictionary", "protocols", "new"]}),
  2047. smalltalk.Browser);
  2048. smalltalk.addMethod(
  2049. "_removeClass",
  2050. smalltalk.method({
  2051. selector: "removeClass",
  2052. fn: function () {
  2053. var self=this;
  2054. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2055. return smalltalk.withContext(function($ctx1) {
  2056. var $1;
  2057. $1=_st(window)._confirm_(_st(_st("Do you really want to remove ").__comma(_st(self["@selectedClass"])._name())).__comma("?"));
  2058. if(smalltalk.assert($1)){
  2059. _st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
  2060. _st(self)._resetClassesList();
  2061. _st(self)._selectClass_(nil);
  2062. };
  2063. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.Browser)});},
  2064. messageSends: ["ifTrue:", "removeClass:", "current", "resetClassesList", "selectClass:", "confirm:", ",", "name"]}),
  2065. smalltalk.Browser);
  2066. smalltalk.addMethod(
  2067. "_removeMethod",
  2068. smalltalk.method({
  2069. selector: "removeMethod",
  2070. fn: function () {
  2071. var self=this;
  2072. return smalltalk.withContext(function($ctx1) {
  2073. var $1,$2,$3;
  2074. $1=_st(self)._cancelChanges();
  2075. if(smalltalk.assert($1)){
  2076. $2=_st(window)._confirm_(_st(_st("Do you really want to remove #").__comma(_st(self["@selectedMethod"])._selector())).__comma("?"));
  2077. if(smalltalk.assert($2)){
  2078. $3=_st(self["@selectedTab"]).__eq("instance");
  2079. if(smalltalk.assert($3)){
  2080. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2081. } else {
  2082. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2083. };
  2084. _st(self)._selectMethod_(nil);
  2085. };
  2086. };
  2087. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.Browser)});},
  2088. messageSends: ["ifTrue:", "ifTrue:ifFalse:", "removeCompiledMethod:", "class", "=", "selectMethod:", "confirm:", ",", "selector", "cancelChanges"]}),
  2089. smalltalk.Browser);
  2090. smalltalk.addMethod(
  2091. "_removePackage",
  2092. smalltalk.method({
  2093. selector: "removePackage",
  2094. fn: function () {
  2095. var self=this;
  2096. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2097. return smalltalk.withContext(function($ctx1) {
  2098. var $1;
  2099. $1=_st(window)._confirm_(_st(_st("Do you really want to remove the whole package ").__comma(self["@selectedPackage"])).__comma(" with all its classes?"));
  2100. if(smalltalk.assert($1)){
  2101. _st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
  2102. _st(self)._updateCategoriesList();
  2103. };
  2104. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},smalltalk.Browser)});},
  2105. messageSends: ["ifTrue:", "removePackage:", "current", "updateCategoriesList", "confirm:", ","]}),
  2106. smalltalk.Browser);
  2107. smalltalk.addMethod(
  2108. "_renameClass",
  2109. smalltalk.method({
  2110. selector: "renameClass",
  2111. fn: function () {
  2112. var self=this;
  2113. var newName;
  2114. return smalltalk.withContext(function($ctx1) {
  2115. var $1,$2,$3;
  2116. newName=_st(window)._prompt_(_st("Rename class ").__comma(_st(self["@selectedClass"])._name()));
  2117. $1=_st(_st(newName)._notNil())._and_((function(){
  2118. return smalltalk.withContext(function($ctx2) {
  2119. return _st(newName)._notEmpty();
  2120. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2121. if(smalltalk.assert($1)){
  2122. _st(self["@selectedClass"])._rename_(newName);
  2123. $2=self;
  2124. _st($2)._updateClassesList();
  2125. $3=_st($2)._updateSourceAndButtons();
  2126. $3;
  2127. };
  2128. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},smalltalk.Browser)});},
  2129. messageSends: ["prompt:", ",", "name", "ifTrue:", "rename:", "updateClassesList", "updateSourceAndButtons", "and:", "notEmpty", "notNil"]}),
  2130. smalltalk.Browser);
  2131. smalltalk.addMethod(
  2132. "_renamePackage",
  2133. smalltalk.method({
  2134. selector: "renamePackage",
  2135. fn: function () {
  2136. var self=this;
  2137. var newName;
  2138. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2139. return smalltalk.withContext(function($ctx1) {
  2140. var $1,$2;
  2141. newName=_st(window)._prompt_(_st("Rename package ").__comma(self["@selectedPackage"]));
  2142. $1=newName;
  2143. if(($receiver = $1) == nil || $receiver == undefined){
  2144. $1;
  2145. } else {
  2146. $2=_st(newName)._notEmpty();
  2147. if(smalltalk.assert($2)){
  2148. _st(_st($Smalltalk())._current())._renamePackage_to_(self["@selectedPackage"],newName);
  2149. _st(self)._updateCategoriesList();
  2150. };
  2151. };
  2152. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},smalltalk.Browser)});},
  2153. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "renamePackage:to:", "current", "updateCategoriesList", "notEmpty"]}),
  2154. smalltalk.Browser);
  2155. smalltalk.addMethod(
  2156. "_renderBottomPanelOn_",
  2157. smalltalk.method({
  2158. selector: "renderBottomPanelOn:",
  2159. fn: function (html) {
  2160. var self=this;
  2161. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2162. return smalltalk.withContext(function($ctx1) {
  2163. var $1,$2;
  2164. $1=_st(html)._div();
  2165. _st($1)._class_("amber_sourceCode");
  2166. $2=_st($1)._with_((function(){
  2167. return smalltalk.withContext(function($ctx2) {
  2168. self["@sourceArea"]=_st($SourceArea())._new();
  2169. self["@sourceArea"];
  2170. _st(self["@sourceArea"])._renderOn_(html);
  2171. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2172. return smalltalk.withContext(function($ctx3) {
  2173. return _st(self)._handleSourceAreaKeyDown_(e);
  2174. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx1)})}));
  2175. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2176. return smalltalk.withContext(function($ctx3) {
  2177. return _st(self)._updateStatus();
  2178. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2179. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2180. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Browser)});},
  2181. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"]}),
  2182. smalltalk.Browser);
  2183. smalltalk.addMethod(
  2184. "_renderBoxOn_",
  2185. smalltalk.method({
  2186. selector: "renderBoxOn:",
  2187. fn: function (html) {
  2188. var self=this;
  2189. return smalltalk.withContext(function($ctx1) {
  2190. var $1,$2;
  2191. $1=self;
  2192. _st($1)._renderTopPanelOn_(html);
  2193. _st($1)._renderTabsOn_(html);
  2194. $2=_st($1)._renderBottomPanelOn_(html);
  2195. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Browser)});},
  2196. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"]}),
  2197. smalltalk.Browser);
  2198. smalltalk.addMethod(
  2199. "_renderButtonsOn_",
  2200. smalltalk.method({
  2201. selector: "renderButtonsOn:",
  2202. fn: function (html) {
  2203. var self=this;
  2204. return smalltalk.withContext(function($ctx1) {
  2205. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2206. self["@saveButton"]=_st(html)._button();
  2207. $1=self["@saveButton"];
  2208. _st($1)._with_("Save");
  2209. $2=_st($1)._onClick_((function(){
  2210. return smalltalk.withContext(function($ctx2) {
  2211. return _st(self)._compile();
  2212. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2213. self["@methodButtons"]=_st(html)._span();
  2214. self["@classButtons"]=_st(html)._span();
  2215. $3=_st(html)._div();
  2216. _st($3)._class_("right");
  2217. $4=_st($3)._with_((function(){
  2218. return smalltalk.withContext(function($ctx2) {
  2219. $5=_st(html)._button();
  2220. _st($5)._with_("DoIt");
  2221. $6=_st($5)._onClick_((function(){
  2222. return smalltalk.withContext(function($ctx3) {
  2223. return _st(self["@sourceArea"])._doIt();
  2224. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2225. $6;
  2226. $7=_st(html)._button();
  2227. _st($7)._with_("PrintIt");
  2228. $8=_st($7)._onClick_((function(){
  2229. return smalltalk.withContext(function($ctx3) {
  2230. return _st(self["@sourceArea"])._printIt();
  2231. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2232. $8;
  2233. $9=_st(html)._button();
  2234. _st($9)._with_("InspectIt");
  2235. $10=_st($9)._onClick_((function(){
  2236. return smalltalk.withContext(function($ctx3) {
  2237. return _st(self["@sourceArea"])._inspectIt();
  2238. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2239. return $10;
  2240. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2241. _st(self)._updateSourceAndButtons();
  2242. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Browser)});},
  2243. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"]}),
  2244. smalltalk.Browser);
  2245. smalltalk.addMethod(
  2246. "_renderTabsOn_",
  2247. smalltalk.method({
  2248. selector: "renderTabsOn:",
  2249. fn: function (html) {
  2250. var self=this;
  2251. return smalltalk.withContext(function($ctx1) {
  2252. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2253. _st(self)._updateTabsList();
  2254. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.Browser)});},
  2255. messageSends: ["class:", "ul", "updateTabsList"]}),
  2256. smalltalk.Browser);
  2257. smalltalk.addMethod(
  2258. "_renderTopPanelOn_",
  2259. smalltalk.method({
  2260. selector: "renderTopPanelOn:",
  2261. fn: function (html) {
  2262. var self=this;
  2263. function $ClassesList(){return smalltalk.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2264. return smalltalk.withContext(function($ctx1) {
  2265. var $1,$3,$5,$6,$7,$8,$9,$10,$4,$11,$12,$2;
  2266. $1=_st(html)._div();
  2267. _st($1)._class_("top");
  2268. $2=_st($1)._with_((function(){
  2269. return smalltalk.withContext(function($ctx2) {
  2270. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column browser packages");
  2271. self["@packagesList"];
  2272. $3=_st(html)._div();
  2273. _st($3)._class_("amber_packagesButtons");
  2274. $4=_st($3)._with_((function(){
  2275. return smalltalk.withContext(function($ctx3) {
  2276. $5=_st(html)._button();
  2277. _st($5)._title_("Commit classes in this package to disk");
  2278. _st($5)._onClick_((function(){
  2279. return smalltalk.withContext(function($ctx4) {
  2280. return _st(self)._commitPackage();
  2281. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2282. $6=_st($5)._with_("Commit");
  2283. $6;
  2284. $7=_st(html)._button();
  2285. _st($7)._title_("Rename package");
  2286. _st($7)._onClick_((function(){
  2287. return smalltalk.withContext(function($ctx4) {
  2288. return _st(self)._renamePackage();
  2289. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2290. $8=_st($7)._with_("Rename");
  2291. $8;
  2292. $9=_st(html)._button();
  2293. _st($9)._title_("Remove this package from the system");
  2294. _st($9)._onClick_((function(){
  2295. return smalltalk.withContext(function($ctx4) {
  2296. return _st(self)._removePackage();
  2297. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2298. $10=_st($9)._with_("Remove");
  2299. return $10;
  2300. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2301. $4;
  2302. self["@classesList"]=_st($ClassesList())._on_(self);
  2303. self["@classesList"];
  2304. _st(self["@classesList"])._renderOn_(html);
  2305. self["@protocolsList"]=_st(_st(html)._ul())._class_("amber_column browser protocols");
  2306. self["@protocolsList"];
  2307. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2308. self["@methodsList"];
  2309. $11=self;
  2310. _st($11)._updateCategoriesList();
  2311. _st($11)._updateClassesList();
  2312. _st($11)._updateProtocolsList();
  2313. $12=_st($11)._updateMethodsList();
  2314. $12;
  2315. return _st(_st(html)._div())._class_("amber_clear");
  2316. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2317. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Browser)});},
  2318. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"]}),
  2319. smalltalk.Browser);
  2320. smalltalk.addMethod(
  2321. "_resetClassesList",
  2322. smalltalk.method({
  2323. selector: "resetClassesList",
  2324. fn: function () {
  2325. var self=this;
  2326. return smalltalk.withContext(function($ctx1) {
  2327. _st(self["@classesList"])._resetNodes();
  2328. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},smalltalk.Browser)});},
  2329. messageSends: ["resetNodes"]}),
  2330. smalltalk.Browser);
  2331. smalltalk.addMethod(
  2332. "_search_",
  2333. smalltalk.method({
  2334. selector: "search:",
  2335. fn: function (aString) {
  2336. var self=this;
  2337. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2338. return smalltalk.withContext(function($ctx1) {
  2339. var $1,$2;
  2340. $1=_st(self)._cancelChanges();
  2341. if(smalltalk.assert($1)){
  2342. var searchedClass;
  2343. searchedClass=_st(_st($Smalltalk())._current())._at_(aString);
  2344. searchedClass;
  2345. $2=_st(searchedClass)._isClass();
  2346. if(smalltalk.assert($2)){
  2347. _st(_st(self)._class())._openOn_(searchedClass);
  2348. } else {
  2349. _st(self)._searchReferencesOf_(aString);
  2350. };
  2351. };
  2352. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.Browser)});},
  2353. messageSends: ["ifTrue:", "at:", "current", "ifTrue:ifFalse:", "openOn:", "class", "searchReferencesOf:", "isClass", "cancelChanges"]}),
  2354. smalltalk.Browser);
  2355. smalltalk.addMethod(
  2356. "_searchClassReferences",
  2357. smalltalk.method({
  2358. selector: "searchClassReferences",
  2359. fn: function () {
  2360. var self=this;
  2361. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  2362. return smalltalk.withContext(function($ctx1) {
  2363. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  2364. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},smalltalk.Browser)});},
  2365. messageSends: ["search:", "name"]}),
  2366. smalltalk.Browser);
  2367. smalltalk.addMethod(
  2368. "_searchReferencesOf_",
  2369. smalltalk.method({
  2370. selector: "searchReferencesOf:",
  2371. fn: function (aString) {
  2372. var self=this;
  2373. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  2374. return smalltalk.withContext(function($ctx1) {
  2375. _st($ReferencesBrowser())._search_(aString);
  2376. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},smalltalk.Browser)});},
  2377. messageSends: ["search:"]}),
  2378. smalltalk.Browser);
  2379. smalltalk.addMethod(
  2380. "_selectCategory_",
  2381. smalltalk.method({
  2382. selector: "selectCategory:",
  2383. fn: function (aCategory) {
  2384. var self=this;
  2385. return smalltalk.withContext(function($ctx1) {
  2386. var $1,$2,$3;
  2387. $1=_st(self)._cancelChanges();
  2388. if(smalltalk.assert($1)){
  2389. self["@selectedPackage"]=aCategory;
  2390. self["@selectedPackage"];
  2391. self["@selectedMethod"]=nil;
  2392. self["@selectedProtocol"]=self["@selectedMethod"];
  2393. self["@selectedClass"]=self["@selectedProtocol"];
  2394. self["@selectedClass"];
  2395. _st(self)._resetClassesList();
  2396. $2=self;
  2397. _st($2)._updateCategoriesList();
  2398. _st($2)._updateClassesList();
  2399. _st($2)._updateProtocolsList();
  2400. _st($2)._updateMethodsList();
  2401. $3=_st($2)._updateSourceAndButtons();
  2402. $3;
  2403. };
  2404. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},smalltalk.Browser)});},
  2405. messageSends: ["ifTrue:", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2406. smalltalk.Browser);
  2407. smalltalk.addMethod(
  2408. "_selectClass_",
  2409. smalltalk.method({
  2410. selector: "selectClass:",
  2411. fn: function (aClass) {
  2412. var self=this;
  2413. return smalltalk.withContext(function($ctx1) {
  2414. var $1,$2,$3;
  2415. $1=_st(self)._cancelChanges();
  2416. if(smalltalk.assert($1)){
  2417. self["@selectedClass"]=aClass;
  2418. self["@selectedClass"];
  2419. self["@selectedMethod"]=nil;
  2420. self["@selectedProtocol"]=self["@selectedMethod"];
  2421. self["@selectedProtocol"];
  2422. $2=self;
  2423. _st($2)._updateClassesList();
  2424. _st($2)._updateProtocolsList();
  2425. _st($2)._updateMethodsList();
  2426. $3=_st($2)._updateSourceAndButtons();
  2427. $3;
  2428. };
  2429. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},smalltalk.Browser)});},
  2430. messageSends: ["ifTrue:", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2431. smalltalk.Browser);
  2432. smalltalk.addMethod(
  2433. "_selectMethod_",
  2434. smalltalk.method({
  2435. selector: "selectMethod:",
  2436. fn: function (aMethod) {
  2437. var self=this;
  2438. return smalltalk.withContext(function($ctx1) {
  2439. var $1,$2,$3;
  2440. $1=_st(self)._cancelChanges();
  2441. if(smalltalk.assert($1)){
  2442. self["@selectedMethod"]=aMethod;
  2443. self["@selectedMethod"];
  2444. $2=self;
  2445. _st($2)._updateProtocolsList();
  2446. _st($2)._updateMethodsList();
  2447. $3=_st($2)._updateSourceAndButtons();
  2448. $3;
  2449. };
  2450. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},smalltalk.Browser)});},
  2451. messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2452. smalltalk.Browser);
  2453. smalltalk.addMethod(
  2454. "_selectProtocol_",
  2455. smalltalk.method({
  2456. selector: "selectProtocol:",
  2457. fn: function (aString) {
  2458. var self=this;
  2459. return smalltalk.withContext(function($ctx1) {
  2460. var $1,$2,$3;
  2461. $1=_st(self)._cancelChanges();
  2462. if(smalltalk.assert($1)){
  2463. self["@selectedProtocol"]=aString;
  2464. self["@selectedProtocol"];
  2465. self["@selectedMethod"]=nil;
  2466. self["@selectedMethod"];
  2467. $2=self;
  2468. _st($2)._updateProtocolsList();
  2469. _st($2)._updateMethodsList();
  2470. $3=_st($2)._updateSourceAndButtons();
  2471. $3;
  2472. };
  2473. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},smalltalk.Browser)});},
  2474. messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"]}),
  2475. smalltalk.Browser);
  2476. smalltalk.addMethod(
  2477. "_selectTab_",
  2478. smalltalk.method({
  2479. selector: "selectTab:",
  2480. fn: function (aString) {
  2481. var self=this;
  2482. return smalltalk.withContext(function($ctx1) {
  2483. var $1;
  2484. $1=_st(self)._cancelChanges();
  2485. if(smalltalk.assert($1)){
  2486. self["@selectedTab"]=aString;
  2487. self["@selectedTab"];
  2488. _st(self)._selectProtocol_(nil);
  2489. _st(self)._updateTabsList();
  2490. };
  2491. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},smalltalk.Browser)});},
  2492. messageSends: ["ifTrue:", "selectProtocol:", "updateTabsList", "cancelChanges"]}),
  2493. smalltalk.Browser);
  2494. smalltalk.addMethod(
  2495. "_selectedClass",
  2496. smalltalk.method({
  2497. selector: "selectedClass",
  2498. fn: function () {
  2499. var self=this;
  2500. return smalltalk.withContext(function($ctx1) {
  2501. var $1;
  2502. $1=self["@selectedClass"];
  2503. return $1;
  2504. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.Browser)});},
  2505. messageSends: []}),
  2506. smalltalk.Browser);
  2507. smalltalk.addMethod(
  2508. "_selectedPackage",
  2509. smalltalk.method({
  2510. selector: "selectedPackage",
  2511. fn: function () {
  2512. var self=this;
  2513. return smalltalk.withContext(function($ctx1) {
  2514. var $1;
  2515. $1=self["@selectedPackage"];
  2516. return $1;
  2517. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.Browser)});},
  2518. messageSends: []}),
  2519. smalltalk.Browser);
  2520. smalltalk.addMethod(
  2521. "_setMethodProtocol_",
  2522. smalltalk.method({
  2523. selector: "setMethodProtocol:",
  2524. fn: function (aString) {
  2525. var self=this;
  2526. return smalltalk.withContext(function($ctx1) {
  2527. var $1,$2,$3,$4;
  2528. $1=_st(self)._cancelChanges();
  2529. if(smalltalk.assert($1)){
  2530. $2=_st(_st(self)._protocols())._includes_(aString);
  2531. if(smalltalk.assert($2)){
  2532. _st(self["@selectedMethod"])._category_(aString);
  2533. self["@selectedProtocol"]=aString;
  2534. self["@selectedProtocol"];
  2535. self["@selectedMethod"]=self["@selectedMethod"];
  2536. self["@selectedMethod"];
  2537. $3=self;
  2538. _st($3)._updateProtocolsList();
  2539. _st($3)._updateMethodsList();
  2540. $4=_st($3)._updateSourceAndButtons();
  2541. $4;
  2542. } else {
  2543. _st(self)._addNewProtocol();
  2544. };
  2545. };
  2546. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},smalltalk.Browser)});},
  2547. messageSends: ["ifTrue:", "ifFalse:ifTrue:", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "includes:", "protocols", "cancelChanges"]}),
  2548. smalltalk.Browser);
  2549. smalltalk.addMethod(
  2550. "_showClassButtons",
  2551. smalltalk.method({
  2552. selector: "showClassButtons",
  2553. fn: function () {
  2554. var self=this;
  2555. return smalltalk.withContext(function($ctx1) {
  2556. _st(_st(self["@classButtons"])._asJQuery())._show();
  2557. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},smalltalk.Browser)});},
  2558. messageSends: ["show", "asJQuery"]}),
  2559. smalltalk.Browser);
  2560. smalltalk.addMethod(
  2561. "_showMethodButtons",
  2562. smalltalk.method({
  2563. selector: "showMethodButtons",
  2564. fn: function () {
  2565. var self=this;
  2566. return smalltalk.withContext(function($ctx1) {
  2567. _st(_st(self["@methodButtons"])._asJQuery())._show();
  2568. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},smalltalk.Browser)});},
  2569. messageSends: ["show", "asJQuery"]}),
  2570. smalltalk.Browser);
  2571. smalltalk.addMethod(
  2572. "_source",
  2573. smalltalk.method({
  2574. selector: "source",
  2575. fn: function () {
  2576. var self=this;
  2577. return smalltalk.withContext(function($ctx1) {
  2578. var $1,$3,$2,$5,$4;
  2579. $1=_st(self["@selectedTab"]).__eq("comment");
  2580. if(! smalltalk.assert($1)){
  2581. $3=_st(_st(self["@selectedProtocol"])._notNil())._or_((function(){
  2582. return smalltalk.withContext(function($ctx2) {
  2583. return _st(self["@selectedMethod"])._notNil();
  2584. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2585. if(smalltalk.assert($3)){
  2586. $2=_st(self)._methodSource();
  2587. } else {
  2588. $2=_st(self)._declarationSource();
  2589. };
  2590. return $2;
  2591. };
  2592. $5=self["@selectedClass"];
  2593. if(($receiver = $5) == nil || $receiver == undefined){
  2594. $4="";
  2595. } else {
  2596. $4=_st(self)._classCommentSource();
  2597. };
  2598. return $4;
  2599. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Browser)});},
  2600. messageSends: ["ifFalse:", "ifFalse:ifTrue:", "declarationSource", "methodSource", "or:", "notNil", "=", "ifNil:ifNotNil:", "classCommentSource"]}),
  2601. smalltalk.Browser);
  2602. smalltalk.addMethod(
  2603. "_updateCategoriesList",
  2604. smalltalk.method({
  2605. selector: "updateCategoriesList",
  2606. fn: function () {
  2607. var self=this;
  2608. return smalltalk.withContext(function($ctx1) {
  2609. var $1,$2,$3,$4;
  2610. _st(self["@packagesList"])._contents_((function(html){
  2611. return smalltalk.withContext(function($ctx2) {
  2612. return _st(_st(self)._packages())._do_((function(each){
  2613. var li,label;
  2614. return smalltalk.withContext(function($ctx3) {
  2615. $1=_st(each)._isEmpty();
  2616. if(smalltalk.assert($1)){
  2617. label="Unclassified";
  2618. label;
  2619. } else {
  2620. label=each;
  2621. label;
  2622. };
  2623. li=_st(html)._li();
  2624. li;
  2625. $2=_st(self["@selectedPackage"]).__eq(each);
  2626. if(smalltalk.assert($2)){
  2627. _st(li)._class_("selected");
  2628. };
  2629. $3=li;
  2630. _st($3)._with_(label);
  2631. $4=_st($3)._onClick_((function(){
  2632. return smalltalk.withContext(function($ctx4) {
  2633. return _st(self)._selectCategory_(each);
  2634. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2635. return $4;
  2636. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx1)})}));
  2637. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2638. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.Browser)});},
  2639. messageSends: ["contents:", "do:", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectCategory:", "packages"]}),
  2640. smalltalk.Browser);
  2641. smalltalk.addMethod(
  2642. "_updateClassesList",
  2643. smalltalk.method({
  2644. selector: "updateClassesList",
  2645. fn: function () {
  2646. var self=this;
  2647. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  2648. return smalltalk.withContext(function($ctx1) {
  2649. _st(_st($TabManager())._current())._update();
  2650. _st(self["@classesList"])._updateNodes();
  2651. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.Browser)});},
  2652. messageSends: ["update", "current", "updateNodes"]}),
  2653. smalltalk.Browser);
  2654. smalltalk.addMethod(
  2655. "_updateMethodsList",
  2656. smalltalk.method({
  2657. selector: "updateMethodsList",
  2658. fn: function () {
  2659. var self=this;
  2660. return smalltalk.withContext(function($ctx1) {
  2661. var $1,$2,$3;
  2662. _st(self["@methodsList"])._contents_((function(html){
  2663. return smalltalk.withContext(function($ctx2) {
  2664. return _st(_st(self)._methods())._do_((function(each){
  2665. var li;
  2666. return smalltalk.withContext(function($ctx3) {
  2667. li=_st(html)._li();
  2668. li;
  2669. $1=_st(self["@selectedMethod"]).__eq(each);
  2670. if(smalltalk.assert($1)){
  2671. _st(li)._class_("selected");
  2672. };
  2673. $2=li;
  2674. _st($2)._with_(_st(each)._selector());
  2675. $3=_st($2)._onClick_((function(){
  2676. return smalltalk.withContext(function($ctx4) {
  2677. return _st(self)._selectMethod_(each);
  2678. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2679. return $3;
  2680. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  2681. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2682. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.Browser)});},
  2683. messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "selector", "onClick:", "selectMethod:", "methods"]}),
  2684. smalltalk.Browser);
  2685. smalltalk.addMethod(
  2686. "_updateProtocolsList",
  2687. smalltalk.method({
  2688. selector: "updateProtocolsList",
  2689. fn: function () {
  2690. var self=this;
  2691. return smalltalk.withContext(function($ctx1) {
  2692. var $1,$2,$3;
  2693. _st(self["@protocolsList"])._contents_((function(html){
  2694. return smalltalk.withContext(function($ctx2) {
  2695. return _st(_st(self)._protocols())._do_((function(each){
  2696. var li;
  2697. return smalltalk.withContext(function($ctx3) {
  2698. li=_st(html)._li();
  2699. li;
  2700. $1=_st(self["@selectedProtocol"]).__eq(each);
  2701. if(smalltalk.assert($1)){
  2702. _st(li)._class_("selected");
  2703. };
  2704. $2=li;
  2705. _st($2)._with_(each);
  2706. $3=_st($2)._onClick_((function(){
  2707. return smalltalk.withContext(function($ctx4) {
  2708. return _st(self)._selectProtocol_(each);
  2709. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2710. return $3;
  2711. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  2712. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2713. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},smalltalk.Browser)});},
  2714. messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectProtocol:", "protocols"]}),
  2715. smalltalk.Browser);
  2716. smalltalk.addMethod(
  2717. "_updateSourceAndButtons",
  2718. smalltalk.method({
  2719. selector: "updateSourceAndButtons",
  2720. fn: function () {
  2721. var self=this;
  2722. var currentProtocol;
  2723. return smalltalk.withContext(function($ctx1) {
  2724. 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;
  2725. _st(self)._disableSaveButton();
  2726. _st(self["@classButtons"])._contents_((function(html){
  2727. return smalltalk.withContext(function($ctx2) {
  2728. $1=_st(html)._button();
  2729. _st($1)._title_("Create a new class");
  2730. _st($1)._onClick_((function(){
  2731. return smalltalk.withContext(function($ctx3) {
  2732. return _st(self)._addNewClass();
  2733. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2734. $2=_st($1)._with_("New class");
  2735. $2;
  2736. $3=_st(html)._button();
  2737. _st($3)._with_("Rename class");
  2738. $4=_st($3)._onClick_((function(){
  2739. return smalltalk.withContext(function($ctx3) {
  2740. return _st(self)._renameClass();
  2741. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2742. $4;
  2743. $5=_st(html)._button();
  2744. _st($5)._with_("Copy class");
  2745. $6=_st($5)._onClick_((function(){
  2746. return smalltalk.withContext(function($ctx3) {
  2747. return _st(self)._copyClass();
  2748. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2749. $6;
  2750. $7=_st(html)._button();
  2751. _st($7)._with_("Remove class");
  2752. $8=_st($7)._onClick_((function(){
  2753. return smalltalk.withContext(function($ctx3) {
  2754. return _st(self)._removeClass();
  2755. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2756. $8;
  2757. $9=_st(html)._button();
  2758. _st($9)._with_("References");
  2759. $10=_st($9)._onClick_((function(){
  2760. return smalltalk.withContext(function($ctx3) {
  2761. return _st(self)._searchClassReferences();
  2762. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2763. return $10;
  2764. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  2765. _st(self["@methodButtons"])._contents_((function(html){
  2766. var protocolSelect,referencesSelect;
  2767. return smalltalk.withContext(function($ctx2) {
  2768. $11=_st(html)._button();
  2769. _st($11)._with_("Remove method");
  2770. $12=_st($11)._onClick_((function(){
  2771. return smalltalk.withContext(function($ctx3) {
  2772. return _st(self)._removeMethod();
  2773. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2774. $12;
  2775. protocolSelect=_st(html)._select();
  2776. protocolSelect;
  2777. $13=protocolSelect;
  2778. _st($13)._onChange_((function(){
  2779. return smalltalk.withContext(function($ctx3) {
  2780. return _st(self)._setMethodProtocol_(_st(_st(protocolSelect)._asJQuery())._val());
  2781. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2782. $14=_st($13)._with_((function(){
  2783. return smalltalk.withContext(function($ctx3) {
  2784. $15=_st(html)._option();
  2785. _st($15)._with_("Method protocol");
  2786. $16=_st($15)._at_put_("disabled","disabled");
  2787. $16;
  2788. $17=_st(html)._option();
  2789. _st($17)._class_("important");
  2790. $18=_st($17)._with_("New...");
  2791. $18;
  2792. currentProtocol=self["@selectedProtocol"];
  2793. currentProtocol;
  2794. $19=_st(_st(currentProtocol)._isNil())._and_((function(){
  2795. return smalltalk.withContext(function($ctx4) {
  2796. return _st(self["@selectedMethod"])._notNil();
  2797. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  2798. if(smalltalk.assert($19)){
  2799. currentProtocol=_st(self["@selectedMethod"])._category();
  2800. currentProtocol;
  2801. };
  2802. return _st(_st(self)._protocols())._do_((function(each){
  2803. var option;
  2804. return smalltalk.withContext(function($ctx4) {
  2805. option=_st(_st(html)._option())._with_(each);
  2806. option;
  2807. $20=_st(currentProtocol).__eq(each);
  2808. if(smalltalk.assert($20)){
  2809. return _st(option)._at_put_("selected","selected");
  2810. };
  2811. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx1)})}));
  2812. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2813. $14;
  2814. $21=_st(self["@selectedMethod"])._isNil();
  2815. if(! smalltalk.assert($21)){
  2816. referencesSelect=_st(html)._select();
  2817. referencesSelect;
  2818. $22=referencesSelect;
  2819. _st($22)._onChange_((function(){
  2820. return smalltalk.withContext(function($ctx3) {
  2821. return _st(self)._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  2822. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2823. $23=_st($22)._with_((function(){
  2824. var option;
  2825. return smalltalk.withContext(function($ctx3) {
  2826. $24=_st(html)._option();
  2827. _st($24)._with_("References");
  2828. _st($24)._at_put_("disabled","disabled");
  2829. $25=_st($24)._at_put_("selected","selected");
  2830. $25;
  2831. $26=_st(html)._option();
  2832. _st($26)._class_("important");
  2833. $27=_st($26)._with_(_st(self["@selectedMethod"])._selector());
  2834. $27;
  2835. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  2836. return smalltalk.withContext(function($ctx4) {
  2837. return _st(_st(html)._option())._with_(each);
  2838. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx1)})}));
  2839. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx1)})}));
  2840. return $23;
  2841. };
  2842. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1)})}));
  2843. $28=_st(self["@selectedMethod"])._isNil();
  2844. if(smalltalk.assert($28)){
  2845. _st(self)._hideMethodButtons();
  2846. $29=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  2847. return smalltalk.withContext(function($ctx2) {
  2848. return _st(self["@selectedProtocol"])._notNil();
  2849. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  2850. if(smalltalk.assert($29)){
  2851. _st(self)._hideClassButtons();
  2852. } else {
  2853. _st(self)._showClassButtons();
  2854. };
  2855. } else {
  2856. _st(self)._hideClassButtons();
  2857. _st(self)._showMethodButtons();
  2858. };
  2859. _st(self["@sourceArea"])._val_(_st(self)._source());
  2860. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},smalltalk.Browser)});},
  2861. 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"]}),
  2862. smalltalk.Browser);
  2863. smalltalk.addMethod(
  2864. "_updateStatus",
  2865. smalltalk.method({
  2866. selector: "updateStatus",
  2867. fn: function () {
  2868. var self=this;
  2869. return smalltalk.withContext(function($ctx1) {
  2870. var $1,$2,$3;
  2871. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  2872. if(smalltalk.assert($1)){
  2873. $2=self["@saveButton"];
  2874. if(($receiver = $2) == nil || $receiver == undefined){
  2875. $2;
  2876. } else {
  2877. _st(self["@saveButton"])._at_put_("disabled",true);
  2878. };
  2879. self["@unsavedChanges"]=false;
  2880. self["@unsavedChanges"];
  2881. } else {
  2882. $3=self["@saveButton"];
  2883. if(($receiver = $3) == nil || $receiver == undefined){
  2884. $3;
  2885. } else {
  2886. _st(self["@saveButton"])._removeAt_("disabled");
  2887. };
  2888. self["@unsavedChanges"]=true;
  2889. self["@unsavedChanges"];
  2890. };
  2891. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},smalltalk.Browser)});},
  2892. messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"]}),
  2893. smalltalk.Browser);
  2894. smalltalk.addMethod(
  2895. "_updateTabsList",
  2896. smalltalk.method({
  2897. selector: "updateTabsList",
  2898. fn: function () {
  2899. var self=this;
  2900. return smalltalk.withContext(function($ctx1) {
  2901. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  2902. _st(self["@tabsList"])._contents_((function(html){
  2903. var li;
  2904. return smalltalk.withContext(function($ctx2) {
  2905. li=_st(html)._li();
  2906. li;
  2907. $1=_st(self["@selectedTab"]).__eq("instance");
  2908. if(smalltalk.assert($1)){
  2909. _st(li)._class_("selected");
  2910. };
  2911. $2=li;
  2912. _st($2)._with_((function(){
  2913. return smalltalk.withContext(function($ctx3) {
  2914. _st(_st(html)._span())._class_("ltab");
  2915. $3=_st(html)._span();
  2916. _st($3)._class_("mtab");
  2917. $4=_st($3)._with_("Instance");
  2918. $4;
  2919. return _st(_st(html)._span())._class_("rtab");
  2920. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2921. $5=_st($2)._onClick_((function(){
  2922. return smalltalk.withContext(function($ctx3) {
  2923. return _st(self)._selectTab_("instance");
  2924. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2925. $5;
  2926. li=_st(html)._li();
  2927. li;
  2928. $6=_st(self["@selectedTab"]).__eq("class");
  2929. if(smalltalk.assert($6)){
  2930. _st(li)._class_("selected");
  2931. };
  2932. $7=li;
  2933. _st($7)._with_((function(){
  2934. return smalltalk.withContext(function($ctx3) {
  2935. _st(_st(html)._span())._class_("ltab");
  2936. $8=_st(html)._span();
  2937. _st($8)._class_("mtab");
  2938. $9=_st($8)._with_("Class");
  2939. $9;
  2940. return _st(_st(html)._span())._class_("rtab");
  2941. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2942. $10=_st($7)._onClick_((function(){
  2943. return smalltalk.withContext(function($ctx3) {
  2944. return _st(self)._selectTab_("class");
  2945. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2946. $10;
  2947. li=_st(html)._li();
  2948. li;
  2949. $11=_st(self["@selectedTab"]).__eq("comment");
  2950. if(smalltalk.assert($11)){
  2951. _st(li)._class_("selected");
  2952. };
  2953. $12=li;
  2954. _st($12)._with_((function(){
  2955. return smalltalk.withContext(function($ctx3) {
  2956. _st(_st(html)._span())._class_("ltab");
  2957. $13=_st(html)._span();
  2958. _st($13)._class_("mtab");
  2959. $14=_st($13)._with_("Comment");
  2960. $14;
  2961. return _st(_st(html)._span())._class_("rtab");
  2962. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2963. $15=_st($12)._onClick_((function(){
  2964. return smalltalk.withContext(function($ctx3) {
  2965. return _st(self)._selectTab_("comment");
  2966. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  2967. return $15;
  2968. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})}));
  2969. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},smalltalk.Browser)});},
  2970. messageSends: ["contents:", "li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "selectTab:"]}),
  2971. smalltalk.Browser);
  2972. smalltalk.addMethod(
  2973. "_open",
  2974. smalltalk.method({
  2975. selector: "open",
  2976. fn: function () {
  2977. var self=this;
  2978. return smalltalk.withContext(function($ctx1) {
  2979. _st(_st(self)._new())._open();
  2980. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Browser.klass)});},
  2981. messageSends: ["open", "new"]}),
  2982. smalltalk.Browser.klass);
  2983. smalltalk.addMethod(
  2984. "_openOn_",
  2985. smalltalk.method({
  2986. selector: "openOn:",
  2987. fn: function (aClass) {
  2988. var self=this;
  2989. return smalltalk.withContext(function($ctx1) {
  2990. var $2,$3,$1;
  2991. $2=_st(self)._new();
  2992. _st($2)._open();
  2993. _st($2)._selectCategory_(_st(aClass)._category());
  2994. $3=_st($2)._selectClass_(aClass);
  2995. $1=$3;
  2996. return $1;
  2997. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},smalltalk.Browser.klass)});},
  2998. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"]}),
  2999. smalltalk.Browser.klass);
  3000. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3001. smalltalk.addMethod(
  3002. "_allVariables",
  3003. smalltalk.method({
  3004. selector: "allVariables",
  3005. fn: function () {
  3006. var self=this;
  3007. var all;
  3008. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3009. return smalltalk.withContext(function($ctx1) {
  3010. var $1;
  3011. all=_st($Dictionary())._new();
  3012. _st(_st(_st(_st(self)._receiver())._class())._allInstanceVariableNames())._do_((function(each){
  3013. return smalltalk.withContext(function($ctx2) {
  3014. return _st(all)._at_put_(each,_st(_st(self)._receiver())._instVarAt_(each));
  3015. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  3016. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3017. return smalltalk.withContext(function($ctx2) {
  3018. return _st(all)._at_put_(key,value);
  3019. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  3020. $1=all;
  3021. return $1;
  3022. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},smalltalk.Debugger)});},
  3023. messageSends: ["new", "do:", "at:put:", "instVarAt:", "receiver", "allInstanceVariableNames", "class", "keysAndValuesDo:", "locals"]}),
  3024. smalltalk.Debugger);
  3025. smalltalk.addMethod(
  3026. "_canBeClosed",
  3027. smalltalk.method({
  3028. selector: "canBeClosed",
  3029. fn: function () {
  3030. var self=this;
  3031. return smalltalk.withContext(function($ctx1) {
  3032. return true;
  3033. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Debugger)});},
  3034. messageSends: []}),
  3035. smalltalk.Debugger);
  3036. smalltalk.addMethod(
  3037. "_error",
  3038. smalltalk.method({
  3039. selector: "error",
  3040. fn: function () {
  3041. var self=this;
  3042. return smalltalk.withContext(function($ctx1) {
  3043. var $1;
  3044. $1=self["@error"];
  3045. return $1;
  3046. }, function($ctx1) {$ctx1.fill(self,"error",{},smalltalk.Debugger)});},
  3047. messageSends: []}),
  3048. smalltalk.Debugger);
  3049. smalltalk.addMethod(
  3050. "_error_",
  3051. smalltalk.method({
  3052. selector: "error:",
  3053. fn: function (anError) {
  3054. var self=this;
  3055. return smalltalk.withContext(function($ctx1) {
  3056. self["@error"]=anError;
  3057. return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError},smalltalk.Debugger)});},
  3058. messageSends: []}),
  3059. smalltalk.Debugger);
  3060. smalltalk.addMethod(
  3061. "_initialize",
  3062. smalltalk.method({
  3063. selector: "initialize",
  3064. fn: function () {
  3065. var self=this;
  3066. return smalltalk.withContext(function($ctx1) {
  3067. smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  3068. _st(self["@unsavedChanges"]).__eq(false);
  3069. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Debugger)});},
  3070. messageSends: ["initialize", "="]}),
  3071. smalltalk.Debugger);
  3072. smalltalk.addMethod(
  3073. "_inspectSelectedVariable",
  3074. smalltalk.method({
  3075. selector: "inspectSelectedVariable",
  3076. fn: function () {
  3077. var self=this;
  3078. return smalltalk.withContext(function($ctx1) {
  3079. _st(self["@selectedVariable"])._inspect();
  3080. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},smalltalk.Debugger)});},
  3081. messageSends: ["inspect"]}),
  3082. smalltalk.Debugger);
  3083. smalltalk.addMethod(
  3084. "_label",
  3085. smalltalk.method({
  3086. selector: "label",
  3087. fn: function () {
  3088. var self=this;
  3089. return smalltalk.withContext(function($ctx1) {
  3090. return "[Debugger]";
  3091. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Debugger)});},
  3092. messageSends: []}),
  3093. smalltalk.Debugger);
  3094. smalltalk.addMethod(
  3095. "_method",
  3096. smalltalk.method({
  3097. selector: "method",
  3098. fn: function () {
  3099. var self=this;
  3100. return smalltalk.withContext(function($ctx1) {
  3101. var $1;
  3102. $1=_st(self["@selectedContext"])._method();
  3103. return $1;
  3104. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.Debugger)});},
  3105. messageSends: ["method"]}),
  3106. smalltalk.Debugger);
  3107. smalltalk.addMethod(
  3108. "_proceed",
  3109. smalltalk.method({
  3110. selector: "proceed",
  3111. fn: function () {
  3112. var self=this;
  3113. return smalltalk.withContext(function($ctx1) {
  3114. _st(self)._close();
  3115. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  3116. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.Debugger)});},
  3117. messageSends: ["close", "perform:withArguments:", "selector", "temps", "receiver"]}),
  3118. smalltalk.Debugger);
  3119. smalltalk.addMethod(
  3120. "_receiver",
  3121. smalltalk.method({
  3122. selector: "receiver",
  3123. fn: function () {
  3124. var self=this;
  3125. return smalltalk.withContext(function($ctx1) {
  3126. var $1;
  3127. $1=_st(self["@selectedContext"])._receiver();
  3128. return $1;
  3129. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.Debugger)});},
  3130. messageSends: ["receiver"]}),
  3131. smalltalk.Debugger);
  3132. smalltalk.addMethod(
  3133. "_renderBottomPanelOn_",
  3134. smalltalk.method({
  3135. selector: "renderBottomPanelOn:",
  3136. fn: function (html) {
  3137. var self=this;
  3138. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  3139. return smalltalk.withContext(function($ctx1) {
  3140. var $1,$2;
  3141. $1=_st(html)._div();
  3142. _st($1)._class_("amber_sourceCode debugger");
  3143. $2=_st($1)._with_((function(){
  3144. return smalltalk.withContext(function($ctx2) {
  3145. self["@sourceArea"]=_st($SourceArea())._new();
  3146. self["@sourceArea"];
  3147. return _st(self["@sourceArea"])._renderOn_(html);
  3148. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3149. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  3150. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  3151. _st(self["@sourceArea"])._onKeyUp_((function(){
  3152. return smalltalk.withContext(function($ctx2) {
  3153. return _st(self)._updateStatus();
  3154. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3155. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Debugger)});},
  3156. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"]}),
  3157. smalltalk.Debugger);
  3158. smalltalk.addMethod(
  3159. "_renderBoxOn_",
  3160. smalltalk.method({
  3161. selector: "renderBoxOn:",
  3162. fn: function (html) {
  3163. var self=this;
  3164. return smalltalk.withContext(function($ctx1) {
  3165. var $1,$2;
  3166. $1=self;
  3167. _st($1)._renderTopPanelOn_(html);
  3168. $2=_st($1)._renderBottomPanelOn_(html);
  3169. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Debugger)});},
  3170. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]}),
  3171. smalltalk.Debugger);
  3172. smalltalk.addMethod(
  3173. "_renderButtonsOn_",
  3174. smalltalk.method({
  3175. selector: "renderButtonsOn:",
  3176. fn: function (html) {
  3177. var self=this;
  3178. return smalltalk.withContext(function($ctx1) {
  3179. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16;
  3180. $1=_st(html)._button();
  3181. _st($1)._with_("Save");
  3182. $2=_st($1)._onClick_((function(){
  3183. return smalltalk.withContext(function($ctx2) {
  3184. return _st(self)._save();
  3185. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3186. self["@saveButton"]=$2;
  3187. $3=_st(html)._button();
  3188. _st($3)._with_("DoIt");
  3189. $4=_st($3)._onClick_((function(){
  3190. return smalltalk.withContext(function($ctx2) {
  3191. return _st(self["@sourceArea"])._doIt();
  3192. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3193. $5=_st(html)._button();
  3194. _st($5)._with_("PrintIt");
  3195. $6=_st($5)._onClick_((function(){
  3196. return smalltalk.withContext(function($ctx2) {
  3197. return _st(self["@sourceArea"])._printIt();
  3198. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3199. $7=_st(html)._button();
  3200. _st($7)._with_("InspectIt");
  3201. $8=_st($7)._onClick_((function(){
  3202. return smalltalk.withContext(function($ctx2) {
  3203. return _st(self["@sourceArea"])._inspectIt();
  3204. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3205. $9=_st(html)._button();
  3206. _st($9)._with_("Proceed");
  3207. $10=_st($9)._onClick_((function(){
  3208. return smalltalk.withContext(function($ctx2) {
  3209. return _st(self)._proceed();
  3210. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3211. $11=_st(html)._button();
  3212. _st($11)._with_("Abandon");
  3213. $12=_st($11)._onClick_((function(){
  3214. return smalltalk.withContext(function($ctx2) {
  3215. return _st(self)._close();
  3216. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3217. $13=_st(html)._button();
  3218. _st($13)._class_("amber_button debugger inspect");
  3219. _st($13)._with_("Inspect");
  3220. $14=_st($13)._onClick_((function(){
  3221. return smalltalk.withContext(function($ctx2) {
  3222. return _st(self)._inspectSelectedVariable();
  3223. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3224. self["@inspectButton"]=$14;
  3225. $15=self;
  3226. _st($15)._updateSourceArea();
  3227. _st($15)._updateStatus();
  3228. _st($15)._updateVariablesList();
  3229. $16=_st($15)._updateInspector();
  3230. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Debugger)});},
  3231. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"]}),
  3232. smalltalk.Debugger);
  3233. smalltalk.addMethod(
  3234. "_renderContext_on_",
  3235. smalltalk.method({
  3236. selector: "renderContext:on:",
  3237. fn: function (aContext, html) {
  3238. var self=this;
  3239. var li;
  3240. return smalltalk.withContext(function($ctx1) {
  3241. var $1,$2,$3,$4;
  3242. li=_st(html)._li();
  3243. $1=_st(self["@selectedContext"]).__eq(aContext);
  3244. if(smalltalk.assert($1)){
  3245. _st(li)._class_("selected");
  3246. };
  3247. $2=li;
  3248. _st($2)._with_(_st(aContext)._asString());
  3249. $3=_st($2)._onClick_((function(){
  3250. return smalltalk.withContext(function($ctx2) {
  3251. return _st(self)._selectContext_(aContext);
  3252. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3253. $4=_st(aContext)._outerContext();
  3254. if(($receiver = $4) == nil || $receiver == undefined){
  3255. $4;
  3256. } else {
  3257. _st(self)._renderContext_on_(_st(aContext)._outerContext(),html);
  3258. };
  3259. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},smalltalk.Debugger)});},
  3260. messageSends: ["li", "ifTrue:", "class:", "=", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "renderContext:on:", "outerContext"]}),
  3261. smalltalk.Debugger);
  3262. smalltalk.addMethod(
  3263. "_renderTopPanelOn_",
  3264. smalltalk.method({
  3265. selector: "renderTopPanelOn:",
  3266. fn: function (html) {
  3267. var self=this;
  3268. return smalltalk.withContext(function($ctx1) {
  3269. var $1,$3,$4,$5,$6,$2;
  3270. self["@selectedContext"]=_st(_st(self)._error())._context();
  3271. $1=_st(html)._div();
  3272. _st($1)._class_("top");
  3273. $2=_st($1)._with_((function(){
  3274. return smalltalk.withContext(function($ctx2) {
  3275. $3=_st(html)._div();
  3276. _st($3)._class_("label");
  3277. $4=_st($3)._with_(_st(_st(self)._error())._messageText());
  3278. $4;
  3279. $5=_st(html)._ul();
  3280. _st($5)._class_("amber_column debugger contexts");
  3281. $6=_st($5)._with_((function(){
  3282. return smalltalk.withContext(function($ctx3) {
  3283. return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  3284. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3285. self["@ul"]=$6;
  3286. return self["@ul"];
  3287. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3288. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Debugger)});},
  3289. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"]}),
  3290. smalltalk.Debugger);
  3291. smalltalk.addMethod(
  3292. "_save",
  3293. smalltalk.method({
  3294. selector: "save",
  3295. fn: function () {
  3296. var self=this;
  3297. var protocol;
  3298. return smalltalk.withContext(function($ctx1) {
  3299. protocol=_st(_st(_st(_st(_st(self["@selectedContext"])._receiver())._class())._methodDictionary())._at_(_st(self["@selectedContext"])._selector()))._category();
  3300. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  3301. _st(self)._updateStatus();
  3302. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},smalltalk.Debugger)});},
  3303. messageSends: ["category", "at:", "selector", "methodDictionary", "class", "receiver", "compile:category:", "val", "updateStatus"]}),
  3304. smalltalk.Debugger);
  3305. smalltalk.addMethod(
  3306. "_selectContext_",
  3307. smalltalk.method({
  3308. selector: "selectContext:",
  3309. fn: function (aContext) {
  3310. var self=this;
  3311. return smalltalk.withContext(function($ctx1) {
  3312. var $1,$2;
  3313. self["@selectedContext"]=aContext;
  3314. self["@selectedVariable"]=nil;
  3315. self["@selectedVariableName"]=nil;
  3316. $1=self;
  3317. _st($1)._updateContextsList();
  3318. _st($1)._updateSourceArea();
  3319. _st($1)._updateInspector();
  3320. _st($1)._updateVariablesList();
  3321. $2=_st($1)._updateStatus();
  3322. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},smalltalk.Debugger)});},
  3323. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"]}),
  3324. smalltalk.Debugger);
  3325. smalltalk.addMethod(
  3326. "_selectVariable_named_",
  3327. smalltalk.method({
  3328. selector: "selectVariable:named:",
  3329. fn: function (anObject, aString) {
  3330. var self=this;
  3331. return smalltalk.withContext(function($ctx1) {
  3332. self["@selectedVariable"]=anObject;
  3333. self["@selectedVariableName"]=aString;
  3334. _st(self["@inspector"])._contents_((function(html){
  3335. return smalltalk.withContext(function($ctx2) {
  3336. return _st(html)._with_(_st(anObject)._printString());
  3337. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3338. _st(self)._updateVariablesList();
  3339. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},smalltalk.Debugger)});},
  3340. messageSends: ["contents:", "with:", "printString", "updateVariablesList"]}),
  3341. smalltalk.Debugger);
  3342. smalltalk.addMethod(
  3343. "_source",
  3344. smalltalk.method({
  3345. selector: "source",
  3346. fn: function () {
  3347. var self=this;
  3348. return smalltalk.withContext(function($ctx1) {
  3349. var $2,$1;
  3350. $2=_st(self)._method();
  3351. if(($receiver = $2) == nil || $receiver == undefined){
  3352. $1="Method doesn't exist!";
  3353. } else {
  3354. $1=_st(_st(self)._method())._source();
  3355. };
  3356. return $1;
  3357. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Debugger)});},
  3358. messageSends: ["ifNil:ifNotNil:", "source", "method"]}),
  3359. smalltalk.Debugger);
  3360. smalltalk.addMethod(
  3361. "_updateContextsList",
  3362. smalltalk.method({
  3363. selector: "updateContextsList",
  3364. fn: function () {
  3365. var self=this;
  3366. return smalltalk.withContext(function($ctx1) {
  3367. _st(self["@ul"])._contents_((function(html){
  3368. return smalltalk.withContext(function($ctx2) {
  3369. return _st(self)._renderContext_on_(_st(_st(self)._error())._context(),html);
  3370. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3371. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},smalltalk.Debugger)});},
  3372. messageSends: ["contents:", "renderContext:on:", "context", "error"]}),
  3373. smalltalk.Debugger);
  3374. smalltalk.addMethod(
  3375. "_updateInspector",
  3376. smalltalk.method({
  3377. selector: "updateInspector",
  3378. fn: function () {
  3379. var self=this;
  3380. return smalltalk.withContext(function($ctx1) {
  3381. _st(self["@inspector"])._contents_((function(html){
  3382. return smalltalk.withContext(function($ctx2) {
  3383. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3384. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},smalltalk.Debugger)});},
  3385. messageSends: ["contents:"]}),
  3386. smalltalk.Debugger);
  3387. smalltalk.addMethod(
  3388. "_updateSourceArea",
  3389. smalltalk.method({
  3390. selector: "updateSourceArea",
  3391. fn: function () {
  3392. var self=this;
  3393. return smalltalk.withContext(function($ctx1) {
  3394. _st(self["@sourceArea"])._val_(_st(self)._source());
  3395. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},smalltalk.Debugger)});},
  3396. messageSends: ["val:", "source"]}),
  3397. smalltalk.Debugger);
  3398. smalltalk.addMethod(
  3399. "_updateStatus",
  3400. smalltalk.method({
  3401. selector: "updateStatus",
  3402. fn: function () {
  3403. var self=this;
  3404. return smalltalk.withContext(function($ctx1) {
  3405. var $1,$2,$3;
  3406. $1=_st(_st(self["@sourceArea"])._val()).__eq(_st(self)._source());
  3407. if(smalltalk.assert($1)){
  3408. $2=self["@saveButton"];
  3409. if(($receiver = $2) == nil || $receiver == undefined){
  3410. $2;
  3411. } else {
  3412. _st(self["@saveButton"])._at_put_("disabled",true);
  3413. };
  3414. self["@unsavedChanges"]=false;
  3415. self["@unsavedChanges"];
  3416. } else {
  3417. $3=self["@saveButton"];
  3418. if(($receiver = $3) == nil || $receiver == undefined){
  3419. $3;
  3420. } else {
  3421. _st(self["@saveButton"])._removeAt_("disabled");
  3422. };
  3423. self["@unsavedChanges"]=true;
  3424. self["@unsavedChanges"];
  3425. };
  3426. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},smalltalk.Debugger)});},
  3427. messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"]}),
  3428. smalltalk.Debugger);
  3429. smalltalk.addMethod(
  3430. "_updateVariablesList",
  3431. smalltalk.method({
  3432. selector: "updateVariablesList",
  3433. fn: function () {
  3434. var self=this;
  3435. return smalltalk.withContext(function($ctx1) {
  3436. var $1,$2,$3,$4,$5,$6,$7;
  3437. _st(self["@ul2"])._contents_((function(html){
  3438. var li;
  3439. return smalltalk.withContext(function($ctx2) {
  3440. $1=_st(html)._li();
  3441. _st($1)._with_("self");
  3442. $2=_st($1)._onClick_((function(){
  3443. return smalltalk.withContext(function($ctx3) {
  3444. return _st(self)._selectVariable_named_(_st(self)._receiver(),"self");
  3445. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3446. li=$2;
  3447. li;
  3448. $3=_st(self["@selectedVariableName"]).__eq("self");
  3449. if(smalltalk.assert($3)){
  3450. _st(li)._class_("selected");
  3451. };
  3452. return _st(_st(self)._allVariables())._keysAndValuesDo_((function(key,value){
  3453. return smalltalk.withContext(function($ctx3) {
  3454. $4=_st(html)._li();
  3455. _st($4)._with_(key);
  3456. $5=_st($4)._onClick_((function(){
  3457. return smalltalk.withContext(function($ctx4) {
  3458. return _st(self)._selectVariable_named_(value,key);
  3459. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3460. li=$5;
  3461. li;
  3462. $6=_st(self["@selectedVariableName"]).__eq(key);
  3463. if(smalltalk.assert($6)){
  3464. return _st(li)._class_("selected");
  3465. };
  3466. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})}));
  3467. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1)})}));
  3468. $7=self["@selectedVariable"];
  3469. if(($receiver = $7) == nil || $receiver == undefined){
  3470. _st(self["@inspectButton"])._at_put_("disabled",true);
  3471. } else {
  3472. _st(self["@inspectButton"])._removeAt_("disabled");
  3473. };
  3474. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Debugger)});},
  3475. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "class:", "=", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"]}),
  3476. smalltalk.Debugger);
  3477. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  3478. smalltalk.addMethod(
  3479. "_clear",
  3480. smalltalk.method({
  3481. selector: "clear",
  3482. fn: function () {
  3483. var self=this;
  3484. return smalltalk.withContext(function($ctx1) {
  3485. _st(_st(self["@textarea"])._asJQuery())._val_("");
  3486. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.IDETranscript)});},
  3487. messageSends: ["val:", "asJQuery"]}),
  3488. smalltalk.IDETranscript);
  3489. smalltalk.addMethod(
  3490. "_cr",
  3491. smalltalk.method({
  3492. selector: "cr",
  3493. fn: function () {
  3494. var self=this;
  3495. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  3496. return smalltalk.withContext(function($ctx1) {
  3497. _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
  3498. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.IDETranscript)});},
  3499. messageSends: ["val:", ",", "cr", "val", "asJQuery"]}),
  3500. smalltalk.IDETranscript);
  3501. smalltalk.addMethod(
  3502. "_label",
  3503. smalltalk.method({
  3504. selector: "label",
  3505. fn: function () {
  3506. var self=this;
  3507. return smalltalk.withContext(function($ctx1) {
  3508. return "Transcript";
  3509. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.IDETranscript)});},
  3510. messageSends: []}),
  3511. smalltalk.IDETranscript);
  3512. smalltalk.addMethod(
  3513. "_open",
  3514. smalltalk.method({
  3515. selector: "open",
  3516. fn: function () {
  3517. var self=this;
  3518. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3519. return smalltalk.withContext(function($ctx1) {
  3520. var $1,$2;
  3521. $1=_st($TabManager())._current();
  3522. _st($1)._open();
  3523. $2=_st($1)._selectTab_(self);
  3524. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript)});},
  3525. messageSends: ["open", "current", "selectTab:"]}),
  3526. smalltalk.IDETranscript);
  3527. smalltalk.addMethod(
  3528. "_renderBoxOn_",
  3529. smalltalk.method({
  3530. selector: "renderBoxOn:",
  3531. fn: function (html) {
  3532. var self=this;
  3533. return smalltalk.withContext(function($ctx1) {
  3534. var $1,$2;
  3535. self["@textarea"]=_st(html)._textarea();
  3536. $1=self["@textarea"];
  3537. _st($1)._class_("amber_transcript");
  3538. $2=_st($1)._at_put_("spellcheck","false");
  3539. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.IDETranscript)});},
  3540. messageSends: ["textarea", "class:", "at:put:"]}),
  3541. smalltalk.IDETranscript);
  3542. smalltalk.addMethod(
  3543. "_renderButtonsOn_",
  3544. smalltalk.method({
  3545. selector: "renderButtonsOn:",
  3546. fn: function (html) {
  3547. var self=this;
  3548. return smalltalk.withContext(function($ctx1) {
  3549. var $1,$2;
  3550. $1=_st(html)._button();
  3551. _st($1)._with_("Clear transcript");
  3552. $2=_st($1)._onClick_((function(){
  3553. return smalltalk.withContext(function($ctx2) {
  3554. return _st(self)._clear();
  3555. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3556. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.IDETranscript)});},
  3557. messageSends: ["with:", "button", "onClick:", "clear"]}),
  3558. smalltalk.IDETranscript);
  3559. smalltalk.addMethod(
  3560. "_show_",
  3561. smalltalk.method({
  3562. selector: "show:",
  3563. fn: function (anObject) {
  3564. var self=this;
  3565. return smalltalk.withContext(function($ctx1) {
  3566. var $1;
  3567. $1=self["@textarea"];
  3568. if(($receiver = $1) == nil || $receiver == undefined){
  3569. _st(self)._open();
  3570. } else {
  3571. $1;
  3572. };
  3573. _st(_st(self["@textarea"])._asJQuery())._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  3574. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.IDETranscript)});},
  3575. messageSends: ["ifNil:", "open", "val:", ",", "asString", "val", "asJQuery"]}),
  3576. smalltalk.IDETranscript);
  3577. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  3578. smalltalk.addMethod(
  3579. "_current",
  3580. smalltalk.method({
  3581. selector: "current",
  3582. fn: function () {
  3583. var self=this;
  3584. return smalltalk.withContext(function($ctx1) {
  3585. var $2,$1;
  3586. $2=self["@current"];
  3587. if(($receiver = $2) == nil || $receiver == undefined){
  3588. self["@current"]=smalltalk.TabWidget.klass.fn.prototype._new.apply(_st(self), []);
  3589. $1=self["@current"];
  3590. } else {
  3591. $1=$2;
  3592. };
  3593. return $1;
  3594. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.IDETranscript.klass)});},
  3595. messageSends: ["ifNil:", "new"]}),
  3596. smalltalk.IDETranscript.klass);
  3597. smalltalk.addMethod(
  3598. "_initialize",
  3599. smalltalk.method({
  3600. selector: "initialize",
  3601. fn: function () {
  3602. var self=this;
  3603. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  3604. return smalltalk.withContext(function($ctx1) {
  3605. _st($Transcript())._register_(_st(self)._current());
  3606. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.IDETranscript.klass)});},
  3607. messageSends: ["register:", "current"]}),
  3608. smalltalk.IDETranscript.klass);
  3609. smalltalk.addMethod(
  3610. "_new",
  3611. smalltalk.method({
  3612. selector: "new",
  3613. fn: function () {
  3614. var self=this;
  3615. return smalltalk.withContext(function($ctx1) {
  3616. _st(self)._shouldNotImplement();
  3617. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.IDETranscript.klass)});},
  3618. messageSends: ["shouldNotImplement"]}),
  3619. smalltalk.IDETranscript.klass);
  3620. smalltalk.addMethod(
  3621. "_open",
  3622. smalltalk.method({
  3623. selector: "open",
  3624. fn: function () {
  3625. var self=this;
  3626. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3627. return smalltalk.withContext(function($ctx1) {
  3628. var $1,$2;
  3629. $1=_st($TabManager())._current();
  3630. _st($1)._open();
  3631. $2=_st($1)._selectTab_(_st(self)._current());
  3632. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript.klass)});},
  3633. messageSends: ["open", "current", "selectTab:"]}),
  3634. smalltalk.IDETranscript.klass);
  3635. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  3636. smalltalk.addMethod(
  3637. "_canBeClosed",
  3638. smalltalk.method({
  3639. selector: "canBeClosed",
  3640. fn: function () {
  3641. var self=this;
  3642. return smalltalk.withContext(function($ctx1) {
  3643. return true;
  3644. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Inspector)});},
  3645. messageSends: []}),
  3646. smalltalk.Inspector);
  3647. smalltalk.addMethod(
  3648. "_dive",
  3649. smalltalk.method({
  3650. selector: "dive",
  3651. fn: function () {
  3652. var self=this;
  3653. return smalltalk.withContext(function($ctx1) {
  3654. _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._inspect();
  3655. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},smalltalk.Inspector)});},
  3656. messageSends: ["inspect", "at:", "selectedVariable", "variables"]}),
  3657. smalltalk.Inspector);
  3658. smalltalk.addMethod(
  3659. "_inspect_",
  3660. smalltalk.method({
  3661. selector: "inspect:",
  3662. fn: function (anObject) {
  3663. var self=this;
  3664. return smalltalk.withContext(function($ctx1) {
  3665. self["@object"]=anObject;
  3666. self["@variables"]=[];
  3667. _st(self["@object"])._inspectOn_(self);
  3668. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector)});},
  3669. messageSends: ["inspectOn:"]}),
  3670. smalltalk.Inspector);
  3671. smalltalk.addMethod(
  3672. "_label",
  3673. smalltalk.method({
  3674. selector: "label",
  3675. fn: function () {
  3676. var self=this;
  3677. return smalltalk.withContext(function($ctx1) {
  3678. var $2,$1;
  3679. $2=self["@label"];
  3680. if(($receiver = $2) == nil || $receiver == undefined){
  3681. $1="Inspector (nil)";
  3682. } else {
  3683. $1=$2;
  3684. };
  3685. return $1;
  3686. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Inspector)});},
  3687. messageSends: ["ifNil:"]}),
  3688. smalltalk.Inspector);
  3689. smalltalk.addMethod(
  3690. "_refresh",
  3691. smalltalk.method({
  3692. selector: "refresh",
  3693. fn: function () {
  3694. var self=this;
  3695. return smalltalk.withContext(function($ctx1) {
  3696. var $1,$2;
  3697. $1=self;
  3698. _st($1)._inspect_(self["@object"]);
  3699. _st($1)._updateVariablesList();
  3700. $2=_st($1)._updateValueTextarea();
  3701. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.Inspector)});},
  3702. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"]}),
  3703. smalltalk.Inspector);
  3704. smalltalk.addMethod(
  3705. "_renderBottomPanelOn_",
  3706. smalltalk.method({
  3707. selector: "renderBottomPanelOn:",
  3708. fn: function (html) {
  3709. var self=this;
  3710. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  3711. return smalltalk.withContext(function($ctx1) {
  3712. var $1,$3,$4,$2;
  3713. $1=_st(html)._div();
  3714. _st($1)._class_("amber_sourceCode");
  3715. $2=_st($1)._with_((function(){
  3716. return smalltalk.withContext(function($ctx2) {
  3717. $3=_st($SourceArea())._new();
  3718. _st($3)._receiver_(self["@object"]);
  3719. _st($3)._onDoIt_((function(){
  3720. return smalltalk.withContext(function($ctx3) {
  3721. return _st(self)._refresh();
  3722. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3723. $4=_st($3)._yourself();
  3724. self["@sourceArea"]=$4;
  3725. self["@sourceArea"];
  3726. return _st(self["@sourceArea"])._renderOn_(html);
  3727. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3728. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Inspector)});},
  3729. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"]}),
  3730. smalltalk.Inspector);
  3731. smalltalk.addMethod(
  3732. "_renderBoxOn_",
  3733. smalltalk.method({
  3734. selector: "renderBoxOn:",
  3735. fn: function (html) {
  3736. var self=this;
  3737. return smalltalk.withContext(function($ctx1) {
  3738. var $1,$2;
  3739. $1=self;
  3740. _st($1)._renderTopPanelOn_(html);
  3741. $2=_st($1)._renderBottomPanelOn_(html);
  3742. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Inspector)});},
  3743. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]}),
  3744. smalltalk.Inspector);
  3745. smalltalk.addMethod(
  3746. "_renderButtonsOn_",
  3747. smalltalk.method({
  3748. selector: "renderButtonsOn:",
  3749. fn: function (html) {
  3750. var self=this;
  3751. return smalltalk.withContext(function($ctx1) {
  3752. var $1,$2,$3,$4,$5,$6;
  3753. $1=_st(html)._button();
  3754. _st($1)._with_("DoIt");
  3755. $2=_st($1)._onClick_((function(){
  3756. return smalltalk.withContext(function($ctx2) {
  3757. return _st(_st(self)._sourceArea())._doIt();
  3758. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3759. $3=_st(html)._button();
  3760. _st($3)._with_("PrintIt");
  3761. $4=_st($3)._onClick_((function(){
  3762. return smalltalk.withContext(function($ctx2) {
  3763. return _st(_st(self)._sourceArea())._printIt();
  3764. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3765. $5=_st(html)._button();
  3766. _st($5)._with_("InspectIt");
  3767. $6=_st($5)._onClick_((function(){
  3768. return smalltalk.withContext(function($ctx2) {
  3769. return _st(_st(self)._sourceArea())._inspectIt();
  3770. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3771. _st(self)._updateButtons();
  3772. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Inspector)});},
  3773. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"]}),
  3774. smalltalk.Inspector);
  3775. smalltalk.addMethod(
  3776. "_renderTopPanelOn_",
  3777. smalltalk.method({
  3778. selector: "renderTopPanelOn:",
  3779. fn: function (html) {
  3780. var self=this;
  3781. return smalltalk.withContext(function($ctx1) {
  3782. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11,$12;
  3783. $1=_st(html)._div();
  3784. _st($1)._class_("top");
  3785. $2=_st($1)._with_((function(){
  3786. return smalltalk.withContext(function($ctx2) {
  3787. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  3788. self["@variablesList"];
  3789. $3=_st(html)._textarea();
  3790. _st($3)._class_("amber_column value");
  3791. $4=_st($3)._at_put_("readonly","readonly");
  3792. self["@valueTextarea"]=$4;
  3793. self["@valueTextarea"];
  3794. $5=_st(html)._div();
  3795. _st($5)._class_("amber_tabs inspector");
  3796. $6=_st($5)._with_((function(){
  3797. return smalltalk.withContext(function($ctx3) {
  3798. $7=_st(html)._button();
  3799. _st($7)._class_("amber_button inspector refresh");
  3800. _st($7)._with_("Refresh");
  3801. $8=_st($7)._onClick_((function(){
  3802. return smalltalk.withContext(function($ctx4) {
  3803. return _st(self)._refresh();
  3804. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3805. $8;
  3806. $9=_st(html)._button();
  3807. _st($9)._class_("amber_button inspector dive");
  3808. _st($9)._with_("Dive");
  3809. $10=_st($9)._onClick_((function(){
  3810. return smalltalk.withContext(function($ctx4) {
  3811. return _st(self)._dive();
  3812. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3813. self["@diveButton"]=$10;
  3814. return self["@diveButton"];
  3815. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  3816. $6;
  3817. return _st(_st(html)._div())._class_("amber_clear");
  3818. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3819. $11=self;
  3820. _st($11)._updateVariablesList();
  3821. $12=_st($11)._updateValueTextarea();
  3822. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Inspector)});},
  3823. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"]}),
  3824. smalltalk.Inspector);
  3825. smalltalk.addMethod(
  3826. "_selectVariable_",
  3827. smalltalk.method({
  3828. selector: "selectVariable:",
  3829. fn: function (aString) {
  3830. var self=this;
  3831. return smalltalk.withContext(function($ctx1) {
  3832. var $1,$2;
  3833. _st(self)._selectedVariable_(aString);
  3834. $1=self;
  3835. _st($1)._updateVariablesList();
  3836. _st($1)._updateValueTextarea();
  3837. $2=_st($1)._updateButtons();
  3838. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},smalltalk.Inspector)});},
  3839. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"]}),
  3840. smalltalk.Inspector);
  3841. smalltalk.addMethod(
  3842. "_selectedVariable",
  3843. smalltalk.method({
  3844. selector: "selectedVariable",
  3845. fn: function () {
  3846. var self=this;
  3847. return smalltalk.withContext(function($ctx1) {
  3848. var $1;
  3849. $1=self["@selectedVariable"];
  3850. return $1;
  3851. }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{},smalltalk.Inspector)});},
  3852. messageSends: []}),
  3853. smalltalk.Inspector);
  3854. smalltalk.addMethod(
  3855. "_selectedVariable_",
  3856. smalltalk.method({
  3857. selector: "selectedVariable:",
  3858. fn: function (aString) {
  3859. var self=this;
  3860. return smalltalk.withContext(function($ctx1) {
  3861. self["@selectedVariable"]=aString;
  3862. return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString},smalltalk.Inspector)});},
  3863. messageSends: []}),
  3864. smalltalk.Inspector);
  3865. smalltalk.addMethod(
  3866. "_setLabel_",
  3867. smalltalk.method({
  3868. selector: "setLabel:",
  3869. fn: function (aString) {
  3870. var self=this;
  3871. return smalltalk.withContext(function($ctx1) {
  3872. self["@label"]=aString;
  3873. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.Inspector)});},
  3874. messageSends: []}),
  3875. smalltalk.Inspector);
  3876. smalltalk.addMethod(
  3877. "_setVariables_",
  3878. smalltalk.method({
  3879. selector: "setVariables:",
  3880. fn: function (aCollection) {
  3881. var self=this;
  3882. return smalltalk.withContext(function($ctx1) {
  3883. self["@variables"]=aCollection;
  3884. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection},smalltalk.Inspector)});},
  3885. messageSends: []}),
  3886. smalltalk.Inspector);
  3887. smalltalk.addMethod(
  3888. "_sourceArea",
  3889. smalltalk.method({
  3890. selector: "sourceArea",
  3891. fn: function () {
  3892. var self=this;
  3893. return smalltalk.withContext(function($ctx1) {
  3894. var $1;
  3895. $1=self["@sourceArea"];
  3896. return $1;
  3897. }, function($ctx1) {$ctx1.fill(self,"sourceArea",{},smalltalk.Inspector)});},
  3898. messageSends: []}),
  3899. smalltalk.Inspector);
  3900. smalltalk.addMethod(
  3901. "_updateButtons",
  3902. smalltalk.method({
  3903. selector: "updateButtons",
  3904. fn: function () {
  3905. var self=this;
  3906. return smalltalk.withContext(function($ctx1) {
  3907. var $1;
  3908. $1=_st(_st(_st(self)._selectedVariable())._notNil())._and_((function(){
  3909. return smalltalk.withContext(function($ctx2) {
  3910. return _st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._notNil();
  3911. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  3912. if(smalltalk.assert($1)){
  3913. _st(self["@diveButton"])._removeAt_("disabled");
  3914. } else {
  3915. _st(self["@diveButton"])._at_put_("disabled",true);
  3916. };
  3917. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},smalltalk.Inspector)});},
  3918. messageSends: ["ifFalse:ifTrue:", "at:put:", "removeAt:", "and:", "notNil", "at:", "selectedVariable", "variables"]}),
  3919. smalltalk.Inspector);
  3920. smalltalk.addMethod(
  3921. "_updateValueTextarea",
  3922. smalltalk.method({
  3923. selector: "updateValueTextarea",
  3924. fn: function () {
  3925. var self=this;
  3926. return smalltalk.withContext(function($ctx1) {
  3927. var $1,$3,$2;
  3928. $1=_st(self["@valueTextarea"])._asJQuery();
  3929. $3=_st(_st(self)._selectedVariable())._isNil();
  3930. if(smalltalk.assert($3)){
  3931. $2="";
  3932. } else {
  3933. $2=_st(_st(_st(self)._variables())._at_(_st(self)._selectedVariable()))._printString();
  3934. };
  3935. _st($1)._val_($2);
  3936. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},smalltalk.Inspector)});},
  3937. messageSends: ["val:", "ifTrue:ifFalse:", "printString", "at:", "selectedVariable", "variables", "isNil", "asJQuery"]}),
  3938. smalltalk.Inspector);
  3939. smalltalk.addMethod(
  3940. "_updateVariablesList",
  3941. smalltalk.method({
  3942. selector: "updateVariablesList",
  3943. fn: function () {
  3944. var self=this;
  3945. return smalltalk.withContext(function($ctx1) {
  3946. var $1,$2,$3;
  3947. _st(self["@variablesList"])._contents_((function(html){
  3948. return smalltalk.withContext(function($ctx2) {
  3949. return _st(_st(_st(self)._variables())._keys())._do_((function(each){
  3950. var li;
  3951. return smalltalk.withContext(function($ctx3) {
  3952. li=_st(html)._li();
  3953. li;
  3954. $1=li;
  3955. _st($1)._with_(each);
  3956. $2=_st($1)._onClick_((function(){
  3957. return smalltalk.withContext(function($ctx4) {
  3958. return _st(self)._selectVariable_(each);
  3959. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  3960. $2;
  3961. $3=_st(_st(self)._selectedVariable()).__eq(each);
  3962. if(smalltalk.assert($3)){
  3963. return _st(li)._class_("selected");
  3964. };
  3965. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  3966. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  3967. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Inspector)});},
  3968. messageSends: ["contents:", "do:", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "class:", "=", "selectedVariable", "keys", "variables"]}),
  3969. smalltalk.Inspector);
  3970. smalltalk.addMethod(
  3971. "_variables",
  3972. smalltalk.method({
  3973. selector: "variables",
  3974. fn: function () {
  3975. var self=this;
  3976. return smalltalk.withContext(function($ctx1) {
  3977. var $1;
  3978. $1=self["@variables"];
  3979. return $1;
  3980. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.Inspector)});},
  3981. messageSends: []}),
  3982. smalltalk.Inspector);
  3983. smalltalk.addMethod(
  3984. "_on_",
  3985. smalltalk.method({
  3986. selector: "on:",
  3987. fn: function (anObject) {
  3988. var self=this;
  3989. return smalltalk.withContext(function($ctx1) {
  3990. var $2,$3,$1;
  3991. $2=_st(self)._new();
  3992. _st($2)._inspect_(anObject);
  3993. $3=_st($2)._yourself();
  3994. $1=$3;
  3995. return $1;
  3996. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Inspector.klass)});},
  3997. messageSends: ["inspect:", "new", "yourself"]}),
  3998. smalltalk.Inspector.klass);
  3999. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  4000. smalltalk.addMethod(
  4001. "_percent",
  4002. smalltalk.method({
  4003. selector: "percent",
  4004. fn: function () {
  4005. var self=this;
  4006. return smalltalk.withContext(function($ctx1) {
  4007. var $2,$1;
  4008. $2=self["@percent"];
  4009. if(($receiver = $2) == nil || $receiver == undefined){
  4010. $1=(0);
  4011. } else {
  4012. $1=$2;
  4013. };
  4014. return $1;
  4015. }, function($ctx1) {$ctx1.fill(self,"percent",{},smalltalk.ProgressBar)});},
  4016. messageSends: ["ifNil:"]}),
  4017. smalltalk.ProgressBar);
  4018. smalltalk.addMethod(
  4019. "_percent_",
  4020. smalltalk.method({
  4021. selector: "percent:",
  4022. fn: function (aNumber) {
  4023. var self=this;
  4024. return smalltalk.withContext(function($ctx1) {
  4025. self["@percent"]=aNumber;
  4026. return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber},smalltalk.ProgressBar)});},
  4027. messageSends: []}),
  4028. smalltalk.ProgressBar);
  4029. smalltalk.addMethod(
  4030. "_renderOn_",
  4031. smalltalk.method({
  4032. selector: "renderOn:",
  4033. fn: function (html) {
  4034. var self=this;
  4035. return smalltalk.withContext(function($ctx1) {
  4036. var $1,$2;
  4037. $1=_st(html)._div();
  4038. _st($1)._class_("progress_bar");
  4039. $2=_st($1)._yourself();
  4040. self["@div"]=$2;
  4041. _st(self)._renderProgressBar();
  4042. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.ProgressBar)});},
  4043. messageSends: ["class:", "div", "yourself", "renderProgressBar"]}),
  4044. smalltalk.ProgressBar);
  4045. smalltalk.addMethod(
  4046. "_renderProgressBar",
  4047. smalltalk.method({
  4048. selector: "renderProgressBar",
  4049. fn: function () {
  4050. var self=this;
  4051. return smalltalk.withContext(function($ctx1) {
  4052. var $1,$2;
  4053. _st(self["@div"])._contents_((function(html){
  4054. return smalltalk.withContext(function($ctx2) {
  4055. $1=_st(html)._div();
  4056. _st($1)._class_("progress");
  4057. $2=_st($1)._style_(_st(_st("width:").__comma(_st(_st(self)._percent())._asString())).__comma("%"));
  4058. return $2;
  4059. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4060. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},smalltalk.ProgressBar)});},
  4061. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"]}),
  4062. smalltalk.ProgressBar);
  4063. smalltalk.addMethod(
  4064. "_updatePercent_",
  4065. smalltalk.method({
  4066. selector: "updatePercent:",
  4067. fn: function (aNumber) {
  4068. var self=this;
  4069. return smalltalk.withContext(function($ctx1) {
  4070. _st(self)._percent_(aNumber);
  4071. _st(self)._renderProgressBar();
  4072. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},smalltalk.ProgressBar)});},
  4073. messageSends: ["percent:", "renderProgressBar"]}),
  4074. smalltalk.ProgressBar);
  4075. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  4076. smalltalk.addMethod(
  4077. "_canBeClosed",
  4078. smalltalk.method({
  4079. selector: "canBeClosed",
  4080. fn: function () {
  4081. var self=this;
  4082. return smalltalk.withContext(function($ctx1) {
  4083. return true;
  4084. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.ReferencesBrowser)});},
  4085. messageSends: []}),
  4086. smalltalk.ReferencesBrowser);
  4087. smalltalk.addMethod(
  4088. "_classesAndMetaclasses",
  4089. smalltalk.method({
  4090. selector: "classesAndMetaclasses",
  4091. fn: function () {
  4092. var self=this;
  4093. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  4094. return smalltalk.withContext(function($ctx1) {
  4095. var $1;
  4096. $1=_st(_st(_st($Smalltalk())._current())._classes()).__comma(_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  4097. return smalltalk.withContext(function($ctx2) {
  4098. return _st(each)._class();
  4099. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})));
  4100. return $1;
  4101. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.ReferencesBrowser)});},
  4102. messageSends: [",", "collect:", "class", "classes", "current"]}),
  4103. smalltalk.ReferencesBrowser);
  4104. smalltalk.addMethod(
  4105. "_implementors",
  4106. smalltalk.method({
  4107. selector: "implementors",
  4108. fn: function () {
  4109. var self=this;
  4110. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  4111. return smalltalk.withContext(function($ctx1) {
  4112. var $2,$1;
  4113. $2=self["@implementors"];
  4114. if(($receiver = $2) == nil || $receiver == undefined){
  4115. self["@implementors"]=_st($Array())._new();
  4116. $1=self["@implementors"];
  4117. } else {
  4118. $1=$2;
  4119. };
  4120. return $1;
  4121. }, function($ctx1) {$ctx1.fill(self,"implementors",{},smalltalk.ReferencesBrowser)});},
  4122. messageSends: ["ifNil:", "new"]}),
  4123. smalltalk.ReferencesBrowser);
  4124. smalltalk.addMethod(
  4125. "_initialize",
  4126. smalltalk.method({
  4127. selector: "initialize",
  4128. fn: function () {
  4129. var self=this;
  4130. return smalltalk.withContext(function($ctx1) {
  4131. smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  4132. self["@selector"]="";
  4133. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ReferencesBrowser)});},
  4134. messageSends: ["initialize"]}),
  4135. smalltalk.ReferencesBrowser);
  4136. smalltalk.addMethod(
  4137. "_label",
  4138. smalltalk.method({
  4139. selector: "label",
  4140. fn: function () {
  4141. var self=this;
  4142. return smalltalk.withContext(function($ctx1) {
  4143. return "[References]";
  4144. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.ReferencesBrowser)});},
  4145. messageSends: []}),
  4146. smalltalk.ReferencesBrowser);
  4147. smalltalk.addMethod(
  4148. "_matches",
  4149. smalltalk.method({
  4150. selector: "matches",
  4151. fn: function () {
  4152. var self=this;
  4153. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  4154. return smalltalk.withContext(function($ctx1) {
  4155. var $2,$1;
  4156. $2=self["@matches"];
  4157. if(($receiver = $2) == nil || $receiver == undefined){
  4158. self["@matches"]=_st($Array())._new();
  4159. $1=self["@matches"];
  4160. } else {
  4161. $1=$2;
  4162. };
  4163. return $1;
  4164. }, function($ctx1) {$ctx1.fill(self,"matches",{},smalltalk.ReferencesBrowser)});},
  4165. messageSends: ["ifNil:", "new"]}),
  4166. smalltalk.ReferencesBrowser);
  4167. smalltalk.addMethod(
  4168. "_openBrowserOn_",
  4169. smalltalk.method({
  4170. selector: "openBrowserOn:",
  4171. fn: function (aMethod) {
  4172. var self=this;
  4173. var browser;
  4174. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  4175. return smalltalk.withContext(function($ctx1) {
  4176. var $1,$3,$2,$4,$5,$6;
  4177. $1=$Browser();
  4178. $3=_st(_st(aMethod)._methodClass())._isMetaclass();
  4179. if(smalltalk.assert($3)){
  4180. $2=_st(_st(aMethod)._methodClass())._instanceClass();
  4181. } else {
  4182. $2=_st(aMethod)._methodClass();
  4183. };
  4184. browser=_st($1)._openOn_($2);
  4185. $4=_st(_st(aMethod)._methodClass())._isMetaclass();
  4186. if(smalltalk.assert($4)){
  4187. _st(browser)._selectTab_("class");
  4188. };
  4189. $5=browser;
  4190. _st($5)._selectProtocol_(_st(aMethod)._category());
  4191. $6=_st($5)._selectMethod_(aMethod);
  4192. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},smalltalk.ReferencesBrowser)});},
  4193. messageSends: ["openOn:", "ifTrue:ifFalse:", "instanceClass", "methodClass", "isMetaclass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"]}),
  4194. smalltalk.ReferencesBrowser);
  4195. smalltalk.addMethod(
  4196. "_referencedClasses",
  4197. smalltalk.method({
  4198. selector: "referencedClasses",
  4199. fn: function () {
  4200. var self=this;
  4201. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  4202. return smalltalk.withContext(function($ctx1) {
  4203. var $2,$1;
  4204. $2=self["@referencedClasses"];
  4205. if(($receiver = $2) == nil || $receiver == undefined){
  4206. self["@referencedClasses"]=_st($Array())._new();
  4207. $1=self["@referencedClasses"];
  4208. } else {
  4209. $1=$2;
  4210. };
  4211. return $1;
  4212. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},smalltalk.ReferencesBrowser)});},
  4213. messageSends: ["ifNil:", "new"]}),
  4214. smalltalk.ReferencesBrowser);
  4215. smalltalk.addMethod(
  4216. "_renderBoxOn_",
  4217. smalltalk.method({
  4218. selector: "renderBoxOn:",
  4219. fn: function (html) {
  4220. var self=this;
  4221. return smalltalk.withContext(function($ctx1) {
  4222. var $1,$2;
  4223. $1=self;
  4224. _st($1)._renderInputOn_(html);
  4225. _st($1)._renderImplementorsOn_(html);
  4226. _st($1)._renderSendersOn_(html);
  4227. _st($1)._renderReferencedClassesOn_(html);
  4228. $2=_st($1)._renderMatchesOn_(html);
  4229. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.ReferencesBrowser)});},
  4230. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"]}),
  4231. smalltalk.ReferencesBrowser);
  4232. smalltalk.addMethod(
  4233. "_renderImplementorsOn_",
  4234. smalltalk.method({
  4235. selector: "renderImplementorsOn:",
  4236. fn: function (html) {
  4237. var self=this;
  4238. return smalltalk.withContext(function($ctx1) {
  4239. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  4240. _st(self)._updateImplementorsList();
  4241. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},smalltalk.ReferencesBrowser)});},
  4242. messageSends: ["class:", "ul", "updateImplementorsList"]}),
  4243. smalltalk.ReferencesBrowser);
  4244. smalltalk.addMethod(
  4245. "_renderInputOn_",
  4246. smalltalk.method({
  4247. selector: "renderInputOn:",
  4248. fn: function (html) {
  4249. var self=this;
  4250. return smalltalk.withContext(function($ctx1) {
  4251. var $1,$2;
  4252. $1=_st(html)._input();
  4253. _st($1)._class_("implementors");
  4254. $2=_st($1)._yourself();
  4255. self["@input"]=$2;
  4256. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  4257. _st(self)._setInputEvents();
  4258. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},smalltalk.ReferencesBrowser)});},
  4259. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"]}),
  4260. smalltalk.ReferencesBrowser);
  4261. smalltalk.addMethod(
  4262. "_renderMatchesOn_",
  4263. smalltalk.method({
  4264. selector: "renderMatchesOn:",
  4265. fn: function (html) {
  4266. var self=this;
  4267. return smalltalk.withContext(function($ctx1) {
  4268. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  4269. _st(self)._updateMatchesList();
  4270. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},smalltalk.ReferencesBrowser)});},
  4271. messageSends: ["class:", "ul", "updateMatchesList"]}),
  4272. smalltalk.ReferencesBrowser);
  4273. smalltalk.addMethod(
  4274. "_renderReferencedClassesOn_",
  4275. smalltalk.method({
  4276. selector: "renderReferencedClassesOn:",
  4277. fn: function (html) {
  4278. var self=this;
  4279. return smalltalk.withContext(function($ctx1) {
  4280. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  4281. _st(self)._updateReferencedClassesList();
  4282. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},smalltalk.ReferencesBrowser)});},
  4283. messageSends: ["class:", "ul", "updateReferencedClassesList"]}),
  4284. smalltalk.ReferencesBrowser);
  4285. smalltalk.addMethod(
  4286. "_renderSendersOn_",
  4287. smalltalk.method({
  4288. selector: "renderSendersOn:",
  4289. fn: function (html) {
  4290. var self=this;
  4291. return smalltalk.withContext(function($ctx1) {
  4292. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  4293. _st(self)._updateSendersList();
  4294. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},smalltalk.ReferencesBrowser)});},
  4295. messageSends: ["class:", "ul", "updateSendersList"]}),
  4296. smalltalk.ReferencesBrowser);
  4297. smalltalk.addMethod(
  4298. "_search_",
  4299. smalltalk.method({
  4300. selector: "search:",
  4301. fn: function (aString) {
  4302. var self=this;
  4303. return smalltalk.withContext(function($ctx1) {
  4304. var $1,$2;
  4305. $1=self;
  4306. _st($1)._searchReferencesFor_(aString);
  4307. _st($1)._updateImplementorsList();
  4308. _st($1)._updateSendersList();
  4309. _st($1)._updateReferencedClassesList();
  4310. $2=_st($1)._updateMatchesList();
  4311. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser)});},
  4312. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"]}),
  4313. smalltalk.ReferencesBrowser);
  4314. smalltalk.addMethod(
  4315. "_searchMethodSource",
  4316. smalltalk.method({
  4317. selector: "searchMethodSource",
  4318. fn: function () {
  4319. var self=this;
  4320. var regex;
  4321. return smalltalk.withContext(function($ctx1) {
  4322. var $1;
  4323. regex=_st(self["@selector"])._allButFirst();
  4324. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  4325. return smalltalk.withContext(function($ctx2) {
  4326. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  4327. return smalltalk.withContext(function($ctx3) {
  4328. $1=_st(_st(value)._source())._match_(regex);
  4329. if(smalltalk.assert($1)){
  4330. return _st(_st(self)._matches())._add_(value);
  4331. };
  4332. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})}));
  4333. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4334. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},smalltalk.ReferencesBrowser)});},
  4335. messageSends: ["allButFirst", "do:", "ifTrue:", "add:", "matches", "match:", "source", "values", "methodDictionary", "classesAndMetaclasses"]}),
  4336. smalltalk.ReferencesBrowser);
  4337. smalltalk.addMethod(
  4338. "_searchReferencedClasses",
  4339. smalltalk.method({
  4340. selector: "searchReferencedClasses",
  4341. fn: function () {
  4342. var self=this;
  4343. return smalltalk.withContext(function($ctx1) {
  4344. var $1;
  4345. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  4346. return smalltalk.withContext(function($ctx2) {
  4347. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  4348. return smalltalk.withContext(function($ctx3) {
  4349. $1=_st(_st(value)._referencedClasses())._includes_(self["@selector"]);
  4350. if(smalltalk.assert($1)){
  4351. return _st(_st(self)._referencedClasses())._add_(value);
  4352. };
  4353. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx1)})}));
  4354. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4355. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},smalltalk.ReferencesBrowser)});},
  4356. messageSends: ["do:", "ifTrue:", "add:", "referencedClasses", "includes:", "values", "methodDictionary", "classesAndMetaclasses"]}),
  4357. smalltalk.ReferencesBrowser);
  4358. smalltalk.addMethod(
  4359. "_searchReferencesFor_",
  4360. smalltalk.method({
  4361. selector: "searchReferencesFor:",
  4362. fn: function (aString) {
  4363. var self=this;
  4364. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  4365. return smalltalk.withContext(function($ctx1) {
  4366. var $1;
  4367. self["@selector"]=aString;
  4368. self["@implementors"]=_st($Array())._new();
  4369. self["@senders"]=_st($Array())._new();
  4370. self["@referencedClasses"]=_st($Array())._new();
  4371. self["@matches"]=_st($Array())._new();
  4372. _st(self)._searchMethodSource();
  4373. $1=_st(self["@selector"])._match_("^[A-Z]");
  4374. if(smalltalk.assert($1)){
  4375. _st(self)._searchReferencedClasses();
  4376. } else {
  4377. _st(self)._searchSelectorReferences();
  4378. };
  4379. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},smalltalk.ReferencesBrowser)});},
  4380. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "searchSelectorReferences", "searchReferencedClasses", "match:"]}),
  4381. smalltalk.ReferencesBrowser);
  4382. smalltalk.addMethod(
  4383. "_searchSelectorReferences",
  4384. smalltalk.method({
  4385. selector: "searchSelectorReferences",
  4386. fn: function () {
  4387. var self=this;
  4388. return smalltalk.withContext(function($ctx1) {
  4389. var $1,$2;
  4390. _st(_st(self)._classesAndMetaclasses())._do_((function(each){
  4391. return smalltalk.withContext(function($ctx2) {
  4392. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  4393. return smalltalk.withContext(function($ctx3) {
  4394. $1=_st(key).__eq(self["@selector"]);
  4395. if(smalltalk.assert($1)){
  4396. _st(_st(self)._implementors())._add_(value);
  4397. };
  4398. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  4399. if(smalltalk.assert($2)){
  4400. return _st(_st(self)._senders())._add_(value);
  4401. };
  4402. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx1)})}));
  4403. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4404. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},smalltalk.ReferencesBrowser)});},
  4405. messageSends: ["do:", "keysAndValuesDo:", "ifTrue:", "add:", "implementors", "=", "senders", "includes:", "messageSends", "methodDictionary", "classesAndMetaclasses"]}),
  4406. smalltalk.ReferencesBrowser);
  4407. smalltalk.addMethod(
  4408. "_selector",
  4409. smalltalk.method({
  4410. selector: "selector",
  4411. fn: function () {
  4412. var self=this;
  4413. return smalltalk.withContext(function($ctx1) {
  4414. var $1;
  4415. $1=self["@selector"];
  4416. return $1;
  4417. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.ReferencesBrowser)});},
  4418. messageSends: []}),
  4419. smalltalk.ReferencesBrowser);
  4420. smalltalk.addMethod(
  4421. "_senders",
  4422. smalltalk.method({
  4423. selector: "senders",
  4424. fn: function () {
  4425. var self=this;
  4426. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  4427. return smalltalk.withContext(function($ctx1) {
  4428. var $2,$1;
  4429. $2=self["@senders"];
  4430. if(($receiver = $2) == nil || $receiver == undefined){
  4431. self["@senders"]=_st($Array())._new();
  4432. $1=self["@senders"];
  4433. } else {
  4434. $1=$2;
  4435. };
  4436. return $1;
  4437. }, function($ctx1) {$ctx1.fill(self,"senders",{},smalltalk.ReferencesBrowser)});},
  4438. messageSends: ["ifNil:", "new"]}),
  4439. smalltalk.ReferencesBrowser);
  4440. smalltalk.addMethod(
  4441. "_setInputEvents",
  4442. smalltalk.method({
  4443. selector: "setInputEvents",
  4444. fn: function () {
  4445. var self=this;
  4446. return smalltalk.withContext(function($ctx1) {
  4447. var $1,$3,$2;
  4448. $1=self["@input"];
  4449. _st($1)._onKeyUp_((function(){
  4450. return smalltalk.withContext(function($ctx2) {
  4451. self["@timer"]=_st((function(){
  4452. return smalltalk.withContext(function($ctx3) {
  4453. return _st(self)._search_(_st(_st(self["@input"])._asJQuery())._val());
  4454. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}))._valueWithTimeout_((100));
  4455. return self["@timer"];
  4456. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4457. $2=_st($1)._onKeyDown_((function(){
  4458. return smalltalk.withContext(function($ctx2) {
  4459. $3=self["@timer"];
  4460. if(($receiver = $3) == nil || $receiver == undefined){
  4461. return $3;
  4462. } else {
  4463. return _st(self["@timer"])._clearTimeout();
  4464. };
  4465. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4466. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},smalltalk.ReferencesBrowser)});},
  4467. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"]}),
  4468. smalltalk.ReferencesBrowser);
  4469. smalltalk.addMethod(
  4470. "_updateImplementorsList",
  4471. smalltalk.method({
  4472. selector: "updateImplementorsList",
  4473. fn: function () {
  4474. var self=this;
  4475. return smalltalk.withContext(function($ctx1) {
  4476. var $1,$2,$3,$4;
  4477. _st(self["@implementorsList"])._contents_((function(html){
  4478. return smalltalk.withContext(function($ctx2) {
  4479. $1=_st(html)._li();
  4480. _st($1)._class_("column_label");
  4481. _st($1)._with_(_st(_st("Implementors (").__comma(_st(_st(_st(self)._implementors())._size())._asString())).__comma(")"));
  4482. $2=_st($1)._style_("font-weight: bold");
  4483. $2;
  4484. return _st(_st(self)._implementors())._do_((function(each){
  4485. var li;
  4486. return smalltalk.withContext(function($ctx3) {
  4487. li=_st(html)._li();
  4488. li;
  4489. $3=li;
  4490. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(self)._selector()));
  4491. $4=_st($3)._onClick_((function(){
  4492. return smalltalk.withContext(function($ctx4) {
  4493. return _st(self)._openBrowserOn_(each);
  4494. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4495. return $4;
  4496. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4497. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4498. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},smalltalk.ReferencesBrowser)});},
  4499. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4500. smalltalk.ReferencesBrowser);
  4501. smalltalk.addMethod(
  4502. "_updateMatchesList",
  4503. smalltalk.method({
  4504. selector: "updateMatchesList",
  4505. fn: function () {
  4506. var self=this;
  4507. return smalltalk.withContext(function($ctx1) {
  4508. var $1,$2,$3,$4;
  4509. _st(self["@matchesList"])._contents_((function(html){
  4510. return smalltalk.withContext(function($ctx2) {
  4511. $1=_st(html)._li();
  4512. _st($1)._class_("column_label");
  4513. _st($1)._with_(_st(_st("Regex matches (").__comma(_st(_st(_st(self)._matches())._size())._asString())).__comma(")"));
  4514. $2=_st($1)._style_("font-weight: bold");
  4515. $2;
  4516. return _st(_st(self)._matches())._do_((function(each){
  4517. var li;
  4518. return smalltalk.withContext(function($ctx3) {
  4519. li=_st(html)._li();
  4520. li;
  4521. $3=li;
  4522. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4523. $4=_st($3)._onClick_((function(){
  4524. return smalltalk.withContext(function($ctx4) {
  4525. return _st(self)._openBrowserOn_(each);
  4526. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4527. return $4;
  4528. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  4529. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4530. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},smalltalk.ReferencesBrowser)});},
  4531. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4532. smalltalk.ReferencesBrowser);
  4533. smalltalk.addMethod(
  4534. "_updateReferencedClassesList",
  4535. smalltalk.method({
  4536. selector: "updateReferencedClassesList",
  4537. fn: function () {
  4538. var self=this;
  4539. return smalltalk.withContext(function($ctx1) {
  4540. var $1,$2,$3,$4;
  4541. _st(self["@referencedClassesList"])._contents_((function(html){
  4542. return smalltalk.withContext(function($ctx2) {
  4543. $1=_st(html)._li();
  4544. _st($1)._class_("column_label");
  4545. _st($1)._with_(_st(_st("Class references (").__comma(_st(_st(_st(self)._referencedClasses())._size())._asString())).__comma(")"));
  4546. $2=_st($1)._style_("font-weight: bold");
  4547. $2;
  4548. return _st(_st(self)._referencedClasses())._do_((function(each){
  4549. return smalltalk.withContext(function($ctx3) {
  4550. $3=_st(html)._li();
  4551. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4552. $4=_st($3)._onClick_((function(){
  4553. return smalltalk.withContext(function($ctx4) {
  4554. return _st(self)._openBrowserOn_(each);
  4555. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4556. return $4;
  4557. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  4558. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4559. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},smalltalk.ReferencesBrowser)});},
  4560. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4561. smalltalk.ReferencesBrowser);
  4562. smalltalk.addMethod(
  4563. "_updateSendersList",
  4564. smalltalk.method({
  4565. selector: "updateSendersList",
  4566. fn: function () {
  4567. var self=this;
  4568. return smalltalk.withContext(function($ctx1) {
  4569. var $1,$2,$3,$4;
  4570. _st(self["@sendersList"])._contents_((function(html){
  4571. return smalltalk.withContext(function($ctx2) {
  4572. $1=_st(html)._li();
  4573. _st($1)._class_("column_label");
  4574. _st($1)._with_(_st(_st("Senders (").__comma(_st(_st(_st(self)._senders())._size())._asString())).__comma(")"));
  4575. $2=_st($1)._style_("font-weight: bold");
  4576. $2;
  4577. return _st(_st(self)._senders())._do_((function(each){
  4578. return smalltalk.withContext(function($ctx3) {
  4579. $3=_st(html)._li();
  4580. _st($3)._with_(_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector()));
  4581. $4=_st($3)._onClick_((function(){
  4582. return smalltalk.withContext(function($ctx4) {
  4583. return _st(self)._openBrowserOn_(each);
  4584. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  4585. return $4;
  4586. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx1)})}));
  4587. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  4588. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},smalltalk.ReferencesBrowser)});},
  4589. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"]}),
  4590. smalltalk.ReferencesBrowser);
  4591. smalltalk.addMethod(
  4592. "_search_",
  4593. smalltalk.method({
  4594. selector: "search:",
  4595. fn: function (aString) {
  4596. var self=this;
  4597. return smalltalk.withContext(function($ctx1) {
  4598. var $2,$3,$1;
  4599. $2=_st(self)._new();
  4600. _st($2)._searchReferencesFor_(aString);
  4601. $3=_st($2)._open();
  4602. $1=$3;
  4603. return $1;
  4604. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser.klass)});},
  4605. messageSends: ["searchReferencesFor:", "new", "open"]}),
  4606. smalltalk.ReferencesBrowser.klass);
  4607. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  4608. smalltalk.addMethod(
  4609. "_allClasses",
  4610. smalltalk.method({
  4611. selector: "allClasses",
  4612. fn: function () {
  4613. var self=this;
  4614. function $TestCase(){return smalltalk.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  4615. return smalltalk.withContext(function($ctx1) {
  4616. var $1;
  4617. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  4618. return smalltalk.withContext(function($ctx2) {
  4619. return _st(_st(each)._isAbstract())._not();
  4620. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4621. return $1;
  4622. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},smalltalk.TestRunner)});},
  4623. messageSends: ["select:", "not", "isAbstract", "allSubclasses"]}),
  4624. smalltalk.TestRunner);
  4625. smalltalk.addMethod(
  4626. "_classes",
  4627. smalltalk.method({
  4628. selector: "classes",
  4629. fn: function () {
  4630. var self=this;
  4631. return smalltalk.withContext(function($ctx1) {
  4632. var $1;
  4633. $1=_st(_st(_st(self)._allClasses())._select_((function(each){
  4634. return smalltalk.withContext(function($ctx2) {
  4635. return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  4636. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._sort_((function(a,b){
  4637. return smalltalk.withContext(function($ctx2) {
  4638. return _st(_st(a)._name()).__gt(_st(b)._name());
  4639. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1)})}));
  4640. return $1;
  4641. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.TestRunner)});},
  4642. messageSends: ["sort:", ">", "name", "select:", "includes:", "category", "selectedCategories", "allClasses"]}),
  4643. smalltalk.TestRunner);
  4644. smalltalk.addMethod(
  4645. "_initialize",
  4646. smalltalk.method({
  4647. selector: "initialize",
  4648. fn: function () {
  4649. var self=this;
  4650. function $TestResult(){return smalltalk.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  4651. return smalltalk.withContext(function($ctx1) {
  4652. smalltalk.TabWidget.fn.prototype._initialize.apply(_st(self), []);
  4653. self["@result"]=_st($TestResult())._new();
  4654. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TestRunner)});},
  4655. messageSends: ["initialize", "new"]}),
  4656. smalltalk.TestRunner);
  4657. smalltalk.addMethod(
  4658. "_isSelectedCategory_",
  4659. smalltalk.method({
  4660. selector: "isSelectedCategory:",
  4661. fn: function (aCategory) {
  4662. var self=this;
  4663. return smalltalk.withContext(function($ctx1) {
  4664. var $1;
  4665. $1=_st(_st(self)._selectedCategories())._includes_(aCategory);
  4666. return $1;
  4667. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},smalltalk.TestRunner)});},
  4668. messageSends: ["includes:", "selectedCategories"]}),
  4669. smalltalk.TestRunner);
  4670. smalltalk.addMethod(
  4671. "_isSelectedClass_",
  4672. smalltalk.method({
  4673. selector: "isSelectedClass:",
  4674. fn: function (aClass) {
  4675. var self=this;
  4676. return smalltalk.withContext(function($ctx1) {
  4677. var $1;
  4678. $1=_st(_st(self)._selectedClasses())._includes_(aClass);
  4679. return $1;
  4680. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},smalltalk.TestRunner)});},
  4681. messageSends: ["includes:", "selectedClasses"]}),
  4682. smalltalk.TestRunner);
  4683. smalltalk.addMethod(
  4684. "_label",
  4685. smalltalk.method({
  4686. selector: "label",
  4687. fn: function () {
  4688. var self=this;
  4689. return smalltalk.withContext(function($ctx1) {
  4690. return "SUnit";
  4691. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TestRunner)});},
  4692. messageSends: []}),
  4693. smalltalk.TestRunner);
  4694. smalltalk.addMethod(
  4695. "_packages",
  4696. smalltalk.method({
  4697. selector: "packages",
  4698. fn: function () {
  4699. var self=this;
  4700. var packages;
  4701. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  4702. return smalltalk.withContext(function($ctx1) {
  4703. var $1,$2;
  4704. packages=_st($Array())._new();
  4705. _st(_st(self)._allClasses())._do_((function(each){
  4706. return smalltalk.withContext(function($ctx2) {
  4707. $1=_st(packages)._includes_(_st(each)._category());
  4708. if(! smalltalk.assert($1)){
  4709. return _st(packages)._add_(_st(each)._category());
  4710. };
  4711. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4712. $2=_st(packages)._sort();
  4713. return $2;
  4714. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.TestRunner)});},
  4715. messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "allClasses", "sort"]}),
  4716. smalltalk.TestRunner);
  4717. smalltalk.addMethod(
  4718. "_performFailure_",
  4719. smalltalk.method({
  4720. selector: "performFailure:",
  4721. fn: function (aTestCase) {
  4722. var self=this;
  4723. return smalltalk.withContext(function($ctx1) {
  4724. _st(aTestCase)._runCase();
  4725. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},smalltalk.TestRunner)});},
  4726. messageSends: ["runCase"]}),
  4727. smalltalk.TestRunner);
  4728. smalltalk.addMethod(
  4729. "_printErrors",
  4730. smalltalk.method({
  4731. selector: "printErrors",
  4732. fn: function () {
  4733. var self=this;
  4734. return smalltalk.withContext(function($ctx1) {
  4735. var $1;
  4736. $1=_st(_st(_st(_st(_st(self)._result())._errors())._size())._asString()).__comma(" errors, ");
  4737. return $1;
  4738. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},smalltalk.TestRunner)});},
  4739. messageSends: [",", "asString", "size", "errors", "result"]}),
  4740. smalltalk.TestRunner);
  4741. smalltalk.addMethod(
  4742. "_printFailures",
  4743. smalltalk.method({
  4744. selector: "printFailures",
  4745. fn: function () {
  4746. var self=this;
  4747. return smalltalk.withContext(function($ctx1) {
  4748. var $1;
  4749. $1=_st(_st(_st(_st(_st(self)._result())._failures())._size())._asString()).__comma(" failures");
  4750. return $1;
  4751. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},smalltalk.TestRunner)});},
  4752. messageSends: [",", "asString", "size", "failures", "result"]}),
  4753. smalltalk.TestRunner);
  4754. smalltalk.addMethod(
  4755. "_printPasses",
  4756. smalltalk.method({
  4757. selector: "printPasses",
  4758. fn: function () {
  4759. var self=this;
  4760. return smalltalk.withContext(function($ctx1) {
  4761. var $1;
  4762. $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, ");
  4763. return $1;
  4764. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},smalltalk.TestRunner)});},
  4765. messageSends: [",", "asString", "-", "size", "failures", "result", "errors", "runs"]}),
  4766. smalltalk.TestRunner);
  4767. smalltalk.addMethod(
  4768. "_printTotal",
  4769. smalltalk.method({
  4770. selector: "printTotal",
  4771. fn: function () {
  4772. var self=this;
  4773. return smalltalk.withContext(function($ctx1) {
  4774. var $1;
  4775. $1=_st(_st(_st(_st(self)._result())._total())._asString()).__comma(" runs, ");
  4776. return $1;
  4777. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},smalltalk.TestRunner)});},
  4778. messageSends: [",", "asString", "total", "result"]}),
  4779. smalltalk.TestRunner);
  4780. smalltalk.addMethod(
  4781. "_progressBar",
  4782. smalltalk.method({
  4783. selector: "progressBar",
  4784. fn: function () {
  4785. var self=this;
  4786. function $ProgressBar(){return smalltalk.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  4787. return smalltalk.withContext(function($ctx1) {
  4788. var $2,$1;
  4789. $2=self["@progressBar"];
  4790. if(($receiver = $2) == nil || $receiver == undefined){
  4791. self["@progressBar"]=_st($ProgressBar())._new();
  4792. $1=self["@progressBar"];
  4793. } else {
  4794. $1=$2;
  4795. };
  4796. return $1;
  4797. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},smalltalk.TestRunner)});},
  4798. messageSends: ["ifNil:", "new"]}),
  4799. smalltalk.TestRunner);
  4800. smalltalk.addMethod(
  4801. "_renderBoxOn_",
  4802. smalltalk.method({
  4803. selector: "renderBoxOn:",
  4804. fn: function (html) {
  4805. var self=this;
  4806. return smalltalk.withContext(function($ctx1) {
  4807. var $1,$2;
  4808. $1=self;
  4809. _st($1)._renderCategoriesOn_(html);
  4810. _st($1)._renderClassesOn_(html);
  4811. $2=_st($1)._renderResultsOn_(html);
  4812. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TestRunner)});},
  4813. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"]}),
  4814. smalltalk.TestRunner);
  4815. smalltalk.addMethod(
  4816. "_renderButtonsOn_",
  4817. smalltalk.method({
  4818. selector: "renderButtonsOn:",
  4819. fn: function (html) {
  4820. var self=this;
  4821. return smalltalk.withContext(function($ctx1) {
  4822. var $1,$2;
  4823. $1=_st(html)._button();
  4824. _st($1)._with_("Run selected");
  4825. $2=_st($1)._onClick_((function(){
  4826. return smalltalk.withContext(function($ctx2) {
  4827. return _st(self)._run_(_st(self)._testCases());
  4828. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  4829. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TestRunner)});},
  4830. messageSends: ["with:", "button", "onClick:", "run:", "testCases"]}),
  4831. smalltalk.TestRunner);
  4832. smalltalk.addMethod(
  4833. "_renderCategoriesOn_",
  4834. smalltalk.method({
  4835. selector: "renderCategoriesOn:",
  4836. fn: function (html) {
  4837. var self=this;
  4838. return smalltalk.withContext(function($ctx1) {
  4839. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  4840. _st(self)._updateCategoriesList();
  4841. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},smalltalk.TestRunner)});},
  4842. messageSends: ["class:", "ul", "updateCategoriesList"]}),
  4843. smalltalk.TestRunner);
  4844. smalltalk.addMethod(
  4845. "_renderClassesOn_",
  4846. smalltalk.method({
  4847. selector: "renderClassesOn:",
  4848. fn: function (html) {
  4849. var self=this;
  4850. return smalltalk.withContext(function($ctx1) {
  4851. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  4852. _st(self)._updateClassesList();
  4853. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},smalltalk.TestRunner)});},
  4854. messageSends: ["class:", "ul", "updateClassesList"]}),
  4855. smalltalk.TestRunner);
  4856. smalltalk.addMethod(
  4857. "_renderErrorsOn_",
  4858. smalltalk.method({
  4859. selector: "renderErrorsOn:",
  4860. fn: function (html) {
  4861. var self=this;
  4862. return smalltalk.withContext(function($ctx1) {
  4863. var $1,$2;
  4864. _st(_st(_st(self)._result())._errors())._do_((function(each){
  4865. return smalltalk.withContext(function($ctx2) {
  4866. $1=_st(html)._li();
  4867. _st($1)._class_("errors");
  4868. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4869. $2=_st($1)._onClick_((function(){
  4870. return smalltalk.withContext(function($ctx3) {
  4871. return _st(self)._performFailure_(each);
  4872. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4873. return $2;
  4874. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4875. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},smalltalk.TestRunner)});},
  4876. messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "errors", "result"]}),
  4877. smalltalk.TestRunner);
  4878. smalltalk.addMethod(
  4879. "_renderFailuresOn_",
  4880. smalltalk.method({
  4881. selector: "renderFailuresOn:",
  4882. fn: function (html) {
  4883. var self=this;
  4884. return smalltalk.withContext(function($ctx1) {
  4885. var $1,$2;
  4886. _st(_st(_st(self)._result())._failures())._do_((function(each){
  4887. return smalltalk.withContext(function($ctx2) {
  4888. $1=_st(html)._li();
  4889. _st($1)._class_("failures");
  4890. _st($1)._with_(_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector()));
  4891. $2=_st($1)._onClick_((function(){
  4892. return smalltalk.withContext(function($ctx3) {
  4893. return _st(self)._performFailure_(each);
  4894. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  4895. return $2;
  4896. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4897. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},smalltalk.TestRunner)});},
  4898. messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "failures", "result"]}),
  4899. smalltalk.TestRunner);
  4900. smalltalk.addMethod(
  4901. "_renderResultsOn_",
  4902. smalltalk.method({
  4903. selector: "renderResultsOn:",
  4904. fn: function (html) {
  4905. var self=this;
  4906. return smalltalk.withContext(function($ctx1) {
  4907. self["@statusDiv"]=_st(html)._div();
  4908. _st(html)._with_(_st(self)._progressBar());
  4909. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  4910. _st(self)._updateMethodsList();
  4911. _st(self)._updateStatusDiv();
  4912. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},smalltalk.TestRunner)});},
  4913. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"]}),
  4914. smalltalk.TestRunner);
  4915. smalltalk.addMethod(
  4916. "_result",
  4917. smalltalk.method({
  4918. selector: "result",
  4919. fn: function () {
  4920. var self=this;
  4921. return smalltalk.withContext(function($ctx1) {
  4922. var $1;
  4923. $1=self["@result"];
  4924. return $1;
  4925. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestRunner)});},
  4926. messageSends: []}),
  4927. smalltalk.TestRunner);
  4928. smalltalk.addMethod(
  4929. "_run_",
  4930. smalltalk.method({
  4931. selector: "run:",
  4932. fn: function (aCollection) {
  4933. var self=this;
  4934. var worker;
  4935. function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  4936. function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  4937. return smalltalk.withContext(function($ctx1) {
  4938. var $1;
  4939. worker=_st($TestSuiteRunner())._on_(aCollection);
  4940. self["@result"]=_st(worker)._result();
  4941. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  4942. return smalltalk.withContext(function($ctx2) {
  4943. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  4944. if(smalltalk.assert($1)){
  4945. _st(_st(self)._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  4946. _st(self)._updateStatusDiv();
  4947. return _st(self)._updateMethodsList();
  4948. };
  4949. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1)})}));
  4950. _st(worker)._run();
  4951. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},smalltalk.TestRunner)});},
  4952. messageSends: ["on:", "result", "on:do:", "ifTrue:", "updatePercent:", "*", "/", "total", "runs", "progressBar", "updateStatusDiv", "updateMethodsList", "==", "announcer", "run"]}),
  4953. smalltalk.TestRunner);
  4954. smalltalk.addMethod(
  4955. "_selectAllCategories",
  4956. smalltalk.method({
  4957. selector: "selectAllCategories",
  4958. fn: function () {
  4959. var self=this;
  4960. return smalltalk.withContext(function($ctx1) {
  4961. var $1,$2,$3;
  4962. _st(_st(self)._packages())._do_((function(each){
  4963. return smalltalk.withContext(function($ctx2) {
  4964. $1=_st(self["@selectedCategories"])._includes_(each);
  4965. if(! smalltalk.assert($1)){
  4966. return _st(_st(self)._selectedCategories())._add_(each);
  4967. };
  4968. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4969. $2=self;
  4970. _st($2)._updateCategoriesList();
  4971. $3=_st($2)._updateClassesList();
  4972. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},smalltalk.TestRunner)});},
  4973. messageSends: ["do:", "ifFalse:", "add:", "selectedCategories", "includes:", "packages", "updateCategoriesList", "updateClassesList"]}),
  4974. smalltalk.TestRunner);
  4975. smalltalk.addMethod(
  4976. "_selectAllClasses",
  4977. smalltalk.method({
  4978. selector: "selectAllClasses",
  4979. fn: function () {
  4980. var self=this;
  4981. return smalltalk.withContext(function($ctx1) {
  4982. var $1,$2,$3;
  4983. _st(_st(self)._classes())._do_((function(each){
  4984. return smalltalk.withContext(function($ctx2) {
  4985. $1=_st(self["@selectedClasses"])._includes_(each);
  4986. if(! smalltalk.assert($1)){
  4987. return _st(_st(self)._selectedClasses())._add_(each);
  4988. };
  4989. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  4990. $2=self;
  4991. _st($2)._updateCategoriesList();
  4992. $3=_st($2)._updateClassesList();
  4993. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},smalltalk.TestRunner)});},
  4994. messageSends: ["do:", "ifFalse:", "add:", "selectedClasses", "includes:", "classes", "updateCategoriesList", "updateClassesList"]}),
  4995. smalltalk.TestRunner);
  4996. smalltalk.addMethod(
  4997. "_selectedCategories",
  4998. smalltalk.method({
  4999. selector: "selectedCategories",
  5000. fn: function () {
  5001. var self=this;
  5002. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5003. return smalltalk.withContext(function($ctx1) {
  5004. var $2,$1;
  5005. $2=self["@selectedCategories"];
  5006. if(($receiver = $2) == nil || $receiver == undefined){
  5007. self["@selectedCategories"]=_st($Array())._new();
  5008. $1=self["@selectedCategories"];
  5009. } else {
  5010. $1=$2;
  5011. };
  5012. return $1;
  5013. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},smalltalk.TestRunner)});},
  5014. messageSends: ["ifNil:", "new"]}),
  5015. smalltalk.TestRunner);
  5016. smalltalk.addMethod(
  5017. "_selectedClasses",
  5018. smalltalk.method({
  5019. selector: "selectedClasses",
  5020. fn: function () {
  5021. var self=this;
  5022. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5023. return smalltalk.withContext(function($ctx1) {
  5024. var $2,$1;
  5025. $2=self["@selectedClasses"];
  5026. if(($receiver = $2) == nil || $receiver == undefined){
  5027. self["@selectedClasses"]=_st($Array())._new();
  5028. $1=self["@selectedClasses"];
  5029. } else {
  5030. $1=$2;
  5031. };
  5032. return $1;
  5033. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},smalltalk.TestRunner)});},
  5034. messageSends: ["ifNil:", "new"]}),
  5035. smalltalk.TestRunner);
  5036. smalltalk.addMethod(
  5037. "_statusInfo",
  5038. smalltalk.method({
  5039. selector: "statusInfo",
  5040. fn: function () {
  5041. var self=this;
  5042. return smalltalk.withContext(function($ctx1) {
  5043. var $1;
  5044. $1=_st(_st(_st(_st(self)._printTotal()).__comma(_st(self)._printPasses())).__comma(_st(self)._printErrors())).__comma(_st(self)._printFailures());
  5045. return $1;
  5046. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},smalltalk.TestRunner)});},
  5047. messageSends: [",", "printFailures", "printErrors", "printPasses", "printTotal"]}),
  5048. smalltalk.TestRunner);
  5049. smalltalk.addMethod(
  5050. "_testCases",
  5051. smalltalk.method({
  5052. selector: "testCases",
  5053. fn: function () {
  5054. var self=this;
  5055. var testCases;
  5056. return smalltalk.withContext(function($ctx1) {
  5057. var $1;
  5058. testCases=[];
  5059. _st(_st(_st(self)._selectedClasses())._select_((function(each){
  5060. return smalltalk.withContext(function($ctx2) {
  5061. return _st(_st(self)._selectedCategories())._includes_(_st(each)._category());
  5062. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})})))._do_((function(each){
  5063. return smalltalk.withContext(function($ctx2) {
  5064. return _st(testCases)._addAll_(_st(each)._buildSuite());
  5065. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  5066. $1=testCases;
  5067. return $1;
  5068. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},smalltalk.TestRunner)});},
  5069. messageSends: ["do:", "addAll:", "buildSuite", "select:", "includes:", "category", "selectedCategories", "selectedClasses"]}),
  5070. smalltalk.TestRunner);
  5071. smalltalk.addMethod(
  5072. "_toggleCategory_",
  5073. smalltalk.method({
  5074. selector: "toggleCategory:",
  5075. fn: function (aCategory) {
  5076. var self=this;
  5077. return smalltalk.withContext(function($ctx1) {
  5078. var $1,$2,$3;
  5079. $1=_st(self)._isSelectedCategory_(aCategory);
  5080. if(smalltalk.assert($1)){
  5081. _st(self["@selectedCategories"])._remove_(aCategory);
  5082. } else {
  5083. _st(self["@selectedCategories"])._add_(aCategory);
  5084. };
  5085. $2=self;
  5086. _st($2)._updateCategoriesList();
  5087. $3=_st($2)._updateClassesList();
  5088. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},smalltalk.TestRunner)});},
  5089. messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedCategory:", "updateCategoriesList", "updateClassesList"]}),
  5090. smalltalk.TestRunner);
  5091. smalltalk.addMethod(
  5092. "_toggleClass_",
  5093. smalltalk.method({
  5094. selector: "toggleClass:",
  5095. fn: function (aClass) {
  5096. var self=this;
  5097. return smalltalk.withContext(function($ctx1) {
  5098. var $1;
  5099. $1=_st(self)._isSelectedClass_(aClass);
  5100. if(smalltalk.assert($1)){
  5101. _st(self["@selectedClasses"])._remove_(aClass);
  5102. } else {
  5103. _st(self["@selectedClasses"])._add_(aClass);
  5104. };
  5105. _st(self)._updateClassesList();
  5106. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},smalltalk.TestRunner)});},
  5107. messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedClass:", "updateClassesList"]}),
  5108. smalltalk.TestRunner);
  5109. smalltalk.addMethod(
  5110. "_updateCategoriesList",
  5111. smalltalk.method({
  5112. selector: "updateCategoriesList",
  5113. fn: function () {
  5114. var self=this;
  5115. return smalltalk.withContext(function($ctx1) {
  5116. var $1,$2,$3,$4,$5;
  5117. _st(self["@packagesList"])._contents_((function(html){
  5118. return smalltalk.withContext(function($ctx2) {
  5119. $1=_st(html)._li();
  5120. _st($1)._class_("all");
  5121. _st($1)._with_("All");
  5122. $2=_st($1)._onClick_((function(){
  5123. return smalltalk.withContext(function($ctx3) {
  5124. return _st(self)._selectAllCategories();
  5125. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  5126. $2;
  5127. return _st(_st(self)._packages())._do_((function(each){
  5128. var li;
  5129. return smalltalk.withContext(function($ctx3) {
  5130. li=_st(html)._li();
  5131. li;
  5132. $3=_st(_st(self)._selectedCategories())._includes_(each);
  5133. if(smalltalk.assert($3)){
  5134. _st(li)._class_("selected");
  5135. };
  5136. $4=li;
  5137. _st($4)._with_(each);
  5138. $5=_st($4)._onClick_((function(){
  5139. return smalltalk.withContext(function($ctx4) {
  5140. return _st(self)._toggleCategory_(each);
  5141. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  5142. return $5;
  5143. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  5144. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  5145. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.TestRunner)});},
  5146. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:", "packages"]}),
  5147. smalltalk.TestRunner);
  5148. smalltalk.addMethod(
  5149. "_updateClassesList",
  5150. smalltalk.method({
  5151. selector: "updateClassesList",
  5152. fn: function () {
  5153. var self=this;
  5154. return smalltalk.withContext(function($ctx1) {
  5155. var $1,$2,$3,$4,$5,$6;
  5156. _st(self["@classesList"])._contents_((function(html){
  5157. return smalltalk.withContext(function($ctx2) {
  5158. $1=_st(_st(self)._selectedCategories())._isEmpty();
  5159. if(! smalltalk.assert($1)){
  5160. $2=_st(html)._li();
  5161. _st($2)._class_("all");
  5162. _st($2)._with_("All");
  5163. $3=_st($2)._onClick_((function(){
  5164. return smalltalk.withContext(function($ctx3) {
  5165. return _st(self)._selectAllClasses();
  5166. }, function($ctx3) {$ctx3.fillBlock({},$ctx1)})}));
  5167. $3;
  5168. };
  5169. return _st(_st(self)._classes())._do_((function(each){
  5170. var li;
  5171. return smalltalk.withContext(function($ctx3) {
  5172. li=_st(html)._li();
  5173. li;
  5174. $4=_st(_st(self)._selectedClasses())._includes_(each);
  5175. if(smalltalk.assert($4)){
  5176. _st(li)._class_("selected");
  5177. };
  5178. $5=li;
  5179. _st($5)._with_(_st(each)._name());
  5180. $6=_st($5)._onClick_((function(){
  5181. return smalltalk.withContext(function($ctx4) {
  5182. return _st(self)._toggleClass_(each);
  5183. }, function($ctx4) {$ctx4.fillBlock({},$ctx1)})}));
  5184. return $6;
  5185. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx1)})}));
  5186. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  5187. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.TestRunner)});},
  5188. messageSends: ["contents:", "ifFalse:", "class:", "li", "with:", "onClick:", "selectAllClasses", "isEmpty", "selectedCategories", "do:", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:", "classes"]}),
  5189. smalltalk.TestRunner);
  5190. smalltalk.addMethod(
  5191. "_updateMethodsList",
  5192. smalltalk.method({
  5193. selector: "updateMethodsList",
  5194. fn: function () {
  5195. var self=this;
  5196. return smalltalk.withContext(function($ctx1) {
  5197. _st(self["@methodsList"])._contents_((function(html){
  5198. return smalltalk.withContext(function($ctx2) {
  5199. _st(self)._renderErrorsOn_(html);
  5200. return _st(self)._renderFailuresOn_(html);
  5201. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  5202. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.TestRunner)});},
  5203. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"]}),
  5204. smalltalk.TestRunner);
  5205. smalltalk.addMethod(
  5206. "_updateStatusDiv",
  5207. smalltalk.method({
  5208. selector: "updateStatusDiv",
  5209. fn: function () {
  5210. var self=this;
  5211. return smalltalk.withContext(function($ctx1) {
  5212. _st(self["@statusDiv"])._class_(_st("sunit status ").__comma(_st(self["@result"])._status()));
  5213. _st(self["@statusDiv"])._contents_((function(html){
  5214. return smalltalk.withContext(function($ctx2) {
  5215. return _st(_st(html)._span())._with_(_st(self)._statusInfo());
  5216. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1)})}));
  5217. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},smalltalk.TestRunner)});},
  5218. messageSends: ["class:", ",", "status", "contents:", "with:", "statusInfo", "span"]}),
  5219. smalltalk.TestRunner);
  5220. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  5221. smalltalk.addMethod(
  5222. "_clearWorkspace",
  5223. smalltalk.method({
  5224. selector: "clearWorkspace",
  5225. fn: function () {
  5226. var self=this;
  5227. return smalltalk.withContext(function($ctx1) {
  5228. _st(self["@sourceArea"])._clear();
  5229. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},smalltalk.Workspace)});},
  5230. messageSends: ["clear"]}),
  5231. smalltalk.Workspace);
  5232. smalltalk.addMethod(
  5233. "_doIt",
  5234. smalltalk.method({
  5235. selector: "doIt",
  5236. fn: function () {
  5237. var self=this;
  5238. return smalltalk.withContext(function($ctx1) {
  5239. _st(self["@sourceArea"])._doIt();
  5240. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},smalltalk.Workspace)});},
  5241. messageSends: ["doIt"]}),
  5242. smalltalk.Workspace);
  5243. smalltalk.addMethod(
  5244. "_fileIn",
  5245. smalltalk.method({
  5246. selector: "fileIn",
  5247. fn: function () {
  5248. var self=this;
  5249. return smalltalk.withContext(function($ctx1) {
  5250. _st(self["@sourceArea"])._fileIn();
  5251. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.Workspace)});},
  5252. messageSends: ["fileIn"]}),
  5253. smalltalk.Workspace);
  5254. smalltalk.addMethod(
  5255. "_inspectIt",
  5256. smalltalk.method({
  5257. selector: "inspectIt",
  5258. fn: function () {
  5259. var self=this;
  5260. return smalltalk.withContext(function($ctx1) {
  5261. _st(self["@sourceArea"])._inspectIt();
  5262. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.Workspace)});},
  5263. messageSends: ["inspectIt"]}),
  5264. smalltalk.Workspace);
  5265. smalltalk.addMethod(
  5266. "_label",
  5267. smalltalk.method({
  5268. selector: "label",
  5269. fn: function () {
  5270. var self=this;
  5271. return smalltalk.withContext(function($ctx1) {
  5272. return "Workspace";
  5273. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Workspace)});},
  5274. messageSends: []}),
  5275. smalltalk.Workspace);
  5276. smalltalk.addMethod(
  5277. "_printIt",
  5278. smalltalk.method({
  5279. selector: "printIt",
  5280. fn: function () {
  5281. var self=this;
  5282. return smalltalk.withContext(function($ctx1) {
  5283. _st(self["@sourceArea"])._printIt();
  5284. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.Workspace)});},
  5285. messageSends: ["printIt"]}),
  5286. smalltalk.Workspace);
  5287. smalltalk.addMethod(
  5288. "_renderBoxOn_",
  5289. smalltalk.method({
  5290. selector: "renderBoxOn:",
  5291. fn: function (html) {
  5292. var self=this;
  5293. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  5294. return smalltalk.withContext(function($ctx1) {
  5295. self["@sourceArea"]=_st($SourceArea())._new();
  5296. _st(self["@sourceArea"])._renderOn_(html);
  5297. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Workspace)});},
  5298. messageSends: ["new", "renderOn:"]}),
  5299. smalltalk.Workspace);
  5300. smalltalk.addMethod(
  5301. "_renderButtonsOn_",
  5302. smalltalk.method({
  5303. selector: "renderButtonsOn:",
  5304. fn: function (html) {
  5305. var self=this;
  5306. return smalltalk.withContext(function($ctx1) {
  5307. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  5308. $1=_st(html)._button();
  5309. _st($1)._with_("DoIt");
  5310. _st($1)._title_("ctrl+d");
  5311. $2=_st($1)._onClick_((function(){
  5312. return smalltalk.withContext(function($ctx2) {
  5313. return _st(self)._doIt();
  5314. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  5315. $3=_st(html)._button();
  5316. _st($3)._with_("PrintIt");
  5317. _st($3)._title_("ctrl+p");
  5318. $4=_st($3)._onClick_((function(){
  5319. return smalltalk.withContext(function($ctx2) {
  5320. return _st(self)._printIt();
  5321. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  5322. $5=_st(html)._button();
  5323. _st($5)._with_("InspectIt");
  5324. _st($5)._title_("ctrl+i");
  5325. $6=_st($5)._onClick_((function(){
  5326. return smalltalk.withContext(function($ctx2) {
  5327. return _st(self)._inspectIt();
  5328. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  5329. $7=_st(html)._button();
  5330. _st($7)._with_("FileIn");
  5331. _st($7)._title_("ctrl+f");
  5332. $8=_st($7)._onClick_((function(){
  5333. return smalltalk.withContext(function($ctx2) {
  5334. return _st(self)._fileIn();
  5335. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  5336. $9=_st(html)._button();
  5337. _st($9)._with_("Clear workspace");
  5338. $10=_st($9)._onClick_((function(){
  5339. return smalltalk.withContext(function($ctx2) {
  5340. return _st(self)._clearWorkspace();
  5341. }, function($ctx2) {$ctx2.fillBlock({},$ctx1)})}));
  5342. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Workspace)});},
  5343. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"]}),
  5344. smalltalk.Workspace);
  5345. smalltalk.addMethod(
  5346. "_show",
  5347. smalltalk.method({
  5348. selector: "show",
  5349. fn: function () {
  5350. var self=this;
  5351. return smalltalk.withContext(function($ctx1) {
  5352. smalltalk.TabWidget.fn.prototype._show.apply(_st(self), []);
  5353. _st(self["@sourceArea"])._focus();
  5354. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.Workspace)});},
  5355. messageSends: ["show", "focus"]}),
  5356. smalltalk.Workspace);
  5357. smalltalk.addMethod(
  5358. "_inspect",
  5359. smalltalk.method({
  5360. selector: "inspect",
  5361. fn: function () {
  5362. var self=this;
  5363. function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  5364. return smalltalk.withContext(function($ctx1) {
  5365. var $1,$2;
  5366. $1=_st($Inspector())._new();
  5367. _st($1)._inspect_(self);
  5368. $2=_st($1)._open();
  5369. return self}, function($ctx1) {$ctx1.fill(self,"inspect",{},smalltalk.Object)});},
  5370. messageSends: ["inspect:", "new", "open"]}),
  5371. smalltalk.Object);
  5372. smalltalk.addMethod(
  5373. "_inspectOn_",
  5374. smalltalk.method({
  5375. selector: "inspectOn:",
  5376. fn: function (anInspector) {
  5377. var self=this;
  5378. var variables;
  5379. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  5380. return smalltalk.withContext(function($ctx1) {
  5381. var $1,$2;
  5382. variables=_st($Dictionary())._new();
  5383. _st(variables)._at_put_("#self",self);
  5384. _st(_st(_st(self)._class())._allInstanceVariableNames())._do_((function(each){
  5385. return smalltalk.withContext(function($ctx2) {
  5386. return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
  5387. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  5388. $1=anInspector;
  5389. _st($1)._setLabel_(_st(self)._printString());
  5390. $2=_st($1)._setVariables_(variables);
  5391. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Object)});},
  5392. messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
  5393. smalltalk.Object);
  5394. smalltalk.addMethod(
  5395. "_inspectOn_",
  5396. smalltalk.method({
  5397. selector: "inspectOn:",
  5398. fn: function (anInspector) {
  5399. var self=this;
  5400. var variables;
  5401. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  5402. return smalltalk.withContext(function($ctx1) {
  5403. var $1,$2;
  5404. variables=_st($Dictionary())._new();
  5405. _st(variables)._at_put_("#self",self);
  5406. _st(self)._withIndexDo_((function(each,i){
  5407. return smalltalk.withContext(function($ctx2) {
  5408. return _st(variables)._at_put_(i,each);
  5409. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  5410. $1=anInspector;
  5411. _st($1)._setLabel_(_st(self)._printString());
  5412. $2=_st($1)._setVariables_(variables);
  5413. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Collection)});},
  5414. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]}),
  5415. smalltalk.Collection);
  5416. smalltalk.addMethod(
  5417. "_inspectOn_",
  5418. smalltalk.method({
  5419. selector: "inspectOn:",
  5420. fn: function (anInspector) {
  5421. var self=this;
  5422. var variables;
  5423. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  5424. return smalltalk.withContext(function($ctx1) {
  5425. var $1,$2;
  5426. variables=_st($Dictionary())._new();
  5427. _st(variables)._at_put_("#self",self);
  5428. _st(variables)._at_put_("#keys",_st(self)._keys());
  5429. _st(self)._keysAndValuesDo_((function(key,value){
  5430. return smalltalk.withContext(function($ctx2) {
  5431. return _st(variables)._at_put_(key,value);
  5432. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1)})}));
  5433. $1=anInspector;
  5434. _st($1)._setLabel_(_st(self)._printString());
  5435. $2=_st($1)._setVariables_(variables);
  5436. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.HashedCollection)});},
  5437. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"]}),
  5438. smalltalk.HashedCollection);
  5439. smalltalk.addMethod(
  5440. "_inspectOn_",
  5441. smalltalk.method({
  5442. selector: "inspectOn:",
  5443. fn: function (anInspector) {
  5444. var self=this;
  5445. var label;
  5446. return smalltalk.withContext(function($ctx1) {
  5447. var $1;
  5448. smalltalk.CharacterArray.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  5449. $1=_st(_st(_st(self)._printString())._size()).__gt((30));
  5450. if(smalltalk.assert($1)){
  5451. label=_st(_st(_st(self)._printString())._copyFrom_to_((1),(30))).__comma("...'");
  5452. label;
  5453. } else {
  5454. label=_st(self)._printString();
  5455. label;
  5456. };
  5457. _st(anInspector)._setLabel_(label);
  5458. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},smalltalk.String)});},
  5459. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ",", "copyFrom:to:", "printString", ">", "size", "setLabel:"]}),
  5460. smalltalk.String);
  5461. smalltalk.addMethod(
  5462. "_inspectOn_",
  5463. smalltalk.method({
  5464. selector: "inspectOn:",
  5465. fn: function (anInspector) {
  5466. var self=this;
  5467. var variables;
  5468. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  5469. return smalltalk.withContext(function($ctx1) {
  5470. var $1,$2;
  5471. variables=_st($Dictionary())._new();
  5472. _st(variables)._at_put_("#self",self);
  5473. _st(self["@elements"])._withIndexDo_((function(each,i){
  5474. return smalltalk.withContext(function($ctx2) {
  5475. return _st(variables)._at_put_(i,each);
  5476. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1)})}));
  5477. $1=anInspector;
  5478. _st($1)._setLabel_(_st(self)._printString());
  5479. $2=_st($1)._setVariables_(variables);
  5480. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Set)});},
  5481. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"]}),
  5482. smalltalk.Set);
  5483. smalltalk.addMethod(
  5484. "_inspectOn_",
  5485. smalltalk.method({
  5486. selector: "inspectOn:",
  5487. fn: function (anInspector) {
  5488. var self=this;
  5489. var variables;
  5490. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  5491. return smalltalk.withContext(function($ctx1) {
  5492. var $1,$2;
  5493. variables=_st($Dictionary())._new();
  5494. _st(variables)._at_put_("#self",self);
  5495. _st(variables)._at_put_("#year",_st(self)._year());
  5496. _st(variables)._at_put_("#month",_st(self)._month());
  5497. _st(variables)._at_put_("#day",_st(self)._day());
  5498. _st(variables)._at_put_("#hours",_st(self)._hours());
  5499. _st(variables)._at_put_("#minutes",_st(self)._minutes());
  5500. _st(variables)._at_put_("#seconds",_st(self)._seconds());
  5501. _st(variables)._at_put_("#milliseconds",_st(self)._milliseconds());
  5502. $1=anInspector;
  5503. _st($1)._setLabel_(_st(self)._printString());
  5504. $2=_st($1)._setVariables_(variables);
  5505. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Date)});},
  5506. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"]}),
  5507. smalltalk.Date);
  5508. smalltalk.addMethod(
  5509. "_inspectOn_",
  5510. smalltalk.method({
  5511. selector: "inspectOn:",
  5512. fn: function (anInspector) {
  5513. var self=this;
  5514. var variables;
  5515. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  5516. return smalltalk.withContext(function($ctx1) {
  5517. var $1,$2;
  5518. variables=_st($Dictionary())._new();
  5519. _st(variables)._at_put_("#self",self);
  5520. _st(variables)._at_put_("#home",_st(self)._home());
  5521. _st(variables)._at_put_("#receiver",_st(self)._receiver());
  5522. _st(variables)._at_put_("#selector",_st(self)._selector());
  5523. _st(variables)._at_put_("#temps",_st(self)._temps());
  5524. _st(_st(_st(self)._class())._instanceVariableNames())._do_((function(each){
  5525. return smalltalk.withContext(function($ctx2) {
  5526. return _st(variables)._at_put_(each,_st(self)._instVarAt_(each));
  5527. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1)})}));
  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.MethodContext)});},
  5532. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instVarAt:", "instanceVariableNames", "class", "setLabel:", "printString", "setVariables:"]}),
  5533. smalltalk.MethodContext);