IDE.js 268 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Canvas", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('IDE');
  3. smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('ClassesList', globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "browser",
  8. protocol: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. var $1;
  12. $1=self["@browser"];
  13. return $1;
  14. },
  15. args: [],
  16. source: "browser\x0a\x09^ browser",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. globals.ClassesList);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "browser:",
  24. protocol: 'accessing',
  25. fn: function (aBrowser){
  26. var self=this;
  27. self["@browser"]=aBrowser;
  28. return self},
  29. args: ["aBrowser"],
  30. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. globals.ClassesList);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "category",
  38. protocol: 'accessing',
  39. fn: function (){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. var $1;
  43. $1=_st(self._browser())._selectedPackage();
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"category",{},globals.ClassesList)})},
  46. args: [],
  47. source: "category\x0a\x09^ self browser selectedPackage",
  48. messageSends: ["selectedPackage", "browser"],
  49. referencedClasses: []
  50. }),
  51. globals.ClassesList);
  52. smalltalk.addMethod(
  53. smalltalk.method({
  54. selector: "getNodes",
  55. protocol: 'accessing',
  56. fn: function (){
  57. var self=this;
  58. var classes,children,others;
  59. function $ClassesListNode(){return globals.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  60. return smalltalk.withContext(function($ctx1) {
  61. var $1,$2,$3;
  62. $1=self._browser();
  63. $ctx1.sendIdx["browser"]=1;
  64. classes=_st($1)._classes();
  65. children=[];
  66. others=[];
  67. _st(classes)._do_((function(each){
  68. return smalltalk.withContext(function($ctx2) {
  69. $2=_st(classes)._includes_(_st(each)._superclass());
  70. if(smalltalk.assert($2)){
  71. return _st(others)._add_(each);
  72. } else {
  73. return _st(children)._add_(each);
  74. $ctx2.sendIdx["add:"]=1;
  75. };
  76. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  77. $3=_st(children)._collect_((function(each){
  78. return smalltalk.withContext(function($ctx2) {
  79. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,(0));
  80. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  81. return $3;
  82. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},globals.ClassesList)})},
  83. args: [],
  84. source: "getNodes\x0a\x09| classes children others |\x0a\x09classes := self browser classes.\x0a\x09children := #().\x0a\x09others := #().\x0a\x09classes do: [ :each |\x0a\x09\x09(classes includes: each superclass)\x0a\x09\x09\x09ifFalse: [ children add: each ]\x0a\x09\x09\x09ifTrue: [ others add: each ]].\x0a\x09^ children collect: [ :each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: 0 ]",
  85. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"],
  86. referencedClasses: ["ClassesListNode"]
  87. }),
  88. globals.ClassesList);
  89. smalltalk.addMethod(
  90. smalltalk.method({
  91. selector: "nodes",
  92. protocol: 'accessing',
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) {
  96. var $1,$2;
  97. $1=self["@nodes"];
  98. if(($receiver = $1) == nil || $receiver == null){
  99. self["@nodes"]=self._getNodes();
  100. self["@nodes"];
  101. } else {
  102. $1;
  103. };
  104. $2=self["@nodes"];
  105. return $2;
  106. }, function($ctx1) {$ctx1.fill(self,"nodes",{},globals.ClassesList)})},
  107. args: [],
  108. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  109. messageSends: ["ifNil:", "getNodes"],
  110. referencedClasses: []
  111. }),
  112. globals.ClassesList);
  113. smalltalk.addMethod(
  114. smalltalk.method({
  115. selector: "renderOn:",
  116. protocol: 'rendering',
  117. fn: function (html){
  118. var self=this;
  119. return smalltalk.withContext(function($ctx1) {
  120. var $1,$2;
  121. $1=_st(html)._ul();
  122. _st($1)._class_("amber_column browser classes");
  123. $2=_st($1)._yourself();
  124. self["@ul"]=$2;
  125. self._updateNodes();
  126. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ClassesList)})},
  127. args: ["html"],
  128. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  129. messageSends: ["class:", "ul", "yourself", "updateNodes"],
  130. referencedClasses: []
  131. }),
  132. globals.ClassesList);
  133. smalltalk.addMethod(
  134. smalltalk.method({
  135. selector: "resetNodes",
  136. protocol: 'accessing',
  137. fn: function (){
  138. var self=this;
  139. self["@nodes"]=nil;
  140. return self},
  141. args: [],
  142. source: "resetNodes\x0a\x09nodes := nil",
  143. messageSends: [],
  144. referencedClasses: []
  145. }),
  146. globals.ClassesList);
  147. smalltalk.addMethod(
  148. smalltalk.method({
  149. selector: "updateNodes",
  150. protocol: 'rendering',
  151. fn: function (){
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) {
  154. _st(self["@ul"])._contents_((function(html){
  155. return smalltalk.withContext(function($ctx2) {
  156. return _st(self._nodes())._do_((function(each){
  157. return smalltalk.withContext(function($ctx3) {
  158. return _st(each)._renderOn_(html);
  159. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  160. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  161. return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{},globals.ClassesList)})},
  162. args: [],
  163. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  164. messageSends: ["contents:", "do:", "nodes", "renderOn:"],
  165. referencedClasses: []
  166. }),
  167. globals.ClassesList);
  168. smalltalk.addMethod(
  169. smalltalk.method({
  170. selector: "on:",
  171. protocol: 'instance creation',
  172. fn: function (aBrowser){
  173. var self=this;
  174. return smalltalk.withContext(function($ctx1) {
  175. var $2,$3,$1;
  176. $2=self._new();
  177. _st($2)._browser_(aBrowser);
  178. $3=_st($2)._yourself();
  179. $1=$3;
  180. return $1;
  181. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},globals.ClassesList.klass)})},
  182. args: ["aBrowser"],
  183. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  184. messageSends: ["browser:", "new", "yourself"],
  185. referencedClasses: []
  186. }),
  187. globals.ClassesList.klass);
  188. smalltalk.addClass('ClassesListNode', globals.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  189. smalltalk.addMethod(
  190. smalltalk.method({
  191. selector: "browser",
  192. protocol: 'accessing',
  193. fn: function (){
  194. var self=this;
  195. var $1;
  196. $1=self["@browser"];
  197. return $1;
  198. },
  199. args: [],
  200. source: "browser\x0a\x09^ browser",
  201. messageSends: [],
  202. referencedClasses: []
  203. }),
  204. globals.ClassesListNode);
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "browser:",
  208. protocol: 'accessing',
  209. fn: function (aBrowser){
  210. var self=this;
  211. self["@browser"]=aBrowser;
  212. return self},
  213. args: ["aBrowser"],
  214. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  215. messageSends: [],
  216. referencedClasses: []
  217. }),
  218. globals.ClassesListNode);
  219. smalltalk.addMethod(
  220. smalltalk.method({
  221. selector: "getNodesFrom:",
  222. protocol: 'accessing',
  223. fn: function (aCollection){
  224. var self=this;
  225. var children,others;
  226. function $ClassesListNode(){return globals.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  227. return smalltalk.withContext(function($ctx1) {
  228. var $1;
  229. children=[];
  230. others=[];
  231. _st(aCollection)._do_((function(each){
  232. return smalltalk.withContext(function($ctx2) {
  233. $1=_st(_st(each)._superclass()).__eq(self._theClass());
  234. if(smalltalk.assert($1)){
  235. return _st(children)._add_(each);
  236. $ctx2.sendIdx["add:"]=1;
  237. } else {
  238. return _st(others)._add_(each);
  239. };
  240. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  241. self["@nodes"]=_st(children)._collect_((function(each){
  242. return smalltalk.withContext(function($ctx2) {
  243. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,_st(self._level()).__plus((1)));
  244. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  245. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},globals.ClassesListNode)})},
  246. args: ["aCollection"],
  247. source: "getNodesFrom: aCollection\x0a\x09| children others |\x0a\x09children := #().\x0a\x09others := #().\x0a\x09aCollection do: [ :each |\x0a\x09\x09(each superclass = self theClass)\x0a\x09\x09\x09ifTrue: [ children add: each ]\x0a\x09\x09\x09ifFalse: [ others add: each ]].\x0a\x09nodes:= children collect: [ :each |\x0a\x09\x09ClassesListNode on: each browser: self browser classes: others level: self level + 1 ]",
  248. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
  249. referencedClasses: ["ClassesListNode"]
  250. }),
  251. globals.ClassesListNode);
  252. smalltalk.addMethod(
  253. smalltalk.method({
  254. selector: "label",
  255. protocol: 'accessing',
  256. fn: function (){
  257. var self=this;
  258. var str;
  259. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  260. return smalltalk.withContext(function($ctx1) {
  261. var $1;
  262. str=_st(_st($String())._new())._writeStream();
  263. _st(self._level())._timesRepeat_((function(){
  264. return smalltalk.withContext(function($ctx2) {
  265. return _st(str)._nextPutAll_("    ");
  266. $ctx2.sendIdx["nextPutAll:"]=1;
  267. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  268. _st(str)._nextPutAll_(_st(self._theClass())._name());
  269. $1=_st(str)._contents();
  270. return $1;
  271. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},globals.ClassesListNode)})},
  272. args: [],
  273. source: "label\x0a\x09| str |\x0a\x09str := String new writeStream.\x0a\x09self level timesRepeat: [\x0a\x09\x09str nextPutAll: '    ' ].\x0a\x09str nextPutAll: self theClass name.\x0a\x09^ str contents",
  274. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"],
  275. referencedClasses: ["String"]
  276. }),
  277. globals.ClassesListNode);
  278. smalltalk.addMethod(
  279. smalltalk.method({
  280. selector: "level",
  281. protocol: 'accessing',
  282. fn: function (){
  283. var self=this;
  284. var $1;
  285. $1=self["@level"];
  286. return $1;
  287. },
  288. args: [],
  289. source: "level\x0a\x09^ level",
  290. messageSends: [],
  291. referencedClasses: []
  292. }),
  293. globals.ClassesListNode);
  294. smalltalk.addMethod(
  295. smalltalk.method({
  296. selector: "level:",
  297. protocol: 'accessing',
  298. fn: function (anInteger){
  299. var self=this;
  300. self["@level"]=anInteger;
  301. return self},
  302. args: ["anInteger"],
  303. source: "level: anInteger\x0a\x09level := anInteger",
  304. messageSends: [],
  305. referencedClasses: []
  306. }),
  307. globals.ClassesListNode);
  308. smalltalk.addMethod(
  309. smalltalk.method({
  310. selector: "nodes",
  311. protocol: 'accessing',
  312. fn: function (){
  313. var self=this;
  314. var $1;
  315. $1=self["@nodes"];
  316. return $1;
  317. },
  318. args: [],
  319. source: "nodes\x0a\x09^ nodes",
  320. messageSends: [],
  321. referencedClasses: []
  322. }),
  323. globals.ClassesListNode);
  324. smalltalk.addMethod(
  325. smalltalk.method({
  326. selector: "renderOn:",
  327. protocol: 'rendering',
  328. fn: function (html){
  329. var self=this;
  330. var li,cssClass;
  331. return smalltalk.withContext(function($ctx1) {
  332. var $1,$2,$4,$5,$3,$6;
  333. cssClass="";
  334. li=_st(_st(html)._li())._onClick_((function(){
  335. return smalltalk.withContext(function($ctx2) {
  336. $1=self._browser();
  337. $ctx2.sendIdx["browser"]=1;
  338. $2=self._theClass();
  339. $ctx2.sendIdx["theClass"]=1;
  340. return _st($1)._selectClass_($2);
  341. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  342. _st(_st(li)._asJQuery())._html_(self._label());
  343. $4=_st(self._browser())._selectedClass();
  344. $5=self._theClass();
  345. $ctx1.sendIdx["theClass"]=2;
  346. $3=_st($4).__eq($5);
  347. if(smalltalk.assert($3)){
  348. cssClass=_st(cssClass).__comma(" selected");
  349. $ctx1.sendIdx[","]=1;
  350. cssClass;
  351. };
  352. $6=_st(_st(self._theClass())._comment())._isEmpty();
  353. if(! smalltalk.assert($6)){
  354. cssClass=_st(cssClass).__comma(" commented");
  355. cssClass;
  356. };
  357. _st(li)._class_(cssClass);
  358. _st(self._nodes())._do_((function(each){
  359. return smalltalk.withContext(function($ctx2) {
  360. return _st(each)._renderOn_(html);
  361. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  362. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},globals.ClassesListNode)})},
  363. args: ["html"],
  364. source: "renderOn: html\x0a\x09| li cssClass |\x0a\x09cssClass := ''.\x0a\x09li := html li\x0a\x09\x09onClick: [ self browser selectClass: self theClass ].\x0a\x09li asJQuery html: self label.\x0a\x0a\x09self browser selectedClass = self theClass ifTrue: [\x0a\x09\x09cssClass := cssClass, ' selected' ].\x0a\x0a\x09self theClass comment isEmpty ifFalse: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [ :each |\x0a\x09\x09each renderOn: html ]",
  365. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"],
  366. referencedClasses: []
  367. }),
  368. globals.ClassesListNode);
  369. smalltalk.addMethod(
  370. smalltalk.method({
  371. selector: "theClass",
  372. protocol: 'accessing',
  373. fn: function (){
  374. var self=this;
  375. var $1;
  376. $1=self["@theClass"];
  377. return $1;
  378. },
  379. args: [],
  380. source: "theClass\x0a\x09^ theClass",
  381. messageSends: [],
  382. referencedClasses: []
  383. }),
  384. globals.ClassesListNode);
  385. smalltalk.addMethod(
  386. smalltalk.method({
  387. selector: "theClass:",
  388. protocol: 'accessing',
  389. fn: function (aClass){
  390. var self=this;
  391. self["@theClass"]=aClass;
  392. return self},
  393. args: ["aClass"],
  394. source: "theClass: aClass\x0a\x09theClass := aClass",
  395. messageSends: [],
  396. referencedClasses: []
  397. }),
  398. globals.ClassesListNode);
  399. smalltalk.addMethod(
  400. smalltalk.method({
  401. selector: "on:browser:classes:level:",
  402. protocol: 'instance creation',
  403. fn: function (aClass,aBrowser,aCollection,anInteger){
  404. var self=this;
  405. return smalltalk.withContext(function($ctx1) {
  406. var $2,$3,$1;
  407. $2=self._new();
  408. _st($2)._theClass_(aClass);
  409. _st($2)._browser_(aBrowser);
  410. _st($2)._level_(anInteger);
  411. _st($2)._getNodesFrom_(aCollection);
  412. $3=_st($2)._yourself();
  413. $1=$3;
  414. return $1;
  415. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},globals.ClassesListNode.klass)})},
  416. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  417. source: "on: aClass browser: aBrowser classes: aCollection level: anInteger\x0a\x09^ self new\x0a\x09\x09theClass: aClass;\x0a\x09\x09browser: aBrowser;\x0a\x09\x09level: anInteger;\x0a\x09\x09getNodesFrom: aCollection;\x0a\x09\x09yourself",
  418. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
  419. referencedClasses: []
  420. }),
  421. globals.ClassesListNode.klass);
  422. smalltalk.addClass('DebugErrorHandler', globals.Object, [], 'IDE');
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "handleError:",
  426. protocol: 'error handling',
  427. fn: function (anError){
  428. var self=this;
  429. function $Debugger(){return globals.Debugger||(typeof Debugger=="undefined"?nil:Debugger)}
  430. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  431. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  432. return smalltalk.withContext(function($ctx1) {
  433. var $1,$2;
  434. _st((function(){
  435. return smalltalk.withContext(function($ctx2) {
  436. $1=_st($Debugger())._new();
  437. $ctx2.sendIdx["new"]=1;
  438. _st($1)._error_(anError);
  439. $2=_st($1)._open();
  440. return $2;
  441. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  442. return smalltalk.withContext(function($ctx2) {
  443. return _st(_st($ErrorHandler())._new())._handleError_(error);
  444. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  445. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},globals.DebugErrorHandler)})},
  446. args: ["anError"],
  447. source: "handleError: anError\x0a\x09[ Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open ] on: Error do: [ :error |\x0a\x09\x09\x09ErrorHandler new handleError: error ]",
  448. messageSends: ["on:do:", "error:", "new", "open", "handleError:"],
  449. referencedClasses: ["Debugger", "Error", "ErrorHandler"]
  450. }),
  451. globals.DebugErrorHandler);
  452. smalltalk.addMethod(
  453. smalltalk.method({
  454. selector: "initialize",
  455. protocol: 'initialization',
  456. fn: function (){
  457. var self=this;
  458. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  459. return smalltalk.withContext(function($ctx1) {
  460. _st($ErrorHandler())._register_(self._new());
  461. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.DebugErrorHandler.klass)})},
  462. args: [],
  463. source: "initialize\x0a\x09ErrorHandler register: self new",
  464. messageSends: ["register:", "new"],
  465. referencedClasses: ["ErrorHandler"]
  466. }),
  467. globals.DebugErrorHandler.klass);
  468. smalltalk.addClass('SourceArea', globals.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  469. smalltalk.addMethod(
  470. smalltalk.method({
  471. selector: "clear",
  472. protocol: 'actions',
  473. fn: function (){
  474. var self=this;
  475. return smalltalk.withContext(function($ctx1) {
  476. self._val_("");
  477. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.SourceArea)})},
  478. args: [],
  479. source: "clear\x0a\x09self val: ''",
  480. messageSends: ["val:"],
  481. referencedClasses: []
  482. }),
  483. globals.SourceArea);
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "currentLine",
  487. protocol: 'accessing',
  488. fn: function (){
  489. var self=this;
  490. return smalltalk.withContext(function($ctx1) {
  491. var $1;
  492. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  493. return $1;
  494. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},globals.SourceArea)})},
  495. args: [],
  496. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  497. messageSends: ["getLine:", "line", "getCursor"],
  498. referencedClasses: []
  499. }),
  500. globals.SourceArea);
  501. smalltalk.addMethod(
  502. smalltalk.method({
  503. selector: "currentLineOrSelection",
  504. protocol: 'accessing',
  505. fn: function (){
  506. var self=this;
  507. return smalltalk.withContext(function($ctx1) {
  508. var $2,$1;
  509. $2=_st(self["@editor"])._somethingSelected();
  510. if(smalltalk.assert($2)){
  511. $1=self._selection();
  512. } else {
  513. $1=self._currentLine();
  514. };
  515. return $1;
  516. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},globals.SourceArea)})},
  517. args: [],
  518. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  519. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"],
  520. referencedClasses: []
  521. }),
  522. globals.SourceArea);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "doIt",
  526. protocol: 'actions',
  527. fn: function (){
  528. var self=this;
  529. var result;
  530. return smalltalk.withContext(function($ctx1) {
  531. var $1,$2;
  532. result=self._eval_(self._currentLineOrSelection());
  533. $1=self._onDoIt();
  534. $ctx1.sendIdx["onDoIt"]=1;
  535. if(($receiver = $1) == nil || $receiver == null){
  536. $1;
  537. } else {
  538. _st(self._onDoIt())._value();
  539. };
  540. $2=result;
  541. return $2;
  542. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},globals.SourceArea)})},
  543. args: [],
  544. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  545. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"],
  546. referencedClasses: []
  547. }),
  548. globals.SourceArea);
  549. smalltalk.addMethod(
  550. smalltalk.method({
  551. selector: "editor",
  552. protocol: 'accessing',
  553. fn: function (){
  554. var self=this;
  555. var $1;
  556. $1=self["@editor"];
  557. return $1;
  558. },
  559. args: [],
  560. source: "editor\x0a\x09^ editor",
  561. messageSends: [],
  562. referencedClasses: []
  563. }),
  564. globals.SourceArea);
  565. smalltalk.addMethod(
  566. smalltalk.method({
  567. selector: "eval:",
  568. protocol: 'actions',
  569. fn: function (aString){
  570. var self=this;
  571. var compiler;
  572. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  573. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  574. return smalltalk.withContext(function($ctx1) {
  575. var $1,$2;
  576. var $early={};
  577. try {
  578. compiler=_st($Compiler())._new();
  579. _st((function(){
  580. return smalltalk.withContext(function($ctx2) {
  581. return _st(compiler)._parseExpression_(aString);
  582. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
  583. return smalltalk.withContext(function($ctx2) {
  584. $1=self._alert_(_st(ex)._messageText());
  585. throw $early=[$1];
  586. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  587. $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
  588. return $2;
  589. }
  590. catch(e) {if(e===$early)return e[0]; throw e}
  591. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},globals.SourceArea)})},
  592. args: ["aString"],
  593. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ self alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: self receiver",
  594. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
  595. referencedClasses: ["Compiler", "Error"]
  596. }),
  597. globals.SourceArea);
  598. smalltalk.addMethod(
  599. smalltalk.method({
  600. selector: "fileIn",
  601. protocol: 'actions',
  602. fn: function (){
  603. var self=this;
  604. function $Importer(){return globals.Importer||(typeof Importer=="undefined"?nil:Importer)}
  605. return smalltalk.withContext(function($ctx1) {
  606. _st(_st($Importer())._new())._import_(_st(self._currentLineOrSelection())._readStream());
  607. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.SourceArea)})},
  608. args: [],
  609. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  610. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"],
  611. referencedClasses: ["Importer"]
  612. }),
  613. globals.SourceArea);
  614. smalltalk.addMethod(
  615. smalltalk.method({
  616. selector: "focus",
  617. protocol: 'actions',
  618. fn: function (){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) {
  621. _st(self._editor())._focus();
  622. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},globals.SourceArea)})},
  623. args: [],
  624. source: "focus\x0a\x09self editor focus.",
  625. messageSends: ["focus", "editor"],
  626. referencedClasses: []
  627. }),
  628. globals.SourceArea);
  629. smalltalk.addMethod(
  630. smalltalk.method({
  631. selector: "handleKeyDown:",
  632. protocol: 'actions',
  633. fn: function (anEvent){
  634. var self=this;
  635. return smalltalk.withContext(function($ctx1) {
  636. if(anEvent.ctrlKey) {
  637. if(anEvent.keyCode === 80) { //ctrl+p
  638. self._printIt();
  639. anEvent.preventDefault();
  640. return false;
  641. }
  642. if(anEvent.keyCode === 68) { //ctrl+d
  643. self._doIt();
  644. anEvent.preventDefault();
  645. return false;
  646. }
  647. if(anEvent.keyCode === 73) { //ctrl+i
  648. self._inspectIt();
  649. anEvent.preventDefault();
  650. return false;
  651. }
  652. };
  653. return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},globals.SourceArea)})},
  654. args: ["anEvent"],
  655. source: "handleKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  656. messageSends: [],
  657. referencedClasses: []
  658. }),
  659. globals.SourceArea);
  660. smalltalk.addMethod(
  661. smalltalk.method({
  662. selector: "inspectIt",
  663. protocol: 'actions',
  664. fn: function (){
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) {
  667. _st(self._doIt())._inspect();
  668. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.SourceArea)})},
  669. args: [],
  670. source: "inspectIt\x0a\x09self doIt inspect",
  671. messageSends: ["inspect", "doIt"],
  672. referencedClasses: []
  673. }),
  674. globals.SourceArea);
  675. smalltalk.addMethod(
  676. smalltalk.method({
  677. selector: "onDoIt",
  678. protocol: 'accessing',
  679. fn: function (){
  680. var self=this;
  681. var $1;
  682. $1=self["@onDoIt"];
  683. return $1;
  684. },
  685. args: [],
  686. source: "onDoIt\x0a\x09^ onDoIt",
  687. messageSends: [],
  688. referencedClasses: []
  689. }),
  690. globals.SourceArea);
  691. smalltalk.addMethod(
  692. smalltalk.method({
  693. selector: "onDoIt:",
  694. protocol: 'accessing',
  695. fn: function (aBlock){
  696. var self=this;
  697. self["@onDoIt"]=aBlock;
  698. return self},
  699. args: ["aBlock"],
  700. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  701. messageSends: [],
  702. referencedClasses: []
  703. }),
  704. globals.SourceArea);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "onKeyDown:",
  708. protocol: 'events',
  709. fn: function (aBlock){
  710. var self=this;
  711. return smalltalk.withContext(function($ctx1) {
  712. _st(self["@div"])._onKeyDown_(aBlock);
  713. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},globals.SourceArea)})},
  714. args: ["aBlock"],
  715. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  716. messageSends: ["onKeyDown:"],
  717. referencedClasses: []
  718. }),
  719. globals.SourceArea);
  720. smalltalk.addMethod(
  721. smalltalk.method({
  722. selector: "onKeyUp:",
  723. protocol: 'events',
  724. fn: function (aBlock){
  725. var self=this;
  726. return smalltalk.withContext(function($ctx1) {
  727. _st(self["@div"])._onKeyUp_(aBlock);
  728. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},globals.SourceArea)})},
  729. args: ["aBlock"],
  730. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  731. messageSends: ["onKeyUp:"],
  732. referencedClasses: []
  733. }),
  734. globals.SourceArea);
  735. smalltalk.addMethod(
  736. smalltalk.method({
  737. selector: "print:",
  738. protocol: 'actions',
  739. fn: function (aString){
  740. var self=this;
  741. var start,stop,currentLine;
  742. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  743. return smalltalk.withContext(function($ctx1) {
  744. var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
  745. $1=_st(self["@editor"])._getCursor_(false);
  746. $ctx1.sendIdx["getCursor:"]=1;
  747. currentLine=_st($1)._line();
  748. start=_st($HashedCollection())._new();
  749. $ctx1.sendIdx["new"]=1;
  750. _st(start)._at_put_("line",currentLine);
  751. $ctx1.sendIdx["at:put:"]=1;
  752. $2=start;
  753. $4=_st(self["@editor"])._getCursor_(false);
  754. $ctx1.sendIdx["getCursor:"]=2;
  755. $3=_st($4)._ch();
  756. _st($2)._at_put_("ch",$3);
  757. $ctx1.sendIdx["at:put:"]=2;
  758. $5=_st(self["@editor"])._getSelection();
  759. $ctx1.sendIdx["getSelection"]=1;
  760. _st($5)._ifEmpty_((function(){
  761. return smalltalk.withContext(function($ctx2) {
  762. $6=start;
  763. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  764. $ctx2.sendIdx["size"]=1;
  765. _st($6)._at_put_("ch",$7);
  766. $ctx2.sendIdx["at:put:"]=3;
  767. $8=self["@editor"];
  768. $10="line".__minus_gt(currentLine);
  769. $ctx2.sendIdx["->"]=1;
  770. $9=globals.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
  771. return _st($8)._setSelection_end_($9,start);
  772. $ctx2.sendIdx["setSelection:end:"]=1;
  773. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  774. stop=_st($HashedCollection())._new();
  775. _st(stop)._at_put_("line",currentLine);
  776. $ctx1.sendIdx["at:put:"]=4;
  777. $11=stop;
  778. $12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
  779. $ctx1.sendIdx["+"]=1;
  780. _st($11)._at_put_("ch",$12);
  781. $13=self["@editor"];
  782. $15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  783. $ctx1.sendIdx[","]=2;
  784. $14=_st($15).__comma(" ");
  785. $ctx1.sendIdx[","]=1;
  786. _st($13)._replaceSelection_($14);
  787. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  788. _st(self["@editor"])._setSelection_end_(stop,start);
  789. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},globals.SourceArea)})},
  790. args: ["aString"],
  791. source: "print: aString\x0a\x09| start stop currentLine |\x0a\x09currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09(editor getSelection) ifEmpty: [\x0a\x09\x09\x22select current line if selection is empty\x22\x0a\x09\x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a\x09\x09editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a\x09].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  792. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "->", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  793. referencedClasses: ["HashedCollection"]
  794. }),
  795. globals.SourceArea);
  796. smalltalk.addMethod(
  797. smalltalk.method({
  798. selector: "printIt",
  799. protocol: 'actions',
  800. fn: function (){
  801. var self=this;
  802. return smalltalk.withContext(function($ctx1) {
  803. self._print_(_st(self._doIt())._printString());
  804. self._focus();
  805. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.SourceArea)})},
  806. args: [],
  807. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  808. messageSends: ["print:", "printString", "doIt", "focus"],
  809. referencedClasses: []
  810. }),
  811. globals.SourceArea);
  812. smalltalk.addMethod(
  813. smalltalk.method({
  814. selector: "receiver",
  815. protocol: 'accessing',
  816. fn: function (){
  817. var self=this;
  818. function $DoIt(){return globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  819. return smalltalk.withContext(function($ctx1) {
  820. var $2,$1;
  821. $2=self["@receiver"];
  822. if(($receiver = $2) == nil || $receiver == null){
  823. $1=_st($DoIt())._new();
  824. } else {
  825. $1=$2;
  826. };
  827. return $1;
  828. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.SourceArea)})},
  829. args: [],
  830. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  831. messageSends: ["ifNil:", "new"],
  832. referencedClasses: ["DoIt"]
  833. }),
  834. globals.SourceArea);
  835. smalltalk.addMethod(
  836. smalltalk.method({
  837. selector: "receiver:",
  838. protocol: 'accessing',
  839. fn: function (anObject){
  840. var self=this;
  841. self["@receiver"]=anObject;
  842. return self},
  843. args: ["anObject"],
  844. source: "receiver: anObject\x0a\x09receiver := anObject",
  845. messageSends: [],
  846. referencedClasses: []
  847. }),
  848. globals.SourceArea);
  849. smalltalk.addMethod(
  850. smalltalk.method({
  851. selector: "renderOn:",
  852. protocol: 'rendering',
  853. fn: function (html){
  854. var self=this;
  855. var textarea;
  856. return smalltalk.withContext(function($ctx1) {
  857. self["@div"]=_st(_st(html)._div())._class_("source");
  858. _st(self["@div"])._with_((function(){
  859. return smalltalk.withContext(function($ctx2) {
  860. textarea=_st(html)._textarea();
  861. return textarea;
  862. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  863. self._setEditorOn_(_st(textarea)._element());
  864. _st(self["@div"])._onKeyDown_((function(e){
  865. return smalltalk.withContext(function($ctx2) {
  866. return self._handleKeyDown_(e);
  867. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  868. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},globals.SourceArea)})},
  869. args: ["html"],
  870. source: "renderOn: html\x0a\x09| textarea |\x0a\x09div := html div class: 'source'.\x0a\x09div with: [ textarea := html textarea ].\x0a\x09self setEditorOn: textarea element.\x0a\x09div onKeyDown: [ :e | self handleKeyDown: e ]",
  871. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  872. referencedClasses: []
  873. }),
  874. globals.SourceArea);
  875. smalltalk.addMethod(
  876. smalltalk.method({
  877. selector: "selection",
  878. protocol: 'accessing',
  879. fn: function (){
  880. var self=this;
  881. return smalltalk.withContext(function($ctx1) {
  882. var $1;
  883. $1=_st(self["@editor"])._getSelection();
  884. return $1;
  885. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.SourceArea)})},
  886. args: [],
  887. source: "selection\x0a\x09^ editor getSelection",
  888. messageSends: ["getSelection"],
  889. referencedClasses: []
  890. }),
  891. globals.SourceArea);
  892. smalltalk.addMethod(
  893. smalltalk.method({
  894. selector: "setEditorOn:",
  895. protocol: 'accessing',
  896. fn: function (aTextarea){
  897. var self=this;
  898. return smalltalk.withContext(function($ctx1) {
  899. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  900. theme: 'default',
  901. mode: 'text/x-stsrc',
  902. lineNumbers: true,
  903. enterMode: 'flat',
  904. indentWithTabs: true,
  905. indentUnit: 4,
  906. matchBrackets: true,
  907. electricChars: false
  908. });
  909. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},globals.SourceArea)})},
  910. args: ["aTextarea"],
  911. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'default',\x0a\x09\x09mode: 'text/x-stsrc',\x0a\x09\x09lineNumbers: true,\x0a\x09\x09enterMode: 'flat',\x0a\x09\x09indentWithTabs: true,\x0a\x09\x09indentUnit: 4,\x0a\x09\x09matchBrackets: true,\x0a\x09\x09electricChars: false\x0a\x09})>",
  912. messageSends: [],
  913. referencedClasses: []
  914. }),
  915. globals.SourceArea);
  916. smalltalk.addMethod(
  917. smalltalk.method({
  918. selector: "val",
  919. protocol: 'accessing',
  920. fn: function (){
  921. var self=this;
  922. return smalltalk.withContext(function($ctx1) {
  923. var $1;
  924. $1=_st(self["@editor"])._getValue();
  925. return $1;
  926. }, function($ctx1) {$ctx1.fill(self,"val",{},globals.SourceArea)})},
  927. args: [],
  928. source: "val\x0a\x09^ editor getValue",
  929. messageSends: ["getValue"],
  930. referencedClasses: []
  931. }),
  932. globals.SourceArea);
  933. smalltalk.addMethod(
  934. smalltalk.method({
  935. selector: "val:",
  936. protocol: 'accessing',
  937. fn: function (aString){
  938. var self=this;
  939. return smalltalk.withContext(function($ctx1) {
  940. _st(self["@editor"])._setValue_(aString);
  941. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},globals.SourceArea)})},
  942. args: ["aString"],
  943. source: "val: aString\x0a\x09editor setValue: aString",
  944. messageSends: ["setValue:"],
  945. referencedClasses: []
  946. }),
  947. globals.SourceArea);
  948. smalltalk.addMethod(
  949. smalltalk.method({
  950. selector: "initialize",
  951. protocol: 'initialization',
  952. fn: function (){
  953. var self=this;
  954. return smalltalk.withContext(function($ctx1) {
  955. globals.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  956. self._setupCodeMirror();
  957. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.SourceArea.klass)})},
  958. args: [],
  959. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  960. messageSends: ["initialize", "setupCodeMirror"],
  961. referencedClasses: []
  962. }),
  963. globals.SourceArea.klass);
  964. smalltalk.addMethod(
  965. smalltalk.method({
  966. selector: "setupCodeMirror",
  967. protocol: 'initialization',
  968. fn: function (){
  969. var self=this;
  970. return smalltalk.withContext(function($ctx1) {
  971. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  972. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},globals.SourceArea.klass)})},
  973. args: [],
  974. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  975. messageSends: [],
  976. referencedClasses: []
  977. }),
  978. globals.SourceArea.klass);
  979. smalltalk.addClass('TabManager', globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  980. smalltalk.addMethod(
  981. smalltalk.method({
  982. selector: "addTab:",
  983. protocol: 'adding/Removing',
  984. fn: function (aWidget){
  985. var self=this;
  986. return smalltalk.withContext(function($ctx1) {
  987. _st(self._tabs())._add_(aWidget);
  988. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  989. _st(aWidget)._hide();
  990. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},globals.TabManager)})},
  991. args: ["aWidget"],
  992. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  993. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  994. referencedClasses: []
  995. }),
  996. globals.TabManager);
  997. smalltalk.addMethod(
  998. smalltalk.method({
  999. selector: "close",
  1000. protocol: 'actions',
  1001. fn: function (){
  1002. var self=this;
  1003. return smalltalk.withContext(function($ctx1) {
  1004. var $1,$2,$3;
  1005. $1=self["@opened"];
  1006. if(smalltalk.assert($1)){
  1007. $2="#amber"._asJQuery();
  1008. $ctx1.sendIdx["asJQuery"]=1;
  1009. _st($2)._hide();
  1010. $ctx1.sendIdx["hide"]=1;
  1011. $3=_st(self["@ul"])._asJQuery();
  1012. $ctx1.sendIdx["asJQuery"]=2;
  1013. _st($3)._hide();
  1014. $ctx1.sendIdx["hide"]=2;
  1015. _st(self["@selectedTab"])._hide();
  1016. self._removeBodyMargin();
  1017. _st("body"._asJQuery())._removeClass_("amberBody");
  1018. self["@opened"]=false;
  1019. self["@opened"];
  1020. };
  1021. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabManager)})},
  1022. args: [],
  1023. source: "close\x0a\x09opened ifTrue: [\x0a\x09'#amber' asJQuery hide.\x0a\x09ul asJQuery hide.\x0a\x09selectedTab hide.\x0a\x09self removeBodyMargin.\x0a\x09'body' asJQuery removeClass: 'amberBody'.\x0a\x09opened := false ]",
  1024. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1025. referencedClasses: []
  1026. }),
  1027. globals.TabManager);
  1028. smalltalk.addMethod(
  1029. smalltalk.method({
  1030. selector: "closeTab:",
  1031. protocol: 'actions',
  1032. fn: function (aWidget){
  1033. var self=this;
  1034. return smalltalk.withContext(function($ctx1) {
  1035. self._removeTab_(aWidget);
  1036. self._selectTab_(_st(self._tabs())._last());
  1037. _st(aWidget)._remove();
  1038. self._update();
  1039. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},globals.TabManager)})},
  1040. args: ["aWidget"],
  1041. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1042. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1043. referencedClasses: []
  1044. }),
  1045. globals.TabManager);
  1046. smalltalk.addMethod(
  1047. smalltalk.method({
  1048. selector: "initialize",
  1049. protocol: 'initialization',
  1050. fn: function (){
  1051. var self=this;
  1052. function $Inspector(){return globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1053. function $IDEInspector(){return globals.IDEInspector||(typeof IDEInspector=="undefined"?nil:IDEInspector)}
  1054. function $IDETranscript(){return globals.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1055. function $Workspace(){return globals.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1056. function $TestRunner(){return globals.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1057. return smalltalk.withContext(function($ctx1) {
  1058. var $1,$2,$3,$4,$5,$6,$7;
  1059. globals.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  1060. _st($Inspector())._register_($IDEInspector());
  1061. self["@opened"]=true;
  1062. $1=(function(html){
  1063. return smalltalk.withContext(function($ctx2) {
  1064. return _st(_st(html)._div())._id_("amber");
  1065. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1066. $2="body"._asJQuery();
  1067. $ctx1.sendIdx["asJQuery"]=1;
  1068. _st($1)._appendToJQuery_($2);
  1069. $ctx1.sendIdx["appendToJQuery:"]=1;
  1070. $3="body"._asJQuery();
  1071. $ctx1.sendIdx["asJQuery"]=2;
  1072. _st($3)._addClass_("amberBody");
  1073. self._appendToJQuery_("#amber"._asJQuery());
  1074. self._addTab_(_st($IDETranscript())._current());
  1075. $ctx1.sendIdx["addTab:"]=1;
  1076. $4=_st($Workspace())._new();
  1077. $ctx1.sendIdx["new"]=1;
  1078. self._addTab_($4);
  1079. $ctx1.sendIdx["addTab:"]=2;
  1080. $5=self._addTab_(_st($TestRunner())._new());
  1081. self._selectTab_(_st(self._tabs())._last());
  1082. self._onResize_((function(){
  1083. return smalltalk.withContext(function($ctx2) {
  1084. self._updateBodyMargin();
  1085. $6=self._updatePosition();
  1086. $ctx2.sendIdx["updatePosition"]=1;
  1087. return $6;
  1088. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1089. $7=self._onWindowResize_((function(){
  1090. return smalltalk.withContext(function($ctx2) {
  1091. return self._updatePosition();
  1092. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1093. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TabManager)})},
  1094. args: [],
  1095. source: "initialize\x0a\x09super initialize.\x0a\x09Inspector register: IDEInspector.\x0a\x09opened := true.\x0a\x09[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.\x0a\x09'body' asJQuery\x0a\x09addClass: 'amberBody'.\x0a\x09self appendToJQuery: '#amber' asJQuery.\x0a\x09self\x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a\x09self selectTab: self tabs last.\x0a\x09self\x0a\x09onResize: [ self updateBodyMargin; updatePosition ];\x0a\x09onWindowResize: [ self updatePosition ]",
  1096. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1097. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"]
  1098. }),
  1099. globals.TabManager);
  1100. smalltalk.addMethod(
  1101. smalltalk.method({
  1102. selector: "labelFor:",
  1103. protocol: 'accessing',
  1104. fn: function (aWidget){
  1105. var self=this;
  1106. var label,maxSize;
  1107. return smalltalk.withContext(function($ctx1) {
  1108. var $1,$4,$3,$2,$5,$6;
  1109. maxSize=(15);
  1110. $1=_st(aWidget)._label();
  1111. $ctx1.sendIdx["label"]=1;
  1112. $4=_st(aWidget)._label();
  1113. $ctx1.sendIdx["label"]=2;
  1114. $3=_st($4)._size();
  1115. $ctx1.sendIdx["size"]=1;
  1116. $2=_st($3)._min_(maxSize);
  1117. label=_st($1)._copyFrom_to_((0),$2);
  1118. $5=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  1119. if(smalltalk.assert($5)){
  1120. label=_st(label).__comma("...");
  1121. label;
  1122. };
  1123. $6=label;
  1124. return $6;
  1125. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},globals.TabManager)})},
  1126. args: ["aWidget"],
  1127. source: "labelFor: aWidget\x0a\x09| label maxSize |\x0a\x09maxSize := 15.\x0a\x09label := aWidget label copyFrom: 0 to: (aWidget label size min: maxSize).\x0a\x09aWidget label size > maxSize ifTrue: [\x0a\x09\x09label := label, '...' ].\x0a\x09^ label",
  1128. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1129. referencedClasses: []
  1130. }),
  1131. globals.TabManager);
  1132. smalltalk.addMethod(
  1133. smalltalk.method({
  1134. selector: "newBrowserTab",
  1135. protocol: 'actions',
  1136. fn: function (){
  1137. var self=this;
  1138. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1139. return smalltalk.withContext(function($ctx1) {
  1140. _st($Browser())._open();
  1141. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},globals.TabManager)})},
  1142. args: [],
  1143. source: "newBrowserTab\x0a\x09Browser open",
  1144. messageSends: ["open"],
  1145. referencedClasses: ["Browser"]
  1146. }),
  1147. globals.TabManager);
  1148. smalltalk.addMethod(
  1149. smalltalk.method({
  1150. selector: "onResize:",
  1151. protocol: 'actions',
  1152. fn: function (aBlock){
  1153. var self=this;
  1154. return smalltalk.withContext(function($ctx1) {
  1155. var $1,$3,$4,$2;
  1156. $1="#amber"._asJQuery();
  1157. $3="handles".__minus_gt("n");
  1158. $ctx1.sendIdx["->"]=1;
  1159. $4="resize".__minus_gt(aBlock);
  1160. $ctx1.sendIdx["->"]=2;
  1161. $2=globals.HashedCollection._from_([$3,$4,"minHeight".__minus_gt((230))]);
  1162. _st($1)._resizable_($2);
  1163. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},globals.TabManager)})},
  1164. args: ["aBlock"],
  1165. source: "onResize: aBlock\x0a\x09'#amber' asJQuery resizable: #{\x0a\x09\x09'handles' -> 'n'.\x0a\x09\x09'resize' -> aBlock.\x0a\x09\x09'minHeight' -> 230\x0a\x09}",
  1166. messageSends: ["resizable:", "asJQuery", "->"],
  1167. referencedClasses: []
  1168. }),
  1169. globals.TabManager);
  1170. smalltalk.addMethod(
  1171. smalltalk.method({
  1172. selector: "onWindowResize:",
  1173. protocol: 'actions',
  1174. fn: function (aBlock){
  1175. var self=this;
  1176. return smalltalk.withContext(function($ctx1) {
  1177. _st(_st(window)._asJQuery())._resize_(aBlock);
  1178. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},globals.TabManager)})},
  1179. args: ["aBlock"],
  1180. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1181. messageSends: ["resize:", "asJQuery"],
  1182. referencedClasses: []
  1183. }),
  1184. globals.TabManager);
  1185. smalltalk.addMethod(
  1186. smalltalk.method({
  1187. selector: "open",
  1188. protocol: 'actions',
  1189. fn: function (){
  1190. var self=this;
  1191. return smalltalk.withContext(function($ctx1) {
  1192. var $1,$2,$3;
  1193. $1=self["@opened"];
  1194. if(! smalltalk.assert($1)){
  1195. $2="body"._asJQuery();
  1196. $ctx1.sendIdx["asJQuery"]=1;
  1197. _st($2)._addClass_("amberBody");
  1198. $3="#amber"._asJQuery();
  1199. $ctx1.sendIdx["asJQuery"]=2;
  1200. _st($3)._show();
  1201. $ctx1.sendIdx["show"]=1;
  1202. _st(_st(self["@ul"])._asJQuery())._show();
  1203. $ctx1.sendIdx["show"]=2;
  1204. self._updateBodyMargin();
  1205. _st(self["@selectedTab"])._show();
  1206. self["@opened"]=true;
  1207. self["@opened"];
  1208. };
  1209. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabManager)})},
  1210. args: [],
  1211. source: "open\x0a\x09opened ifFalse: [\x0a\x09'body' asJQuery addClass: 'amberBody'.\x0a\x09'#amber' asJQuery show.\x0a\x09ul asJQuery show.\x0a\x09self updateBodyMargin.\x0a\x09selectedTab show.\x0a\x09opened := true ]",
  1212. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1213. referencedClasses: []
  1214. }),
  1215. globals.TabManager);
  1216. smalltalk.addMethod(
  1217. smalltalk.method({
  1218. selector: "removeBodyMargin",
  1219. protocol: 'actions',
  1220. fn: function (){
  1221. var self=this;
  1222. return smalltalk.withContext(function($ctx1) {
  1223. self._setBodyMargin_((0));
  1224. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},globals.TabManager)})},
  1225. args: [],
  1226. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1227. messageSends: ["setBodyMargin:"],
  1228. referencedClasses: []
  1229. }),
  1230. globals.TabManager);
  1231. smalltalk.addMethod(
  1232. smalltalk.method({
  1233. selector: "removeTab:",
  1234. protocol: 'adding/Removing',
  1235. fn: function (aWidget){
  1236. var self=this;
  1237. return smalltalk.withContext(function($ctx1) {
  1238. _st(self._tabs())._remove_(aWidget);
  1239. self._update();
  1240. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},globals.TabManager)})},
  1241. args: ["aWidget"],
  1242. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1243. messageSends: ["remove:", "tabs", "update"],
  1244. referencedClasses: []
  1245. }),
  1246. globals.TabManager);
  1247. smalltalk.addMethod(
  1248. smalltalk.method({
  1249. selector: "renderOn:",
  1250. protocol: 'rendering',
  1251. fn: function (html){
  1252. var self=this;
  1253. return smalltalk.withContext(function($ctx1) {
  1254. var $1,$2;
  1255. _st(_st(html)._div())._id_("logo");
  1256. $ctx1.sendIdx["id:"]=1;
  1257. self._renderToolbarOn_(html);
  1258. $1=_st(html)._ul();
  1259. _st($1)._id_("amberTabs");
  1260. $2=_st($1)._yourself();
  1261. self["@ul"]=$2;
  1262. self._renderTabs();
  1263. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabManager)})},
  1264. args: ["html"],
  1265. source: "renderOn: html\x0a\x09html div id: 'logo'.\x0a\x09self renderToolbarOn: html.\x0a\x09ul := html ul\x0a\x09\x09id: 'amberTabs';\x0a\x09\x09yourself.\x0a\x09self renderTabs",
  1266. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1267. referencedClasses: []
  1268. }),
  1269. globals.TabManager);
  1270. smalltalk.addMethod(
  1271. smalltalk.method({
  1272. selector: "renderTabFor:on:",
  1273. protocol: 'rendering',
  1274. fn: function (aWidget,html){
  1275. var self=this;
  1276. var li;
  1277. return smalltalk.withContext(function($ctx1) {
  1278. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10;
  1279. li=_st(html)._li();
  1280. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1281. if(smalltalk.assert($1)){
  1282. _st(li)._class_("selected");
  1283. $ctx1.sendIdx["class:"]=1;
  1284. };
  1285. $2=li;
  1286. _st($2)._with_((function(){
  1287. return smalltalk.withContext(function($ctx2) {
  1288. $3=_st(html)._span();
  1289. $ctx2.sendIdx["span"]=1;
  1290. _st($3)._class_("ltab");
  1291. $ctx2.sendIdx["class:"]=2;
  1292. $4=_st(html)._span();
  1293. $ctx2.sendIdx["span"]=2;
  1294. _st($4)._class_("mtab");
  1295. $ctx2.sendIdx["class:"]=3;
  1296. $5=_st($4)._with_((function(){
  1297. return smalltalk.withContext(function($ctx3) {
  1298. $6=_st(aWidget)._canBeClosed();
  1299. if(smalltalk.assert($6)){
  1300. $7=_st(html)._span();
  1301. $ctx3.sendIdx["span"]=3;
  1302. _st($7)._class_("close");
  1303. $ctx3.sendIdx["class:"]=4;
  1304. _st($7)._with_("x");
  1305. $ctx3.sendIdx["with:"]=3;
  1306. $8=_st($7)._onClick_((function(){
  1307. return smalltalk.withContext(function($ctx4) {
  1308. return self._closeTab_(aWidget);
  1309. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1310. $ctx3.sendIdx["onClick:"]=1;
  1311. $8;
  1312. };
  1313. $9=_st(html)._span();
  1314. $ctx3.sendIdx["span"]=4;
  1315. return _st($9)._with_(self._labelFor_(aWidget));
  1316. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1317. $ctx2.sendIdx["with:"]=2;
  1318. $5;
  1319. return _st(_st(html)._span())._class_("rtab");
  1320. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1321. $ctx1.sendIdx["with:"]=1;
  1322. $10=_st($2)._onClick_((function(){
  1323. return smalltalk.withContext(function($ctx2) {
  1324. return self._selectTab_(aWidget);
  1325. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1326. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},globals.TabManager)})},
  1327. args: ["aWidget", "html"],
  1328. source: "renderTabFor: aWidget on: html\x0a\x09| li |\x0a\x09li := html li.\x0a\x09selectedTab = aWidget ifTrue: [\x0a\x09li class: 'selected' ].\x0a\x09li with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span\x0a\x09\x09\x09class: 'mtab';\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09aWidget canBeClosed ifTrue: [\x0a\x09\x09\x09\x09\x09html span\x0a\x09\x09\x09\x09\x09\x09class: 'close';\x0a\x09\x09\x09\x09\x09\x09with: 'x';\x0a\x09\x09\x09\x09\x09onClick: [ self closeTab: aWidget ]].\x0a\x09\x09\x09html span with: (self labelFor: aWidget) ].\x0a\x09\x09html span class: 'rtab' ];\x0a\x09onClick: [ self selectTab: aWidget ]",
  1329. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1330. referencedClasses: []
  1331. }),
  1332. globals.TabManager);
  1333. smalltalk.addMethod(
  1334. smalltalk.method({
  1335. selector: "renderTabs",
  1336. protocol: 'rendering',
  1337. fn: function (){
  1338. var self=this;
  1339. return smalltalk.withContext(function($ctx1) {
  1340. var $1,$2,$3,$4,$5;
  1341. _st(self["@ul"])._contents_((function(html){
  1342. return smalltalk.withContext(function($ctx2) {
  1343. _st(self._tabs())._do_((function(each){
  1344. return smalltalk.withContext(function($ctx3) {
  1345. return self._renderTabFor_on_(each,html);
  1346. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1347. $1=_st(html)._li();
  1348. _st($1)._class_("newtab");
  1349. $ctx2.sendIdx["class:"]=1;
  1350. _st($1)._with_((function(){
  1351. return smalltalk.withContext(function($ctx3) {
  1352. $2=_st(html)._span();
  1353. $ctx3.sendIdx["span"]=1;
  1354. _st($2)._class_("ltab");
  1355. $ctx3.sendIdx["class:"]=2;
  1356. $3=_st(html)._span();
  1357. $ctx3.sendIdx["span"]=2;
  1358. _st($3)._class_("mtab");
  1359. $ctx3.sendIdx["class:"]=3;
  1360. $4=_st($3)._with_(" + ");
  1361. $4;
  1362. return _st(_st(html)._span())._class_("rtab");
  1363. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1364. $ctx2.sendIdx["with:"]=1;
  1365. $5=_st($1)._onClick_((function(){
  1366. return smalltalk.withContext(function($ctx3) {
  1367. return self._newBrowserTab();
  1368. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1369. return $5;
  1370. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1371. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},globals.TabManager)})},
  1372. args: [],
  1373. source: "renderTabs\x0a\x09ul contents: [ :html |\x0a\x09\x09self tabs do: [ :each |\x0a\x09\x09self renderTabFor: each on: html ].\x0a\x09\x09html li\x0a\x09\x09class: 'newtab';\x0a\x09\x09with: [\x0a\x09\x09\x09html span class: 'ltab'.\x0a\x09\x09\x09html span class: 'mtab'; with: ' + '.\x0a\x09\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self newBrowserTab ]]",
  1374. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1375. referencedClasses: []
  1376. }),
  1377. globals.TabManager);
  1378. smalltalk.addMethod(
  1379. smalltalk.method({
  1380. selector: "renderToolbarOn:",
  1381. protocol: 'rendering',
  1382. fn: function (html){
  1383. var self=this;
  1384. return smalltalk.withContext(function($ctx1) {
  1385. var $1,$3,$4,$5,$6,$7,$2;
  1386. $1=_st(html)._div();
  1387. $ctx1.sendIdx["div"]=1;
  1388. _st($1)._id_("amber_toolbar");
  1389. $ctx1.sendIdx["id:"]=1;
  1390. $2=_st($1)._with_((function(){
  1391. return smalltalk.withContext(function($ctx2) {
  1392. $3=_st(html)._input();
  1393. _st($3)._class_("implementors");
  1394. $4=_st($3)._yourself();
  1395. self["@input"]=$4;
  1396. self["@input"];
  1397. _st(self["@input"])._onKeyPress_((function(event){
  1398. return smalltalk.withContext(function($ctx3) {
  1399. $5=_st(_st(event)._keyCode()).__eq((13));
  1400. if(smalltalk.assert($5)){
  1401. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1402. };
  1403. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1404. $6=_st(html)._div();
  1405. _st($6)._id_("amber_close");
  1406. $7=_st($6)._onClick_((function(){
  1407. return smalltalk.withContext(function($ctx3) {
  1408. return self._close();
  1409. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1410. return $7;
  1411. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1412. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},globals.TabManager)})},
  1413. args: ["html"],
  1414. source: "renderToolbarOn: html\x0a\x09html div\x0a\x09\x09id: 'amber_toolbar';\x0a\x09\x09with: [\x0a\x09\x09\x09input := html input\x0a\x09\x09\x09\x09class: 'implementors';\x0a\x09\x09\x09\x09yourself.\x0a\x09\x09\x09input onKeyPress: [ :event |\x0a\x09\x09\x09\x09event keyCode = 13 ifTrue: [\x0a\x09\x09\x09\x09self search: input asJQuery val ]].\x0a\x09\x09\x09html div id: 'amber_close'; onClick: [ self close ]]",
  1415. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1416. referencedClasses: []
  1417. }),
  1418. globals.TabManager);
  1419. smalltalk.addMethod(
  1420. smalltalk.method({
  1421. selector: "search:",
  1422. protocol: 'actions',
  1423. fn: function (aString){
  1424. var self=this;
  1425. var searchedClass;
  1426. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1427. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1428. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1429. return smalltalk.withContext(function($ctx1) {
  1430. var $1;
  1431. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  1432. $1=_st(searchedClass)._isClass();
  1433. if(smalltalk.assert($1)){
  1434. _st($Browser())._openOn_(searchedClass);
  1435. } else {
  1436. _st($ReferencesBrowser())._search_(aString);
  1437. };
  1438. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},globals.TabManager)})},
  1439. args: ["aString"],
  1440. source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk globals at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [ Browser openOn: searchedClass ]\x0a\x09\x09\x09ifFalse: [ ReferencesBrowser search: aString ]",
  1441. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1442. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1443. }),
  1444. globals.TabManager);
  1445. smalltalk.addMethod(
  1446. smalltalk.method({
  1447. selector: "selectTab:",
  1448. protocol: 'actions',
  1449. fn: function (aWidget){
  1450. var self=this;
  1451. return smalltalk.withContext(function($ctx1) {
  1452. self._open();
  1453. self["@selectedTab"]=aWidget;
  1454. _st(self._tabs())._do_((function(each){
  1455. return smalltalk.withContext(function($ctx2) {
  1456. return _st(each)._hide();
  1457. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1458. _st(aWidget)._show();
  1459. self._update();
  1460. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},globals.TabManager)})},
  1461. args: ["aWidget"],
  1462. source: "selectTab: aWidget\x0a\x09self open.\x0a\x09selectedTab := aWidget.\x0a\x09self tabs do: [ :each |\x0a\x09each hide ].\x0a\x09aWidget show.\x0a\x09\x0a\x09self update",
  1463. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1464. referencedClasses: []
  1465. }),
  1466. globals.TabManager);
  1467. smalltalk.addMethod(
  1468. smalltalk.method({
  1469. selector: "setBodyMargin:",
  1470. protocol: 'actions',
  1471. fn: function (anInteger){
  1472. var self=this;
  1473. return smalltalk.withContext(function($ctx1) {
  1474. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1475. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},globals.TabManager)})},
  1476. args: ["anInteger"],
  1477. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1478. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1479. referencedClasses: []
  1480. }),
  1481. globals.TabManager);
  1482. smalltalk.addMethod(
  1483. smalltalk.method({
  1484. selector: "tabs",
  1485. protocol: 'accessing',
  1486. fn: function (){
  1487. var self=this;
  1488. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  1489. return smalltalk.withContext(function($ctx1) {
  1490. var $2,$1;
  1491. $2=self["@tabs"];
  1492. if(($receiver = $2) == nil || $receiver == null){
  1493. self["@tabs"]=_st($Array())._new();
  1494. $1=self["@tabs"];
  1495. } else {
  1496. $1=$2;
  1497. };
  1498. return $1;
  1499. }, function($ctx1) {$ctx1.fill(self,"tabs",{},globals.TabManager)})},
  1500. args: [],
  1501. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  1502. messageSends: ["ifNil:", "new"],
  1503. referencedClasses: ["Array"]
  1504. }),
  1505. globals.TabManager);
  1506. smalltalk.addMethod(
  1507. smalltalk.method({
  1508. selector: "update",
  1509. protocol: 'updating',
  1510. fn: function (){
  1511. var self=this;
  1512. return smalltalk.withContext(function($ctx1) {
  1513. self._renderTabs();
  1514. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabManager)})},
  1515. args: [],
  1516. source: "update\x0a\x09self renderTabs",
  1517. messageSends: ["renderTabs"],
  1518. referencedClasses: []
  1519. }),
  1520. globals.TabManager);
  1521. smalltalk.addMethod(
  1522. smalltalk.method({
  1523. selector: "updateBodyMargin",
  1524. protocol: 'actions',
  1525. fn: function (){
  1526. var self=this;
  1527. return smalltalk.withContext(function($ctx1) {
  1528. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1529. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},globals.TabManager)})},
  1530. args: [],
  1531. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1532. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1533. referencedClasses: []
  1534. }),
  1535. globals.TabManager);
  1536. smalltalk.addMethod(
  1537. smalltalk.method({
  1538. selector: "updatePosition",
  1539. protocol: 'actions',
  1540. fn: function (){
  1541. var self=this;
  1542. return smalltalk.withContext(function($ctx1) {
  1543. var $1,$2;
  1544. $1="#amber"._asJQuery();
  1545. _st($1)._css_put_("top","");
  1546. $ctx1.sendIdx["css:put:"]=1;
  1547. $2=_st($1)._css_put_("bottom","0px");
  1548. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},globals.TabManager)})},
  1549. args: [],
  1550. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1551. messageSends: ["css:put:", "asJQuery"],
  1552. referencedClasses: []
  1553. }),
  1554. globals.TabManager);
  1555. globals.TabManager.klass.iVarNames = ['current'];
  1556. smalltalk.addMethod(
  1557. smalltalk.method({
  1558. selector: "current",
  1559. protocol: 'instance creation',
  1560. fn: function (){
  1561. var self=this;
  1562. return smalltalk.withContext(function($ctx1) {
  1563. var $2,$1;
  1564. $2=self["@current"];
  1565. if(($receiver = $2) == nil || $receiver == null){
  1566. self["@current"]=globals.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []);
  1567. $1=self["@current"];
  1568. } else {
  1569. $1=$2;
  1570. };
  1571. return $1;
  1572. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.TabManager.klass)})},
  1573. args: [],
  1574. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  1575. messageSends: ["ifNil:", "new"],
  1576. referencedClasses: []
  1577. }),
  1578. globals.TabManager.klass);
  1579. smalltalk.addMethod(
  1580. smalltalk.method({
  1581. selector: "new",
  1582. protocol: 'instance creation',
  1583. fn: function (){
  1584. var self=this;
  1585. return smalltalk.withContext(function($ctx1) {
  1586. self._shouldNotImplement();
  1587. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.TabManager.klass)})},
  1588. args: [],
  1589. source: "new\x0a\x09self shouldNotImplement",
  1590. messageSends: ["shouldNotImplement"],
  1591. referencedClasses: []
  1592. }),
  1593. globals.TabManager.klass);
  1594. smalltalk.addMethod(
  1595. smalltalk.method({
  1596. selector: "toggleAmberIDE",
  1597. protocol: 'actions',
  1598. fn: function (){
  1599. var self=this;
  1600. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1601. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1602. return smalltalk.withContext(function($ctx1) {
  1603. var $3,$2,$1,$4,$5;
  1604. $3="#amber"._asJQuery();
  1605. $ctx1.sendIdx["asJQuery"]=1;
  1606. $2=_st($3)._length();
  1607. $1=_st($2).__eq((0));
  1608. if(smalltalk.assert($1)){
  1609. _st($Browser())._open();
  1610. $ctx1.sendIdx["open"]=1;
  1611. } else {
  1612. $4=_st("#amber"._asJQuery())._is_(":visible");
  1613. if(smalltalk.assert($4)){
  1614. $5=_st($TabManager())._current();
  1615. $ctx1.sendIdx["current"]=1;
  1616. _st($5)._close();
  1617. } else {
  1618. _st(_st($TabManager())._current())._open();
  1619. };
  1620. };
  1621. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},globals.TabManager.klass)})},
  1622. args: [],
  1623. source: "toggleAmberIDE\x0a\x09'#amber' asJQuery length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09('#amber' asJQuery is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
  1624. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1625. referencedClasses: ["Browser", "TabManager"]
  1626. }),
  1627. globals.TabManager.klass);
  1628. smalltalk.addClass('TabWidget', globals.Widget, ['div'], 'IDE');
  1629. smalltalk.addMethod(
  1630. smalltalk.method({
  1631. selector: "canBeClosed",
  1632. protocol: 'testing',
  1633. fn: function (){
  1634. var self=this;
  1635. return false;
  1636. },
  1637. args: [],
  1638. source: "canBeClosed\x0a\x09^ false",
  1639. messageSends: [],
  1640. referencedClasses: []
  1641. }),
  1642. globals.TabWidget);
  1643. smalltalk.addMethod(
  1644. smalltalk.method({
  1645. selector: "close",
  1646. protocol: 'actions',
  1647. fn: function (){
  1648. var self=this;
  1649. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1650. return smalltalk.withContext(function($ctx1) {
  1651. _st(_st($TabManager())._current())._closeTab_(self);
  1652. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabWidget)})},
  1653. args: [],
  1654. source: "close\x0a\x09TabManager current closeTab: self",
  1655. messageSends: ["closeTab:", "current"],
  1656. referencedClasses: ["TabManager"]
  1657. }),
  1658. globals.TabWidget);
  1659. smalltalk.addMethod(
  1660. smalltalk.method({
  1661. selector: "hide",
  1662. protocol: 'actions',
  1663. fn: function (){
  1664. var self=this;
  1665. return smalltalk.withContext(function($ctx1) {
  1666. _st(_st(self["@div"])._asJQuery())._hide();
  1667. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},globals.TabWidget)})},
  1668. args: [],
  1669. source: "hide\x0a\x09div asJQuery hide",
  1670. messageSends: ["hide", "asJQuery"],
  1671. referencedClasses: []
  1672. }),
  1673. globals.TabWidget);
  1674. smalltalk.addMethod(
  1675. smalltalk.method({
  1676. selector: "label",
  1677. protocol: 'accessing',
  1678. fn: function (){
  1679. var self=this;
  1680. return smalltalk.withContext(function($ctx1) {
  1681. self._subclassResponsibility();
  1682. return self}, function($ctx1) {$ctx1.fill(self,"label",{},globals.TabWidget)})},
  1683. args: [],
  1684. source: "label\x0a\x09self subclassResponsibility",
  1685. messageSends: ["subclassResponsibility"],
  1686. referencedClasses: []
  1687. }),
  1688. globals.TabWidget);
  1689. smalltalk.addMethod(
  1690. smalltalk.method({
  1691. selector: "open",
  1692. protocol: 'actions',
  1693. fn: function (){
  1694. var self=this;
  1695. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1696. return smalltalk.withContext(function($ctx1) {
  1697. var $1;
  1698. $1=_st($TabManager())._current();
  1699. $ctx1.sendIdx["current"]=1;
  1700. _st($1)._addTab_(self);
  1701. _st(_st($TabManager())._current())._selectTab_(self);
  1702. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget)})},
  1703. args: [],
  1704. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1705. messageSends: ["addTab:", "current", "selectTab:"],
  1706. referencedClasses: ["TabManager"]
  1707. }),
  1708. globals.TabWidget);
  1709. smalltalk.addMethod(
  1710. smalltalk.method({
  1711. selector: "remove",
  1712. protocol: 'actions',
  1713. fn: function (){
  1714. var self=this;
  1715. return smalltalk.withContext(function($ctx1) {
  1716. _st(_st(self["@div"])._asJQuery())._remove();
  1717. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},globals.TabWidget)})},
  1718. args: [],
  1719. source: "remove\x0a\x09div asJQuery remove",
  1720. messageSends: ["remove", "asJQuery"],
  1721. referencedClasses: []
  1722. }),
  1723. globals.TabWidget);
  1724. smalltalk.addMethod(
  1725. smalltalk.method({
  1726. selector: "renderBoxOn:",
  1727. protocol: 'rendering',
  1728. fn: function (html){
  1729. var self=this;
  1730. return self},
  1731. args: ["html"],
  1732. source: "renderBoxOn: html",
  1733. messageSends: [],
  1734. referencedClasses: []
  1735. }),
  1736. globals.TabWidget);
  1737. smalltalk.addMethod(
  1738. smalltalk.method({
  1739. selector: "renderButtonsOn:",
  1740. protocol: 'rendering',
  1741. fn: function (html){
  1742. var self=this;
  1743. return self},
  1744. args: ["html"],
  1745. source: "renderButtonsOn: html",
  1746. messageSends: [],
  1747. referencedClasses: []
  1748. }),
  1749. globals.TabWidget);
  1750. smalltalk.addMethod(
  1751. smalltalk.method({
  1752. selector: "renderOn:",
  1753. protocol: 'rendering',
  1754. fn: function (html){
  1755. var self=this;
  1756. return smalltalk.withContext(function($ctx1) {
  1757. var $1,$2;
  1758. $1=_st(html)._div();
  1759. _st($1)._class_("amberTool");
  1760. $2=_st($1)._yourself();
  1761. self["@div"]=$2;
  1762. self._renderTab();
  1763. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabWidget)})},
  1764. args: ["html"],
  1765. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1766. messageSends: ["class:", "div", "yourself", "renderTab"],
  1767. referencedClasses: []
  1768. }),
  1769. globals.TabWidget);
  1770. smalltalk.addMethod(
  1771. smalltalk.method({
  1772. selector: "renderTab",
  1773. protocol: 'rendering',
  1774. fn: function (){
  1775. var self=this;
  1776. return smalltalk.withContext(function($ctx1) {
  1777. var $1,$2,$3,$4;
  1778. _st(self["@div"])._contents_((function(html){
  1779. return smalltalk.withContext(function($ctx2) {
  1780. $1=_st(html)._div();
  1781. $ctx2.sendIdx["div"]=1;
  1782. _st($1)._class_("amber_box");
  1783. $ctx2.sendIdx["class:"]=1;
  1784. $2=_st($1)._with_((function(){
  1785. return smalltalk.withContext(function($ctx3) {
  1786. return self._renderBoxOn_(html);
  1787. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1788. $ctx2.sendIdx["with:"]=1;
  1789. $2;
  1790. $3=_st(html)._div();
  1791. _st($3)._class_("amber_buttons");
  1792. $4=_st($3)._with_((function(){
  1793. return smalltalk.withContext(function($ctx3) {
  1794. return self._renderButtonsOn_(html);
  1795. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1796. return $4;
  1797. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1798. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},globals.TabWidget)})},
  1799. args: [],
  1800. source: "renderTab\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [ self renderBoxOn: html ].\x0a\x09\x09html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [ self renderButtonsOn: html ]]",
  1801. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1802. referencedClasses: []
  1803. }),
  1804. globals.TabWidget);
  1805. smalltalk.addMethod(
  1806. smalltalk.method({
  1807. selector: "show",
  1808. protocol: 'actions',
  1809. fn: function (){
  1810. var self=this;
  1811. return smalltalk.withContext(function($ctx1) {
  1812. _st(_st(self["@div"])._asJQuery())._show();
  1813. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.TabWidget)})},
  1814. args: [],
  1815. source: "show\x0a\x09div asJQuery show",
  1816. messageSends: ["show", "asJQuery"],
  1817. referencedClasses: []
  1818. }),
  1819. globals.TabWidget);
  1820. smalltalk.addMethod(
  1821. smalltalk.method({
  1822. selector: "update",
  1823. protocol: 'rendering',
  1824. fn: function (){
  1825. var self=this;
  1826. return smalltalk.withContext(function($ctx1) {
  1827. self._renderTab();
  1828. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabWidget)})},
  1829. args: [],
  1830. source: "update\x0a\x09self renderTab",
  1831. messageSends: ["renderTab"],
  1832. referencedClasses: []
  1833. }),
  1834. globals.TabWidget);
  1835. smalltalk.addMethod(
  1836. smalltalk.method({
  1837. selector: "open",
  1838. protocol: 'instance creation',
  1839. fn: function (){
  1840. var self=this;
  1841. return smalltalk.withContext(function($ctx1) {
  1842. var $1;
  1843. $1=_st(self._new())._open();
  1844. return $1;
  1845. }, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget.klass)})},
  1846. args: [],
  1847. source: "open\x0a\x09^ self new open",
  1848. messageSends: ["open", "new"],
  1849. referencedClasses: []
  1850. }),
  1851. globals.TabWidget.klass);
  1852. smalltalk.addClass('Browser', globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1853. smalltalk.addMethod(
  1854. smalltalk.method({
  1855. selector: "addInstanceVariableNamed:toClass:",
  1856. protocol: 'actions',
  1857. fn: function (aString,aClass){
  1858. var self=this;
  1859. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1860. return smalltalk.withContext(function($ctx1) {
  1861. var $1,$2,$3,$4,$5;
  1862. $1=_st($ClassBuilder())._new();
  1863. $2=_st(aClass)._superclass();
  1864. $3=_st(aClass)._name();
  1865. $ctx1.sendIdx["name"]=1;
  1866. $4=_st(_st(aClass)._instanceVariableNames())._copy();
  1867. _st($4)._add_(aString);
  1868. $5=_st($4)._yourself();
  1869. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
  1870. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},globals.Browser)})},
  1871. args: ["aString", "aClass"],
  1872. source: "addInstanceVariableNamed: aString toClass: aClass\x0a\x09ClassBuilder new\x0a\x09\x09addSubclassOf: aClass superclass\x0a\x09\x09named: aClass name\x0a\x09\x09instanceVariableNames: (aClass instanceVariableNames copy add: aString; yourself)\x0a\x09\x09package: aClass package name",
  1873. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1874. referencedClasses: ["ClassBuilder"]
  1875. }),
  1876. globals.Browser);
  1877. smalltalk.addMethod(
  1878. smalltalk.method({
  1879. selector: "addNewClass",
  1880. protocol: 'actions',
  1881. fn: function (){
  1882. var self=this;
  1883. var className;
  1884. function $Object(){return globals.Object||(typeof Object=="undefined"?nil:Object)}
  1885. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1886. return smalltalk.withContext(function($ctx1) {
  1887. var $1,$2;
  1888. className=self._prompt_("New class");
  1889. $1=_st(_st(className)._notNil())._and_((function(){
  1890. return smalltalk.withContext(function($ctx2) {
  1891. return _st(className)._notEmpty();
  1892. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1893. if(smalltalk.assert($1)){
  1894. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1895. self._resetClassesList();
  1896. $2=self._updateClassesList();
  1897. $2;
  1898. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  1899. };
  1900. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},globals.Browser)})},
  1901. args: [],
  1902. source: "addNewClass\x0a\x09| className |\x0a\x09className := self prompt: 'New class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk globals at: className) ]",
  1903. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  1904. referencedClasses: ["Object", "Smalltalk"]
  1905. }),
  1906. globals.Browser);
  1907. smalltalk.addMethod(
  1908. smalltalk.method({
  1909. selector: "addNewProtocol",
  1910. protocol: 'actions',
  1911. fn: function (){
  1912. var self=this;
  1913. var newProtocol;
  1914. return smalltalk.withContext(function($ctx1) {
  1915. var $1;
  1916. newProtocol=self._prompt_("New method protocol");
  1917. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1918. return smalltalk.withContext(function($ctx2) {
  1919. return _st(newProtocol)._notEmpty();
  1920. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1921. if(smalltalk.assert($1)){
  1922. _st(self["@selectedMethod"])._protocol_(newProtocol);
  1923. self._setMethodProtocol_(newProtocol);
  1924. };
  1925. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},globals.Browser)})},
  1926. args: [],
  1927. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09\x0a\x09(newProtocol notNil and: [ newProtocol notEmpty ]) ifTrue: [\x0a\x09\x09selectedMethod protocol: newProtocol.\x0a\x09\x09self setMethodProtocol: newProtocol ]",
  1928. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"],
  1929. referencedClasses: []
  1930. }),
  1931. globals.Browser);
  1932. smalltalk.addMethod(
  1933. smalltalk.method({
  1934. selector: "canBeClosed",
  1935. protocol: 'testing',
  1936. fn: function (){
  1937. var self=this;
  1938. return true;
  1939. },
  1940. args: [],
  1941. source: "canBeClosed\x0a\x09^ true",
  1942. messageSends: [],
  1943. referencedClasses: []
  1944. }),
  1945. globals.Browser);
  1946. smalltalk.addMethod(
  1947. smalltalk.method({
  1948. selector: "cancelChanges",
  1949. protocol: 'actions',
  1950. fn: function (){
  1951. var self=this;
  1952. return smalltalk.withContext(function($ctx1) {
  1953. var $2,$1;
  1954. $2=self["@unsavedChanges"];
  1955. if(smalltalk.assert($2)){
  1956. $1=self._confirm_("Cancel changes?");
  1957. } else {
  1958. $1=true;
  1959. };
  1960. return $1;
  1961. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},globals.Browser)})},
  1962. args: [],
  1963. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ self confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  1964. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  1965. referencedClasses: []
  1966. }),
  1967. globals.Browser);
  1968. smalltalk.addMethod(
  1969. smalltalk.method({
  1970. selector: "classCommentSource",
  1971. protocol: 'accessing',
  1972. fn: function (){
  1973. var self=this;
  1974. return smalltalk.withContext(function($ctx1) {
  1975. var $1;
  1976. $1=_st(self["@selectedClass"])._comment();
  1977. return $1;
  1978. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},globals.Browser)})},
  1979. args: [],
  1980. source: "classCommentSource\x0a\x09^ selectedClass comment",
  1981. messageSends: ["comment"],
  1982. referencedClasses: []
  1983. }),
  1984. globals.Browser);
  1985. smalltalk.addMethod(
  1986. smalltalk.method({
  1987. selector: "classDeclarationSource",
  1988. protocol: 'accessing',
  1989. fn: function (){
  1990. var self=this;
  1991. var stream;
  1992. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  1993. return smalltalk.withContext(function($ctx1) {
  1994. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$11,$12,$13;
  1995. stream=""._writeStream();
  1996. $1=self["@selectedClass"];
  1997. if(($receiver = $1) == nil || $receiver == null){
  1998. $2=self._classDeclarationTemplate();
  1999. return $2;
  2000. } else {
  2001. $1;
  2002. };
  2003. $3=stream;
  2004. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  2005. $ctx1.sendIdx["nextPutAll:"]=1;
  2006. _st($3)._nextPutAll_(" subclass: #");
  2007. $ctx1.sendIdx["nextPutAll:"]=2;
  2008. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2009. $ctx1.sendIdx["nextPutAll:"]=3;
  2010. $4=$3;
  2011. $6=_st($String())._lf();
  2012. $ctx1.sendIdx["lf"]=1;
  2013. $7=_st($String())._tab();
  2014. $ctx1.sendIdx["tab"]=1;
  2015. $5=_st($6).__comma($7);
  2016. $ctx1.sendIdx[","]=1;
  2017. _st($4)._nextPutAll_($5);
  2018. $ctx1.sendIdx["nextPutAll:"]=4;
  2019. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2020. $ctx1.sendIdx["nextPutAll:"]=5;
  2021. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2022. return smalltalk.withContext(function($ctx2) {
  2023. return _st(stream)._nextPutAll_(each);
  2024. $ctx2.sendIdx["nextPutAll:"]=6;
  2025. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2026. return smalltalk.withContext(function($ctx2) {
  2027. return _st(stream)._nextPutAll_(" ");
  2028. $ctx2.sendIdx["nextPutAll:"]=7;
  2029. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2030. $9=stream;
  2031. $10=$9;
  2032. $11=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
  2033. $ctx1.sendIdx[","]=2;
  2034. _st($10)._nextPutAll_($11);
  2035. $ctx1.sendIdx["nextPutAll:"]=8;
  2036. _st($9)._nextPutAll_("package: '");
  2037. $ctx1.sendIdx["nextPutAll:"]=9;
  2038. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2039. $ctx1.sendIdx["nextPutAll:"]=10;
  2040. $12=_st($9)._nextPutAll_("'");
  2041. $13=_st(stream)._contents();
  2042. return $13;
  2043. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},globals.Browser)})},
  2044. args: [],
  2045. source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [ ^ self classDeclarationTemplate ].\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass superclass asString;\x0a\x09\x09nextPutAll: ' subclass: #';\x0a\x09\x09nextPutAll: selectedClass name;\x0a\x09\x09nextPutAll: String lf, String tab;\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream\x0a\x09\x09nextPutAll: '''', String lf, String tab;\x0a\x09\x09nextPutAll: 'package: ''';\x0a\x09\x09nextPutAll: selectedClass category;\x0a\x09\x09nextPutAll: ''''.\x0a\x09^ stream contents",
  2046. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2047. referencedClasses: ["String"]
  2048. }),
  2049. globals.Browser);
  2050. smalltalk.addMethod(
  2051. smalltalk.method({
  2052. selector: "classDeclarationTemplate",
  2053. protocol: 'accessing',
  2054. fn: function (){
  2055. var self=this;
  2056. return smalltalk.withContext(function($ctx1) {
  2057. var $1;
  2058. $1=_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2059. $ctx1.sendIdx[","]=1;
  2060. return $1;
  2061. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},globals.Browser)})},
  2062. args: [],
  2063. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2064. messageSends: [",", "selectedPackage"],
  2065. referencedClasses: []
  2066. }),
  2067. globals.Browser);
  2068. smalltalk.addMethod(
  2069. smalltalk.method({
  2070. selector: "classes",
  2071. protocol: 'accessing',
  2072. fn: function (){
  2073. var self=this;
  2074. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2075. return smalltalk.withContext(function($ctx1) {
  2076. var $2,$1;
  2077. $1=_st(_st(_st(_st($Smalltalk())._classes())._select_((function(each){
  2078. return smalltalk.withContext(function($ctx2) {
  2079. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2080. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2081. return smalltalk.withContext(function($ctx2) {
  2082. $2=_st(a)._name();
  2083. $ctx2.sendIdx["name"]=1;
  2084. return _st($2).__lt(_st(b)._name());
  2085. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2086. return $1;
  2087. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.Browser)})},
  2088. args: [],
  2089. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  2090. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"],
  2091. referencedClasses: ["Smalltalk"]
  2092. }),
  2093. globals.Browser);
  2094. smalltalk.addMethod(
  2095. smalltalk.method({
  2096. selector: "commitPackage",
  2097. protocol: 'actions',
  2098. fn: function (){
  2099. var self=this;
  2100. function $Package(){return globals.Package||(typeof Package=="undefined"?nil:Package)}
  2101. return smalltalk.withContext(function($ctx1) {
  2102. var $1;
  2103. $1=self["@selectedPackage"];
  2104. if(($receiver = $1) == nil || $receiver == null){
  2105. $1;
  2106. } else {
  2107. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2108. };
  2109. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},globals.Browser)})},
  2110. args: [],
  2111. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2112. messageSends: ["ifNotNil:", "commit", "named:"],
  2113. referencedClasses: ["Package"]
  2114. }),
  2115. globals.Browser);
  2116. smalltalk.addMethod(
  2117. smalltalk.method({
  2118. selector: "compile",
  2119. protocol: 'actions',
  2120. fn: function (){
  2121. var self=this;
  2122. var currentEditLine;
  2123. return smalltalk.withContext(function($ctx1) {
  2124. var $1,$2,$3,$5,$4;
  2125. self._disableSaveButton();
  2126. $1=_st(self["@sourceArea"])._editor();
  2127. $ctx1.sendIdx["editor"]=1;
  2128. currentEditLine=_st($1)._getCursor();
  2129. $2=_st(self["@selectedTab"]).__eq("comment");
  2130. if(smalltalk.assert($2)){
  2131. $3=self["@selectedClass"];
  2132. if(($receiver = $3) == nil || $receiver == null){
  2133. $3;
  2134. } else {
  2135. self._compileClassComment();
  2136. };
  2137. } else {
  2138. $5=_st(self["@selectedProtocol"])._notNil();
  2139. $ctx1.sendIdx["notNil"]=1;
  2140. $4=_st($5)._or_((function(){
  2141. return smalltalk.withContext(function($ctx2) {
  2142. return _st(self["@selectedMethod"])._notNil();
  2143. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2144. if(smalltalk.assert($4)){
  2145. self._compileMethodDefinition();
  2146. } else {
  2147. self._compileDefinition();
  2148. };
  2149. };
  2150. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  2151. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},globals.Browser)})},
  2152. args: [],
  2153. source: "compile\x0a\x09| currentEditLine |\x0a\x09self disableSaveButton.\x0a\x09currentEditLine := sourceArea editor getCursor.\x0a\x09selectedTab = #comment\x0a\x09ifTrue: [\x0a\x09\x09\x09selectedClass ifNotNil: [\x0a\x09\x09\x09\x09self compileClassComment ]]\x0a\x09ifFalse: [\x0a\x09\x09\x09(selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09ifFalse: [ self compileDefinition ]\x0a\x09\x09\x09\x09ifTrue: [ self compileMethodDefinition ]].\x0a\x09sourceArea editor setCursor: currentEditLine.",
  2154. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2155. referencedClasses: []
  2156. }),
  2157. globals.Browser);
  2158. smalltalk.addMethod(
  2159. smalltalk.method({
  2160. selector: "compileClassComment",
  2161. protocol: 'actions',
  2162. fn: function (){
  2163. var self=this;
  2164. return smalltalk.withContext(function($ctx1) {
  2165. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2166. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},globals.Browser)})},
  2167. args: [],
  2168. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2169. messageSends: ["comment:", "val"],
  2170. referencedClasses: []
  2171. }),
  2172. globals.Browser);
  2173. smalltalk.addMethod(
  2174. smalltalk.method({
  2175. selector: "compileDefinition",
  2176. protocol: 'actions',
  2177. fn: function (){
  2178. var self=this;
  2179. var newClass;
  2180. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2181. return smalltalk.withContext(function($ctx1) {
  2182. var $1;
  2183. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2184. self._resetClassesList();
  2185. self._updateCategoriesList();
  2186. $1=self._updateClassesList();
  2187. self._selectClass_(newClass);
  2188. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},globals.Browser)})},
  2189. args: [],
  2190. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2191. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2192. referencedClasses: ["Compiler"]
  2193. }),
  2194. globals.Browser);
  2195. smalltalk.addMethod(
  2196. smalltalk.method({
  2197. selector: "compileMethodDefinition",
  2198. protocol: 'actions',
  2199. fn: function (){
  2200. var self=this;
  2201. return smalltalk.withContext(function($ctx1) {
  2202. var $1;
  2203. $1=_st(self["@selectedTab"]).__eq("instance");
  2204. if(smalltalk.assert($1)){
  2205. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2206. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2207. } else {
  2208. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2209. };
  2210. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},globals.Browser)})},
  2211. args: [],
  2212. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  2213. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2214. referencedClasses: []
  2215. }),
  2216. globals.Browser);
  2217. smalltalk.addMethod(
  2218. smalltalk.method({
  2219. selector: "compileMethodDefinitionFor:",
  2220. protocol: 'actions',
  2221. fn: function (aClass){
  2222. var self=this;
  2223. var compiler,method,source,node;
  2224. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2225. function $PlatformInterface(){return globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2226. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2227. return smalltalk.withContext(function($ctx1) {
  2228. var $1,$2,$6,$5,$4,$3,$7,$9,$8,$10;
  2229. var $early={};
  2230. try {
  2231. source=_st(self["@sourceArea"])._val();
  2232. $1=self["@selectedProtocol"];
  2233. if(($receiver = $1) == nil || $receiver == null){
  2234. self["@selectedProtocol"]=_st(self["@selectedMethod"])._protocol();
  2235. self["@selectedProtocol"];
  2236. } else {
  2237. $1;
  2238. };
  2239. compiler=_st($Compiler())._new();
  2240. $ctx1.sendIdx["new"]=1;
  2241. _st(compiler)._source_(source);
  2242. node=_st(compiler)._parse_(source);
  2243. $2=_st(node)._isParseFailure();
  2244. if(smalltalk.assert($2)){
  2245. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2246. $ctx1.sendIdx[","]=3;
  2247. $5=_st($6).__comma(", position: ");
  2248. $ctx1.sendIdx[","]=2;
  2249. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2250. $ctx1.sendIdx[","]=1;
  2251. $3=self._alert_($4);
  2252. return $3;
  2253. };
  2254. _st(compiler)._currentClass_(aClass);
  2255. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2256. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2257. return smalltalk.withContext(function($ctx2) {
  2258. $7=_st($PlatformInterface())._existsGlobal_(each);
  2259. if(! smalltalk.assert($7)){
  2260. $9=_st("Declare '".__comma(each)).__comma("' as instance variable?");
  2261. $ctx2.sendIdx[","]=4;
  2262. $8=self._confirm_($9);
  2263. if(smalltalk.assert($8)){
  2264. self._addInstanceVariableNamed_toClass_(each,aClass);
  2265. $10=self._compileMethodDefinitionFor_(aClass);
  2266. throw $early=[$10];
  2267. };
  2268. };
  2269. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2270. _st(_st($ClassBuilder())._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  2271. self._updateMethodsList();
  2272. self._selectMethod_(method);
  2273. return self}
  2274. catch(e) {if(e===$early)return e[0]; throw e}
  2275. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},globals.Browser)})},
  2276. args: ["aClass"],
  2277. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^ self compileMethodDefinitionFor: aClass ]] ].\x0a\x09ClassBuilder new installMethod: method forClass: aClass protocol: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
  2278. messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"],
  2279. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2280. }),
  2281. globals.Browser);
  2282. smalltalk.addMethod(
  2283. smalltalk.method({
  2284. selector: "copyClass",
  2285. protocol: 'actions',
  2286. fn: function (){
  2287. var self=this;
  2288. var className;
  2289. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2290. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2291. return smalltalk.withContext(function($ctx1) {
  2292. var $1,$2;
  2293. className=self._prompt_("Copy class");
  2294. $1=_st(_st(className)._notNil())._and_((function(){
  2295. return smalltalk.withContext(function($ctx2) {
  2296. return _st(className)._notEmpty();
  2297. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2298. if(smalltalk.assert($1)){
  2299. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2300. self._resetClassesList();
  2301. $2=self._updateClassesList();
  2302. $2;
  2303. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  2304. };
  2305. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},globals.Browser)})},
  2306. args: [],
  2307. source: "copyClass\x0a\x09| className |\x0a\x09className := self prompt: 'Copy class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk globals at: className) ]",
  2308. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  2309. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2310. }),
  2311. globals.Browser);
  2312. smalltalk.addMethod(
  2313. smalltalk.method({
  2314. selector: "declarationSource",
  2315. protocol: 'accessing',
  2316. fn: function (){
  2317. var self=this;
  2318. return smalltalk.withContext(function($ctx1) {
  2319. var $2,$1;
  2320. $2=_st(self["@selectedTab"]).__eq("instance");
  2321. if(smalltalk.assert($2)){
  2322. $1=self._classDeclarationSource();
  2323. } else {
  2324. $1=self._metaclassDeclarationSource();
  2325. };
  2326. return $1;
  2327. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},globals.Browser)})},
  2328. args: [],
  2329. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  2330. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2331. referencedClasses: []
  2332. }),
  2333. globals.Browser);
  2334. smalltalk.addMethod(
  2335. smalltalk.method({
  2336. selector: "disableSaveButton",
  2337. protocol: 'actions',
  2338. fn: function (){
  2339. var self=this;
  2340. return smalltalk.withContext(function($ctx1) {
  2341. var $1;
  2342. $1=self["@saveButton"];
  2343. if(($receiver = $1) == nil || $receiver == null){
  2344. $1;
  2345. } else {
  2346. _st(self["@saveButton"])._at_put_("disabled",true);
  2347. };
  2348. self["@unsavedChanges"]=false;
  2349. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},globals.Browser)})},
  2350. args: [],
  2351. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  2352. messageSends: ["ifNotNil:", "at:put:"],
  2353. referencedClasses: []
  2354. }),
  2355. globals.Browser);
  2356. smalltalk.addMethod(
  2357. smalltalk.method({
  2358. selector: "dummyMethodSource",
  2359. protocol: 'accessing',
  2360. fn: function (){
  2361. var self=this;
  2362. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2363. },
  2364. args: [],
  2365. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2366. messageSends: [],
  2367. referencedClasses: []
  2368. }),
  2369. globals.Browser);
  2370. smalltalk.addMethod(
  2371. smalltalk.method({
  2372. selector: "handleSourceAreaKeyDown:",
  2373. protocol: 'actions',
  2374. fn: function (anEvent){
  2375. var self=this;
  2376. return smalltalk.withContext(function($ctx1) {
  2377. if(anEvent.ctrlKey) {
  2378. if(anEvent.keyCode === 83) { //ctrl+s
  2379. self._compile();
  2380. anEvent.preventDefault();
  2381. return false;
  2382. }
  2383. }
  2384. ;
  2385. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},globals.Browser)})},
  2386. args: ["anEvent"],
  2387. source: "handleSourceAreaKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 83) { //ctrl+s\x0a\x09\x09\x09self._compile();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}\x0a\x09>",
  2388. messageSends: [],
  2389. referencedClasses: []
  2390. }),
  2391. globals.Browser);
  2392. smalltalk.addMethod(
  2393. smalltalk.method({
  2394. selector: "hideClassButtons",
  2395. protocol: 'actions',
  2396. fn: function (){
  2397. var self=this;
  2398. return smalltalk.withContext(function($ctx1) {
  2399. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2400. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},globals.Browser)})},
  2401. args: [],
  2402. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2403. messageSends: ["hide", "asJQuery"],
  2404. referencedClasses: []
  2405. }),
  2406. globals.Browser);
  2407. smalltalk.addMethod(
  2408. smalltalk.method({
  2409. selector: "hideMethodButtons",
  2410. protocol: 'actions',
  2411. fn: function (){
  2412. var self=this;
  2413. return smalltalk.withContext(function($ctx1) {
  2414. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2415. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},globals.Browser)})},
  2416. args: [],
  2417. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2418. messageSends: ["hide", "asJQuery"],
  2419. referencedClasses: []
  2420. }),
  2421. globals.Browser);
  2422. smalltalk.addMethod(
  2423. smalltalk.method({
  2424. selector: "initialize",
  2425. protocol: 'initialization',
  2426. fn: function (){
  2427. var self=this;
  2428. return smalltalk.withContext(function($ctx1) {
  2429. globals.Browser.superclass.fn.prototype._initialize.apply(_st(self), []);
  2430. self["@selectedTab"]="instance";
  2431. self["@selectedPackage"]=_st(self._packages())._first();
  2432. self["@unsavedChanges"]=false;
  2433. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Browser)})},
  2434. args: [],
  2435. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2436. messageSends: ["initialize", "first", "packages"],
  2437. referencedClasses: []
  2438. }),
  2439. globals.Browser);
  2440. smalltalk.addMethod(
  2441. smalltalk.method({
  2442. selector: "label",
  2443. protocol: 'accessing',
  2444. fn: function (){
  2445. var self=this;
  2446. return smalltalk.withContext(function($ctx1) {
  2447. var $2,$1;
  2448. $2=self["@selectedClass"];
  2449. if(($receiver = $2) == nil || $receiver == null){
  2450. $1="Browser (nil)";
  2451. } else {
  2452. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2453. };
  2454. return $1;
  2455. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.Browser)})},
  2456. args: [],
  2457. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  2458. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2459. referencedClasses: []
  2460. }),
  2461. globals.Browser);
  2462. smalltalk.addMethod(
  2463. smalltalk.method({
  2464. selector: "metaclassDeclarationSource",
  2465. protocol: 'accessing',
  2466. fn: function (){
  2467. var self=this;
  2468. var stream;
  2469. return smalltalk.withContext(function($ctx1) {
  2470. var $1,$2,$3,$4;
  2471. stream=""._writeStream();
  2472. $1=self["@selectedClass"];
  2473. if(($receiver = $1) == nil || $receiver == null){
  2474. $1;
  2475. } else {
  2476. $2=stream;
  2477. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2478. $ctx1.sendIdx["nextPutAll:"]=1;
  2479. _st($2)._nextPutAll_(" class ");
  2480. $ctx1.sendIdx["nextPutAll:"]=2;
  2481. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2482. $ctx1.sendIdx["nextPutAll:"]=3;
  2483. $3;
  2484. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2485. return smalltalk.withContext(function($ctx2) {
  2486. return _st(stream)._nextPutAll_(each);
  2487. $ctx2.sendIdx["nextPutAll:"]=4;
  2488. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2489. return smalltalk.withContext(function($ctx2) {
  2490. return _st(stream)._nextPutAll_(" ");
  2491. $ctx2.sendIdx["nextPutAll:"]=5;
  2492. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2493. _st(stream)._nextPutAll_("'");
  2494. };
  2495. $4=_st(stream)._contents();
  2496. return $4;
  2497. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},globals.Browser)})},
  2498. args: [],
  2499. source: "metaclassDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNotNil: [\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass asString;\x0a\x09\x09nextPutAll: ' class ';\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream nextPutAll: '''' ].\x0a\x09^ stream contents",
  2500. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2501. referencedClasses: []
  2502. }),
  2503. globals.Browser);
  2504. smalltalk.addMethod(
  2505. smalltalk.method({
  2506. selector: "methodSource",
  2507. protocol: 'accessing',
  2508. fn: function (){
  2509. var self=this;
  2510. return smalltalk.withContext(function($ctx1) {
  2511. var $2,$1;
  2512. $2=self["@selectedMethod"];
  2513. if(($receiver = $2) == nil || $receiver == null){
  2514. $1=self._dummyMethodSource();
  2515. } else {
  2516. $1=_st(self["@selectedMethod"])._source();
  2517. };
  2518. return $1;
  2519. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},globals.Browser)})},
  2520. args: [],
  2521. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  2522. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2523. referencedClasses: []
  2524. }),
  2525. globals.Browser);
  2526. smalltalk.addMethod(
  2527. smalltalk.method({
  2528. selector: "methods",
  2529. protocol: 'accessing',
  2530. fn: function (){
  2531. var self=this;
  2532. var klass;
  2533. return smalltalk.withContext(function($ctx1) {
  2534. var $1,$2,$3,$4,$7,$8,$6,$9,$5;
  2535. $1=_st(self["@selectedTab"]).__eq("comment");
  2536. $ctx1.sendIdx["="]=1;
  2537. if(smalltalk.assert($1)){
  2538. $2=[];
  2539. return $2;
  2540. };
  2541. $3=self["@selectedClass"];
  2542. if(($receiver = $3) == nil || $receiver == null){
  2543. $3;
  2544. } else {
  2545. $4=_st(self["@selectedTab"]).__eq("instance");
  2546. if(smalltalk.assert($4)){
  2547. klass=self["@selectedClass"];
  2548. } else {
  2549. klass=_st(self["@selectedClass"])._class();
  2550. };
  2551. klass;
  2552. };
  2553. $7=self["@selectedProtocol"];
  2554. if(($receiver = $7) == nil || $receiver == null){
  2555. $8=klass;
  2556. if(($receiver = $8) == nil || $receiver == null){
  2557. $6=[];
  2558. } else {
  2559. $6=_st(_st(klass)._methodDictionary())._values();
  2560. };
  2561. } else {
  2562. $6=_st(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  2563. };
  2564. $5=_st($6)._sort_((function(a,b){
  2565. return smalltalk.withContext(function($ctx2) {
  2566. $9=_st(a)._selector();
  2567. $ctx2.sendIdx["selector"]=1;
  2568. return _st($9).__lt(_st(b)._selector());
  2569. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)})}));
  2570. return $5;
  2571. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},globals.Browser)})},
  2572. args: [],
  2573. source: "methods\x0a\x09| klass |\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ]].\x0a\x09^ (selectedProtocol\x0a\x09ifNil: [\x0a\x09\x09klass\x0a\x09\x09ifNil: [ #() ]\x0a\x09\x09ifNotNil: [ klass methodDictionary values ]]\x0a\x09ifNotNil: [\x0a\x09\x09klass methodsInProtocol: selectedProtocol ]) \x0a\x09\x09\x09\x09sort: [ :a :b | a selector < b selector ]",
  2574. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"],
  2575. referencedClasses: []
  2576. }),
  2577. globals.Browser);
  2578. smalltalk.addMethod(
  2579. smalltalk.method({
  2580. selector: "packages",
  2581. protocol: 'accessing',
  2582. fn: function (){
  2583. var self=this;
  2584. var packages;
  2585. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2586. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2587. return smalltalk.withContext(function($ctx1) {
  2588. var $2,$3,$1,$4;
  2589. packages=_st($Array())._new();
  2590. _st(_st($Smalltalk())._classes())._do_((function(each){
  2591. return smalltalk.withContext(function($ctx2) {
  2592. $2=packages;
  2593. $3=_st(each)._category();
  2594. $ctx2.sendIdx["category"]=1;
  2595. $1=_st($2)._includes_($3);
  2596. if(! smalltalk.assert($1)){
  2597. return _st(packages)._add_(_st(each)._category());
  2598. };
  2599. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2600. $4=_st(packages)._sort();
  2601. return $4;
  2602. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.Browser)})},
  2603. args: [],
  2604. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09Smalltalk classes do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  2605. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"],
  2606. referencedClasses: ["Array", "Smalltalk"]
  2607. }),
  2608. globals.Browser);
  2609. smalltalk.addMethod(
  2610. smalltalk.method({
  2611. selector: "protocols",
  2612. protocol: 'accessing',
  2613. fn: function (){
  2614. var self=this;
  2615. var klass;
  2616. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2617. return smalltalk.withContext(function($ctx1) {
  2618. var $1,$2,$3,$4,$5,$6,$7,$8;
  2619. $1=self["@selectedClass"];
  2620. if(($receiver = $1) == nil || $receiver == null){
  2621. $1;
  2622. } else {
  2623. $2=_st(self["@selectedTab"]).__eq("comment");
  2624. $ctx1.sendIdx["="]=1;
  2625. if(smalltalk.assert($2)){
  2626. $3=[];
  2627. return $3;
  2628. };
  2629. $4=_st(self["@selectedTab"]).__eq("instance");
  2630. if(smalltalk.assert($4)){
  2631. klass=self["@selectedClass"];
  2632. } else {
  2633. klass=_st(self["@selectedClass"])._class();
  2634. };
  2635. klass;
  2636. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2637. if(smalltalk.assert($5)){
  2638. $6=_st($Array())._with_("not yet classified");
  2639. return $6;
  2640. };
  2641. $7=_st(klass)._protocols();
  2642. return $7;
  2643. };
  2644. $8=_st($Array())._new();
  2645. return $8;
  2646. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},globals.Browser)})},
  2647. args: [],
  2648. source: "protocols\x0a\x09| klass |\x0a\x09selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ].\x0a\x09klass methodDictionary isEmpty ifTrue: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  2649. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  2650. referencedClasses: ["Array"]
  2651. }),
  2652. globals.Browser);
  2653. smalltalk.addMethod(
  2654. smalltalk.method({
  2655. selector: "removeClass",
  2656. protocol: 'actions',
  2657. fn: function (){
  2658. var self=this;
  2659. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2660. return smalltalk.withContext(function($ctx1) {
  2661. var $2,$1;
  2662. $2=_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?");
  2663. $ctx1.sendIdx[","]=1;
  2664. $1=self._confirm_($2);
  2665. if(smalltalk.assert($1)){
  2666. _st($Smalltalk())._removeClass_(self["@selectedClass"]);
  2667. self._resetClassesList();
  2668. self._selectClass_(nil);
  2669. };
  2670. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},globals.Browser)})},
  2671. args: [],
  2672. source: "removeClass\x0a\x09(self confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil ]",
  2673. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"],
  2674. referencedClasses: ["Smalltalk"]
  2675. }),
  2676. globals.Browser);
  2677. smalltalk.addMethod(
  2678. smalltalk.method({
  2679. selector: "removeMethod",
  2680. protocol: 'actions',
  2681. fn: function (){
  2682. var self=this;
  2683. return smalltalk.withContext(function($ctx1) {
  2684. var $1,$3,$2,$4;
  2685. $1=self._cancelChanges();
  2686. if(smalltalk.assert($1)){
  2687. $3=_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?");
  2688. $ctx1.sendIdx[","]=1;
  2689. $2=self._confirm_($3);
  2690. if(smalltalk.assert($2)){
  2691. $4=_st(self["@selectedTab"]).__eq("instance");
  2692. if(smalltalk.assert($4)){
  2693. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2694. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  2695. } else {
  2696. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2697. };
  2698. self._selectMethod_(nil);
  2699. };
  2700. };
  2701. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},globals.Browser)})},
  2702. args: [],
  2703. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [ selectedClass removeCompiledMethod: selectedMethod ]\x0a\x09\x09\x09ifFalse: [ selectedClass class removeCompiledMethod: selectedMethod ].\x0a\x09\x09self selectMethod: nil ]]",
  2704. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  2705. referencedClasses: []
  2706. }),
  2707. globals.Browser);
  2708. smalltalk.addMethod(
  2709. smalltalk.method({
  2710. selector: "removePackage",
  2711. protocol: 'actions',
  2712. fn: function (){
  2713. var self=this;
  2714. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2715. return smalltalk.withContext(function($ctx1) {
  2716. var $2,$1;
  2717. $2=_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  2718. $ctx1.sendIdx[","]=1;
  2719. $1=self._confirm_($2);
  2720. if(smalltalk.assert($1)){
  2721. _st($Smalltalk())._removePackage_(self["@selectedPackage"]);
  2722. self._updateCategoriesList();
  2723. };
  2724. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},globals.Browser)})},
  2725. args: [],
  2726. source: "removePackage\x0a\x0a\x09(self confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList ]",
  2727. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"],
  2728. referencedClasses: ["Smalltalk"]
  2729. }),
  2730. globals.Browser);
  2731. smalltalk.addMethod(
  2732. smalltalk.method({
  2733. selector: "renameClass",
  2734. protocol: 'actions',
  2735. fn: function (){
  2736. var self=this;
  2737. var newName;
  2738. return smalltalk.withContext(function($ctx1) {
  2739. var $1,$2;
  2740. newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
  2741. $1=_st(_st(newName)._notNil())._and_((function(){
  2742. return smalltalk.withContext(function($ctx2) {
  2743. return _st(newName)._notEmpty();
  2744. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2745. if(smalltalk.assert($1)){
  2746. _st(self["@selectedClass"])._rename_(newName);
  2747. self._updateClassesList();
  2748. $2=self._updateSourceAndButtons();
  2749. $2;
  2750. };
  2751. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},globals.Browser)})},
  2752. args: [],
  2753. source: "renameClass\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [ newName notEmpty ]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons ]",
  2754. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  2755. referencedClasses: []
  2756. }),
  2757. globals.Browser);
  2758. smalltalk.addMethod(
  2759. smalltalk.method({
  2760. selector: "renamePackage",
  2761. protocol: 'actions',
  2762. fn: function (){
  2763. var self=this;
  2764. var newName;
  2765. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2766. return smalltalk.withContext(function($ctx1) {
  2767. var $1,$2;
  2768. newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  2769. $1=newName;
  2770. if(($receiver = $1) == nil || $receiver == null){
  2771. $1;
  2772. } else {
  2773. $2=_st(newName)._notEmpty();
  2774. if(smalltalk.assert($2)){
  2775. _st($Smalltalk())._renamePackage_to_(self["@selectedPackage"],newName);
  2776. self._updateCategoriesList();
  2777. };
  2778. };
  2779. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},globals.Browser)})},
  2780. args: [],
  2781. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  2782. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "updateCategoriesList"],
  2783. referencedClasses: ["Smalltalk"]
  2784. }),
  2785. globals.Browser);
  2786. smalltalk.addMethod(
  2787. smalltalk.method({
  2788. selector: "renderBottomPanelOn:",
  2789. protocol: 'rendering',
  2790. fn: function (html){
  2791. var self=this;
  2792. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2793. return smalltalk.withContext(function($ctx1) {
  2794. var $1,$2;
  2795. $1=_st(html)._div();
  2796. _st($1)._class_("amber_sourceCode");
  2797. $2=_st($1)._with_((function(){
  2798. return smalltalk.withContext(function($ctx2) {
  2799. self["@sourceArea"]=_st($SourceArea())._new();
  2800. self["@sourceArea"];
  2801. _st(self["@sourceArea"])._renderOn_(html);
  2802. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2803. return smalltalk.withContext(function($ctx3) {
  2804. return self._handleSourceAreaKeyDown_(e);
  2805. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)})}));
  2806. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2807. return smalltalk.withContext(function($ctx3) {
  2808. return self._updateStatus();
  2809. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2810. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2811. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Browser)})},
  2812. args: ["html"],
  2813. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new.\x0a\x09\x09sourceArea renderOn: html.\x0a\x09\x09\x09sourceArea onKeyDown: [ :e |\x0a\x09\x09\x09\x09self handleSourceAreaKeyDown: e ].\x0a\x09\x09sourceArea onKeyUp: [ self updateStatus ]]",
  2814. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
  2815. referencedClasses: ["SourceArea"]
  2816. }),
  2817. globals.Browser);
  2818. smalltalk.addMethod(
  2819. smalltalk.method({
  2820. selector: "renderBoxOn:",
  2821. protocol: 'rendering',
  2822. fn: function (html){
  2823. var self=this;
  2824. return smalltalk.withContext(function($ctx1) {
  2825. var $1;
  2826. self._renderTopPanelOn_(html);
  2827. self._renderTabsOn_(html);
  2828. $1=self._renderBottomPanelOn_(html);
  2829. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Browser)})},
  2830. args: ["html"],
  2831. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2832. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2833. referencedClasses: []
  2834. }),
  2835. globals.Browser);
  2836. smalltalk.addMethod(
  2837. smalltalk.method({
  2838. selector: "renderButtonsOn:",
  2839. protocol: 'rendering',
  2840. fn: function (html){
  2841. var self=this;
  2842. return smalltalk.withContext(function($ctx1) {
  2843. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2844. self["@saveButton"]=_st(html)._button();
  2845. $ctx1.sendIdx["button"]=1;
  2846. $1=self["@saveButton"];
  2847. _st($1)._with_("Save");
  2848. $ctx1.sendIdx["with:"]=1;
  2849. $2=_st($1)._onClick_((function(){
  2850. return smalltalk.withContext(function($ctx2) {
  2851. return self._compile();
  2852. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2853. $ctx1.sendIdx["onClick:"]=1;
  2854. self["@methodButtons"]=_st(html)._span();
  2855. $ctx1.sendIdx["span"]=1;
  2856. self["@classButtons"]=_st(html)._span();
  2857. $3=_st(html)._div();
  2858. _st($3)._class_("right");
  2859. $4=_st($3)._with_((function(){
  2860. return smalltalk.withContext(function($ctx2) {
  2861. $5=_st(html)._button();
  2862. $ctx2.sendIdx["button"]=2;
  2863. _st($5)._with_("DoIt");
  2864. $ctx2.sendIdx["with:"]=3;
  2865. $6=_st($5)._onClick_((function(){
  2866. return smalltalk.withContext(function($ctx3) {
  2867. return _st(self["@sourceArea"])._doIt();
  2868. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2869. $ctx2.sendIdx["onClick:"]=2;
  2870. $6;
  2871. $7=_st(html)._button();
  2872. $ctx2.sendIdx["button"]=3;
  2873. _st($7)._with_("PrintIt");
  2874. $ctx2.sendIdx["with:"]=4;
  2875. $8=_st($7)._onClick_((function(){
  2876. return smalltalk.withContext(function($ctx3) {
  2877. return _st(self["@sourceArea"])._printIt();
  2878. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2879. $ctx2.sendIdx["onClick:"]=3;
  2880. $8;
  2881. $9=_st(html)._button();
  2882. _st($9)._with_("InspectIt");
  2883. $10=_st($9)._onClick_((function(){
  2884. return smalltalk.withContext(function($ctx3) {
  2885. return _st(self["@sourceArea"])._inspectIt();
  2886. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  2887. return $10;
  2888. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2889. $ctx1.sendIdx["with:"]=2;
  2890. self._updateSourceAndButtons();
  2891. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Browser)})},
  2892. args: ["html"],
  2893. source: "renderButtonsOn: html\x0a\x09saveButton := html button.\x0a\x09saveButton\x0a\x09with: 'Save';\x0a\x09onClick: [ self compile ].\x0a\x09methodButtons := html span.\x0a\x09classButtons := html span.\x0a\x09html div\x0a\x09class: 'right';\x0a\x09with: [\x0a\x09\x09html button\x0a\x09\x09\x09with: 'DoIt';\x0a\x09\x09\x09onClick: [ sourceArea doIt ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'PrintIt';\x0a\x09\x09\x09onClick: [ sourceArea printIt ].\x0a\x09\x09html button with: 'InspectIt';\x0a\x09\x09\x09onClick: [ sourceArea inspectIt ]].\x0a\x09self updateSourceAndButtons",
  2894. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
  2895. referencedClasses: []
  2896. }),
  2897. globals.Browser);
  2898. smalltalk.addMethod(
  2899. smalltalk.method({
  2900. selector: "renderTabsOn:",
  2901. protocol: 'rendering',
  2902. fn: function (html){
  2903. var self=this;
  2904. return smalltalk.withContext(function($ctx1) {
  2905. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2906. self._updateTabsList();
  2907. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},globals.Browser)})},
  2908. args: ["html"],
  2909. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  2910. messageSends: ["class:", "ul", "updateTabsList"],
  2911. referencedClasses: []
  2912. }),
  2913. globals.Browser);
  2914. smalltalk.addMethod(
  2915. smalltalk.method({
  2916. selector: "renderTopPanelOn:",
  2917. protocol: 'rendering',
  2918. fn: function (html){
  2919. var self=this;
  2920. function $ClassesList(){return globals.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2921. return smalltalk.withContext(function($ctx1) {
  2922. var $1,$3,$4,$6,$7,$8,$9,$10,$11,$5,$12,$13,$2;
  2923. $1=_st(html)._div();
  2924. $ctx1.sendIdx["div"]=1;
  2925. _st($1)._class_("top");
  2926. $ctx1.sendIdx["class:"]=1;
  2927. $2=_st($1)._with_((function(){
  2928. return smalltalk.withContext(function($ctx2) {
  2929. $3=_st(html)._ul();
  2930. $ctx2.sendIdx["ul"]=1;
  2931. self["@packagesList"]=_st($3)._class_("amber_column browser packages");
  2932. $ctx2.sendIdx["class:"]=2;
  2933. self["@packagesList"];
  2934. $4=_st(html)._div();
  2935. $ctx2.sendIdx["div"]=2;
  2936. _st($4)._class_("amber_packagesButtons");
  2937. $ctx2.sendIdx["class:"]=3;
  2938. $5=_st($4)._with_((function(){
  2939. return smalltalk.withContext(function($ctx3) {
  2940. $6=_st(html)._button();
  2941. $ctx3.sendIdx["button"]=1;
  2942. _st($6)._title_("Commit classes in this package to disk");
  2943. $ctx3.sendIdx["title:"]=1;
  2944. _st($6)._onClick_((function(){
  2945. return smalltalk.withContext(function($ctx4) {
  2946. return self._commitPackage();
  2947. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  2948. $ctx3.sendIdx["onClick:"]=1;
  2949. $7=_st($6)._with_("Commit");
  2950. $ctx3.sendIdx["with:"]=3;
  2951. $7;
  2952. $8=_st(html)._button();
  2953. $ctx3.sendIdx["button"]=2;
  2954. _st($8)._title_("Rename package");
  2955. $ctx3.sendIdx["title:"]=2;
  2956. _st($8)._onClick_((function(){
  2957. return smalltalk.withContext(function($ctx4) {
  2958. return self._renamePackage();
  2959. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  2960. $ctx3.sendIdx["onClick:"]=2;
  2961. $9=_st($8)._with_("Rename");
  2962. $ctx3.sendIdx["with:"]=4;
  2963. $9;
  2964. $10=_st(html)._button();
  2965. _st($10)._title_("Remove this package from the system");
  2966. _st($10)._onClick_((function(){
  2967. return smalltalk.withContext(function($ctx4) {
  2968. return self._removePackage();
  2969. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  2970. $11=_st($10)._with_("Remove");
  2971. return $11;
  2972. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  2973. $ctx2.sendIdx["with:"]=2;
  2974. $5;
  2975. self["@classesList"]=_st($ClassesList())._on_(self);
  2976. self["@classesList"];
  2977. _st(self["@classesList"])._renderOn_(html);
  2978. $12=_st(html)._ul();
  2979. $ctx2.sendIdx["ul"]=2;
  2980. self["@protocolsList"]=_st($12)._class_("amber_column browser protocols");
  2981. $ctx2.sendIdx["class:"]=4;
  2982. self["@protocolsList"];
  2983. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2984. $ctx2.sendIdx["class:"]=5;
  2985. self["@methodsList"];
  2986. self._updateCategoriesList();
  2987. self._updateClassesList();
  2988. self._updateProtocolsList();
  2989. $13=self._updateMethodsList();
  2990. $13;
  2991. return _st(_st(html)._div())._class_("amber_clear");
  2992. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2993. $ctx1.sendIdx["with:"]=1;
  2994. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Browser)})},
  2995. args: ["html"],
  2996. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09packagesList := html ul class: 'amber_column browser packages'.\x0a\x09\x09\x09\x09html div class: 'amber_packagesButtons'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Commit classes in this package to disk';\x0a\x09\x09\x09\x09\x09onClick: [ self commitPackage ];\x0a\x09\x09\x09\x09\x09with: 'Commit'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Rename package';\x0a\x09\x09\x09\x09\x09onClick: [ self renamePackage ];\x0a\x09\x09\x09\x09\x09with: 'Rename'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Remove this package from the system';\x0a\x09\x09\x09\x09\x09onClick: [ self removePackage ];\x0a\x09\x09\x09\x09\x09with: 'Remove' ].\x0a\x09\x09\x09classesList := ClassesList on: self.\x0a\x09\x09\x09classesList renderOn: html.\x0a\x09\x09\x09protocolsList := html ul class: 'amber_column browser protocols'.\x0a\x09\x09\x09methodsList := html ul class: 'amber_column browser methods'.\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09updateCategoriesList;\x0a\x09\x09\x09\x09updateClassesList;\x0a\x09\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09\x09updateMethodsList.\x0a\x09\x09\x09html div class: 'amber_clear' ]",
  2997. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  2998. referencedClasses: ["ClassesList"]
  2999. }),
  3000. globals.Browser);
  3001. smalltalk.addMethod(
  3002. smalltalk.method({
  3003. selector: "resetClassesList",
  3004. protocol: 'updating',
  3005. fn: function (){
  3006. var self=this;
  3007. return smalltalk.withContext(function($ctx1) {
  3008. _st(self["@classesList"])._resetNodes();
  3009. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},globals.Browser)})},
  3010. args: [],
  3011. source: "resetClassesList\x0a\x09classesList resetNodes",
  3012. messageSends: ["resetNodes"],
  3013. referencedClasses: []
  3014. }),
  3015. globals.Browser);
  3016. smalltalk.addMethod(
  3017. smalltalk.method({
  3018. selector: "search:",
  3019. protocol: 'actions',
  3020. fn: function (aString){
  3021. var self=this;
  3022. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3023. return smalltalk.withContext(function($ctx1) {
  3024. var $1,$2;
  3025. $1=self._cancelChanges();
  3026. if(smalltalk.assert($1)){
  3027. var searchedClass;
  3028. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  3029. searchedClass;
  3030. $2=_st(searchedClass)._isClass();
  3031. if(smalltalk.assert($2)){
  3032. _st(self._class())._openOn_(searchedClass);
  3033. } else {
  3034. self._searchReferencesOf_(aString);
  3035. };
  3036. };
  3037. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.Browser)})},
  3038. args: ["aString"],
  3039. source: "search: aString\x0a\x09self cancelChanges ifTrue: [ | searchedClass |\x0a\x09\x09searchedClass := Smalltalk globals at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [ self class openOn: searchedClass ]\x0a\x09\x09\x09ifFalse: [ self searchReferencesOf: aString ]]",
  3040. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3041. referencedClasses: ["Smalltalk"]
  3042. }),
  3043. globals.Browser);
  3044. smalltalk.addMethod(
  3045. smalltalk.method({
  3046. selector: "searchClassReferences",
  3047. protocol: 'actions',
  3048. fn: function (){
  3049. var self=this;
  3050. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3051. return smalltalk.withContext(function($ctx1) {
  3052. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  3053. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},globals.Browser)})},
  3054. args: [],
  3055. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  3056. messageSends: ["search:", "name"],
  3057. referencedClasses: ["ReferencesBrowser"]
  3058. }),
  3059. globals.Browser);
  3060. smalltalk.addMethod(
  3061. smalltalk.method({
  3062. selector: "searchReferencesOf:",
  3063. protocol: 'actions',
  3064. fn: function (aString){
  3065. var self=this;
  3066. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3067. return smalltalk.withContext(function($ctx1) {
  3068. _st($ReferencesBrowser())._search_(aString);
  3069. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},globals.Browser)})},
  3070. args: ["aString"],
  3071. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  3072. messageSends: ["search:"],
  3073. referencedClasses: ["ReferencesBrowser"]
  3074. }),
  3075. globals.Browser);
  3076. smalltalk.addMethod(
  3077. smalltalk.method({
  3078. selector: "selectCategory:",
  3079. protocol: 'actions',
  3080. fn: function (aCategory){
  3081. var self=this;
  3082. return smalltalk.withContext(function($ctx1) {
  3083. var $1,$2;
  3084. $1=self._cancelChanges();
  3085. if(smalltalk.assert($1)){
  3086. self["@selectedPackage"]=aCategory;
  3087. self["@selectedPackage"];
  3088. self["@selectedMethod"]=nil;
  3089. self["@selectedProtocol"]=self["@selectedMethod"];
  3090. self["@selectedClass"]=self["@selectedProtocol"];
  3091. self["@selectedClass"];
  3092. self._resetClassesList();
  3093. self._updateCategoriesList();
  3094. self._updateClassesList();
  3095. self._updateProtocolsList();
  3096. self._updateMethodsList();
  3097. $2=self._updateSourceAndButtons();
  3098. $2;
  3099. };
  3100. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},globals.Browser)})},
  3101. args: ["aCategory"],
  3102. source: "selectCategory: aCategory\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedPackage := aCategory.\x0a\x09selectedClass := selectedProtocol := selectedMethod := nil.\x0a\x09self resetClassesList.\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3103. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3104. referencedClasses: []
  3105. }),
  3106. globals.Browser);
  3107. smalltalk.addMethod(
  3108. smalltalk.method({
  3109. selector: "selectClass:",
  3110. protocol: 'actions',
  3111. fn: function (aClass){
  3112. var self=this;
  3113. return smalltalk.withContext(function($ctx1) {
  3114. var $1,$2;
  3115. $1=self._cancelChanges();
  3116. if(smalltalk.assert($1)){
  3117. self["@selectedClass"]=aClass;
  3118. self["@selectedClass"];
  3119. self["@selectedMethod"]=nil;
  3120. self["@selectedProtocol"]=self["@selectedMethod"];
  3121. self["@selectedProtocol"];
  3122. self._updateClassesList();
  3123. self._updateProtocolsList();
  3124. self._updateMethodsList();
  3125. $2=self._updateSourceAndButtons();
  3126. $2;
  3127. };
  3128. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},globals.Browser)})},
  3129. args: ["aClass"],
  3130. source: "selectClass: aClass\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedClass := aClass.\x0a\x09selectedProtocol := selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3131. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3132. referencedClasses: []
  3133. }),
  3134. globals.Browser);
  3135. smalltalk.addMethod(
  3136. smalltalk.method({
  3137. selector: "selectMethod:",
  3138. protocol: 'actions',
  3139. fn: function (aMethod){
  3140. var self=this;
  3141. return smalltalk.withContext(function($ctx1) {
  3142. var $1,$2;
  3143. $1=self._cancelChanges();
  3144. if(smalltalk.assert($1)){
  3145. self["@selectedMethod"]=aMethod;
  3146. self["@selectedMethod"];
  3147. self._updateProtocolsList();
  3148. self._updateMethodsList();
  3149. $2=self._updateSourceAndButtons();
  3150. $2;
  3151. };
  3152. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},globals.Browser)})},
  3153. args: ["aMethod"],
  3154. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3155. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3156. referencedClasses: []
  3157. }),
  3158. globals.Browser);
  3159. smalltalk.addMethod(
  3160. smalltalk.method({
  3161. selector: "selectProtocol:",
  3162. protocol: 'actions',
  3163. fn: function (aString){
  3164. var self=this;
  3165. return smalltalk.withContext(function($ctx1) {
  3166. var $1,$2;
  3167. $1=self._cancelChanges();
  3168. if(smalltalk.assert($1)){
  3169. self["@selectedProtocol"]=aString;
  3170. self["@selectedProtocol"];
  3171. self["@selectedMethod"]=nil;
  3172. self["@selectedMethod"];
  3173. self._updateProtocolsList();
  3174. self._updateMethodsList();
  3175. $2=self._updateSourceAndButtons();
  3176. $2;
  3177. };
  3178. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},globals.Browser)})},
  3179. args: ["aString"],
  3180. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3181. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3182. referencedClasses: []
  3183. }),
  3184. globals.Browser);
  3185. smalltalk.addMethod(
  3186. smalltalk.method({
  3187. selector: "selectTab:",
  3188. protocol: 'actions',
  3189. fn: function (aString){
  3190. var self=this;
  3191. return smalltalk.withContext(function($ctx1) {
  3192. var $1;
  3193. $1=self._cancelChanges();
  3194. if(smalltalk.assert($1)){
  3195. self["@selectedTab"]=aString;
  3196. self["@selectedTab"];
  3197. self._selectProtocol_(nil);
  3198. self._updateTabsList();
  3199. };
  3200. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},globals.Browser)})},
  3201. args: ["aString"],
  3202. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  3203. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  3204. referencedClasses: []
  3205. }),
  3206. globals.Browser);
  3207. smalltalk.addMethod(
  3208. smalltalk.method({
  3209. selector: "selectedClass",
  3210. protocol: 'accessing',
  3211. fn: function (){
  3212. var self=this;
  3213. var $1;
  3214. $1=self["@selectedClass"];
  3215. return $1;
  3216. },
  3217. args: [],
  3218. source: "selectedClass\x0a\x09^ selectedClass",
  3219. messageSends: [],
  3220. referencedClasses: []
  3221. }),
  3222. globals.Browser);
  3223. smalltalk.addMethod(
  3224. smalltalk.method({
  3225. selector: "selectedPackage",
  3226. protocol: 'accessing',
  3227. fn: function (){
  3228. var self=this;
  3229. var $1;
  3230. $1=self["@selectedPackage"];
  3231. return $1;
  3232. },
  3233. args: [],
  3234. source: "selectedPackage\x0a\x09^ selectedPackage",
  3235. messageSends: [],
  3236. referencedClasses: []
  3237. }),
  3238. globals.Browser);
  3239. smalltalk.addMethod(
  3240. smalltalk.method({
  3241. selector: "setMethodProtocol:",
  3242. protocol: 'actions',
  3243. fn: function (aString){
  3244. var self=this;
  3245. return smalltalk.withContext(function($ctx1) {
  3246. var $1,$2,$3;
  3247. $1=self._cancelChanges();
  3248. if(smalltalk.assert($1)){
  3249. $2=_st(self._protocols())._includes_(aString);
  3250. if(smalltalk.assert($2)){
  3251. _st(self["@selectedMethod"])._protocol_(aString);
  3252. self["@selectedProtocol"]=aString;
  3253. self["@selectedProtocol"];
  3254. self["@selectedMethod"]=self["@selectedMethod"];
  3255. self["@selectedMethod"];
  3256. self._updateProtocolsList();
  3257. self._updateMethodsList();
  3258. $3=self._updateSourceAndButtons();
  3259. $3;
  3260. } else {
  3261. self._addNewProtocol();
  3262. };
  3263. };
  3264. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},globals.Browser)})},
  3265. args: ["aString"],
  3266. source: "setMethodProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09\x09ifFalse: [ self addNewProtocol ]\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedMethod protocol: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self\x0a\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09updateMethodsList;\x0a\x09\x09\x09updateSourceAndButtons ]]",
  3267. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3268. referencedClasses: []
  3269. }),
  3270. globals.Browser);
  3271. smalltalk.addMethod(
  3272. smalltalk.method({
  3273. selector: "showClassButtons",
  3274. protocol: 'actions',
  3275. fn: function (){
  3276. var self=this;
  3277. return smalltalk.withContext(function($ctx1) {
  3278. _st(_st(self["@classButtons"])._asJQuery())._show();
  3279. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},globals.Browser)})},
  3280. args: [],
  3281. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  3282. messageSends: ["show", "asJQuery"],
  3283. referencedClasses: []
  3284. }),
  3285. globals.Browser);
  3286. smalltalk.addMethod(
  3287. smalltalk.method({
  3288. selector: "showMethodButtons",
  3289. protocol: 'actions',
  3290. fn: function (){
  3291. var self=this;
  3292. return smalltalk.withContext(function($ctx1) {
  3293. _st(_st(self["@methodButtons"])._asJQuery())._show();
  3294. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},globals.Browser)})},
  3295. args: [],
  3296. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  3297. messageSends: ["show", "asJQuery"],
  3298. referencedClasses: []
  3299. }),
  3300. globals.Browser);
  3301. smalltalk.addMethod(
  3302. smalltalk.method({
  3303. selector: "source",
  3304. protocol: 'accessing',
  3305. fn: function (){
  3306. var self=this;
  3307. return smalltalk.withContext(function($ctx1) {
  3308. var $1,$4,$3,$2,$6,$5;
  3309. $1=_st(self["@selectedTab"]).__eq("comment");
  3310. if(! smalltalk.assert($1)){
  3311. $4=_st(self["@selectedProtocol"])._notNil();
  3312. $ctx1.sendIdx["notNil"]=1;
  3313. $3=_st($4)._or_((function(){
  3314. return smalltalk.withContext(function($ctx2) {
  3315. return _st(self["@selectedMethod"])._notNil();
  3316. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3317. if(smalltalk.assert($3)){
  3318. $2=self._methodSource();
  3319. } else {
  3320. $2=self._declarationSource();
  3321. };
  3322. return $2;
  3323. };
  3324. $6=self["@selectedClass"];
  3325. if(($receiver = $6) == nil || $receiver == null){
  3326. $5="";
  3327. } else {
  3328. $5=self._classCommentSource();
  3329. };
  3330. return $5;
  3331. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Browser)})},
  3332. args: [],
  3333. source: "source\x0a\x09selectedTab = #comment ifFalse: [\x0a\x09^ (selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09ifFalse: [ self declarationSource ]\x0a\x09\x09ifTrue: [ self methodSource ]].\x0a\x09^ selectedClass\x0a\x09ifNil: [ '' ]\x0a\x09ifNotNil: [ self classCommentSource ]",
  3334. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  3335. referencedClasses: []
  3336. }),
  3337. globals.Browser);
  3338. smalltalk.addMethod(
  3339. smalltalk.method({
  3340. selector: "updateCategoriesList",
  3341. protocol: 'updating',
  3342. fn: function (){
  3343. var self=this;
  3344. return smalltalk.withContext(function($ctx1) {
  3345. var $1,$2,$3,$4;
  3346. _st(self["@packagesList"])._contents_((function(html){
  3347. return smalltalk.withContext(function($ctx2) {
  3348. return _st(self._packages())._do_((function(each){
  3349. var li,label;
  3350. return smalltalk.withContext(function($ctx3) {
  3351. $1=_st(each)._isEmpty();
  3352. if(smalltalk.assert($1)){
  3353. label="Unclassified";
  3354. label;
  3355. } else {
  3356. label=each;
  3357. label;
  3358. };
  3359. li=_st(html)._li();
  3360. li;
  3361. $2=_st(self["@selectedPackage"]).__eq(each);
  3362. if(smalltalk.assert($2)){
  3363. _st(li)._class_("selected");
  3364. };
  3365. $3=li;
  3366. _st($3)._with_(label);
  3367. $4=_st($3)._onClick_((function(){
  3368. return smalltalk.withContext(function($ctx4) {
  3369. return self._selectCategory_(each);
  3370. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  3371. return $4;
  3372. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)})}));
  3373. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3374. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.Browser)})},
  3375. args: [],
  3376. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09each isEmpty\x0a\x09\x09ifTrue: [ label := 'Unclassified' ]\x0a\x09\x09ifFalse: [ label := each ].\x0a\x09\x09li := html li.\x0a\x09\x09selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [ self selectCategory: each ]] ]",
  3377. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  3378. referencedClasses: []
  3379. }),
  3380. globals.Browser);
  3381. smalltalk.addMethod(
  3382. smalltalk.method({
  3383. selector: "updateClassesList",
  3384. protocol: 'updating',
  3385. fn: function (){
  3386. var self=this;
  3387. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3388. return smalltalk.withContext(function($ctx1) {
  3389. _st(_st($TabManager())._current())._update();
  3390. _st(self["@classesList"])._updateNodes();
  3391. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.Browser)})},
  3392. args: [],
  3393. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  3394. messageSends: ["update", "current", "updateNodes"],
  3395. referencedClasses: ["TabManager"]
  3396. }),
  3397. globals.Browser);
  3398. smalltalk.addMethod(
  3399. smalltalk.method({
  3400. selector: "updateMethodsList",
  3401. protocol: 'updating',
  3402. fn: function (){
  3403. var self=this;
  3404. return smalltalk.withContext(function($ctx1) {
  3405. var $1,$2,$3;
  3406. _st(self["@methodsList"])._contents_((function(html){
  3407. return smalltalk.withContext(function($ctx2) {
  3408. return _st(self._methods())._do_((function(each){
  3409. var li;
  3410. return smalltalk.withContext(function($ctx3) {
  3411. li=_st(html)._li();
  3412. li;
  3413. $1=_st(self["@selectedMethod"]).__eq(each);
  3414. if(smalltalk.assert($1)){
  3415. _st(li)._class_("selected");
  3416. };
  3417. $2=li;
  3418. _st($2)._with_(_st(each)._selector());
  3419. $3=_st($2)._onClick_((function(){
  3420. return smalltalk.withContext(function($ctx4) {
  3421. return self._selectMethod_(each);
  3422. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3423. return $3;
  3424. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3425. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3426. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.Browser)})},
  3427. args: [],
  3428. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09self methods do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [ self selectMethod: each ]] ]",
  3429. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  3430. referencedClasses: []
  3431. }),
  3432. globals.Browser);
  3433. smalltalk.addMethod(
  3434. smalltalk.method({
  3435. selector: "updateProtocolsList",
  3436. protocol: 'updating',
  3437. fn: function (){
  3438. var self=this;
  3439. return smalltalk.withContext(function($ctx1) {
  3440. var $1,$2,$3;
  3441. _st(self["@protocolsList"])._contents_((function(html){
  3442. return smalltalk.withContext(function($ctx2) {
  3443. return _st(self._protocols())._do_((function(each){
  3444. var li;
  3445. return smalltalk.withContext(function($ctx3) {
  3446. li=_st(html)._li();
  3447. li;
  3448. $1=_st(self["@selectedProtocol"]).__eq(each);
  3449. if(smalltalk.assert($1)){
  3450. _st(li)._class_("selected");
  3451. };
  3452. $2=li;
  3453. _st($2)._with_(each);
  3454. $3=_st($2)._onClick_((function(){
  3455. return smalltalk.withContext(function($ctx4) {
  3456. return self._selectProtocol_(each);
  3457. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3458. return $3;
  3459. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3460. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3461. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},globals.Browser)})},
  3462. args: [],
  3463. source: "updateProtocolsList\x0a\x09protocolsList contents: [ :html |\x0a\x09self protocols do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedProtocol = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self selectProtocol: each ]] ]",
  3464. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  3465. referencedClasses: []
  3466. }),
  3467. globals.Browser);
  3468. smalltalk.addMethod(
  3469. smalltalk.method({
  3470. selector: "updateSourceAndButtons",
  3471. protocol: 'updating',
  3472. fn: function (){
  3473. var self=this;
  3474. var currentProtocol;
  3475. return smalltalk.withContext(function($ctx1) {
  3476. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$15,$14,$17,$18,$19,$20,$22,$21,$23,$24,$16,$25,$26,$28,$29,$30,$31,$27,$32,$33;
  3477. self._disableSaveButton();
  3478. _st(self["@classButtons"])._contents_((function(html){
  3479. return smalltalk.withContext(function($ctx2) {
  3480. $1=_st(html)._button();
  3481. $ctx2.sendIdx["button"]=1;
  3482. _st($1)._title_("Create a new class");
  3483. _st($1)._onClick_((function(){
  3484. return smalltalk.withContext(function($ctx3) {
  3485. return self._addNewClass();
  3486. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3487. $ctx2.sendIdx["onClick:"]=1;
  3488. $2=_st($1)._with_("New class");
  3489. $ctx2.sendIdx["with:"]=1;
  3490. $2;
  3491. $3=_st(html)._button();
  3492. $ctx2.sendIdx["button"]=2;
  3493. _st($3)._with_("Rename class");
  3494. $ctx2.sendIdx["with:"]=2;
  3495. $4=_st($3)._onClick_((function(){
  3496. return smalltalk.withContext(function($ctx3) {
  3497. return self._renameClass();
  3498. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3499. $ctx2.sendIdx["onClick:"]=2;
  3500. $4;
  3501. $5=_st(html)._button();
  3502. $ctx2.sendIdx["button"]=3;
  3503. _st($5)._with_("Copy class");
  3504. $ctx2.sendIdx["with:"]=3;
  3505. $6=_st($5)._onClick_((function(){
  3506. return smalltalk.withContext(function($ctx3) {
  3507. return self._copyClass();
  3508. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3509. $ctx2.sendIdx["onClick:"]=3;
  3510. $6;
  3511. $7=_st(html)._button();
  3512. $ctx2.sendIdx["button"]=4;
  3513. _st($7)._with_("Remove class");
  3514. $ctx2.sendIdx["with:"]=4;
  3515. $8=_st($7)._onClick_((function(){
  3516. return smalltalk.withContext(function($ctx3) {
  3517. return self._removeClass();
  3518. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  3519. $ctx2.sendIdx["onClick:"]=4;
  3520. $8;
  3521. $9=_st(html)._button();
  3522. $ctx2.sendIdx["button"]=5;
  3523. _st($9)._with_("References");
  3524. $ctx2.sendIdx["with:"]=5;
  3525. $10=_st($9)._onClick_((function(){
  3526. return smalltalk.withContext(function($ctx3) {
  3527. return self._searchClassReferences();
  3528. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3529. $ctx2.sendIdx["onClick:"]=5;
  3530. return $10;
  3531. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3532. $ctx1.sendIdx["contents:"]=1;
  3533. _st(self["@methodButtons"])._contents_((function(html){
  3534. var protocolSelect,referencesSelect;
  3535. return smalltalk.withContext(function($ctx2) {
  3536. $11=_st(html)._button();
  3537. _st($11)._with_("Remove method");
  3538. $ctx2.sendIdx["with:"]=6;
  3539. $12=_st($11)._onClick_((function(){
  3540. return smalltalk.withContext(function($ctx3) {
  3541. return self._removeMethod();
  3542. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)})}));
  3543. $12;
  3544. protocolSelect=_st(html)._select();
  3545. $ctx2.sendIdx["select"]=1;
  3546. protocolSelect;
  3547. $13=protocolSelect;
  3548. _st($13)._onChange_((function(){
  3549. return smalltalk.withContext(function($ctx3) {
  3550. $15=_st(protocolSelect)._asJQuery();
  3551. $ctx3.sendIdx["asJQuery"]=1;
  3552. $14=_st($15)._val();
  3553. $ctx3.sendIdx["val"]=1;
  3554. return self._setMethodProtocol_($14);
  3555. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3556. $ctx2.sendIdx["onChange:"]=1;
  3557. $16=_st($13)._with_((function(){
  3558. return smalltalk.withContext(function($ctx3) {
  3559. $17=_st(html)._option();
  3560. $ctx3.sendIdx["option"]=1;
  3561. _st($17)._with_("Method protocol");
  3562. $ctx3.sendIdx["with:"]=8;
  3563. $18=_st($17)._at_put_("disabled","disabled");
  3564. $ctx3.sendIdx["at:put:"]=1;
  3565. $18;
  3566. $19=_st(html)._option();
  3567. $ctx3.sendIdx["option"]=2;
  3568. _st($19)._class_("important");
  3569. $ctx3.sendIdx["class:"]=1;
  3570. $20=_st($19)._with_("New...");
  3571. $ctx3.sendIdx["with:"]=9;
  3572. $20;
  3573. currentProtocol=self["@selectedProtocol"];
  3574. currentProtocol;
  3575. $22=_st(currentProtocol)._isNil();
  3576. $ctx3.sendIdx["isNil"]=1;
  3577. $21=_st($22)._and_((function(){
  3578. return smalltalk.withContext(function($ctx4) {
  3579. return _st(self["@selectedMethod"])._notNil();
  3580. $ctx4.sendIdx["notNil"]=1;
  3581. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)})}));
  3582. if(smalltalk.assert($21)){
  3583. currentProtocol=_st(self["@selectedMethod"])._category();
  3584. currentProtocol;
  3585. };
  3586. return _st(self._protocols())._do_((function(each){
  3587. var option;
  3588. return smalltalk.withContext(function($ctx4) {
  3589. $23=_st(html)._option();
  3590. $ctx4.sendIdx["option"]=3;
  3591. option=_st($23)._with_(each);
  3592. $ctx4.sendIdx["with:"]=10;
  3593. option;
  3594. $24=_st(currentProtocol).__eq(each);
  3595. if(smalltalk.assert($24)){
  3596. return _st(option)._at_put_("selected","selected");
  3597. $ctx4.sendIdx["at:put:"]=2;
  3598. };
  3599. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)})}));
  3600. $ctx3.sendIdx["do:"]=1;
  3601. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3602. $ctx2.sendIdx["with:"]=7;
  3603. $16;
  3604. $25=_st(self["@selectedMethod"])._isNil();
  3605. $ctx2.sendIdx["isNil"]=2;
  3606. if(! smalltalk.assert($25)){
  3607. referencesSelect=_st(html)._select();
  3608. referencesSelect;
  3609. $26=referencesSelect;
  3610. _st($26)._onChange_((function(){
  3611. return smalltalk.withContext(function($ctx3) {
  3612. return self._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  3613. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)})}));
  3614. $27=_st($26)._with_((function(){
  3615. var option;
  3616. return smalltalk.withContext(function($ctx3) {
  3617. $28=_st(html)._option();
  3618. $ctx3.sendIdx["option"]=4;
  3619. _st($28)._with_("References");
  3620. $ctx3.sendIdx["with:"]=12;
  3621. _st($28)._at_put_("disabled","disabled");
  3622. $ctx3.sendIdx["at:put:"]=3;
  3623. $29=_st($28)._at_put_("selected","selected");
  3624. $29;
  3625. $30=_st(html)._option();
  3626. $ctx3.sendIdx["option"]=5;
  3627. _st($30)._class_("important");
  3628. $31=_st($30)._with_(_st(self["@selectedMethod"])._selector());
  3629. $ctx3.sendIdx["with:"]=13;
  3630. $31;
  3631. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  3632. return smalltalk.withContext(function($ctx4) {
  3633. return _st(_st(html)._option())._with_(each);
  3634. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)})}));
  3635. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)})}));
  3636. $ctx2.sendIdx["with:"]=11;
  3637. return $27;
  3638. };
  3639. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)})}));
  3640. $32=_st(self["@selectedMethod"])._isNil();
  3641. $ctx1.sendIdx["isNil"]=3;
  3642. if(smalltalk.assert($32)){
  3643. self._hideMethodButtons();
  3644. $33=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  3645. return smalltalk.withContext(function($ctx2) {
  3646. return _st(self["@selectedProtocol"])._notNil();
  3647. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)})}));
  3648. if(smalltalk.assert($33)){
  3649. self._hideClassButtons();
  3650. $ctx1.sendIdx["hideClassButtons"]=1;
  3651. } else {
  3652. self._showClassButtons();
  3653. };
  3654. } else {
  3655. self._hideClassButtons();
  3656. self._showMethodButtons();
  3657. };
  3658. _st(self["@sourceArea"])._val_(self._source());
  3659. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},globals.Browser)})},
  3660. args: [],
  3661. source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [ :html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [ self addNewClass ];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [ self renameClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [ self copyClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [ self removeClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [ self searchClassReferences ]].\x0a\x09methodButtons contents: [ :html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [ self removeMethod ].\x0a\x09\x09protocolSelect := html select.\x0a\x09\x09\x09\x09protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val ];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a\x09\x09\x09\x09currentProtocol := selectedProtocol.\x0a\x09\x09\x09\x09(currentProtocol isNil and: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ currentProtocol := selectedMethod category ].\x0a\x09\x09\x09\x09self protocols do: [ :each | | option |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ] ].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a\x09\x09\x09\x09\x09\x09referencesSelect\x0a\x09\x09\x09\x09onChange: [ self searchReferencesOf: referencesSelect asJQuery val ];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled';\x0a\x09\x09\x09\x09\x09\x09at: 'selected' put: 'selected'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [ :each |\x0a\x09\x09\x09\x09\x09\x09html option with: each ]] ]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [ selectedProtocol notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ self hideClassButtons ]\x0a\x09\x09\x09\x09\x09ifFalse: [ self showClassButtons ]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons ].\x0a\x09sourceArea val: self source",
  3662. messageSends: ["disableSaveButton", "contents:", "title:", "button", "onClick:", "addNewClass", "with:", "renameClass", "copyClass", "removeClass", "searchClassReferences", "removeMethod", "select", "onChange:", "setMethodProtocol:", "val", "asJQuery", "option", "at:put:", "class:", "ifTrue:", "and:", "isNil", "notNil", "category", "do:", "protocols", "=", "ifFalse:", "searchReferencesOf:", "selector", "sorted", "messageSends", "ifTrue:ifFalse:", "hideMethodButtons", "or:", "hideClassButtons", "showClassButtons", "showMethodButtons", "val:", "source"],
  3663. referencedClasses: []
  3664. }),
  3665. globals.Browser);
  3666. smalltalk.addMethod(
  3667. smalltalk.method({
  3668. selector: "updateStatus",
  3669. protocol: 'updating',
  3670. fn: function (){
  3671. var self=this;
  3672. return smalltalk.withContext(function($ctx1) {
  3673. var $1,$2,$3;
  3674. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  3675. if(smalltalk.assert($1)){
  3676. $2=self["@saveButton"];
  3677. if(($receiver = $2) == nil || $receiver == null){
  3678. $2;
  3679. } else {
  3680. _st(self["@saveButton"])._at_put_("disabled",true);
  3681. };
  3682. self["@unsavedChanges"]=false;
  3683. self["@unsavedChanges"];
  3684. } else {
  3685. $3=self["@saveButton"];
  3686. if(($receiver = $3) == nil || $receiver == null){
  3687. $3;
  3688. } else {
  3689. _st(self["@saveButton"])._removeAt_("disabled");
  3690. };
  3691. self["@unsavedChanges"]=true;
  3692. self["@unsavedChanges"];
  3693. };
  3694. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Browser)})},
  3695. args: [],
  3696. source: "updateStatus\x0a\x09sourceArea val = self source\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton at: 'disabled' put: true ].\x0a\x09\x09\x09\x09unsavedChanges := false ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton removeAt: 'disabled' ].\x0a\x09\x09\x09unsavedChanges := true ]",
  3697. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  3698. referencedClasses: []
  3699. }),
  3700. globals.Browser);
  3701. smalltalk.addMethod(
  3702. smalltalk.method({
  3703. selector: "updateTabsList",
  3704. protocol: 'updating',
  3705. fn: function (){
  3706. var self=this;
  3707. return smalltalk.withContext(function($ctx1) {
  3708. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20;
  3709. _st(self["@tabsList"])._contents_((function(html){
  3710. var li;
  3711. return smalltalk.withContext(function($ctx2) {
  3712. li=_st(html)._li();
  3713. $ctx2.sendIdx["li"]=1;
  3714. li;
  3715. $1=_st(self["@selectedTab"]).__eq("instance");
  3716. $ctx2.sendIdx["="]=1;
  3717. if(smalltalk.assert($1)){
  3718. _st(li)._class_("selected");
  3719. $ctx2.sendIdx["class:"]=1;
  3720. };
  3721. $2=li;
  3722. _st($2)._with_((function(){
  3723. return smalltalk.withContext(function($ctx3) {
  3724. $3=_st(html)._span();
  3725. $ctx3.sendIdx["span"]=1;
  3726. _st($3)._class_("ltab");
  3727. $ctx3.sendIdx["class:"]=2;
  3728. $4=_st(html)._span();
  3729. $ctx3.sendIdx["span"]=2;
  3730. _st($4)._class_("mtab");
  3731. $ctx3.sendIdx["class:"]=3;
  3732. $5=_st($4)._with_("Instance");
  3733. $ctx3.sendIdx["with:"]=2;
  3734. $5;
  3735. $6=_st(html)._span();
  3736. $ctx3.sendIdx["span"]=3;
  3737. return _st($6)._class_("rtab");
  3738. $ctx3.sendIdx["class:"]=4;
  3739. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3740. $ctx2.sendIdx["with:"]=1;
  3741. $7=_st($2)._onClick_((function(){
  3742. return smalltalk.withContext(function($ctx3) {
  3743. return self._selectTab_("instance");
  3744. $ctx3.sendIdx["selectTab:"]=1;
  3745. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3746. $ctx2.sendIdx["onClick:"]=1;
  3747. $7;
  3748. li=_st(html)._li();
  3749. $ctx2.sendIdx["li"]=2;
  3750. li;
  3751. $8=_st(self["@selectedTab"]).__eq("class");
  3752. $ctx2.sendIdx["="]=2;
  3753. if(smalltalk.assert($8)){
  3754. _st(li)._class_("selected");
  3755. $ctx2.sendIdx["class:"]=5;
  3756. };
  3757. $9=li;
  3758. _st($9)._with_((function(){
  3759. return smalltalk.withContext(function($ctx3) {
  3760. $10=_st(html)._span();
  3761. $ctx3.sendIdx["span"]=4;
  3762. _st($10)._class_("ltab");
  3763. $ctx3.sendIdx["class:"]=6;
  3764. $11=_st(html)._span();
  3765. $ctx3.sendIdx["span"]=5;
  3766. _st($11)._class_("mtab");
  3767. $ctx3.sendIdx["class:"]=7;
  3768. $12=_st($11)._with_("Class");
  3769. $ctx3.sendIdx["with:"]=4;
  3770. $12;
  3771. $13=_st(html)._span();
  3772. $ctx3.sendIdx["span"]=6;
  3773. return _st($13)._class_("rtab");
  3774. $ctx3.sendIdx["class:"]=8;
  3775. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3776. $ctx2.sendIdx["with:"]=3;
  3777. $14=_st($9)._onClick_((function(){
  3778. return smalltalk.withContext(function($ctx3) {
  3779. return self._selectTab_("class");
  3780. $ctx3.sendIdx["selectTab:"]=2;
  3781. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  3782. $ctx2.sendIdx["onClick:"]=2;
  3783. $14;
  3784. li=_st(html)._li();
  3785. li;
  3786. $15=_st(self["@selectedTab"]).__eq("comment");
  3787. if(smalltalk.assert($15)){
  3788. _st(li)._class_("selected");
  3789. $ctx2.sendIdx["class:"]=9;
  3790. };
  3791. $16=li;
  3792. _st($16)._with_((function(){
  3793. return smalltalk.withContext(function($ctx3) {
  3794. $17=_st(html)._span();
  3795. $ctx3.sendIdx["span"]=7;
  3796. _st($17)._class_("ltab");
  3797. $ctx3.sendIdx["class:"]=10;
  3798. $18=_st(html)._span();
  3799. $ctx3.sendIdx["span"]=8;
  3800. _st($18)._class_("mtab");
  3801. $ctx3.sendIdx["class:"]=11;
  3802. $19=_st($18)._with_("Comment");
  3803. $19;
  3804. return _st(_st(html)._span())._class_("rtab");
  3805. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3806. $ctx2.sendIdx["with:"]=5;
  3807. $20=_st($16)._onClick_((function(){
  3808. return smalltalk.withContext(function($ctx3) {
  3809. return self._selectTab_("comment");
  3810. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3811. return $20;
  3812. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  3813. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},globals.Browser)})},
  3814. args: [],
  3815. source: "updateTabsList\x0a\x09tabsList contents: [ :html || li |\x0a\x09li := html li.\x0a\x09selectedTab = #instance ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Instance'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #instance ].\x0a\x09li := html li.\x0a\x09selectedTab = #class ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Class'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #class ].\x0a\x09li := html li.\x0a\x09selectedTab = #comment ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Comment'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #comment ]]",
  3816. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  3817. referencedClasses: []
  3818. }),
  3819. globals.Browser);
  3820. smalltalk.addMethod(
  3821. smalltalk.method({
  3822. selector: "open",
  3823. protocol: 'convenience',
  3824. fn: function (){
  3825. var self=this;
  3826. return smalltalk.withContext(function($ctx1) {
  3827. _st(self._new())._open();
  3828. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.Browser.klass)})},
  3829. args: [],
  3830. source: "open\x0a\x09self new open",
  3831. messageSends: ["open", "new"],
  3832. referencedClasses: []
  3833. }),
  3834. globals.Browser.klass);
  3835. smalltalk.addMethod(
  3836. smalltalk.method({
  3837. selector: "openOn:",
  3838. protocol: 'convenience',
  3839. fn: function (aClass){
  3840. var self=this;
  3841. return smalltalk.withContext(function($ctx1) {
  3842. var $2,$3,$1;
  3843. $2=self._new();
  3844. _st($2)._open();
  3845. _st($2)._selectCategory_(_st(aClass)._category());
  3846. $3=_st($2)._selectClass_(aClass);
  3847. $1=$3;
  3848. return $1;
  3849. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},globals.Browser.klass)})},
  3850. args: ["aClass"],
  3851. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  3852. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
  3853. referencedClasses: []
  3854. }),
  3855. globals.Browser.klass);
  3856. smalltalk.addClass('Debugger', globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3857. smalltalk.addMethod(
  3858. smalltalk.method({
  3859. selector: "allVariables",
  3860. protocol: 'accessing',
  3861. fn: function (){
  3862. var self=this;
  3863. var all;
  3864. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3865. return smalltalk.withContext(function($ctx1) {
  3866. var $3,$2,$1,$4;
  3867. all=_st($Dictionary())._new();
  3868. $3=self._receiver();
  3869. $ctx1.sendIdx["receiver"]=1;
  3870. $2=_st($3)._class();
  3871. $1=_st($2)._allInstanceVariableNames();
  3872. _st($1)._do_((function(each){
  3873. return smalltalk.withContext(function($ctx2) {
  3874. return _st(all)._at_put_(each,_st(self._receiver())._instVarAt_(each));
  3875. $ctx2.sendIdx["at:put:"]=1;
  3876. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  3877. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3878. return smalltalk.withContext(function($ctx2) {
  3879. return _st(all)._at_put_(key,value);
  3880. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)})}));
  3881. $4=all;
  3882. return $4;
  3883. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},globals.Debugger)})},
  3884. args: [],
  3885. source: "allVariables\x0a\x09| all |\x0a\x09all := Dictionary new.\x0a\x0a\x09self receiver class allInstanceVariableNames do: [ :each |\x0a\x09\x09all at: each put: (self receiver instVarAt: each) ].\x0a\x09\x0a\x09selectedContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09all at: key put: value ].\x0a\x09\x0a\x09^ all",
  3886. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"],
  3887. referencedClasses: ["Dictionary"]
  3888. }),
  3889. globals.Debugger);
  3890. smalltalk.addMethod(
  3891. smalltalk.method({
  3892. selector: "canBeClosed",
  3893. protocol: 'testing',
  3894. fn: function (){
  3895. var self=this;
  3896. return true;
  3897. },
  3898. args: [],
  3899. source: "canBeClosed\x0a\x09^ true",
  3900. messageSends: [],
  3901. referencedClasses: []
  3902. }),
  3903. globals.Debugger);
  3904. smalltalk.addMethod(
  3905. smalltalk.method({
  3906. selector: "error",
  3907. protocol: 'accessing',
  3908. fn: function (){
  3909. var self=this;
  3910. var $1;
  3911. $1=self["@error"];
  3912. return $1;
  3913. },
  3914. args: [],
  3915. source: "error\x0a\x09^ error",
  3916. messageSends: [],
  3917. referencedClasses: []
  3918. }),
  3919. globals.Debugger);
  3920. smalltalk.addMethod(
  3921. smalltalk.method({
  3922. selector: "error:",
  3923. protocol: 'accessing',
  3924. fn: function (anError){
  3925. var self=this;
  3926. self["@error"]=anError;
  3927. return self},
  3928. args: ["anError"],
  3929. source: "error: anError\x0a\x09error := anError",
  3930. messageSends: [],
  3931. referencedClasses: []
  3932. }),
  3933. globals.Debugger);
  3934. smalltalk.addMethod(
  3935. smalltalk.method({
  3936. selector: "initialize",
  3937. protocol: 'initialization',
  3938. fn: function (){
  3939. var self=this;
  3940. return smalltalk.withContext(function($ctx1) {
  3941. globals.Debugger.superclass.fn.prototype._initialize.apply(_st(self), []);
  3942. _st(self["@unsavedChanges"]).__eq(false);
  3943. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Debugger)})},
  3944. args: [],
  3945. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  3946. messageSends: ["initialize", "="],
  3947. referencedClasses: []
  3948. }),
  3949. globals.Debugger);
  3950. smalltalk.addMethod(
  3951. smalltalk.method({
  3952. selector: "inspectSelectedVariable",
  3953. protocol: 'actions',
  3954. fn: function (){
  3955. var self=this;
  3956. return smalltalk.withContext(function($ctx1) {
  3957. _st(self["@selectedVariable"])._inspect();
  3958. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},globals.Debugger)})},
  3959. args: [],
  3960. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  3961. messageSends: ["inspect"],
  3962. referencedClasses: []
  3963. }),
  3964. globals.Debugger);
  3965. smalltalk.addMethod(
  3966. smalltalk.method({
  3967. selector: "label",
  3968. protocol: 'accessing',
  3969. fn: function (){
  3970. var self=this;
  3971. return "[ Debugger ]";
  3972. },
  3973. args: [],
  3974. source: "label\x0a\x09^ '[ Debugger ]'",
  3975. messageSends: [],
  3976. referencedClasses: []
  3977. }),
  3978. globals.Debugger);
  3979. smalltalk.addMethod(
  3980. smalltalk.method({
  3981. selector: "method",
  3982. protocol: 'accessing',
  3983. fn: function (){
  3984. var self=this;
  3985. return smalltalk.withContext(function($ctx1) {
  3986. var $1;
  3987. $1=_st(self["@selectedContext"])._method();
  3988. return $1;
  3989. }, function($ctx1) {$ctx1.fill(self,"method",{},globals.Debugger)})},
  3990. args: [],
  3991. source: "method\x0a\x09^ selectedContext method",
  3992. messageSends: ["method"],
  3993. referencedClasses: []
  3994. }),
  3995. globals.Debugger);
  3996. smalltalk.addMethod(
  3997. smalltalk.method({
  3998. selector: "proceed",
  3999. protocol: 'actions',
  4000. fn: function (){
  4001. var self=this;
  4002. return smalltalk.withContext(function($ctx1) {
  4003. self._close();
  4004. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  4005. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},globals.Debugger)})},
  4006. args: [],
  4007. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  4008. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  4009. referencedClasses: []
  4010. }),
  4011. globals.Debugger);
  4012. smalltalk.addMethod(
  4013. smalltalk.method({
  4014. selector: "receiver",
  4015. protocol: 'accessing',
  4016. fn: function (){
  4017. var self=this;
  4018. return smalltalk.withContext(function($ctx1) {
  4019. var $1;
  4020. $1=_st(self["@selectedContext"])._receiver();
  4021. return $1;
  4022. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.Debugger)})},
  4023. args: [],
  4024. source: "receiver\x0a\x09^ selectedContext receiver",
  4025. messageSends: ["receiver"],
  4026. referencedClasses: []
  4027. }),
  4028. globals.Debugger);
  4029. smalltalk.addMethod(
  4030. smalltalk.method({
  4031. selector: "renderBottomPanelOn:",
  4032. protocol: 'rendering',
  4033. fn: function (html){
  4034. var self=this;
  4035. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4036. return smalltalk.withContext(function($ctx1) {
  4037. var $1,$2;
  4038. $1=_st(html)._div();
  4039. $ctx1.sendIdx["div"]=1;
  4040. _st($1)._class_("amber_sourceCode debugger");
  4041. $ctx1.sendIdx["class:"]=1;
  4042. $2=_st($1)._with_((function(){
  4043. return smalltalk.withContext(function($ctx2) {
  4044. self["@sourceArea"]=_st($SourceArea())._new();
  4045. self["@sourceArea"];
  4046. return _st(self["@sourceArea"])._renderOn_(html);
  4047. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4048. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  4049. $ctx1.sendIdx["class:"]=2;
  4050. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  4051. _st(self["@sourceArea"])._onKeyUp_((function(){
  4052. return smalltalk.withContext(function($ctx2) {
  4053. return self._updateStatus();
  4054. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4055. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Debugger)})},
  4056. args: ["html"],
  4057. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'amber_sourceCode debugger';\x0a\x09\x09with: [\x0a\x09\x09\x09sourceArea := SourceArea new.\x0a\x09\x09\x09sourceArea renderOn: html ].\x0a\x09ul2 := html ul class: 'amber_column debugger variables'.\x0a\x09inspector := html div class: 'amber_column debugger inspector'.\x0a\x09sourceArea\x0a\x09\x09onKeyUp: [ self updateStatus ]",
  4058. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
  4059. referencedClasses: ["SourceArea"]
  4060. }),
  4061. globals.Debugger);
  4062. smalltalk.addMethod(
  4063. smalltalk.method({
  4064. selector: "renderBoxOn:",
  4065. protocol: 'rendering',
  4066. fn: function (html){
  4067. var self=this;
  4068. return smalltalk.withContext(function($ctx1) {
  4069. var $1;
  4070. self._renderTopPanelOn_(html);
  4071. $1=self._renderBottomPanelOn_(html);
  4072. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Debugger)})},
  4073. args: ["html"],
  4074. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4075. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4076. referencedClasses: []
  4077. }),
  4078. globals.Debugger);
  4079. smalltalk.addMethod(
  4080. smalltalk.method({
  4081. selector: "renderButtonsOn:",
  4082. protocol: 'rendering',
  4083. fn: function (html){
  4084. var self=this;
  4085. return smalltalk.withContext(function($ctx1) {
  4086. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  4087. $1=_st(html)._button();
  4088. $ctx1.sendIdx["button"]=1;
  4089. _st($1)._with_("Save");
  4090. $ctx1.sendIdx["with:"]=1;
  4091. $2=_st($1)._onClick_((function(){
  4092. return smalltalk.withContext(function($ctx2) {
  4093. return self._save();
  4094. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4095. $ctx1.sendIdx["onClick:"]=1;
  4096. self["@saveButton"]=$2;
  4097. $3=_st(html)._button();
  4098. $ctx1.sendIdx["button"]=2;
  4099. _st($3)._with_("DoIt");
  4100. $ctx1.sendIdx["with:"]=2;
  4101. $4=_st($3)._onClick_((function(){
  4102. return smalltalk.withContext(function($ctx2) {
  4103. return _st(self["@sourceArea"])._doIt();
  4104. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4105. $ctx1.sendIdx["onClick:"]=2;
  4106. $5=_st(html)._button();
  4107. $ctx1.sendIdx["button"]=3;
  4108. _st($5)._with_("PrintIt");
  4109. $ctx1.sendIdx["with:"]=3;
  4110. $6=_st($5)._onClick_((function(){
  4111. return smalltalk.withContext(function($ctx2) {
  4112. return _st(self["@sourceArea"])._printIt();
  4113. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4114. $ctx1.sendIdx["onClick:"]=3;
  4115. $7=_st(html)._button();
  4116. $ctx1.sendIdx["button"]=4;
  4117. _st($7)._with_("InspectIt");
  4118. $ctx1.sendIdx["with:"]=4;
  4119. $8=_st($7)._onClick_((function(){
  4120. return smalltalk.withContext(function($ctx2) {
  4121. return _st(self["@sourceArea"])._inspectIt();
  4122. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  4123. $ctx1.sendIdx["onClick:"]=4;
  4124. $9=_st(html)._button();
  4125. $ctx1.sendIdx["button"]=5;
  4126. _st($9)._with_("Proceed");
  4127. $ctx1.sendIdx["with:"]=5;
  4128. $10=_st($9)._onClick_((function(){
  4129. return smalltalk.withContext(function($ctx2) {
  4130. return self._proceed();
  4131. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  4132. $ctx1.sendIdx["onClick:"]=5;
  4133. $11=_st(html)._button();
  4134. $ctx1.sendIdx["button"]=6;
  4135. _st($11)._with_("Abandon");
  4136. $ctx1.sendIdx["with:"]=6;
  4137. $12=_st($11)._onClick_((function(){
  4138. return smalltalk.withContext(function($ctx2) {
  4139. return self._close();
  4140. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  4141. $ctx1.sendIdx["onClick:"]=6;
  4142. $13=_st(html)._button();
  4143. _st($13)._class_("amber_button debugger inspect");
  4144. _st($13)._with_("Inspect");
  4145. $14=_st($13)._onClick_((function(){
  4146. return smalltalk.withContext(function($ctx2) {
  4147. return self._inspectSelectedVariable();
  4148. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
  4149. self["@inspectButton"]=$14;
  4150. self._updateSourceArea();
  4151. self._updateStatus();
  4152. self._updateVariablesList();
  4153. $15=self._updateInspector();
  4154. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Debugger)})},
  4155. args: ["html"],
  4156. source: "renderButtonsOn: html\x0a\x09saveButton := html button\x0a\x09\x09with: 'Save';\x0a\x09\x09onClick: [ self save ].\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ sourceArea inspectIt ].\x0a\x09html button\x0a\x09\x09with: 'Proceed';\x0a\x09\x09onClick: [ self proceed ].\x0a\x09html button\x0a\x09\x09with: 'Abandon';\x0a\x09\x09onClick: [ self close ].\x0a\x09inspectButton := html button\x0a\x09\x09class: 'amber_button debugger inspect';\x0a\x09\x09with: 'Inspect';\x0a\x09\x09onClick: [ self inspectSelectedVariable ].\x0a\x09self\x0a\x09\x09updateSourceArea;\x0a\x09\x09updateStatus;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateInspector",
  4157. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  4158. referencedClasses: []
  4159. }),
  4160. globals.Debugger);
  4161. smalltalk.addMethod(
  4162. smalltalk.method({
  4163. selector: "renderContext:on:",
  4164. protocol: 'rendering',
  4165. fn: function (aContext,html){
  4166. var self=this;
  4167. var li;
  4168. return smalltalk.withContext(function($ctx1) {
  4169. var $1,$2,$3,$4;
  4170. li=_st(html)._li();
  4171. $1=_st(self["@selectedContext"]).__eq(aContext);
  4172. if(smalltalk.assert($1)){
  4173. _st(li)._class_("selected");
  4174. };
  4175. $2=li;
  4176. _st($2)._with_(_st(aContext)._asString());
  4177. $3=_st($2)._onClick_((function(){
  4178. return smalltalk.withContext(function($ctx2) {
  4179. return self._selectContext_(aContext);
  4180. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4181. $4=_st(aContext)._outerContext();
  4182. $ctx1.sendIdx["outerContext"]=1;
  4183. if(($receiver = $4) == nil || $receiver == null){
  4184. $4;
  4185. } else {
  4186. self._renderContext_on_(_st(aContext)._outerContext(),html);
  4187. };
  4188. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},globals.Debugger)})},
  4189. args: ["aContext", "html"],
  4190. source: "renderContext: aContext on: html\x0a\x09| li |\x0a\x09li := html li.\x0a\x09selectedContext = aContext ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: aContext asString;\x0a\x09\x09onClick: [ self selectContext: aContext ].\x0a\x09aContext outerContext ifNotNil: [ self renderContext: aContext outerContext on: html ]",
  4191. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"],
  4192. referencedClasses: []
  4193. }),
  4194. globals.Debugger);
  4195. smalltalk.addMethod(
  4196. smalltalk.method({
  4197. selector: "renderTopPanelOn:",
  4198. protocol: 'rendering',
  4199. fn: function (html){
  4200. var self=this;
  4201. return smalltalk.withContext(function($ctx1) {
  4202. var $1,$2,$4,$6,$8,$7,$5,$9,$10,$3;
  4203. $1=self._error();
  4204. $ctx1.sendIdx["error"]=1;
  4205. self["@selectedContext"]=_st($1)._context();
  4206. $ctx1.sendIdx["context"]=1;
  4207. $2=_st(html)._div();
  4208. $ctx1.sendIdx["div"]=1;
  4209. _st($2)._class_("top");
  4210. $ctx1.sendIdx["class:"]=1;
  4211. $3=_st($2)._with_((function(){
  4212. return smalltalk.withContext(function($ctx2) {
  4213. $4=_st(html)._div();
  4214. _st($4)._class_("label");
  4215. $ctx2.sendIdx["class:"]=2;
  4216. $6=$4;
  4217. $8=self._error();
  4218. $ctx2.sendIdx["error"]=2;
  4219. $7=_st($8)._messageText();
  4220. $5=_st($6)._with_($7);
  4221. $ctx2.sendIdx["with:"]=2;
  4222. $5;
  4223. $9=_st(html)._ul();
  4224. _st($9)._class_("amber_column debugger contexts");
  4225. $10=_st($9)._with_((function(){
  4226. return smalltalk.withContext(function($ctx3) {
  4227. return self._renderContext_on_(_st(self._error())._context(),html);
  4228. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4229. self["@ul"]=$10;
  4230. return self["@ul"];
  4231. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4232. $ctx1.sendIdx["with:"]=1;
  4233. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Debugger)})},
  4234. args: ["html"],
  4235. source: "renderTopPanelOn: html\x0a\x09selectedContext := self error context.\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09html div\x0a\x09\x09\x09\x09class: 'label';\x0a\x09\x09\x09\x09with: self error messageText.\x0a\x09\x09\x09ul := html ul\x0a\x09\x09\x09\x09class: 'amber_column debugger contexts';\x0a\x09\x09\x09\x09with: [ self renderContext: self error context on: html ]]",
  4236. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
  4237. referencedClasses: []
  4238. }),
  4239. globals.Debugger);
  4240. smalltalk.addMethod(
  4241. smalltalk.method({
  4242. selector: "save",
  4243. protocol: 'actions',
  4244. fn: function (){
  4245. var self=this;
  4246. var protocol;
  4247. return smalltalk.withContext(function($ctx1) {
  4248. var $4,$3,$2,$1;
  4249. $4=_st(self["@selectedContext"])._receiver();
  4250. $ctx1.sendIdx["receiver"]=1;
  4251. $3=_st($4)._class();
  4252. $ctx1.sendIdx["class"]=1;
  4253. $2=_st($3)._methodDictionary();
  4254. $1=_st($2)._at_(_st(self["@selectedContext"])._selector());
  4255. protocol=_st($1)._category();
  4256. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  4257. self._updateStatus();
  4258. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},globals.Debugger)})},
  4259. args: [],
  4260. source: "save\x0a\x09| protocol |\x0a\x09protocol := (selectedContext receiver class methodDictionary at: selectedContext selector) category.\x0a\x09selectedContext receiver class compile: sourceArea val category: protocol.\x0a\x09self updateStatus",
  4261. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  4262. referencedClasses: []
  4263. }),
  4264. globals.Debugger);
  4265. smalltalk.addMethod(
  4266. smalltalk.method({
  4267. selector: "selectContext:",
  4268. protocol: 'actions',
  4269. fn: function (aContext){
  4270. var self=this;
  4271. return smalltalk.withContext(function($ctx1) {
  4272. var $1;
  4273. self["@selectedContext"]=aContext;
  4274. self["@selectedVariable"]=nil;
  4275. self["@selectedVariableName"]=nil;
  4276. self._updateContextsList();
  4277. self._updateSourceArea();
  4278. self._updateInspector();
  4279. self._updateVariablesList();
  4280. $1=self._updateStatus();
  4281. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},globals.Debugger)})},
  4282. args: ["aContext"],
  4283. source: "selectContext: aContext\x0a\x09selectedContext := aContext.\x0a\x09selectedVariable := nil.\x0a\x09selectedVariableName := nil.\x0a\x09self\x0a\x09\x09updateContextsList;\x0a\x09\x09updateSourceArea;\x0a\x09\x09updateInspector;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateStatus",
  4284. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  4285. referencedClasses: []
  4286. }),
  4287. globals.Debugger);
  4288. smalltalk.addMethod(
  4289. smalltalk.method({
  4290. selector: "selectVariable:named:",
  4291. protocol: 'actions',
  4292. fn: function (anObject,aString){
  4293. var self=this;
  4294. return smalltalk.withContext(function($ctx1) {
  4295. self["@selectedVariable"]=anObject;
  4296. self["@selectedVariableName"]=aString;
  4297. _st(self["@inspector"])._contents_((function(html){
  4298. return smalltalk.withContext(function($ctx2) {
  4299. return _st(html)._with_(_st(anObject)._printString());
  4300. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4301. self._updateVariablesList();
  4302. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},globals.Debugger)})},
  4303. args: ["anObject", "aString"],
  4304. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  4305. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  4306. referencedClasses: []
  4307. }),
  4308. globals.Debugger);
  4309. smalltalk.addMethod(
  4310. smalltalk.method({
  4311. selector: "source",
  4312. protocol: 'accessing',
  4313. fn: function (){
  4314. var self=this;
  4315. return smalltalk.withContext(function($ctx1) {
  4316. var $2,$1;
  4317. $2=self._method();
  4318. $ctx1.sendIdx["method"]=1;
  4319. if(($receiver = $2) == nil || $receiver == null){
  4320. $1="Method doesn't exist!";
  4321. } else {
  4322. $1=_st(self._method())._source();
  4323. };
  4324. return $1;
  4325. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Debugger)})},
  4326. args: [],
  4327. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  4328. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  4329. referencedClasses: []
  4330. }),
  4331. globals.Debugger);
  4332. smalltalk.addMethod(
  4333. smalltalk.method({
  4334. selector: "updateContextsList",
  4335. protocol: 'updating',
  4336. fn: function (){
  4337. var self=this;
  4338. return smalltalk.withContext(function($ctx1) {
  4339. _st(self["@ul"])._contents_((function(html){
  4340. return smalltalk.withContext(function($ctx2) {
  4341. return self._renderContext_on_(_st(self._error())._context(),html);
  4342. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4343. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},globals.Debugger)})},
  4344. args: [],
  4345. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  4346. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  4347. referencedClasses: []
  4348. }),
  4349. globals.Debugger);
  4350. smalltalk.addMethod(
  4351. smalltalk.method({
  4352. selector: "updateInspector",
  4353. protocol: 'updating',
  4354. fn: function (){
  4355. var self=this;
  4356. return smalltalk.withContext(function($ctx1) {
  4357. _st(self["@inspector"])._contents_((function(html){
  4358. return smalltalk.withContext(function($ctx2) {
  4359. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4360. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},globals.Debugger)})},
  4361. args: [],
  4362. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  4363. messageSends: ["contents:"],
  4364. referencedClasses: []
  4365. }),
  4366. globals.Debugger);
  4367. smalltalk.addMethod(
  4368. smalltalk.method({
  4369. selector: "updateSourceArea",
  4370. protocol: 'updating',
  4371. fn: function (){
  4372. var self=this;
  4373. return smalltalk.withContext(function($ctx1) {
  4374. _st(self["@sourceArea"])._val_(self._source());
  4375. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},globals.Debugger)})},
  4376. args: [],
  4377. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  4378. messageSends: ["val:", "source"],
  4379. referencedClasses: []
  4380. }),
  4381. globals.Debugger);
  4382. smalltalk.addMethod(
  4383. smalltalk.method({
  4384. selector: "updateStatus",
  4385. protocol: 'updating',
  4386. fn: function (){
  4387. var self=this;
  4388. return smalltalk.withContext(function($ctx1) {
  4389. var $1,$2,$3;
  4390. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  4391. if(smalltalk.assert($1)){
  4392. $2=self["@saveButton"];
  4393. if(($receiver = $2) == nil || $receiver == null){
  4394. $2;
  4395. } else {
  4396. _st(self["@saveButton"])._at_put_("disabled",true);
  4397. };
  4398. self["@unsavedChanges"]=false;
  4399. self["@unsavedChanges"];
  4400. } else {
  4401. $3=self["@saveButton"];
  4402. if(($receiver = $3) == nil || $receiver == null){
  4403. $3;
  4404. } else {
  4405. _st(self["@saveButton"])._removeAt_("disabled");
  4406. };
  4407. self["@unsavedChanges"]=true;
  4408. self["@unsavedChanges"];
  4409. };
  4410. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Debugger)})},
  4411. args: [],
  4412. source: "updateStatus\x0a\x09sourceArea val = self source\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton at: 'disabled' put: true ].\x0a\x09\x09\x09unsavedChanges := false ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09saveButton ifNotNil: [\x0a\x09\x09\x09\x09saveButton removeAt: 'disabled' ].\x0a\x09\x09\x09unsavedChanges := true ]",
  4413. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  4414. referencedClasses: []
  4415. }),
  4416. globals.Debugger);
  4417. smalltalk.addMethod(
  4418. smalltalk.method({
  4419. selector: "updateVariablesList",
  4420. protocol: 'updating',
  4421. fn: function (){
  4422. var self=this;
  4423. return smalltalk.withContext(function($ctx1) {
  4424. var $1,$2,$3,$4,$5,$6,$7;
  4425. _st(self["@ul2"])._contents_((function(html){
  4426. var li;
  4427. return smalltalk.withContext(function($ctx2) {
  4428. $1=_st(html)._li();
  4429. $ctx2.sendIdx["li"]=1;
  4430. _st($1)._with_("self");
  4431. $ctx2.sendIdx["with:"]=1;
  4432. $2=_st($1)._onClick_((function(){
  4433. return smalltalk.withContext(function($ctx3) {
  4434. return self._selectVariable_named_(self._receiver(),"self");
  4435. $ctx3.sendIdx["selectVariable:named:"]=1;
  4436. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4437. $ctx2.sendIdx["onClick:"]=1;
  4438. li=$2;
  4439. li;
  4440. $3=_st(self["@selectedVariableName"]).__eq("self");
  4441. $ctx2.sendIdx["="]=1;
  4442. if(smalltalk.assert($3)){
  4443. _st(li)._class_("selected");
  4444. $ctx2.sendIdx["class:"]=1;
  4445. };
  4446. return _st(self._allVariables())._keysAndValuesDo_((function(key,value){
  4447. return smalltalk.withContext(function($ctx3) {
  4448. $4=_st(html)._li();
  4449. _st($4)._with_(key);
  4450. $5=_st($4)._onClick_((function(){
  4451. return smalltalk.withContext(function($ctx4) {
  4452. return self._selectVariable_named_(value,key);
  4453. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  4454. li=$5;
  4455. li;
  4456. $6=_st(self["@selectedVariableName"]).__eq(key);
  4457. if(smalltalk.assert($6)){
  4458. return _st(li)._class_("selected");
  4459. };
  4460. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)})}));
  4461. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  4462. $7=self["@selectedVariable"];
  4463. if(($receiver = $7) == nil || $receiver == null){
  4464. _st(self["@inspectButton"])._at_put_("disabled",true);
  4465. } else {
  4466. _st(self["@inspectButton"])._removeAt_("disabled");
  4467. };
  4468. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.Debugger)})},
  4469. args: [],
  4470. source: "updateVariablesList\x0a\x09ul2 contents: [ :html | | li |\x0a\x09\x09li := html li\x0a\x09\x09\x09with: 'self';\x0a\x09\x09\x09onClick: [ self selectVariable: self receiver named: 'self' ].\x0a\x09\x09\x09\x09selectedVariableName = 'self' ifTrue: [ li class: 'selected' ].\x0a\x09\x09\x0a\x09\x09self allVariables keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09\x09\x09\x09li := html li\x0a\x09\x09\x09\x09\x09\x09\x09with: key;\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ self selectVariable: value named: key ].\x0a\x09\x09\x09\x09\x09\x09selectedVariableName = key ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09li class: 'selected' ] ] ].\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09selectedVariable\x0a\x09\x09ifNil: [ inspectButton at: 'disabled' put: true ]\x0a\x09\x09ifNotNil: [ inspectButton removeAt: 'disabled' ]",
  4471. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  4472. referencedClasses: []
  4473. }),
  4474. globals.Debugger);
  4475. smalltalk.addClass('IDEInspector', globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  4476. smalltalk.addMethod(
  4477. smalltalk.method({
  4478. selector: "canBeClosed",
  4479. protocol: 'testing',
  4480. fn: function (){
  4481. var self=this;
  4482. return true;
  4483. },
  4484. args: [],
  4485. source: "canBeClosed\x0a\x09^ true",
  4486. messageSends: [],
  4487. referencedClasses: []
  4488. }),
  4489. globals.IDEInspector);
  4490. smalltalk.addMethod(
  4491. smalltalk.method({
  4492. selector: "dive",
  4493. protocol: 'actions',
  4494. fn: function (){
  4495. var self=this;
  4496. return smalltalk.withContext(function($ctx1) {
  4497. _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
  4498. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},globals.IDEInspector)})},
  4499. args: [],
  4500. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  4501. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  4502. referencedClasses: []
  4503. }),
  4504. globals.IDEInspector);
  4505. smalltalk.addMethod(
  4506. smalltalk.method({
  4507. selector: "inspect:",
  4508. protocol: 'actions',
  4509. fn: function (anObject){
  4510. var self=this;
  4511. return smalltalk.withContext(function($ctx1) {
  4512. self["@object"]=anObject;
  4513. self["@variables"]=[];
  4514. _st(self["@object"])._inspectOn_(self);
  4515. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector)})},
  4516. args: ["anObject"],
  4517. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  4518. messageSends: ["inspectOn:"],
  4519. referencedClasses: []
  4520. }),
  4521. globals.IDEInspector);
  4522. smalltalk.addMethod(
  4523. smalltalk.method({
  4524. selector: "label",
  4525. protocol: 'accessing',
  4526. fn: function (){
  4527. var self=this;
  4528. return smalltalk.withContext(function($ctx1) {
  4529. var $2,$1;
  4530. $2=self["@label"];
  4531. if(($receiver = $2) == nil || $receiver == null){
  4532. $1="Inspector (nil)";
  4533. } else {
  4534. $1=$2;
  4535. };
  4536. return $1;
  4537. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.IDEInspector)})},
  4538. args: [],
  4539. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  4540. messageSends: ["ifNil:"],
  4541. referencedClasses: []
  4542. }),
  4543. globals.IDEInspector);
  4544. smalltalk.addMethod(
  4545. smalltalk.method({
  4546. selector: "refresh",
  4547. protocol: 'actions',
  4548. fn: function (){
  4549. var self=this;
  4550. return smalltalk.withContext(function($ctx1) {
  4551. var $1;
  4552. self._inspect_(self["@object"]);
  4553. self._updateVariablesList();
  4554. $1=self._updateValueTextarea();
  4555. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.IDEInspector)})},
  4556. args: [],
  4557. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  4558. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  4559. referencedClasses: []
  4560. }),
  4561. globals.IDEInspector);
  4562. smalltalk.addMethod(
  4563. smalltalk.method({
  4564. selector: "renderBottomPanelOn:",
  4565. protocol: 'rendering',
  4566. fn: function (html){
  4567. var self=this;
  4568. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4569. return smalltalk.withContext(function($ctx1) {
  4570. var $1,$3,$4,$2;
  4571. $1=_st(html)._div();
  4572. _st($1)._class_("amber_sourceCode");
  4573. $2=_st($1)._with_((function(){
  4574. return smalltalk.withContext(function($ctx2) {
  4575. $3=_st($SourceArea())._new();
  4576. _st($3)._receiver_(self["@object"]);
  4577. _st($3)._onDoIt_((function(){
  4578. return smalltalk.withContext(function($ctx3) {
  4579. return self._refresh();
  4580. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4581. $4=_st($3)._yourself();
  4582. self["@sourceArea"]=$4;
  4583. self["@sourceArea"];
  4584. return _st(self["@sourceArea"])._renderOn_(html);
  4585. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4586. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.IDEInspector)})},
  4587. args: ["html"],
  4588. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [ self refresh ];\x0a\x09\x09yourself.\x0a\x09\x09\x09sourceArea renderOn: html ]",
  4589. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
  4590. referencedClasses: ["SourceArea"]
  4591. }),
  4592. globals.IDEInspector);
  4593. smalltalk.addMethod(
  4594. smalltalk.method({
  4595. selector: "renderBoxOn:",
  4596. protocol: 'rendering',
  4597. fn: function (html){
  4598. var self=this;
  4599. return smalltalk.withContext(function($ctx1) {
  4600. var $1;
  4601. self._renderTopPanelOn_(html);
  4602. $1=self._renderBottomPanelOn_(html);
  4603. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDEInspector)})},
  4604. args: ["html"],
  4605. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4606. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4607. referencedClasses: []
  4608. }),
  4609. globals.IDEInspector);
  4610. smalltalk.addMethod(
  4611. smalltalk.method({
  4612. selector: "renderButtonsOn:",
  4613. protocol: 'rendering',
  4614. fn: function (html){
  4615. var self=this;
  4616. return smalltalk.withContext(function($ctx1) {
  4617. var $1,$3,$2,$4,$6,$5,$7,$8;
  4618. $1=_st(html)._button();
  4619. $ctx1.sendIdx["button"]=1;
  4620. _st($1)._with_("DoIt");
  4621. $ctx1.sendIdx["with:"]=1;
  4622. $2=_st($1)._onClick_((function(){
  4623. return smalltalk.withContext(function($ctx2) {
  4624. $3=self._sourceArea();
  4625. $ctx2.sendIdx["sourceArea"]=1;
  4626. return _st($3)._doIt();
  4627. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4628. $ctx1.sendIdx["onClick:"]=1;
  4629. $4=_st(html)._button();
  4630. $ctx1.sendIdx["button"]=2;
  4631. _st($4)._with_("PrintIt");
  4632. $ctx1.sendIdx["with:"]=2;
  4633. $5=_st($4)._onClick_((function(){
  4634. return smalltalk.withContext(function($ctx2) {
  4635. $6=self._sourceArea();
  4636. $ctx2.sendIdx["sourceArea"]=2;
  4637. return _st($6)._printIt();
  4638. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4639. $ctx1.sendIdx["onClick:"]=2;
  4640. $7=_st(html)._button();
  4641. _st($7)._with_("InspectIt");
  4642. $8=_st($7)._onClick_((function(){
  4643. return smalltalk.withContext(function($ctx2) {
  4644. return _st(self._sourceArea())._inspectIt();
  4645. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4646. self._updateButtons();
  4647. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDEInspector)})},
  4648. args: ["html"],
  4649. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ self sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ self sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ self sourceArea inspectIt ].\x0a\x09self updateButtons",
  4650. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
  4651. referencedClasses: []
  4652. }),
  4653. globals.IDEInspector);
  4654. smalltalk.addMethod(
  4655. smalltalk.method({
  4656. selector: "renderTopPanelOn:",
  4657. protocol: 'rendering',
  4658. fn: function (html){
  4659. var self=this;
  4660. return smalltalk.withContext(function($ctx1) {
  4661. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11;
  4662. $1=_st(html)._div();
  4663. $ctx1.sendIdx["div"]=1;
  4664. _st($1)._class_("top");
  4665. $ctx1.sendIdx["class:"]=1;
  4666. $2=_st($1)._with_((function(){
  4667. return smalltalk.withContext(function($ctx2) {
  4668. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  4669. $ctx2.sendIdx["class:"]=2;
  4670. self["@variablesList"];
  4671. $3=_st(html)._textarea();
  4672. _st($3)._class_("amber_column value");
  4673. $ctx2.sendIdx["class:"]=3;
  4674. _st($3)._at_put_("readonly","readonly");
  4675. $4=_st($3)._yourself();
  4676. self["@valueTextarea"]=$4;
  4677. self["@valueTextarea"];
  4678. $5=_st(html)._div();
  4679. $ctx2.sendIdx["div"]=2;
  4680. _st($5)._class_("amber_tabs inspector");
  4681. $ctx2.sendIdx["class:"]=4;
  4682. $6=_st($5)._with_((function(){
  4683. return smalltalk.withContext(function($ctx3) {
  4684. $7=_st(html)._button();
  4685. $ctx3.sendIdx["button"]=1;
  4686. _st($7)._class_("amber_button inspector refresh");
  4687. $ctx3.sendIdx["class:"]=5;
  4688. _st($7)._with_("Refresh");
  4689. $ctx3.sendIdx["with:"]=3;
  4690. $8=_st($7)._onClick_((function(){
  4691. return smalltalk.withContext(function($ctx4) {
  4692. return self._refresh();
  4693. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4694. $ctx3.sendIdx["onClick:"]=1;
  4695. $8;
  4696. $9=_st(html)._button();
  4697. _st($9)._class_("amber_button inspector dive");
  4698. $ctx3.sendIdx["class:"]=6;
  4699. _st($9)._with_("Dive");
  4700. $10=_st($9)._onClick_((function(){
  4701. return smalltalk.withContext(function($ctx4) {
  4702. return self._dive();
  4703. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  4704. self["@diveButton"]=$10;
  4705. return self["@diveButton"];
  4706. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4707. $ctx2.sendIdx["with:"]=2;
  4708. $6;
  4709. return _st(_st(html)._div())._class_("amber_clear");
  4710. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4711. $ctx1.sendIdx["with:"]=1;
  4712. self._updateVariablesList();
  4713. $11=self._updateValueTextarea();
  4714. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.IDEInspector)})},
  4715. args: ["html"],
  4716. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09variablesList := html ul class: 'amber_column variables'.\x0a\x09\x09\x09valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'; yourself.\x0a\x09\x09\x09html div class: 'amber_tabs inspector'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector refresh';\x0a\x09\x09\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09\x09\x09onClick: [ self refresh ].\x0a\x09\x09\x09\x09diveButton := html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector dive';\x0a\x09\x09\x09\x09\x09with: 'Dive';\x0a\x09\x09\x09\x09\x09onClick: [ self dive ]].\x0a\x09\x09\x09html div class: 'amber_clear' ].\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea.",
  4717. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  4718. referencedClasses: []
  4719. }),
  4720. globals.IDEInspector);
  4721. smalltalk.addMethod(
  4722. smalltalk.method({
  4723. selector: "selectVariable:",
  4724. protocol: 'updating',
  4725. fn: function (aString){
  4726. var self=this;
  4727. return smalltalk.withContext(function($ctx1) {
  4728. var $1;
  4729. self._selectedVariable_(aString);
  4730. self._updateVariablesList();
  4731. self._updateValueTextarea();
  4732. $1=self._updateButtons();
  4733. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},globals.IDEInspector)})},
  4734. args: ["aString"],
  4735. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  4736. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  4737. referencedClasses: []
  4738. }),
  4739. globals.IDEInspector);
  4740. smalltalk.addMethod(
  4741. smalltalk.method({
  4742. selector: "selectedVariable",
  4743. protocol: 'accessing',
  4744. fn: function (){
  4745. var self=this;
  4746. var $1;
  4747. $1=self["@selectedVariable"];
  4748. return $1;
  4749. },
  4750. args: [],
  4751. source: "selectedVariable\x0a\x09^ selectedVariable",
  4752. messageSends: [],
  4753. referencedClasses: []
  4754. }),
  4755. globals.IDEInspector);
  4756. smalltalk.addMethod(
  4757. smalltalk.method({
  4758. selector: "selectedVariable:",
  4759. protocol: 'accessing',
  4760. fn: function (aString){
  4761. var self=this;
  4762. self["@selectedVariable"]=aString;
  4763. return self},
  4764. args: ["aString"],
  4765. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  4766. messageSends: [],
  4767. referencedClasses: []
  4768. }),
  4769. globals.IDEInspector);
  4770. smalltalk.addMethod(
  4771. smalltalk.method({
  4772. selector: "setLabel:",
  4773. protocol: 'accessing',
  4774. fn: function (aString){
  4775. var self=this;
  4776. self["@label"]=aString;
  4777. return self},
  4778. args: ["aString"],
  4779. source: "setLabel: aString\x0a\x09label := aString",
  4780. messageSends: [],
  4781. referencedClasses: []
  4782. }),
  4783. globals.IDEInspector);
  4784. smalltalk.addMethod(
  4785. smalltalk.method({
  4786. selector: "setVariables:",
  4787. protocol: 'accessing',
  4788. fn: function (aCollection){
  4789. var self=this;
  4790. self["@variables"]=aCollection;
  4791. return self},
  4792. args: ["aCollection"],
  4793. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  4794. messageSends: [],
  4795. referencedClasses: []
  4796. }),
  4797. globals.IDEInspector);
  4798. smalltalk.addMethod(
  4799. smalltalk.method({
  4800. selector: "sourceArea",
  4801. protocol: 'accessing',
  4802. fn: function (){
  4803. var self=this;
  4804. var $1;
  4805. $1=self["@sourceArea"];
  4806. return $1;
  4807. },
  4808. args: [],
  4809. source: "sourceArea\x0a\x09^ sourceArea",
  4810. messageSends: [],
  4811. referencedClasses: []
  4812. }),
  4813. globals.IDEInspector);
  4814. smalltalk.addMethod(
  4815. smalltalk.method({
  4816. selector: "updateButtons",
  4817. protocol: 'updating',
  4818. fn: function (){
  4819. var self=this;
  4820. return smalltalk.withContext(function($ctx1) {
  4821. var $3,$2,$1;
  4822. $3=self._selectedVariable();
  4823. $ctx1.sendIdx["selectedVariable"]=1;
  4824. $2=_st($3)._notNil();
  4825. $ctx1.sendIdx["notNil"]=1;
  4826. $1=_st($2)._and_((function(){
  4827. return smalltalk.withContext(function($ctx2) {
  4828. return _st(_st(self._variables())._at_(self._selectedVariable()))._notNil();
  4829. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4830. if(smalltalk.assert($1)){
  4831. _st(self["@diveButton"])._removeAt_("disabled");
  4832. } else {
  4833. _st(self["@diveButton"])._at_put_("disabled",true);
  4834. };
  4835. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},globals.IDEInspector)})},
  4836. args: [],
  4837. source: "updateButtons\x0a\x09(self selectedVariable notNil and: [ (self variables at: self selectedVariable) notNil ])\x0a\x09\x09ifFalse: [ diveButton at: 'disabled' put: true ]\x0a\x09\x09ifTrue: [ diveButton removeAt: 'disabled' ]",
  4838. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  4839. referencedClasses: []
  4840. }),
  4841. globals.IDEInspector);
  4842. smalltalk.addMethod(
  4843. smalltalk.method({
  4844. selector: "updateValueTextarea",
  4845. protocol: 'updating',
  4846. fn: function (){
  4847. var self=this;
  4848. return smalltalk.withContext(function($ctx1) {
  4849. var $1,$4,$3,$2;
  4850. $1=_st(self["@valueTextarea"])._asJQuery();
  4851. $4=self._selectedVariable();
  4852. $ctx1.sendIdx["selectedVariable"]=1;
  4853. $3=_st($4)._isNil();
  4854. if(smalltalk.assert($3)){
  4855. $2="";
  4856. } else {
  4857. $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
  4858. };
  4859. _st($1)._val_($2);
  4860. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},globals.IDEInspector)})},
  4861. args: [],
  4862. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  4863. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  4864. referencedClasses: []
  4865. }),
  4866. globals.IDEInspector);
  4867. smalltalk.addMethod(
  4868. smalltalk.method({
  4869. selector: "updateVariablesList",
  4870. protocol: 'updating',
  4871. fn: function (){
  4872. var self=this;
  4873. return smalltalk.withContext(function($ctx1) {
  4874. var $1,$2,$3;
  4875. _st(self["@variablesList"])._contents_((function(html){
  4876. return smalltalk.withContext(function($ctx2) {
  4877. return _st(self._variables())._keysDo_((function(each){
  4878. var li;
  4879. return smalltalk.withContext(function($ctx3) {
  4880. li=_st(html)._li();
  4881. li;
  4882. $1=li;
  4883. _st($1)._with_(each);
  4884. $2=_st($1)._onClick_((function(){
  4885. return smalltalk.withContext(function($ctx4) {
  4886. return self._selectVariable_(each);
  4887. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4888. $2;
  4889. $3=_st(self._selectedVariable()).__eq(each);
  4890. if(smalltalk.assert($3)){
  4891. return _st(li)._class_("selected");
  4892. };
  4893. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  4894. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4895. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.IDEInspector)})},
  4896. args: [],
  4897. source: "updateVariablesList\x0a\x09variablesList contents: [ :html |\x0a\x09\x09self variables keysDo: [ :each || li |\x0a\x09\x09\x09li := html li.\x0a\x09\x09\x09li\x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [ self selectVariable: each ].\x0a\x09\x09\x09self selectedVariable = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected' ]] ]",
  4898. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  4899. referencedClasses: []
  4900. }),
  4901. globals.IDEInspector);
  4902. smalltalk.addMethod(
  4903. smalltalk.method({
  4904. selector: "variables",
  4905. protocol: 'accessing',
  4906. fn: function (){
  4907. var self=this;
  4908. var $1;
  4909. $1=self["@variables"];
  4910. return $1;
  4911. },
  4912. args: [],
  4913. source: "variables\x0a\x09^ variables",
  4914. messageSends: [],
  4915. referencedClasses: []
  4916. }),
  4917. globals.IDEInspector);
  4918. smalltalk.addMethod(
  4919. smalltalk.method({
  4920. selector: "inspect:",
  4921. protocol: 'instance creation',
  4922. fn: function (anObject){
  4923. var self=this;
  4924. return smalltalk.withContext(function($ctx1) {
  4925. var $2,$3,$1;
  4926. $2=self._new();
  4927. _st($2)._inspect_(anObject);
  4928. _st($2)._open();
  4929. $3=_st($2)._yourself();
  4930. $1=$3;
  4931. return $1;
  4932. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector.klass)})},
  4933. args: ["anObject"],
  4934. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  4935. messageSends: ["inspect:", "new", "open", "yourself"],
  4936. referencedClasses: []
  4937. }),
  4938. globals.IDEInspector.klass);
  4939. smalltalk.addMethod(
  4940. smalltalk.method({
  4941. selector: "on:",
  4942. protocol: 'instance creation',
  4943. fn: function (anObject){
  4944. var self=this;
  4945. return smalltalk.withContext(function($ctx1) {
  4946. var $2,$3,$1;
  4947. $2=self._new();
  4948. _st($2)._inspect_(anObject);
  4949. $3=_st($2)._yourself();
  4950. $1=$3;
  4951. return $1;
  4952. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},globals.IDEInspector.klass)})},
  4953. args: ["anObject"],
  4954. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  4955. messageSends: ["inspect:", "new", "yourself"],
  4956. referencedClasses: []
  4957. }),
  4958. globals.IDEInspector.klass);
  4959. smalltalk.addClass('IDETranscript', globals.TabWidget, ['textarea'], 'IDE');
  4960. smalltalk.addMethod(
  4961. smalltalk.method({
  4962. selector: "clear",
  4963. protocol: 'actions',
  4964. fn: function (){
  4965. var self=this;
  4966. return smalltalk.withContext(function($ctx1) {
  4967. _st(_st(self["@textarea"])._asJQuery())._val_("");
  4968. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.IDETranscript)})},
  4969. args: [],
  4970. source: "clear\x0a\x09textarea asJQuery val: ''",
  4971. messageSends: ["val:", "asJQuery"],
  4972. referencedClasses: []
  4973. }),
  4974. globals.IDETranscript);
  4975. smalltalk.addMethod(
  4976. smalltalk.method({
  4977. selector: "cr",
  4978. protocol: 'actions',
  4979. fn: function (){
  4980. var self=this;
  4981. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  4982. return smalltalk.withContext(function($ctx1) {
  4983. var $1;
  4984. $1=_st(self["@textarea"])._asJQuery();
  4985. $ctx1.sendIdx["asJQuery"]=1;
  4986. _st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
  4987. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},globals.IDETranscript)})},
  4988. args: [],
  4989. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  4990. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  4991. referencedClasses: ["String"]
  4992. }),
  4993. globals.IDETranscript);
  4994. smalltalk.addMethod(
  4995. smalltalk.method({
  4996. selector: "label",
  4997. protocol: 'accessing',
  4998. fn: function (){
  4999. var self=this;
  5000. return "Transcript";
  5001. },
  5002. args: [],
  5003. source: "label\x0a\x09^ 'Transcript'",
  5004. messageSends: [],
  5005. referencedClasses: []
  5006. }),
  5007. globals.IDETranscript);
  5008. smalltalk.addMethod(
  5009. smalltalk.method({
  5010. selector: "open",
  5011. protocol: 'actions',
  5012. fn: function (){
  5013. var self=this;
  5014. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5015. return smalltalk.withContext(function($ctx1) {
  5016. var $1,$2;
  5017. $1=_st($TabManager())._current();
  5018. _st($1)._open();
  5019. $2=_st($1)._selectTab_(self);
  5020. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript)})},
  5021. args: [],
  5022. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  5023. messageSends: ["open", "current", "selectTab:"],
  5024. referencedClasses: ["TabManager"]
  5025. }),
  5026. globals.IDETranscript);
  5027. smalltalk.addMethod(
  5028. smalltalk.method({
  5029. selector: "renderBoxOn:",
  5030. protocol: 'rendering',
  5031. fn: function (html){
  5032. var self=this;
  5033. return smalltalk.withContext(function($ctx1) {
  5034. var $1,$2;
  5035. self["@textarea"]=_st(html)._textarea();
  5036. $1=self["@textarea"];
  5037. _st($1)._class_("amber_transcript");
  5038. $2=_st($1)._at_put_("spellcheck","false");
  5039. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDETranscript)})},
  5040. args: ["html"],
  5041. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  5042. messageSends: ["textarea", "class:", "at:put:"],
  5043. referencedClasses: []
  5044. }),
  5045. globals.IDETranscript);
  5046. smalltalk.addMethod(
  5047. smalltalk.method({
  5048. selector: "renderButtonsOn:",
  5049. protocol: 'rendering',
  5050. fn: function (html){
  5051. var self=this;
  5052. return smalltalk.withContext(function($ctx1) {
  5053. var $1,$2;
  5054. $1=_st(html)._button();
  5055. _st($1)._with_("Clear transcript");
  5056. $2=_st($1)._onClick_((function(){
  5057. return smalltalk.withContext(function($ctx2) {
  5058. return self._clear();
  5059. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5060. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDETranscript)})},
  5061. args: ["html"],
  5062. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  5063. messageSends: ["with:", "button", "onClick:", "clear"],
  5064. referencedClasses: []
  5065. }),
  5066. globals.IDETranscript);
  5067. smalltalk.addMethod(
  5068. smalltalk.method({
  5069. selector: "show:",
  5070. protocol: 'actions',
  5071. fn: function (anObject){
  5072. var self=this;
  5073. return smalltalk.withContext(function($ctx1) {
  5074. var $1,$2;
  5075. $1=self["@textarea"];
  5076. if(($receiver = $1) == nil || $receiver == null){
  5077. self._open();
  5078. } else {
  5079. $1;
  5080. };
  5081. $2=_st(self["@textarea"])._asJQuery();
  5082. $ctx1.sendIdx["asJQuery"]=1;
  5083. _st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  5084. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},globals.IDETranscript)})},
  5085. args: ["anObject"],
  5086. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  5087. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  5088. referencedClasses: []
  5089. }),
  5090. globals.IDETranscript);
  5091. globals.IDETranscript.klass.iVarNames = ['current'];
  5092. smalltalk.addMethod(
  5093. smalltalk.method({
  5094. selector: "current",
  5095. protocol: 'instance creation',
  5096. fn: function (){
  5097. var self=this;
  5098. return smalltalk.withContext(function($ctx1) {
  5099. var $2,$1;
  5100. $2=self["@current"];
  5101. if(($receiver = $2) == nil || $receiver == null){
  5102. self["@current"]=globals.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
  5103. $1=self["@current"];
  5104. } else {
  5105. $1=$2;
  5106. };
  5107. return $1;
  5108. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.IDETranscript.klass)})},
  5109. args: [],
  5110. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  5111. messageSends: ["ifNil:", "new"],
  5112. referencedClasses: []
  5113. }),
  5114. globals.IDETranscript.klass);
  5115. smalltalk.addMethod(
  5116. smalltalk.method({
  5117. selector: "initialize",
  5118. protocol: 'initialization',
  5119. fn: function (){
  5120. var self=this;
  5121. function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  5122. return smalltalk.withContext(function($ctx1) {
  5123. _st($Transcript())._register_(self._current());
  5124. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.IDETranscript.klass)})},
  5125. args: [],
  5126. source: "initialize\x0a\x09Transcript register: self current",
  5127. messageSends: ["register:", "current"],
  5128. referencedClasses: ["Transcript"]
  5129. }),
  5130. globals.IDETranscript.klass);
  5131. smalltalk.addMethod(
  5132. smalltalk.method({
  5133. selector: "new",
  5134. protocol: 'instance creation',
  5135. fn: function (){
  5136. var self=this;
  5137. return smalltalk.withContext(function($ctx1) {
  5138. self._shouldNotImplement();
  5139. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.IDETranscript.klass)})},
  5140. args: [],
  5141. source: "new\x0a\x09self shouldNotImplement",
  5142. messageSends: ["shouldNotImplement"],
  5143. referencedClasses: []
  5144. }),
  5145. globals.IDETranscript.klass);
  5146. smalltalk.addMethod(
  5147. smalltalk.method({
  5148. selector: "open",
  5149. protocol: 'instance creation',
  5150. fn: function (){
  5151. var self=this;
  5152. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5153. return smalltalk.withContext(function($ctx1) {
  5154. var $1,$2;
  5155. $1=_st($TabManager())._current();
  5156. $ctx1.sendIdx["current"]=1;
  5157. _st($1)._open();
  5158. $2=_st($1)._selectTab_(self._current());
  5159. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript.klass)})},
  5160. args: [],
  5161. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  5162. messageSends: ["open", "current", "selectTab:"],
  5163. referencedClasses: ["TabManager"]
  5164. }),
  5165. globals.IDETranscript.klass);
  5166. smalltalk.addClass('ProgressBar', globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5167. smalltalk.addMethod(
  5168. smalltalk.method({
  5169. selector: "percent",
  5170. protocol: 'accessing',
  5171. fn: function (){
  5172. var self=this;
  5173. return smalltalk.withContext(function($ctx1) {
  5174. var $2,$1;
  5175. $2=self["@percent"];
  5176. if(($receiver = $2) == nil || $receiver == null){
  5177. $1=(0);
  5178. } else {
  5179. $1=$2;
  5180. };
  5181. return $1;
  5182. }, function($ctx1) {$ctx1.fill(self,"percent",{},globals.ProgressBar)})},
  5183. args: [],
  5184. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  5185. messageSends: ["ifNil:"],
  5186. referencedClasses: []
  5187. }),
  5188. globals.ProgressBar);
  5189. smalltalk.addMethod(
  5190. smalltalk.method({
  5191. selector: "percent:",
  5192. protocol: 'accessing',
  5193. fn: function (aNumber){
  5194. var self=this;
  5195. self["@percent"]=aNumber;
  5196. return self},
  5197. args: ["aNumber"],
  5198. source: "percent: aNumber\x0a\x09percent := aNumber",
  5199. messageSends: [],
  5200. referencedClasses: []
  5201. }),
  5202. globals.ProgressBar);
  5203. smalltalk.addMethod(
  5204. smalltalk.method({
  5205. selector: "renderOn:",
  5206. protocol: 'rendering',
  5207. fn: function (html){
  5208. var self=this;
  5209. return smalltalk.withContext(function($ctx1) {
  5210. var $1,$2;
  5211. $1=_st(html)._div();
  5212. _st($1)._class_("progress_bar");
  5213. $2=_st($1)._yourself();
  5214. self["@div"]=$2;
  5215. self._renderProgressBar();
  5216. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ProgressBar)})},
  5217. args: ["html"],
  5218. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5219. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5220. referencedClasses: []
  5221. }),
  5222. globals.ProgressBar);
  5223. smalltalk.addMethod(
  5224. smalltalk.method({
  5225. selector: "renderProgressBar",
  5226. protocol: 'rendering',
  5227. fn: function (){
  5228. var self=this;
  5229. return smalltalk.withContext(function($ctx1) {
  5230. var $1,$3,$4,$2;
  5231. _st(self["@div"])._contents_((function(html){
  5232. return smalltalk.withContext(function($ctx2) {
  5233. $1=_st(html)._div();
  5234. _st($1)._class_("progress");
  5235. $3=$1;
  5236. $4=_st("width:".__comma(_st(self._percent())._asString())).__comma("%");
  5237. $ctx2.sendIdx[","]=1;
  5238. $2=_st($3)._style_($4);
  5239. return $2;
  5240. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5241. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},globals.ProgressBar)})},
  5242. args: [],
  5243. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  5244. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5245. referencedClasses: []
  5246. }),
  5247. globals.ProgressBar);
  5248. smalltalk.addMethod(
  5249. smalltalk.method({
  5250. selector: "updatePercent:",
  5251. protocol: 'updating',
  5252. fn: function (aNumber){
  5253. var self=this;
  5254. return smalltalk.withContext(function($ctx1) {
  5255. self._percent_(aNumber);
  5256. self._renderProgressBar();
  5257. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},globals.ProgressBar)})},
  5258. args: ["aNumber"],
  5259. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5260. messageSends: ["percent:", "renderProgressBar"],
  5261. referencedClasses: []
  5262. }),
  5263. globals.ProgressBar);
  5264. smalltalk.addClass('ReferencesBrowser', globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5265. smalltalk.addMethod(
  5266. smalltalk.method({
  5267. selector: "canBeClosed",
  5268. protocol: 'testing',
  5269. fn: function (){
  5270. var self=this;
  5271. return true;
  5272. },
  5273. args: [],
  5274. source: "canBeClosed\x0a\x09^ true",
  5275. messageSends: [],
  5276. referencedClasses: []
  5277. }),
  5278. globals.ReferencesBrowser);
  5279. smalltalk.addMethod(
  5280. smalltalk.method({
  5281. selector: "classesAndMetaclasses",
  5282. protocol: 'accessing',
  5283. fn: function (){
  5284. var self=this;
  5285. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5286. return smalltalk.withContext(function($ctx1) {
  5287. var $2,$1;
  5288. $2=_st($Smalltalk())._classes();
  5289. $ctx1.sendIdx["classes"]=1;
  5290. $1=_st($2).__comma(_st(_st($Smalltalk())._classes())._collect_((function(each){
  5291. return smalltalk.withContext(function($ctx2) {
  5292. return _st(each)._class();
  5293. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})));
  5294. return $1;
  5295. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},globals.ReferencesBrowser)})},
  5296. args: [],
  5297. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  5298. messageSends: [",", "classes", "collect:", "class"],
  5299. referencedClasses: ["Smalltalk"]
  5300. }),
  5301. globals.ReferencesBrowser);
  5302. smalltalk.addMethod(
  5303. smalltalk.method({
  5304. selector: "implementors",
  5305. protocol: 'accessing',
  5306. fn: function (){
  5307. var self=this;
  5308. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5309. return smalltalk.withContext(function($ctx1) {
  5310. var $2,$1;
  5311. $2=self["@implementors"];
  5312. if(($receiver = $2) == nil || $receiver == null){
  5313. self["@implementors"]=_st($Array())._new();
  5314. $1=self["@implementors"];
  5315. } else {
  5316. $1=$2;
  5317. };
  5318. return $1;
  5319. }, function($ctx1) {$ctx1.fill(self,"implementors",{},globals.ReferencesBrowser)})},
  5320. args: [],
  5321. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  5322. messageSends: ["ifNil:", "new"],
  5323. referencedClasses: ["Array"]
  5324. }),
  5325. globals.ReferencesBrowser);
  5326. smalltalk.addMethod(
  5327. smalltalk.method({
  5328. selector: "initialize",
  5329. protocol: 'initialization',
  5330. fn: function (){
  5331. var self=this;
  5332. return smalltalk.withContext(function($ctx1) {
  5333. globals.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []);
  5334. self["@selector"]="";
  5335. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.ReferencesBrowser)})},
  5336. args: [],
  5337. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  5338. messageSends: ["initialize"],
  5339. referencedClasses: []
  5340. }),
  5341. globals.ReferencesBrowser);
  5342. smalltalk.addMethod(
  5343. smalltalk.method({
  5344. selector: "label",
  5345. protocol: 'accessing',
  5346. fn: function (){
  5347. var self=this;
  5348. return "[ References ]";
  5349. },
  5350. args: [],
  5351. source: "label\x0a\x09^ '[ References ]'",
  5352. messageSends: [],
  5353. referencedClasses: []
  5354. }),
  5355. globals.ReferencesBrowser);
  5356. smalltalk.addMethod(
  5357. smalltalk.method({
  5358. selector: "matches",
  5359. protocol: 'accessing',
  5360. fn: function (){
  5361. var self=this;
  5362. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5363. return smalltalk.withContext(function($ctx1) {
  5364. var $2,$1;
  5365. $2=self["@matches"];
  5366. if(($receiver = $2) == nil || $receiver == null){
  5367. self["@matches"]=_st($Array())._new();
  5368. $1=self["@matches"];
  5369. } else {
  5370. $1=$2;
  5371. };
  5372. return $1;
  5373. }, function($ctx1) {$ctx1.fill(self,"matches",{},globals.ReferencesBrowser)})},
  5374. args: [],
  5375. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  5376. messageSends: ["ifNil:", "new"],
  5377. referencedClasses: ["Array"]
  5378. }),
  5379. globals.ReferencesBrowser);
  5380. smalltalk.addMethod(
  5381. smalltalk.method({
  5382. selector: "openBrowserOn:",
  5383. protocol: 'actions',
  5384. fn: function (aMethod){
  5385. var self=this;
  5386. var browser;
  5387. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  5388. return smalltalk.withContext(function($ctx1) {
  5389. var $3,$2,$4,$1,$5,$6,$7;
  5390. $3=_st(aMethod)._methodClass();
  5391. $ctx1.sendIdx["methodClass"]=1;
  5392. $2=_st($3)._isMetaclass();
  5393. $ctx1.sendIdx["isMetaclass"]=1;
  5394. if(smalltalk.assert($2)){
  5395. $4=_st(aMethod)._methodClass();
  5396. $ctx1.sendIdx["methodClass"]=2;
  5397. $1=_st($4)._instanceClass();
  5398. } else {
  5399. $1=_st(aMethod)._methodClass();
  5400. $ctx1.sendIdx["methodClass"]=3;
  5401. };
  5402. browser=_st($Browser())._openOn_($1);
  5403. $5=_st(_st(aMethod)._methodClass())._isMetaclass();
  5404. if(smalltalk.assert($5)){
  5405. _st(browser)._selectTab_("class");
  5406. };
  5407. $6=browser;
  5408. _st($6)._selectProtocol_(_st(aMethod)._category());
  5409. $7=_st($6)._selectMethod_(aMethod);
  5410. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},globals.ReferencesBrowser)})},
  5411. args: ["aMethod"],
  5412. source: "openBrowserOn: aMethod\x0a\x09| browser |\x0a\x09browser := Browser openOn: (aMethod methodClass isMetaclass\x0a\x09\x09ifTrue: [ aMethod methodClass instanceClass ] ifFalse: [ aMethod methodClass ]).\x0a\x09aMethod methodClass isMetaclass ifTrue: [ browser selectTab: #class ].\x0a\x09browser\x0a\x09\x09selectProtocol: aMethod category;\x0a\x09\x09selectMethod: aMethod",
  5413. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  5414. referencedClasses: ["Browser"]
  5415. }),
  5416. globals.ReferencesBrowser);
  5417. smalltalk.addMethod(
  5418. smalltalk.method({
  5419. selector: "referencedClasses",
  5420. protocol: 'accessing',
  5421. fn: function (){
  5422. var self=this;
  5423. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5424. return smalltalk.withContext(function($ctx1) {
  5425. var $2,$1;
  5426. $2=self["@referencedClasses"];
  5427. if(($receiver = $2) == nil || $receiver == null){
  5428. self["@referencedClasses"]=_st($Array())._new();
  5429. $1=self["@referencedClasses"];
  5430. } else {
  5431. $1=$2;
  5432. };
  5433. return $1;
  5434. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},globals.ReferencesBrowser)})},
  5435. args: [],
  5436. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  5437. messageSends: ["ifNil:", "new"],
  5438. referencedClasses: ["Array"]
  5439. }),
  5440. globals.ReferencesBrowser);
  5441. smalltalk.addMethod(
  5442. smalltalk.method({
  5443. selector: "renderBoxOn:",
  5444. protocol: 'rendering',
  5445. fn: function (html){
  5446. var self=this;
  5447. return smalltalk.withContext(function($ctx1) {
  5448. var $1;
  5449. self._renderInputOn_(html);
  5450. self._renderImplementorsOn_(html);
  5451. self._renderSendersOn_(html);
  5452. self._renderReferencedClassesOn_(html);
  5453. $1=self._renderMatchesOn_(html);
  5454. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.ReferencesBrowser)})},
  5455. args: ["html"],
  5456. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderInputOn: html;\x0a\x09\x09renderImplementorsOn: html;\x0a\x09\x09renderSendersOn: html;\x0a\x09\x09renderReferencedClassesOn: html;\x0a\x09\x09renderMatchesOn: html",
  5457. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  5458. referencedClasses: []
  5459. }),
  5460. globals.ReferencesBrowser);
  5461. smalltalk.addMethod(
  5462. smalltalk.method({
  5463. selector: "renderImplementorsOn:",
  5464. protocol: 'rendering',
  5465. fn: function (html){
  5466. var self=this;
  5467. return smalltalk.withContext(function($ctx1) {
  5468. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  5469. self._updateImplementorsList();
  5470. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},globals.ReferencesBrowser)})},
  5471. args: ["html"],
  5472. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  5473. messageSends: ["class:", "ul", "updateImplementorsList"],
  5474. referencedClasses: []
  5475. }),
  5476. globals.ReferencesBrowser);
  5477. smalltalk.addMethod(
  5478. smalltalk.method({
  5479. selector: "renderInputOn:",
  5480. protocol: 'rendering',
  5481. fn: function (html){
  5482. var self=this;
  5483. return smalltalk.withContext(function($ctx1) {
  5484. var $1,$2;
  5485. $1=_st(html)._input();
  5486. _st($1)._class_("implementors");
  5487. $2=_st($1)._yourself();
  5488. self["@input"]=$2;
  5489. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  5490. self._setInputEvents();
  5491. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},globals.ReferencesBrowser)})},
  5492. args: ["html"],
  5493. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  5494. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
  5495. referencedClasses: []
  5496. }),
  5497. globals.ReferencesBrowser);
  5498. smalltalk.addMethod(
  5499. smalltalk.method({
  5500. selector: "renderMatchesOn:",
  5501. protocol: 'rendering',
  5502. fn: function (html){
  5503. var self=this;
  5504. return smalltalk.withContext(function($ctx1) {
  5505. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  5506. self._updateMatchesList();
  5507. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},globals.ReferencesBrowser)})},
  5508. args: ["html"],
  5509. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  5510. messageSends: ["class:", "ul", "updateMatchesList"],
  5511. referencedClasses: []
  5512. }),
  5513. globals.ReferencesBrowser);
  5514. smalltalk.addMethod(
  5515. smalltalk.method({
  5516. selector: "renderReferencedClassesOn:",
  5517. protocol: 'rendering',
  5518. fn: function (html){
  5519. var self=this;
  5520. return smalltalk.withContext(function($ctx1) {
  5521. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  5522. self._updateReferencedClassesList();
  5523. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},globals.ReferencesBrowser)})},
  5524. args: ["html"],
  5525. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  5526. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  5527. referencedClasses: []
  5528. }),
  5529. globals.ReferencesBrowser);
  5530. smalltalk.addMethod(
  5531. smalltalk.method({
  5532. selector: "renderSendersOn:",
  5533. protocol: 'rendering',
  5534. fn: function (html){
  5535. var self=this;
  5536. return smalltalk.withContext(function($ctx1) {
  5537. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  5538. self._updateSendersList();
  5539. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},globals.ReferencesBrowser)})},
  5540. args: ["html"],
  5541. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  5542. messageSends: ["class:", "ul", "updateSendersList"],
  5543. referencedClasses: []
  5544. }),
  5545. globals.ReferencesBrowser);
  5546. smalltalk.addMethod(
  5547. smalltalk.method({
  5548. selector: "search:",
  5549. protocol: 'actions',
  5550. fn: function (aString){
  5551. var self=this;
  5552. return smalltalk.withContext(function($ctx1) {
  5553. var $1;
  5554. self._searchReferencesFor_(aString);
  5555. self._updateImplementorsList();
  5556. self._updateSendersList();
  5557. self._updateReferencedClassesList();
  5558. $1=self._updateMatchesList();
  5559. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.ReferencesBrowser)})},
  5560. args: ["aString"],
  5561. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  5562. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  5563. referencedClasses: []
  5564. }),
  5565. globals.ReferencesBrowser);
  5566. smalltalk.addMethod(
  5567. smalltalk.method({
  5568. selector: "searchMethodSource",
  5569. protocol: 'actions',
  5570. fn: function (){
  5571. var self=this;
  5572. var regex;
  5573. return smalltalk.withContext(function($ctx1) {
  5574. var $1;
  5575. regex=_st(self["@selector"])._allButFirst();
  5576. _st(self._classesAndMetaclasses())._do_((function(each){
  5577. return smalltalk.withContext(function($ctx2) {
  5578. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5579. return smalltalk.withContext(function($ctx3) {
  5580. $1=_st(_st(value)._source())._match_(regex);
  5581. if(smalltalk.assert($1)){
  5582. return _st(self._matches())._add_(value);
  5583. };
  5584. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5585. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5586. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},globals.ReferencesBrowser)})},
  5587. args: [],
  5588. source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value ]] ]",
  5589. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  5590. referencedClasses: []
  5591. }),
  5592. globals.ReferencesBrowser);
  5593. smalltalk.addMethod(
  5594. smalltalk.method({
  5595. selector: "searchReferencedClasses",
  5596. protocol: 'actions',
  5597. fn: function (){
  5598. var self=this;
  5599. return smalltalk.withContext(function($ctx1) {
  5600. var $2,$1;
  5601. _st(self._classesAndMetaclasses())._do_((function(each){
  5602. return smalltalk.withContext(function($ctx2) {
  5603. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5604. return smalltalk.withContext(function($ctx3) {
  5605. $2=_st(value)._referencedClasses();
  5606. $ctx3.sendIdx["referencedClasses"]=1;
  5607. $1=_st($2)._includes_(self["@selector"]);
  5608. if(smalltalk.assert($1)){
  5609. return _st(self._referencedClasses())._add_(value);
  5610. };
  5611. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5612. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5613. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},globals.ReferencesBrowser)})},
  5614. args: [],
  5615. source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value ]] ]",
  5616. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  5617. referencedClasses: []
  5618. }),
  5619. globals.ReferencesBrowser);
  5620. smalltalk.addMethod(
  5621. smalltalk.method({
  5622. selector: "searchReferencesFor:",
  5623. protocol: 'actions',
  5624. fn: function (aString){
  5625. var self=this;
  5626. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5627. return smalltalk.withContext(function($ctx1) {
  5628. var $1;
  5629. self["@selector"]=aString;
  5630. self["@implementors"]=_st($Array())._new();
  5631. $ctx1.sendIdx["new"]=1;
  5632. self["@senders"]=_st($Array())._new();
  5633. $ctx1.sendIdx["new"]=2;
  5634. self["@referencedClasses"]=_st($Array())._new();
  5635. $ctx1.sendIdx["new"]=3;
  5636. self["@matches"]=_st($Array())._new();
  5637. self._searchMethodSource();
  5638. $1=_st(self["@selector"])._match_("^[A-Z]");
  5639. if(smalltalk.assert($1)){
  5640. self._searchReferencedClasses();
  5641. } else {
  5642. self._searchSelectorReferences();
  5643. };
  5644. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},globals.ReferencesBrowser)})},
  5645. args: ["aString"],
  5646. source: "searchReferencesFor: aString\x0a\x09selector := aString.\x0a\x09implementors := Array new.\x0a\x09senders := Array new.\x0a\x09referencedClasses := Array new.\x0a\x09matches := Array new.\x0a\x09self searchMethodSource.\x0a\x09(selector match: '^[A-Z]')\x0a\x09\x09ifFalse: [ self searchSelectorReferences ]\x0a\x09\x09ifTrue: [ self searchReferencedClasses ]",
  5647. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  5648. referencedClasses: ["Array"]
  5649. }),
  5650. globals.ReferencesBrowser);
  5651. smalltalk.addMethod(
  5652. smalltalk.method({
  5653. selector: "searchSelectorReferences",
  5654. protocol: 'actions',
  5655. fn: function (){
  5656. var self=this;
  5657. return smalltalk.withContext(function($ctx1) {
  5658. var $1,$2;
  5659. _st(self._classesAndMetaclasses())._do_((function(each){
  5660. return smalltalk.withContext(function($ctx2) {
  5661. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  5662. return smalltalk.withContext(function($ctx3) {
  5663. $1=_st(key).__eq(self["@selector"]);
  5664. if(smalltalk.assert($1)){
  5665. _st(self._implementors())._add_(value);
  5666. $ctx3.sendIdx["add:"]=1;
  5667. };
  5668. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  5669. if(smalltalk.assert($2)){
  5670. return _st(self._senders())._add_(value);
  5671. };
  5672. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)})}));
  5673. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5674. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},globals.ReferencesBrowser)})},
  5675. args: [],
  5676. source: "searchSelectorReferences\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09key = selector ifTrue: [ self implementors add: value ].\x0a\x09\x09\x09(value messageSends includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self senders add: value ]] ]",
  5677. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  5678. referencedClasses: []
  5679. }),
  5680. globals.ReferencesBrowser);
  5681. smalltalk.addMethod(
  5682. smalltalk.method({
  5683. selector: "selector",
  5684. protocol: 'accessing',
  5685. fn: function (){
  5686. var self=this;
  5687. var $1;
  5688. $1=self["@selector"];
  5689. return $1;
  5690. },
  5691. args: [],
  5692. source: "selector\x0a\x09^ selector",
  5693. messageSends: [],
  5694. referencedClasses: []
  5695. }),
  5696. globals.ReferencesBrowser);
  5697. smalltalk.addMethod(
  5698. smalltalk.method({
  5699. selector: "senders",
  5700. protocol: 'accessing',
  5701. fn: function (){
  5702. var self=this;
  5703. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5704. return smalltalk.withContext(function($ctx1) {
  5705. var $2,$1;
  5706. $2=self["@senders"];
  5707. if(($receiver = $2) == nil || $receiver == null){
  5708. self["@senders"]=_st($Array())._new();
  5709. $1=self["@senders"];
  5710. } else {
  5711. $1=$2;
  5712. };
  5713. return $1;
  5714. }, function($ctx1) {$ctx1.fill(self,"senders",{},globals.ReferencesBrowser)})},
  5715. args: [],
  5716. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  5717. messageSends: ["ifNil:", "new"],
  5718. referencedClasses: ["Array"]
  5719. }),
  5720. globals.ReferencesBrowser);
  5721. smalltalk.addMethod(
  5722. smalltalk.method({
  5723. selector: "setInputEvents",
  5724. protocol: 'private',
  5725. fn: function (){
  5726. var self=this;
  5727. return smalltalk.withContext(function($ctx1) {
  5728. var $1,$3,$2;
  5729. $1=self["@input"];
  5730. _st($1)._onKeyUp_((function(){
  5731. return smalltalk.withContext(function($ctx2) {
  5732. self["@timer"]=_st((function(){
  5733. return smalltalk.withContext(function($ctx3) {
  5734. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  5735. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}))._valueWithTimeout_((100));
  5736. return self["@timer"];
  5737. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5738. $2=_st($1)._onKeyDown_((function(){
  5739. return smalltalk.withContext(function($ctx2) {
  5740. $3=self["@timer"];
  5741. if(($receiver = $3) == nil || $receiver == null){
  5742. return $3;
  5743. } else {
  5744. return _st(self["@timer"])._clearTimeout();
  5745. };
  5746. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  5747. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},globals.ReferencesBrowser)})},
  5748. args: [],
  5749. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  5750. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  5751. referencedClasses: []
  5752. }),
  5753. globals.ReferencesBrowser);
  5754. smalltalk.addMethod(
  5755. smalltalk.method({
  5756. selector: "updateImplementorsList",
  5757. protocol: 'updating',
  5758. fn: function (){
  5759. var self=this;
  5760. return smalltalk.withContext(function($ctx1) {
  5761. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5762. _st(self["@implementorsList"])._contents_((function(html){
  5763. return smalltalk.withContext(function($ctx2) {
  5764. $1=_st(html)._li();
  5765. $ctx2.sendIdx["li"]=1;
  5766. _st($1)._class_("column_label");
  5767. $2=$1;
  5768. $7=self._implementors();
  5769. $ctx2.sendIdx["implementors"]=1;
  5770. $6=_st($7)._size();
  5771. $5=_st($6)._asString();
  5772. $ctx2.sendIdx["asString"]=1;
  5773. $4="Implementors (".__comma($5);
  5774. $ctx2.sendIdx[","]=2;
  5775. $3=_st($4).__comma(")");
  5776. $ctx2.sendIdx[","]=1;
  5777. _st($2)._with_($3);
  5778. $ctx2.sendIdx["with:"]=1;
  5779. $8=_st($1)._style_("font-weight: bold");
  5780. $8;
  5781. return _st(self._implementors())._do_((function(each){
  5782. var li;
  5783. return smalltalk.withContext(function($ctx3) {
  5784. li=_st(html)._li();
  5785. li;
  5786. $9=li;
  5787. $10=$9;
  5788. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  5789. $ctx3.sendIdx[","]=3;
  5790. _st($10)._with_($11);
  5791. $12=_st($9)._onClick_((function(){
  5792. return smalltalk.withContext(function($ctx4) {
  5793. return self._openBrowserOn_(each);
  5794. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5795. return $12;
  5796. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5797. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5798. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},globals.ReferencesBrowser)})},
  5799. args: [],
  5800. source: "updateImplementorsList\x0a\x09implementorsList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Implementors (', self implementors size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self implementors do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5801. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5802. referencedClasses: []
  5803. }),
  5804. globals.ReferencesBrowser);
  5805. smalltalk.addMethod(
  5806. smalltalk.method({
  5807. selector: "updateMatchesList",
  5808. protocol: 'updating',
  5809. fn: function (){
  5810. var self=this;
  5811. return smalltalk.withContext(function($ctx1) {
  5812. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5813. _st(self["@matchesList"])._contents_((function(html){
  5814. return smalltalk.withContext(function($ctx2) {
  5815. $1=_st(html)._li();
  5816. $ctx2.sendIdx["li"]=1;
  5817. _st($1)._class_("column_label");
  5818. $2=$1;
  5819. $7=self._matches();
  5820. $ctx2.sendIdx["matches"]=1;
  5821. $6=_st($7)._size();
  5822. $5=_st($6)._asString();
  5823. $ctx2.sendIdx["asString"]=1;
  5824. $4="Regex matches (".__comma($5);
  5825. $ctx2.sendIdx[","]=2;
  5826. $3=_st($4).__comma(")");
  5827. $ctx2.sendIdx[","]=1;
  5828. _st($2)._with_($3);
  5829. $ctx2.sendIdx["with:"]=1;
  5830. $8=_st($1)._style_("font-weight: bold");
  5831. $8;
  5832. return _st(self._matches())._do_((function(each){
  5833. var li;
  5834. return smalltalk.withContext(function($ctx3) {
  5835. li=_st(html)._li();
  5836. li;
  5837. $9=li;
  5838. $10=$9;
  5839. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5840. $ctx3.sendIdx[","]=3;
  5841. _st($10)._with_($11);
  5842. $12=_st($9)._onClick_((function(){
  5843. return smalltalk.withContext(function($ctx4) {
  5844. return self._openBrowserOn_(each);
  5845. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5846. return $12;
  5847. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5848. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5849. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},globals.ReferencesBrowser)})},
  5850. args: [],
  5851. source: "updateMatchesList\x0a\x09matchesList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Regex matches (', self matches size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self matches do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5852. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5853. referencedClasses: []
  5854. }),
  5855. globals.ReferencesBrowser);
  5856. smalltalk.addMethod(
  5857. smalltalk.method({
  5858. selector: "updateReferencedClassesList",
  5859. protocol: 'updating',
  5860. fn: function (){
  5861. var self=this;
  5862. return smalltalk.withContext(function($ctx1) {
  5863. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5864. _st(self["@referencedClassesList"])._contents_((function(html){
  5865. return smalltalk.withContext(function($ctx2) {
  5866. $1=_st(html)._li();
  5867. $ctx2.sendIdx["li"]=1;
  5868. _st($1)._class_("column_label");
  5869. $2=$1;
  5870. $7=self._referencedClasses();
  5871. $ctx2.sendIdx["referencedClasses"]=1;
  5872. $6=_st($7)._size();
  5873. $5=_st($6)._asString();
  5874. $ctx2.sendIdx["asString"]=1;
  5875. $4="Class references (".__comma($5);
  5876. $ctx2.sendIdx[","]=2;
  5877. $3=_st($4).__comma(")");
  5878. $ctx2.sendIdx[","]=1;
  5879. _st($2)._with_($3);
  5880. $ctx2.sendIdx["with:"]=1;
  5881. $8=_st($1)._style_("font-weight: bold");
  5882. $8;
  5883. return _st(self._referencedClasses())._do_((function(each){
  5884. return smalltalk.withContext(function($ctx3) {
  5885. $9=_st(html)._li();
  5886. $10=$9;
  5887. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5888. $ctx3.sendIdx[","]=3;
  5889. _st($10)._with_($11);
  5890. $12=_st($9)._onClick_((function(){
  5891. return smalltalk.withContext(function($ctx4) {
  5892. return self._openBrowserOn_(each);
  5893. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5894. return $12;
  5895. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5896. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5897. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},globals.ReferencesBrowser)})},
  5898. args: [],
  5899. source: "updateReferencedClassesList\x0a\x09referencedClassesList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Class references (', self referencedClasses size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self referencedClasses do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5900. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5901. referencedClasses: []
  5902. }),
  5903. globals.ReferencesBrowser);
  5904. smalltalk.addMethod(
  5905. smalltalk.method({
  5906. selector: "updateSendersList",
  5907. protocol: 'updating',
  5908. fn: function (){
  5909. var self=this;
  5910. return smalltalk.withContext(function($ctx1) {
  5911. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5912. _st(self["@sendersList"])._contents_((function(html){
  5913. return smalltalk.withContext(function($ctx2) {
  5914. $1=_st(html)._li();
  5915. $ctx2.sendIdx["li"]=1;
  5916. _st($1)._class_("column_label");
  5917. $2=$1;
  5918. $7=self._senders();
  5919. $ctx2.sendIdx["senders"]=1;
  5920. $6=_st($7)._size();
  5921. $5=_st($6)._asString();
  5922. $ctx2.sendIdx["asString"]=1;
  5923. $4="Senders (".__comma($5);
  5924. $ctx2.sendIdx[","]=2;
  5925. $3=_st($4).__comma(")");
  5926. $ctx2.sendIdx[","]=1;
  5927. _st($2)._with_($3);
  5928. $ctx2.sendIdx["with:"]=1;
  5929. $8=_st($1)._style_("font-weight: bold");
  5930. $8;
  5931. return _st(self._senders())._do_((function(each){
  5932. return smalltalk.withContext(function($ctx3) {
  5933. $9=_st(html)._li();
  5934. $10=$9;
  5935. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5936. $ctx3.sendIdx[","]=3;
  5937. _st($10)._with_($11);
  5938. $12=_st($9)._onClick_((function(){
  5939. return smalltalk.withContext(function($ctx4) {
  5940. return self._openBrowserOn_(each);
  5941. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5942. return $12;
  5943. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5944. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5945. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},globals.ReferencesBrowser)})},
  5946. args: [],
  5947. source: "updateSendersList\x0a\x09sendersList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Senders (', self senders size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self senders do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5948. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5949. referencedClasses: []
  5950. }),
  5951. globals.ReferencesBrowser);
  5952. smalltalk.addMethod(
  5953. smalltalk.method({
  5954. selector: "search:",
  5955. protocol: 'instance creation',
  5956. fn: function (aString){
  5957. var self=this;
  5958. return smalltalk.withContext(function($ctx1) {
  5959. var $2,$3,$1;
  5960. $2=self._new();
  5961. _st($2)._searchReferencesFor_(aString);
  5962. $3=_st($2)._open();
  5963. $1=$3;
  5964. return $1;
  5965. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.ReferencesBrowser.klass)})},
  5966. args: ["aString"],
  5967. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  5968. messageSends: ["searchReferencesFor:", "new", "open"],
  5969. referencedClasses: []
  5970. }),
  5971. globals.ReferencesBrowser.klass);
  5972. smalltalk.addClass('TestRunner', globals.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  5973. smalltalk.addMethod(
  5974. smalltalk.method({
  5975. selector: "allClasses",
  5976. protocol: 'accessing',
  5977. fn: function (){
  5978. var self=this;
  5979. function $TestCase(){return globals.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  5980. return smalltalk.withContext(function($ctx1) {
  5981. var $1;
  5982. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  5983. return smalltalk.withContext(function($ctx2) {
  5984. return _st(_st(each)._isAbstract())._not();
  5985. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5986. return $1;
  5987. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},globals.TestRunner)})},
  5988. args: [],
  5989. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  5990. messageSends: ["select:", "allSubclasses", "not", "isAbstract"],
  5991. referencedClasses: ["TestCase"]
  5992. }),
  5993. globals.TestRunner);
  5994. smalltalk.addMethod(
  5995. smalltalk.method({
  5996. selector: "classes",
  5997. protocol: 'accessing',
  5998. fn: function (){
  5999. var self=this;
  6000. return smalltalk.withContext(function($ctx1) {
  6001. var $2,$1;
  6002. $1=_st(_st(self._allClasses())._select_((function(each){
  6003. return smalltalk.withContext(function($ctx2) {
  6004. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6005. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  6006. return smalltalk.withContext(function($ctx2) {
  6007. $2=_st(a)._name();
  6008. $ctx2.sendIdx["name"]=1;
  6009. return _st($2).__gt(_st(b)._name());
  6010. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
  6011. return $1;
  6012. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.TestRunner)})},
  6013. args: [],
  6014. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  6015. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  6016. referencedClasses: []
  6017. }),
  6018. globals.TestRunner);
  6019. smalltalk.addMethod(
  6020. smalltalk.method({
  6021. selector: "initialize",
  6022. protocol: 'initialization',
  6023. fn: function (){
  6024. var self=this;
  6025. function $TestResult(){return globals.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  6026. return smalltalk.withContext(function($ctx1) {
  6027. globals.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
  6028. self["@result"]=_st($TestResult())._new();
  6029. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TestRunner)})},
  6030. args: [],
  6031. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6032. messageSends: ["initialize", "new"],
  6033. referencedClasses: ["TestResult"]
  6034. }),
  6035. globals.TestRunner);
  6036. smalltalk.addMethod(
  6037. smalltalk.method({
  6038. selector: "isSelectedCategory:",
  6039. protocol: 'testing',
  6040. fn: function (aCategory){
  6041. var self=this;
  6042. return smalltalk.withContext(function($ctx1) {
  6043. var $1;
  6044. $1=_st(self._selectedCategories())._includes_(aCategory);
  6045. return $1;
  6046. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6047. args: ["aCategory"],
  6048. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  6049. messageSends: ["includes:", "selectedCategories"],
  6050. referencedClasses: []
  6051. }),
  6052. globals.TestRunner);
  6053. smalltalk.addMethod(
  6054. smalltalk.method({
  6055. selector: "isSelectedClass:",
  6056. protocol: 'testing',
  6057. fn: function (aClass){
  6058. var self=this;
  6059. return smalltalk.withContext(function($ctx1) {
  6060. var $1;
  6061. $1=_st(self._selectedClasses())._includes_(aClass);
  6062. return $1;
  6063. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},globals.TestRunner)})},
  6064. args: ["aClass"],
  6065. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  6066. messageSends: ["includes:", "selectedClasses"],
  6067. referencedClasses: []
  6068. }),
  6069. globals.TestRunner);
  6070. smalltalk.addMethod(
  6071. smalltalk.method({
  6072. selector: "label",
  6073. protocol: 'accessing',
  6074. fn: function (){
  6075. var self=this;
  6076. return "SUnit";
  6077. },
  6078. args: [],
  6079. source: "label\x0a\x09^ 'SUnit'",
  6080. messageSends: [],
  6081. referencedClasses: []
  6082. }),
  6083. globals.TestRunner);
  6084. smalltalk.addMethod(
  6085. smalltalk.method({
  6086. selector: "packages",
  6087. protocol: 'accessing',
  6088. fn: function (){
  6089. var self=this;
  6090. var packages;
  6091. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6092. return smalltalk.withContext(function($ctx1) {
  6093. var $2,$3,$1,$4;
  6094. packages=_st($Array())._new();
  6095. _st(self._allClasses())._do_((function(each){
  6096. return smalltalk.withContext(function($ctx2) {
  6097. $2=packages;
  6098. $3=_st(each)._category();
  6099. $ctx2.sendIdx["category"]=1;
  6100. $1=_st($2)._includes_($3);
  6101. if(! smalltalk.assert($1)){
  6102. return _st(packages)._add_(_st(each)._category());
  6103. };
  6104. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6105. $4=_st(packages)._sort();
  6106. return $4;
  6107. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.TestRunner)})},
  6108. args: [],
  6109. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09self allClasses do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  6110. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6111. referencedClasses: ["Array"]
  6112. }),
  6113. globals.TestRunner);
  6114. smalltalk.addMethod(
  6115. smalltalk.method({
  6116. selector: "performFailure:",
  6117. protocol: 'actions',
  6118. fn: function (aTestCase){
  6119. var self=this;
  6120. return smalltalk.withContext(function($ctx1) {
  6121. _st(aTestCase)._runCase();
  6122. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},globals.TestRunner)})},
  6123. args: ["aTestCase"],
  6124. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6125. messageSends: ["runCase"],
  6126. referencedClasses: []
  6127. }),
  6128. globals.TestRunner);
  6129. smalltalk.addMethod(
  6130. smalltalk.method({
  6131. selector: "printErrors",
  6132. protocol: 'printing',
  6133. fn: function (){
  6134. var self=this;
  6135. return smalltalk.withContext(function($ctx1) {
  6136. var $1;
  6137. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6138. return $1;
  6139. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},globals.TestRunner)})},
  6140. args: [],
  6141. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  6142. messageSends: [",", "asString", "size", "errors", "result"],
  6143. referencedClasses: []
  6144. }),
  6145. globals.TestRunner);
  6146. smalltalk.addMethod(
  6147. smalltalk.method({
  6148. selector: "printFailures",
  6149. protocol: 'printing',
  6150. fn: function (){
  6151. var self=this;
  6152. return smalltalk.withContext(function($ctx1) {
  6153. var $1;
  6154. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6155. return $1;
  6156. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},globals.TestRunner)})},
  6157. args: [],
  6158. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  6159. messageSends: [",", "asString", "size", "failures", "result"],
  6160. referencedClasses: []
  6161. }),
  6162. globals.TestRunner);
  6163. smalltalk.addMethod(
  6164. smalltalk.method({
  6165. selector: "printPasses",
  6166. protocol: 'printing',
  6167. fn: function (){
  6168. var self=this;
  6169. return smalltalk.withContext(function($ctx1) {
  6170. var $6,$5,$9,$8,$7,$4,$3,$2,$1;
  6171. $6=self._result();
  6172. $ctx1.sendIdx["result"]=1;
  6173. $5=_st($6)._runs();
  6174. $9=self._result();
  6175. $ctx1.sendIdx["result"]=2;
  6176. $8=_st($9)._errors();
  6177. $7=_st($8)._size();
  6178. $ctx1.sendIdx["size"]=1;
  6179. $4=_st($5).__minus($7);
  6180. $3=_st($4).__minus(_st(_st(self._result())._failures())._size());
  6181. $ctx1.sendIdx["-"]=1;
  6182. $2=_st($3)._asString();
  6183. $1=_st($2).__comma(" passes, ");
  6184. return $1;
  6185. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},globals.TestRunner)})},
  6186. args: [],
  6187. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6188. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6189. referencedClasses: []
  6190. }),
  6191. globals.TestRunner);
  6192. smalltalk.addMethod(
  6193. smalltalk.method({
  6194. selector: "printTotal",
  6195. protocol: 'printing',
  6196. fn: function (){
  6197. var self=this;
  6198. return smalltalk.withContext(function($ctx1) {
  6199. var $1;
  6200. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6201. return $1;
  6202. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},globals.TestRunner)})},
  6203. args: [],
  6204. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  6205. messageSends: [",", "asString", "total", "result"],
  6206. referencedClasses: []
  6207. }),
  6208. globals.TestRunner);
  6209. smalltalk.addMethod(
  6210. smalltalk.method({
  6211. selector: "progressBar",
  6212. protocol: 'accessing',
  6213. fn: function (){
  6214. var self=this;
  6215. function $ProgressBar(){return globals.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6216. return smalltalk.withContext(function($ctx1) {
  6217. var $2,$1;
  6218. $2=self["@progressBar"];
  6219. if(($receiver = $2) == nil || $receiver == null){
  6220. self["@progressBar"]=_st($ProgressBar())._new();
  6221. $1=self["@progressBar"];
  6222. } else {
  6223. $1=$2;
  6224. };
  6225. return $1;
  6226. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},globals.TestRunner)})},
  6227. args: [],
  6228. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  6229. messageSends: ["ifNil:", "new"],
  6230. referencedClasses: ["ProgressBar"]
  6231. }),
  6232. globals.TestRunner);
  6233. smalltalk.addMethod(
  6234. smalltalk.method({
  6235. selector: "renderBoxOn:",
  6236. protocol: 'rendering',
  6237. fn: function (html){
  6238. var self=this;
  6239. return smalltalk.withContext(function($ctx1) {
  6240. var $1;
  6241. self._renderCategoriesOn_(html);
  6242. self._renderClassesOn_(html);
  6243. $1=self._renderResultsOn_(html);
  6244. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.TestRunner)})},
  6245. args: ["html"],
  6246. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6247. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6248. referencedClasses: []
  6249. }),
  6250. globals.TestRunner);
  6251. smalltalk.addMethod(
  6252. smalltalk.method({
  6253. selector: "renderButtonsOn:",
  6254. protocol: 'rendering',
  6255. fn: function (html){
  6256. var self=this;
  6257. return smalltalk.withContext(function($ctx1) {
  6258. var $1,$2;
  6259. $1=_st(html)._button();
  6260. _st($1)._with_("Run selected");
  6261. $2=_st($1)._onClick_((function(){
  6262. return smalltalk.withContext(function($ctx2) {
  6263. return self._run_(self._testCases());
  6264. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6265. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.TestRunner)})},
  6266. args: ["html"],
  6267. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  6268. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6269. referencedClasses: []
  6270. }),
  6271. globals.TestRunner);
  6272. smalltalk.addMethod(
  6273. smalltalk.method({
  6274. selector: "renderCategoriesOn:",
  6275. protocol: 'rendering',
  6276. fn: function (html){
  6277. var self=this;
  6278. return smalltalk.withContext(function($ctx1) {
  6279. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6280. self._updateCategoriesList();
  6281. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},globals.TestRunner)})},
  6282. args: ["html"],
  6283. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6284. messageSends: ["class:", "ul", "updateCategoriesList"],
  6285. referencedClasses: []
  6286. }),
  6287. globals.TestRunner);
  6288. smalltalk.addMethod(
  6289. smalltalk.method({
  6290. selector: "renderClassesOn:",
  6291. protocol: 'rendering',
  6292. fn: function (html){
  6293. var self=this;
  6294. return smalltalk.withContext(function($ctx1) {
  6295. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6296. self._updateClassesList();
  6297. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},globals.TestRunner)})},
  6298. args: ["html"],
  6299. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6300. messageSends: ["class:", "ul", "updateClassesList"],
  6301. referencedClasses: []
  6302. }),
  6303. globals.TestRunner);
  6304. smalltalk.addMethod(
  6305. smalltalk.method({
  6306. selector: "renderErrorsOn:",
  6307. protocol: 'rendering',
  6308. fn: function (html){
  6309. var self=this;
  6310. return smalltalk.withContext(function($ctx1) {
  6311. var $1,$2,$3,$4;
  6312. _st(_st(self._result())._errors())._do_((function(each){
  6313. return smalltalk.withContext(function($ctx2) {
  6314. $1=_st(html)._li();
  6315. _st($1)._class_("errors");
  6316. $2=$1;
  6317. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6318. $ctx2.sendIdx[","]=1;
  6319. _st($2)._with_($3);
  6320. $4=_st($1)._onClick_((function(){
  6321. return smalltalk.withContext(function($ctx3) {
  6322. return self._performFailure_(each);
  6323. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6324. return $4;
  6325. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6326. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},globals.TestRunner)})},
  6327. args: ["html"],
  6328. source: "renderErrorsOn: html\x0a\x09self result errors do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'errors';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  6329. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6330. referencedClasses: []
  6331. }),
  6332. globals.TestRunner);
  6333. smalltalk.addMethod(
  6334. smalltalk.method({
  6335. selector: "renderFailuresOn:",
  6336. protocol: 'rendering',
  6337. fn: function (html){
  6338. var self=this;
  6339. return smalltalk.withContext(function($ctx1) {
  6340. var $1,$2,$3,$4;
  6341. _st(_st(self._result())._failures())._do_((function(each){
  6342. return smalltalk.withContext(function($ctx2) {
  6343. $1=_st(html)._li();
  6344. _st($1)._class_("failures");
  6345. $2=$1;
  6346. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6347. $ctx2.sendIdx[","]=1;
  6348. _st($2)._with_($3);
  6349. $4=_st($1)._onClick_((function(){
  6350. return smalltalk.withContext(function($ctx3) {
  6351. return self._performFailure_(each);
  6352. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6353. return $4;
  6354. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6355. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},globals.TestRunner)})},
  6356. args: ["html"],
  6357. source: "renderFailuresOn: html\x0a\x09self result failures do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'failures';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  6358. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6359. referencedClasses: []
  6360. }),
  6361. globals.TestRunner);
  6362. smalltalk.addMethod(
  6363. smalltalk.method({
  6364. selector: "renderResultsOn:",
  6365. protocol: 'rendering',
  6366. fn: function (html){
  6367. var self=this;
  6368. return smalltalk.withContext(function($ctx1) {
  6369. self["@statusDiv"]=_st(html)._div();
  6370. _st(html)._with_(self._progressBar());
  6371. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6372. self._updateMethodsList();
  6373. self._updateStatusDiv();
  6374. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},globals.TestRunner)})},
  6375. args: ["html"],
  6376. source: "renderResultsOn: html\x0a\x09statusDiv := html div.\x0a\x09html with: self progressBar.\x0a\x09methodsList := html ul class: 'amber_column sunit results'.\x0a\x09self updateMethodsList.\x0a\x09self updateStatusDiv",
  6377. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6378. referencedClasses: []
  6379. }),
  6380. globals.TestRunner);
  6381. smalltalk.addMethod(
  6382. smalltalk.method({
  6383. selector: "result",
  6384. protocol: 'accessing',
  6385. fn: function (){
  6386. var self=this;
  6387. var $1;
  6388. $1=self["@result"];
  6389. return $1;
  6390. },
  6391. args: [],
  6392. source: "result\x0a\x09^ result",
  6393. messageSends: [],
  6394. referencedClasses: []
  6395. }),
  6396. globals.TestRunner);
  6397. smalltalk.addMethod(
  6398. smalltalk.method({
  6399. selector: "run:",
  6400. protocol: 'actions',
  6401. fn: function (aCollection){
  6402. var self=this;
  6403. var worker;
  6404. function $TestSuiteRunner(){return globals.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6405. function $ResultAnnouncement(){return globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6406. return smalltalk.withContext(function($ctx1) {
  6407. var $1;
  6408. worker=_st($TestSuiteRunner())._on_(aCollection);
  6409. self["@result"]=_st(worker)._result();
  6410. $ctx1.sendIdx["result"]=1;
  6411. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6412. return smalltalk.withContext(function($ctx2) {
  6413. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  6414. if(smalltalk.assert($1)){
  6415. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6416. self._updateStatusDiv();
  6417. return self._updateMethodsList();
  6418. };
  6419. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6420. _st(worker)._run();
  6421. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},globals.TestRunner)})},
  6422. args: ["aCollection"],
  6423. source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a\x09worker announcer on: ResultAnnouncement do: [ :ann |\x0a\x09\x09ann result == result ifTrue: [\x0a\x09\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09\x09self updateStatusDiv.\x0a\x09\x09\x09self updateMethodsList\x0a\x09\x09]\x0a\x09].\x0a\x09worker run",
  6424. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6425. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6426. }),
  6427. globals.TestRunner);
  6428. smalltalk.addMethod(
  6429. smalltalk.method({
  6430. selector: "selectAllCategories",
  6431. protocol: 'actions',
  6432. fn: function (){
  6433. var self=this;
  6434. return smalltalk.withContext(function($ctx1) {
  6435. var $1,$2;
  6436. _st(self._packages())._do_((function(each){
  6437. return smalltalk.withContext(function($ctx2) {
  6438. $1=_st(self["@selectedCategories"])._includes_(each);
  6439. if(! smalltalk.assert($1)){
  6440. return _st(self._selectedCategories())._add_(each);
  6441. };
  6442. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6443. self._updateCategoriesList();
  6444. $2=self._updateClassesList();
  6445. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},globals.TestRunner)})},
  6446. args: [],
  6447. source: "selectAllCategories\x0a\x09self packages do: [ :each |\x0a\x09\x09(selectedCategories includes: each) ifFalse: [\x0a\x09\x09\x09self selectedCategories add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6448. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6449. referencedClasses: []
  6450. }),
  6451. globals.TestRunner);
  6452. smalltalk.addMethod(
  6453. smalltalk.method({
  6454. selector: "selectAllClasses",
  6455. protocol: 'actions',
  6456. fn: function (){
  6457. var self=this;
  6458. return smalltalk.withContext(function($ctx1) {
  6459. var $1,$2;
  6460. _st(self._classes())._do_((function(each){
  6461. return smalltalk.withContext(function($ctx2) {
  6462. $1=_st(self["@selectedClasses"])._includes_(each);
  6463. if(! smalltalk.assert($1)){
  6464. return _st(self._selectedClasses())._add_(each);
  6465. };
  6466. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6467. self._updateCategoriesList();
  6468. $2=self._updateClassesList();
  6469. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},globals.TestRunner)})},
  6470. args: [],
  6471. source: "selectAllClasses\x0a\x09self classes do: [ :each |\x0a\x09\x09(selectedClasses includes: each) ifFalse: [\x0a\x09\x09\x09self selectedClasses add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6472. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6473. referencedClasses: []
  6474. }),
  6475. globals.TestRunner);
  6476. smalltalk.addMethod(
  6477. smalltalk.method({
  6478. selector: "selectedCategories",
  6479. protocol: 'accessing',
  6480. fn: function (){
  6481. var self=this;
  6482. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6483. return smalltalk.withContext(function($ctx1) {
  6484. var $2,$1;
  6485. $2=self["@selectedCategories"];
  6486. if(($receiver = $2) == nil || $receiver == null){
  6487. self["@selectedCategories"]=_st($Array())._new();
  6488. $1=self["@selectedCategories"];
  6489. } else {
  6490. $1=$2;
  6491. };
  6492. return $1;
  6493. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},globals.TestRunner)})},
  6494. args: [],
  6495. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  6496. messageSends: ["ifNil:", "new"],
  6497. referencedClasses: ["Array"]
  6498. }),
  6499. globals.TestRunner);
  6500. smalltalk.addMethod(
  6501. smalltalk.method({
  6502. selector: "selectedClasses",
  6503. protocol: 'accessing',
  6504. fn: function (){
  6505. var self=this;
  6506. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6507. return smalltalk.withContext(function($ctx1) {
  6508. var $2,$1;
  6509. $2=self["@selectedClasses"];
  6510. if(($receiver = $2) == nil || $receiver == null){
  6511. self["@selectedClasses"]=_st($Array())._new();
  6512. $1=self["@selectedClasses"];
  6513. } else {
  6514. $1=$2;
  6515. };
  6516. return $1;
  6517. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},globals.TestRunner)})},
  6518. args: [],
  6519. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  6520. messageSends: ["ifNil:", "new"],
  6521. referencedClasses: ["Array"]
  6522. }),
  6523. globals.TestRunner);
  6524. smalltalk.addMethod(
  6525. smalltalk.method({
  6526. selector: "statusInfo",
  6527. protocol: 'accessing',
  6528. fn: function (){
  6529. var self=this;
  6530. return smalltalk.withContext(function($ctx1) {
  6531. var $2,$1;
  6532. $2=_st(_st(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  6533. $ctx1.sendIdx[","]=2;
  6534. $1=_st($2).__comma(self._printFailures());
  6535. $ctx1.sendIdx[","]=1;
  6536. return $1;
  6537. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},globals.TestRunner)})},
  6538. args: [],
  6539. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  6540. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6541. referencedClasses: []
  6542. }),
  6543. globals.TestRunner);
  6544. smalltalk.addMethod(
  6545. smalltalk.method({
  6546. selector: "testCases",
  6547. protocol: 'accessing',
  6548. fn: function (){
  6549. var self=this;
  6550. var testCases;
  6551. return smalltalk.withContext(function($ctx1) {
  6552. var $1;
  6553. testCases=[];
  6554. _st(_st(self._selectedClasses())._select_((function(each){
  6555. return smalltalk.withContext(function($ctx2) {
  6556. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6557. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6558. return smalltalk.withContext(function($ctx2) {
  6559. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6560. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6561. $1=testCases;
  6562. return $1;
  6563. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},globals.TestRunner)})},
  6564. args: [],
  6565. source: "testCases\x0a\x09| testCases |\x0a\x09testCases := #().\x0a\x09(self selectedClasses\x0a\x09\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09\x09do: [ :each | testCases addAll: each buildSuite ].\x0a\x09^ testCases",
  6566. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6567. referencedClasses: []
  6568. }),
  6569. globals.TestRunner);
  6570. smalltalk.addMethod(
  6571. smalltalk.method({
  6572. selector: "toggleCategory:",
  6573. protocol: 'actions',
  6574. fn: function (aCategory){
  6575. var self=this;
  6576. return smalltalk.withContext(function($ctx1) {
  6577. var $1,$2;
  6578. $1=self._isSelectedCategory_(aCategory);
  6579. if(smalltalk.assert($1)){
  6580. _st(self["@selectedCategories"])._remove_(aCategory);
  6581. } else {
  6582. _st(self["@selectedCategories"])._add_(aCategory);
  6583. };
  6584. self._updateCategoriesList();
  6585. $2=self._updateClassesList();
  6586. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6587. args: ["aCategory"],
  6588. source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory)\x0a\x09\x09ifFalse: [ selectedCategories add: aCategory ]\x0a\x09\x09ifTrue: [ selectedCategories remove: aCategory ].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6589. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6590. referencedClasses: []
  6591. }),
  6592. globals.TestRunner);
  6593. smalltalk.addMethod(
  6594. smalltalk.method({
  6595. selector: "toggleClass:",
  6596. protocol: 'actions',
  6597. fn: function (aClass){
  6598. var self=this;
  6599. return smalltalk.withContext(function($ctx1) {
  6600. var $1;
  6601. $1=self._isSelectedClass_(aClass);
  6602. if(smalltalk.assert($1)){
  6603. _st(self["@selectedClasses"])._remove_(aClass);
  6604. } else {
  6605. _st(self["@selectedClasses"])._add_(aClass);
  6606. };
  6607. self._updateClassesList();
  6608. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},globals.TestRunner)})},
  6609. args: ["aClass"],
  6610. source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass)\x0a\x09\x09ifFalse: [ selectedClasses add: aClass ]\x0a\x09\x09ifTrue: [ selectedClasses remove: aClass ].\x0a\x09self\x0a\x09\x09updateClassesList",
  6611. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6612. referencedClasses: []
  6613. }),
  6614. globals.TestRunner);
  6615. smalltalk.addMethod(
  6616. smalltalk.method({
  6617. selector: "updateCategoriesList",
  6618. protocol: 'updating',
  6619. fn: function (){
  6620. var self=this;
  6621. return smalltalk.withContext(function($ctx1) {
  6622. var $1,$2,$3,$4,$5;
  6623. _st(self["@packagesList"])._contents_((function(html){
  6624. return smalltalk.withContext(function($ctx2) {
  6625. $1=_st(html)._li();
  6626. $ctx2.sendIdx["li"]=1;
  6627. _st($1)._class_("all");
  6628. $ctx2.sendIdx["class:"]=1;
  6629. _st($1)._with_("All");
  6630. $ctx2.sendIdx["with:"]=1;
  6631. $2=_st($1)._onClick_((function(){
  6632. return smalltalk.withContext(function($ctx3) {
  6633. return self._selectAllCategories();
  6634. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6635. $ctx2.sendIdx["onClick:"]=1;
  6636. $2;
  6637. return _st(self._packages())._do_((function(each){
  6638. var li;
  6639. return smalltalk.withContext(function($ctx3) {
  6640. li=_st(html)._li();
  6641. li;
  6642. $3=_st(self._selectedCategories())._includes_(each);
  6643. if(smalltalk.assert($3)){
  6644. _st(li)._class_("selected");
  6645. };
  6646. $4=li;
  6647. _st($4)._with_(each);
  6648. $5=_st($4)._onClick_((function(){
  6649. return smalltalk.withContext(function($ctx4) {
  6650. return self._toggleCategory_(each);
  6651. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6652. return $5;
  6653. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6654. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6655. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.TestRunner)})},
  6656. args: [],
  6657. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09\x09html li\x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [ self selectAllCategories ].\x0a\x09self packages do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self toggleCategory: each ]] ]",
  6658. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6659. referencedClasses: []
  6660. }),
  6661. globals.TestRunner);
  6662. smalltalk.addMethod(
  6663. smalltalk.method({
  6664. selector: "updateClassesList",
  6665. protocol: 'updating',
  6666. fn: function (){
  6667. var self=this;
  6668. return smalltalk.withContext(function($ctx1) {
  6669. var $1,$2,$3,$4,$5,$6;
  6670. _st(self["@classesList"])._contents_((function(html){
  6671. return smalltalk.withContext(function($ctx2) {
  6672. $1=_st(self._selectedCategories())._isEmpty();
  6673. if(! smalltalk.assert($1)){
  6674. $2=_st(html)._li();
  6675. $ctx2.sendIdx["li"]=1;
  6676. _st($2)._class_("all");
  6677. $ctx2.sendIdx["class:"]=1;
  6678. _st($2)._with_("All");
  6679. $ctx2.sendIdx["with:"]=1;
  6680. $3=_st($2)._onClick_((function(){
  6681. return smalltalk.withContext(function($ctx3) {
  6682. return self._selectAllClasses();
  6683. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6684. $ctx2.sendIdx["onClick:"]=1;
  6685. $3;
  6686. };
  6687. return _st(self._classes())._do_((function(each){
  6688. var li;
  6689. return smalltalk.withContext(function($ctx3) {
  6690. li=_st(html)._li();
  6691. li;
  6692. $4=_st(self._selectedClasses())._includes_(each);
  6693. if(smalltalk.assert($4)){
  6694. _st(li)._class_("selected");
  6695. };
  6696. $5=li;
  6697. _st($5)._with_(_st(each)._name());
  6698. $6=_st($5)._onClick_((function(){
  6699. return smalltalk.withContext(function($ctx4) {
  6700. return self._toggleClass_(each);
  6701. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6702. return $6;
  6703. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6704. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6705. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.TestRunner)})},
  6706. args: [],
  6707. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [ self selectAllClasses ]].\x0a\x09self classes do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [ self toggleClass: each ]] ]",
  6708. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6709. referencedClasses: []
  6710. }),
  6711. globals.TestRunner);
  6712. smalltalk.addMethod(
  6713. smalltalk.method({
  6714. selector: "updateMethodsList",
  6715. protocol: 'updating',
  6716. fn: function (){
  6717. var self=this;
  6718. return smalltalk.withContext(function($ctx1) {
  6719. _st(self["@methodsList"])._contents_((function(html){
  6720. return smalltalk.withContext(function($ctx2) {
  6721. self._renderErrorsOn_(html);
  6722. return self._renderFailuresOn_(html);
  6723. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6724. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.TestRunner)})},
  6725. args: [],
  6726. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  6727. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6728. referencedClasses: []
  6729. }),
  6730. globals.TestRunner);
  6731. smalltalk.addMethod(
  6732. smalltalk.method({
  6733. selector: "updateStatusDiv",
  6734. protocol: 'updating',
  6735. fn: function (){
  6736. var self=this;
  6737. return smalltalk.withContext(function($ctx1) {
  6738. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6739. _st(self["@statusDiv"])._contents_((function(html){
  6740. return smalltalk.withContext(function($ctx2) {
  6741. return _st(_st(html)._span())._with_(self._statusInfo());
  6742. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6743. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},globals.TestRunner)})},
  6744. args: [],
  6745. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  6746. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6747. referencedClasses: []
  6748. }),
  6749. globals.TestRunner);
  6750. smalltalk.addClass('Workspace', globals.TabWidget, ['sourceArea'], 'IDE');
  6751. smalltalk.addMethod(
  6752. smalltalk.method({
  6753. selector: "clearWorkspace",
  6754. protocol: 'actions',
  6755. fn: function (){
  6756. var self=this;
  6757. return smalltalk.withContext(function($ctx1) {
  6758. _st(self["@sourceArea"])._clear();
  6759. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},globals.Workspace)})},
  6760. args: [],
  6761. source: "clearWorkspace\x0a\x09sourceArea clear",
  6762. messageSends: ["clear"],
  6763. referencedClasses: []
  6764. }),
  6765. globals.Workspace);
  6766. smalltalk.addMethod(
  6767. smalltalk.method({
  6768. selector: "doIt",
  6769. protocol: 'actions',
  6770. fn: function (){
  6771. var self=this;
  6772. return smalltalk.withContext(function($ctx1) {
  6773. _st(self["@sourceArea"])._doIt();
  6774. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},globals.Workspace)})},
  6775. args: [],
  6776. source: "doIt\x0a\x09sourceArea doIt",
  6777. messageSends: ["doIt"],
  6778. referencedClasses: []
  6779. }),
  6780. globals.Workspace);
  6781. smalltalk.addMethod(
  6782. smalltalk.method({
  6783. selector: "fileIn",
  6784. protocol: 'actions',
  6785. fn: function (){
  6786. var self=this;
  6787. return smalltalk.withContext(function($ctx1) {
  6788. _st(self["@sourceArea"])._fileIn();
  6789. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.Workspace)})},
  6790. args: [],
  6791. source: "fileIn\x0a\x09sourceArea fileIn",
  6792. messageSends: ["fileIn"],
  6793. referencedClasses: []
  6794. }),
  6795. globals.Workspace);
  6796. smalltalk.addMethod(
  6797. smalltalk.method({
  6798. selector: "inspectIt",
  6799. protocol: 'actions',
  6800. fn: function (){
  6801. var self=this;
  6802. return smalltalk.withContext(function($ctx1) {
  6803. _st(self["@sourceArea"])._inspectIt();
  6804. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.Workspace)})},
  6805. args: [],
  6806. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6807. messageSends: ["inspectIt"],
  6808. referencedClasses: []
  6809. }),
  6810. globals.Workspace);
  6811. smalltalk.addMethod(
  6812. smalltalk.method({
  6813. selector: "label",
  6814. protocol: 'accessing',
  6815. fn: function (){
  6816. var self=this;
  6817. return "Workspace";
  6818. },
  6819. args: [],
  6820. source: "label\x0a\x09^ 'Workspace'",
  6821. messageSends: [],
  6822. referencedClasses: []
  6823. }),
  6824. globals.Workspace);
  6825. smalltalk.addMethod(
  6826. smalltalk.method({
  6827. selector: "printIt",
  6828. protocol: 'actions',
  6829. fn: function (){
  6830. var self=this;
  6831. return smalltalk.withContext(function($ctx1) {
  6832. _st(self["@sourceArea"])._printIt();
  6833. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.Workspace)})},
  6834. args: [],
  6835. source: "printIt\x0a\x09sourceArea printIt",
  6836. messageSends: ["printIt"],
  6837. referencedClasses: []
  6838. }),
  6839. globals.Workspace);
  6840. smalltalk.addMethod(
  6841. smalltalk.method({
  6842. selector: "renderBoxOn:",
  6843. protocol: 'rendering',
  6844. fn: function (html){
  6845. var self=this;
  6846. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  6847. return smalltalk.withContext(function($ctx1) {
  6848. self["@sourceArea"]=_st($SourceArea())._new();
  6849. _st(self["@sourceArea"])._renderOn_(html);
  6850. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Workspace)})},
  6851. args: ["html"],
  6852. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  6853. messageSends: ["new", "renderOn:"],
  6854. referencedClasses: ["SourceArea"]
  6855. }),
  6856. globals.Workspace);
  6857. smalltalk.addMethod(
  6858. smalltalk.method({
  6859. selector: "renderButtonsOn:",
  6860. protocol: 'rendering',
  6861. fn: function (html){
  6862. var self=this;
  6863. return smalltalk.withContext(function($ctx1) {
  6864. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  6865. $1=_st(html)._button();
  6866. $ctx1.sendIdx["button"]=1;
  6867. _st($1)._with_("DoIt");
  6868. $ctx1.sendIdx["with:"]=1;
  6869. _st($1)._title_("ctrl+d");
  6870. $ctx1.sendIdx["title:"]=1;
  6871. $2=_st($1)._onClick_((function(){
  6872. return smalltalk.withContext(function($ctx2) {
  6873. return self._doIt();
  6874. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6875. $ctx1.sendIdx["onClick:"]=1;
  6876. $3=_st(html)._button();
  6877. $ctx1.sendIdx["button"]=2;
  6878. _st($3)._with_("PrintIt");
  6879. $ctx1.sendIdx["with:"]=2;
  6880. _st($3)._title_("ctrl+p");
  6881. $ctx1.sendIdx["title:"]=2;
  6882. $4=_st($3)._onClick_((function(){
  6883. return smalltalk.withContext(function($ctx2) {
  6884. return self._printIt();
  6885. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  6886. $ctx1.sendIdx["onClick:"]=2;
  6887. $5=_st(html)._button();
  6888. $ctx1.sendIdx["button"]=3;
  6889. _st($5)._with_("InspectIt");
  6890. $ctx1.sendIdx["with:"]=3;
  6891. _st($5)._title_("ctrl+i");
  6892. $ctx1.sendIdx["title:"]=3;
  6893. $6=_st($5)._onClick_((function(){
  6894. return smalltalk.withContext(function($ctx2) {
  6895. return self._inspectIt();
  6896. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  6897. $ctx1.sendIdx["onClick:"]=3;
  6898. $7=_st(html)._button();
  6899. $ctx1.sendIdx["button"]=4;
  6900. _st($7)._with_("FileIn");
  6901. $ctx1.sendIdx["with:"]=4;
  6902. _st($7)._title_("ctrl+f");
  6903. $8=_st($7)._onClick_((function(){
  6904. return smalltalk.withContext(function($ctx2) {
  6905. return self._fileIn();
  6906. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  6907. $ctx1.sendIdx["onClick:"]=4;
  6908. $9=_st(html)._button();
  6909. _st($9)._with_("Clear workspace");
  6910. $10=_st($9)._onClick_((function(){
  6911. return smalltalk.withContext(function($ctx2) {
  6912. return self._clearWorkspace();
  6913. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  6914. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Workspace)})},
  6915. args: ["html"],
  6916. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [ self doIt ].\x0a\x09html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [ self printIt ].\x0a\x09html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [ self inspectIt ].\x0a\x09html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [ self fileIn ].\x0a\x09html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [ self clearWorkspace ]",
  6917. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  6918. referencedClasses: []
  6919. }),
  6920. globals.Workspace);
  6921. smalltalk.addMethod(
  6922. smalltalk.method({
  6923. selector: "show",
  6924. protocol: 'actions',
  6925. fn: function (){
  6926. var self=this;
  6927. return smalltalk.withContext(function($ctx1) {
  6928. globals.Workspace.superclass.fn.prototype._show.apply(_st(self), []);
  6929. _st(self["@sourceArea"])._focus();
  6930. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.Workspace)})},
  6931. args: [],
  6932. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  6933. messageSends: ["show", "focus"],
  6934. referencedClasses: []
  6935. }),
  6936. globals.Workspace);
  6937. smalltalk.addMethod(
  6938. smalltalk.method({
  6939. selector: "inspectOn:",
  6940. protocol: '*IDE',
  6941. fn: function (anInspector){
  6942. var self=this;
  6943. var variables;
  6944. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6945. return smalltalk.withContext(function($ctx1) {
  6946. var $1;
  6947. variables=_st($Dictionary())._new();
  6948. _st(variables)._at_put_("#self",self);
  6949. $ctx1.sendIdx["at:put:"]=1;
  6950. _st(variables)._at_put_("#year",self._year());
  6951. $ctx1.sendIdx["at:put:"]=2;
  6952. _st(variables)._at_put_("#month",self._month());
  6953. $ctx1.sendIdx["at:put:"]=3;
  6954. _st(variables)._at_put_("#day",self._day());
  6955. $ctx1.sendIdx["at:put:"]=4;
  6956. _st(variables)._at_put_("#hours",self._hours());
  6957. $ctx1.sendIdx["at:put:"]=5;
  6958. _st(variables)._at_put_("#minutes",self._minutes());
  6959. $ctx1.sendIdx["at:put:"]=6;
  6960. _st(variables)._at_put_("#seconds",self._seconds());
  6961. $ctx1.sendIdx["at:put:"]=7;
  6962. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  6963. _st(anInspector)._setLabel_(self._printString());
  6964. $1=_st(anInspector)._setVariables_(variables);
  6965. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Date)})},
  6966. args: ["anInspector"],
  6967. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#year' put: self year.\x0a\x09variables at: '#month' put: self month.\x0a\x09variables at: '#day' put: self day.\x0a\x09variables at: '#hours' put: self hours.\x0a\x09variables at: '#minutes' put: self minutes.\x0a\x09variables at: '#seconds' put: self seconds.\x0a\x09variables at: '#milliseconds' put: self milliseconds.\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  6968. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  6969. referencedClasses: ["Dictionary"]
  6970. }),
  6971. globals.Date);
  6972. smalltalk.addMethod(
  6973. smalltalk.method({
  6974. selector: "inspectOn:",
  6975. protocol: '*IDE',
  6976. fn: function (anInspector){
  6977. var self=this;
  6978. var variables;
  6979. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6980. return smalltalk.withContext(function($ctx1) {
  6981. var $1;
  6982. variables=_st($Dictionary())._new();
  6983. _st(variables)._at_put_("#self",self);
  6984. $ctx1.sendIdx["at:put:"]=1;
  6985. self._withIndexDo_((function(each,i){
  6986. return smalltalk.withContext(function($ctx2) {
  6987. return _st(variables)._at_put_(i,each);
  6988. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  6989. _st(anInspector)._setLabel_(self._printString());
  6990. $1=_st(anInspector)._setVariables_(variables);
  6991. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Collection)})},
  6992. args: ["anInspector"],
  6993. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self withIndexDo: [ :each :i |\x0a\x09\x09variables at: i put: each ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  6994. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  6995. referencedClasses: ["Dictionary"]
  6996. }),
  6997. globals.Collection);
  6998. smalltalk.addMethod(
  6999. smalltalk.method({
  7000. selector: "inspectOn:",
  7001. protocol: '*IDE',
  7002. fn: function (anInspector){
  7003. var self=this;
  7004. var label;
  7005. return smalltalk.withContext(function($ctx1) {
  7006. var $3,$2,$1,$5,$4;
  7007. globals.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  7008. $3=self._printString();
  7009. $ctx1.sendIdx["printString"]=1;
  7010. $2=_st($3)._size();
  7011. $1=_st($2).__gt((30));
  7012. if(smalltalk.assert($1)){
  7013. $5=self._printString();
  7014. $ctx1.sendIdx["printString"]=2;
  7015. $4=_st($5)._copyFrom_to_((1),(30));
  7016. label=_st($4).__comma("...'");
  7017. label;
  7018. } else {
  7019. label=self._printString();
  7020. label;
  7021. };
  7022. _st(anInspector)._setLabel_(label);
  7023. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},globals.String)})},
  7024. args: ["anInspector"],
  7025. source: "inspectOn: anInspector\x0a\x09| label |\x0a\x09super inspectOn: anInspector.\x0a\x09self printString size > 30\x0a\x09\x09ifTrue: [ label := (self printString copyFrom: 1 to: 30), '...''' ]\x0a\x09\x09ifFalse: [ label := self printString ].\x0a\x09anInspector setLabel: label",
  7026. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7027. referencedClasses: []
  7028. }),
  7029. globals.String);
  7030. smalltalk.addMethod(
  7031. smalltalk.method({
  7032. selector: "inspectOn:",
  7033. protocol: '*IDE',
  7034. fn: function (anInspector){
  7035. var self=this;
  7036. var variables;
  7037. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7038. return smalltalk.withContext(function($ctx1) {
  7039. var $1;
  7040. variables=_st($Dictionary())._new();
  7041. _st(variables)._at_put_("#self",self);
  7042. $ctx1.sendIdx["at:put:"]=1;
  7043. _st(variables)._at_put_("#keys",self._keys());
  7044. $ctx1.sendIdx["at:put:"]=2;
  7045. self._keysAndValuesDo_((function(key,value){
  7046. return smalltalk.withContext(function($ctx2) {
  7047. return _st(variables)._at_put_(key,value);
  7048. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  7049. _st(anInspector)._setLabel_(self._printString());
  7050. $1=_st(anInspector)._setVariables_(variables);
  7051. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.AssociativeCollection)})},
  7052. args: ["anInspector"],
  7053. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#keys' put: self keys.\x0a\x09self keysAndValuesDo: [ :key :value |\x0a\x09\x09variables at: key put: value ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7054. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  7055. referencedClasses: ["Dictionary"]
  7056. }),
  7057. globals.AssociativeCollection);
  7058. smalltalk.addMethod(
  7059. smalltalk.method({
  7060. selector: "inspectOn:",
  7061. protocol: '*IDE',
  7062. fn: function (anInspector){
  7063. var self=this;
  7064. var variables,i;
  7065. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7066. return smalltalk.withContext(function($ctx1) {
  7067. var $1;
  7068. variables=_st($Dictionary())._new();
  7069. _st(variables)._at_put_("#self",self);
  7070. $ctx1.sendIdx["at:put:"]=1;
  7071. i=(1);
  7072. self._do_((function(each){
  7073. return smalltalk.withContext(function($ctx2) {
  7074. _st(variables)._at_put_(i,each);
  7075. i=_st(i).__plus((1));
  7076. return i;
  7077. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7078. _st(anInspector)._setLabel_(self._printString());
  7079. $1=_st(anInspector)._setVariables_(variables);
  7080. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},globals.Set)})},
  7081. args: ["anInspector"],
  7082. source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7083. messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"],
  7084. referencedClasses: ["Dictionary"]
  7085. }),
  7086. globals.Set);
  7087. smalltalk.addMethod(
  7088. smalltalk.method({
  7089. selector: "inspectOn:",
  7090. protocol: '*IDE',
  7091. fn: function (anInspector){
  7092. var self=this;
  7093. var variables;
  7094. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7095. return smalltalk.withContext(function($ctx1) {
  7096. var $1;
  7097. variables=_st($Dictionary())._new();
  7098. _st(variables)._at_put_("#self",self);
  7099. $ctx1.sendIdx["at:put:"]=1;
  7100. _st(variables)._at_put_("#home",self._home());
  7101. $ctx1.sendIdx["at:put:"]=2;
  7102. _st(variables)._at_put_("#receiver",self._receiver());
  7103. $ctx1.sendIdx["at:put:"]=3;
  7104. _st(variables)._at_put_("#selector",self._selector());
  7105. $ctx1.sendIdx["at:put:"]=4;
  7106. _st(variables)._at_put_("#temps",self._temps());
  7107. $ctx1.sendIdx["at:put:"]=5;
  7108. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7109. return smalltalk.withContext(function($ctx2) {
  7110. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7111. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7112. _st(anInspector)._setLabel_(self._printString());
  7113. $1=_st(anInspector)._setVariables_(variables);
  7114. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.MethodContext)})},
  7115. args: ["anInspector"],
  7116. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#temps' put: self temps.\x0a\x09self class instanceVariableNames do: [ :each |\x0a\x09\x09variables at: each put: (self instVarAt: each) ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7117. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7118. referencedClasses: ["Dictionary"]
  7119. }),
  7120. globals.MethodContext);
  7121. });