2
0

IDE.js 267 KB

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