IDE.js 262 KB

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