2
0

IDE.js 275 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Canvas", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('IDE');
  3. smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "browser",
  8. category: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. var $1;
  13. $1=self["@browser"];
  14. return $1;
  15. }, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesList)})},
  16. args: [],
  17. source: "browser\x0a\x09^browser",
  18. messageSends: [],
  19. referencedClasses: []
  20. }),
  21. smalltalk.ClassesList);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "browser:",
  25. category: 'accessing',
  26. fn: function (aBrowser){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. self["@browser"]=aBrowser;
  30. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesList)})},
  31. args: ["aBrowser"],
  32. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  33. messageSends: [],
  34. referencedClasses: []
  35. }),
  36. smalltalk.ClassesList);
  37. smalltalk.addMethod(
  38. smalltalk.method({
  39. selector: "category",
  40. category: 'accessing',
  41. fn: function (){
  42. var self=this;
  43. return smalltalk.withContext(function($ctx1) {
  44. var $1;
  45. $1=_st(self._browser())._selectedPackage();
  46. return $1;
  47. }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.ClassesList)})},
  48. args: [],
  49. source: "category\x0a\x09^self browser selectedPackage",
  50. messageSends: ["selectedPackage", "browser"],
  51. referencedClasses: []
  52. }),
  53. smalltalk.ClassesList);
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "getNodes",
  57. category: 'accessing',
  58. fn: function (){
  59. var self=this;
  60. var classes,children,others;
  61. function $ClassesListNode(){return smalltalk.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  62. return smalltalk.withContext(function($ctx1) {
  63. var $1,$2,$4,$3;
  64. $1=self._browser();
  65. $ctx1.sendIdx["browser"]=1;
  66. classes=_st($1)._classes();
  67. children=[];
  68. others=[];
  69. _st(classes)._do_((function(each){
  70. return smalltalk.withContext(function($ctx2) {
  71. $2=_st(classes)._includes_(_st(each)._superclass());
  72. if(smalltalk.assert($2)){
  73. return _st(others)._add_(each);
  74. } else {
  75. return _st(children)._add_(each);
  76. $ctx2.sendIdx["add:"]=1;
  77. };
  78. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  79. $3=_st(children)._collect_((function(each){
  80. return smalltalk.withContext(function($ctx2) {
  81. $4=self._browser();
  82. return _st($ClassesListNode())._on_browser_classes_level_(each,$4,others,(0));
  83. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  84. return $3;
  85. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},smalltalk.ClassesList)})},
  86. args: [],
  87. 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]",
  88. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"],
  89. referencedClasses: ["ClassesListNode"]
  90. }),
  91. smalltalk.ClassesList);
  92. smalltalk.addMethod(
  93. smalltalk.method({
  94. selector: "nodes",
  95. category: 'accessing',
  96. fn: function (){
  97. var self=this;
  98. return smalltalk.withContext(function($ctx1) {
  99. var $1,$2;
  100. $1=self["@nodes"];
  101. if(($receiver = $1) == nil || $receiver == null){
  102. self["@nodes"]=self._getNodes();
  103. self["@nodes"];
  104. } else {
  105. $1;
  106. };
  107. $2=self["@nodes"];
  108. return $2;
  109. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassesList)})},
  110. args: [],
  111. source: "nodes\x0a\x09nodes ifNil: [nodes := self getNodes].\x0a\x09^nodes",
  112. messageSends: ["ifNil:", "getNodes"],
  113. referencedClasses: []
  114. }),
  115. smalltalk.ClassesList);
  116. smalltalk.addMethod(
  117. smalltalk.method({
  118. selector: "renderOn:",
  119. category: 'rendering',
  120. fn: function (html){
  121. var self=this;
  122. return smalltalk.withContext(function($ctx1) {
  123. var $1,$2;
  124. $1=_st(html)._ul();
  125. _st($1)._class_("amber_column browser classes");
  126. $2=_st($1)._yourself();
  127. self["@ul"]=$2;
  128. self._updateNodes();
  129. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.ClassesList)})},
  130. args: ["html"],
  131. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  132. messageSends: ["class:", "ul", "yourself", "updateNodes"],
  133. referencedClasses: []
  134. }),
  135. smalltalk.ClassesList);
  136. smalltalk.addMethod(
  137. smalltalk.method({
  138. selector: "resetNodes",
  139. category: 'accessing',
  140. fn: function (){
  141. var self=this;
  142. return smalltalk.withContext(function($ctx1) {
  143. self["@nodes"]=nil;
  144. return self}, function($ctx1) {$ctx1.fill(self,"resetNodes",{},smalltalk.ClassesList)})},
  145. args: [],
  146. source: "resetNodes\x0a\x09nodes := nil",
  147. messageSends: [],
  148. referencedClasses: []
  149. }),
  150. smalltalk.ClassesList);
  151. smalltalk.addMethod(
  152. smalltalk.method({
  153. selector: "updateNodes",
  154. category: 'rendering',
  155. fn: function (){
  156. var self=this;
  157. return smalltalk.withContext(function($ctx1) {
  158. _st(self["@ul"])._contents_((function(html){
  159. return smalltalk.withContext(function($ctx2) {
  160. return _st(self._nodes())._do_((function(each){
  161. return smalltalk.withContext(function($ctx3) {
  162. return _st(each)._renderOn_(html);
  163. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  164. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  165. return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{},smalltalk.ClassesList)})},
  166. args: [],
  167. source: "updateNodes\x0a\x09ul contents: [:html |\x0a\x09\x09self nodes do: [:each |\x0a\x09\x09\x09each renderOn: html]]",
  168. messageSends: ["contents:", "do:", "nodes", "renderOn:"],
  169. referencedClasses: []
  170. }),
  171. smalltalk.ClassesList);
  172. smalltalk.addMethod(
  173. smalltalk.method({
  174. selector: "on:",
  175. category: 'instance creation',
  176. fn: function (aBrowser){
  177. var self=this;
  178. return smalltalk.withContext(function($ctx1) {
  179. var $2,$3,$1;
  180. $2=self._new();
  181. _st($2)._browser_(aBrowser);
  182. $3=_st($2)._yourself();
  183. $1=$3;
  184. return $1;
  185. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},smalltalk.ClassesList.klass)})},
  186. args: ["aBrowser"],
  187. source: "on: aBrowser\x0a\x09^self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  188. messageSends: ["browser:", "new", "yourself"],
  189. referencedClasses: []
  190. }),
  191. smalltalk.ClassesList.klass);
  192. smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  193. smalltalk.addMethod(
  194. smalltalk.method({
  195. selector: "browser",
  196. category: 'accessing',
  197. fn: function (){
  198. var self=this;
  199. return smalltalk.withContext(function($ctx1) {
  200. var $1;
  201. $1=self["@browser"];
  202. return $1;
  203. }, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesListNode)})},
  204. args: [],
  205. source: "browser\x0a\x09^browser",
  206. messageSends: [],
  207. referencedClasses: []
  208. }),
  209. smalltalk.ClassesListNode);
  210. smalltalk.addMethod(
  211. smalltalk.method({
  212. selector: "browser:",
  213. category: 'accessing',
  214. fn: function (aBrowser){
  215. var self=this;
  216. return smalltalk.withContext(function($ctx1) {
  217. self["@browser"]=aBrowser;
  218. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesListNode)})},
  219. args: ["aBrowser"],
  220. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  221. messageSends: [],
  222. referencedClasses: []
  223. }),
  224. smalltalk.ClassesListNode);
  225. smalltalk.addMethod(
  226. smalltalk.method({
  227. selector: "getNodesFrom:",
  228. category: 'accessing',
  229. fn: function (aCollection){
  230. var self=this;
  231. var children,others;
  232. function $ClassesListNode(){return smalltalk.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  233. return smalltalk.withContext(function($ctx1) {
  234. var $1;
  235. children=[];
  236. others=[];
  237. _st(aCollection)._do_((function(each){
  238. return smalltalk.withContext(function($ctx2) {
  239. $1=_st(_st(each)._superclass()).__eq(self._theClass());
  240. if(smalltalk.assert($1)){
  241. return _st(children)._add_(each);
  242. $ctx2.sendIdx["add:"]=1;
  243. } else {
  244. return _st(others)._add_(each);
  245. };
  246. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  247. self["@nodes"]=_st(children)._collect_((function(each){
  248. return smalltalk.withContext(function($ctx2) {
  249. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,_st(self._level()).__plus((1)));
  250. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  251. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},smalltalk.ClassesListNode)})},
  252. args: ["aCollection"],
  253. 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]",
  254. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
  255. referencedClasses: ["ClassesListNode"]
  256. }),
  257. smalltalk.ClassesListNode);
  258. smalltalk.addMethod(
  259. smalltalk.method({
  260. selector: "label",
  261. category: 'accessing',
  262. fn: function (){
  263. var self=this;
  264. var str;
  265. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  266. return smalltalk.withContext(function($ctx1) {
  267. var $1;
  268. str=_st(_st($String())._new())._writeStream();
  269. _st(self._level())._timesRepeat_((function(){
  270. return smalltalk.withContext(function($ctx2) {
  271. return _st(str)._nextPutAll_("    ");
  272. $ctx2.sendIdx["nextPutAll:"]=1;
  273. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  274. _st(str)._nextPutAll_(_st(self._theClass())._name());
  275. $1=_st(str)._contents();
  276. return $1;
  277. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},smalltalk.ClassesListNode)})},
  278. args: [],
  279. 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",
  280. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"],
  281. referencedClasses: ["String"]
  282. }),
  283. smalltalk.ClassesListNode);
  284. smalltalk.addMethod(
  285. smalltalk.method({
  286. selector: "level",
  287. category: 'accessing',
  288. fn: function (){
  289. var self=this;
  290. return smalltalk.withContext(function($ctx1) {
  291. var $1;
  292. $1=self["@level"];
  293. return $1;
  294. }, function($ctx1) {$ctx1.fill(self,"level",{},smalltalk.ClassesListNode)})},
  295. args: [],
  296. source: "level\x0a\x09^level",
  297. messageSends: [],
  298. referencedClasses: []
  299. }),
  300. smalltalk.ClassesListNode);
  301. smalltalk.addMethod(
  302. smalltalk.method({
  303. selector: "level:",
  304. category: 'accessing',
  305. fn: function (anInteger){
  306. var self=this;
  307. return smalltalk.withContext(function($ctx1) {
  308. self["@level"]=anInteger;
  309. return self}, function($ctx1) {$ctx1.fill(self,"level:",{anInteger:anInteger},smalltalk.ClassesListNode)})},
  310. args: ["anInteger"],
  311. source: "level: anInteger\x0a\x09level := anInteger",
  312. messageSends: [],
  313. referencedClasses: []
  314. }),
  315. smalltalk.ClassesListNode);
  316. smalltalk.addMethod(
  317. smalltalk.method({
  318. selector: "nodes",
  319. category: 'accessing',
  320. fn: function (){
  321. var self=this;
  322. return smalltalk.withContext(function($ctx1) {
  323. var $1;
  324. $1=self["@nodes"];
  325. return $1;
  326. }, function($ctx1) {$ctx1.fill(self,"nodes",{},smalltalk.ClassesListNode)})},
  327. args: [],
  328. source: "nodes\x0a\x09^nodes",
  329. messageSends: [],
  330. referencedClasses: []
  331. }),
  332. smalltalk.ClassesListNode);
  333. smalltalk.addMethod(
  334. smalltalk.method({
  335. selector: "renderOn:",
  336. category: '',
  337. fn: function (html){
  338. var self=this;
  339. var li,cssClass;
  340. return smalltalk.withContext(function($ctx1) {
  341. var $1,$2,$5,$4,$6,$3,$9,$8,$7;
  342. cssClass="";
  343. li=_st(_st(html)._li())._onClick_((function(){
  344. return smalltalk.withContext(function($ctx2) {
  345. $1=self._browser();
  346. $ctx2.sendIdx["browser"]=1;
  347. $2=self._theClass();
  348. $ctx2.sendIdx["theClass"]=1;
  349. return _st($1)._selectClass_($2);
  350. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  351. _st(_st(li)._asJQuery())._html_(self._label());
  352. $5=self._browser();
  353. $4=_st($5)._selectedClass();
  354. $6=self._theClass();
  355. $ctx1.sendIdx["theClass"]=2;
  356. $3=_st($4).__eq($6);
  357. if(smalltalk.assert($3)){
  358. cssClass=_st(cssClass).__comma(" selected");
  359. $ctx1.sendIdx[","]=1;
  360. cssClass;
  361. };
  362. $9=self._theClass();
  363. $8=_st($9)._comment();
  364. $7=_st($8)._isEmpty();
  365. if(! smalltalk.assert($7)){
  366. cssClass=_st(cssClass).__comma(" commented");
  367. cssClass;
  368. };
  369. _st(li)._class_(cssClass);
  370. _st(self._nodes())._do_((function(each){
  371. return smalltalk.withContext(function($ctx2) {
  372. return _st(each)._renderOn_(html);
  373. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  374. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},smalltalk.ClassesListNode)})},
  375. args: ["html"],
  376. 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]",
  377. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"],
  378. referencedClasses: []
  379. }),
  380. smalltalk.ClassesListNode);
  381. smalltalk.addMethod(
  382. smalltalk.method({
  383. selector: "theClass",
  384. category: 'accessing',
  385. fn: function (){
  386. var self=this;
  387. return smalltalk.withContext(function($ctx1) {
  388. var $1;
  389. $1=self["@theClass"];
  390. return $1;
  391. }, function($ctx1) {$ctx1.fill(self,"theClass",{},smalltalk.ClassesListNode)})},
  392. args: [],
  393. source: "theClass\x0a\x09^theClass",
  394. messageSends: [],
  395. referencedClasses: []
  396. }),
  397. smalltalk.ClassesListNode);
  398. smalltalk.addMethod(
  399. smalltalk.method({
  400. selector: "theClass:",
  401. category: 'accessing',
  402. fn: function (aClass){
  403. var self=this;
  404. return smalltalk.withContext(function($ctx1) {
  405. self["@theClass"]=aClass;
  406. return self}, function($ctx1) {$ctx1.fill(self,"theClass:",{aClass:aClass},smalltalk.ClassesListNode)})},
  407. args: ["aClass"],
  408. source: "theClass: aClass\x0a\x09theClass := aClass",
  409. messageSends: [],
  410. referencedClasses: []
  411. }),
  412. smalltalk.ClassesListNode);
  413. smalltalk.addMethod(
  414. smalltalk.method({
  415. selector: "on:browser:classes:level:",
  416. category: 'instance creation',
  417. fn: function (aClass,aBrowser,aCollection,anInteger){
  418. var self=this;
  419. return smalltalk.withContext(function($ctx1) {
  420. var $2,$3,$1;
  421. $2=self._new();
  422. _st($2)._theClass_(aClass);
  423. _st($2)._browser_(aBrowser);
  424. _st($2)._level_(anInteger);
  425. _st($2)._getNodesFrom_(aCollection);
  426. $3=_st($2)._yourself();
  427. $1=$3;
  428. return $1;
  429. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},smalltalk.ClassesListNode.klass)})},
  430. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  431. 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",
  432. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
  433. referencedClasses: []
  434. }),
  435. smalltalk.ClassesListNode.klass);
  436. smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
  437. smalltalk.addMethod(
  438. smalltalk.method({
  439. selector: "handleError:",
  440. category: 'error handling',
  441. fn: function (anError){
  442. var self=this;
  443. function $Debugger(){return smalltalk.Debugger||(typeof Debugger=="undefined"?nil:Debugger)}
  444. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  445. function $ErrorHandler(){return smalltalk.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  446. return smalltalk.withContext(function($ctx1) {
  447. var $1,$2,$3;
  448. _st((function(){
  449. return smalltalk.withContext(function($ctx2) {
  450. $1=_st($Debugger())._new();
  451. $ctx2.sendIdx["new"]=1;
  452. _st($1)._error_(anError);
  453. $2=_st($1)._open();
  454. return $2;
  455. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  456. return smalltalk.withContext(function($ctx2) {
  457. $3=_st($ErrorHandler())._new();
  458. return _st($3)._handleError_(error);
  459. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  460. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},smalltalk.DebugErrorHandler)})},
  461. args: ["anError"],
  462. 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 ]",
  463. messageSends: ["on:do:", "error:", "new", "open", "handleError:"],
  464. referencedClasses: ["Debugger", "Error", "ErrorHandler"]
  465. }),
  466. smalltalk.DebugErrorHandler);
  467. smalltalk.addMethod(
  468. smalltalk.method({
  469. selector: "initialize",
  470. category: 'initialization',
  471. fn: function (){
  472. var self=this;
  473. return smalltalk.withContext(function($ctx1) {
  474. self._register();
  475. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.DebugErrorHandler.klass)})},
  476. args: [],
  477. source: "initialize\x0a\x09self register",
  478. messageSends: ["register"],
  479. referencedClasses: []
  480. }),
  481. smalltalk.DebugErrorHandler.klass);
  482. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  483. smalltalk.addMethod(
  484. smalltalk.method({
  485. selector: "clear",
  486. category: 'actions',
  487. fn: function (){
  488. var self=this;
  489. return smalltalk.withContext(function($ctx1) {
  490. self._val_("");
  491. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.SourceArea)})},
  492. args: [],
  493. source: "clear\x0a\x09self val: ''",
  494. messageSends: ["val:"],
  495. referencedClasses: []
  496. }),
  497. smalltalk.SourceArea);
  498. smalltalk.addMethod(
  499. smalltalk.method({
  500. selector: "currentLine",
  501. category: 'accessing',
  502. fn: function (){
  503. var self=this;
  504. return smalltalk.withContext(function($ctx1) {
  505. var $1;
  506. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  507. return $1;
  508. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},smalltalk.SourceArea)})},
  509. args: [],
  510. source: "currentLine\x0a\x09^editor getLine: (editor getCursor line)",
  511. messageSends: ["getLine:", "line", "getCursor"],
  512. referencedClasses: []
  513. }),
  514. smalltalk.SourceArea);
  515. smalltalk.addMethod(
  516. smalltalk.method({
  517. selector: "currentLineOrSelection",
  518. category: 'accessing',
  519. fn: function (){
  520. var self=this;
  521. return smalltalk.withContext(function($ctx1) {
  522. var $2,$1;
  523. $2=_st(self["@editor"])._somethingSelected();
  524. if(smalltalk.assert($2)){
  525. $1=self._selection();
  526. } else {
  527. $1=self._currentLine();
  528. };
  529. return $1;
  530. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},smalltalk.SourceArea)})},
  531. args: [],
  532. source: "currentLineOrSelection\x0a\x09^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
  533. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"],
  534. referencedClasses: []
  535. }),
  536. smalltalk.SourceArea);
  537. smalltalk.addMethod(
  538. smalltalk.method({
  539. selector: "doIt",
  540. category: 'actions',
  541. fn: function (){
  542. var self=this;
  543. var result;
  544. return smalltalk.withContext(function($ctx1) {
  545. var $1,$2,$3;
  546. result=self._eval_(self._currentLineOrSelection());
  547. $1=self._onDoIt();
  548. $ctx1.sendIdx["onDoIt"]=1;
  549. if(($receiver = $1) == nil || $receiver == null){
  550. $1;
  551. } else {
  552. $2=self._onDoIt();
  553. _st($2)._value();
  554. };
  555. $3=result;
  556. return $3;
  557. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.SourceArea)})},
  558. args: [],
  559. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [self onDoIt value].\x0a\x09^result",
  560. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"],
  561. referencedClasses: []
  562. }),
  563. smalltalk.SourceArea);
  564. smalltalk.addMethod(
  565. smalltalk.method({
  566. selector: "editor",
  567. category: 'accessing',
  568. fn: function (){
  569. var self=this;
  570. return smalltalk.withContext(function($ctx1) {
  571. var $1;
  572. $1=self["@editor"];
  573. return $1;
  574. }, function($ctx1) {$ctx1.fill(self,"editor",{},smalltalk.SourceArea)})},
  575. args: [],
  576. source: "editor\x0a\x09^editor",
  577. messageSends: [],
  578. referencedClasses: []
  579. }),
  580. smalltalk.SourceArea);
  581. smalltalk.addMethod(
  582. smalltalk.method({
  583. selector: "eval:",
  584. category: 'actions',
  585. fn: function (aString){
  586. var self=this;
  587. var compiler;
  588. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  589. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  590. return smalltalk.withContext(function($ctx1) {
  591. var $1,$2;
  592. var $early={};
  593. try {
  594. compiler=_st($Compiler())._new();
  595. _st((function(){
  596. return smalltalk.withContext(function($ctx2) {
  597. return _st(compiler)._parseExpression_(aString);
  598. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
  599. return smalltalk.withContext(function($ctx2) {
  600. $1=self._alert_(_st(ex)._messageText());
  601. throw $early=[$1];
  602. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  603. $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
  604. return $2;
  605. }
  606. catch(e) {if(e===$early)return e[0]; throw e}
  607. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},smalltalk.SourceArea)})},
  608. args: ["aString"],
  609. 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",
  610. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
  611. referencedClasses: ["Compiler", "Error"]
  612. }),
  613. smalltalk.SourceArea);
  614. smalltalk.addMethod(
  615. smalltalk.method({
  616. selector: "fileIn",
  617. category: 'actions',
  618. fn: function (){
  619. var self=this;
  620. function $Importer(){return smalltalk.Importer||(typeof Importer=="undefined"?nil:Importer)}
  621. return smalltalk.withContext(function($ctx1) {
  622. _st(_st($Importer())._new())._import_(_st(self._currentLineOrSelection())._readStream());
  623. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.SourceArea)})},
  624. args: [],
  625. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  626. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"],
  627. referencedClasses: ["Importer"]
  628. }),
  629. smalltalk.SourceArea);
  630. smalltalk.addMethod(
  631. smalltalk.method({
  632. selector: "focus",
  633. category: 'actions',
  634. fn: function (){
  635. var self=this;
  636. return smalltalk.withContext(function($ctx1) {
  637. _st(self._editor())._focus();
  638. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.SourceArea)})},
  639. args: [],
  640. source: "focus\x0a\x09self editor focus.",
  641. messageSends: ["focus", "editor"],
  642. referencedClasses: []
  643. }),
  644. smalltalk.SourceArea);
  645. smalltalk.addMethod(
  646. smalltalk.method({
  647. selector: "handleKeyDown:",
  648. category: 'actions',
  649. fn: function (anEvent){
  650. var self=this;
  651. return smalltalk.withContext(function($ctx1) {
  652. if(anEvent.ctrlKey) {
  653. if(anEvent.keyCode === 80) { //ctrl+p
  654. self._printIt();
  655. anEvent.preventDefault();
  656. return false;
  657. }
  658. if(anEvent.keyCode === 68) { //ctrl+d
  659. self._doIt();
  660. anEvent.preventDefault();
  661. return false;
  662. }
  663. if(anEvent.keyCode === 73) { //ctrl+i
  664. self._inspectIt();
  665. anEvent.preventDefault();
  666. return false;
  667. }
  668. };
  669. return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},smalltalk.SourceArea)})},
  670. args: ["anEvent"],
  671. 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}>",
  672. messageSends: [],
  673. referencedClasses: []
  674. }),
  675. smalltalk.SourceArea);
  676. smalltalk.addMethod(
  677. smalltalk.method({
  678. selector: "inspectIt",
  679. category: 'actions',
  680. fn: function (){
  681. var self=this;
  682. return smalltalk.withContext(function($ctx1) {
  683. _st(self._doIt())._inspect();
  684. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.SourceArea)})},
  685. args: [],
  686. source: "inspectIt\x0a\x09self doIt inspect",
  687. messageSends: ["inspect", "doIt"],
  688. referencedClasses: []
  689. }),
  690. smalltalk.SourceArea);
  691. smalltalk.addMethod(
  692. smalltalk.method({
  693. selector: "onDoIt",
  694. category: 'accessing',
  695. fn: function (){
  696. var self=this;
  697. return smalltalk.withContext(function($ctx1) {
  698. var $1;
  699. $1=self["@onDoIt"];
  700. return $1;
  701. }, function($ctx1) {$ctx1.fill(self,"onDoIt",{},smalltalk.SourceArea)})},
  702. args: [],
  703. source: "onDoIt\x0a\x09^onDoIt",
  704. messageSends: [],
  705. referencedClasses: []
  706. }),
  707. smalltalk.SourceArea);
  708. smalltalk.addMethod(
  709. smalltalk.method({
  710. selector: "onDoIt:",
  711. category: 'accessing',
  712. fn: function (aBlock){
  713. var self=this;
  714. return smalltalk.withContext(function($ctx1) {
  715. self["@onDoIt"]=aBlock;
  716. return self}, function($ctx1) {$ctx1.fill(self,"onDoIt:",{aBlock:aBlock},smalltalk.SourceArea)})},
  717. args: ["aBlock"],
  718. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  719. messageSends: [],
  720. referencedClasses: []
  721. }),
  722. smalltalk.SourceArea);
  723. smalltalk.addMethod(
  724. smalltalk.method({
  725. selector: "onKeyDown:",
  726. category: 'events',
  727. fn: function (aBlock){
  728. var self=this;
  729. return smalltalk.withContext(function($ctx1) {
  730. _st(self["@div"])._onKeyDown_(aBlock);
  731. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},smalltalk.SourceArea)})},
  732. args: ["aBlock"],
  733. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  734. messageSends: ["onKeyDown:"],
  735. referencedClasses: []
  736. }),
  737. smalltalk.SourceArea);
  738. smalltalk.addMethod(
  739. smalltalk.method({
  740. selector: "onKeyUp:",
  741. category: 'events',
  742. fn: function (aBlock){
  743. var self=this;
  744. return smalltalk.withContext(function($ctx1) {
  745. _st(self["@div"])._onKeyUp_(aBlock);
  746. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},smalltalk.SourceArea)})},
  747. args: ["aBlock"],
  748. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  749. messageSends: ["onKeyUp:"],
  750. referencedClasses: []
  751. }),
  752. smalltalk.SourceArea);
  753. smalltalk.addMethod(
  754. smalltalk.method({
  755. selector: "print:",
  756. category: 'actions',
  757. fn: function (aString){
  758. var self=this;
  759. var start,stop,currentLine;
  760. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  761. return smalltalk.withContext(function($ctx1) {
  762. var $1,$2,$4,$3,$5,$6,$7,$8,$10,$11,$9,$12,$15,$16,$14,$13,$17,$21,$20,$19,$18,$22,$23;
  763. $1=_st(self["@editor"])._getCursor_(false);
  764. $ctx1.sendIdx["getCursor:"]=1;
  765. currentLine=_st($1)._line();
  766. start=_st($HashedCollection())._new();
  767. $ctx1.sendIdx["new"]=1;
  768. _st(start)._at_put_("line",currentLine);
  769. $ctx1.sendIdx["at:put:"]=1;
  770. $2=start;
  771. $4=_st(self["@editor"])._getCursor_(false);
  772. $ctx1.sendIdx["getCursor:"]=2;
  773. $3=_st($4)._ch();
  774. _st($2)._at_put_("ch",$3);
  775. $ctx1.sendIdx["at:put:"]=2;
  776. $5=_st(self["@editor"])._getSelection();
  777. $ctx1.sendIdx["getSelection"]=1;
  778. _st($5)._ifEmpty_((function(){
  779. return smalltalk.withContext(function($ctx2) {
  780. $6=start;
  781. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  782. $ctx2.sendIdx["size"]=1;
  783. _st($6)._at_put_("ch",$7);
  784. $ctx2.sendIdx["at:put:"]=3;
  785. $8=self["@editor"];
  786. $10="line".__minus_gt(currentLine);
  787. $ctx2.sendIdx["->"]=1;
  788. $11="ch".__minus_gt((0));
  789. $9=smalltalk.HashedCollection._from_([$10,$11]);
  790. return _st($8)._setSelection_end_($9,start);
  791. $ctx2.sendIdx["setSelection:end:"]=1;
  792. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  793. stop=_st($HashedCollection())._new();
  794. _st(stop)._at_put_("line",currentLine);
  795. $ctx1.sendIdx["at:put:"]=4;
  796. $12=stop;
  797. $15=_st(start)._at_("ch");
  798. $16=_st(aString)._size();
  799. $14=_st($15).__plus($16);
  800. $13=_st($14).__plus((2));
  801. $ctx1.sendIdx["+"]=1;
  802. _st($12)._at_put_("ch",$13);
  803. $17=self["@editor"];
  804. $21=_st(self["@editor"])._getSelection();
  805. $20=_st($21).__comma(" ");
  806. $19=_st($20).__comma(aString);
  807. $ctx1.sendIdx[","]=2;
  808. $18=_st($19).__comma(" ");
  809. $ctx1.sendIdx[","]=1;
  810. _st($17)._replaceSelection_($18);
  811. $22=self["@editor"];
  812. $23=_st(self["@editor"])._getCursor_(true);
  813. _st($22)._setCursor_($23);
  814. _st(self["@editor"])._setSelection_end_(stop,start);
  815. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},smalltalk.SourceArea)})},
  816. args: ["aString"],
  817. 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",
  818. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "->", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  819. referencedClasses: ["HashedCollection"]
  820. }),
  821. smalltalk.SourceArea);
  822. smalltalk.addMethod(
  823. smalltalk.method({
  824. selector: "printIt",
  825. category: 'actions',
  826. fn: function (){
  827. var self=this;
  828. return smalltalk.withContext(function($ctx1) {
  829. self._print_(_st(self._doIt())._printString());
  830. self._focus();
  831. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.SourceArea)})},
  832. args: [],
  833. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  834. messageSends: ["print:", "printString", "doIt", "focus"],
  835. referencedClasses: []
  836. }),
  837. smalltalk.SourceArea);
  838. smalltalk.addMethod(
  839. smalltalk.method({
  840. selector: "receiver",
  841. category: 'accessing',
  842. fn: function (){
  843. var self=this;
  844. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  845. return smalltalk.withContext(function($ctx1) {
  846. var $2,$1;
  847. $2=self["@receiver"];
  848. if(($receiver = $2) == nil || $receiver == null){
  849. $1=_st($DoIt())._new();
  850. } else {
  851. $1=$2;
  852. };
  853. return $1;
  854. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SourceArea)})},
  855. args: [],
  856. source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
  857. messageSends: ["ifNil:", "new"],
  858. referencedClasses: ["DoIt"]
  859. }),
  860. smalltalk.SourceArea);
  861. smalltalk.addMethod(
  862. smalltalk.method({
  863. selector: "receiver:",
  864. category: 'accessing',
  865. fn: function (anObject){
  866. var self=this;
  867. return smalltalk.withContext(function($ctx1) {
  868. self["@receiver"]=anObject;
  869. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.SourceArea)})},
  870. args: ["anObject"],
  871. source: "receiver: anObject\x0a\x09receiver := anObject",
  872. messageSends: [],
  873. referencedClasses: []
  874. }),
  875. smalltalk.SourceArea);
  876. smalltalk.addMethod(
  877. smalltalk.method({
  878. selector: "renderOn:",
  879. category: 'rendering',
  880. fn: function (html){
  881. var self=this;
  882. var textarea;
  883. return smalltalk.withContext(function($ctx1) {
  884. self["@div"]=_st(_st(html)._div())._class_("source");
  885. _st(self["@div"])._with_((function(){
  886. return smalltalk.withContext(function($ctx2) {
  887. textarea=_st(html)._textarea();
  888. return textarea;
  889. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  890. self._setEditorOn_(_st(textarea)._element());
  891. _st(self["@div"])._onKeyDown_((function(e){
  892. return smalltalk.withContext(function($ctx2) {
  893. return self._handleKeyDown_(e);
  894. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  895. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},smalltalk.SourceArea)})},
  896. args: ["html"],
  897. 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]",
  898. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  899. referencedClasses: []
  900. }),
  901. smalltalk.SourceArea);
  902. smalltalk.addMethod(
  903. smalltalk.method({
  904. selector: "selection",
  905. category: 'accessing',
  906. fn: function (){
  907. var self=this;
  908. return smalltalk.withContext(function($ctx1) {
  909. var $1;
  910. $1=_st(self["@editor"])._getSelection();
  911. return $1;
  912. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.SourceArea)})},
  913. args: [],
  914. source: "selection\x0a\x09^editor getSelection",
  915. messageSends: ["getSelection"],
  916. referencedClasses: []
  917. }),
  918. smalltalk.SourceArea);
  919. smalltalk.addMethod(
  920. smalltalk.method({
  921. selector: "setEditorOn:",
  922. category: 'accessing',
  923. fn: function (aTextarea){
  924. var self=this;
  925. return smalltalk.withContext(function($ctx1) {
  926. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  927. theme: 'amber',
  928. lineNumbers: true,
  929. enterMode: 'flat',
  930. indentWithTabs: true,
  931. indentUnit: 4,
  932. matchBrackets: true,
  933. electricChars: false
  934. });
  935. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.SourceArea)})},
  936. args: ["aTextarea"],
  937. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a\x09\x09\x09\x09lineNumbers: true,\x0a\x09\x09\x09\x09enterMode: 'flat',\x0a\x09\x09\x09\x09indentWithTabs: true,\x0a\x09\x09\x09\x09indentUnit: 4,\x0a\x09\x09\x09\x09matchBrackets: true,\x0a\x09\x09\x09\x09electricChars: false\x0a\x09})>",
  938. messageSends: [],
  939. referencedClasses: []
  940. }),
  941. smalltalk.SourceArea);
  942. smalltalk.addMethod(
  943. smalltalk.method({
  944. selector: "val",
  945. category: 'accessing',
  946. fn: function (){
  947. var self=this;
  948. return smalltalk.withContext(function($ctx1) {
  949. var $1;
  950. $1=_st(self["@editor"])._getValue();
  951. return $1;
  952. }, function($ctx1) {$ctx1.fill(self,"val",{},smalltalk.SourceArea)})},
  953. args: [],
  954. source: "val\x0a\x09^editor getValue",
  955. messageSends: ["getValue"],
  956. referencedClasses: []
  957. }),
  958. smalltalk.SourceArea);
  959. smalltalk.addMethod(
  960. smalltalk.method({
  961. selector: "val:",
  962. category: 'accessing',
  963. fn: function (aString){
  964. var self=this;
  965. return smalltalk.withContext(function($ctx1) {
  966. _st(self["@editor"])._setValue_(aString);
  967. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},smalltalk.SourceArea)})},
  968. args: ["aString"],
  969. source: "val: aString\x0a\x09editor setValue: aString",
  970. messageSends: ["setValue:"],
  971. referencedClasses: []
  972. }),
  973. smalltalk.SourceArea);
  974. smalltalk.addMethod(
  975. smalltalk.method({
  976. selector: "initialize",
  977. category: 'initialization',
  978. fn: function (){
  979. var self=this;
  980. return smalltalk.withContext(function($ctx1) {
  981. smalltalk.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  982. self._setupCodeMirror();
  983. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.SourceArea.klass)})},
  984. args: [],
  985. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  986. messageSends: ["initialize", "setupCodeMirror"],
  987. referencedClasses: []
  988. }),
  989. smalltalk.SourceArea.klass);
  990. smalltalk.addMethod(
  991. smalltalk.method({
  992. selector: "setupCodeMirror",
  993. category: 'initialization',
  994. fn: function (){
  995. var self=this;
  996. return smalltalk.withContext(function($ctx1) {
  997. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  998. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.SourceArea.klass)})},
  999. args: [],
  1000. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  1001. messageSends: [],
  1002. referencedClasses: []
  1003. }),
  1004. smalltalk.SourceArea.klass);
  1005. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  1006. smalltalk.addMethod(
  1007. smalltalk.method({
  1008. selector: "addTab:",
  1009. category: 'adding/Removing',
  1010. fn: function (aWidget){
  1011. var self=this;
  1012. return smalltalk.withContext(function($ctx1) {
  1013. _st(self._tabs())._add_(aWidget);
  1014. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  1015. _st(aWidget)._hide();
  1016. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1017. args: ["aWidget"],
  1018. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  1019. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  1020. referencedClasses: []
  1021. }),
  1022. smalltalk.TabManager);
  1023. smalltalk.addMethod(
  1024. smalltalk.method({
  1025. selector: "close",
  1026. category: 'actions',
  1027. fn: function (){
  1028. var self=this;
  1029. return smalltalk.withContext(function($ctx1) {
  1030. var $1,$2,$3,$4;
  1031. $1=self["@opened"];
  1032. if(smalltalk.assert($1)){
  1033. $2="#amber"._asJQuery();
  1034. $ctx1.sendIdx["asJQuery"]=1;
  1035. _st($2)._hide();
  1036. $ctx1.sendIdx["hide"]=1;
  1037. $3=_st(self["@ul"])._asJQuery();
  1038. $ctx1.sendIdx["asJQuery"]=2;
  1039. _st($3)._hide();
  1040. $ctx1.sendIdx["hide"]=2;
  1041. _st(self["@selectedTab"])._hide();
  1042. self._removeBodyMargin();
  1043. $4="body"._asJQuery();
  1044. _st($4)._removeClass_("amberBody");
  1045. self["@opened"]=false;
  1046. self["@opened"];
  1047. };
  1048. return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.TabManager)})},
  1049. args: [],
  1050. 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]",
  1051. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1052. referencedClasses: []
  1053. }),
  1054. smalltalk.TabManager);
  1055. smalltalk.addMethod(
  1056. smalltalk.method({
  1057. selector: "closeTab:",
  1058. category: 'actions',
  1059. fn: function (aWidget){
  1060. var self=this;
  1061. return smalltalk.withContext(function($ctx1) {
  1062. self._removeTab_(aWidget);
  1063. self._selectTab_(_st(self._tabs())._last());
  1064. _st(aWidget)._remove();
  1065. self._update();
  1066. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1067. args: ["aWidget"],
  1068. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1069. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1070. referencedClasses: []
  1071. }),
  1072. smalltalk.TabManager);
  1073. smalltalk.addMethod(
  1074. smalltalk.method({
  1075. selector: "initialize",
  1076. category: 'initialization',
  1077. fn: function (){
  1078. var self=this;
  1079. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1080. function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1081. function $IDETranscript(){return smalltalk.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1082. function $Workspace(){return smalltalk.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1083. function $TestRunner(){return smalltalk.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1084. return smalltalk.withContext(function($ctx1) {
  1085. var $1,$2,$3,$4,$5,$7,$6,$8,$9;
  1086. smalltalk.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  1087. _st($InspectorHandler())._register_($Inspector());
  1088. self["@opened"]=true;
  1089. $1=(function(html){
  1090. return smalltalk.withContext(function($ctx2) {
  1091. return _st(_st(html)._div())._id_("amber");
  1092. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1093. $2="body"._asJQuery();
  1094. $ctx1.sendIdx["asJQuery"]=1;
  1095. _st($1)._appendToJQuery_($2);
  1096. $ctx1.sendIdx["appendToJQuery:"]=1;
  1097. $3="body"._asJQuery();
  1098. $ctx1.sendIdx["asJQuery"]=2;
  1099. _st($3)._addClass_("amberBody");
  1100. $4="#amber"._asJQuery();
  1101. self._appendToJQuery_($4);
  1102. self._addTab_(_st($IDETranscript())._current());
  1103. $ctx1.sendIdx["addTab:"]=1;
  1104. $5=_st($Workspace())._new();
  1105. $ctx1.sendIdx["new"]=1;
  1106. self._addTab_($5);
  1107. $ctx1.sendIdx["addTab:"]=2;
  1108. $7=_st($TestRunner())._new();
  1109. $6=self._addTab_($7);
  1110. self._selectTab_(_st(self._tabs())._last());
  1111. self._onResize_((function(){
  1112. return smalltalk.withContext(function($ctx2) {
  1113. self._updateBodyMargin();
  1114. $8=self._updatePosition();
  1115. $ctx2.sendIdx["updatePosition"]=1;
  1116. return $8;
  1117. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1118. $9=self._onWindowResize_((function(){
  1119. return smalltalk.withContext(function($ctx2) {
  1120. return self._updatePosition();
  1121. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1122. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TabManager)})},
  1123. args: [],
  1124. source: "initialize\x0a\x09super initialize.\x0a\x09InspectorHandler register: Inspector.\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]",
  1125. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1126. referencedClasses: ["InspectorHandler", "Inspector", "IDETranscript", "Workspace", "TestRunner"]
  1127. }),
  1128. smalltalk.TabManager);
  1129. smalltalk.addMethod(
  1130. smalltalk.method({
  1131. selector: "labelFor:",
  1132. category: 'accessing',
  1133. fn: function (aWidget){
  1134. var self=this;
  1135. var label,maxSize;
  1136. return smalltalk.withContext(function($ctx1) {
  1137. var $1,$4,$3,$2,$7,$6,$5,$8;
  1138. maxSize=(15);
  1139. $1=_st(aWidget)._label();
  1140. $ctx1.sendIdx["label"]=1;
  1141. $4=_st(aWidget)._label();
  1142. $ctx1.sendIdx["label"]=2;
  1143. $3=_st($4)._size();
  1144. $ctx1.sendIdx["size"]=1;
  1145. $2=_st($3)._min_(maxSize);
  1146. label=_st($1)._copyFrom_to_((0),$2);
  1147. $7=_st(aWidget)._label();
  1148. $6=_st($7)._size();
  1149. $5=_st($6).__gt(maxSize);
  1150. if(smalltalk.assert($5)){
  1151. label=_st(label).__comma("...");
  1152. label;
  1153. };
  1154. $8=label;
  1155. return $8;
  1156. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},smalltalk.TabManager)})},
  1157. args: ["aWidget"],
  1158. 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",
  1159. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1160. referencedClasses: []
  1161. }),
  1162. smalltalk.TabManager);
  1163. smalltalk.addMethod(
  1164. smalltalk.method({
  1165. selector: "newBrowserTab",
  1166. category: 'actions',
  1167. fn: function (){
  1168. var self=this;
  1169. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1170. return smalltalk.withContext(function($ctx1) {
  1171. _st($Browser())._open();
  1172. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},smalltalk.TabManager)})},
  1173. args: [],
  1174. source: "newBrowserTab\x0a\x09Browser open",
  1175. messageSends: ["open"],
  1176. referencedClasses: ["Browser"]
  1177. }),
  1178. smalltalk.TabManager);
  1179. smalltalk.addMethod(
  1180. smalltalk.method({
  1181. selector: "onResize:",
  1182. category: 'actions',
  1183. fn: function (aBlock){
  1184. var self=this;
  1185. return smalltalk.withContext(function($ctx1) {
  1186. var $1,$3,$4,$5,$2;
  1187. $1="#amber"._asJQuery();
  1188. $3="handles".__minus_gt("n");
  1189. $ctx1.sendIdx["->"]=1;
  1190. $4="resize".__minus_gt(aBlock);
  1191. $ctx1.sendIdx["->"]=2;
  1192. $5="minHeight".__minus_gt((230));
  1193. $2=smalltalk.HashedCollection._from_([$3,$4,$5]);
  1194. _st($1)._resizable_($2);
  1195. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
  1196. args: ["aBlock"],
  1197. 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}",
  1198. messageSends: ["resizable:", "asJQuery", "->"],
  1199. referencedClasses: []
  1200. }),
  1201. smalltalk.TabManager);
  1202. smalltalk.addMethod(
  1203. smalltalk.method({
  1204. selector: "onWindowResize:",
  1205. category: 'actions',
  1206. fn: function (aBlock){
  1207. var self=this;
  1208. return smalltalk.withContext(function($ctx1) {
  1209. _st(_st(window)._asJQuery())._resize_(aBlock);
  1210. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
  1211. args: ["aBlock"],
  1212. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1213. messageSends: ["resize:", "asJQuery"],
  1214. referencedClasses: []
  1215. }),
  1216. smalltalk.TabManager);
  1217. smalltalk.addMethod(
  1218. smalltalk.method({
  1219. selector: "open",
  1220. category: 'actions',
  1221. fn: function (){
  1222. var self=this;
  1223. return smalltalk.withContext(function($ctx1) {
  1224. var $1,$2,$3,$4;
  1225. $1=self["@opened"];
  1226. if(! smalltalk.assert($1)){
  1227. $2="body"._asJQuery();
  1228. $ctx1.sendIdx["asJQuery"]=1;
  1229. _st($2)._addClass_("amberBody");
  1230. $3="#amber"._asJQuery();
  1231. $ctx1.sendIdx["asJQuery"]=2;
  1232. _st($3)._show();
  1233. $ctx1.sendIdx["show"]=1;
  1234. $4=_st(self["@ul"])._asJQuery();
  1235. _st($4)._show();
  1236. $ctx1.sendIdx["show"]=2;
  1237. self._updateBodyMargin();
  1238. _st(self["@selectedTab"])._show();
  1239. self["@opened"]=true;
  1240. self["@opened"];
  1241. };
  1242. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabManager)})},
  1243. args: [],
  1244. 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]",
  1245. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1246. referencedClasses: []
  1247. }),
  1248. smalltalk.TabManager);
  1249. smalltalk.addMethod(
  1250. smalltalk.method({
  1251. selector: "removeBodyMargin",
  1252. category: 'actions',
  1253. fn: function (){
  1254. var self=this;
  1255. return smalltalk.withContext(function($ctx1) {
  1256. self._setBodyMargin_((0));
  1257. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},smalltalk.TabManager)})},
  1258. args: [],
  1259. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1260. messageSends: ["setBodyMargin:"],
  1261. referencedClasses: []
  1262. }),
  1263. smalltalk.TabManager);
  1264. smalltalk.addMethod(
  1265. smalltalk.method({
  1266. selector: "removeTab:",
  1267. category: 'adding/Removing',
  1268. fn: function (aWidget){
  1269. var self=this;
  1270. return smalltalk.withContext(function($ctx1) {
  1271. _st(self._tabs())._remove_(aWidget);
  1272. self._update();
  1273. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1274. args: ["aWidget"],
  1275. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1276. messageSends: ["remove:", "tabs", "update"],
  1277. referencedClasses: []
  1278. }),
  1279. smalltalk.TabManager);
  1280. smalltalk.addMethod(
  1281. smalltalk.method({
  1282. selector: "renderOn:",
  1283. category: 'rendering',
  1284. fn: function (html){
  1285. var self=this;
  1286. return smalltalk.withContext(function($ctx1) {
  1287. var $1,$2;
  1288. _st(_st(html)._div())._id_("logo");
  1289. $ctx1.sendIdx["id:"]=1;
  1290. self._renderToolbarOn_(html);
  1291. $1=_st(html)._ul();
  1292. _st($1)._id_("amberTabs");
  1293. $2=_st($1)._yourself();
  1294. self["@ul"]=$2;
  1295. self._renderTabs();
  1296. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TabManager)})},
  1297. args: ["html"],
  1298. 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",
  1299. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1300. referencedClasses: []
  1301. }),
  1302. smalltalk.TabManager);
  1303. smalltalk.addMethod(
  1304. smalltalk.method({
  1305. selector: "renderTabFor:on:",
  1306. category: 'rendering',
  1307. fn: function (aWidget,html){
  1308. var self=this;
  1309. var li;
  1310. return smalltalk.withContext(function($ctx1) {
  1311. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10,$11;
  1312. li=_st(html)._li();
  1313. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1314. if(smalltalk.assert($1)){
  1315. _st(li)._class_("selected");
  1316. $ctx1.sendIdx["class:"]=1;
  1317. };
  1318. $2=li;
  1319. _st($2)._with_((function(){
  1320. return smalltalk.withContext(function($ctx2) {
  1321. $3=_st(html)._span();
  1322. $ctx2.sendIdx["span"]=1;
  1323. _st($3)._class_("ltab");
  1324. $ctx2.sendIdx["class:"]=2;
  1325. $4=_st(html)._span();
  1326. $ctx2.sendIdx["span"]=2;
  1327. _st($4)._class_("mtab");
  1328. $ctx2.sendIdx["class:"]=3;
  1329. $5=_st($4)._with_((function(){
  1330. return smalltalk.withContext(function($ctx3) {
  1331. $6=_st(aWidget)._canBeClosed();
  1332. if(smalltalk.assert($6)){
  1333. $7=_st(html)._span();
  1334. $ctx3.sendIdx["span"]=3;
  1335. _st($7)._class_("close");
  1336. $ctx3.sendIdx["class:"]=4;
  1337. _st($7)._with_("x");
  1338. $ctx3.sendIdx["with:"]=3;
  1339. $8=_st($7)._onClick_((function(){
  1340. return smalltalk.withContext(function($ctx4) {
  1341. return self._closeTab_(aWidget);
  1342. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1343. $ctx3.sendIdx["onClick:"]=1;
  1344. $8;
  1345. };
  1346. $9=_st(html)._span();
  1347. $ctx3.sendIdx["span"]=4;
  1348. return _st($9)._with_(self._labelFor_(aWidget));
  1349. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1350. $ctx2.sendIdx["with:"]=2;
  1351. $5;
  1352. $10=_st(html)._span();
  1353. return _st($10)._class_("rtab");
  1354. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1355. $ctx1.sendIdx["with:"]=1;
  1356. $11=_st($2)._onClick_((function(){
  1357. return smalltalk.withContext(function($ctx2) {
  1358. return self._selectTab_(aWidget);
  1359. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1360. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},smalltalk.TabManager)})},
  1361. args: ["aWidget", "html"],
  1362. 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]",
  1363. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1364. referencedClasses: []
  1365. }),
  1366. smalltalk.TabManager);
  1367. smalltalk.addMethod(
  1368. smalltalk.method({
  1369. selector: "renderTabs",
  1370. category: 'rendering',
  1371. fn: function (){
  1372. var self=this;
  1373. return smalltalk.withContext(function($ctx1) {
  1374. var $1,$2,$3,$4,$5,$6;
  1375. _st(self["@ul"])._contents_((function(html){
  1376. return smalltalk.withContext(function($ctx2) {
  1377. _st(self._tabs())._do_((function(each){
  1378. return smalltalk.withContext(function($ctx3) {
  1379. return self._renderTabFor_on_(each,html);
  1380. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1381. $1=_st(html)._li();
  1382. _st($1)._class_("newtab");
  1383. $ctx2.sendIdx["class:"]=1;
  1384. _st($1)._with_((function(){
  1385. return smalltalk.withContext(function($ctx3) {
  1386. $2=_st(html)._span();
  1387. $ctx3.sendIdx["span"]=1;
  1388. _st($2)._class_("ltab");
  1389. $ctx3.sendIdx["class:"]=2;
  1390. $3=_st(html)._span();
  1391. $ctx3.sendIdx["span"]=2;
  1392. _st($3)._class_("mtab");
  1393. $ctx3.sendIdx["class:"]=3;
  1394. $4=_st($3)._with_(" + ");
  1395. $4;
  1396. $5=_st(html)._span();
  1397. return _st($5)._class_("rtab");
  1398. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1399. $ctx2.sendIdx["with:"]=1;
  1400. $6=_st($1)._onClick_((function(){
  1401. return smalltalk.withContext(function($ctx3) {
  1402. return self._newBrowserTab();
  1403. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1404. return $6;
  1405. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1406. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},smalltalk.TabManager)})},
  1407. args: [],
  1408. 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]]",
  1409. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1410. referencedClasses: []
  1411. }),
  1412. smalltalk.TabManager);
  1413. smalltalk.addMethod(
  1414. smalltalk.method({
  1415. selector: "renderToolbarOn:",
  1416. category: 'rendering',
  1417. fn: function (html){
  1418. var self=this;
  1419. return smalltalk.withContext(function($ctx1) {
  1420. var $1,$3,$4,$5,$6,$7,$2;
  1421. $1=_st(html)._div();
  1422. $ctx1.sendIdx["div"]=1;
  1423. _st($1)._id_("amber_toolbar");
  1424. $ctx1.sendIdx["id:"]=1;
  1425. $2=_st($1)._with_((function(){
  1426. return smalltalk.withContext(function($ctx2) {
  1427. $3=_st(html)._input();
  1428. _st($3)._class_("implementors");
  1429. $4=_st($3)._yourself();
  1430. self["@input"]=$4;
  1431. self["@input"];
  1432. _st(self["@input"])._onKeyPress_((function(event){
  1433. return smalltalk.withContext(function($ctx3) {
  1434. $5=_st(_st(event)._keyCode()).__eq((13));
  1435. if(smalltalk.assert($5)){
  1436. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1437. };
  1438. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1439. $6=_st(html)._div();
  1440. _st($6)._id_("amber_close");
  1441. $7=_st($6)._onClick_((function(){
  1442. return smalltalk.withContext(function($ctx3) {
  1443. return self._close();
  1444. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1445. return $7;
  1446. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1447. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},smalltalk.TabManager)})},
  1448. args: ["html"],
  1449. 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]]",
  1450. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1451. referencedClasses: []
  1452. }),
  1453. smalltalk.TabManager);
  1454. smalltalk.addMethod(
  1455. smalltalk.method({
  1456. selector: "search:",
  1457. category: 'actions',
  1458. fn: function (aString){
  1459. var self=this;
  1460. var searchedClass;
  1461. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1462. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1463. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1464. return smalltalk.withContext(function($ctx1) {
  1465. var $1;
  1466. searchedClass=_st(_st($Smalltalk())._current())._at_(aString);
  1467. $1=_st(searchedClass)._isClass();
  1468. if(smalltalk.assert($1)){
  1469. _st($Browser())._openOn_(searchedClass);
  1470. } else {
  1471. _st($ReferencesBrowser())._search_(aString);
  1472. };
  1473. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},smalltalk.TabManager)})},
  1474. args: ["aString"],
  1475. source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk current at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [Browser openOn: searchedClass]\x0a\x09\x09\x09ifFalse: [ReferencesBrowser search: aString]",
  1476. messageSends: ["at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1477. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1478. }),
  1479. smalltalk.TabManager);
  1480. smalltalk.addMethod(
  1481. smalltalk.method({
  1482. selector: "selectTab:",
  1483. category: 'actions',
  1484. fn: function (aWidget){
  1485. var self=this;
  1486. return smalltalk.withContext(function($ctx1) {
  1487. self._open();
  1488. self["@selectedTab"]=aWidget;
  1489. _st(self._tabs())._do_((function(each){
  1490. return smalltalk.withContext(function($ctx2) {
  1491. return _st(each)._hide();
  1492. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1493. _st(aWidget)._show();
  1494. self._update();
  1495. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1496. args: ["aWidget"],
  1497. 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",
  1498. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1499. referencedClasses: []
  1500. }),
  1501. smalltalk.TabManager);
  1502. smalltalk.addMethod(
  1503. smalltalk.method({
  1504. selector: "setBodyMargin:",
  1505. category: 'actions',
  1506. fn: function (anInteger){
  1507. var self=this;
  1508. return smalltalk.withContext(function($ctx1) {
  1509. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1510. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},smalltalk.TabManager)})},
  1511. args: ["anInteger"],
  1512. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1513. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1514. referencedClasses: []
  1515. }),
  1516. smalltalk.TabManager);
  1517. smalltalk.addMethod(
  1518. smalltalk.method({
  1519. selector: "tabs",
  1520. category: 'accessing',
  1521. fn: function (){
  1522. var self=this;
  1523. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1524. return smalltalk.withContext(function($ctx1) {
  1525. var $2,$1;
  1526. $2=self["@tabs"];
  1527. if(($receiver = $2) == nil || $receiver == null){
  1528. self["@tabs"]=_st($Array())._new();
  1529. $1=self["@tabs"];
  1530. } else {
  1531. $1=$2;
  1532. };
  1533. return $1;
  1534. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.TabManager)})},
  1535. args: [],
  1536. source: "tabs\x0a\x09^tabs ifNil: [tabs := Array new]",
  1537. messageSends: ["ifNil:", "new"],
  1538. referencedClasses: ["Array"]
  1539. }),
  1540. smalltalk.TabManager);
  1541. smalltalk.addMethod(
  1542. smalltalk.method({
  1543. selector: "update",
  1544. category: 'updating',
  1545. fn: function (){
  1546. var self=this;
  1547. return smalltalk.withContext(function($ctx1) {
  1548. self._renderTabs();
  1549. return self}, function($ctx1) {$ctx1.fill(self,"update",{},smalltalk.TabManager)})},
  1550. args: [],
  1551. source: "update\x0a\x09self renderTabs",
  1552. messageSends: ["renderTabs"],
  1553. referencedClasses: []
  1554. }),
  1555. smalltalk.TabManager);
  1556. smalltalk.addMethod(
  1557. smalltalk.method({
  1558. selector: "updateBodyMargin",
  1559. category: 'actions',
  1560. fn: function (){
  1561. var self=this;
  1562. return smalltalk.withContext(function($ctx1) {
  1563. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1564. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},smalltalk.TabManager)})},
  1565. args: [],
  1566. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1567. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1568. referencedClasses: []
  1569. }),
  1570. smalltalk.TabManager);
  1571. smalltalk.addMethod(
  1572. smalltalk.method({
  1573. selector: "updatePosition",
  1574. category: 'actions',
  1575. fn: function (){
  1576. var self=this;
  1577. return smalltalk.withContext(function($ctx1) {
  1578. var $1,$2;
  1579. $1="#amber"._asJQuery();
  1580. _st($1)._css_put_("top","");
  1581. $ctx1.sendIdx["css:put:"]=1;
  1582. $2=_st($1)._css_put_("bottom","0px");
  1583. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
  1584. args: [],
  1585. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1586. messageSends: ["css:put:", "asJQuery"],
  1587. referencedClasses: []
  1588. }),
  1589. smalltalk.TabManager);
  1590. smalltalk.TabManager.klass.iVarNames = ['current'];
  1591. smalltalk.addMethod(
  1592. smalltalk.method({
  1593. selector: "current",
  1594. category: 'instance creation',
  1595. fn: function (){
  1596. var self=this;
  1597. return smalltalk.withContext(function($ctx1) {
  1598. var $2,$1;
  1599. $2=self["@current"];
  1600. if(($receiver = $2) == nil || $receiver == null){
  1601. self["@current"]=smalltalk.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []);
  1602. $1=self["@current"];
  1603. } else {
  1604. $1=$2;
  1605. };
  1606. return $1;
  1607. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.TabManager.klass)})},
  1608. args: [],
  1609. source: "current\x0a\x09^current ifNil: [current := super new]",
  1610. messageSends: ["ifNil:", "new"],
  1611. referencedClasses: []
  1612. }),
  1613. smalltalk.TabManager.klass);
  1614. smalltalk.addMethod(
  1615. smalltalk.method({
  1616. selector: "new",
  1617. category: 'instance creation',
  1618. fn: function (){
  1619. var self=this;
  1620. return smalltalk.withContext(function($ctx1) {
  1621. self._shouldNotImplement();
  1622. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.TabManager.klass)})},
  1623. args: [],
  1624. source: "new\x0a\x09self shouldNotImplement",
  1625. messageSends: ["shouldNotImplement"],
  1626. referencedClasses: []
  1627. }),
  1628. smalltalk.TabManager.klass);
  1629. smalltalk.addMethod(
  1630. smalltalk.method({
  1631. selector: "toggleAmberIDE",
  1632. category: 'actions',
  1633. fn: function (){
  1634. var self=this;
  1635. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1636. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1637. return smalltalk.withContext(function($ctx1) {
  1638. var $3,$2,$1,$5,$4,$6,$7;
  1639. $3="#amber"._asJQuery();
  1640. $ctx1.sendIdx["asJQuery"]=1;
  1641. $2=_st($3)._length();
  1642. $1=_st($2).__eq((0));
  1643. if(smalltalk.assert($1)){
  1644. _st($Browser())._open();
  1645. $ctx1.sendIdx["open"]=1;
  1646. } else {
  1647. $5="#amber"._asJQuery();
  1648. $4=_st($5)._is_(":visible");
  1649. if(smalltalk.assert($4)){
  1650. $6=_st($TabManager())._current();
  1651. $ctx1.sendIdx["current"]=1;
  1652. _st($6)._close();
  1653. } else {
  1654. $7=_st($TabManager())._current();
  1655. _st($7)._open();
  1656. };
  1657. };
  1658. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
  1659. args: [],
  1660. 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 ] ]",
  1661. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1662. referencedClasses: ["Browser", "TabManager"]
  1663. }),
  1664. smalltalk.TabManager.klass);
  1665. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1666. smalltalk.addMethod(
  1667. smalltalk.method({
  1668. selector: "canBeClosed",
  1669. category: 'testing',
  1670. fn: function (){
  1671. var self=this;
  1672. return smalltalk.withContext(function($ctx1) {
  1673. return false;
  1674. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.TabWidget)})},
  1675. args: [],
  1676. source: "canBeClosed\x0a\x09^false",
  1677. messageSends: [],
  1678. referencedClasses: []
  1679. }),
  1680. smalltalk.TabWidget);
  1681. smalltalk.addMethod(
  1682. smalltalk.method({
  1683. selector: "close",
  1684. category: 'actions',
  1685. fn: function (){
  1686. var self=this;
  1687. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1688. return smalltalk.withContext(function($ctx1) {
  1689. _st(_st($TabManager())._current())._closeTab_(self);
  1690. return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.TabWidget)})},
  1691. args: [],
  1692. source: "close\x0a\x09TabManager current closeTab: self",
  1693. messageSends: ["closeTab:", "current"],
  1694. referencedClasses: ["TabManager"]
  1695. }),
  1696. smalltalk.TabWidget);
  1697. smalltalk.addMethod(
  1698. smalltalk.method({
  1699. selector: "hide",
  1700. category: 'actions',
  1701. fn: function (){
  1702. var self=this;
  1703. return smalltalk.withContext(function($ctx1) {
  1704. _st(_st(self["@div"])._asJQuery())._hide();
  1705. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.TabWidget)})},
  1706. args: [],
  1707. source: "hide\x0a\x09div asJQuery hide",
  1708. messageSends: ["hide", "asJQuery"],
  1709. referencedClasses: []
  1710. }),
  1711. smalltalk.TabWidget);
  1712. smalltalk.addMethod(
  1713. smalltalk.method({
  1714. selector: "label",
  1715. category: 'accessing',
  1716. fn: function (){
  1717. var self=this;
  1718. return smalltalk.withContext(function($ctx1) {
  1719. self._subclassResponsibility();
  1720. return self}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TabWidget)})},
  1721. args: [],
  1722. source: "label\x0a\x09self subclassResponsibility",
  1723. messageSends: ["subclassResponsibility"],
  1724. referencedClasses: []
  1725. }),
  1726. smalltalk.TabWidget);
  1727. smalltalk.addMethod(
  1728. smalltalk.method({
  1729. selector: "open",
  1730. category: 'actions',
  1731. fn: function (){
  1732. var self=this;
  1733. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1734. return smalltalk.withContext(function($ctx1) {
  1735. var $1,$2;
  1736. $1=_st($TabManager())._current();
  1737. $ctx1.sendIdx["current"]=1;
  1738. _st($1)._addTab_(self);
  1739. $2=_st($TabManager())._current();
  1740. _st($2)._selectTab_(self);
  1741. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabWidget)})},
  1742. args: [],
  1743. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1744. messageSends: ["addTab:", "current", "selectTab:"],
  1745. referencedClasses: ["TabManager"]
  1746. }),
  1747. smalltalk.TabWidget);
  1748. smalltalk.addMethod(
  1749. smalltalk.method({
  1750. selector: "remove",
  1751. category: 'actions',
  1752. fn: function (){
  1753. var self=this;
  1754. return smalltalk.withContext(function($ctx1) {
  1755. _st(_st(self["@div"])._asJQuery())._remove();
  1756. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.TabWidget)})},
  1757. args: [],
  1758. source: "remove\x0a\x09div asJQuery remove",
  1759. messageSends: ["remove", "asJQuery"],
  1760. referencedClasses: []
  1761. }),
  1762. smalltalk.TabWidget);
  1763. smalltalk.addMethod(
  1764. smalltalk.method({
  1765. selector: "renderBoxOn:",
  1766. category: 'rendering',
  1767. fn: function (html){
  1768. var self=this;
  1769. return smalltalk.withContext(function($ctx1) {
  1770. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TabWidget)})},
  1771. args: ["html"],
  1772. source: "renderBoxOn: html",
  1773. messageSends: [],
  1774. referencedClasses: []
  1775. }),
  1776. smalltalk.TabWidget);
  1777. smalltalk.addMethod(
  1778. smalltalk.method({
  1779. selector: "renderButtonsOn:",
  1780. category: 'rendering',
  1781. fn: function (html){
  1782. var self=this;
  1783. return smalltalk.withContext(function($ctx1) {
  1784. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TabWidget)})},
  1785. args: ["html"],
  1786. source: "renderButtonsOn: html",
  1787. messageSends: [],
  1788. referencedClasses: []
  1789. }),
  1790. smalltalk.TabWidget);
  1791. smalltalk.addMethod(
  1792. smalltalk.method({
  1793. selector: "renderOn:",
  1794. category: 'rendering',
  1795. fn: function (html){
  1796. var self=this;
  1797. return smalltalk.withContext(function($ctx1) {
  1798. var $1,$2;
  1799. $1=_st(html)._div();
  1800. _st($1)._class_("amberTool");
  1801. $2=_st($1)._yourself();
  1802. self["@div"]=$2;
  1803. self._renderTab();
  1804. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TabWidget)})},
  1805. args: ["html"],
  1806. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1807. messageSends: ["class:", "div", "yourself", "renderTab"],
  1808. referencedClasses: []
  1809. }),
  1810. smalltalk.TabWidget);
  1811. smalltalk.addMethod(
  1812. smalltalk.method({
  1813. selector: "renderTab",
  1814. category: 'rendering',
  1815. fn: function (){
  1816. var self=this;
  1817. return smalltalk.withContext(function($ctx1) {
  1818. var $1,$2,$3,$4;
  1819. _st(self["@div"])._contents_((function(html){
  1820. return smalltalk.withContext(function($ctx2) {
  1821. $1=_st(html)._div();
  1822. $ctx2.sendIdx["div"]=1;
  1823. _st($1)._class_("amber_box");
  1824. $ctx2.sendIdx["class:"]=1;
  1825. $2=_st($1)._with_((function(){
  1826. return smalltalk.withContext(function($ctx3) {
  1827. return self._renderBoxOn_(html);
  1828. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1829. $ctx2.sendIdx["with:"]=1;
  1830. $2;
  1831. $3=_st(html)._div();
  1832. _st($3)._class_("amber_buttons");
  1833. $4=_st($3)._with_((function(){
  1834. return smalltalk.withContext(function($ctx3) {
  1835. return self._renderButtonsOn_(html);
  1836. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1837. return $4;
  1838. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1839. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.TabWidget)})},
  1840. args: [],
  1841. 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]]",
  1842. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1843. referencedClasses: []
  1844. }),
  1845. smalltalk.TabWidget);
  1846. smalltalk.addMethod(
  1847. smalltalk.method({
  1848. selector: "show",
  1849. category: 'actions',
  1850. fn: function (){
  1851. var self=this;
  1852. return smalltalk.withContext(function($ctx1) {
  1853. _st(_st(self["@div"])._asJQuery())._show();
  1854. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.TabWidget)})},
  1855. args: [],
  1856. source: "show\x0a\x09div asJQuery show",
  1857. messageSends: ["show", "asJQuery"],
  1858. referencedClasses: []
  1859. }),
  1860. smalltalk.TabWidget);
  1861. smalltalk.addMethod(
  1862. smalltalk.method({
  1863. selector: "update",
  1864. category: 'rendering',
  1865. fn: function (){
  1866. var self=this;
  1867. return smalltalk.withContext(function($ctx1) {
  1868. self._renderTab();
  1869. return self}, function($ctx1) {$ctx1.fill(self,"update",{},smalltalk.TabWidget)})},
  1870. args: [],
  1871. source: "update\x0a\x09self renderTab",
  1872. messageSends: ["renderTab"],
  1873. referencedClasses: []
  1874. }),
  1875. smalltalk.TabWidget);
  1876. smalltalk.addMethod(
  1877. smalltalk.method({
  1878. selector: "open",
  1879. category: 'instance creation',
  1880. fn: function (){
  1881. var self=this;
  1882. return smalltalk.withContext(function($ctx1) {
  1883. var $1;
  1884. $1=_st(self._new())._open();
  1885. return $1;
  1886. }, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabWidget.klass)})},
  1887. args: [],
  1888. source: "open\x0a\x09^self new open",
  1889. messageSends: ["open", "new"],
  1890. referencedClasses: []
  1891. }),
  1892. smalltalk.TabWidget.klass);
  1893. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1894. smalltalk.addMethod(
  1895. smalltalk.method({
  1896. selector: "addInstanceVariableNamed:toClass:",
  1897. category: 'actions',
  1898. fn: function (aString,aClass){
  1899. var self=this;
  1900. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1901. return smalltalk.withContext(function($ctx1) {
  1902. var $1,$2,$3,$5,$6,$4,$7;
  1903. $1=_st($ClassBuilder())._new();
  1904. $2=_st(aClass)._superclass();
  1905. $3=_st(aClass)._name();
  1906. $ctx1.sendIdx["name"]=1;
  1907. $5=_st(_st(aClass)._instanceVariableNames())._copy();
  1908. _st($5)._add_(aString);
  1909. $6=_st($5)._yourself();
  1910. $4=$6;
  1911. $7=_st(_st(aClass)._package())._name();
  1912. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$7);
  1913. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},smalltalk.Browser)})},
  1914. args: ["aString", "aClass"],
  1915. 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",
  1916. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1917. referencedClasses: ["ClassBuilder"]
  1918. }),
  1919. smalltalk.Browser);
  1920. smalltalk.addMethod(
  1921. smalltalk.method({
  1922. selector: "addNewClass",
  1923. category: 'actions',
  1924. fn: function (){
  1925. var self=this;
  1926. var className;
  1927. function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
  1928. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1929. return smalltalk.withContext(function($ctx1) {
  1930. var $1,$2;
  1931. className=self._prompt_("New class");
  1932. $1=_st(_st(className)._notNil())._and_((function(){
  1933. return smalltalk.withContext(function($ctx2) {
  1934. return _st(className)._notEmpty();
  1935. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1936. if(smalltalk.assert($1)){
  1937. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1938. self._resetClassesList();
  1939. $2=self._updateClassesList();
  1940. $2;
  1941. self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  1942. };
  1943. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},smalltalk.Browser)})},
  1944. args: [],
  1945. 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 current at: className)]",
  1946. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  1947. referencedClasses: ["Object", "Smalltalk"]
  1948. }),
  1949. smalltalk.Browser);
  1950. smalltalk.addMethod(
  1951. smalltalk.method({
  1952. selector: "addNewProtocol",
  1953. category: 'actions',
  1954. fn: function (){
  1955. var self=this;
  1956. var newProtocol;
  1957. return smalltalk.withContext(function($ctx1) {
  1958. var $1;
  1959. newProtocol=self._prompt_("New method protocol");
  1960. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1961. return smalltalk.withContext(function($ctx2) {
  1962. return _st(newProtocol)._notEmpty();
  1963. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1964. if(smalltalk.assert($1)){
  1965. _st(self["@selectedMethod"])._category_(newProtocol);
  1966. self._setMethodProtocol_(newProtocol);
  1967. };
  1968. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},smalltalk.Browser)})},
  1969. args: [],
  1970. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
  1971. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "category:", "setMethodProtocol:"],
  1972. referencedClasses: []
  1973. }),
  1974. smalltalk.Browser);
  1975. smalltalk.addMethod(
  1976. smalltalk.method({
  1977. selector: "canBeClosed",
  1978. category: 'testing',
  1979. fn: function (){
  1980. var self=this;
  1981. return smalltalk.withContext(function($ctx1) {
  1982. return true;
  1983. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Browser)})},
  1984. args: [],
  1985. source: "canBeClosed\x0a\x09^true",
  1986. messageSends: [],
  1987. referencedClasses: []
  1988. }),
  1989. smalltalk.Browser);
  1990. smalltalk.addMethod(
  1991. smalltalk.method({
  1992. selector: "cancelChanges",
  1993. category: 'actions',
  1994. fn: function (){
  1995. var self=this;
  1996. return smalltalk.withContext(function($ctx1) {
  1997. var $2,$1;
  1998. $2=self["@unsavedChanges"];
  1999. if(smalltalk.assert($2)){
  2000. $1=self._confirm_("Cancel changes?");
  2001. } else {
  2002. $1=true;
  2003. };
  2004. return $1;
  2005. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)})},
  2006. args: [],
  2007. source: "cancelChanges\x0a\x09^unsavedChanges\x0a\x09ifTrue: [self confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
  2008. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  2009. referencedClasses: []
  2010. }),
  2011. smalltalk.Browser);
  2012. smalltalk.addMethod(
  2013. smalltalk.method({
  2014. selector: "classCommentSource",
  2015. category: 'accessing',
  2016. fn: function (){
  2017. var self=this;
  2018. return smalltalk.withContext(function($ctx1) {
  2019. var $1;
  2020. $1=_st(self["@selectedClass"])._comment();
  2021. return $1;
  2022. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},smalltalk.Browser)})},
  2023. args: [],
  2024. source: "classCommentSource\x0a\x09^selectedClass comment",
  2025. messageSends: ["comment"],
  2026. referencedClasses: []
  2027. }),
  2028. smalltalk.Browser);
  2029. smalltalk.addMethod(
  2030. smalltalk.method({
  2031. selector: "classDeclarationSource",
  2032. category: 'accessing',
  2033. fn: function (){
  2034. var self=this;
  2035. var stream;
  2036. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  2037. return smalltalk.withContext(function($ctx1) {
  2038. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$13,$12,$14,$11,$15,$16;
  2039. stream=""._writeStream();
  2040. $1=self["@selectedClass"];
  2041. if(($receiver = $1) == nil || $receiver == null){
  2042. $2=self._classDeclarationTemplate();
  2043. return $2;
  2044. } else {
  2045. $1;
  2046. };
  2047. $3=stream;
  2048. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  2049. $ctx1.sendIdx["nextPutAll:"]=1;
  2050. _st($3)._nextPutAll_(" subclass: #");
  2051. $ctx1.sendIdx["nextPutAll:"]=2;
  2052. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2053. $ctx1.sendIdx["nextPutAll:"]=3;
  2054. $4=$3;
  2055. $6=_st($String())._lf();
  2056. $ctx1.sendIdx["lf"]=1;
  2057. $7=_st($String())._tab();
  2058. $ctx1.sendIdx["tab"]=1;
  2059. $5=_st($6).__comma($7);
  2060. $ctx1.sendIdx[","]=1;
  2061. _st($4)._nextPutAll_($5);
  2062. $ctx1.sendIdx["nextPutAll:"]=4;
  2063. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2064. $ctx1.sendIdx["nextPutAll:"]=5;
  2065. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2066. return smalltalk.withContext(function($ctx2) {
  2067. return _st(stream)._nextPutAll_(each);
  2068. $ctx2.sendIdx["nextPutAll:"]=6;
  2069. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2070. return smalltalk.withContext(function($ctx2) {
  2071. return _st(stream)._nextPutAll_(" ");
  2072. $ctx2.sendIdx["nextPutAll:"]=7;
  2073. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2074. $9=stream;
  2075. $10=$9;
  2076. $13=_st($String())._lf();
  2077. $12="'".__comma($13);
  2078. $14=_st($String())._tab();
  2079. $11=_st($12).__comma($14);
  2080. $ctx1.sendIdx[","]=2;
  2081. _st($10)._nextPutAll_($11);
  2082. $ctx1.sendIdx["nextPutAll:"]=8;
  2083. _st($9)._nextPutAll_("package: '");
  2084. $ctx1.sendIdx["nextPutAll:"]=9;
  2085. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2086. $ctx1.sendIdx["nextPutAll:"]=10;
  2087. $15=_st($9)._nextPutAll_("'");
  2088. $16=_st(stream)._contents();
  2089. return $16;
  2090. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},smalltalk.Browser)})},
  2091. args: [],
  2092. 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",
  2093. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2094. referencedClasses: ["String"]
  2095. }),
  2096. smalltalk.Browser);
  2097. smalltalk.addMethod(
  2098. smalltalk.method({
  2099. selector: "classDeclarationTemplate",
  2100. category: 'accessing',
  2101. fn: function (){
  2102. var self=this;
  2103. return smalltalk.withContext(function($ctx1) {
  2104. var $2,$1;
  2105. $2="Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage());
  2106. $1=_st($2).__comma("'");
  2107. $ctx1.sendIdx[","]=1;
  2108. return $1;
  2109. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},smalltalk.Browser)})},
  2110. args: [],
  2111. source: "classDeclarationTemplate\x0a\x09^'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2112. messageSends: [",", "selectedPackage"],
  2113. referencedClasses: []
  2114. }),
  2115. smalltalk.Browser);
  2116. smalltalk.addMethod(
  2117. smalltalk.method({
  2118. selector: "classes",
  2119. category: 'accessing',
  2120. fn: function (){
  2121. var self=this;
  2122. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2123. return smalltalk.withContext(function($ctx1) {
  2124. var $2,$3,$1;
  2125. $1=_st(_st(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
  2126. return smalltalk.withContext(function($ctx2) {
  2127. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2128. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2129. return smalltalk.withContext(function($ctx2) {
  2130. $2=_st(a)._name();
  2131. $ctx2.sendIdx["name"]=1;
  2132. $3=_st(b)._name();
  2133. return _st($2).__lt($3);
  2134. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2135. return $1;
  2136. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Browser)})},
  2137. args: [],
  2138. source: "classes\x0a\x09^((Smalltalk current classes\x0a\x09select: [:each | each category = selectedPackage])\x0a\x09sort: [:a :b | a name < b name]) asSet",
  2139. messageSends: ["asSet", "sort:", "select:", "classes", "current", "=", "category", "<", "name"],
  2140. referencedClasses: ["Smalltalk"]
  2141. }),
  2142. smalltalk.Browser);
  2143. smalltalk.addMethod(
  2144. smalltalk.method({
  2145. selector: "commitPackage",
  2146. category: 'actions',
  2147. fn: function (){
  2148. var self=this;
  2149. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2150. return smalltalk.withContext(function($ctx1) {
  2151. var $1;
  2152. $1=self["@selectedPackage"];
  2153. if(($receiver = $1) == nil || $receiver == null){
  2154. $1;
  2155. } else {
  2156. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2157. };
  2158. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.Browser)})},
  2159. args: [],
  2160. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2161. messageSends: ["ifNotNil:", "commit", "named:"],
  2162. referencedClasses: ["Package"]
  2163. }),
  2164. smalltalk.Browser);
  2165. smalltalk.addMethod(
  2166. smalltalk.method({
  2167. selector: "compile",
  2168. category: 'actions',
  2169. fn: function (){
  2170. var self=this;
  2171. var currentEditLine;
  2172. return smalltalk.withContext(function($ctx1) {
  2173. var $1,$2,$3,$5,$4,$6;
  2174. self._disableSaveButton();
  2175. $1=_st(self["@sourceArea"])._editor();
  2176. $ctx1.sendIdx["editor"]=1;
  2177. currentEditLine=_st($1)._getCursor();
  2178. $2=_st(self["@selectedTab"]).__eq("comment");
  2179. if(smalltalk.assert($2)){
  2180. $3=self["@selectedClass"];
  2181. if(($receiver = $3) == nil || $receiver == null){
  2182. $3;
  2183. } else {
  2184. self._compileClassComment();
  2185. };
  2186. } else {
  2187. $5=_st(self["@selectedProtocol"])._notNil();
  2188. $ctx1.sendIdx["notNil"]=1;
  2189. $4=_st($5)._or_((function(){
  2190. return smalltalk.withContext(function($ctx2) {
  2191. return _st(self["@selectedMethod"])._notNil();
  2192. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2193. if(smalltalk.assert($4)){
  2194. self._compileMethodDefinition();
  2195. } else {
  2196. self._compileDefinition();
  2197. };
  2198. };
  2199. $6=_st(self["@sourceArea"])._editor();
  2200. _st($6)._setCursor_(currentEditLine);
  2201. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},smalltalk.Browser)})},
  2202. args: [],
  2203. 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.",
  2204. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2205. referencedClasses: []
  2206. }),
  2207. smalltalk.Browser);
  2208. smalltalk.addMethod(
  2209. smalltalk.method({
  2210. selector: "compileClassComment",
  2211. category: 'actions',
  2212. fn: function (){
  2213. var self=this;
  2214. return smalltalk.withContext(function($ctx1) {
  2215. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2216. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},smalltalk.Browser)})},
  2217. args: [],
  2218. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2219. messageSends: ["comment:", "val"],
  2220. referencedClasses: []
  2221. }),
  2222. smalltalk.Browser);
  2223. smalltalk.addMethod(
  2224. smalltalk.method({
  2225. selector: "compileDefinition",
  2226. category: 'actions',
  2227. fn: function (){
  2228. var self=this;
  2229. var newClass;
  2230. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2231. return smalltalk.withContext(function($ctx1) {
  2232. var $1;
  2233. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2234. self._resetClassesList();
  2235. self._updateCategoriesList();
  2236. $1=self._updateClassesList();
  2237. self._selectClass_(newClass);
  2238. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},smalltalk.Browser)})},
  2239. args: [],
  2240. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2241. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2242. referencedClasses: ["Compiler"]
  2243. }),
  2244. smalltalk.Browser);
  2245. smalltalk.addMethod(
  2246. smalltalk.method({
  2247. selector: "compileMethodDefinition",
  2248. category: 'actions',
  2249. fn: function (){
  2250. var self=this;
  2251. return smalltalk.withContext(function($ctx1) {
  2252. var $1;
  2253. $1=_st(self["@selectedTab"]).__eq("instance");
  2254. if(smalltalk.assert($1)){
  2255. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2256. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2257. } else {
  2258. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2259. };
  2260. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},smalltalk.Browser)})},
  2261. args: [],
  2262. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [self compileMethodDefinitionFor: selectedClass]\x0a\x09ifFalse: [self compileMethodDefinitionFor: selectedClass class]",
  2263. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2264. referencedClasses: []
  2265. }),
  2266. smalltalk.Browser);
  2267. smalltalk.addMethod(
  2268. smalltalk.method({
  2269. selector: "compileMethodDefinitionFor:",
  2270. category: 'actions',
  2271. fn: function (aClass){
  2272. var self=this;
  2273. var compiler,method,source,node;
  2274. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2275. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2276. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2277. return smalltalk.withContext(function($ctx1) {
  2278. var $1,$2,$6,$5,$4,$3,$7,$10,$9,$8,$11,$12;
  2279. var $early={};
  2280. try {
  2281. source=_st(self["@sourceArea"])._val();
  2282. $1=self["@selectedProtocol"];
  2283. if(($receiver = $1) == nil || $receiver == null){
  2284. self["@selectedProtocol"]=_st(self["@selectedMethod"])._category();
  2285. self["@selectedProtocol"];
  2286. } else {
  2287. $1;
  2288. };
  2289. compiler=_st($Compiler())._new();
  2290. $ctx1.sendIdx["new"]=1;
  2291. _st(compiler)._source_(source);
  2292. node=_st(compiler)._parse_(source);
  2293. $2=_st(node)._isParseFailure();
  2294. if(smalltalk.assert($2)){
  2295. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2296. $ctx1.sendIdx[","]=3;
  2297. $5=_st($6).__comma(", position: ");
  2298. $ctx1.sendIdx[","]=2;
  2299. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2300. $ctx1.sendIdx[","]=1;
  2301. $3=self._alert_($4);
  2302. return $3;
  2303. };
  2304. _st(compiler)._currentClass_(aClass);
  2305. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2306. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2307. return smalltalk.withContext(function($ctx2) {
  2308. $7=_st($PlatformInterface())._existsGlobal_(each);
  2309. if(! smalltalk.assert($7)){
  2310. $10="Declare '".__comma(each);
  2311. $9=_st($10).__comma("' as instance variable?");
  2312. $ctx2.sendIdx[","]=4;
  2313. $8=self._confirm_($9);
  2314. if(smalltalk.assert($8)){
  2315. self._addInstanceVariableNamed_toClass_(each,aClass);
  2316. $11=self._compileMethodDefinitionFor_(aClass);
  2317. throw $early=[$11];
  2318. };
  2319. };
  2320. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2321. $12=_st($ClassBuilder())._new();
  2322. _st($12)._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
  2323. self._updateMethodsList();
  2324. self._selectMethod_(method);
  2325. return self}
  2326. catch(e) {if(e===$early)return e[0]; throw e}
  2327. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
  2328. args: ["aClass"],
  2329. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod category ].\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 category: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
  2330. messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"],
  2331. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2332. }),
  2333. smalltalk.Browser);
  2334. smalltalk.addMethod(
  2335. smalltalk.method({
  2336. selector: "copyClass",
  2337. category: 'actions',
  2338. fn: function (){
  2339. var self=this;
  2340. var className;
  2341. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2342. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2343. return smalltalk.withContext(function($ctx1) {
  2344. var $1,$2;
  2345. className=self._prompt_("Copy class");
  2346. $1=_st(_st(className)._notNil())._and_((function(){
  2347. return smalltalk.withContext(function($ctx2) {
  2348. return _st(className)._notEmpty();
  2349. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2350. if(smalltalk.assert($1)){
  2351. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2352. self._resetClassesList();
  2353. $2=self._updateClassesList();
  2354. $2;
  2355. self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  2356. };
  2357. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)})},
  2358. args: [],
  2359. 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 current at: className)]",
  2360. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  2361. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2362. }),
  2363. smalltalk.Browser);
  2364. smalltalk.addMethod(
  2365. smalltalk.method({
  2366. selector: "declarationSource",
  2367. category: 'accessing',
  2368. fn: function (){
  2369. var self=this;
  2370. return smalltalk.withContext(function($ctx1) {
  2371. var $2,$1;
  2372. $2=_st(self["@selectedTab"]).__eq("instance");
  2373. if(smalltalk.assert($2)){
  2374. $1=self._classDeclarationSource();
  2375. } else {
  2376. $1=self._metaclassDeclarationSource();
  2377. };
  2378. return $1;
  2379. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},smalltalk.Browser)})},
  2380. args: [],
  2381. source: "declarationSource\x0a\x09^selectedTab = #instance\x0a\x09ifTrue: [self classDeclarationSource]\x0a\x09ifFalse: [self metaclassDeclarationSource]",
  2382. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2383. referencedClasses: []
  2384. }),
  2385. smalltalk.Browser);
  2386. smalltalk.addMethod(
  2387. smalltalk.method({
  2388. selector: "disableSaveButton",
  2389. category: 'actions',
  2390. fn: function (){
  2391. var self=this;
  2392. return smalltalk.withContext(function($ctx1) {
  2393. var $1;
  2394. $1=self["@saveButton"];
  2395. if(($receiver = $1) == nil || $receiver == null){
  2396. $1;
  2397. } else {
  2398. _st(self["@saveButton"])._at_put_("disabled",true);
  2399. };
  2400. self["@unsavedChanges"]=false;
  2401. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},smalltalk.Browser)})},
  2402. args: [],
  2403. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true].\x0a\x09unsavedChanges := false",
  2404. messageSends: ["ifNotNil:", "at:put:"],
  2405. referencedClasses: []
  2406. }),
  2407. smalltalk.Browser);
  2408. smalltalk.addMethod(
  2409. smalltalk.method({
  2410. selector: "dummyMethodSource",
  2411. category: 'accessing',
  2412. fn: function (){
  2413. var self=this;
  2414. return smalltalk.withContext(function($ctx1) {
  2415. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2416. }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{},smalltalk.Browser)})},
  2417. args: [],
  2418. source: "dummyMethodSource\x0a\x09^'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2419. messageSends: [],
  2420. referencedClasses: []
  2421. }),
  2422. smalltalk.Browser);
  2423. smalltalk.addMethod(
  2424. smalltalk.method({
  2425. selector: "handleSourceAreaKeyDown:",
  2426. category: 'actions',
  2427. fn: function (anEvent){
  2428. var self=this;
  2429. return smalltalk.withContext(function($ctx1) {
  2430. if(anEvent.ctrlKey) {
  2431. if(anEvent.keyCode === 83) { //ctrl+s
  2432. self._compile();
  2433. anEvent.preventDefault();
  2434. return false;
  2435. }
  2436. }
  2437. ;
  2438. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},smalltalk.Browser)})},
  2439. args: ["anEvent"],
  2440. 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>",
  2441. messageSends: [],
  2442. referencedClasses: []
  2443. }),
  2444. smalltalk.Browser);
  2445. smalltalk.addMethod(
  2446. smalltalk.method({
  2447. selector: "hideClassButtons",
  2448. category: 'actions',
  2449. fn: function (){
  2450. var self=this;
  2451. return smalltalk.withContext(function($ctx1) {
  2452. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2453. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},smalltalk.Browser)})},
  2454. args: [],
  2455. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2456. messageSends: ["hide", "asJQuery"],
  2457. referencedClasses: []
  2458. }),
  2459. smalltalk.Browser);
  2460. smalltalk.addMethod(
  2461. smalltalk.method({
  2462. selector: "hideMethodButtons",
  2463. category: 'actions',
  2464. fn: function (){
  2465. var self=this;
  2466. return smalltalk.withContext(function($ctx1) {
  2467. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2468. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},smalltalk.Browser)})},
  2469. args: [],
  2470. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2471. messageSends: ["hide", "asJQuery"],
  2472. referencedClasses: []
  2473. }),
  2474. smalltalk.Browser);
  2475. smalltalk.addMethod(
  2476. smalltalk.method({
  2477. selector: "initialize",
  2478. category: 'initialization',
  2479. fn: function (){
  2480. var self=this;
  2481. return smalltalk.withContext(function($ctx1) {
  2482. smalltalk.Browser.superclass.fn.prototype._initialize.apply(_st(self), []);
  2483. self["@selectedTab"]="instance";
  2484. self["@selectedPackage"]=_st(self._packages())._first();
  2485. self["@unsavedChanges"]=false;
  2486. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Browser)})},
  2487. args: [],
  2488. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2489. messageSends: ["initialize", "first", "packages"],
  2490. referencedClasses: []
  2491. }),
  2492. smalltalk.Browser);
  2493. smalltalk.addMethod(
  2494. smalltalk.method({
  2495. selector: "label",
  2496. category: 'accessing',
  2497. fn: function (){
  2498. var self=this;
  2499. return smalltalk.withContext(function($ctx1) {
  2500. var $2,$1;
  2501. $2=self["@selectedClass"];
  2502. if(($receiver = $2) == nil || $receiver == null){
  2503. $1="Browser (nil)";
  2504. } else {
  2505. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2506. };
  2507. return $1;
  2508. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Browser)})},
  2509. args: [],
  2510. source: "label\x0a\x09^selectedClass\x0a\x09ifNil: ['Browser (nil)']\x0a\x09ifNotNil: ['Browser: ', selectedClass name]",
  2511. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2512. referencedClasses: []
  2513. }),
  2514. smalltalk.Browser);
  2515. smalltalk.addMethod(
  2516. smalltalk.method({
  2517. selector: "metaclassDeclarationSource",
  2518. category: 'accessing',
  2519. fn: function (){
  2520. var self=this;
  2521. var stream;
  2522. return smalltalk.withContext(function($ctx1) {
  2523. var $1,$2,$3,$4;
  2524. stream=""._writeStream();
  2525. $1=self["@selectedClass"];
  2526. if(($receiver = $1) == nil || $receiver == null){
  2527. $1;
  2528. } else {
  2529. $2=stream;
  2530. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2531. $ctx1.sendIdx["nextPutAll:"]=1;
  2532. _st($2)._nextPutAll_(" class ");
  2533. $ctx1.sendIdx["nextPutAll:"]=2;
  2534. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2535. $ctx1.sendIdx["nextPutAll:"]=3;
  2536. $3;
  2537. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2538. return smalltalk.withContext(function($ctx2) {
  2539. return _st(stream)._nextPutAll_(each);
  2540. $ctx2.sendIdx["nextPutAll:"]=4;
  2541. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2542. return smalltalk.withContext(function($ctx2) {
  2543. return _st(stream)._nextPutAll_(" ");
  2544. $ctx2.sendIdx["nextPutAll:"]=5;
  2545. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2546. _st(stream)._nextPutAll_("'");
  2547. };
  2548. $4=_st(stream)._contents();
  2549. return $4;
  2550. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},smalltalk.Browser)})},
  2551. args: [],
  2552. 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",
  2553. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2554. referencedClasses: []
  2555. }),
  2556. smalltalk.Browser);
  2557. smalltalk.addMethod(
  2558. smalltalk.method({
  2559. selector: "methodSource",
  2560. category: 'accessing',
  2561. fn: function (){
  2562. var self=this;
  2563. return smalltalk.withContext(function($ctx1) {
  2564. var $2,$1;
  2565. $2=self["@selectedMethod"];
  2566. if(($receiver = $2) == nil || $receiver == null){
  2567. $1=self._dummyMethodSource();
  2568. } else {
  2569. $1=_st(self["@selectedMethod"])._source();
  2570. };
  2571. return $1;
  2572. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},smalltalk.Browser)})},
  2573. args: [],
  2574. source: "methodSource\x0a\x09^selectedMethod\x0a\x09ifNil: [self dummyMethodSource]\x0a\x09ifNotNil: [selectedMethod source]",
  2575. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2576. referencedClasses: []
  2577. }),
  2578. smalltalk.Browser);
  2579. smalltalk.addMethod(
  2580. smalltalk.method({
  2581. selector: "methods",
  2582. category: 'accessing',
  2583. fn: function (){
  2584. var self=this;
  2585. var klass;
  2586. return smalltalk.withContext(function($ctx1) {
  2587. var $1,$2,$3,$4,$7,$8,$9,$11,$10,$6,$12,$13,$5;
  2588. $1=_st(self["@selectedTab"]).__eq("comment");
  2589. $ctx1.sendIdx["="]=1;
  2590. if(smalltalk.assert($1)){
  2591. $2=[];
  2592. return $2;
  2593. };
  2594. $3=self["@selectedClass"];
  2595. if(($receiver = $3) == nil || $receiver == null){
  2596. $3;
  2597. } else {
  2598. $4=_st(self["@selectedTab"]).__eq("instance");
  2599. $ctx1.sendIdx["="]=2;
  2600. if(smalltalk.assert($4)){
  2601. klass=self["@selectedClass"];
  2602. } else {
  2603. klass=_st(self["@selectedClass"])._class();
  2604. };
  2605. klass;
  2606. };
  2607. $7=self["@selectedProtocol"];
  2608. if(($receiver = $7) == nil || $receiver == null){
  2609. $8=klass;
  2610. if(($receiver = $8) == nil || $receiver == null){
  2611. $6=[];
  2612. } else {
  2613. $9=_st(klass)._methodDictionary();
  2614. $ctx1.sendIdx["methodDictionary"]=1;
  2615. $6=_st($9)._values();
  2616. $ctx1.sendIdx["values"]=1;
  2617. };
  2618. } else {
  2619. $11=_st(klass)._methodDictionary();
  2620. $10=_st($11)._values();
  2621. $6=_st($10)._select_((function(each){
  2622. return smalltalk.withContext(function($ctx2) {
  2623. return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
  2624. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,9)})}));
  2625. };
  2626. $5=_st($6)._sort_((function(a,b){
  2627. return smalltalk.withContext(function($ctx2) {
  2628. $12=_st(a)._selector();
  2629. $ctx2.sendIdx["selector"]=1;
  2630. $13=_st(b)._selector();
  2631. return _st($12).__lt($13);
  2632. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,10)})}));
  2633. return $5;
  2634. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},smalltalk.Browser)})},
  2635. args: [],
  2636. 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 methodDictionary values select: [:each |\x0a\x09\x09each category = selectedProtocol]]) sort: [:a :b | a selector < b selector]",
  2637. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category", "<", "selector"],
  2638. referencedClasses: []
  2639. }),
  2640. smalltalk.Browser);
  2641. smalltalk.addMethod(
  2642. smalltalk.method({
  2643. selector: "packages",
  2644. category: 'accessing',
  2645. fn: function (){
  2646. var self=this;
  2647. var packages;
  2648. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2649. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2650. return smalltalk.withContext(function($ctx1) {
  2651. var $2,$3,$1,$4,$5,$6;
  2652. packages=_st($Array())._new();
  2653. _st(_st(_st($Smalltalk())._current())._classes())._do_((function(each){
  2654. return smalltalk.withContext(function($ctx2) {
  2655. $2=packages;
  2656. $3=_st(each)._category();
  2657. $ctx2.sendIdx["category"]=1;
  2658. $1=_st($2)._includes_($3);
  2659. if(! smalltalk.assert($1)){
  2660. $4=packages;
  2661. $5=_st(each)._category();
  2662. return _st($4)._add_($5);
  2663. };
  2664. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2665. $6=_st(packages)._sort();
  2666. return $6;
  2667. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.Browser)})},
  2668. args: [],
  2669. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09Smalltalk current classes do: [:each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category]].\x0a\x09^packages sort",
  2670. messageSends: ["new", "do:", "classes", "current", "ifFalse:", "includes:", "category", "add:", "sort"],
  2671. referencedClasses: ["Array", "Smalltalk"]
  2672. }),
  2673. smalltalk.Browser);
  2674. smalltalk.addMethod(
  2675. smalltalk.method({
  2676. selector: "protocols",
  2677. category: 'accessing',
  2678. fn: function (){
  2679. var self=this;
  2680. var klass;
  2681. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  2682. return smalltalk.withContext(function($ctx1) {
  2683. var $1,$2,$3,$4,$5,$6,$7,$8;
  2684. $1=self["@selectedClass"];
  2685. if(($receiver = $1) == nil || $receiver == null){
  2686. $1;
  2687. } else {
  2688. $2=_st(self["@selectedTab"]).__eq("comment");
  2689. $ctx1.sendIdx["="]=1;
  2690. if(smalltalk.assert($2)){
  2691. $3=[];
  2692. return $3;
  2693. };
  2694. $4=_st(self["@selectedTab"]).__eq("instance");
  2695. if(smalltalk.assert($4)){
  2696. klass=self["@selectedClass"];
  2697. } else {
  2698. klass=_st(self["@selectedClass"])._class();
  2699. };
  2700. klass;
  2701. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2702. if(smalltalk.assert($5)){
  2703. $6=_st($Array())._with_("not yet classified");
  2704. return $6;
  2705. };
  2706. $7=_st(klass)._protocols();
  2707. return $7;
  2708. };
  2709. $8=_st($Array())._new();
  2710. return $8;
  2711. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},smalltalk.Browser)})},
  2712. args: [],
  2713. 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",
  2714. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  2715. referencedClasses: ["Array"]
  2716. }),
  2717. smalltalk.Browser);
  2718. smalltalk.addMethod(
  2719. smalltalk.method({
  2720. selector: "removeClass",
  2721. category: 'actions',
  2722. fn: function (){
  2723. var self=this;
  2724. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2725. return smalltalk.withContext(function($ctx1) {
  2726. var $3,$2,$1;
  2727. $3="Do you really want to remove ".__comma(_st(self["@selectedClass"])._name());
  2728. $2=_st($3).__comma("?");
  2729. $ctx1.sendIdx[","]=1;
  2730. $1=self._confirm_($2);
  2731. if(smalltalk.assert($1)){
  2732. _st(_st($Smalltalk())._current())._removeClass_(self["@selectedClass"]);
  2733. self._resetClassesList();
  2734. self._selectClass_(nil);
  2735. };
  2736. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},smalltalk.Browser)})},
  2737. args: [],
  2738. source: "removeClass\x0a\x09(self confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil]",
  2739. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "current", "resetClassesList", "selectClass:"],
  2740. referencedClasses: ["Smalltalk"]
  2741. }),
  2742. smalltalk.Browser);
  2743. smalltalk.addMethod(
  2744. smalltalk.method({
  2745. selector: "removeMethod",
  2746. category: 'actions',
  2747. fn: function (){
  2748. var self=this;
  2749. return smalltalk.withContext(function($ctx1) {
  2750. var $1,$4,$3,$2,$5;
  2751. $1=self._cancelChanges();
  2752. if(smalltalk.assert($1)){
  2753. $4="Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector());
  2754. $3=_st($4).__comma("?");
  2755. $ctx1.sendIdx[","]=1;
  2756. $2=self._confirm_($3);
  2757. if(smalltalk.assert($2)){
  2758. $5=_st(self["@selectedTab"]).__eq("instance");
  2759. if(smalltalk.assert($5)){
  2760. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2761. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  2762. } else {
  2763. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2764. };
  2765. self._selectMethod_(nil);
  2766. };
  2767. };
  2768. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},smalltalk.Browser)})},
  2769. args: [],
  2770. 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]]",
  2771. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  2772. referencedClasses: []
  2773. }),
  2774. smalltalk.Browser);
  2775. smalltalk.addMethod(
  2776. smalltalk.method({
  2777. selector: "removePackage",
  2778. category: 'actions',
  2779. fn: function (){
  2780. var self=this;
  2781. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2782. return smalltalk.withContext(function($ctx1) {
  2783. var $3,$2,$1;
  2784. $3="Do you really want to remove the whole package ".__comma(self["@selectedPackage"]);
  2785. $2=_st($3).__comma(" with all its classes?");
  2786. $ctx1.sendIdx[","]=1;
  2787. $1=self._confirm_($2);
  2788. if(smalltalk.assert($1)){
  2789. _st(_st($Smalltalk())._current())._removePackage_(self["@selectedPackage"]);
  2790. self._updateCategoriesList();
  2791. };
  2792. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},smalltalk.Browser)})},
  2793. args: [],
  2794. 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 current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList]",
  2795. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "current", "updateCategoriesList"],
  2796. referencedClasses: ["Smalltalk"]
  2797. }),
  2798. smalltalk.Browser);
  2799. smalltalk.addMethod(
  2800. smalltalk.method({
  2801. selector: "renameClass",
  2802. category: 'actions',
  2803. fn: function (){
  2804. var self=this;
  2805. var newName;
  2806. return smalltalk.withContext(function($ctx1) {
  2807. var $1,$2;
  2808. newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
  2809. $1=_st(_st(newName)._notNil())._and_((function(){
  2810. return smalltalk.withContext(function($ctx2) {
  2811. return _st(newName)._notEmpty();
  2812. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2813. if(smalltalk.assert($1)){
  2814. _st(self["@selectedClass"])._rename_(newName);
  2815. self._updateClassesList();
  2816. $2=self._updateSourceAndButtons();
  2817. $2;
  2818. };
  2819. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},smalltalk.Browser)})},
  2820. args: [],
  2821. 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]",
  2822. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  2823. referencedClasses: []
  2824. }),
  2825. smalltalk.Browser);
  2826. smalltalk.addMethod(
  2827. smalltalk.method({
  2828. selector: "renamePackage",
  2829. category: 'actions',
  2830. fn: function (){
  2831. var self=this;
  2832. var newName;
  2833. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2834. return smalltalk.withContext(function($ctx1) {
  2835. var $1,$2;
  2836. newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  2837. $1=newName;
  2838. if(($receiver = $1) == nil || $receiver == null){
  2839. $1;
  2840. } else {
  2841. $2=_st(newName)._notEmpty();
  2842. if(smalltalk.assert($2)){
  2843. _st(_st($Smalltalk())._current())._renamePackage_to_(self["@selectedPackage"],newName);
  2844. self._updateCategoriesList();
  2845. };
  2846. };
  2847. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},smalltalk.Browser)})},
  2848. args: [],
  2849. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
  2850. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "current", "updateCategoriesList"],
  2851. referencedClasses: ["Smalltalk"]
  2852. }),
  2853. smalltalk.Browser);
  2854. smalltalk.addMethod(
  2855. smalltalk.method({
  2856. selector: "renderBottomPanelOn:",
  2857. category: 'rendering',
  2858. fn: function (html){
  2859. var self=this;
  2860. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2861. return smalltalk.withContext(function($ctx1) {
  2862. var $1,$2;
  2863. $1=_st(html)._div();
  2864. _st($1)._class_("amber_sourceCode");
  2865. $2=_st($1)._with_((function(){
  2866. return smalltalk.withContext(function($ctx2) {
  2867. self["@sourceArea"]=_st($SourceArea())._new();
  2868. self["@sourceArea"];
  2869. _st(self["@sourceArea"])._renderOn_(html);
  2870. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2871. return smalltalk.withContext(function($ctx3) {
  2872. return self._handleSourceAreaKeyDown_(e);
  2873. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)})}));
  2874. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2875. return smalltalk.withContext(function($ctx3) {
  2876. return self._updateStatus();
  2877. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2878. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2879. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Browser)})},
  2880. args: ["html"],
  2881. 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]]",
  2882. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
  2883. referencedClasses: ["SourceArea"]
  2884. }),
  2885. smalltalk.Browser);
  2886. smalltalk.addMethod(
  2887. smalltalk.method({
  2888. selector: "renderBoxOn:",
  2889. category: 'rendering',
  2890. fn: function (html){
  2891. var self=this;
  2892. return smalltalk.withContext(function($ctx1) {
  2893. var $1;
  2894. self._renderTopPanelOn_(html);
  2895. self._renderTabsOn_(html);
  2896. $1=self._renderBottomPanelOn_(html);
  2897. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Browser)})},
  2898. args: ["html"],
  2899. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2900. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2901. referencedClasses: []
  2902. }),
  2903. smalltalk.Browser);
  2904. smalltalk.addMethod(
  2905. smalltalk.method({
  2906. selector: "renderButtonsOn:",
  2907. category: 'rendering',
  2908. fn: function (html){
  2909. var self=this;
  2910. return smalltalk.withContext(function($ctx1) {
  2911. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2912. self["@saveButton"]=_st(html)._button();
  2913. $ctx1.sendIdx["button"]=1;
  2914. $1=self["@saveButton"];
  2915. _st($1)._with_("Save");
  2916. $ctx1.sendIdx["with:"]=1;
  2917. $2=_st($1)._onClick_((function(){
  2918. return smalltalk.withContext(function($ctx2) {
  2919. return self._compile();
  2920. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2921. $ctx1.sendIdx["onClick:"]=1;
  2922. self["@methodButtons"]=_st(html)._span();
  2923. $ctx1.sendIdx["span"]=1;
  2924. self["@classButtons"]=_st(html)._span();
  2925. $3=_st(html)._div();
  2926. _st($3)._class_("right");
  2927. $4=_st($3)._with_((function(){
  2928. return smalltalk.withContext(function($ctx2) {
  2929. $5=_st(html)._button();
  2930. $ctx2.sendIdx["button"]=2;
  2931. _st($5)._with_("DoIt");
  2932. $ctx2.sendIdx["with:"]=3;
  2933. $6=_st($5)._onClick_((function(){
  2934. return smalltalk.withContext(function($ctx3) {
  2935. return _st(self["@sourceArea"])._doIt();
  2936. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2937. $ctx2.sendIdx["onClick:"]=2;
  2938. $6;
  2939. $7=_st(html)._button();
  2940. $ctx2.sendIdx["button"]=3;
  2941. _st($7)._with_("PrintIt");
  2942. $ctx2.sendIdx["with:"]=4;
  2943. $8=_st($7)._onClick_((function(){
  2944. return smalltalk.withContext(function($ctx3) {
  2945. return _st(self["@sourceArea"])._printIt();
  2946. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2947. $ctx2.sendIdx["onClick:"]=3;
  2948. $8;
  2949. $9=_st(html)._button();
  2950. _st($9)._with_("InspectIt");
  2951. $10=_st($9)._onClick_((function(){
  2952. return smalltalk.withContext(function($ctx3) {
  2953. return _st(self["@sourceArea"])._inspectIt();
  2954. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  2955. return $10;
  2956. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2957. $ctx1.sendIdx["with:"]=2;
  2958. self._updateSourceAndButtons();
  2959. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Browser)})},
  2960. args: ["html"],
  2961. 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",
  2962. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
  2963. referencedClasses: []
  2964. }),
  2965. smalltalk.Browser);
  2966. smalltalk.addMethod(
  2967. smalltalk.method({
  2968. selector: "renderTabsOn:",
  2969. category: 'rendering',
  2970. fn: function (html){
  2971. var self=this;
  2972. return smalltalk.withContext(function($ctx1) {
  2973. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2974. self._updateTabsList();
  2975. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},smalltalk.Browser)})},
  2976. args: ["html"],
  2977. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  2978. messageSends: ["class:", "ul", "updateTabsList"],
  2979. referencedClasses: []
  2980. }),
  2981. smalltalk.Browser);
  2982. smalltalk.addMethod(
  2983. smalltalk.method({
  2984. selector: "renderTopPanelOn:",
  2985. category: 'rendering',
  2986. fn: function (html){
  2987. var self=this;
  2988. function $ClassesList(){return smalltalk.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2989. return smalltalk.withContext(function($ctx1) {
  2990. var $1,$3,$4,$6,$7,$8,$9,$10,$11,$5,$12,$13,$14,$15,$2;
  2991. $1=_st(html)._div();
  2992. $ctx1.sendIdx["div"]=1;
  2993. _st($1)._class_("top");
  2994. $ctx1.sendIdx["class:"]=1;
  2995. $2=_st($1)._with_((function(){
  2996. return smalltalk.withContext(function($ctx2) {
  2997. $3=_st(html)._ul();
  2998. $ctx2.sendIdx["ul"]=1;
  2999. self["@packagesList"]=_st($3)._class_("amber_column browser packages");
  3000. $ctx2.sendIdx["class:"]=2;
  3001. self["@packagesList"];
  3002. $4=_st(html)._div();
  3003. $ctx2.sendIdx["div"]=2;
  3004. _st($4)._class_("amber_packagesButtons");
  3005. $ctx2.sendIdx["class:"]=3;
  3006. $5=_st($4)._with_((function(){
  3007. return smalltalk.withContext(function($ctx3) {
  3008. $6=_st(html)._button();
  3009. $ctx3.sendIdx["button"]=1;
  3010. _st($6)._title_("Commit classes in this package to disk");
  3011. $ctx3.sendIdx["title:"]=1;
  3012. _st($6)._onClick_((function(){
  3013. return smalltalk.withContext(function($ctx4) {
  3014. return self._commitPackage();
  3015. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  3016. $ctx3.sendIdx["onClick:"]=1;
  3017. $7=_st($6)._with_("Commit");
  3018. $ctx3.sendIdx["with:"]=3;
  3019. $7;
  3020. $8=_st(html)._button();
  3021. $ctx3.sendIdx["button"]=2;
  3022. _st($8)._title_("Rename package");
  3023. $ctx3.sendIdx["title:"]=2;
  3024. _st($8)._onClick_((function(){
  3025. return smalltalk.withContext(function($ctx4) {
  3026. return self._renamePackage();
  3027. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3028. $ctx3.sendIdx["onClick:"]=2;
  3029. $9=_st($8)._with_("Rename");
  3030. $ctx3.sendIdx["with:"]=4;
  3031. $9;
  3032. $10=_st(html)._button();
  3033. _st($10)._title_("Remove this package from the system");
  3034. _st($10)._onClick_((function(){
  3035. return smalltalk.withContext(function($ctx4) {
  3036. return self._removePackage();
  3037. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  3038. $11=_st($10)._with_("Remove");
  3039. return $11;
  3040. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3041. $ctx2.sendIdx["with:"]=2;
  3042. $5;
  3043. self["@classesList"]=_st($ClassesList())._on_(self);
  3044. self["@classesList"];
  3045. _st(self["@classesList"])._renderOn_(html);
  3046. $12=_st(html)._ul();
  3047. $ctx2.sendIdx["ul"]=2;
  3048. self["@protocolsList"]=_st($12)._class_("amber_column browser protocols");
  3049. $ctx2.sendIdx["class:"]=4;
  3050. self["@protocolsList"];
  3051. $13=_st(html)._ul();
  3052. self["@methodsList"]=_st($13)._class_("amber_column browser methods");
  3053. $ctx2.sendIdx["class:"]=5;
  3054. self["@methodsList"];
  3055. self._updateCategoriesList();
  3056. self._updateClassesList();
  3057. self._updateProtocolsList();
  3058. $14=self._updateMethodsList();
  3059. $14;
  3060. $15=_st(html)._div();
  3061. return _st($15)._class_("amber_clear");
  3062. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  3063. $ctx1.sendIdx["with:"]=1;
  3064. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Browser)})},
  3065. args: ["html"],
  3066. 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']",
  3067. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  3068. referencedClasses: ["ClassesList"]
  3069. }),
  3070. smalltalk.Browser);
  3071. smalltalk.addMethod(
  3072. smalltalk.method({
  3073. selector: "resetClassesList",
  3074. category: 'updating',
  3075. fn: function (){
  3076. var self=this;
  3077. return smalltalk.withContext(function($ctx1) {
  3078. _st(self["@classesList"])._resetNodes();
  3079. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},smalltalk.Browser)})},
  3080. args: [],
  3081. source: "resetClassesList\x0a\x09classesList resetNodes",
  3082. messageSends: ["resetNodes"],
  3083. referencedClasses: []
  3084. }),
  3085. smalltalk.Browser);
  3086. smalltalk.addMethod(
  3087. smalltalk.method({
  3088. selector: "search:",
  3089. category: 'actions',
  3090. fn: function (aString){
  3091. var self=this;
  3092. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3093. return smalltalk.withContext(function($ctx1) {
  3094. var $1,$2;
  3095. $1=self._cancelChanges();
  3096. if(smalltalk.assert($1)){
  3097. var searchedClass;
  3098. searchedClass=_st(_st($Smalltalk())._current())._at_(aString);
  3099. searchedClass;
  3100. $2=_st(searchedClass)._isClass();
  3101. if(smalltalk.assert($2)){
  3102. _st(self._class())._openOn_(searchedClass);
  3103. } else {
  3104. self._searchReferencesOf_(aString);
  3105. };
  3106. };
  3107. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.Browser)})},
  3108. args: ["aString"],
  3109. source: "search: aString\x0a\x09self cancelChanges ifTrue: [| searchedClass |\x0a\x09\x09searchedClass := Smalltalk current at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [self class openOn: searchedClass]\x0a\x09\x09\x09ifFalse: [self searchReferencesOf: aString]]",
  3110. messageSends: ["ifTrue:", "cancelChanges", "at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3111. referencedClasses: ["Smalltalk"]
  3112. }),
  3113. smalltalk.Browser);
  3114. smalltalk.addMethod(
  3115. smalltalk.method({
  3116. selector: "searchClassReferences",
  3117. category: 'actions',
  3118. fn: function (){
  3119. var self=this;
  3120. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3121. return smalltalk.withContext(function($ctx1) {
  3122. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  3123. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},smalltalk.Browser)})},
  3124. args: [],
  3125. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  3126. messageSends: ["search:", "name"],
  3127. referencedClasses: ["ReferencesBrowser"]
  3128. }),
  3129. smalltalk.Browser);
  3130. smalltalk.addMethod(
  3131. smalltalk.method({
  3132. selector: "searchReferencesOf:",
  3133. category: 'actions',
  3134. fn: function (aString){
  3135. var self=this;
  3136. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3137. return smalltalk.withContext(function($ctx1) {
  3138. _st($ReferencesBrowser())._search_(aString);
  3139. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},smalltalk.Browser)})},
  3140. args: ["aString"],
  3141. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  3142. messageSends: ["search:"],
  3143. referencedClasses: ["ReferencesBrowser"]
  3144. }),
  3145. smalltalk.Browser);
  3146. smalltalk.addMethod(
  3147. smalltalk.method({
  3148. selector: "selectCategory:",
  3149. category: 'actions',
  3150. fn: function (aCategory){
  3151. var self=this;
  3152. return smalltalk.withContext(function($ctx1) {
  3153. var $1,$2;
  3154. $1=self._cancelChanges();
  3155. if(smalltalk.assert($1)){
  3156. self["@selectedPackage"]=aCategory;
  3157. self["@selectedPackage"];
  3158. self["@selectedMethod"]=nil;
  3159. self["@selectedProtocol"]=self["@selectedMethod"];
  3160. self["@selectedClass"]=self["@selectedProtocol"];
  3161. self["@selectedClass"];
  3162. self._resetClassesList();
  3163. self._updateCategoriesList();
  3164. self._updateClassesList();
  3165. self._updateProtocolsList();
  3166. self._updateMethodsList();
  3167. $2=self._updateSourceAndButtons();
  3168. $2;
  3169. };
  3170. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},smalltalk.Browser)})},
  3171. args: ["aCategory"],
  3172. 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]",
  3173. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3174. referencedClasses: []
  3175. }),
  3176. smalltalk.Browser);
  3177. smalltalk.addMethod(
  3178. smalltalk.method({
  3179. selector: "selectClass:",
  3180. category: 'actions',
  3181. fn: function (aClass){
  3182. var self=this;
  3183. return smalltalk.withContext(function($ctx1) {
  3184. var $1,$2;
  3185. $1=self._cancelChanges();
  3186. if(smalltalk.assert($1)){
  3187. self["@selectedClass"]=aClass;
  3188. self["@selectedClass"];
  3189. self["@selectedMethod"]=nil;
  3190. self["@selectedProtocol"]=self["@selectedMethod"];
  3191. self["@selectedProtocol"];
  3192. self._updateClassesList();
  3193. self._updateProtocolsList();
  3194. self._updateMethodsList();
  3195. $2=self._updateSourceAndButtons();
  3196. $2;
  3197. };
  3198. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},smalltalk.Browser)})},
  3199. args: ["aClass"],
  3200. 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]",
  3201. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3202. referencedClasses: []
  3203. }),
  3204. smalltalk.Browser);
  3205. smalltalk.addMethod(
  3206. smalltalk.method({
  3207. selector: "selectMethod:",
  3208. category: 'actions',
  3209. fn: function (aMethod){
  3210. var self=this;
  3211. return smalltalk.withContext(function($ctx1) {
  3212. var $1,$2;
  3213. $1=self._cancelChanges();
  3214. if(smalltalk.assert($1)){
  3215. self["@selectedMethod"]=aMethod;
  3216. self["@selectedMethod"];
  3217. self._updateProtocolsList();
  3218. self._updateMethodsList();
  3219. $2=self._updateSourceAndButtons();
  3220. $2;
  3221. };
  3222. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},smalltalk.Browser)})},
  3223. args: ["aMethod"],
  3224. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons]",
  3225. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3226. referencedClasses: []
  3227. }),
  3228. smalltalk.Browser);
  3229. smalltalk.addMethod(
  3230. smalltalk.method({
  3231. selector: "selectProtocol:",
  3232. category: 'actions',
  3233. fn: function (aString){
  3234. var self=this;
  3235. return smalltalk.withContext(function($ctx1) {
  3236. var $1,$2;
  3237. $1=self._cancelChanges();
  3238. if(smalltalk.assert($1)){
  3239. self["@selectedProtocol"]=aString;
  3240. self["@selectedProtocol"];
  3241. self["@selectedMethod"]=nil;
  3242. self["@selectedMethod"];
  3243. self._updateProtocolsList();
  3244. self._updateMethodsList();
  3245. $2=self._updateSourceAndButtons();
  3246. $2;
  3247. };
  3248. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},smalltalk.Browser)})},
  3249. args: ["aString"],
  3250. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons]",
  3251. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3252. referencedClasses: []
  3253. }),
  3254. smalltalk.Browser);
  3255. smalltalk.addMethod(
  3256. smalltalk.method({
  3257. selector: "selectTab:",
  3258. category: 'actions',
  3259. fn: function (aString){
  3260. var self=this;
  3261. return smalltalk.withContext(function($ctx1) {
  3262. var $1;
  3263. $1=self._cancelChanges();
  3264. if(smalltalk.assert($1)){
  3265. self["@selectedTab"]=aString;
  3266. self["@selectedTab"];
  3267. self._selectProtocol_(nil);
  3268. self._updateTabsList();
  3269. };
  3270. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},smalltalk.Browser)})},
  3271. args: ["aString"],
  3272. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList]",
  3273. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  3274. referencedClasses: []
  3275. }),
  3276. smalltalk.Browser);
  3277. smalltalk.addMethod(
  3278. smalltalk.method({
  3279. selector: "selectedClass",
  3280. category: 'accessing',
  3281. fn: function (){
  3282. var self=this;
  3283. return smalltalk.withContext(function($ctx1) {
  3284. var $1;
  3285. $1=self["@selectedClass"];
  3286. return $1;
  3287. }, function($ctx1) {$ctx1.fill(self,"selectedClass",{},smalltalk.Browser)})},
  3288. args: [],
  3289. source: "selectedClass\x0a\x09^selectedClass",
  3290. messageSends: [],
  3291. referencedClasses: []
  3292. }),
  3293. smalltalk.Browser);
  3294. smalltalk.addMethod(
  3295. smalltalk.method({
  3296. selector: "selectedPackage",
  3297. category: 'accessing',
  3298. fn: function (){
  3299. var self=this;
  3300. return smalltalk.withContext(function($ctx1) {
  3301. var $1;
  3302. $1=self["@selectedPackage"];
  3303. return $1;
  3304. }, function($ctx1) {$ctx1.fill(self,"selectedPackage",{},smalltalk.Browser)})},
  3305. args: [],
  3306. source: "selectedPackage\x0a\x09^selectedPackage",
  3307. messageSends: [],
  3308. referencedClasses: []
  3309. }),
  3310. smalltalk.Browser);
  3311. smalltalk.addMethod(
  3312. smalltalk.method({
  3313. selector: "setMethodProtocol:",
  3314. category: 'actions',
  3315. fn: function (aString){
  3316. var self=this;
  3317. return smalltalk.withContext(function($ctx1) {
  3318. var $1,$2,$3;
  3319. $1=self._cancelChanges();
  3320. if(smalltalk.assert($1)){
  3321. $2=_st(self._protocols())._includes_(aString);
  3322. if(smalltalk.assert($2)){
  3323. _st(self["@selectedMethod"])._category_(aString);
  3324. self["@selectedProtocol"]=aString;
  3325. self["@selectedProtocol"];
  3326. self["@selectedMethod"]=self["@selectedMethod"];
  3327. self["@selectedMethod"];
  3328. self._updateProtocolsList();
  3329. self._updateMethodsList();
  3330. $3=self._updateSourceAndButtons();
  3331. $3;
  3332. } else {
  3333. self._addNewProtocol();
  3334. };
  3335. };
  3336. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},smalltalk.Browser)})},
  3337. args: ["aString"],
  3338. source: "setMethodProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09\x09ifFalse: [self addNewProtocol]\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedMethod category: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self\x0a\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09updateMethodsList;\x0a\x09\x09\x09updateSourceAndButtons]]",
  3339. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3340. referencedClasses: []
  3341. }),
  3342. smalltalk.Browser);
  3343. smalltalk.addMethod(
  3344. smalltalk.method({
  3345. selector: "showClassButtons",
  3346. category: 'actions',
  3347. fn: function (){
  3348. var self=this;
  3349. return smalltalk.withContext(function($ctx1) {
  3350. _st(_st(self["@classButtons"])._asJQuery())._show();
  3351. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},smalltalk.Browser)})},
  3352. args: [],
  3353. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  3354. messageSends: ["show", "asJQuery"],
  3355. referencedClasses: []
  3356. }),
  3357. smalltalk.Browser);
  3358. smalltalk.addMethod(
  3359. smalltalk.method({
  3360. selector: "showMethodButtons",
  3361. category: 'actions',
  3362. fn: function (){
  3363. var self=this;
  3364. return smalltalk.withContext(function($ctx1) {
  3365. _st(_st(self["@methodButtons"])._asJQuery())._show();
  3366. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},smalltalk.Browser)})},
  3367. args: [],
  3368. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  3369. messageSends: ["show", "asJQuery"],
  3370. referencedClasses: []
  3371. }),
  3372. smalltalk.Browser);
  3373. smalltalk.addMethod(
  3374. smalltalk.method({
  3375. selector: "source",
  3376. category: 'accessing',
  3377. fn: function (){
  3378. var self=this;
  3379. return smalltalk.withContext(function($ctx1) {
  3380. var $1,$4,$3,$2,$6,$5;
  3381. $1=_st(self["@selectedTab"]).__eq("comment");
  3382. if(! smalltalk.assert($1)){
  3383. $4=_st(self["@selectedProtocol"])._notNil();
  3384. $ctx1.sendIdx["notNil"]=1;
  3385. $3=_st($4)._or_((function(){
  3386. return smalltalk.withContext(function($ctx2) {
  3387. return _st(self["@selectedMethod"])._notNil();
  3388. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3389. if(smalltalk.assert($3)){
  3390. $2=self._methodSource();
  3391. } else {
  3392. $2=self._declarationSource();
  3393. };
  3394. return $2;
  3395. };
  3396. $6=self["@selectedClass"];
  3397. if(($receiver = $6) == nil || $receiver == null){
  3398. $5="";
  3399. } else {
  3400. $5=self._classCommentSource();
  3401. };
  3402. return $5;
  3403. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Browser)})},
  3404. args: [],
  3405. 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]",
  3406. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  3407. referencedClasses: []
  3408. }),
  3409. smalltalk.Browser);
  3410. smalltalk.addMethod(
  3411. smalltalk.method({
  3412. selector: "updateCategoriesList",
  3413. category: 'updating',
  3414. fn: function (){
  3415. var self=this;
  3416. return smalltalk.withContext(function($ctx1) {
  3417. var $1,$2,$3,$4;
  3418. _st(self["@packagesList"])._contents_((function(html){
  3419. return smalltalk.withContext(function($ctx2) {
  3420. return _st(self._packages())._do_((function(each){
  3421. var li,label;
  3422. return smalltalk.withContext(function($ctx3) {
  3423. $1=_st(each)._isEmpty();
  3424. if(smalltalk.assert($1)){
  3425. label="Unclassified";
  3426. label;
  3427. } else {
  3428. label=each;
  3429. label;
  3430. };
  3431. li=_st(html)._li();
  3432. li;
  3433. $2=_st(self["@selectedPackage"]).__eq(each);
  3434. if(smalltalk.assert($2)){
  3435. _st(li)._class_("selected");
  3436. };
  3437. $3=li;
  3438. _st($3)._with_(label);
  3439. $4=_st($3)._onClick_((function(){
  3440. return smalltalk.withContext(function($ctx4) {
  3441. return self._selectCategory_(each);
  3442. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  3443. return $4;
  3444. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)})}));
  3445. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3446. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.Browser)})},
  3447. args: [],
  3448. 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]]]",
  3449. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  3450. referencedClasses: []
  3451. }),
  3452. smalltalk.Browser);
  3453. smalltalk.addMethod(
  3454. smalltalk.method({
  3455. selector: "updateClassesList",
  3456. category: 'updating',
  3457. fn: function (){
  3458. var self=this;
  3459. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3460. return smalltalk.withContext(function($ctx1) {
  3461. _st(_st($TabManager())._current())._update();
  3462. _st(self["@classesList"])._updateNodes();
  3463. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.Browser)})},
  3464. args: [],
  3465. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  3466. messageSends: ["update", "current", "updateNodes"],
  3467. referencedClasses: ["TabManager"]
  3468. }),
  3469. smalltalk.Browser);
  3470. smalltalk.addMethod(
  3471. smalltalk.method({
  3472. selector: "updateMethodsList",
  3473. category: 'updating',
  3474. fn: function (){
  3475. var self=this;
  3476. return smalltalk.withContext(function($ctx1) {
  3477. var $1,$2,$3;
  3478. _st(self["@methodsList"])._contents_((function(html){
  3479. return smalltalk.withContext(function($ctx2) {
  3480. return _st(self._methods())._do_((function(each){
  3481. var li;
  3482. return smalltalk.withContext(function($ctx3) {
  3483. li=_st(html)._li();
  3484. li;
  3485. $1=_st(self["@selectedMethod"]).__eq(each);
  3486. if(smalltalk.assert($1)){
  3487. _st(li)._class_("selected");
  3488. };
  3489. $2=li;
  3490. _st($2)._with_(_st(each)._selector());
  3491. $3=_st($2)._onClick_((function(){
  3492. return smalltalk.withContext(function($ctx4) {
  3493. return self._selectMethod_(each);
  3494. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3495. return $3;
  3496. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3497. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3498. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.Browser)})},
  3499. args: [],
  3500. 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]]]",
  3501. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  3502. referencedClasses: []
  3503. }),
  3504. smalltalk.Browser);
  3505. smalltalk.addMethod(
  3506. smalltalk.method({
  3507. selector: "updateProtocolsList",
  3508. category: 'updating',
  3509. fn: function (){
  3510. var self=this;
  3511. return smalltalk.withContext(function($ctx1) {
  3512. var $1,$2,$3;
  3513. _st(self["@protocolsList"])._contents_((function(html){
  3514. return smalltalk.withContext(function($ctx2) {
  3515. return _st(self._protocols())._do_((function(each){
  3516. var li;
  3517. return smalltalk.withContext(function($ctx3) {
  3518. li=_st(html)._li();
  3519. li;
  3520. $1=_st(self["@selectedProtocol"]).__eq(each);
  3521. if(smalltalk.assert($1)){
  3522. _st(li)._class_("selected");
  3523. };
  3524. $2=li;
  3525. _st($2)._with_(each);
  3526. $3=_st($2)._onClick_((function(){
  3527. return smalltalk.withContext(function($ctx4) {
  3528. return self._selectProtocol_(each);
  3529. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3530. return $3;
  3531. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3532. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3533. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},smalltalk.Browser)})},
  3534. args: [],
  3535. 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]]]",
  3536. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  3537. referencedClasses: []
  3538. }),
  3539. smalltalk.Browser);
  3540. smalltalk.addMethod(
  3541. smalltalk.method({
  3542. selector: "updateSourceAndButtons",
  3543. category: 'updating',
  3544. fn: function (){
  3545. var self=this;
  3546. var currentProtocol;
  3547. return smalltalk.withContext(function($ctx1) {
  3548. 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,$27,$30,$31,$32,$33,$34,$29,$35,$37,$36;
  3549. self._disableSaveButton();
  3550. _st(self["@classButtons"])._contents_((function(html){
  3551. return smalltalk.withContext(function($ctx2) {
  3552. $1=_st(html)._button();
  3553. $ctx2.sendIdx["button"]=1;
  3554. _st($1)._title_("Create a new class");
  3555. _st($1)._onClick_((function(){
  3556. return smalltalk.withContext(function($ctx3) {
  3557. return self._addNewClass();
  3558. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3559. $ctx2.sendIdx["onClick:"]=1;
  3560. $2=_st($1)._with_("New class");
  3561. $ctx2.sendIdx["with:"]=1;
  3562. $2;
  3563. $3=_st(html)._button();
  3564. $ctx2.sendIdx["button"]=2;
  3565. _st($3)._with_("Rename class");
  3566. $ctx2.sendIdx["with:"]=2;
  3567. $4=_st($3)._onClick_((function(){
  3568. return smalltalk.withContext(function($ctx3) {
  3569. return self._renameClass();
  3570. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3571. $ctx2.sendIdx["onClick:"]=2;
  3572. $4;
  3573. $5=_st(html)._button();
  3574. $ctx2.sendIdx["button"]=3;
  3575. _st($5)._with_("Copy class");
  3576. $ctx2.sendIdx["with:"]=3;
  3577. $6=_st($5)._onClick_((function(){
  3578. return smalltalk.withContext(function($ctx3) {
  3579. return self._copyClass();
  3580. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3581. $ctx2.sendIdx["onClick:"]=3;
  3582. $6;
  3583. $7=_st(html)._button();
  3584. $ctx2.sendIdx["button"]=4;
  3585. _st($7)._with_("Remove class");
  3586. $ctx2.sendIdx["with:"]=4;
  3587. $8=_st($7)._onClick_((function(){
  3588. return smalltalk.withContext(function($ctx3) {
  3589. return self._removeClass();
  3590. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  3591. $ctx2.sendIdx["onClick:"]=4;
  3592. $8;
  3593. $9=_st(html)._button();
  3594. $ctx2.sendIdx["button"]=5;
  3595. _st($9)._with_("References");
  3596. $ctx2.sendIdx["with:"]=5;
  3597. $10=_st($9)._onClick_((function(){
  3598. return smalltalk.withContext(function($ctx3) {
  3599. return self._searchClassReferences();
  3600. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3601. $ctx2.sendIdx["onClick:"]=5;
  3602. return $10;
  3603. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3604. $ctx1.sendIdx["contents:"]=1;
  3605. _st(self["@methodButtons"])._contents_((function(html){
  3606. var protocolSelect,referencesSelect;
  3607. return smalltalk.withContext(function($ctx2) {
  3608. $11=_st(html)._button();
  3609. _st($11)._with_("Remove method");
  3610. $ctx2.sendIdx["with:"]=6;
  3611. $12=_st($11)._onClick_((function(){
  3612. return smalltalk.withContext(function($ctx3) {
  3613. return self._removeMethod();
  3614. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)})}));
  3615. $12;
  3616. protocolSelect=_st(html)._select();
  3617. $ctx2.sendIdx["select"]=1;
  3618. protocolSelect;
  3619. $13=protocolSelect;
  3620. _st($13)._onChange_((function(){
  3621. return smalltalk.withContext(function($ctx3) {
  3622. $15=_st(protocolSelect)._asJQuery();
  3623. $ctx3.sendIdx["asJQuery"]=1;
  3624. $14=_st($15)._val();
  3625. $ctx3.sendIdx["val"]=1;
  3626. return self._setMethodProtocol_($14);
  3627. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3628. $ctx2.sendIdx["onChange:"]=1;
  3629. $16=_st($13)._with_((function(){
  3630. return smalltalk.withContext(function($ctx3) {
  3631. $17=_st(html)._option();
  3632. $ctx3.sendIdx["option"]=1;
  3633. _st($17)._with_("Method protocol");
  3634. $ctx3.sendIdx["with:"]=8;
  3635. $18=_st($17)._at_put_("disabled","disabled");
  3636. $ctx3.sendIdx["at:put:"]=1;
  3637. $18;
  3638. $19=_st(html)._option();
  3639. $ctx3.sendIdx["option"]=2;
  3640. _st($19)._class_("important");
  3641. $ctx3.sendIdx["class:"]=1;
  3642. $20=_st($19)._with_("New...");
  3643. $ctx3.sendIdx["with:"]=9;
  3644. $20;
  3645. currentProtocol=self["@selectedProtocol"];
  3646. currentProtocol;
  3647. $22=_st(currentProtocol)._isNil();
  3648. $ctx3.sendIdx["isNil"]=1;
  3649. $21=_st($22)._and_((function(){
  3650. return smalltalk.withContext(function($ctx4) {
  3651. return _st(self["@selectedMethod"])._notNil();
  3652. $ctx4.sendIdx["notNil"]=1;
  3653. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)})}));
  3654. if(smalltalk.assert($21)){
  3655. currentProtocol=_st(self["@selectedMethod"])._category();
  3656. currentProtocol;
  3657. };
  3658. return _st(self._protocols())._do_((function(each){
  3659. var option;
  3660. return smalltalk.withContext(function($ctx4) {
  3661. $23=_st(html)._option();
  3662. $ctx4.sendIdx["option"]=3;
  3663. option=_st($23)._with_(each);
  3664. $ctx4.sendIdx["with:"]=10;
  3665. option;
  3666. $24=_st(currentProtocol).__eq(each);
  3667. if(smalltalk.assert($24)){
  3668. return _st(option)._at_put_("selected","selected");
  3669. $ctx4.sendIdx["at:put:"]=2;
  3670. };
  3671. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)})}));
  3672. $ctx3.sendIdx["do:"]=1;
  3673. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3674. $ctx2.sendIdx["with:"]=7;
  3675. $16;
  3676. $25=_st(self["@selectedMethod"])._isNil();
  3677. $ctx2.sendIdx["isNil"]=2;
  3678. if(! smalltalk.assert($25)){
  3679. referencesSelect=_st(html)._select();
  3680. referencesSelect;
  3681. $26=referencesSelect;
  3682. _st($26)._onChange_((function(){
  3683. return smalltalk.withContext(function($ctx3) {
  3684. $28=_st(referencesSelect)._asJQuery();
  3685. $27=_st($28)._val();
  3686. return self._searchReferencesOf_($27);
  3687. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)})}));
  3688. $29=_st($26)._with_((function(){
  3689. var option;
  3690. return smalltalk.withContext(function($ctx3) {
  3691. $30=_st(html)._option();
  3692. $ctx3.sendIdx["option"]=4;
  3693. _st($30)._with_("References");
  3694. $ctx3.sendIdx["with:"]=12;
  3695. _st($30)._at_put_("disabled","disabled");
  3696. $ctx3.sendIdx["at:put:"]=3;
  3697. $31=_st($30)._at_put_("selected","selected");
  3698. $31;
  3699. $32=_st(html)._option();
  3700. $ctx3.sendIdx["option"]=5;
  3701. _st($32)._class_("important");
  3702. $33=_st($32)._with_(_st(self["@selectedMethod"])._selector());
  3703. $ctx3.sendIdx["with:"]=13;
  3704. $33;
  3705. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  3706. return smalltalk.withContext(function($ctx4) {
  3707. $34=_st(html)._option();
  3708. return _st($34)._with_(each);
  3709. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)})}));
  3710. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)})}));
  3711. $ctx2.sendIdx["with:"]=11;
  3712. return $29;
  3713. };
  3714. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)})}));
  3715. $35=_st(self["@selectedMethod"])._isNil();
  3716. $ctx1.sendIdx["isNil"]=3;
  3717. if(smalltalk.assert($35)){
  3718. self._hideMethodButtons();
  3719. $37=_st(self["@selectedClass"])._isNil();
  3720. $36=_st($37)._or_((function(){
  3721. return smalltalk.withContext(function($ctx2) {
  3722. return _st(self["@selectedProtocol"])._notNil();
  3723. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)})}));
  3724. if(smalltalk.assert($36)){
  3725. self._hideClassButtons();
  3726. $ctx1.sendIdx["hideClassButtons"]=1;
  3727. } else {
  3728. self._showClassButtons();
  3729. };
  3730. } else {
  3731. self._hideClassButtons();
  3732. self._showMethodButtons();
  3733. };
  3734. _st(self["@sourceArea"])._val_(self._source());
  3735. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},smalltalk.Browser)})},
  3736. args: [],
  3737. 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",
  3738. 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"],
  3739. referencedClasses: []
  3740. }),
  3741. smalltalk.Browser);
  3742. smalltalk.addMethod(
  3743. smalltalk.method({
  3744. selector: "updateStatus",
  3745. category: 'updating',
  3746. fn: function (){
  3747. var self=this;
  3748. return smalltalk.withContext(function($ctx1) {
  3749. var $1,$2,$3;
  3750. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  3751. if(smalltalk.assert($1)){
  3752. $2=self["@saveButton"];
  3753. if(($receiver = $2) == nil || $receiver == null){
  3754. $2;
  3755. } else {
  3756. _st(self["@saveButton"])._at_put_("disabled",true);
  3757. };
  3758. self["@unsavedChanges"]=false;
  3759. self["@unsavedChanges"];
  3760. } else {
  3761. $3=self["@saveButton"];
  3762. if(($receiver = $3) == nil || $receiver == null){
  3763. $3;
  3764. } else {
  3765. _st(self["@saveButton"])._removeAt_("disabled");
  3766. };
  3767. self["@unsavedChanges"]=true;
  3768. self["@unsavedChanges"];
  3769. };
  3770. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},smalltalk.Browser)})},
  3771. args: [],
  3772. 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]",
  3773. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  3774. referencedClasses: []
  3775. }),
  3776. smalltalk.Browser);
  3777. smalltalk.addMethod(
  3778. smalltalk.method({
  3779. selector: "updateTabsList",
  3780. category: 'updating',
  3781. fn: function (){
  3782. var self=this;
  3783. return smalltalk.withContext(function($ctx1) {
  3784. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21;
  3785. _st(self["@tabsList"])._contents_((function(html){
  3786. var li;
  3787. return smalltalk.withContext(function($ctx2) {
  3788. li=_st(html)._li();
  3789. $ctx2.sendIdx["li"]=1;
  3790. li;
  3791. $1=_st(self["@selectedTab"]).__eq("instance");
  3792. $ctx2.sendIdx["="]=1;
  3793. if(smalltalk.assert($1)){
  3794. _st(li)._class_("selected");
  3795. $ctx2.sendIdx["class:"]=1;
  3796. };
  3797. $2=li;
  3798. _st($2)._with_((function(){
  3799. return smalltalk.withContext(function($ctx3) {
  3800. $3=_st(html)._span();
  3801. $ctx3.sendIdx["span"]=1;
  3802. _st($3)._class_("ltab");
  3803. $ctx3.sendIdx["class:"]=2;
  3804. $4=_st(html)._span();
  3805. $ctx3.sendIdx["span"]=2;
  3806. _st($4)._class_("mtab");
  3807. $ctx3.sendIdx["class:"]=3;
  3808. $5=_st($4)._with_("Instance");
  3809. $ctx3.sendIdx["with:"]=2;
  3810. $5;
  3811. $6=_st(html)._span();
  3812. $ctx3.sendIdx["span"]=3;
  3813. return _st($6)._class_("rtab");
  3814. $ctx3.sendIdx["class:"]=4;
  3815. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3816. $ctx2.sendIdx["with:"]=1;
  3817. $7=_st($2)._onClick_((function(){
  3818. return smalltalk.withContext(function($ctx3) {
  3819. return self._selectTab_("instance");
  3820. $ctx3.sendIdx["selectTab:"]=1;
  3821. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3822. $ctx2.sendIdx["onClick:"]=1;
  3823. $7;
  3824. li=_st(html)._li();
  3825. $ctx2.sendIdx["li"]=2;
  3826. li;
  3827. $8=_st(self["@selectedTab"]).__eq("class");
  3828. $ctx2.sendIdx["="]=2;
  3829. if(smalltalk.assert($8)){
  3830. _st(li)._class_("selected");
  3831. $ctx2.sendIdx["class:"]=5;
  3832. };
  3833. $9=li;
  3834. _st($9)._with_((function(){
  3835. return smalltalk.withContext(function($ctx3) {
  3836. $10=_st(html)._span();
  3837. $ctx3.sendIdx["span"]=4;
  3838. _st($10)._class_("ltab");
  3839. $ctx3.sendIdx["class:"]=6;
  3840. $11=_st(html)._span();
  3841. $ctx3.sendIdx["span"]=5;
  3842. _st($11)._class_("mtab");
  3843. $ctx3.sendIdx["class:"]=7;
  3844. $12=_st($11)._with_("Class");
  3845. $ctx3.sendIdx["with:"]=4;
  3846. $12;
  3847. $13=_st(html)._span();
  3848. $ctx3.sendIdx["span"]=6;
  3849. return _st($13)._class_("rtab");
  3850. $ctx3.sendIdx["class:"]=8;
  3851. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3852. $ctx2.sendIdx["with:"]=3;
  3853. $14=_st($9)._onClick_((function(){
  3854. return smalltalk.withContext(function($ctx3) {
  3855. return self._selectTab_("class");
  3856. $ctx3.sendIdx["selectTab:"]=2;
  3857. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  3858. $ctx2.sendIdx["onClick:"]=2;
  3859. $14;
  3860. li=_st(html)._li();
  3861. li;
  3862. $15=_st(self["@selectedTab"]).__eq("comment");
  3863. if(smalltalk.assert($15)){
  3864. _st(li)._class_("selected");
  3865. $ctx2.sendIdx["class:"]=9;
  3866. };
  3867. $16=li;
  3868. _st($16)._with_((function(){
  3869. return smalltalk.withContext(function($ctx3) {
  3870. $17=_st(html)._span();
  3871. $ctx3.sendIdx["span"]=7;
  3872. _st($17)._class_("ltab");
  3873. $ctx3.sendIdx["class:"]=10;
  3874. $18=_st(html)._span();
  3875. $ctx3.sendIdx["span"]=8;
  3876. _st($18)._class_("mtab");
  3877. $ctx3.sendIdx["class:"]=11;
  3878. $19=_st($18)._with_("Comment");
  3879. $19;
  3880. $20=_st(html)._span();
  3881. return _st($20)._class_("rtab");
  3882. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3883. $ctx2.sendIdx["with:"]=5;
  3884. $21=_st($16)._onClick_((function(){
  3885. return smalltalk.withContext(function($ctx3) {
  3886. return self._selectTab_("comment");
  3887. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3888. return $21;
  3889. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  3890. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},smalltalk.Browser)})},
  3891. args: [],
  3892. 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]]",
  3893. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  3894. referencedClasses: []
  3895. }),
  3896. smalltalk.Browser);
  3897. smalltalk.addMethod(
  3898. smalltalk.method({
  3899. selector: "open",
  3900. category: 'convenience',
  3901. fn: function (){
  3902. var self=this;
  3903. return smalltalk.withContext(function($ctx1) {
  3904. _st(self._new())._open();
  3905. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.Browser.klass)})},
  3906. args: [],
  3907. source: "open\x0a\x09self new open",
  3908. messageSends: ["open", "new"],
  3909. referencedClasses: []
  3910. }),
  3911. smalltalk.Browser.klass);
  3912. smalltalk.addMethod(
  3913. smalltalk.method({
  3914. selector: "openOn:",
  3915. category: 'convenience',
  3916. fn: function (aClass){
  3917. var self=this;
  3918. return smalltalk.withContext(function($ctx1) {
  3919. var $2,$3,$1;
  3920. $2=self._new();
  3921. _st($2)._open();
  3922. _st($2)._selectCategory_(_st(aClass)._category());
  3923. $3=_st($2)._selectClass_(aClass);
  3924. $1=$3;
  3925. return $1;
  3926. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},smalltalk.Browser.klass)})},
  3927. args: ["aClass"],
  3928. source: "openOn: aClass\x0a\x09^self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  3929. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
  3930. referencedClasses: []
  3931. }),
  3932. smalltalk.Browser.klass);
  3933. smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3934. smalltalk.addMethod(
  3935. smalltalk.method({
  3936. selector: "allVariables",
  3937. category: 'accessing',
  3938. fn: function (){
  3939. var self=this;
  3940. var all;
  3941. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3942. return smalltalk.withContext(function($ctx1) {
  3943. var $3,$2,$1,$4,$6,$5,$7;
  3944. all=_st($Dictionary())._new();
  3945. $3=self._receiver();
  3946. $ctx1.sendIdx["receiver"]=1;
  3947. $2=_st($3)._class();
  3948. $1=_st($2)._allInstanceVariableNames();
  3949. _st($1)._do_((function(each){
  3950. return smalltalk.withContext(function($ctx2) {
  3951. $4=all;
  3952. $6=self._receiver();
  3953. $5=_st($6)._instVarAt_(each);
  3954. return _st($4)._at_put_(each,$5);
  3955. $ctx2.sendIdx["at:put:"]=1;
  3956. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  3957. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3958. return smalltalk.withContext(function($ctx2) {
  3959. return _st(all)._at_put_(key,value);
  3960. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)})}));
  3961. $7=all;
  3962. return $7;
  3963. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},smalltalk.Debugger)})},
  3964. args: [],
  3965. 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",
  3966. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"],
  3967. referencedClasses: ["Dictionary"]
  3968. }),
  3969. smalltalk.Debugger);
  3970. smalltalk.addMethod(
  3971. smalltalk.method({
  3972. selector: "canBeClosed",
  3973. category: 'testing',
  3974. fn: function (){
  3975. var self=this;
  3976. return smalltalk.withContext(function($ctx1) {
  3977. return true;
  3978. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Debugger)})},
  3979. args: [],
  3980. source: "canBeClosed\x0a\x09^true",
  3981. messageSends: [],
  3982. referencedClasses: []
  3983. }),
  3984. smalltalk.Debugger);
  3985. smalltalk.addMethod(
  3986. smalltalk.method({
  3987. selector: "error",
  3988. category: 'accessing',
  3989. fn: function (){
  3990. var self=this;
  3991. return smalltalk.withContext(function($ctx1) {
  3992. var $1;
  3993. $1=self["@error"];
  3994. return $1;
  3995. }, function($ctx1) {$ctx1.fill(self,"error",{},smalltalk.Debugger)})},
  3996. args: [],
  3997. source: "error\x0a\x09^error",
  3998. messageSends: [],
  3999. referencedClasses: []
  4000. }),
  4001. smalltalk.Debugger);
  4002. smalltalk.addMethod(
  4003. smalltalk.method({
  4004. selector: "error:",
  4005. category: 'accessing',
  4006. fn: function (anError){
  4007. var self=this;
  4008. return smalltalk.withContext(function($ctx1) {
  4009. self["@error"]=anError;
  4010. return self}, function($ctx1) {$ctx1.fill(self,"error:",{anError:anError},smalltalk.Debugger)})},
  4011. args: ["anError"],
  4012. source: "error: anError\x0a\x09error := anError",
  4013. messageSends: [],
  4014. referencedClasses: []
  4015. }),
  4016. smalltalk.Debugger);
  4017. smalltalk.addMethod(
  4018. smalltalk.method({
  4019. selector: "initialize",
  4020. category: 'initialization',
  4021. fn: function (){
  4022. var self=this;
  4023. return smalltalk.withContext(function($ctx1) {
  4024. smalltalk.Debugger.superclass.fn.prototype._initialize.apply(_st(self), []);
  4025. _st(self["@unsavedChanges"]).__eq(false);
  4026. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Debugger)})},
  4027. args: [],
  4028. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  4029. messageSends: ["initialize", "="],
  4030. referencedClasses: []
  4031. }),
  4032. smalltalk.Debugger);
  4033. smalltalk.addMethod(
  4034. smalltalk.method({
  4035. selector: "inspectSelectedVariable",
  4036. category: 'actions',
  4037. fn: function (){
  4038. var self=this;
  4039. return smalltalk.withContext(function($ctx1) {
  4040. _st(self["@selectedVariable"])._inspect();
  4041. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},smalltalk.Debugger)})},
  4042. args: [],
  4043. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  4044. messageSends: ["inspect"],
  4045. referencedClasses: []
  4046. }),
  4047. smalltalk.Debugger);
  4048. smalltalk.addMethod(
  4049. smalltalk.method({
  4050. selector: "label",
  4051. category: 'accessing',
  4052. fn: function (){
  4053. var self=this;
  4054. return smalltalk.withContext(function($ctx1) {
  4055. return "[Debugger]";
  4056. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Debugger)})},
  4057. args: [],
  4058. source: "label\x0a\x09^'[Debugger]'",
  4059. messageSends: [],
  4060. referencedClasses: []
  4061. }),
  4062. smalltalk.Debugger);
  4063. smalltalk.addMethod(
  4064. smalltalk.method({
  4065. selector: "method",
  4066. category: 'accessing',
  4067. fn: function (){
  4068. var self=this;
  4069. return smalltalk.withContext(function($ctx1) {
  4070. var $1;
  4071. $1=_st(self["@selectedContext"])._method();
  4072. return $1;
  4073. }, function($ctx1) {$ctx1.fill(self,"method",{},smalltalk.Debugger)})},
  4074. args: [],
  4075. source: "method\x0a\x09^selectedContext method",
  4076. messageSends: ["method"],
  4077. referencedClasses: []
  4078. }),
  4079. smalltalk.Debugger);
  4080. smalltalk.addMethod(
  4081. smalltalk.method({
  4082. selector: "proceed",
  4083. category: 'actions',
  4084. fn: function (){
  4085. var self=this;
  4086. return smalltalk.withContext(function($ctx1) {
  4087. self._close();
  4088. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  4089. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},smalltalk.Debugger)})},
  4090. args: [],
  4091. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  4092. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  4093. referencedClasses: []
  4094. }),
  4095. smalltalk.Debugger);
  4096. smalltalk.addMethod(
  4097. smalltalk.method({
  4098. selector: "receiver",
  4099. category: 'accessing',
  4100. fn: function (){
  4101. var self=this;
  4102. return smalltalk.withContext(function($ctx1) {
  4103. var $1;
  4104. $1=_st(self["@selectedContext"])._receiver();
  4105. return $1;
  4106. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.Debugger)})},
  4107. args: [],
  4108. source: "receiver\x0a\x09^selectedContext receiver",
  4109. messageSends: ["receiver"],
  4110. referencedClasses: []
  4111. }),
  4112. smalltalk.Debugger);
  4113. smalltalk.addMethod(
  4114. smalltalk.method({
  4115. selector: "renderBottomPanelOn:",
  4116. category: 'rendering',
  4117. fn: function (html){
  4118. var self=this;
  4119. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4120. return smalltalk.withContext(function($ctx1) {
  4121. var $1,$2,$3;
  4122. $1=_st(html)._div();
  4123. $ctx1.sendIdx["div"]=1;
  4124. _st($1)._class_("amber_sourceCode debugger");
  4125. $ctx1.sendIdx["class:"]=1;
  4126. $2=_st($1)._with_((function(){
  4127. return smalltalk.withContext(function($ctx2) {
  4128. self["@sourceArea"]=_st($SourceArea())._new();
  4129. self["@sourceArea"];
  4130. return _st(self["@sourceArea"])._renderOn_(html);
  4131. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4132. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  4133. $ctx1.sendIdx["class:"]=2;
  4134. $3=_st(html)._div();
  4135. self["@inspector"]=_st($3)._class_("amber_column debugger inspector");
  4136. _st(self["@sourceArea"])._onKeyUp_((function(){
  4137. return smalltalk.withContext(function($ctx2) {
  4138. return self._updateStatus();
  4139. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4140. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Debugger)})},
  4141. args: ["html"],
  4142. 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]",
  4143. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
  4144. referencedClasses: ["SourceArea"]
  4145. }),
  4146. smalltalk.Debugger);
  4147. smalltalk.addMethod(
  4148. smalltalk.method({
  4149. selector: "renderBoxOn:",
  4150. category: 'rendering',
  4151. fn: function (html){
  4152. var self=this;
  4153. return smalltalk.withContext(function($ctx1) {
  4154. var $1;
  4155. self._renderTopPanelOn_(html);
  4156. $1=self._renderBottomPanelOn_(html);
  4157. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Debugger)})},
  4158. args: ["html"],
  4159. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4160. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4161. referencedClasses: []
  4162. }),
  4163. smalltalk.Debugger);
  4164. smalltalk.addMethod(
  4165. smalltalk.method({
  4166. selector: "renderButtonsOn:",
  4167. category: 'rendering',
  4168. fn: function (html){
  4169. var self=this;
  4170. return smalltalk.withContext(function($ctx1) {
  4171. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  4172. $1=_st(html)._button();
  4173. $ctx1.sendIdx["button"]=1;
  4174. _st($1)._with_("Save");
  4175. $ctx1.sendIdx["with:"]=1;
  4176. $2=_st($1)._onClick_((function(){
  4177. return smalltalk.withContext(function($ctx2) {
  4178. return self._save();
  4179. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4180. $ctx1.sendIdx["onClick:"]=1;
  4181. self["@saveButton"]=$2;
  4182. $3=_st(html)._button();
  4183. $ctx1.sendIdx["button"]=2;
  4184. _st($3)._with_("DoIt");
  4185. $ctx1.sendIdx["with:"]=2;
  4186. $4=_st($3)._onClick_((function(){
  4187. return smalltalk.withContext(function($ctx2) {
  4188. return _st(self["@sourceArea"])._doIt();
  4189. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4190. $ctx1.sendIdx["onClick:"]=2;
  4191. $5=_st(html)._button();
  4192. $ctx1.sendIdx["button"]=3;
  4193. _st($5)._with_("PrintIt");
  4194. $ctx1.sendIdx["with:"]=3;
  4195. $6=_st($5)._onClick_((function(){
  4196. return smalltalk.withContext(function($ctx2) {
  4197. return _st(self["@sourceArea"])._printIt();
  4198. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4199. $ctx1.sendIdx["onClick:"]=3;
  4200. $7=_st(html)._button();
  4201. $ctx1.sendIdx["button"]=4;
  4202. _st($7)._with_("InspectIt");
  4203. $ctx1.sendIdx["with:"]=4;
  4204. $8=_st($7)._onClick_((function(){
  4205. return smalltalk.withContext(function($ctx2) {
  4206. return _st(self["@sourceArea"])._inspectIt();
  4207. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  4208. $ctx1.sendIdx["onClick:"]=4;
  4209. $9=_st(html)._button();
  4210. $ctx1.sendIdx["button"]=5;
  4211. _st($9)._with_("Proceed");
  4212. $ctx1.sendIdx["with:"]=5;
  4213. $10=_st($9)._onClick_((function(){
  4214. return smalltalk.withContext(function($ctx2) {
  4215. return self._proceed();
  4216. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  4217. $ctx1.sendIdx["onClick:"]=5;
  4218. $11=_st(html)._button();
  4219. $ctx1.sendIdx["button"]=6;
  4220. _st($11)._with_("Abandon");
  4221. $ctx1.sendIdx["with:"]=6;
  4222. $12=_st($11)._onClick_((function(){
  4223. return smalltalk.withContext(function($ctx2) {
  4224. return self._close();
  4225. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  4226. $ctx1.sendIdx["onClick:"]=6;
  4227. $13=_st(html)._button();
  4228. _st($13)._class_("amber_button debugger inspect");
  4229. _st($13)._with_("Inspect");
  4230. $14=_st($13)._onClick_((function(){
  4231. return smalltalk.withContext(function($ctx2) {
  4232. return self._inspectSelectedVariable();
  4233. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
  4234. self["@inspectButton"]=$14;
  4235. self._updateSourceArea();
  4236. self._updateStatus();
  4237. self._updateVariablesList();
  4238. $15=self._updateInspector();
  4239. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Debugger)})},
  4240. args: ["html"],
  4241. 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",
  4242. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  4243. referencedClasses: []
  4244. }),
  4245. smalltalk.Debugger);
  4246. smalltalk.addMethod(
  4247. smalltalk.method({
  4248. selector: "renderContext:on:",
  4249. category: 'rendering',
  4250. fn: function (aContext,html){
  4251. var self=this;
  4252. var li;
  4253. return smalltalk.withContext(function($ctx1) {
  4254. var $1,$2,$3,$4,$5;
  4255. li=_st(html)._li();
  4256. $1=_st(self["@selectedContext"]).__eq(aContext);
  4257. if(smalltalk.assert($1)){
  4258. _st(li)._class_("selected");
  4259. };
  4260. $2=li;
  4261. _st($2)._with_(_st(aContext)._asString());
  4262. $3=_st($2)._onClick_((function(){
  4263. return smalltalk.withContext(function($ctx2) {
  4264. return self._selectContext_(aContext);
  4265. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4266. $4=_st(aContext)._outerContext();
  4267. $ctx1.sendIdx["outerContext"]=1;
  4268. if(($receiver = $4) == nil || $receiver == null){
  4269. $4;
  4270. } else {
  4271. $5=_st(aContext)._outerContext();
  4272. self._renderContext_on_($5,html);
  4273. };
  4274. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},smalltalk.Debugger)})},
  4275. args: ["aContext", "html"],
  4276. 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]",
  4277. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"],
  4278. referencedClasses: []
  4279. }),
  4280. smalltalk.Debugger);
  4281. smalltalk.addMethod(
  4282. smalltalk.method({
  4283. selector: "renderTopPanelOn:",
  4284. category: 'rendering',
  4285. fn: function (html){
  4286. var self=this;
  4287. return smalltalk.withContext(function($ctx1) {
  4288. var $1,$2,$4,$6,$8,$7,$5,$9,$12,$11,$10,$3;
  4289. $1=self._error();
  4290. $ctx1.sendIdx["error"]=1;
  4291. self["@selectedContext"]=_st($1)._context();
  4292. $ctx1.sendIdx["context"]=1;
  4293. $2=_st(html)._div();
  4294. $ctx1.sendIdx["div"]=1;
  4295. _st($2)._class_("top");
  4296. $ctx1.sendIdx["class:"]=1;
  4297. $3=_st($2)._with_((function(){
  4298. return smalltalk.withContext(function($ctx2) {
  4299. $4=_st(html)._div();
  4300. _st($4)._class_("label");
  4301. $ctx2.sendIdx["class:"]=2;
  4302. $6=$4;
  4303. $8=self._error();
  4304. $ctx2.sendIdx["error"]=2;
  4305. $7=_st($8)._messageText();
  4306. $5=_st($6)._with_($7);
  4307. $ctx2.sendIdx["with:"]=2;
  4308. $5;
  4309. $9=_st(html)._ul();
  4310. _st($9)._class_("amber_column debugger contexts");
  4311. $10=_st($9)._with_((function(){
  4312. return smalltalk.withContext(function($ctx3) {
  4313. $12=self._error();
  4314. $11=_st($12)._context();
  4315. return self._renderContext_on_($11,html);
  4316. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4317. self["@ul"]=$10;
  4318. return self["@ul"];
  4319. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4320. $ctx1.sendIdx["with:"]=1;
  4321. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Debugger)})},
  4322. args: ["html"],
  4323. 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]]",
  4324. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
  4325. referencedClasses: []
  4326. }),
  4327. smalltalk.Debugger);
  4328. smalltalk.addMethod(
  4329. smalltalk.method({
  4330. selector: "save",
  4331. category: 'actions',
  4332. fn: function (){
  4333. var self=this;
  4334. var protocol;
  4335. return smalltalk.withContext(function($ctx1) {
  4336. var $4,$3,$2,$1,$6,$5;
  4337. $4=_st(self["@selectedContext"])._receiver();
  4338. $ctx1.sendIdx["receiver"]=1;
  4339. $3=_st($4)._class();
  4340. $ctx1.sendIdx["class"]=1;
  4341. $2=_st($3)._methodDictionary();
  4342. $1=_st($2)._at_(_st(self["@selectedContext"])._selector());
  4343. protocol=_st($1)._category();
  4344. $6=_st(self["@selectedContext"])._receiver();
  4345. $5=_st($6)._class();
  4346. _st($5)._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  4347. self._updateStatus();
  4348. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},smalltalk.Debugger)})},
  4349. args: [],
  4350. 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",
  4351. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  4352. referencedClasses: []
  4353. }),
  4354. smalltalk.Debugger);
  4355. smalltalk.addMethod(
  4356. smalltalk.method({
  4357. selector: "selectContext:",
  4358. category: 'actions',
  4359. fn: function (aContext){
  4360. var self=this;
  4361. return smalltalk.withContext(function($ctx1) {
  4362. var $1;
  4363. self["@selectedContext"]=aContext;
  4364. self["@selectedVariable"]=nil;
  4365. self["@selectedVariableName"]=nil;
  4366. self._updateContextsList();
  4367. self._updateSourceArea();
  4368. self._updateInspector();
  4369. self._updateVariablesList();
  4370. $1=self._updateStatus();
  4371. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},smalltalk.Debugger)})},
  4372. args: ["aContext"],
  4373. 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",
  4374. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  4375. referencedClasses: []
  4376. }),
  4377. smalltalk.Debugger);
  4378. smalltalk.addMethod(
  4379. smalltalk.method({
  4380. selector: "selectVariable:named:",
  4381. category: 'actions',
  4382. fn: function (anObject,aString){
  4383. var self=this;
  4384. return smalltalk.withContext(function($ctx1) {
  4385. self["@selectedVariable"]=anObject;
  4386. self["@selectedVariableName"]=aString;
  4387. _st(self["@inspector"])._contents_((function(html){
  4388. return smalltalk.withContext(function($ctx2) {
  4389. return _st(html)._with_(_st(anObject)._printString());
  4390. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4391. self._updateVariablesList();
  4392. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},smalltalk.Debugger)})},
  4393. args: ["anObject", "aString"],
  4394. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [:html | html with: anObject printString].\x0a\x09self updateVariablesList",
  4395. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  4396. referencedClasses: []
  4397. }),
  4398. smalltalk.Debugger);
  4399. smalltalk.addMethod(
  4400. smalltalk.method({
  4401. selector: "source",
  4402. category: 'accessing',
  4403. fn: function (){
  4404. var self=this;
  4405. return smalltalk.withContext(function($ctx1) {
  4406. var $2,$3,$1;
  4407. $2=self._method();
  4408. $ctx1.sendIdx["method"]=1;
  4409. if(($receiver = $2) == nil || $receiver == null){
  4410. $1="Method doesn't exist!";
  4411. } else {
  4412. $3=self._method();
  4413. $1=_st($3)._source();
  4414. };
  4415. return $1;
  4416. }, function($ctx1) {$ctx1.fill(self,"source",{},smalltalk.Debugger)})},
  4417. args: [],
  4418. source: "source\x0a\x09^self method\x0a\x09\x09ifNil: ['Method doesn''t exist!']\x0a\x09\x09ifNotNil: [self method source]",
  4419. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  4420. referencedClasses: []
  4421. }),
  4422. smalltalk.Debugger);
  4423. smalltalk.addMethod(
  4424. smalltalk.method({
  4425. selector: "updateContextsList",
  4426. category: 'updating',
  4427. fn: function (){
  4428. var self=this;
  4429. return smalltalk.withContext(function($ctx1) {
  4430. _st(self["@ul"])._contents_((function(html){
  4431. return smalltalk.withContext(function($ctx2) {
  4432. return self._renderContext_on_(_st(self._error())._context(),html);
  4433. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4434. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},smalltalk.Debugger)})},
  4435. args: [],
  4436. source: "updateContextsList\x0a\x09ul contents: [:html |\x0a\x09\x09self renderContext: self error context on: html]",
  4437. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  4438. referencedClasses: []
  4439. }),
  4440. smalltalk.Debugger);
  4441. smalltalk.addMethod(
  4442. smalltalk.method({
  4443. selector: "updateInspector",
  4444. category: 'updating',
  4445. fn: function (){
  4446. var self=this;
  4447. return smalltalk.withContext(function($ctx1) {
  4448. _st(self["@inspector"])._contents_((function(html){
  4449. return smalltalk.withContext(function($ctx2) {
  4450. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4451. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},smalltalk.Debugger)})},
  4452. args: [],
  4453. source: "updateInspector\x0a\x09inspector contents: [:html |]",
  4454. messageSends: ["contents:"],
  4455. referencedClasses: []
  4456. }),
  4457. smalltalk.Debugger);
  4458. smalltalk.addMethod(
  4459. smalltalk.method({
  4460. selector: "updateSourceArea",
  4461. category: 'updating',
  4462. fn: function (){
  4463. var self=this;
  4464. return smalltalk.withContext(function($ctx1) {
  4465. _st(self["@sourceArea"])._val_(self._source());
  4466. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},smalltalk.Debugger)})},
  4467. args: [],
  4468. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  4469. messageSends: ["val:", "source"],
  4470. referencedClasses: []
  4471. }),
  4472. smalltalk.Debugger);
  4473. smalltalk.addMethod(
  4474. smalltalk.method({
  4475. selector: "updateStatus",
  4476. category: 'updating',
  4477. fn: function (){
  4478. var self=this;
  4479. return smalltalk.withContext(function($ctx1) {
  4480. var $1,$2,$3;
  4481. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  4482. if(smalltalk.assert($1)){
  4483. $2=self["@saveButton"];
  4484. if(($receiver = $2) == nil || $receiver == null){
  4485. $2;
  4486. } else {
  4487. _st(self["@saveButton"])._at_put_("disabled",true);
  4488. };
  4489. self["@unsavedChanges"]=false;
  4490. self["@unsavedChanges"];
  4491. } else {
  4492. $3=self["@saveButton"];
  4493. if(($receiver = $3) == nil || $receiver == null){
  4494. $3;
  4495. } else {
  4496. _st(self["@saveButton"])._removeAt_("disabled");
  4497. };
  4498. self["@unsavedChanges"]=true;
  4499. self["@unsavedChanges"];
  4500. };
  4501. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},smalltalk.Debugger)})},
  4502. args: [],
  4503. 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]",
  4504. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  4505. referencedClasses: []
  4506. }),
  4507. smalltalk.Debugger);
  4508. smalltalk.addMethod(
  4509. smalltalk.method({
  4510. selector: "updateVariablesList",
  4511. category: 'updating',
  4512. fn: function (){
  4513. var self=this;
  4514. return smalltalk.withContext(function($ctx1) {
  4515. var $1,$2,$3,$4,$5,$6,$7;
  4516. _st(self["@ul2"])._contents_((function(html){
  4517. var li;
  4518. return smalltalk.withContext(function($ctx2) {
  4519. $1=_st(html)._li();
  4520. $ctx2.sendIdx["li"]=1;
  4521. _st($1)._with_("self");
  4522. $ctx2.sendIdx["with:"]=1;
  4523. $2=_st($1)._onClick_((function(){
  4524. return smalltalk.withContext(function($ctx3) {
  4525. return self._selectVariable_named_(self._receiver(),"self");
  4526. $ctx3.sendIdx["selectVariable:named:"]=1;
  4527. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4528. $ctx2.sendIdx["onClick:"]=1;
  4529. li=$2;
  4530. li;
  4531. $3=_st(self["@selectedVariableName"]).__eq("self");
  4532. $ctx2.sendIdx["="]=1;
  4533. if(smalltalk.assert($3)){
  4534. _st(li)._class_("selected");
  4535. $ctx2.sendIdx["class:"]=1;
  4536. };
  4537. return _st(self._allVariables())._keysAndValuesDo_((function(key,value){
  4538. return smalltalk.withContext(function($ctx3) {
  4539. $4=_st(html)._li();
  4540. _st($4)._with_(key);
  4541. $5=_st($4)._onClick_((function(){
  4542. return smalltalk.withContext(function($ctx4) {
  4543. return self._selectVariable_named_(value,key);
  4544. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  4545. li=$5;
  4546. li;
  4547. $6=_st(self["@selectedVariableName"]).__eq(key);
  4548. if(smalltalk.assert($6)){
  4549. return _st(li)._class_("selected");
  4550. };
  4551. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)})}));
  4552. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  4553. $7=self["@selectedVariable"];
  4554. if(($receiver = $7) == nil || $receiver == null){
  4555. _st(self["@inspectButton"])._at_put_("disabled",true);
  4556. } else {
  4557. _st(self["@inspectButton"])._removeAt_("disabled");
  4558. };
  4559. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Debugger)})},
  4560. args: [],
  4561. 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' ]",
  4562. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  4563. referencedClasses: []
  4564. }),
  4565. smalltalk.Debugger);
  4566. smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
  4567. smalltalk.addMethod(
  4568. smalltalk.method({
  4569. selector: "clear",
  4570. category: 'actions',
  4571. fn: function (){
  4572. var self=this;
  4573. return smalltalk.withContext(function($ctx1) {
  4574. _st(_st(self["@textarea"])._asJQuery())._val_("");
  4575. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.IDETranscript)})},
  4576. args: [],
  4577. source: "clear\x0a\x09textarea asJQuery val: ''",
  4578. messageSends: ["val:", "asJQuery"],
  4579. referencedClasses: []
  4580. }),
  4581. smalltalk.IDETranscript);
  4582. smalltalk.addMethod(
  4583. smalltalk.method({
  4584. selector: "cr",
  4585. category: 'actions',
  4586. fn: function (){
  4587. var self=this;
  4588. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  4589. return smalltalk.withContext(function($ctx1) {
  4590. var $1,$4,$3,$2;
  4591. $1=_st(self["@textarea"])._asJQuery();
  4592. $ctx1.sendIdx["asJQuery"]=1;
  4593. $4=_st(self["@textarea"])._asJQuery();
  4594. $3=_st($4)._val();
  4595. $2=_st($3).__comma(_st($String())._cr());
  4596. _st($1)._val_($2);
  4597. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},smalltalk.IDETranscript)})},
  4598. args: [],
  4599. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  4600. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  4601. referencedClasses: ["String"]
  4602. }),
  4603. smalltalk.IDETranscript);
  4604. smalltalk.addMethod(
  4605. smalltalk.method({
  4606. selector: "label",
  4607. category: 'accessing',
  4608. fn: function (){
  4609. var self=this;
  4610. return smalltalk.withContext(function($ctx1) {
  4611. return "Transcript";
  4612. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.IDETranscript)})},
  4613. args: [],
  4614. source: "label\x0a\x09^'Transcript'",
  4615. messageSends: [],
  4616. referencedClasses: []
  4617. }),
  4618. smalltalk.IDETranscript);
  4619. smalltalk.addMethod(
  4620. smalltalk.method({
  4621. selector: "open",
  4622. category: 'actions',
  4623. fn: function (){
  4624. var self=this;
  4625. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  4626. return smalltalk.withContext(function($ctx1) {
  4627. var $1,$2;
  4628. $1=_st($TabManager())._current();
  4629. _st($1)._open();
  4630. $2=_st($1)._selectTab_(self);
  4631. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript)})},
  4632. args: [],
  4633. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  4634. messageSends: ["open", "current", "selectTab:"],
  4635. referencedClasses: ["TabManager"]
  4636. }),
  4637. smalltalk.IDETranscript);
  4638. smalltalk.addMethod(
  4639. smalltalk.method({
  4640. selector: "renderBoxOn:",
  4641. category: 'rendering',
  4642. fn: function (html){
  4643. var self=this;
  4644. return smalltalk.withContext(function($ctx1) {
  4645. var $1,$2;
  4646. self["@textarea"]=_st(html)._textarea();
  4647. $1=self["@textarea"];
  4648. _st($1)._class_("amber_transcript");
  4649. $2=_st($1)._at_put_("spellcheck","false");
  4650. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.IDETranscript)})},
  4651. args: ["html"],
  4652. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  4653. messageSends: ["textarea", "class:", "at:put:"],
  4654. referencedClasses: []
  4655. }),
  4656. smalltalk.IDETranscript);
  4657. smalltalk.addMethod(
  4658. smalltalk.method({
  4659. selector: "renderButtonsOn:",
  4660. category: 'rendering',
  4661. fn: function (html){
  4662. var self=this;
  4663. return smalltalk.withContext(function($ctx1) {
  4664. var $1,$2;
  4665. $1=_st(html)._button();
  4666. _st($1)._with_("Clear transcript");
  4667. $2=_st($1)._onClick_((function(){
  4668. return smalltalk.withContext(function($ctx2) {
  4669. return self._clear();
  4670. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4671. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.IDETranscript)})},
  4672. args: ["html"],
  4673. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [self clear]",
  4674. messageSends: ["with:", "button", "onClick:", "clear"],
  4675. referencedClasses: []
  4676. }),
  4677. smalltalk.IDETranscript);
  4678. smalltalk.addMethod(
  4679. smalltalk.method({
  4680. selector: "show:",
  4681. category: 'actions',
  4682. fn: function (anObject){
  4683. var self=this;
  4684. return smalltalk.withContext(function($ctx1) {
  4685. var $1,$2,$5,$4,$3;
  4686. $1=self["@textarea"];
  4687. if(($receiver = $1) == nil || $receiver == null){
  4688. self._open();
  4689. } else {
  4690. $1;
  4691. };
  4692. $2=_st(self["@textarea"])._asJQuery();
  4693. $ctx1.sendIdx["asJQuery"]=1;
  4694. $5=_st(self["@textarea"])._asJQuery();
  4695. $4=_st($5)._val();
  4696. $3=_st($4).__comma(_st(anObject)._asString());
  4697. _st($2)._val_($3);
  4698. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},smalltalk.IDETranscript)})},
  4699. args: ["anObject"],
  4700. source: "show: anObject\x0a\x09textarea ifNil: [self open].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  4701. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  4702. referencedClasses: []
  4703. }),
  4704. smalltalk.IDETranscript);
  4705. smalltalk.IDETranscript.klass.iVarNames = ['current'];
  4706. smalltalk.addMethod(
  4707. smalltalk.method({
  4708. selector: "current",
  4709. category: 'instance creation',
  4710. fn: function (){
  4711. var self=this;
  4712. return smalltalk.withContext(function($ctx1) {
  4713. var $2,$1;
  4714. $2=self["@current"];
  4715. if(($receiver = $2) == nil || $receiver == null){
  4716. self["@current"]=smalltalk.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
  4717. $1=self["@current"];
  4718. } else {
  4719. $1=$2;
  4720. };
  4721. return $1;
  4722. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.IDETranscript.klass)})},
  4723. args: [],
  4724. source: "current\x0a\x09^current ifNil: [current := super new]",
  4725. messageSends: ["ifNil:", "new"],
  4726. referencedClasses: []
  4727. }),
  4728. smalltalk.IDETranscript.klass);
  4729. smalltalk.addMethod(
  4730. smalltalk.method({
  4731. selector: "initialize",
  4732. category: 'initialization',
  4733. fn: function (){
  4734. var self=this;
  4735. function $Transcript(){return smalltalk.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  4736. return smalltalk.withContext(function($ctx1) {
  4737. _st($Transcript())._register_(self._current());
  4738. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.IDETranscript.klass)})},
  4739. args: [],
  4740. source: "initialize\x0a\x09Transcript register: self current",
  4741. messageSends: ["register:", "current"],
  4742. referencedClasses: ["Transcript"]
  4743. }),
  4744. smalltalk.IDETranscript.klass);
  4745. smalltalk.addMethod(
  4746. smalltalk.method({
  4747. selector: "new",
  4748. category: 'instance creation',
  4749. fn: function (){
  4750. var self=this;
  4751. return smalltalk.withContext(function($ctx1) {
  4752. self._shouldNotImplement();
  4753. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.IDETranscript.klass)})},
  4754. args: [],
  4755. source: "new\x0a\x09self shouldNotImplement",
  4756. messageSends: ["shouldNotImplement"],
  4757. referencedClasses: []
  4758. }),
  4759. smalltalk.IDETranscript.klass);
  4760. smalltalk.addMethod(
  4761. smalltalk.method({
  4762. selector: "open",
  4763. category: 'instance creation',
  4764. fn: function (){
  4765. var self=this;
  4766. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  4767. return smalltalk.withContext(function($ctx1) {
  4768. var $1,$3,$4,$2;
  4769. $1=_st($TabManager())._current();
  4770. $ctx1.sendIdx["current"]=1;
  4771. _st($1)._open();
  4772. $3=$1;
  4773. $4=self._current();
  4774. $2=_st($3)._selectTab_($4);
  4775. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.IDETranscript.klass)})},
  4776. args: [],
  4777. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self current",
  4778. messageSends: ["open", "current", "selectTab:"],
  4779. referencedClasses: ["TabManager"]
  4780. }),
  4781. smalltalk.IDETranscript.klass);
  4782. smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  4783. smalltalk.addMethod(
  4784. smalltalk.method({
  4785. selector: "canBeClosed",
  4786. category: 'testing',
  4787. fn: function (){
  4788. var self=this;
  4789. return smalltalk.withContext(function($ctx1) {
  4790. return true;
  4791. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Inspector)})},
  4792. args: [],
  4793. source: "canBeClosed\x0a\x09^true",
  4794. messageSends: [],
  4795. referencedClasses: []
  4796. }),
  4797. smalltalk.Inspector);
  4798. smalltalk.addMethod(
  4799. smalltalk.method({
  4800. selector: "dive",
  4801. category: 'actions',
  4802. fn: function (){
  4803. var self=this;
  4804. return smalltalk.withContext(function($ctx1) {
  4805. _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
  4806. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},smalltalk.Inspector)})},
  4807. args: [],
  4808. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  4809. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  4810. referencedClasses: []
  4811. }),
  4812. smalltalk.Inspector);
  4813. smalltalk.addMethod(
  4814. smalltalk.method({
  4815. selector: "inspect:",
  4816. category: 'actions',
  4817. fn: function (anObject){
  4818. var self=this;
  4819. return smalltalk.withContext(function($ctx1) {
  4820. self["@object"]=anObject;
  4821. self["@variables"]=[];
  4822. _st(self["@object"])._inspectOn_(self);
  4823. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector)})},
  4824. args: ["anObject"],
  4825. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  4826. messageSends: ["inspectOn:"],
  4827. referencedClasses: []
  4828. }),
  4829. smalltalk.Inspector);
  4830. smalltalk.addMethod(
  4831. smalltalk.method({
  4832. selector: "label",
  4833. category: 'accessing',
  4834. fn: function (){
  4835. var self=this;
  4836. return smalltalk.withContext(function($ctx1) {
  4837. var $2,$1;
  4838. $2=self["@label"];
  4839. if(($receiver = $2) == nil || $receiver == null){
  4840. $1="Inspector (nil)";
  4841. } else {
  4842. $1=$2;
  4843. };
  4844. return $1;
  4845. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Inspector)})},
  4846. args: [],
  4847. source: "label\x0a\x09^label ifNil: ['Inspector (nil)']",
  4848. messageSends: ["ifNil:"],
  4849. referencedClasses: []
  4850. }),
  4851. smalltalk.Inspector);
  4852. smalltalk.addMethod(
  4853. smalltalk.method({
  4854. selector: "refresh",
  4855. category: 'actions',
  4856. fn: function (){
  4857. var self=this;
  4858. return smalltalk.withContext(function($ctx1) {
  4859. var $1;
  4860. self._inspect_(self["@object"]);
  4861. self._updateVariablesList();
  4862. $1=self._updateValueTextarea();
  4863. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},smalltalk.Inspector)})},
  4864. args: [],
  4865. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  4866. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  4867. referencedClasses: []
  4868. }),
  4869. smalltalk.Inspector);
  4870. smalltalk.addMethod(
  4871. smalltalk.method({
  4872. selector: "renderBottomPanelOn:",
  4873. category: 'rendering',
  4874. fn: function (html){
  4875. var self=this;
  4876. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4877. return smalltalk.withContext(function($ctx1) {
  4878. var $1,$3,$4,$2;
  4879. $1=_st(html)._div();
  4880. _st($1)._class_("amber_sourceCode");
  4881. $2=_st($1)._with_((function(){
  4882. return smalltalk.withContext(function($ctx2) {
  4883. $3=_st($SourceArea())._new();
  4884. _st($3)._receiver_(self["@object"]);
  4885. _st($3)._onDoIt_((function(){
  4886. return smalltalk.withContext(function($ctx3) {
  4887. return self._refresh();
  4888. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4889. $4=_st($3)._yourself();
  4890. self["@sourceArea"]=$4;
  4891. self["@sourceArea"];
  4892. return _st(self["@sourceArea"])._renderOn_(html);
  4893. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4894. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},smalltalk.Inspector)})},
  4895. args: ["html"],
  4896. 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]",
  4897. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
  4898. referencedClasses: ["SourceArea"]
  4899. }),
  4900. smalltalk.Inspector);
  4901. smalltalk.addMethod(
  4902. smalltalk.method({
  4903. selector: "renderBoxOn:",
  4904. category: 'rendering',
  4905. fn: function (html){
  4906. var self=this;
  4907. return smalltalk.withContext(function($ctx1) {
  4908. var $1;
  4909. self._renderTopPanelOn_(html);
  4910. $1=self._renderBottomPanelOn_(html);
  4911. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Inspector)})},
  4912. args: ["html"],
  4913. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4914. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4915. referencedClasses: []
  4916. }),
  4917. smalltalk.Inspector);
  4918. smalltalk.addMethod(
  4919. smalltalk.method({
  4920. selector: "renderButtonsOn:",
  4921. category: 'rendering',
  4922. fn: function (html){
  4923. var self=this;
  4924. return smalltalk.withContext(function($ctx1) {
  4925. var $1,$3,$2,$4,$6,$5,$7,$9,$8;
  4926. $1=_st(html)._button();
  4927. $ctx1.sendIdx["button"]=1;
  4928. _st($1)._with_("DoIt");
  4929. $ctx1.sendIdx["with:"]=1;
  4930. $2=_st($1)._onClick_((function(){
  4931. return smalltalk.withContext(function($ctx2) {
  4932. $3=self._sourceArea();
  4933. $ctx2.sendIdx["sourceArea"]=1;
  4934. return _st($3)._doIt();
  4935. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4936. $ctx1.sendIdx["onClick:"]=1;
  4937. $4=_st(html)._button();
  4938. $ctx1.sendIdx["button"]=2;
  4939. _st($4)._with_("PrintIt");
  4940. $ctx1.sendIdx["with:"]=2;
  4941. $5=_st($4)._onClick_((function(){
  4942. return smalltalk.withContext(function($ctx2) {
  4943. $6=self._sourceArea();
  4944. $ctx2.sendIdx["sourceArea"]=2;
  4945. return _st($6)._printIt();
  4946. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4947. $ctx1.sendIdx["onClick:"]=2;
  4948. $7=_st(html)._button();
  4949. _st($7)._with_("InspectIt");
  4950. $8=_st($7)._onClick_((function(){
  4951. return smalltalk.withContext(function($ctx2) {
  4952. $9=self._sourceArea();
  4953. return _st($9)._inspectIt();
  4954. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4955. self._updateButtons();
  4956. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Inspector)})},
  4957. args: ["html"],
  4958. 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",
  4959. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
  4960. referencedClasses: []
  4961. }),
  4962. smalltalk.Inspector);
  4963. smalltalk.addMethod(
  4964. smalltalk.method({
  4965. selector: "renderTopPanelOn:",
  4966. category: 'rendering',
  4967. fn: function (html){
  4968. var self=this;
  4969. return smalltalk.withContext(function($ctx1) {
  4970. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$11,$2,$12;
  4971. $1=_st(html)._div();
  4972. $ctx1.sendIdx["div"]=1;
  4973. _st($1)._class_("top");
  4974. $ctx1.sendIdx["class:"]=1;
  4975. $2=_st($1)._with_((function(){
  4976. return smalltalk.withContext(function($ctx2) {
  4977. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  4978. $ctx2.sendIdx["class:"]=2;
  4979. self["@variablesList"];
  4980. $3=_st(html)._textarea();
  4981. _st($3)._class_("amber_column value");
  4982. $ctx2.sendIdx["class:"]=3;
  4983. $4=_st($3)._at_put_("readonly","readonly");
  4984. self["@valueTextarea"]=$4;
  4985. self["@valueTextarea"];
  4986. $5=_st(html)._div();
  4987. $ctx2.sendIdx["div"]=2;
  4988. _st($5)._class_("amber_tabs inspector");
  4989. $ctx2.sendIdx["class:"]=4;
  4990. $6=_st($5)._with_((function(){
  4991. return smalltalk.withContext(function($ctx3) {
  4992. $7=_st(html)._button();
  4993. $ctx3.sendIdx["button"]=1;
  4994. _st($7)._class_("amber_button inspector refresh");
  4995. $ctx3.sendIdx["class:"]=5;
  4996. _st($7)._with_("Refresh");
  4997. $ctx3.sendIdx["with:"]=3;
  4998. $8=_st($7)._onClick_((function(){
  4999. return smalltalk.withContext(function($ctx4) {
  5000. return self._refresh();
  5001. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5002. $ctx3.sendIdx["onClick:"]=1;
  5003. $8;
  5004. $9=_st(html)._button();
  5005. _st($9)._class_("amber_button inspector dive");
  5006. $ctx3.sendIdx["class:"]=6;
  5007. _st($9)._with_("Dive");
  5008. $10=_st($9)._onClick_((function(){
  5009. return smalltalk.withContext(function($ctx4) {
  5010. return self._dive();
  5011. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  5012. self["@diveButton"]=$10;
  5013. return self["@diveButton"];
  5014. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  5015. $ctx2.sendIdx["with:"]=2;
  5016. $6;
  5017. $11=_st(html)._div();
  5018. return _st($11)._class_("amber_clear");
  5019. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5020. $ctx1.sendIdx["with:"]=1;
  5021. self._updateVariablesList();
  5022. $12=self._updateValueTextarea();
  5023. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Inspector)})},
  5024. args: ["html"],
  5025. 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'.\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.",
  5026. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  5027. referencedClasses: []
  5028. }),
  5029. smalltalk.Inspector);
  5030. smalltalk.addMethod(
  5031. smalltalk.method({
  5032. selector: "selectVariable:",
  5033. category: 'updating',
  5034. fn: function (aString){
  5035. var self=this;
  5036. return smalltalk.withContext(function($ctx1) {
  5037. var $1;
  5038. self._selectedVariable_(aString);
  5039. self._updateVariablesList();
  5040. self._updateValueTextarea();
  5041. $1=self._updateButtons();
  5042. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},smalltalk.Inspector)})},
  5043. args: ["aString"],
  5044. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  5045. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  5046. referencedClasses: []
  5047. }),
  5048. smalltalk.Inspector);
  5049. smalltalk.addMethod(
  5050. smalltalk.method({
  5051. selector: "selectedVariable",
  5052. category: 'accessing',
  5053. fn: function (){
  5054. var self=this;
  5055. return smalltalk.withContext(function($ctx1) {
  5056. var $1;
  5057. $1=self["@selectedVariable"];
  5058. return $1;
  5059. }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{},smalltalk.Inspector)})},
  5060. args: [],
  5061. source: "selectedVariable\x0a\x09^selectedVariable",
  5062. messageSends: [],
  5063. referencedClasses: []
  5064. }),
  5065. smalltalk.Inspector);
  5066. smalltalk.addMethod(
  5067. smalltalk.method({
  5068. selector: "selectedVariable:",
  5069. category: 'accessing',
  5070. fn: function (aString){
  5071. var self=this;
  5072. return smalltalk.withContext(function($ctx1) {
  5073. self["@selectedVariable"]=aString;
  5074. return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString},smalltalk.Inspector)})},
  5075. args: ["aString"],
  5076. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  5077. messageSends: [],
  5078. referencedClasses: []
  5079. }),
  5080. smalltalk.Inspector);
  5081. smalltalk.addMethod(
  5082. smalltalk.method({
  5083. selector: "setLabel:",
  5084. category: 'accessing',
  5085. fn: function (aString){
  5086. var self=this;
  5087. return smalltalk.withContext(function($ctx1) {
  5088. self["@label"]=aString;
  5089. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.Inspector)})},
  5090. args: ["aString"],
  5091. source: "setLabel: aString\x0a\x09label := aString",
  5092. messageSends: [],
  5093. referencedClasses: []
  5094. }),
  5095. smalltalk.Inspector);
  5096. smalltalk.addMethod(
  5097. smalltalk.method({
  5098. selector: "setVariables:",
  5099. category: 'accessing',
  5100. fn: function (aCollection){
  5101. var self=this;
  5102. return smalltalk.withContext(function($ctx1) {
  5103. self["@variables"]=aCollection;
  5104. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection},smalltalk.Inspector)})},
  5105. args: ["aCollection"],
  5106. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  5107. messageSends: [],
  5108. referencedClasses: []
  5109. }),
  5110. smalltalk.Inspector);
  5111. smalltalk.addMethod(
  5112. smalltalk.method({
  5113. selector: "sourceArea",
  5114. category: 'accessing',
  5115. fn: function (){
  5116. var self=this;
  5117. return smalltalk.withContext(function($ctx1) {
  5118. var $1;
  5119. $1=self["@sourceArea"];
  5120. return $1;
  5121. }, function($ctx1) {$ctx1.fill(self,"sourceArea",{},smalltalk.Inspector)})},
  5122. args: [],
  5123. source: "sourceArea\x0a\x09^sourceArea",
  5124. messageSends: [],
  5125. referencedClasses: []
  5126. }),
  5127. smalltalk.Inspector);
  5128. smalltalk.addMethod(
  5129. smalltalk.method({
  5130. selector: "updateButtons",
  5131. category: 'updating',
  5132. fn: function (){
  5133. var self=this;
  5134. return smalltalk.withContext(function($ctx1) {
  5135. var $3,$2,$5,$6,$4,$1;
  5136. $3=self._selectedVariable();
  5137. $ctx1.sendIdx["selectedVariable"]=1;
  5138. $2=_st($3)._notNil();
  5139. $ctx1.sendIdx["notNil"]=1;
  5140. $1=_st($2)._and_((function(){
  5141. return smalltalk.withContext(function($ctx2) {
  5142. $5=self._variables();
  5143. $6=self._selectedVariable();
  5144. $4=_st($5)._at_($6);
  5145. return _st($4)._notNil();
  5146. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5147. if(smalltalk.assert($1)){
  5148. _st(self["@diveButton"])._removeAt_("disabled");
  5149. } else {
  5150. _st(self["@diveButton"])._at_put_("disabled",true);
  5151. };
  5152. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},smalltalk.Inspector)})},
  5153. args: [],
  5154. 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']",
  5155. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  5156. referencedClasses: []
  5157. }),
  5158. smalltalk.Inspector);
  5159. smalltalk.addMethod(
  5160. smalltalk.method({
  5161. selector: "updateValueTextarea",
  5162. category: 'updating',
  5163. fn: function (){
  5164. var self=this;
  5165. return smalltalk.withContext(function($ctx1) {
  5166. var $1,$4,$3,$6,$7,$5,$2;
  5167. $1=_st(self["@valueTextarea"])._asJQuery();
  5168. $4=self._selectedVariable();
  5169. $ctx1.sendIdx["selectedVariable"]=1;
  5170. $3=_st($4)._isNil();
  5171. if(smalltalk.assert($3)){
  5172. $2="";
  5173. } else {
  5174. $6=self._variables();
  5175. $7=self._selectedVariable();
  5176. $5=_st($6)._at_($7);
  5177. $2=_st($5)._printString();
  5178. };
  5179. _st($1)._val_($2);
  5180. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},smalltalk.Inspector)})},
  5181. args: [],
  5182. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: ['']\x0a\x09\x09ifFalse: [(self variables at: self selectedVariable) printString])",
  5183. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  5184. referencedClasses: []
  5185. }),
  5186. smalltalk.Inspector);
  5187. smalltalk.addMethod(
  5188. smalltalk.method({
  5189. selector: "updateVariablesList",
  5190. category: 'updating',
  5191. fn: function (){
  5192. var self=this;
  5193. return smalltalk.withContext(function($ctx1) {
  5194. var $1,$2,$3;
  5195. _st(self["@variablesList"])._contents_((function(html){
  5196. return smalltalk.withContext(function($ctx2) {
  5197. return _st(_st(self._variables())._keys())._do_((function(each){
  5198. var li;
  5199. return smalltalk.withContext(function($ctx3) {
  5200. li=_st(html)._li();
  5201. li;
  5202. $1=li;
  5203. _st($1)._with_(each);
  5204. $2=_st($1)._onClick_((function(){
  5205. return smalltalk.withContext(function($ctx4) {
  5206. return self._selectVariable_(each);
  5207. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5208. $2;
  5209. $3=_st(self._selectedVariable()).__eq(each);
  5210. if(smalltalk.assert($3)){
  5211. return _st(li)._class_("selected");
  5212. };
  5213. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5214. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5215. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Inspector)})},
  5216. args: [],
  5217. source: "updateVariablesList\x0a\x09variablesList contents: [:html |\x0a\x09\x09self variables keys do: [: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']]]",
  5218. messageSends: ["contents:", "do:", "keys", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  5219. referencedClasses: []
  5220. }),
  5221. smalltalk.Inspector);
  5222. smalltalk.addMethod(
  5223. smalltalk.method({
  5224. selector: "variables",
  5225. category: 'accessing',
  5226. fn: function (){
  5227. var self=this;
  5228. return smalltalk.withContext(function($ctx1) {
  5229. var $1;
  5230. $1=self["@variables"];
  5231. return $1;
  5232. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.Inspector)})},
  5233. args: [],
  5234. source: "variables\x0a\x09^variables",
  5235. messageSends: [],
  5236. referencedClasses: []
  5237. }),
  5238. smalltalk.Inspector);
  5239. smalltalk.addMethod(
  5240. smalltalk.method({
  5241. selector: "inspect:",
  5242. category: 'instance creation',
  5243. fn: function (anObject){
  5244. var self=this;
  5245. return smalltalk.withContext(function($ctx1) {
  5246. var $2,$3,$1;
  5247. $2=self._new();
  5248. _st($2)._inspect_(anObject);
  5249. _st($2)._open();
  5250. $3=_st($2)._yourself();
  5251. $1=$3;
  5252. return $1;
  5253. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
  5254. args: ["anObject"],
  5255. source: "inspect: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  5256. messageSends: ["inspect:", "new", "open", "yourself"],
  5257. referencedClasses: []
  5258. }),
  5259. smalltalk.Inspector.klass);
  5260. smalltalk.addMethod(
  5261. smalltalk.method({
  5262. selector: "on:",
  5263. category: 'instance creation',
  5264. fn: function (anObject){
  5265. var self=this;
  5266. return smalltalk.withContext(function($ctx1) {
  5267. var $2,$3,$1;
  5268. $2=self._new();
  5269. _st($2)._inspect_(anObject);
  5270. $3=_st($2)._yourself();
  5271. $1=$3;
  5272. return $1;
  5273. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Inspector.klass)})},
  5274. args: ["anObject"],
  5275. source: "on: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  5276. messageSends: ["inspect:", "new", "yourself"],
  5277. referencedClasses: []
  5278. }),
  5279. smalltalk.Inspector.klass);
  5280. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5281. smalltalk.addMethod(
  5282. smalltalk.method({
  5283. selector: "percent",
  5284. category: 'accessing',
  5285. fn: function (){
  5286. var self=this;
  5287. return smalltalk.withContext(function($ctx1) {
  5288. var $2,$1;
  5289. $2=self["@percent"];
  5290. if(($receiver = $2) == nil || $receiver == null){
  5291. $1=(0);
  5292. } else {
  5293. $1=$2;
  5294. };
  5295. return $1;
  5296. }, function($ctx1) {$ctx1.fill(self,"percent",{},smalltalk.ProgressBar)})},
  5297. args: [],
  5298. source: "percent\x0a\x09^percent ifNil: [0]",
  5299. messageSends: ["ifNil:"],
  5300. referencedClasses: []
  5301. }),
  5302. smalltalk.ProgressBar);
  5303. smalltalk.addMethod(
  5304. smalltalk.method({
  5305. selector: "percent:",
  5306. category: 'accessing',
  5307. fn: function (aNumber){
  5308. var self=this;
  5309. return smalltalk.withContext(function($ctx1) {
  5310. self["@percent"]=aNumber;
  5311. return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
  5312. args: ["aNumber"],
  5313. source: "percent: aNumber\x0a\x09percent := aNumber",
  5314. messageSends: [],
  5315. referencedClasses: []
  5316. }),
  5317. smalltalk.ProgressBar);
  5318. smalltalk.addMethod(
  5319. smalltalk.method({
  5320. selector: "renderOn:",
  5321. category: 'rendering',
  5322. fn: function (html){
  5323. var self=this;
  5324. return smalltalk.withContext(function($ctx1) {
  5325. var $1,$2;
  5326. $1=_st(html)._div();
  5327. _st($1)._class_("progress_bar");
  5328. $2=_st($1)._yourself();
  5329. self["@div"]=$2;
  5330. self._renderProgressBar();
  5331. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.ProgressBar)})},
  5332. args: ["html"],
  5333. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5334. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5335. referencedClasses: []
  5336. }),
  5337. smalltalk.ProgressBar);
  5338. smalltalk.addMethod(
  5339. smalltalk.method({
  5340. selector: "renderProgressBar",
  5341. category: 'rendering',
  5342. fn: function (){
  5343. var self=this;
  5344. return smalltalk.withContext(function($ctx1) {
  5345. var $1,$3,$5,$4,$2;
  5346. _st(self["@div"])._contents_((function(html){
  5347. return smalltalk.withContext(function($ctx2) {
  5348. $1=_st(html)._div();
  5349. _st($1)._class_("progress");
  5350. $3=$1;
  5351. $5="width:".__comma(_st(self._percent())._asString());
  5352. $4=_st($5).__comma("%");
  5353. $ctx2.sendIdx[","]=1;
  5354. $2=_st($3)._style_($4);
  5355. return $2;
  5356. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5357. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},smalltalk.ProgressBar)})},
  5358. args: [],
  5359. source: "renderProgressBar\x0a\x09div contents: [:html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%']",
  5360. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5361. referencedClasses: []
  5362. }),
  5363. smalltalk.ProgressBar);
  5364. smalltalk.addMethod(
  5365. smalltalk.method({
  5366. selector: "updatePercent:",
  5367. category: 'updating',
  5368. fn: function (aNumber){
  5369. var self=this;
  5370. return smalltalk.withContext(function($ctx1) {
  5371. self._percent_(aNumber);
  5372. self._renderProgressBar();
  5373. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
  5374. args: ["aNumber"],
  5375. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5376. messageSends: ["percent:", "renderProgressBar"],
  5377. referencedClasses: []
  5378. }),
  5379. smalltalk.ProgressBar);
  5380. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5381. smalltalk.addMethod(
  5382. smalltalk.method({
  5383. selector: "canBeClosed",
  5384. category: 'testing',
  5385. fn: function (){
  5386. var self=this;
  5387. return smalltalk.withContext(function($ctx1) {
  5388. return true;
  5389. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.ReferencesBrowser)})},
  5390. args: [],
  5391. source: "canBeClosed\x0a\x09^true",
  5392. messageSends: [],
  5393. referencedClasses: []
  5394. }),
  5395. smalltalk.ReferencesBrowser);
  5396. smalltalk.addMethod(
  5397. smalltalk.method({
  5398. selector: "classesAndMetaclasses",
  5399. category: 'accessing',
  5400. fn: function (){
  5401. var self=this;
  5402. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5403. return smalltalk.withContext(function($ctx1) {
  5404. var $3,$2,$6,$5,$4,$1;
  5405. $3=_st($Smalltalk())._current();
  5406. $ctx1.sendIdx["current"]=1;
  5407. $2=_st($3)._classes();
  5408. $ctx1.sendIdx["classes"]=1;
  5409. $6=_st($Smalltalk())._current();
  5410. $5=_st($6)._classes();
  5411. $4=_st($5)._collect_((function(each){
  5412. return smalltalk.withContext(function($ctx2) {
  5413. return _st(each)._class();
  5414. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5415. $1=_st($2).__comma($4);
  5416. return $1;
  5417. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.ReferencesBrowser)})},
  5418. args: [],
  5419. source: "classesAndMetaclasses\x0a\x09^Smalltalk current classes, (Smalltalk current classes collect: [:each | each class])",
  5420. messageSends: [",", "classes", "current", "collect:", "class"],
  5421. referencedClasses: ["Smalltalk"]
  5422. }),
  5423. smalltalk.ReferencesBrowser);
  5424. smalltalk.addMethod(
  5425. smalltalk.method({
  5426. selector: "implementors",
  5427. category: 'accessing',
  5428. fn: function (){
  5429. var self=this;
  5430. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5431. return smalltalk.withContext(function($ctx1) {
  5432. var $2,$1;
  5433. $2=self["@implementors"];
  5434. if(($receiver = $2) == nil || $receiver == null){
  5435. self["@implementors"]=_st($Array())._new();
  5436. $1=self["@implementors"];
  5437. } else {
  5438. $1=$2;
  5439. };
  5440. return $1;
  5441. }, function($ctx1) {$ctx1.fill(self,"implementors",{},smalltalk.ReferencesBrowser)})},
  5442. args: [],
  5443. source: "implementors\x0a\x09^implementors ifNil: [implementors := Array new]",
  5444. messageSends: ["ifNil:", "new"],
  5445. referencedClasses: ["Array"]
  5446. }),
  5447. smalltalk.ReferencesBrowser);
  5448. smalltalk.addMethod(
  5449. smalltalk.method({
  5450. selector: "initialize",
  5451. category: 'initialization',
  5452. fn: function (){
  5453. var self=this;
  5454. return smalltalk.withContext(function($ctx1) {
  5455. smalltalk.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []);
  5456. self["@selector"]="";
  5457. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ReferencesBrowser)})},
  5458. args: [],
  5459. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  5460. messageSends: ["initialize"],
  5461. referencedClasses: []
  5462. }),
  5463. smalltalk.ReferencesBrowser);
  5464. smalltalk.addMethod(
  5465. smalltalk.method({
  5466. selector: "label",
  5467. category: 'accessing',
  5468. fn: function (){
  5469. var self=this;
  5470. return smalltalk.withContext(function($ctx1) {
  5471. return "[References]";
  5472. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.ReferencesBrowser)})},
  5473. args: [],
  5474. source: "label\x0a\x09^'[References]'",
  5475. messageSends: [],
  5476. referencedClasses: []
  5477. }),
  5478. smalltalk.ReferencesBrowser);
  5479. smalltalk.addMethod(
  5480. smalltalk.method({
  5481. selector: "matches",
  5482. category: 'accessing',
  5483. fn: function (){
  5484. var self=this;
  5485. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5486. return smalltalk.withContext(function($ctx1) {
  5487. var $2,$1;
  5488. $2=self["@matches"];
  5489. if(($receiver = $2) == nil || $receiver == null){
  5490. self["@matches"]=_st($Array())._new();
  5491. $1=self["@matches"];
  5492. } else {
  5493. $1=$2;
  5494. };
  5495. return $1;
  5496. }, function($ctx1) {$ctx1.fill(self,"matches",{},smalltalk.ReferencesBrowser)})},
  5497. args: [],
  5498. source: "matches\x0a\x09^matches ifNil: [matches := Array new]",
  5499. messageSends: ["ifNil:", "new"],
  5500. referencedClasses: ["Array"]
  5501. }),
  5502. smalltalk.ReferencesBrowser);
  5503. smalltalk.addMethod(
  5504. smalltalk.method({
  5505. selector: "openBrowserOn:",
  5506. category: 'actions',
  5507. fn: function (aMethod){
  5508. var self=this;
  5509. var browser;
  5510. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  5511. return smalltalk.withContext(function($ctx1) {
  5512. var $3,$2,$4,$1,$6,$5,$7,$8;
  5513. $3=_st(aMethod)._methodClass();
  5514. $ctx1.sendIdx["methodClass"]=1;
  5515. $2=_st($3)._isMetaclass();
  5516. $ctx1.sendIdx["isMetaclass"]=1;
  5517. if(smalltalk.assert($2)){
  5518. $4=_st(aMethod)._methodClass();
  5519. $ctx1.sendIdx["methodClass"]=2;
  5520. $1=_st($4)._instanceClass();
  5521. } else {
  5522. $1=_st(aMethod)._methodClass();
  5523. $ctx1.sendIdx["methodClass"]=3;
  5524. };
  5525. browser=_st($Browser())._openOn_($1);
  5526. $6=_st(aMethod)._methodClass();
  5527. $5=_st($6)._isMetaclass();
  5528. if(smalltalk.assert($5)){
  5529. _st(browser)._selectTab_("class");
  5530. };
  5531. $7=browser;
  5532. _st($7)._selectProtocol_(_st(aMethod)._category());
  5533. $8=_st($7)._selectMethod_(aMethod);
  5534. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},smalltalk.ReferencesBrowser)})},
  5535. args: ["aMethod"],
  5536. 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",
  5537. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  5538. referencedClasses: ["Browser"]
  5539. }),
  5540. smalltalk.ReferencesBrowser);
  5541. smalltalk.addMethod(
  5542. smalltalk.method({
  5543. selector: "referencedClasses",
  5544. category: 'accessing',
  5545. fn: function (){
  5546. var self=this;
  5547. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5548. return smalltalk.withContext(function($ctx1) {
  5549. var $2,$1;
  5550. $2=self["@referencedClasses"];
  5551. if(($receiver = $2) == nil || $receiver == null){
  5552. self["@referencedClasses"]=_st($Array())._new();
  5553. $1=self["@referencedClasses"];
  5554. } else {
  5555. $1=$2;
  5556. };
  5557. return $1;
  5558. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},smalltalk.ReferencesBrowser)})},
  5559. args: [],
  5560. source: "referencedClasses\x0a\x09^referencedClasses ifNil: [referencedClasses := Array new]",
  5561. messageSends: ["ifNil:", "new"],
  5562. referencedClasses: ["Array"]
  5563. }),
  5564. smalltalk.ReferencesBrowser);
  5565. smalltalk.addMethod(
  5566. smalltalk.method({
  5567. selector: "renderBoxOn:",
  5568. category: 'rendering',
  5569. fn: function (html){
  5570. var self=this;
  5571. return smalltalk.withContext(function($ctx1) {
  5572. var $1;
  5573. self._renderInputOn_(html);
  5574. self._renderImplementorsOn_(html);
  5575. self._renderSendersOn_(html);
  5576. self._renderReferencedClassesOn_(html);
  5577. $1=self._renderMatchesOn_(html);
  5578. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5579. args: ["html"],
  5580. 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",
  5581. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  5582. referencedClasses: []
  5583. }),
  5584. smalltalk.ReferencesBrowser);
  5585. smalltalk.addMethod(
  5586. smalltalk.method({
  5587. selector: "renderImplementorsOn:",
  5588. category: 'rendering',
  5589. fn: function (html){
  5590. var self=this;
  5591. return smalltalk.withContext(function($ctx1) {
  5592. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  5593. self._updateImplementorsList();
  5594. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5595. args: ["html"],
  5596. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  5597. messageSends: ["class:", "ul", "updateImplementorsList"],
  5598. referencedClasses: []
  5599. }),
  5600. smalltalk.ReferencesBrowser);
  5601. smalltalk.addMethod(
  5602. smalltalk.method({
  5603. selector: "renderInputOn:",
  5604. category: 'rendering',
  5605. fn: function (html){
  5606. var self=this;
  5607. return smalltalk.withContext(function($ctx1) {
  5608. var $1,$2;
  5609. $1=_st(html)._input();
  5610. _st($1)._class_("implementors");
  5611. $2=_st($1)._yourself();
  5612. self["@input"]=$2;
  5613. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  5614. self._setInputEvents();
  5615. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5616. args: ["html"],
  5617. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  5618. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
  5619. referencedClasses: []
  5620. }),
  5621. smalltalk.ReferencesBrowser);
  5622. smalltalk.addMethod(
  5623. smalltalk.method({
  5624. selector: "renderMatchesOn:",
  5625. category: 'rendering',
  5626. fn: function (html){
  5627. var self=this;
  5628. return smalltalk.withContext(function($ctx1) {
  5629. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  5630. self._updateMatchesList();
  5631. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5632. args: ["html"],
  5633. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  5634. messageSends: ["class:", "ul", "updateMatchesList"],
  5635. referencedClasses: []
  5636. }),
  5637. smalltalk.ReferencesBrowser);
  5638. smalltalk.addMethod(
  5639. smalltalk.method({
  5640. selector: "renderReferencedClassesOn:",
  5641. category: 'rendering',
  5642. fn: function (html){
  5643. var self=this;
  5644. return smalltalk.withContext(function($ctx1) {
  5645. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  5646. self._updateReferencedClassesList();
  5647. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5648. args: ["html"],
  5649. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  5650. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  5651. referencedClasses: []
  5652. }),
  5653. smalltalk.ReferencesBrowser);
  5654. smalltalk.addMethod(
  5655. smalltalk.method({
  5656. selector: "renderSendersOn:",
  5657. category: 'rendering',
  5658. fn: function (html){
  5659. var self=this;
  5660. return smalltalk.withContext(function($ctx1) {
  5661. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  5662. self._updateSendersList();
  5663. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5664. args: ["html"],
  5665. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  5666. messageSends: ["class:", "ul", "updateSendersList"],
  5667. referencedClasses: []
  5668. }),
  5669. smalltalk.ReferencesBrowser);
  5670. smalltalk.addMethod(
  5671. smalltalk.method({
  5672. selector: "search:",
  5673. category: 'actions',
  5674. fn: function (aString){
  5675. var self=this;
  5676. return smalltalk.withContext(function($ctx1) {
  5677. var $1;
  5678. self._searchReferencesFor_(aString);
  5679. self._updateImplementorsList();
  5680. self._updateSendersList();
  5681. self._updateReferencedClassesList();
  5682. $1=self._updateMatchesList();
  5683. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser)})},
  5684. args: ["aString"],
  5685. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  5686. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  5687. referencedClasses: []
  5688. }),
  5689. smalltalk.ReferencesBrowser);
  5690. smalltalk.addMethod(
  5691. smalltalk.method({
  5692. selector: "searchMethodSource",
  5693. category: 'actions',
  5694. fn: function (){
  5695. var self=this;
  5696. var regex;
  5697. return smalltalk.withContext(function($ctx1) {
  5698. var $1;
  5699. regex=_st(self["@selector"])._allButFirst();
  5700. _st(self._classesAndMetaclasses())._do_((function(each){
  5701. return smalltalk.withContext(function($ctx2) {
  5702. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  5703. return smalltalk.withContext(function($ctx3) {
  5704. $1=_st(_st(value)._source())._match_(regex);
  5705. if(smalltalk.assert($1)){
  5706. return _st(self._matches())._add_(value);
  5707. };
  5708. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5709. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5710. $ctx1.sendIdx["do:"]=1;
  5711. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},smalltalk.ReferencesBrowser)})},
  5712. args: [],
  5713. source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [:each |\x0a\x09\x09each methodDictionary values do: [:value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value]]]",
  5714. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "values", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  5715. referencedClasses: []
  5716. }),
  5717. smalltalk.ReferencesBrowser);
  5718. smalltalk.addMethod(
  5719. smalltalk.method({
  5720. selector: "searchReferencedClasses",
  5721. category: 'actions',
  5722. fn: function (){
  5723. var self=this;
  5724. return smalltalk.withContext(function($ctx1) {
  5725. var $2,$1,$3;
  5726. _st(self._classesAndMetaclasses())._do_((function(each){
  5727. return smalltalk.withContext(function($ctx2) {
  5728. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  5729. return smalltalk.withContext(function($ctx3) {
  5730. $2=_st(value)._referencedClasses();
  5731. $ctx3.sendIdx["referencedClasses"]=1;
  5732. $1=_st($2)._includes_(self["@selector"]);
  5733. if(smalltalk.assert($1)){
  5734. $3=self._referencedClasses();
  5735. return _st($3)._add_(value);
  5736. };
  5737. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5738. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5739. $ctx1.sendIdx["do:"]=1;
  5740. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},smalltalk.ReferencesBrowser)})},
  5741. args: [],
  5742. source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [:each |\x0a\x09\x09each methodDictionary values do: [:value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value]]]",
  5743. messageSends: ["do:", "classesAndMetaclasses", "values", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  5744. referencedClasses: []
  5745. }),
  5746. smalltalk.ReferencesBrowser);
  5747. smalltalk.addMethod(
  5748. smalltalk.method({
  5749. selector: "searchReferencesFor:",
  5750. category: 'actions',
  5751. fn: function (aString){
  5752. var self=this;
  5753. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5754. return smalltalk.withContext(function($ctx1) {
  5755. var $1;
  5756. self["@selector"]=aString;
  5757. self["@implementors"]=_st($Array())._new();
  5758. $ctx1.sendIdx["new"]=1;
  5759. self["@senders"]=_st($Array())._new();
  5760. $ctx1.sendIdx["new"]=2;
  5761. self["@referencedClasses"]=_st($Array())._new();
  5762. $ctx1.sendIdx["new"]=3;
  5763. self["@matches"]=_st($Array())._new();
  5764. self._searchMethodSource();
  5765. $1=_st(self["@selector"])._match_("^[A-Z]");
  5766. if(smalltalk.assert($1)){
  5767. self._searchReferencedClasses();
  5768. } else {
  5769. self._searchSelectorReferences();
  5770. };
  5771. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},smalltalk.ReferencesBrowser)})},
  5772. args: ["aString"],
  5773. 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]",
  5774. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  5775. referencedClasses: ["Array"]
  5776. }),
  5777. smalltalk.ReferencesBrowser);
  5778. smalltalk.addMethod(
  5779. smalltalk.method({
  5780. selector: "searchSelectorReferences",
  5781. category: 'actions',
  5782. fn: function (){
  5783. var self=this;
  5784. return smalltalk.withContext(function($ctx1) {
  5785. var $1,$2;
  5786. _st(self._classesAndMetaclasses())._do_((function(each){
  5787. return smalltalk.withContext(function($ctx2) {
  5788. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  5789. return smalltalk.withContext(function($ctx3) {
  5790. $1=_st(key).__eq(self["@selector"]);
  5791. if(smalltalk.assert($1)){
  5792. _st(self._implementors())._add_(value);
  5793. $ctx3.sendIdx["add:"]=1;
  5794. };
  5795. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  5796. if(smalltalk.assert($2)){
  5797. return _st(self._senders())._add_(value);
  5798. };
  5799. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)})}));
  5800. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5801. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},smalltalk.ReferencesBrowser)})},
  5802. args: [],
  5803. 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]]]",
  5804. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  5805. referencedClasses: []
  5806. }),
  5807. smalltalk.ReferencesBrowser);
  5808. smalltalk.addMethod(
  5809. smalltalk.method({
  5810. selector: "selector",
  5811. category: 'accessing',
  5812. fn: function (){
  5813. var self=this;
  5814. return smalltalk.withContext(function($ctx1) {
  5815. var $1;
  5816. $1=self["@selector"];
  5817. return $1;
  5818. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.ReferencesBrowser)})},
  5819. args: [],
  5820. source: "selector\x0a\x09^selector",
  5821. messageSends: [],
  5822. referencedClasses: []
  5823. }),
  5824. smalltalk.ReferencesBrowser);
  5825. smalltalk.addMethod(
  5826. smalltalk.method({
  5827. selector: "senders",
  5828. category: 'accessing',
  5829. fn: function (){
  5830. var self=this;
  5831. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5832. return smalltalk.withContext(function($ctx1) {
  5833. var $2,$1;
  5834. $2=self["@senders"];
  5835. if(($receiver = $2) == nil || $receiver == null){
  5836. self["@senders"]=_st($Array())._new();
  5837. $1=self["@senders"];
  5838. } else {
  5839. $1=$2;
  5840. };
  5841. return $1;
  5842. }, function($ctx1) {$ctx1.fill(self,"senders",{},smalltalk.ReferencesBrowser)})},
  5843. args: [],
  5844. source: "senders\x0a\x09^senders ifNil: [senders := Array new]",
  5845. messageSends: ["ifNil:", "new"],
  5846. referencedClasses: ["Array"]
  5847. }),
  5848. smalltalk.ReferencesBrowser);
  5849. smalltalk.addMethod(
  5850. smalltalk.method({
  5851. selector: "setInputEvents",
  5852. category: 'private',
  5853. fn: function (){
  5854. var self=this;
  5855. return smalltalk.withContext(function($ctx1) {
  5856. var $1,$3,$2;
  5857. $1=self["@input"];
  5858. _st($1)._onKeyUp_((function(){
  5859. return smalltalk.withContext(function($ctx2) {
  5860. self["@timer"]=_st((function(){
  5861. return smalltalk.withContext(function($ctx3) {
  5862. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  5863. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}))._valueWithTimeout_((100));
  5864. return self["@timer"];
  5865. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5866. $2=_st($1)._onKeyDown_((function(){
  5867. return smalltalk.withContext(function($ctx2) {
  5868. $3=self["@timer"];
  5869. if(($receiver = $3) == nil || $receiver == null){
  5870. return $3;
  5871. } else {
  5872. return _st(self["@timer"])._clearTimeout();
  5873. };
  5874. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  5875. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},smalltalk.ReferencesBrowser)})},
  5876. args: [],
  5877. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [timer := [self search: input asJQuery val] valueWithTimeout: 100];\x0a\x09\x09onKeyDown: [timer ifNotNil: [timer clearTimeout]]",
  5878. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  5879. referencedClasses: []
  5880. }),
  5881. smalltalk.ReferencesBrowser);
  5882. smalltalk.addMethod(
  5883. smalltalk.method({
  5884. selector: "updateImplementorsList",
  5885. category: 'updating',
  5886. fn: function (){
  5887. var self=this;
  5888. return smalltalk.withContext(function($ctx1) {
  5889. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$14,$13,$12,$15;
  5890. _st(self["@implementorsList"])._contents_((function(html){
  5891. return smalltalk.withContext(function($ctx2) {
  5892. $1=_st(html)._li();
  5893. $ctx2.sendIdx["li"]=1;
  5894. _st($1)._class_("column_label");
  5895. $2=$1;
  5896. $7=self._implementors();
  5897. $ctx2.sendIdx["implementors"]=1;
  5898. $6=_st($7)._size();
  5899. $5=_st($6)._asString();
  5900. $ctx2.sendIdx["asString"]=1;
  5901. $4="Implementors (".__comma($5);
  5902. $ctx2.sendIdx[","]=2;
  5903. $3=_st($4).__comma(")");
  5904. $ctx2.sendIdx[","]=1;
  5905. _st($2)._with_($3);
  5906. $ctx2.sendIdx["with:"]=1;
  5907. $8=_st($1)._style_("font-weight: bold");
  5908. $8;
  5909. $9=self._implementors();
  5910. return _st($9)._do_((function(each){
  5911. var li;
  5912. return smalltalk.withContext(function($ctx3) {
  5913. li=_st(html)._li();
  5914. li;
  5915. $10=li;
  5916. $11=$10;
  5917. $14=_st(_st(each)._methodClass())._asString();
  5918. $13=_st($14).__comma(" >> ");
  5919. $12=_st($13).__comma(self._selector());
  5920. $ctx3.sendIdx[","]=3;
  5921. _st($11)._with_($12);
  5922. $15=_st($10)._onClick_((function(){
  5923. return smalltalk.withContext(function($ctx4) {
  5924. return self._openBrowserOn_(each);
  5925. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5926. return $15;
  5927. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5928. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5929. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},smalltalk.ReferencesBrowser)})},
  5930. args: [],
  5931. 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]]]",
  5932. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5933. referencedClasses: []
  5934. }),
  5935. smalltalk.ReferencesBrowser);
  5936. smalltalk.addMethod(
  5937. smalltalk.method({
  5938. selector: "updateMatchesList",
  5939. category: 'updating',
  5940. fn: function (){
  5941. var self=this;
  5942. return smalltalk.withContext(function($ctx1) {
  5943. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$14,$13,$12,$15;
  5944. _st(self["@matchesList"])._contents_((function(html){
  5945. return smalltalk.withContext(function($ctx2) {
  5946. $1=_st(html)._li();
  5947. $ctx2.sendIdx["li"]=1;
  5948. _st($1)._class_("column_label");
  5949. $2=$1;
  5950. $7=self._matches();
  5951. $ctx2.sendIdx["matches"]=1;
  5952. $6=_st($7)._size();
  5953. $5=_st($6)._asString();
  5954. $ctx2.sendIdx["asString"]=1;
  5955. $4="Regex matches (".__comma($5);
  5956. $ctx2.sendIdx[","]=2;
  5957. $3=_st($4).__comma(")");
  5958. $ctx2.sendIdx[","]=1;
  5959. _st($2)._with_($3);
  5960. $ctx2.sendIdx["with:"]=1;
  5961. $8=_st($1)._style_("font-weight: bold");
  5962. $8;
  5963. $9=self._matches();
  5964. return _st($9)._do_((function(each){
  5965. var li;
  5966. return smalltalk.withContext(function($ctx3) {
  5967. li=_st(html)._li();
  5968. li;
  5969. $10=li;
  5970. $11=$10;
  5971. $14=_st(_st(each)._methodClass())._asString();
  5972. $13=_st($14).__comma(" >> ");
  5973. $12=_st($13).__comma(_st(each)._selector());
  5974. $ctx3.sendIdx[","]=3;
  5975. _st($11)._with_($12);
  5976. $15=_st($10)._onClick_((function(){
  5977. return smalltalk.withContext(function($ctx4) {
  5978. return self._openBrowserOn_(each);
  5979. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5980. return $15;
  5981. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5982. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5983. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},smalltalk.ReferencesBrowser)})},
  5984. args: [],
  5985. 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]]]",
  5986. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5987. referencedClasses: []
  5988. }),
  5989. smalltalk.ReferencesBrowser);
  5990. smalltalk.addMethod(
  5991. smalltalk.method({
  5992. selector: "updateReferencedClassesList",
  5993. category: 'updating',
  5994. fn: function (){
  5995. var self=this;
  5996. return smalltalk.withContext(function($ctx1) {
  5997. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$14,$13,$12,$15;
  5998. _st(self["@referencedClassesList"])._contents_((function(html){
  5999. return smalltalk.withContext(function($ctx2) {
  6000. $1=_st(html)._li();
  6001. $ctx2.sendIdx["li"]=1;
  6002. _st($1)._class_("column_label");
  6003. $2=$1;
  6004. $7=self._referencedClasses();
  6005. $ctx2.sendIdx["referencedClasses"]=1;
  6006. $6=_st($7)._size();
  6007. $5=_st($6)._asString();
  6008. $ctx2.sendIdx["asString"]=1;
  6009. $4="Class references (".__comma($5);
  6010. $ctx2.sendIdx[","]=2;
  6011. $3=_st($4).__comma(")");
  6012. $ctx2.sendIdx[","]=1;
  6013. _st($2)._with_($3);
  6014. $ctx2.sendIdx["with:"]=1;
  6015. $8=_st($1)._style_("font-weight: bold");
  6016. $8;
  6017. $9=self._referencedClasses();
  6018. return _st($9)._do_((function(each){
  6019. return smalltalk.withContext(function($ctx3) {
  6020. $10=_st(html)._li();
  6021. $11=$10;
  6022. $14=_st(_st(each)._methodClass())._asString();
  6023. $13=_st($14).__comma(" >> ");
  6024. $12=_st($13).__comma(_st(each)._selector());
  6025. $ctx3.sendIdx[","]=3;
  6026. _st($11)._with_($12);
  6027. $15=_st($10)._onClick_((function(){
  6028. return smalltalk.withContext(function($ctx4) {
  6029. return self._openBrowserOn_(each);
  6030. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  6031. return $15;
  6032. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  6033. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6034. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},smalltalk.ReferencesBrowser)})},
  6035. args: [],
  6036. 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]]]",
  6037. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  6038. referencedClasses: []
  6039. }),
  6040. smalltalk.ReferencesBrowser);
  6041. smalltalk.addMethod(
  6042. smalltalk.method({
  6043. selector: "updateSendersList",
  6044. category: 'updating',
  6045. fn: function (){
  6046. var self=this;
  6047. return smalltalk.withContext(function($ctx1) {
  6048. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$14,$13,$12,$15;
  6049. _st(self["@sendersList"])._contents_((function(html){
  6050. return smalltalk.withContext(function($ctx2) {
  6051. $1=_st(html)._li();
  6052. $ctx2.sendIdx["li"]=1;
  6053. _st($1)._class_("column_label");
  6054. $2=$1;
  6055. $7=self._senders();
  6056. $ctx2.sendIdx["senders"]=1;
  6057. $6=_st($7)._size();
  6058. $5=_st($6)._asString();
  6059. $ctx2.sendIdx["asString"]=1;
  6060. $4="Senders (".__comma($5);
  6061. $ctx2.sendIdx[","]=2;
  6062. $3=_st($4).__comma(")");
  6063. $ctx2.sendIdx[","]=1;
  6064. _st($2)._with_($3);
  6065. $ctx2.sendIdx["with:"]=1;
  6066. $8=_st($1)._style_("font-weight: bold");
  6067. $8;
  6068. $9=self._senders();
  6069. return _st($9)._do_((function(each){
  6070. return smalltalk.withContext(function($ctx3) {
  6071. $10=_st(html)._li();
  6072. $11=$10;
  6073. $14=_st(_st(each)._methodClass())._asString();
  6074. $13=_st($14).__comma(" >> ");
  6075. $12=_st($13).__comma(_st(each)._selector());
  6076. $ctx3.sendIdx[","]=3;
  6077. _st($11)._with_($12);
  6078. $15=_st($10)._onClick_((function(){
  6079. return smalltalk.withContext(function($ctx4) {
  6080. return self._openBrowserOn_(each);
  6081. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  6082. return $15;
  6083. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  6084. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6085. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},smalltalk.ReferencesBrowser)})},
  6086. args: [],
  6087. 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]]]",
  6088. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  6089. referencedClasses: []
  6090. }),
  6091. smalltalk.ReferencesBrowser);
  6092. smalltalk.addMethod(
  6093. smalltalk.method({
  6094. selector: "search:",
  6095. category: 'instance creation',
  6096. fn: function (aString){
  6097. var self=this;
  6098. return smalltalk.withContext(function($ctx1) {
  6099. var $2,$3,$1;
  6100. $2=self._new();
  6101. _st($2)._searchReferencesFor_(aString);
  6102. $3=_st($2)._open();
  6103. $1=$3;
  6104. return $1;
  6105. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser.klass)})},
  6106. args: ["aString"],
  6107. source: "search: aString\x0a\x09^self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  6108. messageSends: ["searchReferencesFor:", "new", "open"],
  6109. referencedClasses: []
  6110. }),
  6111. smalltalk.ReferencesBrowser.klass);
  6112. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  6113. smalltalk.addMethod(
  6114. smalltalk.method({
  6115. selector: "allClasses",
  6116. category: 'accessing',
  6117. fn: function (){
  6118. var self=this;
  6119. function $TestCase(){return smalltalk.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  6120. return smalltalk.withContext(function($ctx1) {
  6121. var $1;
  6122. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  6123. return smalltalk.withContext(function($ctx2) {
  6124. return _st(_st(each)._isAbstract())._not();
  6125. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6126. return $1;
  6127. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},smalltalk.TestRunner)})},
  6128. args: [],
  6129. source: "allClasses\x0a\x09^TestCase allSubclasses select: [ :each | each isAbstract not ]",
  6130. messageSends: ["select:", "allSubclasses", "not", "isAbstract"],
  6131. referencedClasses: ["TestCase"]
  6132. }),
  6133. smalltalk.TestRunner);
  6134. smalltalk.addMethod(
  6135. smalltalk.method({
  6136. selector: "classes",
  6137. category: 'accessing',
  6138. fn: function (){
  6139. var self=this;
  6140. return smalltalk.withContext(function($ctx1) {
  6141. var $2,$3,$1;
  6142. $1=_st(_st(self._allClasses())._select_((function(each){
  6143. return smalltalk.withContext(function($ctx2) {
  6144. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6145. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  6146. return smalltalk.withContext(function($ctx2) {
  6147. $2=_st(a)._name();
  6148. $ctx2.sendIdx["name"]=1;
  6149. $3=_st(b)._name();
  6150. return _st($2).__gt($3);
  6151. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
  6152. return $1;
  6153. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.TestRunner)})},
  6154. args: [],
  6155. source: "classes\x0a\x09^(self allClasses\x0a\x09select: [:each | self selectedCategories includes: each category])\x0a\x09sort: [:a :b | a name > b name]",
  6156. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  6157. referencedClasses: []
  6158. }),
  6159. smalltalk.TestRunner);
  6160. smalltalk.addMethod(
  6161. smalltalk.method({
  6162. selector: "initialize",
  6163. category: 'initialization',
  6164. fn: function (){
  6165. var self=this;
  6166. function $TestResult(){return smalltalk.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  6167. return smalltalk.withContext(function($ctx1) {
  6168. smalltalk.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
  6169. self["@result"]=_st($TestResult())._new();
  6170. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TestRunner)})},
  6171. args: [],
  6172. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6173. messageSends: ["initialize", "new"],
  6174. referencedClasses: ["TestResult"]
  6175. }),
  6176. smalltalk.TestRunner);
  6177. smalltalk.addMethod(
  6178. smalltalk.method({
  6179. selector: "isSelectedCategory:",
  6180. category: 'testing',
  6181. fn: function (aCategory){
  6182. var self=this;
  6183. return smalltalk.withContext(function($ctx1) {
  6184. var $1;
  6185. $1=_st(self._selectedCategories())._includes_(aCategory);
  6186. return $1;
  6187. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},smalltalk.TestRunner)})},
  6188. args: ["aCategory"],
  6189. source: "isSelectedCategory: aCategory\x0a\x09^(self selectedCategories includes: aCategory)",
  6190. messageSends: ["includes:", "selectedCategories"],
  6191. referencedClasses: []
  6192. }),
  6193. smalltalk.TestRunner);
  6194. smalltalk.addMethod(
  6195. smalltalk.method({
  6196. selector: "isSelectedClass:",
  6197. category: 'testing',
  6198. fn: function (aClass){
  6199. var self=this;
  6200. return smalltalk.withContext(function($ctx1) {
  6201. var $1;
  6202. $1=_st(self._selectedClasses())._includes_(aClass);
  6203. return $1;
  6204. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},smalltalk.TestRunner)})},
  6205. args: ["aClass"],
  6206. source: "isSelectedClass: aClass\x0a\x09^(self selectedClasses includes: aClass)",
  6207. messageSends: ["includes:", "selectedClasses"],
  6208. referencedClasses: []
  6209. }),
  6210. smalltalk.TestRunner);
  6211. smalltalk.addMethod(
  6212. smalltalk.method({
  6213. selector: "label",
  6214. category: 'accessing',
  6215. fn: function (){
  6216. var self=this;
  6217. return smalltalk.withContext(function($ctx1) {
  6218. return "SUnit";
  6219. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TestRunner)})},
  6220. args: [],
  6221. source: "label\x0a\x09^'SUnit'",
  6222. messageSends: [],
  6223. referencedClasses: []
  6224. }),
  6225. smalltalk.TestRunner);
  6226. smalltalk.addMethod(
  6227. smalltalk.method({
  6228. selector: "packages",
  6229. category: 'accessing',
  6230. fn: function (){
  6231. var self=this;
  6232. var packages;
  6233. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6234. return smalltalk.withContext(function($ctx1) {
  6235. var $2,$3,$1,$4,$5,$6;
  6236. packages=_st($Array())._new();
  6237. _st(self._allClasses())._do_((function(each){
  6238. return smalltalk.withContext(function($ctx2) {
  6239. $2=packages;
  6240. $3=_st(each)._category();
  6241. $ctx2.sendIdx["category"]=1;
  6242. $1=_st($2)._includes_($3);
  6243. if(! smalltalk.assert($1)){
  6244. $4=packages;
  6245. $5=_st(each)._category();
  6246. return _st($4)._add_($5);
  6247. };
  6248. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6249. $6=_st(packages)._sort();
  6250. return $6;
  6251. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.TestRunner)})},
  6252. args: [],
  6253. 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",
  6254. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6255. referencedClasses: ["Array"]
  6256. }),
  6257. smalltalk.TestRunner);
  6258. smalltalk.addMethod(
  6259. smalltalk.method({
  6260. selector: "performFailure:",
  6261. category: 'actions',
  6262. fn: function (aTestCase){
  6263. var self=this;
  6264. return smalltalk.withContext(function($ctx1) {
  6265. _st(aTestCase)._runCase();
  6266. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},smalltalk.TestRunner)})},
  6267. args: ["aTestCase"],
  6268. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6269. messageSends: ["runCase"],
  6270. referencedClasses: []
  6271. }),
  6272. smalltalk.TestRunner);
  6273. smalltalk.addMethod(
  6274. smalltalk.method({
  6275. selector: "printErrors",
  6276. category: 'printing',
  6277. fn: function (){
  6278. var self=this;
  6279. return smalltalk.withContext(function($ctx1) {
  6280. var $1;
  6281. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6282. return $1;
  6283. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},smalltalk.TestRunner)})},
  6284. args: [],
  6285. source: "printErrors\x0a\x09^self result errors size asString , ' errors, '",
  6286. messageSends: [",", "asString", "size", "errors", "result"],
  6287. referencedClasses: []
  6288. }),
  6289. smalltalk.TestRunner);
  6290. smalltalk.addMethod(
  6291. smalltalk.method({
  6292. selector: "printFailures",
  6293. category: 'printing',
  6294. fn: function (){
  6295. var self=this;
  6296. return smalltalk.withContext(function($ctx1) {
  6297. var $1;
  6298. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6299. return $1;
  6300. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},smalltalk.TestRunner)})},
  6301. args: [],
  6302. source: "printFailures\x0a\x09^self result failures size asString, ' failures'",
  6303. messageSends: [",", "asString", "size", "failures", "result"],
  6304. referencedClasses: []
  6305. }),
  6306. smalltalk.TestRunner);
  6307. smalltalk.addMethod(
  6308. smalltalk.method({
  6309. selector: "printPasses",
  6310. category: 'printing',
  6311. fn: function (){
  6312. var self=this;
  6313. return smalltalk.withContext(function($ctx1) {
  6314. var $6,$5,$9,$8,$7,$4,$12,$11,$10,$3,$2,$1;
  6315. $6=self._result();
  6316. $ctx1.sendIdx["result"]=1;
  6317. $5=_st($6)._runs();
  6318. $9=self._result();
  6319. $ctx1.sendIdx["result"]=2;
  6320. $8=_st($9)._errors();
  6321. $7=_st($8)._size();
  6322. $ctx1.sendIdx["size"]=1;
  6323. $4=_st($5).__minus($7);
  6324. $12=self._result();
  6325. $11=_st($12)._failures();
  6326. $10=_st($11)._size();
  6327. $3=_st($4).__minus($10);
  6328. $ctx1.sendIdx["-"]=1;
  6329. $2=_st($3)._asString();
  6330. $1=_st($2).__comma(" passes, ");
  6331. return $1;
  6332. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},smalltalk.TestRunner)})},
  6333. args: [],
  6334. source: "printPasses\x0a\x09^(self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6335. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6336. referencedClasses: []
  6337. }),
  6338. smalltalk.TestRunner);
  6339. smalltalk.addMethod(
  6340. smalltalk.method({
  6341. selector: "printTotal",
  6342. category: 'printing',
  6343. fn: function (){
  6344. var self=this;
  6345. return smalltalk.withContext(function($ctx1) {
  6346. var $1;
  6347. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6348. return $1;
  6349. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},smalltalk.TestRunner)})},
  6350. args: [],
  6351. source: "printTotal\x0a\x09^self result total asString, ' runs, '",
  6352. messageSends: [",", "asString", "total", "result"],
  6353. referencedClasses: []
  6354. }),
  6355. smalltalk.TestRunner);
  6356. smalltalk.addMethod(
  6357. smalltalk.method({
  6358. selector: "progressBar",
  6359. category: 'accessing',
  6360. fn: function (){
  6361. var self=this;
  6362. function $ProgressBar(){return smalltalk.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6363. return smalltalk.withContext(function($ctx1) {
  6364. var $2,$1;
  6365. $2=self["@progressBar"];
  6366. if(($receiver = $2) == nil || $receiver == null){
  6367. self["@progressBar"]=_st($ProgressBar())._new();
  6368. $1=self["@progressBar"];
  6369. } else {
  6370. $1=$2;
  6371. };
  6372. return $1;
  6373. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},smalltalk.TestRunner)})},
  6374. args: [],
  6375. source: "progressBar\x0a\x09^progressBar ifNil: [progressBar := ProgressBar new]",
  6376. messageSends: ["ifNil:", "new"],
  6377. referencedClasses: ["ProgressBar"]
  6378. }),
  6379. smalltalk.TestRunner);
  6380. smalltalk.addMethod(
  6381. smalltalk.method({
  6382. selector: "renderBoxOn:",
  6383. category: 'rendering',
  6384. fn: function (html){
  6385. var self=this;
  6386. return smalltalk.withContext(function($ctx1) {
  6387. var $1;
  6388. self._renderCategoriesOn_(html);
  6389. self._renderClassesOn_(html);
  6390. $1=self._renderResultsOn_(html);
  6391. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TestRunner)})},
  6392. args: ["html"],
  6393. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6394. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6395. referencedClasses: []
  6396. }),
  6397. smalltalk.TestRunner);
  6398. smalltalk.addMethod(
  6399. smalltalk.method({
  6400. selector: "renderButtonsOn:",
  6401. category: 'rendering',
  6402. fn: function (html){
  6403. var self=this;
  6404. return smalltalk.withContext(function($ctx1) {
  6405. var $1,$2;
  6406. $1=_st(html)._button();
  6407. _st($1)._with_("Run selected");
  6408. $2=_st($1)._onClick_((function(){
  6409. return smalltalk.withContext(function($ctx2) {
  6410. return self._run_(self._testCases());
  6411. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6412. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TestRunner)})},
  6413. args: ["html"],
  6414. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [self run: self testCases]",
  6415. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6416. referencedClasses: []
  6417. }),
  6418. smalltalk.TestRunner);
  6419. smalltalk.addMethod(
  6420. smalltalk.method({
  6421. selector: "renderCategoriesOn:",
  6422. category: 'rendering',
  6423. fn: function (html){
  6424. var self=this;
  6425. return smalltalk.withContext(function($ctx1) {
  6426. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6427. self._updateCategoriesList();
  6428. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},smalltalk.TestRunner)})},
  6429. args: ["html"],
  6430. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6431. messageSends: ["class:", "ul", "updateCategoriesList"],
  6432. referencedClasses: []
  6433. }),
  6434. smalltalk.TestRunner);
  6435. smalltalk.addMethod(
  6436. smalltalk.method({
  6437. selector: "renderClassesOn:",
  6438. category: 'rendering',
  6439. fn: function (html){
  6440. var self=this;
  6441. return smalltalk.withContext(function($ctx1) {
  6442. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6443. self._updateClassesList();
  6444. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},smalltalk.TestRunner)})},
  6445. args: ["html"],
  6446. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6447. messageSends: ["class:", "ul", "updateClassesList"],
  6448. referencedClasses: []
  6449. }),
  6450. smalltalk.TestRunner);
  6451. smalltalk.addMethod(
  6452. smalltalk.method({
  6453. selector: "renderErrorsOn:",
  6454. category: 'rendering',
  6455. fn: function (html){
  6456. var self=this;
  6457. return smalltalk.withContext(function($ctx1) {
  6458. var $1,$2,$4,$3,$5;
  6459. _st(_st(self._result())._errors())._do_((function(each){
  6460. return smalltalk.withContext(function($ctx2) {
  6461. $1=_st(html)._li();
  6462. _st($1)._class_("errors");
  6463. $2=$1;
  6464. $4=_st(_st(_st(each)._class())._name()).__comma(" >> ");
  6465. $3=_st($4).__comma(_st(each)._selector());
  6466. $ctx2.sendIdx[","]=1;
  6467. _st($2)._with_($3);
  6468. $5=_st($1)._onClick_((function(){
  6469. return smalltalk.withContext(function($ctx3) {
  6470. return self._performFailure_(each);
  6471. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6472. return $5;
  6473. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6474. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},smalltalk.TestRunner)})},
  6475. args: ["html"],
  6476. 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]]",
  6477. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6478. referencedClasses: []
  6479. }),
  6480. smalltalk.TestRunner);
  6481. smalltalk.addMethod(
  6482. smalltalk.method({
  6483. selector: "renderFailuresOn:",
  6484. category: 'rendering',
  6485. fn: function (html){
  6486. var self=this;
  6487. return smalltalk.withContext(function($ctx1) {
  6488. var $1,$2,$4,$3,$5;
  6489. _st(_st(self._result())._failures())._do_((function(each){
  6490. return smalltalk.withContext(function($ctx2) {
  6491. $1=_st(html)._li();
  6492. _st($1)._class_("failures");
  6493. $2=$1;
  6494. $4=_st(_st(_st(each)._class())._name()).__comma(" >> ");
  6495. $3=_st($4).__comma(_st(each)._selector());
  6496. $ctx2.sendIdx[","]=1;
  6497. _st($2)._with_($3);
  6498. $5=_st($1)._onClick_((function(){
  6499. return smalltalk.withContext(function($ctx3) {
  6500. return self._performFailure_(each);
  6501. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6502. return $5;
  6503. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6504. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},smalltalk.TestRunner)})},
  6505. args: ["html"],
  6506. 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]]",
  6507. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6508. referencedClasses: []
  6509. }),
  6510. smalltalk.TestRunner);
  6511. smalltalk.addMethod(
  6512. smalltalk.method({
  6513. selector: "renderResultsOn:",
  6514. category: 'rendering',
  6515. fn: function (html){
  6516. var self=this;
  6517. return smalltalk.withContext(function($ctx1) {
  6518. self["@statusDiv"]=_st(html)._div();
  6519. _st(html)._with_(self._progressBar());
  6520. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6521. self._updateMethodsList();
  6522. self._updateStatusDiv();
  6523. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},smalltalk.TestRunner)})},
  6524. args: ["html"],
  6525. 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",
  6526. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6527. referencedClasses: []
  6528. }),
  6529. smalltalk.TestRunner);
  6530. smalltalk.addMethod(
  6531. smalltalk.method({
  6532. selector: "result",
  6533. category: 'accessing',
  6534. fn: function (){
  6535. var self=this;
  6536. return smalltalk.withContext(function($ctx1) {
  6537. var $1;
  6538. $1=self["@result"];
  6539. return $1;
  6540. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestRunner)})},
  6541. args: [],
  6542. source: "result\x0a\x09^result",
  6543. messageSends: [],
  6544. referencedClasses: []
  6545. }),
  6546. smalltalk.TestRunner);
  6547. smalltalk.addMethod(
  6548. smalltalk.method({
  6549. selector: "run:",
  6550. category: 'actions',
  6551. fn: function (aCollection){
  6552. var self=this;
  6553. var worker;
  6554. function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6555. function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6556. return smalltalk.withContext(function($ctx1) {
  6557. var $2,$1;
  6558. worker=_st($TestSuiteRunner())._on_(aCollection);
  6559. self["@result"]=_st(worker)._result();
  6560. $ctx1.sendIdx["result"]=1;
  6561. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6562. return smalltalk.withContext(function($ctx2) {
  6563. $2=_st(ann)._result();
  6564. $1=_st($2).__eq_eq(self["@result"]);
  6565. if(smalltalk.assert($1)){
  6566. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6567. self._updateStatusDiv();
  6568. return self._updateMethodsList();
  6569. };
  6570. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6571. _st(worker)._run();
  6572. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},smalltalk.TestRunner)})},
  6573. args: ["aCollection"],
  6574. 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",
  6575. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6576. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6577. }),
  6578. smalltalk.TestRunner);
  6579. smalltalk.addMethod(
  6580. smalltalk.method({
  6581. selector: "selectAllCategories",
  6582. category: 'actions',
  6583. fn: function (){
  6584. var self=this;
  6585. return smalltalk.withContext(function($ctx1) {
  6586. var $1,$2;
  6587. _st(self._packages())._do_((function(each){
  6588. return smalltalk.withContext(function($ctx2) {
  6589. $1=_st(self["@selectedCategories"])._includes_(each);
  6590. if(! smalltalk.assert($1)){
  6591. return _st(self._selectedCategories())._add_(each);
  6592. };
  6593. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6594. self._updateCategoriesList();
  6595. $2=self._updateClassesList();
  6596. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},smalltalk.TestRunner)})},
  6597. args: [],
  6598. 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",
  6599. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6600. referencedClasses: []
  6601. }),
  6602. smalltalk.TestRunner);
  6603. smalltalk.addMethod(
  6604. smalltalk.method({
  6605. selector: "selectAllClasses",
  6606. category: 'actions',
  6607. fn: function (){
  6608. var self=this;
  6609. return smalltalk.withContext(function($ctx1) {
  6610. var $1,$2;
  6611. _st(self._classes())._do_((function(each){
  6612. return smalltalk.withContext(function($ctx2) {
  6613. $1=_st(self["@selectedClasses"])._includes_(each);
  6614. if(! smalltalk.assert($1)){
  6615. return _st(self._selectedClasses())._add_(each);
  6616. };
  6617. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6618. self._updateCategoriesList();
  6619. $2=self._updateClassesList();
  6620. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},smalltalk.TestRunner)})},
  6621. args: [],
  6622. 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",
  6623. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6624. referencedClasses: []
  6625. }),
  6626. smalltalk.TestRunner);
  6627. smalltalk.addMethod(
  6628. smalltalk.method({
  6629. selector: "selectedCategories",
  6630. category: 'accessing',
  6631. fn: function (){
  6632. var self=this;
  6633. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6634. return smalltalk.withContext(function($ctx1) {
  6635. var $2,$1;
  6636. $2=self["@selectedCategories"];
  6637. if(($receiver = $2) == nil || $receiver == null){
  6638. self["@selectedCategories"]=_st($Array())._new();
  6639. $1=self["@selectedCategories"];
  6640. } else {
  6641. $1=$2;
  6642. };
  6643. return $1;
  6644. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},smalltalk.TestRunner)})},
  6645. args: [],
  6646. source: "selectedCategories\x0a\x09^selectedCategories ifNil: [selectedCategories := Array new]",
  6647. messageSends: ["ifNil:", "new"],
  6648. referencedClasses: ["Array"]
  6649. }),
  6650. smalltalk.TestRunner);
  6651. smalltalk.addMethod(
  6652. smalltalk.method({
  6653. selector: "selectedClasses",
  6654. category: 'accessing',
  6655. fn: function (){
  6656. var self=this;
  6657. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6658. return smalltalk.withContext(function($ctx1) {
  6659. var $2,$1;
  6660. $2=self["@selectedClasses"];
  6661. if(($receiver = $2) == nil || $receiver == null){
  6662. self["@selectedClasses"]=_st($Array())._new();
  6663. $1=self["@selectedClasses"];
  6664. } else {
  6665. $1=$2;
  6666. };
  6667. return $1;
  6668. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},smalltalk.TestRunner)})},
  6669. args: [],
  6670. source: "selectedClasses\x0a\x09^selectedClasses ifNil: [selectedClasses := Array new]",
  6671. messageSends: ["ifNil:", "new"],
  6672. referencedClasses: ["Array"]
  6673. }),
  6674. smalltalk.TestRunner);
  6675. smalltalk.addMethod(
  6676. smalltalk.method({
  6677. selector: "statusInfo",
  6678. category: 'accessing',
  6679. fn: function (){
  6680. var self=this;
  6681. return smalltalk.withContext(function($ctx1) {
  6682. var $3,$2,$1;
  6683. $3=_st(self._printTotal()).__comma(self._printPasses());
  6684. $2=_st($3).__comma(self._printErrors());
  6685. $ctx1.sendIdx[","]=2;
  6686. $1=_st($2).__comma(self._printFailures());
  6687. $ctx1.sendIdx[","]=1;
  6688. return $1;
  6689. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},smalltalk.TestRunner)})},
  6690. args: [],
  6691. source: "statusInfo\x0a\x09^self printTotal, self printPasses, self printErrors, self printFailures",
  6692. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6693. referencedClasses: []
  6694. }),
  6695. smalltalk.TestRunner);
  6696. smalltalk.addMethod(
  6697. smalltalk.method({
  6698. selector: "testCases",
  6699. category: 'accessing',
  6700. fn: function (){
  6701. var self=this;
  6702. var testCases;
  6703. return smalltalk.withContext(function($ctx1) {
  6704. var $1;
  6705. testCases=[];
  6706. _st(_st(self._selectedClasses())._select_((function(each){
  6707. return smalltalk.withContext(function($ctx2) {
  6708. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6709. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6710. return smalltalk.withContext(function($ctx2) {
  6711. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6712. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6713. $1=testCases;
  6714. return $1;
  6715. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},smalltalk.TestRunner)})},
  6716. args: [],
  6717. 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",
  6718. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6719. referencedClasses: []
  6720. }),
  6721. smalltalk.TestRunner);
  6722. smalltalk.addMethod(
  6723. smalltalk.method({
  6724. selector: "toggleCategory:",
  6725. category: 'actions',
  6726. fn: function (aCategory){
  6727. var self=this;
  6728. return smalltalk.withContext(function($ctx1) {
  6729. var $1,$2;
  6730. $1=self._isSelectedCategory_(aCategory);
  6731. if(smalltalk.assert($1)){
  6732. _st(self["@selectedCategories"])._remove_(aCategory);
  6733. } else {
  6734. _st(self["@selectedCategories"])._add_(aCategory);
  6735. };
  6736. self._updateCategoriesList();
  6737. $2=self._updateClassesList();
  6738. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},smalltalk.TestRunner)})},
  6739. args: ["aCategory"],
  6740. 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",
  6741. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6742. referencedClasses: []
  6743. }),
  6744. smalltalk.TestRunner);
  6745. smalltalk.addMethod(
  6746. smalltalk.method({
  6747. selector: "toggleClass:",
  6748. category: 'actions',
  6749. fn: function (aClass){
  6750. var self=this;
  6751. return smalltalk.withContext(function($ctx1) {
  6752. var $1;
  6753. $1=self._isSelectedClass_(aClass);
  6754. if(smalltalk.assert($1)){
  6755. _st(self["@selectedClasses"])._remove_(aClass);
  6756. } else {
  6757. _st(self["@selectedClasses"])._add_(aClass);
  6758. };
  6759. self._updateClassesList();
  6760. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},smalltalk.TestRunner)})},
  6761. args: ["aClass"],
  6762. 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",
  6763. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6764. referencedClasses: []
  6765. }),
  6766. smalltalk.TestRunner);
  6767. smalltalk.addMethod(
  6768. smalltalk.method({
  6769. selector: "updateCategoriesList",
  6770. category: 'updating',
  6771. fn: function (){
  6772. var self=this;
  6773. return smalltalk.withContext(function($ctx1) {
  6774. var $1,$2,$3,$4,$5;
  6775. _st(self["@packagesList"])._contents_((function(html){
  6776. return smalltalk.withContext(function($ctx2) {
  6777. $1=_st(html)._li();
  6778. $ctx2.sendIdx["li"]=1;
  6779. _st($1)._class_("all");
  6780. $ctx2.sendIdx["class:"]=1;
  6781. _st($1)._with_("All");
  6782. $ctx2.sendIdx["with:"]=1;
  6783. $2=_st($1)._onClick_((function(){
  6784. return smalltalk.withContext(function($ctx3) {
  6785. return self._selectAllCategories();
  6786. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6787. $ctx2.sendIdx["onClick:"]=1;
  6788. $2;
  6789. return _st(self._packages())._do_((function(each){
  6790. var li;
  6791. return smalltalk.withContext(function($ctx3) {
  6792. li=_st(html)._li();
  6793. li;
  6794. $3=_st(self._selectedCategories())._includes_(each);
  6795. if(smalltalk.assert($3)){
  6796. _st(li)._class_("selected");
  6797. };
  6798. $4=li;
  6799. _st($4)._with_(each);
  6800. $5=_st($4)._onClick_((function(){
  6801. return smalltalk.withContext(function($ctx4) {
  6802. return self._toggleCategory_(each);
  6803. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6804. return $5;
  6805. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6806. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6807. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.TestRunner)})},
  6808. args: [],
  6809. 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]]]",
  6810. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6811. referencedClasses: []
  6812. }),
  6813. smalltalk.TestRunner);
  6814. smalltalk.addMethod(
  6815. smalltalk.method({
  6816. selector: "updateClassesList",
  6817. category: 'updating',
  6818. fn: function (){
  6819. var self=this;
  6820. return smalltalk.withContext(function($ctx1) {
  6821. var $1,$2,$3,$4,$5,$6;
  6822. _st(self["@classesList"])._contents_((function(html){
  6823. return smalltalk.withContext(function($ctx2) {
  6824. $1=_st(self._selectedCategories())._isEmpty();
  6825. if(! smalltalk.assert($1)){
  6826. $2=_st(html)._li();
  6827. $ctx2.sendIdx["li"]=1;
  6828. _st($2)._class_("all");
  6829. $ctx2.sendIdx["class:"]=1;
  6830. _st($2)._with_("All");
  6831. $ctx2.sendIdx["with:"]=1;
  6832. $3=_st($2)._onClick_((function(){
  6833. return smalltalk.withContext(function($ctx3) {
  6834. return self._selectAllClasses();
  6835. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6836. $ctx2.sendIdx["onClick:"]=1;
  6837. $3;
  6838. };
  6839. return _st(self._classes())._do_((function(each){
  6840. var li;
  6841. return smalltalk.withContext(function($ctx3) {
  6842. li=_st(html)._li();
  6843. li;
  6844. $4=_st(self._selectedClasses())._includes_(each);
  6845. if(smalltalk.assert($4)){
  6846. _st(li)._class_("selected");
  6847. };
  6848. $5=li;
  6849. _st($5)._with_(_st(each)._name());
  6850. $6=_st($5)._onClick_((function(){
  6851. return smalltalk.withContext(function($ctx4) {
  6852. return self._toggleClass_(each);
  6853. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6854. return $6;
  6855. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6856. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6857. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.TestRunner)})},
  6858. args: [],
  6859. 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]]]",
  6860. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6861. referencedClasses: []
  6862. }),
  6863. smalltalk.TestRunner);
  6864. smalltalk.addMethod(
  6865. smalltalk.method({
  6866. selector: "updateMethodsList",
  6867. category: 'updating',
  6868. fn: function (){
  6869. var self=this;
  6870. return smalltalk.withContext(function($ctx1) {
  6871. _st(self["@methodsList"])._contents_((function(html){
  6872. return smalltalk.withContext(function($ctx2) {
  6873. self._renderErrorsOn_(html);
  6874. return self._renderFailuresOn_(html);
  6875. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6876. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.TestRunner)})},
  6877. args: [],
  6878. source: "updateMethodsList\x0a\x09methodsList contents: [:html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html]",
  6879. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6880. referencedClasses: []
  6881. }),
  6882. smalltalk.TestRunner);
  6883. smalltalk.addMethod(
  6884. smalltalk.method({
  6885. selector: "updateStatusDiv",
  6886. category: 'updating',
  6887. fn: function (){
  6888. var self=this;
  6889. return smalltalk.withContext(function($ctx1) {
  6890. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6891. _st(self["@statusDiv"])._contents_((function(html){
  6892. return smalltalk.withContext(function($ctx2) {
  6893. return _st(_st(html)._span())._with_(self._statusInfo());
  6894. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6895. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},smalltalk.TestRunner)})},
  6896. args: [],
  6897. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [:html |\x0a\x09\x09html span with: self statusInfo]",
  6898. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6899. referencedClasses: []
  6900. }),
  6901. smalltalk.TestRunner);
  6902. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  6903. smalltalk.addMethod(
  6904. smalltalk.method({
  6905. selector: "clearWorkspace",
  6906. category: 'actions',
  6907. fn: function (){
  6908. var self=this;
  6909. return smalltalk.withContext(function($ctx1) {
  6910. _st(self["@sourceArea"])._clear();
  6911. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},smalltalk.Workspace)})},
  6912. args: [],
  6913. source: "clearWorkspace\x0a\x09sourceArea clear",
  6914. messageSends: ["clear"],
  6915. referencedClasses: []
  6916. }),
  6917. smalltalk.Workspace);
  6918. smalltalk.addMethod(
  6919. smalltalk.method({
  6920. selector: "doIt",
  6921. category: 'actions',
  6922. fn: function (){
  6923. var self=this;
  6924. return smalltalk.withContext(function($ctx1) {
  6925. _st(self["@sourceArea"])._doIt();
  6926. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},smalltalk.Workspace)})},
  6927. args: [],
  6928. source: "doIt\x0a\x09sourceArea doIt",
  6929. messageSends: ["doIt"],
  6930. referencedClasses: []
  6931. }),
  6932. smalltalk.Workspace);
  6933. smalltalk.addMethod(
  6934. smalltalk.method({
  6935. selector: "fileIn",
  6936. category: 'actions',
  6937. fn: function (){
  6938. var self=this;
  6939. return smalltalk.withContext(function($ctx1) {
  6940. _st(self["@sourceArea"])._fileIn();
  6941. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.Workspace)})},
  6942. args: [],
  6943. source: "fileIn\x0a\x09sourceArea fileIn",
  6944. messageSends: ["fileIn"],
  6945. referencedClasses: []
  6946. }),
  6947. smalltalk.Workspace);
  6948. smalltalk.addMethod(
  6949. smalltalk.method({
  6950. selector: "inspectIt",
  6951. category: 'actions',
  6952. fn: function (){
  6953. var self=this;
  6954. return smalltalk.withContext(function($ctx1) {
  6955. _st(self["@sourceArea"])._inspectIt();
  6956. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.Workspace)})},
  6957. args: [],
  6958. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6959. messageSends: ["inspectIt"],
  6960. referencedClasses: []
  6961. }),
  6962. smalltalk.Workspace);
  6963. smalltalk.addMethod(
  6964. smalltalk.method({
  6965. selector: "label",
  6966. category: 'accessing',
  6967. fn: function (){
  6968. var self=this;
  6969. return smalltalk.withContext(function($ctx1) {
  6970. return "Workspace";
  6971. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Workspace)})},
  6972. args: [],
  6973. source: "label\x0a\x09^'Workspace'",
  6974. messageSends: [],
  6975. referencedClasses: []
  6976. }),
  6977. smalltalk.Workspace);
  6978. smalltalk.addMethod(
  6979. smalltalk.method({
  6980. selector: "printIt",
  6981. category: 'actions',
  6982. fn: function (){
  6983. var self=this;
  6984. return smalltalk.withContext(function($ctx1) {
  6985. _st(self["@sourceArea"])._printIt();
  6986. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.Workspace)})},
  6987. args: [],
  6988. source: "printIt\x0a\x09sourceArea printIt",
  6989. messageSends: ["printIt"],
  6990. referencedClasses: []
  6991. }),
  6992. smalltalk.Workspace);
  6993. smalltalk.addMethod(
  6994. smalltalk.method({
  6995. selector: "renderBoxOn:",
  6996. category: 'rendering',
  6997. fn: function (html){
  6998. var self=this;
  6999. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  7000. return smalltalk.withContext(function($ctx1) {
  7001. self["@sourceArea"]=_st($SourceArea())._new();
  7002. _st(self["@sourceArea"])._renderOn_(html);
  7003. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Workspace)})},
  7004. args: ["html"],
  7005. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  7006. messageSends: ["new", "renderOn:"],
  7007. referencedClasses: ["SourceArea"]
  7008. }),
  7009. smalltalk.Workspace);
  7010. smalltalk.addMethod(
  7011. smalltalk.method({
  7012. selector: "renderButtonsOn:",
  7013. category: 'rendering',
  7014. fn: function (html){
  7015. var self=this;
  7016. return smalltalk.withContext(function($ctx1) {
  7017. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  7018. $1=_st(html)._button();
  7019. $ctx1.sendIdx["button"]=1;
  7020. _st($1)._with_("DoIt");
  7021. $ctx1.sendIdx["with:"]=1;
  7022. _st($1)._title_("ctrl+d");
  7023. $ctx1.sendIdx["title:"]=1;
  7024. $2=_st($1)._onClick_((function(){
  7025. return smalltalk.withContext(function($ctx2) {
  7026. return self._doIt();
  7027. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  7028. $ctx1.sendIdx["onClick:"]=1;
  7029. $3=_st(html)._button();
  7030. $ctx1.sendIdx["button"]=2;
  7031. _st($3)._with_("PrintIt");
  7032. $ctx1.sendIdx["with:"]=2;
  7033. _st($3)._title_("ctrl+p");
  7034. $ctx1.sendIdx["title:"]=2;
  7035. $4=_st($3)._onClick_((function(){
  7036. return smalltalk.withContext(function($ctx2) {
  7037. return self._printIt();
  7038. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  7039. $ctx1.sendIdx["onClick:"]=2;
  7040. $5=_st(html)._button();
  7041. $ctx1.sendIdx["button"]=3;
  7042. _st($5)._with_("InspectIt");
  7043. $ctx1.sendIdx["with:"]=3;
  7044. _st($5)._title_("ctrl+i");
  7045. $ctx1.sendIdx["title:"]=3;
  7046. $6=_st($5)._onClick_((function(){
  7047. return smalltalk.withContext(function($ctx2) {
  7048. return self._inspectIt();
  7049. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  7050. $ctx1.sendIdx["onClick:"]=3;
  7051. $7=_st(html)._button();
  7052. $ctx1.sendIdx["button"]=4;
  7053. _st($7)._with_("FileIn");
  7054. $ctx1.sendIdx["with:"]=4;
  7055. _st($7)._title_("ctrl+f");
  7056. $8=_st($7)._onClick_((function(){
  7057. return smalltalk.withContext(function($ctx2) {
  7058. return self._fileIn();
  7059. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  7060. $ctx1.sendIdx["onClick:"]=4;
  7061. $9=_st(html)._button();
  7062. _st($9)._with_("Clear workspace");
  7063. $10=_st($9)._onClick_((function(){
  7064. return smalltalk.withContext(function($ctx2) {
  7065. return self._clearWorkspace();
  7066. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  7067. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Workspace)})},
  7068. args: ["html"],
  7069. 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]",
  7070. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  7071. referencedClasses: []
  7072. }),
  7073. smalltalk.Workspace);
  7074. smalltalk.addMethod(
  7075. smalltalk.method({
  7076. selector: "show",
  7077. category: 'actions',
  7078. fn: function (){
  7079. var self=this;
  7080. return smalltalk.withContext(function($ctx1) {
  7081. smalltalk.Workspace.superclass.fn.prototype._show.apply(_st(self), []);
  7082. _st(self["@sourceArea"])._focus();
  7083. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.Workspace)})},
  7084. args: [],
  7085. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  7086. messageSends: ["show", "focus"],
  7087. referencedClasses: []
  7088. }),
  7089. smalltalk.Workspace);
  7090. smalltalk.addMethod(
  7091. smalltalk.method({
  7092. selector: "inspectOn:",
  7093. category: '*IDE',
  7094. fn: function (anInspector){
  7095. var self=this;
  7096. var variables;
  7097. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7098. return smalltalk.withContext(function($ctx1) {
  7099. var $1;
  7100. variables=_st($Dictionary())._new();
  7101. _st(variables)._at_put_("#self",self);
  7102. $ctx1.sendIdx["at:put:"]=1;
  7103. _st(variables)._at_put_("#year",self._year());
  7104. $ctx1.sendIdx["at:put:"]=2;
  7105. _st(variables)._at_put_("#month",self._month());
  7106. $ctx1.sendIdx["at:put:"]=3;
  7107. _st(variables)._at_put_("#day",self._day());
  7108. $ctx1.sendIdx["at:put:"]=4;
  7109. _st(variables)._at_put_("#hours",self._hours());
  7110. $ctx1.sendIdx["at:put:"]=5;
  7111. _st(variables)._at_put_("#minutes",self._minutes());
  7112. $ctx1.sendIdx["at:put:"]=6;
  7113. _st(variables)._at_put_("#seconds",self._seconds());
  7114. $ctx1.sendIdx["at:put:"]=7;
  7115. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  7116. _st(anInspector)._setLabel_(self._printString());
  7117. $1=_st(anInspector)._setVariables_(variables);
  7118. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Date)})},
  7119. args: ["anInspector"],
  7120. 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",
  7121. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  7122. referencedClasses: ["Dictionary"]
  7123. }),
  7124. smalltalk.Date);
  7125. smalltalk.addMethod(
  7126. smalltalk.method({
  7127. selector: "inspectOn:",
  7128. category: '*IDE',
  7129. fn: function (anInspector){
  7130. var self=this;
  7131. var variables;
  7132. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7133. return smalltalk.withContext(function($ctx1) {
  7134. var $1;
  7135. variables=_st($Dictionary())._new();
  7136. _st(variables)._at_put_("#self",self);
  7137. $ctx1.sendIdx["at:put:"]=1;
  7138. self._withIndexDo_((function(each,i){
  7139. return smalltalk.withContext(function($ctx2) {
  7140. return _st(variables)._at_put_(i,each);
  7141. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  7142. _st(anInspector)._setLabel_(self._printString());
  7143. $1=_st(anInspector)._setVariables_(variables);
  7144. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Collection)})},
  7145. args: ["anInspector"],
  7146. 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",
  7147. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  7148. referencedClasses: ["Dictionary"]
  7149. }),
  7150. smalltalk.Collection);
  7151. smalltalk.addMethod(
  7152. smalltalk.method({
  7153. selector: "inspectOn:",
  7154. category: '*IDE',
  7155. fn: function (anInspector){
  7156. var self=this;
  7157. var label;
  7158. return smalltalk.withContext(function($ctx1) {
  7159. var $3,$2,$1,$5,$4;
  7160. smalltalk.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  7161. $3=self._printString();
  7162. $ctx1.sendIdx["printString"]=1;
  7163. $2=_st($3)._size();
  7164. $1=_st($2).__gt((30));
  7165. if(smalltalk.assert($1)){
  7166. $5=self._printString();
  7167. $ctx1.sendIdx["printString"]=2;
  7168. $4=_st($5)._copyFrom_to_((1),(30));
  7169. label=_st($4).__comma("...'");
  7170. label;
  7171. } else {
  7172. label=self._printString();
  7173. label;
  7174. };
  7175. _st(anInspector)._setLabel_(label);
  7176. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},smalltalk.String)})},
  7177. args: ["anInspector"],
  7178. 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",
  7179. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7180. referencedClasses: []
  7181. }),
  7182. smalltalk.String);
  7183. smalltalk.addMethod(
  7184. smalltalk.method({
  7185. selector: "inspectOn:",
  7186. category: '*IDE',
  7187. fn: function (anInspector){
  7188. var self=this;
  7189. var variables;
  7190. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7191. return smalltalk.withContext(function($ctx1) {
  7192. var $1;
  7193. variables=_st($Dictionary())._new();
  7194. _st(variables)._at_put_("#self",self);
  7195. $ctx1.sendIdx["at:put:"]=1;
  7196. _st(variables)._at_put_("#home",self._home());
  7197. $ctx1.sendIdx["at:put:"]=2;
  7198. _st(variables)._at_put_("#receiver",self._receiver());
  7199. $ctx1.sendIdx["at:put:"]=3;
  7200. _st(variables)._at_put_("#selector",self._selector());
  7201. $ctx1.sendIdx["at:put:"]=4;
  7202. _st(variables)._at_put_("#temps",self._temps());
  7203. $ctx1.sendIdx["at:put:"]=5;
  7204. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7205. return smalltalk.withContext(function($ctx2) {
  7206. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7207. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7208. _st(anInspector)._setLabel_(self._printString());
  7209. $1=_st(anInspector)._setVariables_(variables);
  7210. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.MethodContext)})},
  7211. args: ["anInspector"],
  7212. 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",
  7213. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7214. referencedClasses: ["Dictionary"]
  7215. }),
  7216. smalltalk.MethodContext);
  7217. smalltalk.addMethod(
  7218. smalltalk.method({
  7219. selector: "inspectOn:",
  7220. category: '*IDE',
  7221. fn: function (anInspector){
  7222. var self=this;
  7223. var variables;
  7224. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7225. return smalltalk.withContext(function($ctx1) {
  7226. var $1;
  7227. variables=_st($Dictionary())._new();
  7228. _st(variables)._at_put_("#self",self);
  7229. $ctx1.sendIdx["at:put:"]=1;
  7230. _st(variables)._at_put_("#keys",self._keys());
  7231. $ctx1.sendIdx["at:put:"]=2;
  7232. self._keysAndValuesDo_((function(key,value){
  7233. return smalltalk.withContext(function($ctx2) {
  7234. return _st(variables)._at_put_(key,value);
  7235. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  7236. _st(anInspector)._setLabel_(self._printString());
  7237. $1=_st(anInspector)._setVariables_(variables);
  7238. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.HashedCollection)})},
  7239. args: ["anInspector"],
  7240. 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",
  7241. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  7242. referencedClasses: ["Dictionary"]
  7243. }),
  7244. smalltalk.HashedCollection);
  7245. smalltalk.addMethod(
  7246. smalltalk.method({
  7247. selector: "inspectOn:",
  7248. category: '*IDE',
  7249. fn: function (anInspector){
  7250. var self=this;
  7251. var variables;
  7252. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7253. return smalltalk.withContext(function($ctx1) {
  7254. var $1;
  7255. variables=_st($Dictionary())._new();
  7256. _st(variables)._at_put_("#self",self);
  7257. $ctx1.sendIdx["at:put:"]=1;
  7258. _st(self["@elements"])._withIndexDo_((function(each,i){
  7259. return smalltalk.withContext(function($ctx2) {
  7260. return _st(variables)._at_put_(i,each);
  7261. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  7262. _st(anInspector)._setLabel_(self._printString());
  7263. $1=_st(anInspector)._setVariables_(variables);
  7264. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Set)})},
  7265. args: ["anInspector"],
  7266. source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09elements withIndexDo: [:each :i |\x0a\x09\x09variables at: i put: each].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7267. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  7268. referencedClasses: ["Dictionary"]
  7269. }),
  7270. smalltalk.Set);
  7271. });