IDE.js 262 KB

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