IDE.js 274 KB

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