2
0

IDE.js 273 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_core/Canvas", "amber_core/Kernel-Exceptions", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st){
  2. smalltalk.addPackage('IDE');
  3. smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "browser",
  8. category: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. return smalltalk.withContext(function($ctx1) {
  12. var $1;
  13. $1=self["@browser"];
  14. return $1;
  15. }, function($ctx1) {$ctx1.fill(self,"browser",{},smalltalk.ClassesList)})},
  16. args: [],
  17. source: "browser\x0a\x09^browser",
  18. messageSends: [],
  19. referencedClasses: []
  20. }),
  21. smalltalk.ClassesList);
  22. smalltalk.addMethod(
  23. smalltalk.method({
  24. selector: "browser:",
  25. category: 'accessing',
  26. fn: function (aBrowser){
  27. var self=this;
  28. return smalltalk.withContext(function($ctx1) {
  29. self["@browser"]=aBrowser;
  30. return self}, function($ctx1) {$ctx1.fill(self,"browser:",{aBrowser:aBrowser},smalltalk.ClassesList)})},
  31. args: ["aBrowser"],
  32. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  33. messageSends: [],
  34. referencedClasses: []
  35. }),
  36. smalltalk.ClassesList);
  37. smalltalk.addMethod(
  38. smalltalk.method({
  39. selector: "category",
  40. category: 'accessing',
  41. fn: function (){
  42. var self=this;
  43. return smalltalk.withContext(function($ctx1) {
  44. var $1;
  45. $1=_st(self._browser())._selectedPackage();
  46. return $1;
  47. }, function($ctx1) {$ctx1.fill(self,"category",{},smalltalk.ClassesList)})},
  48. args: [],
  49. source: "category\x0a\x09^self browser selectedPackage",
  50. messageSends: ["selectedPackage", "browser"],
  51. referencedClasses: []
  52. }),
  53. smalltalk.ClassesList);
  54. smalltalk.addMethod(
  55. smalltalk.method({
  56. selector: "getNodes",
  57. category: 'accessing',
  58. fn: function (){
  59. var self=this;
  60. var classes,children,others;
  61. function $ClassesListNode(){return smalltalk.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  62. return smalltalk.withContext(function($ctx1) {
  63. var $1,$2,$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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '',
  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. category: '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. category: '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. category: '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. category: '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. category: 'initialization',
  466. fn: function (){
  467. var self=this;
  468. return smalltalk.withContext(function($ctx1) {
  469. self._register();
  470. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.DebugErrorHandler.klass)})},
  471. args: [],
  472. source: "initialize\x0a\x09self register",
  473. messageSends: ["register"],
  474. referencedClasses: []
  475. }),
  476. smalltalk.DebugErrorHandler.klass);
  477. smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  478. smalltalk.addMethod(
  479. smalltalk.method({
  480. selector: "clear",
  481. category: 'actions',
  482. fn: function (){
  483. var self=this;
  484. return smalltalk.withContext(function($ctx1) {
  485. self._val_("");
  486. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},smalltalk.SourceArea)})},
  487. args: [],
  488. source: "clear\x0a\x09self val: ''",
  489. messageSends: ["val:"],
  490. referencedClasses: []
  491. }),
  492. smalltalk.SourceArea);
  493. smalltalk.addMethod(
  494. smalltalk.method({
  495. selector: "currentLine",
  496. category: 'accessing',
  497. fn: function (){
  498. var self=this;
  499. return smalltalk.withContext(function($ctx1) {
  500. var $1;
  501. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  502. return $1;
  503. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},smalltalk.SourceArea)})},
  504. args: [],
  505. source: "currentLine\x0a\x09^editor getLine: (editor getCursor line)",
  506. messageSends: ["getLine:", "line", "getCursor"],
  507. referencedClasses: []
  508. }),
  509. smalltalk.SourceArea);
  510. smalltalk.addMethod(
  511. smalltalk.method({
  512. selector: "currentLineOrSelection",
  513. category: 'accessing',
  514. fn: function (){
  515. var self=this;
  516. return smalltalk.withContext(function($ctx1) {
  517. var $2,$1;
  518. $2=_st(self["@editor"])._somethingSelected();
  519. if(smalltalk.assert($2)){
  520. $1=self._selection();
  521. } else {
  522. $1=self._currentLine();
  523. };
  524. return $1;
  525. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},smalltalk.SourceArea)})},
  526. args: [],
  527. source: "currentLineOrSelection\x0a\x09^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
  528. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"],
  529. referencedClasses: []
  530. }),
  531. smalltalk.SourceArea);
  532. smalltalk.addMethod(
  533. smalltalk.method({
  534. selector: "doIt",
  535. category: 'actions',
  536. fn: function (){
  537. var self=this;
  538. var result;
  539. return smalltalk.withContext(function($ctx1) {
  540. var $1,$2;
  541. result=self._eval_(self._currentLineOrSelection());
  542. $1=self._onDoIt();
  543. $ctx1.sendIdx["onDoIt"]=1;
  544. if(($receiver = $1) == nil || $receiver == null){
  545. $1;
  546. } else {
  547. _st(self._onDoIt())._value();
  548. };
  549. $2=result;
  550. return $2;
  551. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},smalltalk.SourceArea)})},
  552. args: [],
  553. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [self onDoIt value].\x0a\x09^result",
  554. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"],
  555. referencedClasses: []
  556. }),
  557. smalltalk.SourceArea);
  558. smalltalk.addMethod(
  559. smalltalk.method({
  560. selector: "editor",
  561. category: 'accessing',
  562. fn: function (){
  563. var self=this;
  564. return smalltalk.withContext(function($ctx1) {
  565. var $1;
  566. $1=self["@editor"];
  567. return $1;
  568. }, function($ctx1) {$ctx1.fill(self,"editor",{},smalltalk.SourceArea)})},
  569. args: [],
  570. source: "editor\x0a\x09^editor",
  571. messageSends: [],
  572. referencedClasses: []
  573. }),
  574. smalltalk.SourceArea);
  575. smalltalk.addMethod(
  576. smalltalk.method({
  577. selector: "eval:",
  578. category: 'actions',
  579. fn: function (aString){
  580. var self=this;
  581. var compiler;
  582. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  583. function $Error(){return smalltalk.Error||(typeof Error=="undefined"?nil:Error)}
  584. return smalltalk.withContext(function($ctx1) {
  585. var $1,$2;
  586. var $early={};
  587. try {
  588. compiler=_st($Compiler())._new();
  589. _st((function(){
  590. return smalltalk.withContext(function($ctx2) {
  591. return _st(compiler)._parseExpression_(aString);
  592. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
  593. return smalltalk.withContext(function($ctx2) {
  594. $1=self._alert_(_st(ex)._messageText());
  595. throw $early=[$1];
  596. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  597. $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
  598. return $2;
  599. }
  600. catch(e) {if(e===$early)return e[0]; throw e}
  601. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},smalltalk.SourceArea)})},
  602. args: ["aString"],
  603. 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",
  604. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
  605. referencedClasses: ["Compiler", "Error"]
  606. }),
  607. smalltalk.SourceArea);
  608. smalltalk.addMethod(
  609. smalltalk.method({
  610. selector: "fileIn",
  611. category: 'actions',
  612. fn: function (){
  613. var self=this;
  614. function $Importer(){return smalltalk.Importer||(typeof Importer=="undefined"?nil:Importer)}
  615. return smalltalk.withContext(function($ctx1) {
  616. _st(_st($Importer())._new())._import_(_st(self._currentLineOrSelection())._readStream());
  617. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.SourceArea)})},
  618. args: [],
  619. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  620. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"],
  621. referencedClasses: ["Importer"]
  622. }),
  623. smalltalk.SourceArea);
  624. smalltalk.addMethod(
  625. smalltalk.method({
  626. selector: "focus",
  627. category: 'actions',
  628. fn: function (){
  629. var self=this;
  630. return smalltalk.withContext(function($ctx1) {
  631. _st(self._editor())._focus();
  632. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},smalltalk.SourceArea)})},
  633. args: [],
  634. source: "focus\x0a\x09self editor focus.",
  635. messageSends: ["focus", "editor"],
  636. referencedClasses: []
  637. }),
  638. smalltalk.SourceArea);
  639. smalltalk.addMethod(
  640. smalltalk.method({
  641. selector: "handleKeyDown:",
  642. category: 'actions',
  643. fn: function (anEvent){
  644. var self=this;
  645. return smalltalk.withContext(function($ctx1) {
  646. if(anEvent.ctrlKey) {
  647. if(anEvent.keyCode === 80) { //ctrl+p
  648. self._printIt();
  649. anEvent.preventDefault();
  650. return false;
  651. }
  652. if(anEvent.keyCode === 68) { //ctrl+d
  653. self._doIt();
  654. anEvent.preventDefault();
  655. return false;
  656. }
  657. if(anEvent.keyCode === 73) { //ctrl+i
  658. self._inspectIt();
  659. anEvent.preventDefault();
  660. return false;
  661. }
  662. };
  663. return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},smalltalk.SourceArea)})},
  664. args: ["anEvent"],
  665. 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}>",
  666. messageSends: [],
  667. referencedClasses: []
  668. }),
  669. smalltalk.SourceArea);
  670. smalltalk.addMethod(
  671. smalltalk.method({
  672. selector: "inspectIt",
  673. category: 'actions',
  674. fn: function (){
  675. var self=this;
  676. return smalltalk.withContext(function($ctx1) {
  677. _st(self._doIt())._inspect();
  678. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.SourceArea)})},
  679. args: [],
  680. source: "inspectIt\x0a\x09self doIt inspect",
  681. messageSends: ["inspect", "doIt"],
  682. referencedClasses: []
  683. }),
  684. smalltalk.SourceArea);
  685. smalltalk.addMethod(
  686. smalltalk.method({
  687. selector: "onDoIt",
  688. category: 'accessing',
  689. fn: function (){
  690. var self=this;
  691. return smalltalk.withContext(function($ctx1) {
  692. var $1;
  693. $1=self["@onDoIt"];
  694. return $1;
  695. }, function($ctx1) {$ctx1.fill(self,"onDoIt",{},smalltalk.SourceArea)})},
  696. args: [],
  697. source: "onDoIt\x0a\x09^onDoIt",
  698. messageSends: [],
  699. referencedClasses: []
  700. }),
  701. smalltalk.SourceArea);
  702. smalltalk.addMethod(
  703. smalltalk.method({
  704. selector: "onDoIt:",
  705. category: 'accessing',
  706. fn: function (aBlock){
  707. var self=this;
  708. return smalltalk.withContext(function($ctx1) {
  709. self["@onDoIt"]=aBlock;
  710. return self}, function($ctx1) {$ctx1.fill(self,"onDoIt:",{aBlock:aBlock},smalltalk.SourceArea)})},
  711. args: ["aBlock"],
  712. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  713. messageSends: [],
  714. referencedClasses: []
  715. }),
  716. smalltalk.SourceArea);
  717. smalltalk.addMethod(
  718. smalltalk.method({
  719. selector: "onKeyDown:",
  720. category: 'events',
  721. fn: function (aBlock){
  722. var self=this;
  723. return smalltalk.withContext(function($ctx1) {
  724. _st(self["@div"])._onKeyDown_(aBlock);
  725. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},smalltalk.SourceArea)})},
  726. args: ["aBlock"],
  727. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  728. messageSends: ["onKeyDown:"],
  729. referencedClasses: []
  730. }),
  731. smalltalk.SourceArea);
  732. smalltalk.addMethod(
  733. smalltalk.method({
  734. selector: "onKeyUp:",
  735. category: 'events',
  736. fn: function (aBlock){
  737. var self=this;
  738. return smalltalk.withContext(function($ctx1) {
  739. _st(self["@div"])._onKeyUp_(aBlock);
  740. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},smalltalk.SourceArea)})},
  741. args: ["aBlock"],
  742. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  743. messageSends: ["onKeyUp:"],
  744. referencedClasses: []
  745. }),
  746. smalltalk.SourceArea);
  747. smalltalk.addMethod(
  748. smalltalk.method({
  749. selector: "print:",
  750. category: 'actions',
  751. fn: function (aString){
  752. var self=this;
  753. var start,stop,currentLine;
  754. function $HashedCollection(){return smalltalk.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  755. return smalltalk.withContext(function($ctx1) {
  756. var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
  757. $1=_st(self["@editor"])._getCursor_(false);
  758. $ctx1.sendIdx["getCursor:"]=1;
  759. currentLine=_st($1)._line();
  760. start=_st($HashedCollection())._new();
  761. $ctx1.sendIdx["new"]=1;
  762. _st(start)._at_put_("line",currentLine);
  763. $ctx1.sendIdx["at:put:"]=1;
  764. $2=start;
  765. $4=_st(self["@editor"])._getCursor_(false);
  766. $ctx1.sendIdx["getCursor:"]=2;
  767. $3=_st($4)._ch();
  768. _st($2)._at_put_("ch",$3);
  769. $ctx1.sendIdx["at:put:"]=2;
  770. $5=_st(self["@editor"])._getSelection();
  771. $ctx1.sendIdx["getSelection"]=1;
  772. _st($5)._ifEmpty_((function(){
  773. return smalltalk.withContext(function($ctx2) {
  774. $6=start;
  775. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  776. $ctx2.sendIdx["size"]=1;
  777. _st($6)._at_put_("ch",$7);
  778. $ctx2.sendIdx["at:put:"]=3;
  779. $8=self["@editor"];
  780. $10="line".__minus_gt(currentLine);
  781. $ctx2.sendIdx["->"]=1;
  782. $9=smalltalk.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
  783. return _st($8)._setSelection_end_($9,start);
  784. $ctx2.sendIdx["setSelection:end:"]=1;
  785. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  786. stop=_st($HashedCollection())._new();
  787. _st(stop)._at_put_("line",currentLine);
  788. $ctx1.sendIdx["at:put:"]=4;
  789. $11=stop;
  790. $12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
  791. $ctx1.sendIdx["+"]=1;
  792. _st($11)._at_put_("ch",$12);
  793. $13=self["@editor"];
  794. $15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  795. $ctx1.sendIdx[","]=2;
  796. $14=_st($15).__comma(" ");
  797. $ctx1.sendIdx[","]=1;
  798. _st($13)._replaceSelection_($14);
  799. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  800. _st(self["@editor"])._setSelection_end_(stop,start);
  801. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},smalltalk.SourceArea)})},
  802. args: ["aString"],
  803. 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",
  804. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "->", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  805. referencedClasses: ["HashedCollection"]
  806. }),
  807. smalltalk.SourceArea);
  808. smalltalk.addMethod(
  809. smalltalk.method({
  810. selector: "printIt",
  811. category: 'actions',
  812. fn: function (){
  813. var self=this;
  814. return smalltalk.withContext(function($ctx1) {
  815. self._print_(_st(self._doIt())._printString());
  816. self._focus();
  817. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.SourceArea)})},
  818. args: [],
  819. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  820. messageSends: ["print:", "printString", "doIt", "focus"],
  821. referencedClasses: []
  822. }),
  823. smalltalk.SourceArea);
  824. smalltalk.addMethod(
  825. smalltalk.method({
  826. selector: "receiver",
  827. category: 'accessing',
  828. fn: function (){
  829. var self=this;
  830. function $DoIt(){return smalltalk.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  831. return smalltalk.withContext(function($ctx1) {
  832. var $2,$1;
  833. $2=self["@receiver"];
  834. if(($receiver = $2) == nil || $receiver == null){
  835. $1=_st($DoIt())._new();
  836. } else {
  837. $1=$2;
  838. };
  839. return $1;
  840. }, function($ctx1) {$ctx1.fill(self,"receiver",{},smalltalk.SourceArea)})},
  841. args: [],
  842. source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
  843. messageSends: ["ifNil:", "new"],
  844. referencedClasses: ["DoIt"]
  845. }),
  846. smalltalk.SourceArea);
  847. smalltalk.addMethod(
  848. smalltalk.method({
  849. selector: "receiver:",
  850. category: 'accessing',
  851. fn: function (anObject){
  852. var self=this;
  853. return smalltalk.withContext(function($ctx1) {
  854. self["@receiver"]=anObject;
  855. return self}, function($ctx1) {$ctx1.fill(self,"receiver:",{anObject:anObject},smalltalk.SourceArea)})},
  856. args: ["anObject"],
  857. source: "receiver: anObject\x0a\x09receiver := anObject",
  858. messageSends: [],
  859. referencedClasses: []
  860. }),
  861. smalltalk.SourceArea);
  862. smalltalk.addMethod(
  863. smalltalk.method({
  864. selector: "renderOn:",
  865. category: 'rendering',
  866. fn: function (html){
  867. var self=this;
  868. var textarea;
  869. return smalltalk.withContext(function($ctx1) {
  870. self["@div"]=_st(_st(html)._div())._class_("source");
  871. _st(self["@div"])._with_((function(){
  872. return smalltalk.withContext(function($ctx2) {
  873. textarea=_st(html)._textarea();
  874. return textarea;
  875. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  876. self._setEditorOn_(_st(textarea)._element());
  877. _st(self["@div"])._onKeyDown_((function(e){
  878. return smalltalk.withContext(function($ctx2) {
  879. return self._handleKeyDown_(e);
  880. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  881. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},smalltalk.SourceArea)})},
  882. args: ["html"],
  883. 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]",
  884. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  885. referencedClasses: []
  886. }),
  887. smalltalk.SourceArea);
  888. smalltalk.addMethod(
  889. smalltalk.method({
  890. selector: "selection",
  891. category: 'accessing',
  892. fn: function (){
  893. var self=this;
  894. return smalltalk.withContext(function($ctx1) {
  895. var $1;
  896. $1=_st(self["@editor"])._getSelection();
  897. return $1;
  898. }, function($ctx1) {$ctx1.fill(self,"selection",{},smalltalk.SourceArea)})},
  899. args: [],
  900. source: "selection\x0a\x09^editor getSelection",
  901. messageSends: ["getSelection"],
  902. referencedClasses: []
  903. }),
  904. smalltalk.SourceArea);
  905. smalltalk.addMethod(
  906. smalltalk.method({
  907. selector: "setEditorOn:",
  908. category: 'accessing',
  909. fn: function (aTextarea){
  910. var self=this;
  911. return smalltalk.withContext(function($ctx1) {
  912. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  913. theme: 'amber',
  914. lineNumbers: true,
  915. enterMode: 'flat',
  916. indentWithTabs: true,
  917. indentUnit: 4,
  918. matchBrackets: true,
  919. electricChars: false
  920. });
  921. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},smalltalk.SourceArea)})},
  922. args: ["aTextarea"],
  923. 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})>",
  924. messageSends: [],
  925. referencedClasses: []
  926. }),
  927. smalltalk.SourceArea);
  928. smalltalk.addMethod(
  929. smalltalk.method({
  930. selector: "val",
  931. category: 'accessing',
  932. fn: function (){
  933. var self=this;
  934. return smalltalk.withContext(function($ctx1) {
  935. var $1;
  936. $1=_st(self["@editor"])._getValue();
  937. return $1;
  938. }, function($ctx1) {$ctx1.fill(self,"val",{},smalltalk.SourceArea)})},
  939. args: [],
  940. source: "val\x0a\x09^editor getValue",
  941. messageSends: ["getValue"],
  942. referencedClasses: []
  943. }),
  944. smalltalk.SourceArea);
  945. smalltalk.addMethod(
  946. smalltalk.method({
  947. selector: "val:",
  948. category: 'accessing',
  949. fn: function (aString){
  950. var self=this;
  951. return smalltalk.withContext(function($ctx1) {
  952. _st(self["@editor"])._setValue_(aString);
  953. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},smalltalk.SourceArea)})},
  954. args: ["aString"],
  955. source: "val: aString\x0a\x09editor setValue: aString",
  956. messageSends: ["setValue:"],
  957. referencedClasses: []
  958. }),
  959. smalltalk.SourceArea);
  960. smalltalk.addMethod(
  961. smalltalk.method({
  962. selector: "initialize",
  963. category: 'initialization',
  964. fn: function (){
  965. var self=this;
  966. return smalltalk.withContext(function($ctx1) {
  967. smalltalk.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  968. self._setupCodeMirror();
  969. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.SourceArea.klass)})},
  970. args: [],
  971. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  972. messageSends: ["initialize", "setupCodeMirror"],
  973. referencedClasses: []
  974. }),
  975. smalltalk.SourceArea.klass);
  976. smalltalk.addMethod(
  977. smalltalk.method({
  978. selector: "setupCodeMirror",
  979. category: 'initialization',
  980. fn: function (){
  981. var self=this;
  982. return smalltalk.withContext(function($ctx1) {
  983. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  984. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},smalltalk.SourceArea.klass)})},
  985. args: [],
  986. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  987. messageSends: [],
  988. referencedClasses: []
  989. }),
  990. smalltalk.SourceArea.klass);
  991. smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  992. smalltalk.addMethod(
  993. smalltalk.method({
  994. selector: "addTab:",
  995. category: 'adding/Removing',
  996. fn: function (aWidget){
  997. var self=this;
  998. return smalltalk.withContext(function($ctx1) {
  999. _st(self._tabs())._add_(aWidget);
  1000. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  1001. _st(aWidget)._hide();
  1002. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1003. args: ["aWidget"],
  1004. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  1005. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  1006. referencedClasses: []
  1007. }),
  1008. smalltalk.TabManager);
  1009. smalltalk.addMethod(
  1010. smalltalk.method({
  1011. selector: "close",
  1012. category: 'actions',
  1013. fn: function (){
  1014. var self=this;
  1015. return smalltalk.withContext(function($ctx1) {
  1016. var $1,$2,$3;
  1017. $1=self["@opened"];
  1018. if(smalltalk.assert($1)){
  1019. $2="#amber"._asJQuery();
  1020. $ctx1.sendIdx["asJQuery"]=1;
  1021. _st($2)._hide();
  1022. $ctx1.sendIdx["hide"]=1;
  1023. $3=_st(self["@ul"])._asJQuery();
  1024. $ctx1.sendIdx["asJQuery"]=2;
  1025. _st($3)._hide();
  1026. $ctx1.sendIdx["hide"]=2;
  1027. _st(self["@selectedTab"])._hide();
  1028. self._removeBodyMargin();
  1029. _st("body"._asJQuery())._removeClass_("amberBody");
  1030. self["@opened"]=false;
  1031. self["@opened"];
  1032. };
  1033. return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.TabManager)})},
  1034. args: [],
  1035. 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]",
  1036. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1037. referencedClasses: []
  1038. }),
  1039. smalltalk.TabManager);
  1040. smalltalk.addMethod(
  1041. smalltalk.method({
  1042. selector: "closeTab:",
  1043. category: 'actions',
  1044. fn: function (aWidget){
  1045. var self=this;
  1046. return smalltalk.withContext(function($ctx1) {
  1047. self._removeTab_(aWidget);
  1048. self._selectTab_(_st(self._tabs())._last());
  1049. _st(aWidget)._remove();
  1050. self._update();
  1051. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1052. args: ["aWidget"],
  1053. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1054. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1055. referencedClasses: []
  1056. }),
  1057. smalltalk.TabManager);
  1058. smalltalk.addMethod(
  1059. smalltalk.method({
  1060. selector: "initialize",
  1061. category: 'initialization',
  1062. fn: function (){
  1063. var self=this;
  1064. function $InspectorHandler(){return smalltalk.InspectorHandler||(typeof InspectorHandler=="undefined"?nil:InspectorHandler)}
  1065. function $Inspector(){return smalltalk.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1066. function $IDETranscript(){return smalltalk.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1067. function $Workspace(){return smalltalk.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1068. function $TestRunner(){return smalltalk.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1069. return smalltalk.withContext(function($ctx1) {
  1070. var $1,$2,$3,$4,$5,$6,$7;
  1071. smalltalk.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  1072. _st($InspectorHandler())._register_($Inspector());
  1073. self["@opened"]=true;
  1074. $1=(function(html){
  1075. return smalltalk.withContext(function($ctx2) {
  1076. return _st(_st(html)._div())._id_("amber");
  1077. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1078. $2="body"._asJQuery();
  1079. $ctx1.sendIdx["asJQuery"]=1;
  1080. _st($1)._appendToJQuery_($2);
  1081. $ctx1.sendIdx["appendToJQuery:"]=1;
  1082. $3="body"._asJQuery();
  1083. $ctx1.sendIdx["asJQuery"]=2;
  1084. _st($3)._addClass_("amberBody");
  1085. self._appendToJQuery_("#amber"._asJQuery());
  1086. self._addTab_(_st($IDETranscript())._current());
  1087. $ctx1.sendIdx["addTab:"]=1;
  1088. $4=_st($Workspace())._new();
  1089. $ctx1.sendIdx["new"]=1;
  1090. self._addTab_($4);
  1091. $ctx1.sendIdx["addTab:"]=2;
  1092. $5=self._addTab_(_st($TestRunner())._new());
  1093. self._selectTab_(_st(self._tabs())._last());
  1094. self._onResize_((function(){
  1095. return smalltalk.withContext(function($ctx2) {
  1096. self._updateBodyMargin();
  1097. $6=self._updatePosition();
  1098. $ctx2.sendIdx["updatePosition"]=1;
  1099. return $6;
  1100. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1101. $7=self._onWindowResize_((function(){
  1102. return smalltalk.withContext(function($ctx2) {
  1103. return self._updatePosition();
  1104. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1105. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TabManager)})},
  1106. args: [],
  1107. 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]",
  1108. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1109. referencedClasses: ["InspectorHandler", "Inspector", "IDETranscript", "Workspace", "TestRunner"]
  1110. }),
  1111. smalltalk.TabManager);
  1112. smalltalk.addMethod(
  1113. smalltalk.method({
  1114. selector: "labelFor:",
  1115. category: 'accessing',
  1116. fn: function (aWidget){
  1117. var self=this;
  1118. var label,maxSize;
  1119. return smalltalk.withContext(function($ctx1) {
  1120. var $1,$4,$3,$2,$5,$6;
  1121. maxSize=(15);
  1122. $1=_st(aWidget)._label();
  1123. $ctx1.sendIdx["label"]=1;
  1124. $4=_st(aWidget)._label();
  1125. $ctx1.sendIdx["label"]=2;
  1126. $3=_st($4)._size();
  1127. $ctx1.sendIdx["size"]=1;
  1128. $2=_st($3)._min_(maxSize);
  1129. label=_st($1)._copyFrom_to_((0),$2);
  1130. $5=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  1131. if(smalltalk.assert($5)){
  1132. label=_st(label).__comma("...");
  1133. label;
  1134. };
  1135. $6=label;
  1136. return $6;
  1137. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},smalltalk.TabManager)})},
  1138. args: ["aWidget"],
  1139. 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",
  1140. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1141. referencedClasses: []
  1142. }),
  1143. smalltalk.TabManager);
  1144. smalltalk.addMethod(
  1145. smalltalk.method({
  1146. selector: "newBrowserTab",
  1147. category: 'actions',
  1148. fn: function (){
  1149. var self=this;
  1150. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1151. return smalltalk.withContext(function($ctx1) {
  1152. _st($Browser())._open();
  1153. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},smalltalk.TabManager)})},
  1154. args: [],
  1155. source: "newBrowserTab\x0a\x09Browser open",
  1156. messageSends: ["open"],
  1157. referencedClasses: ["Browser"]
  1158. }),
  1159. smalltalk.TabManager);
  1160. smalltalk.addMethod(
  1161. smalltalk.method({
  1162. selector: "onResize:",
  1163. category: 'actions',
  1164. fn: function (aBlock){
  1165. var self=this;
  1166. return smalltalk.withContext(function($ctx1) {
  1167. var $1,$3,$4,$2;
  1168. $1="#amber"._asJQuery();
  1169. $3="handles".__minus_gt("n");
  1170. $ctx1.sendIdx["->"]=1;
  1171. $4="resize".__minus_gt(aBlock);
  1172. $ctx1.sendIdx["->"]=2;
  1173. $2=smalltalk.HashedCollection._from_([$3,$4,"minHeight".__minus_gt((230))]);
  1174. _st($1)._resizable_($2);
  1175. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},smalltalk.TabManager)})},
  1176. args: ["aBlock"],
  1177. 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}",
  1178. messageSends: ["resizable:", "asJQuery", "->"],
  1179. referencedClasses: []
  1180. }),
  1181. smalltalk.TabManager);
  1182. smalltalk.addMethod(
  1183. smalltalk.method({
  1184. selector: "onWindowResize:",
  1185. category: 'actions',
  1186. fn: function (aBlock){
  1187. var self=this;
  1188. return smalltalk.withContext(function($ctx1) {
  1189. _st(_st(window)._asJQuery())._resize_(aBlock);
  1190. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},smalltalk.TabManager)})},
  1191. args: ["aBlock"],
  1192. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1193. messageSends: ["resize:", "asJQuery"],
  1194. referencedClasses: []
  1195. }),
  1196. smalltalk.TabManager);
  1197. smalltalk.addMethod(
  1198. smalltalk.method({
  1199. selector: "open",
  1200. category: 'actions',
  1201. fn: function (){
  1202. var self=this;
  1203. return smalltalk.withContext(function($ctx1) {
  1204. var $1,$2,$3;
  1205. $1=self["@opened"];
  1206. if(! smalltalk.assert($1)){
  1207. $2="body"._asJQuery();
  1208. $ctx1.sendIdx["asJQuery"]=1;
  1209. _st($2)._addClass_("amberBody");
  1210. $3="#amber"._asJQuery();
  1211. $ctx1.sendIdx["asJQuery"]=2;
  1212. _st($3)._show();
  1213. $ctx1.sendIdx["show"]=1;
  1214. _st(_st(self["@ul"])._asJQuery())._show();
  1215. $ctx1.sendIdx["show"]=2;
  1216. self._updateBodyMargin();
  1217. _st(self["@selectedTab"])._show();
  1218. self["@opened"]=true;
  1219. self["@opened"];
  1220. };
  1221. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabManager)})},
  1222. args: [],
  1223. 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]",
  1224. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1225. referencedClasses: []
  1226. }),
  1227. smalltalk.TabManager);
  1228. smalltalk.addMethod(
  1229. smalltalk.method({
  1230. selector: "removeBodyMargin",
  1231. category: 'actions',
  1232. fn: function (){
  1233. var self=this;
  1234. return smalltalk.withContext(function($ctx1) {
  1235. self._setBodyMargin_((0));
  1236. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},smalltalk.TabManager)})},
  1237. args: [],
  1238. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1239. messageSends: ["setBodyMargin:"],
  1240. referencedClasses: []
  1241. }),
  1242. smalltalk.TabManager);
  1243. smalltalk.addMethod(
  1244. smalltalk.method({
  1245. selector: "removeTab:",
  1246. category: 'adding/Removing',
  1247. fn: function (aWidget){
  1248. var self=this;
  1249. return smalltalk.withContext(function($ctx1) {
  1250. _st(self._tabs())._remove_(aWidget);
  1251. self._update();
  1252. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1253. args: ["aWidget"],
  1254. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1255. messageSends: ["remove:", "tabs", "update"],
  1256. referencedClasses: []
  1257. }),
  1258. smalltalk.TabManager);
  1259. smalltalk.addMethod(
  1260. smalltalk.method({
  1261. selector: "renderOn:",
  1262. category: 'rendering',
  1263. fn: function (html){
  1264. var self=this;
  1265. return smalltalk.withContext(function($ctx1) {
  1266. var $1,$2;
  1267. _st(_st(html)._div())._id_("logo");
  1268. $ctx1.sendIdx["id:"]=1;
  1269. self._renderToolbarOn_(html);
  1270. $1=_st(html)._ul();
  1271. _st($1)._id_("amberTabs");
  1272. $2=_st($1)._yourself();
  1273. self["@ul"]=$2;
  1274. self._renderTabs();
  1275. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TabManager)})},
  1276. args: ["html"],
  1277. 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",
  1278. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1279. referencedClasses: []
  1280. }),
  1281. smalltalk.TabManager);
  1282. smalltalk.addMethod(
  1283. smalltalk.method({
  1284. selector: "renderTabFor:on:",
  1285. category: 'rendering',
  1286. fn: function (aWidget,html){
  1287. var self=this;
  1288. var li;
  1289. return smalltalk.withContext(function($ctx1) {
  1290. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10;
  1291. li=_st(html)._li();
  1292. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1293. if(smalltalk.assert($1)){
  1294. _st(li)._class_("selected");
  1295. $ctx1.sendIdx["class:"]=1;
  1296. };
  1297. $2=li;
  1298. _st($2)._with_((function(){
  1299. return smalltalk.withContext(function($ctx2) {
  1300. $3=_st(html)._span();
  1301. $ctx2.sendIdx["span"]=1;
  1302. _st($3)._class_("ltab");
  1303. $ctx2.sendIdx["class:"]=2;
  1304. $4=_st(html)._span();
  1305. $ctx2.sendIdx["span"]=2;
  1306. _st($4)._class_("mtab");
  1307. $ctx2.sendIdx["class:"]=3;
  1308. $5=_st($4)._with_((function(){
  1309. return smalltalk.withContext(function($ctx3) {
  1310. $6=_st(aWidget)._canBeClosed();
  1311. if(smalltalk.assert($6)){
  1312. $7=_st(html)._span();
  1313. $ctx3.sendIdx["span"]=3;
  1314. _st($7)._class_("close");
  1315. $ctx3.sendIdx["class:"]=4;
  1316. _st($7)._with_("x");
  1317. $ctx3.sendIdx["with:"]=3;
  1318. $8=_st($7)._onClick_((function(){
  1319. return smalltalk.withContext(function($ctx4) {
  1320. return self._closeTab_(aWidget);
  1321. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1322. $ctx3.sendIdx["onClick:"]=1;
  1323. $8;
  1324. };
  1325. $9=_st(html)._span();
  1326. $ctx3.sendIdx["span"]=4;
  1327. return _st($9)._with_(self._labelFor_(aWidget));
  1328. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1329. $ctx2.sendIdx["with:"]=2;
  1330. $5;
  1331. return _st(_st(html)._span())._class_("rtab");
  1332. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1333. $ctx1.sendIdx["with:"]=1;
  1334. $10=_st($2)._onClick_((function(){
  1335. return smalltalk.withContext(function($ctx2) {
  1336. return self._selectTab_(aWidget);
  1337. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1338. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},smalltalk.TabManager)})},
  1339. args: ["aWidget", "html"],
  1340. 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]",
  1341. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1342. referencedClasses: []
  1343. }),
  1344. smalltalk.TabManager);
  1345. smalltalk.addMethod(
  1346. smalltalk.method({
  1347. selector: "renderTabs",
  1348. category: 'rendering',
  1349. fn: function (){
  1350. var self=this;
  1351. return smalltalk.withContext(function($ctx1) {
  1352. var $1,$2,$3,$4,$5;
  1353. _st(self["@ul"])._contents_((function(html){
  1354. return smalltalk.withContext(function($ctx2) {
  1355. _st(self._tabs())._do_((function(each){
  1356. return smalltalk.withContext(function($ctx3) {
  1357. return self._renderTabFor_on_(each,html);
  1358. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1359. $1=_st(html)._li();
  1360. _st($1)._class_("newtab");
  1361. $ctx2.sendIdx["class:"]=1;
  1362. _st($1)._with_((function(){
  1363. return smalltalk.withContext(function($ctx3) {
  1364. $2=_st(html)._span();
  1365. $ctx3.sendIdx["span"]=1;
  1366. _st($2)._class_("ltab");
  1367. $ctx3.sendIdx["class:"]=2;
  1368. $3=_st(html)._span();
  1369. $ctx3.sendIdx["span"]=2;
  1370. _st($3)._class_("mtab");
  1371. $ctx3.sendIdx["class:"]=3;
  1372. $4=_st($3)._with_(" + ");
  1373. $4;
  1374. return _st(_st(html)._span())._class_("rtab");
  1375. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1376. $ctx2.sendIdx["with:"]=1;
  1377. $5=_st($1)._onClick_((function(){
  1378. return smalltalk.withContext(function($ctx3) {
  1379. return self._newBrowserTab();
  1380. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1381. return $5;
  1382. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1383. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},smalltalk.TabManager)})},
  1384. args: [],
  1385. 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]]",
  1386. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1387. referencedClasses: []
  1388. }),
  1389. smalltalk.TabManager);
  1390. smalltalk.addMethod(
  1391. smalltalk.method({
  1392. selector: "renderToolbarOn:",
  1393. category: 'rendering',
  1394. fn: function (html){
  1395. var self=this;
  1396. return smalltalk.withContext(function($ctx1) {
  1397. var $1,$3,$4,$5,$6,$7,$2;
  1398. $1=_st(html)._div();
  1399. $ctx1.sendIdx["div"]=1;
  1400. _st($1)._id_("amber_toolbar");
  1401. $ctx1.sendIdx["id:"]=1;
  1402. $2=_st($1)._with_((function(){
  1403. return smalltalk.withContext(function($ctx2) {
  1404. $3=_st(html)._input();
  1405. _st($3)._class_("implementors");
  1406. $4=_st($3)._yourself();
  1407. self["@input"]=$4;
  1408. self["@input"];
  1409. _st(self["@input"])._onKeyPress_((function(event){
  1410. return smalltalk.withContext(function($ctx3) {
  1411. $5=_st(_st(event)._keyCode()).__eq((13));
  1412. if(smalltalk.assert($5)){
  1413. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1414. };
  1415. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1416. $6=_st(html)._div();
  1417. _st($6)._id_("amber_close");
  1418. $7=_st($6)._onClick_((function(){
  1419. return smalltalk.withContext(function($ctx3) {
  1420. return self._close();
  1421. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1422. return $7;
  1423. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1424. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},smalltalk.TabManager)})},
  1425. args: ["html"],
  1426. 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]]",
  1427. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1428. referencedClasses: []
  1429. }),
  1430. smalltalk.TabManager);
  1431. smalltalk.addMethod(
  1432. smalltalk.method({
  1433. selector: "search:",
  1434. category: 'actions',
  1435. fn: function (aString){
  1436. var self=this;
  1437. var searchedClass;
  1438. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1439. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1440. function $ReferencesBrowser(){return smalltalk.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1441. return smalltalk.withContext(function($ctx1) {
  1442. var $1;
  1443. searchedClass=_st(_st($Smalltalk())._current())._at_(aString);
  1444. $1=_st(searchedClass)._isClass();
  1445. if(smalltalk.assert($1)){
  1446. _st($Browser())._openOn_(searchedClass);
  1447. } else {
  1448. _st($ReferencesBrowser())._search_(aString);
  1449. };
  1450. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},smalltalk.TabManager)})},
  1451. args: ["aString"],
  1452. source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk current at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [Browser openOn: searchedClass]\x0a\x09\x09\x09ifFalse: [ReferencesBrowser search: aString]",
  1453. messageSends: ["at:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1454. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1455. }),
  1456. smalltalk.TabManager);
  1457. smalltalk.addMethod(
  1458. smalltalk.method({
  1459. selector: "selectTab:",
  1460. category: 'actions',
  1461. fn: function (aWidget){
  1462. var self=this;
  1463. return smalltalk.withContext(function($ctx1) {
  1464. self._open();
  1465. self["@selectedTab"]=aWidget;
  1466. _st(self._tabs())._do_((function(each){
  1467. return smalltalk.withContext(function($ctx2) {
  1468. return _st(each)._hide();
  1469. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1470. _st(aWidget)._show();
  1471. self._update();
  1472. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},smalltalk.TabManager)})},
  1473. args: ["aWidget"],
  1474. 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",
  1475. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1476. referencedClasses: []
  1477. }),
  1478. smalltalk.TabManager);
  1479. smalltalk.addMethod(
  1480. smalltalk.method({
  1481. selector: "setBodyMargin:",
  1482. category: 'actions',
  1483. fn: function (anInteger){
  1484. var self=this;
  1485. return smalltalk.withContext(function($ctx1) {
  1486. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1487. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},smalltalk.TabManager)})},
  1488. args: ["anInteger"],
  1489. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1490. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1491. referencedClasses: []
  1492. }),
  1493. smalltalk.TabManager);
  1494. smalltalk.addMethod(
  1495. smalltalk.method({
  1496. selector: "tabs",
  1497. category: 'accessing',
  1498. fn: function (){
  1499. var self=this;
  1500. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  1501. return smalltalk.withContext(function($ctx1) {
  1502. var $2,$1;
  1503. $2=self["@tabs"];
  1504. if(($receiver = $2) == nil || $receiver == null){
  1505. self["@tabs"]=_st($Array())._new();
  1506. $1=self["@tabs"];
  1507. } else {
  1508. $1=$2;
  1509. };
  1510. return $1;
  1511. }, function($ctx1) {$ctx1.fill(self,"tabs",{},smalltalk.TabManager)})},
  1512. args: [],
  1513. source: "tabs\x0a\x09^tabs ifNil: [tabs := Array new]",
  1514. messageSends: ["ifNil:", "new"],
  1515. referencedClasses: ["Array"]
  1516. }),
  1517. smalltalk.TabManager);
  1518. smalltalk.addMethod(
  1519. smalltalk.method({
  1520. selector: "update",
  1521. category: 'updating',
  1522. fn: function (){
  1523. var self=this;
  1524. return smalltalk.withContext(function($ctx1) {
  1525. self._renderTabs();
  1526. return self}, function($ctx1) {$ctx1.fill(self,"update",{},smalltalk.TabManager)})},
  1527. args: [],
  1528. source: "update\x0a\x09self renderTabs",
  1529. messageSends: ["renderTabs"],
  1530. referencedClasses: []
  1531. }),
  1532. smalltalk.TabManager);
  1533. smalltalk.addMethod(
  1534. smalltalk.method({
  1535. selector: "updateBodyMargin",
  1536. category: 'actions',
  1537. fn: function (){
  1538. var self=this;
  1539. return smalltalk.withContext(function($ctx1) {
  1540. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1541. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},smalltalk.TabManager)})},
  1542. args: [],
  1543. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1544. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1545. referencedClasses: []
  1546. }),
  1547. smalltalk.TabManager);
  1548. smalltalk.addMethod(
  1549. smalltalk.method({
  1550. selector: "updatePosition",
  1551. category: 'actions',
  1552. fn: function (){
  1553. var self=this;
  1554. return smalltalk.withContext(function($ctx1) {
  1555. var $1,$2;
  1556. $1="#amber"._asJQuery();
  1557. _st($1)._css_put_("top","");
  1558. $ctx1.sendIdx["css:put:"]=1;
  1559. $2=_st($1)._css_put_("bottom","0px");
  1560. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},smalltalk.TabManager)})},
  1561. args: [],
  1562. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1563. messageSends: ["css:put:", "asJQuery"],
  1564. referencedClasses: []
  1565. }),
  1566. smalltalk.TabManager);
  1567. smalltalk.TabManager.klass.iVarNames = ['current'];
  1568. smalltalk.addMethod(
  1569. smalltalk.method({
  1570. selector: "current",
  1571. category: 'instance creation',
  1572. fn: function (){
  1573. var self=this;
  1574. return smalltalk.withContext(function($ctx1) {
  1575. var $2,$1;
  1576. $2=self["@current"];
  1577. if(($receiver = $2) == nil || $receiver == null){
  1578. self["@current"]=smalltalk.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []);
  1579. $1=self["@current"];
  1580. } else {
  1581. $1=$2;
  1582. };
  1583. return $1;
  1584. }, function($ctx1) {$ctx1.fill(self,"current",{},smalltalk.TabManager.klass)})},
  1585. args: [],
  1586. source: "current\x0a\x09^current ifNil: [current := super new]",
  1587. messageSends: ["ifNil:", "new"],
  1588. referencedClasses: []
  1589. }),
  1590. smalltalk.TabManager.klass);
  1591. smalltalk.addMethod(
  1592. smalltalk.method({
  1593. selector: "new",
  1594. category: 'instance creation',
  1595. fn: function (){
  1596. var self=this;
  1597. return smalltalk.withContext(function($ctx1) {
  1598. self._shouldNotImplement();
  1599. return self}, function($ctx1) {$ctx1.fill(self,"new",{},smalltalk.TabManager.klass)})},
  1600. args: [],
  1601. source: "new\x0a\x09self shouldNotImplement",
  1602. messageSends: ["shouldNotImplement"],
  1603. referencedClasses: []
  1604. }),
  1605. smalltalk.TabManager.klass);
  1606. smalltalk.addMethod(
  1607. smalltalk.method({
  1608. selector: "toggleAmberIDE",
  1609. category: 'actions',
  1610. fn: function (){
  1611. var self=this;
  1612. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1613. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1614. return smalltalk.withContext(function($ctx1) {
  1615. var $3,$2,$1,$4,$5;
  1616. $3="#amber"._asJQuery();
  1617. $ctx1.sendIdx["asJQuery"]=1;
  1618. $2=_st($3)._length();
  1619. $1=_st($2).__eq((0));
  1620. if(smalltalk.assert($1)){
  1621. _st($Browser())._open();
  1622. $ctx1.sendIdx["open"]=1;
  1623. } else {
  1624. $4=_st("#amber"._asJQuery())._is_(":visible");
  1625. if(smalltalk.assert($4)){
  1626. $5=_st($TabManager())._current();
  1627. $ctx1.sendIdx["current"]=1;
  1628. _st($5)._close();
  1629. } else {
  1630. _st(_st($TabManager())._current())._open();
  1631. };
  1632. };
  1633. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},smalltalk.TabManager.klass)})},
  1634. args: [],
  1635. 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 ] ]",
  1636. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1637. referencedClasses: ["Browser", "TabManager"]
  1638. }),
  1639. smalltalk.TabManager.klass);
  1640. smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
  1641. smalltalk.addMethod(
  1642. smalltalk.method({
  1643. selector: "canBeClosed",
  1644. category: 'testing',
  1645. fn: function (){
  1646. var self=this;
  1647. return smalltalk.withContext(function($ctx1) {
  1648. return false;
  1649. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.TabWidget)})},
  1650. args: [],
  1651. source: "canBeClosed\x0a\x09^false",
  1652. messageSends: [],
  1653. referencedClasses: []
  1654. }),
  1655. smalltalk.TabWidget);
  1656. smalltalk.addMethod(
  1657. smalltalk.method({
  1658. selector: "close",
  1659. category: 'actions',
  1660. fn: function (){
  1661. var self=this;
  1662. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1663. return smalltalk.withContext(function($ctx1) {
  1664. _st(_st($TabManager())._current())._closeTab_(self);
  1665. return self}, function($ctx1) {$ctx1.fill(self,"close",{},smalltalk.TabWidget)})},
  1666. args: [],
  1667. source: "close\x0a\x09TabManager current closeTab: self",
  1668. messageSends: ["closeTab:", "current"],
  1669. referencedClasses: ["TabManager"]
  1670. }),
  1671. smalltalk.TabWidget);
  1672. smalltalk.addMethod(
  1673. smalltalk.method({
  1674. selector: "hide",
  1675. category: 'actions',
  1676. fn: function (){
  1677. var self=this;
  1678. return smalltalk.withContext(function($ctx1) {
  1679. _st(_st(self["@div"])._asJQuery())._hide();
  1680. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},smalltalk.TabWidget)})},
  1681. args: [],
  1682. source: "hide\x0a\x09div asJQuery hide",
  1683. messageSends: ["hide", "asJQuery"],
  1684. referencedClasses: []
  1685. }),
  1686. smalltalk.TabWidget);
  1687. smalltalk.addMethod(
  1688. smalltalk.method({
  1689. selector: "label",
  1690. category: 'accessing',
  1691. fn: function (){
  1692. var self=this;
  1693. return smalltalk.withContext(function($ctx1) {
  1694. self._subclassResponsibility();
  1695. return self}, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TabWidget)})},
  1696. args: [],
  1697. source: "label\x0a\x09self subclassResponsibility",
  1698. messageSends: ["subclassResponsibility"],
  1699. referencedClasses: []
  1700. }),
  1701. smalltalk.TabWidget);
  1702. smalltalk.addMethod(
  1703. smalltalk.method({
  1704. selector: "open",
  1705. category: 'actions',
  1706. fn: function (){
  1707. var self=this;
  1708. function $TabManager(){return smalltalk.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1709. return smalltalk.withContext(function($ctx1) {
  1710. var $1;
  1711. $1=_st($TabManager())._current();
  1712. $ctx1.sendIdx["current"]=1;
  1713. _st($1)._addTab_(self);
  1714. _st(_st($TabManager())._current())._selectTab_(self);
  1715. return self}, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabWidget)})},
  1716. args: [],
  1717. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1718. messageSends: ["addTab:", "current", "selectTab:"],
  1719. referencedClasses: ["TabManager"]
  1720. }),
  1721. smalltalk.TabWidget);
  1722. smalltalk.addMethod(
  1723. smalltalk.method({
  1724. selector: "remove",
  1725. category: 'actions',
  1726. fn: function (){
  1727. var self=this;
  1728. return smalltalk.withContext(function($ctx1) {
  1729. _st(_st(self["@div"])._asJQuery())._remove();
  1730. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},smalltalk.TabWidget)})},
  1731. args: [],
  1732. source: "remove\x0a\x09div asJQuery remove",
  1733. messageSends: ["remove", "asJQuery"],
  1734. referencedClasses: []
  1735. }),
  1736. smalltalk.TabWidget);
  1737. smalltalk.addMethod(
  1738. smalltalk.method({
  1739. selector: "renderBoxOn:",
  1740. category: 'rendering',
  1741. fn: function (html){
  1742. var self=this;
  1743. return smalltalk.withContext(function($ctx1) {
  1744. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TabWidget)})},
  1745. args: ["html"],
  1746. source: "renderBoxOn: html",
  1747. messageSends: [],
  1748. referencedClasses: []
  1749. }),
  1750. smalltalk.TabWidget);
  1751. smalltalk.addMethod(
  1752. smalltalk.method({
  1753. selector: "renderButtonsOn:",
  1754. category: 'rendering',
  1755. fn: function (html){
  1756. var self=this;
  1757. return smalltalk.withContext(function($ctx1) {
  1758. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TabWidget)})},
  1759. args: ["html"],
  1760. source: "renderButtonsOn: html",
  1761. messageSends: [],
  1762. referencedClasses: []
  1763. }),
  1764. smalltalk.TabWidget);
  1765. smalltalk.addMethod(
  1766. smalltalk.method({
  1767. selector: "renderOn:",
  1768. category: 'rendering',
  1769. fn: function (html){
  1770. var self=this;
  1771. return smalltalk.withContext(function($ctx1) {
  1772. var $1,$2;
  1773. $1=_st(html)._div();
  1774. _st($1)._class_("amberTool");
  1775. $2=_st($1)._yourself();
  1776. self["@div"]=$2;
  1777. self._renderTab();
  1778. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.TabWidget)})},
  1779. args: ["html"],
  1780. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1781. messageSends: ["class:", "div", "yourself", "renderTab"],
  1782. referencedClasses: []
  1783. }),
  1784. smalltalk.TabWidget);
  1785. smalltalk.addMethod(
  1786. smalltalk.method({
  1787. selector: "renderTab",
  1788. category: 'rendering',
  1789. fn: function (){
  1790. var self=this;
  1791. return smalltalk.withContext(function($ctx1) {
  1792. var $1,$2,$3,$4;
  1793. _st(self["@div"])._contents_((function(html){
  1794. return smalltalk.withContext(function($ctx2) {
  1795. $1=_st(html)._div();
  1796. $ctx2.sendIdx["div"]=1;
  1797. _st($1)._class_("amber_box");
  1798. $ctx2.sendIdx["class:"]=1;
  1799. $2=_st($1)._with_((function(){
  1800. return smalltalk.withContext(function($ctx3) {
  1801. return self._renderBoxOn_(html);
  1802. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1803. $ctx2.sendIdx["with:"]=1;
  1804. $2;
  1805. $3=_st(html)._div();
  1806. _st($3)._class_("amber_buttons");
  1807. $4=_st($3)._with_((function(){
  1808. return smalltalk.withContext(function($ctx3) {
  1809. return self._renderButtonsOn_(html);
  1810. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1811. return $4;
  1812. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1813. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},smalltalk.TabWidget)})},
  1814. args: [],
  1815. 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]]",
  1816. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1817. referencedClasses: []
  1818. }),
  1819. smalltalk.TabWidget);
  1820. smalltalk.addMethod(
  1821. smalltalk.method({
  1822. selector: "show",
  1823. category: 'actions',
  1824. fn: function (){
  1825. var self=this;
  1826. return smalltalk.withContext(function($ctx1) {
  1827. _st(_st(self["@div"])._asJQuery())._show();
  1828. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.TabWidget)})},
  1829. args: [],
  1830. source: "show\x0a\x09div asJQuery show",
  1831. messageSends: ["show", "asJQuery"],
  1832. referencedClasses: []
  1833. }),
  1834. smalltalk.TabWidget);
  1835. smalltalk.addMethod(
  1836. smalltalk.method({
  1837. selector: "update",
  1838. category: 'rendering',
  1839. fn: function (){
  1840. var self=this;
  1841. return smalltalk.withContext(function($ctx1) {
  1842. self._renderTab();
  1843. return self}, function($ctx1) {$ctx1.fill(self,"update",{},smalltalk.TabWidget)})},
  1844. args: [],
  1845. source: "update\x0a\x09self renderTab",
  1846. messageSends: ["renderTab"],
  1847. referencedClasses: []
  1848. }),
  1849. smalltalk.TabWidget);
  1850. smalltalk.addMethod(
  1851. smalltalk.method({
  1852. selector: "open",
  1853. category: 'instance creation',
  1854. fn: function (){
  1855. var self=this;
  1856. return smalltalk.withContext(function($ctx1) {
  1857. var $1;
  1858. $1=_st(self._new())._open();
  1859. return $1;
  1860. }, function($ctx1) {$ctx1.fill(self,"open",{},smalltalk.TabWidget.klass)})},
  1861. args: [],
  1862. source: "open\x0a\x09^self new open",
  1863. messageSends: ["open", "new"],
  1864. referencedClasses: []
  1865. }),
  1866. smalltalk.TabWidget.klass);
  1867. smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1868. smalltalk.addMethod(
  1869. smalltalk.method({
  1870. selector: "addInstanceVariableNamed:toClass:",
  1871. category: 'actions',
  1872. fn: function (aString,aClass){
  1873. var self=this;
  1874. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1875. return smalltalk.withContext(function($ctx1) {
  1876. var $1,$2,$3,$4,$5;
  1877. $1=_st($ClassBuilder())._new();
  1878. $2=_st(aClass)._superclass();
  1879. $3=_st(aClass)._name();
  1880. $ctx1.sendIdx["name"]=1;
  1881. $4=_st(_st(aClass)._instanceVariableNames())._copy();
  1882. _st($4)._add_(aString);
  1883. $5=_st($4)._yourself();
  1884. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
  1885. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},smalltalk.Browser)})},
  1886. args: ["aString", "aClass"],
  1887. 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",
  1888. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1889. referencedClasses: ["ClassBuilder"]
  1890. }),
  1891. smalltalk.Browser);
  1892. smalltalk.addMethod(
  1893. smalltalk.method({
  1894. selector: "addNewClass",
  1895. category: 'actions',
  1896. fn: function (){
  1897. var self=this;
  1898. var className;
  1899. function $Object(){return smalltalk.Object||(typeof Object=="undefined"?nil:Object)}
  1900. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1901. return smalltalk.withContext(function($ctx1) {
  1902. var $1,$2;
  1903. className=self._prompt_("New class");
  1904. $1=_st(_st(className)._notNil())._and_((function(){
  1905. return smalltalk.withContext(function($ctx2) {
  1906. return _st(className)._notEmpty();
  1907. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1908. if(smalltalk.assert($1)){
  1909. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1910. self._resetClassesList();
  1911. $2=self._updateClassesList();
  1912. $2;
  1913. self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  1914. };
  1915. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},smalltalk.Browser)})},
  1916. args: [],
  1917. source: "addNewClass\x0a\x09| className |\x0a\x09className := self prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
  1918. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  1919. referencedClasses: ["Object", "Smalltalk"]
  1920. }),
  1921. smalltalk.Browser);
  1922. smalltalk.addMethod(
  1923. smalltalk.method({
  1924. selector: "addNewProtocol",
  1925. category: 'actions',
  1926. fn: function (){
  1927. var self=this;
  1928. var newProtocol;
  1929. return smalltalk.withContext(function($ctx1) {
  1930. var $1;
  1931. newProtocol=self._prompt_("New method protocol");
  1932. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1933. return smalltalk.withContext(function($ctx2) {
  1934. return _st(newProtocol)._notEmpty();
  1935. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1936. if(smalltalk.assert($1)){
  1937. _st(self["@selectedMethod"])._category_(newProtocol);
  1938. self._setMethodProtocol_(newProtocol);
  1939. };
  1940. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},smalltalk.Browser)})},
  1941. args: [],
  1942. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09(newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
  1943. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "category:", "setMethodProtocol:"],
  1944. referencedClasses: []
  1945. }),
  1946. smalltalk.Browser);
  1947. smalltalk.addMethod(
  1948. smalltalk.method({
  1949. selector: "canBeClosed",
  1950. category: 'testing',
  1951. fn: function (){
  1952. var self=this;
  1953. return smalltalk.withContext(function($ctx1) {
  1954. return true;
  1955. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.Browser)})},
  1956. args: [],
  1957. source: "canBeClosed\x0a\x09^true",
  1958. messageSends: [],
  1959. referencedClasses: []
  1960. }),
  1961. smalltalk.Browser);
  1962. smalltalk.addMethod(
  1963. smalltalk.method({
  1964. selector: "cancelChanges",
  1965. category: 'actions',
  1966. fn: function (){
  1967. var self=this;
  1968. return smalltalk.withContext(function($ctx1) {
  1969. var $2,$1;
  1970. $2=self["@unsavedChanges"];
  1971. if(smalltalk.assert($2)){
  1972. $1=self._confirm_("Cancel changes?");
  1973. } else {
  1974. $1=true;
  1975. };
  1976. return $1;
  1977. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},smalltalk.Browser)})},
  1978. args: [],
  1979. source: "cancelChanges\x0a\x09^unsavedChanges\x0a\x09ifTrue: [self confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
  1980. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  1981. referencedClasses: []
  1982. }),
  1983. smalltalk.Browser);
  1984. smalltalk.addMethod(
  1985. smalltalk.method({
  1986. selector: "classCommentSource",
  1987. category: 'accessing',
  1988. fn: function (){
  1989. var self=this;
  1990. return smalltalk.withContext(function($ctx1) {
  1991. var $1;
  1992. $1=_st(self["@selectedClass"])._comment();
  1993. return $1;
  1994. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},smalltalk.Browser)})},
  1995. args: [],
  1996. source: "classCommentSource\x0a\x09^selectedClass comment",
  1997. messageSends: ["comment"],
  1998. referencedClasses: []
  1999. }),
  2000. smalltalk.Browser);
  2001. smalltalk.addMethod(
  2002. smalltalk.method({
  2003. selector: "classDeclarationSource",
  2004. category: 'accessing',
  2005. fn: function (){
  2006. var self=this;
  2007. var stream;
  2008. function $String(){return smalltalk.String||(typeof String=="undefined"?nil:String)}
  2009. return smalltalk.withContext(function($ctx1) {
  2010. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$11,$12,$13;
  2011. stream=""._writeStream();
  2012. $1=self["@selectedClass"];
  2013. if(($receiver = $1) == nil || $receiver == null){
  2014. $2=self._classDeclarationTemplate();
  2015. return $2;
  2016. } else {
  2017. $1;
  2018. };
  2019. $3=stream;
  2020. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  2021. $ctx1.sendIdx["nextPutAll:"]=1;
  2022. _st($3)._nextPutAll_(" subclass: #");
  2023. $ctx1.sendIdx["nextPutAll:"]=2;
  2024. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2025. $ctx1.sendIdx["nextPutAll:"]=3;
  2026. $4=$3;
  2027. $6=_st($String())._lf();
  2028. $ctx1.sendIdx["lf"]=1;
  2029. $7=_st($String())._tab();
  2030. $ctx1.sendIdx["tab"]=1;
  2031. $5=_st($6).__comma($7);
  2032. $ctx1.sendIdx[","]=1;
  2033. _st($4)._nextPutAll_($5);
  2034. $ctx1.sendIdx["nextPutAll:"]=4;
  2035. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2036. $ctx1.sendIdx["nextPutAll:"]=5;
  2037. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2038. return smalltalk.withContext(function($ctx2) {
  2039. return _st(stream)._nextPutAll_(each);
  2040. $ctx2.sendIdx["nextPutAll:"]=6;
  2041. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2042. return smalltalk.withContext(function($ctx2) {
  2043. return _st(stream)._nextPutAll_(" ");
  2044. $ctx2.sendIdx["nextPutAll:"]=7;
  2045. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2046. $9=stream;
  2047. $10=$9;
  2048. $11=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
  2049. $ctx1.sendIdx[","]=2;
  2050. _st($10)._nextPutAll_($11);
  2051. $ctx1.sendIdx["nextPutAll:"]=8;
  2052. _st($9)._nextPutAll_("package: '");
  2053. $ctx1.sendIdx["nextPutAll:"]=9;
  2054. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2055. $ctx1.sendIdx["nextPutAll:"]=10;
  2056. $12=_st($9)._nextPutAll_("'");
  2057. $13=_st(stream)._contents();
  2058. return $13;
  2059. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},smalltalk.Browser)})},
  2060. args: [],
  2061. 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",
  2062. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2063. referencedClasses: ["String"]
  2064. }),
  2065. smalltalk.Browser);
  2066. smalltalk.addMethod(
  2067. smalltalk.method({
  2068. selector: "classDeclarationTemplate",
  2069. category: 'accessing',
  2070. fn: function (){
  2071. var self=this;
  2072. return smalltalk.withContext(function($ctx1) {
  2073. var $1;
  2074. $1=_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2075. $ctx1.sendIdx[","]=1;
  2076. return $1;
  2077. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},smalltalk.Browser)})},
  2078. args: [],
  2079. source: "classDeclarationTemplate\x0a\x09^'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2080. messageSends: [",", "selectedPackage"],
  2081. referencedClasses: []
  2082. }),
  2083. smalltalk.Browser);
  2084. smalltalk.addMethod(
  2085. smalltalk.method({
  2086. selector: "classes",
  2087. category: 'accessing',
  2088. fn: function (){
  2089. var self=this;
  2090. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2091. return smalltalk.withContext(function($ctx1) {
  2092. var $2,$1;
  2093. $1=_st(_st(_st(_st(_st($Smalltalk())._current())._classes())._select_((function(each){
  2094. return smalltalk.withContext(function($ctx2) {
  2095. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2096. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2097. return smalltalk.withContext(function($ctx2) {
  2098. $2=_st(a)._name();
  2099. $ctx2.sendIdx["name"]=1;
  2100. return _st($2).__lt(_st(b)._name());
  2101. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2102. return $1;
  2103. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.Browser)})},
  2104. args: [],
  2105. source: "classes\x0a\x09^((Smalltalk current classes\x0a\x09select: [:each | each category = selectedPackage])\x0a\x09sort: [:a :b | a name < b name]) asSet",
  2106. messageSends: ["asSet", "sort:", "select:", "classes", "current", "=", "category", "<", "name"],
  2107. referencedClasses: ["Smalltalk"]
  2108. }),
  2109. smalltalk.Browser);
  2110. smalltalk.addMethod(
  2111. smalltalk.method({
  2112. selector: "commitPackage",
  2113. category: 'actions',
  2114. fn: function (){
  2115. var self=this;
  2116. function $Package(){return smalltalk.Package||(typeof Package=="undefined"?nil:Package)}
  2117. return smalltalk.withContext(function($ctx1) {
  2118. var $1;
  2119. $1=self["@selectedPackage"];
  2120. if(($receiver = $1) == nil || $receiver == null){
  2121. $1;
  2122. } else {
  2123. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2124. };
  2125. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},smalltalk.Browser)})},
  2126. args: [],
  2127. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2128. messageSends: ["ifNotNil:", "commit", "named:"],
  2129. referencedClasses: ["Package"]
  2130. }),
  2131. smalltalk.Browser);
  2132. smalltalk.addMethod(
  2133. smalltalk.method({
  2134. selector: "compile",
  2135. category: 'actions',
  2136. fn: function (){
  2137. var self=this;
  2138. var currentEditLine;
  2139. return smalltalk.withContext(function($ctx1) {
  2140. var $1,$2,$3,$5,$4;
  2141. self._disableSaveButton();
  2142. $1=_st(self["@sourceArea"])._editor();
  2143. $ctx1.sendIdx["editor"]=1;
  2144. currentEditLine=_st($1)._getCursor();
  2145. $2=_st(self["@selectedTab"]).__eq("comment");
  2146. if(smalltalk.assert($2)){
  2147. $3=self["@selectedClass"];
  2148. if(($receiver = $3) == nil || $receiver == null){
  2149. $3;
  2150. } else {
  2151. self._compileClassComment();
  2152. };
  2153. } else {
  2154. $5=_st(self["@selectedProtocol"])._notNil();
  2155. $ctx1.sendIdx["notNil"]=1;
  2156. $4=_st($5)._or_((function(){
  2157. return smalltalk.withContext(function($ctx2) {
  2158. return _st(self["@selectedMethod"])._notNil();
  2159. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2160. if(smalltalk.assert($4)){
  2161. self._compileMethodDefinition();
  2162. } else {
  2163. self._compileDefinition();
  2164. };
  2165. };
  2166. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  2167. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},smalltalk.Browser)})},
  2168. args: [],
  2169. 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.",
  2170. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2171. referencedClasses: []
  2172. }),
  2173. smalltalk.Browser);
  2174. smalltalk.addMethod(
  2175. smalltalk.method({
  2176. selector: "compileClassComment",
  2177. category: 'actions',
  2178. fn: function (){
  2179. var self=this;
  2180. return smalltalk.withContext(function($ctx1) {
  2181. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2182. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},smalltalk.Browser)})},
  2183. args: [],
  2184. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2185. messageSends: ["comment:", "val"],
  2186. referencedClasses: []
  2187. }),
  2188. smalltalk.Browser);
  2189. smalltalk.addMethod(
  2190. smalltalk.method({
  2191. selector: "compileDefinition",
  2192. category: 'actions',
  2193. fn: function (){
  2194. var self=this;
  2195. var newClass;
  2196. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2197. return smalltalk.withContext(function($ctx1) {
  2198. var $1;
  2199. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2200. self._resetClassesList();
  2201. self._updateCategoriesList();
  2202. $1=self._updateClassesList();
  2203. self._selectClass_(newClass);
  2204. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},smalltalk.Browser)})},
  2205. args: [],
  2206. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2207. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2208. referencedClasses: ["Compiler"]
  2209. }),
  2210. smalltalk.Browser);
  2211. smalltalk.addMethod(
  2212. smalltalk.method({
  2213. selector: "compileMethodDefinition",
  2214. category: 'actions',
  2215. fn: function (){
  2216. var self=this;
  2217. return smalltalk.withContext(function($ctx1) {
  2218. var $1;
  2219. $1=_st(self["@selectedTab"]).__eq("instance");
  2220. if(smalltalk.assert($1)){
  2221. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2222. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2223. } else {
  2224. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2225. };
  2226. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},smalltalk.Browser)})},
  2227. args: [],
  2228. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [self compileMethodDefinitionFor: selectedClass]\x0a\x09ifFalse: [self compileMethodDefinitionFor: selectedClass class]",
  2229. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2230. referencedClasses: []
  2231. }),
  2232. smalltalk.Browser);
  2233. smalltalk.addMethod(
  2234. smalltalk.method({
  2235. selector: "compileMethodDefinitionFor:",
  2236. category: 'actions',
  2237. fn: function (aClass){
  2238. var self=this;
  2239. var compiler,method,source,node;
  2240. function $Compiler(){return smalltalk.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2241. function $PlatformInterface(){return smalltalk.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2242. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2243. return smalltalk.withContext(function($ctx1) {
  2244. var $1,$2,$6,$5,$4,$3,$7,$9,$8,$10;
  2245. var $early={};
  2246. try {
  2247. source=_st(self["@sourceArea"])._val();
  2248. $1=self["@selectedProtocol"];
  2249. if(($receiver = $1) == nil || $receiver == null){
  2250. self["@selectedProtocol"]=_st(self["@selectedMethod"])._category();
  2251. self["@selectedProtocol"];
  2252. } else {
  2253. $1;
  2254. };
  2255. compiler=_st($Compiler())._new();
  2256. $ctx1.sendIdx["new"]=1;
  2257. _st(compiler)._source_(source);
  2258. node=_st(compiler)._parse_(source);
  2259. $2=_st(node)._isParseFailure();
  2260. if(smalltalk.assert($2)){
  2261. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2262. $ctx1.sendIdx[","]=3;
  2263. $5=_st($6).__comma(", position: ");
  2264. $ctx1.sendIdx[","]=2;
  2265. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2266. $ctx1.sendIdx[","]=1;
  2267. $3=self._alert_($4);
  2268. return $3;
  2269. };
  2270. _st(compiler)._currentClass_(aClass);
  2271. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2272. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2273. return smalltalk.withContext(function($ctx2) {
  2274. $7=_st($PlatformInterface())._existsGlobal_(each);
  2275. if(! smalltalk.assert($7)){
  2276. $9=_st("Declare '".__comma(each)).__comma("' as instance variable?");
  2277. $ctx2.sendIdx[","]=4;
  2278. $8=self._confirm_($9);
  2279. if(smalltalk.assert($8)){
  2280. self._addInstanceVariableNamed_toClass_(each,aClass);
  2281. $10=self._compileMethodDefinitionFor_(aClass);
  2282. throw $early=[$10];
  2283. };
  2284. };
  2285. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2286. _st(_st($ClassBuilder())._new())._installMethod_forClass_category_(method,aClass,self["@selectedProtocol"]);
  2287. self._updateMethodsList();
  2288. self._selectMethod_(method);
  2289. return self}
  2290. catch(e) {if(e===$early)return e[0]; throw e}
  2291. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},smalltalk.Browser)})},
  2292. args: ["aClass"],
  2293. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod category ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [:each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a\x09ClassBuilder new installMethod: method forClass: aClass category: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
  2294. messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:category:", "updateMethodsList", "selectMethod:"],
  2295. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2296. }),
  2297. smalltalk.Browser);
  2298. smalltalk.addMethod(
  2299. smalltalk.method({
  2300. selector: "copyClass",
  2301. category: 'actions',
  2302. fn: function (){
  2303. var self=this;
  2304. var className;
  2305. function $ClassBuilder(){return smalltalk.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2306. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2307. return smalltalk.withContext(function($ctx1) {
  2308. var $1,$2;
  2309. className=self._prompt_("Copy class");
  2310. $1=_st(_st(className)._notNil())._and_((function(){
  2311. return smalltalk.withContext(function($ctx2) {
  2312. return _st(className)._notEmpty();
  2313. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2314. if(smalltalk.assert($1)){
  2315. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2316. self._resetClassesList();
  2317. $2=self._updateClassesList();
  2318. $2;
  2319. self._selectClass_(_st(_st($Smalltalk())._current())._at_(className));
  2320. };
  2321. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},smalltalk.Browser)})},
  2322. args: [],
  2323. source: "copyClass\x0a\x09| className |\x0a\x09className := self prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
  2324. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current"],
  2325. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2326. }),
  2327. smalltalk.Browser);
  2328. smalltalk.addMethod(
  2329. smalltalk.method({
  2330. selector: "declarationSource",
  2331. category: 'accessing',
  2332. fn: function (){
  2333. var self=this;
  2334. return smalltalk.withContext(function($ctx1) {
  2335. var $2,$1;
  2336. $2=_st(self["@selectedTab"]).__eq("instance");
  2337. if(smalltalk.assert($2)){
  2338. $1=self._classDeclarationSource();
  2339. } else {
  2340. $1=self._metaclassDeclarationSource();
  2341. };
  2342. return $1;
  2343. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},smalltalk.Browser)})},
  2344. args: [],
  2345. source: "declarationSource\x0a\x09^selectedTab = #instance\x0a\x09ifTrue: [self classDeclarationSource]\x0a\x09ifFalse: [self metaclassDeclarationSource]",
  2346. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2347. referencedClasses: []
  2348. }),
  2349. smalltalk.Browser);
  2350. smalltalk.addMethod(
  2351. smalltalk.method({
  2352. selector: "disableSaveButton",
  2353. category: 'actions',
  2354. fn: function (){
  2355. var self=this;
  2356. return smalltalk.withContext(function($ctx1) {
  2357. var $1;
  2358. $1=self["@saveButton"];
  2359. if(($receiver = $1) == nil || $receiver == null){
  2360. $1;
  2361. } else {
  2362. _st(self["@saveButton"])._at_put_("disabled",true);
  2363. };
  2364. self["@unsavedChanges"]=false;
  2365. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},smalltalk.Browser)})},
  2366. args: [],
  2367. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true].\x0a\x09unsavedChanges := false",
  2368. messageSends: ["ifNotNil:", "at:put:"],
  2369. referencedClasses: []
  2370. }),
  2371. smalltalk.Browser);
  2372. smalltalk.addMethod(
  2373. smalltalk.method({
  2374. selector: "dummyMethodSource",
  2375. category: 'accessing',
  2376. fn: function (){
  2377. var self=this;
  2378. return smalltalk.withContext(function($ctx1) {
  2379. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2380. }, function($ctx1) {$ctx1.fill(self,"dummyMethodSource",{},smalltalk.Browser)})},
  2381. args: [],
  2382. source: "dummyMethodSource\x0a\x09^'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2383. messageSends: [],
  2384. referencedClasses: []
  2385. }),
  2386. smalltalk.Browser);
  2387. smalltalk.addMethod(
  2388. smalltalk.method({
  2389. selector: "handleSourceAreaKeyDown:",
  2390. category: 'actions',
  2391. fn: function (anEvent){
  2392. var self=this;
  2393. return smalltalk.withContext(function($ctx1) {
  2394. if(anEvent.ctrlKey) {
  2395. if(anEvent.keyCode === 83) { //ctrl+s
  2396. self._compile();
  2397. anEvent.preventDefault();
  2398. return false;
  2399. }
  2400. }
  2401. ;
  2402. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},smalltalk.Browser)})},
  2403. args: ["anEvent"],
  2404. 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>",
  2405. messageSends: [],
  2406. referencedClasses: []
  2407. }),
  2408. smalltalk.Browser);
  2409. smalltalk.addMethod(
  2410. smalltalk.method({
  2411. selector: "hideClassButtons",
  2412. category: 'actions',
  2413. fn: function (){
  2414. var self=this;
  2415. return smalltalk.withContext(function($ctx1) {
  2416. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2417. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},smalltalk.Browser)})},
  2418. args: [],
  2419. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2420. messageSends: ["hide", "asJQuery"],
  2421. referencedClasses: []
  2422. }),
  2423. smalltalk.Browser);
  2424. smalltalk.addMethod(
  2425. smalltalk.method({
  2426. selector: "hideMethodButtons",
  2427. category: 'actions',
  2428. fn: function (){
  2429. var self=this;
  2430. return smalltalk.withContext(function($ctx1) {
  2431. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2432. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},smalltalk.Browser)})},
  2433. args: [],
  2434. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2435. messageSends: ["hide", "asJQuery"],
  2436. referencedClasses: []
  2437. }),
  2438. smalltalk.Browser);
  2439. smalltalk.addMethod(
  2440. smalltalk.method({
  2441. selector: "initialize",
  2442. category: 'initialization',
  2443. fn: function (){
  2444. var self=this;
  2445. return smalltalk.withContext(function($ctx1) {
  2446. smalltalk.Browser.superclass.fn.prototype._initialize.apply(_st(self), []);
  2447. self["@selectedTab"]="instance";
  2448. self["@selectedPackage"]=_st(self._packages())._first();
  2449. self["@unsavedChanges"]=false;
  2450. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.Browser)})},
  2451. args: [],
  2452. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2453. messageSends: ["initialize", "first", "packages"],
  2454. referencedClasses: []
  2455. }),
  2456. smalltalk.Browser);
  2457. smalltalk.addMethod(
  2458. smalltalk.method({
  2459. selector: "label",
  2460. category: 'accessing',
  2461. fn: function (){
  2462. var self=this;
  2463. return smalltalk.withContext(function($ctx1) {
  2464. var $2,$1;
  2465. $2=self["@selectedClass"];
  2466. if(($receiver = $2) == nil || $receiver == null){
  2467. $1="Browser (nil)";
  2468. } else {
  2469. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2470. };
  2471. return $1;
  2472. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Browser)})},
  2473. args: [],
  2474. source: "label\x0a\x09^selectedClass\x0a\x09ifNil: ['Browser (nil)']\x0a\x09ifNotNil: ['Browser: ', selectedClass name]",
  2475. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2476. referencedClasses: []
  2477. }),
  2478. smalltalk.Browser);
  2479. smalltalk.addMethod(
  2480. smalltalk.method({
  2481. selector: "metaclassDeclarationSource",
  2482. category: 'accessing',
  2483. fn: function (){
  2484. var self=this;
  2485. var stream;
  2486. return smalltalk.withContext(function($ctx1) {
  2487. var $1,$2,$3,$4;
  2488. stream=""._writeStream();
  2489. $1=self["@selectedClass"];
  2490. if(($receiver = $1) == nil || $receiver == null){
  2491. $1;
  2492. } else {
  2493. $2=stream;
  2494. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2495. $ctx1.sendIdx["nextPutAll:"]=1;
  2496. _st($2)._nextPutAll_(" class ");
  2497. $ctx1.sendIdx["nextPutAll:"]=2;
  2498. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2499. $ctx1.sendIdx["nextPutAll:"]=3;
  2500. $3;
  2501. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2502. return smalltalk.withContext(function($ctx2) {
  2503. return _st(stream)._nextPutAll_(each);
  2504. $ctx2.sendIdx["nextPutAll:"]=4;
  2505. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2506. return smalltalk.withContext(function($ctx2) {
  2507. return _st(stream)._nextPutAll_(" ");
  2508. $ctx2.sendIdx["nextPutAll:"]=5;
  2509. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2510. _st(stream)._nextPutAll_("'");
  2511. };
  2512. $4=_st(stream)._contents();
  2513. return $4;
  2514. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},smalltalk.Browser)})},
  2515. args: [],
  2516. 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",
  2517. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2518. referencedClasses: []
  2519. }),
  2520. smalltalk.Browser);
  2521. smalltalk.addMethod(
  2522. smalltalk.method({
  2523. selector: "methodSource",
  2524. category: 'accessing',
  2525. fn: function (){
  2526. var self=this;
  2527. return smalltalk.withContext(function($ctx1) {
  2528. var $2,$1;
  2529. $2=self["@selectedMethod"];
  2530. if(($receiver = $2) == nil || $receiver == null){
  2531. $1=self._dummyMethodSource();
  2532. } else {
  2533. $1=_st(self["@selectedMethod"])._source();
  2534. };
  2535. return $1;
  2536. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},smalltalk.Browser)})},
  2537. args: [],
  2538. source: "methodSource\x0a\x09^selectedMethod\x0a\x09ifNil: [self dummyMethodSource]\x0a\x09ifNotNil: [selectedMethod source]",
  2539. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2540. referencedClasses: []
  2541. }),
  2542. smalltalk.Browser);
  2543. smalltalk.addMethod(
  2544. smalltalk.method({
  2545. selector: "methods",
  2546. category: 'accessing',
  2547. fn: function (){
  2548. var self=this;
  2549. var klass;
  2550. return smalltalk.withContext(function($ctx1) {
  2551. var $1,$2,$3,$4,$7,$8,$9,$6,$10,$5;
  2552. $1=_st(self["@selectedTab"]).__eq("comment");
  2553. $ctx1.sendIdx["="]=1;
  2554. if(smalltalk.assert($1)){
  2555. $2=[];
  2556. return $2;
  2557. };
  2558. $3=self["@selectedClass"];
  2559. if(($receiver = $3) == nil || $receiver == null){
  2560. $3;
  2561. } else {
  2562. $4=_st(self["@selectedTab"]).__eq("instance");
  2563. $ctx1.sendIdx["="]=2;
  2564. if(smalltalk.assert($4)){
  2565. klass=self["@selectedClass"];
  2566. } else {
  2567. klass=_st(self["@selectedClass"])._class();
  2568. };
  2569. klass;
  2570. };
  2571. $7=self["@selectedProtocol"];
  2572. if(($receiver = $7) == nil || $receiver == null){
  2573. $8=klass;
  2574. if(($receiver = $8) == nil || $receiver == null){
  2575. $6=[];
  2576. } else {
  2577. $9=_st(klass)._methodDictionary();
  2578. $ctx1.sendIdx["methodDictionary"]=1;
  2579. $6=_st($9)._values();
  2580. $ctx1.sendIdx["values"]=1;
  2581. };
  2582. } else {
  2583. $6=_st(_st(_st(klass)._methodDictionary())._values())._select_((function(each){
  2584. return smalltalk.withContext(function($ctx2) {
  2585. return _st(_st(each)._category()).__eq(self["@selectedProtocol"]);
  2586. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,9)})}));
  2587. };
  2588. $5=_st($6)._sort_((function(a,b){
  2589. return smalltalk.withContext(function($ctx2) {
  2590. $10=_st(a)._selector();
  2591. $ctx2.sendIdx["selector"]=1;
  2592. return _st($10).__lt(_st(b)._selector());
  2593. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,10)})}));
  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 methodDictionary values select: [:each |\x0a\x09\x09each category = selectedProtocol]]) sort: [:a :b | a selector < b selector]",
  2598. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category", "<", "selector"],
  2599. referencedClasses: []
  2600. }),
  2601. smalltalk.Browser);
  2602. smalltalk.addMethod(
  2603. smalltalk.method({
  2604. selector: "packages",
  2605. category: '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(_st($Smalltalk())._current())._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 current 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", "current", "ifFalse:", "includes:", "category", "add:", "sort"],
  2630. referencedClasses: ["Array", "Smalltalk"]
  2631. }),
  2632. smalltalk.Browser);
  2633. smalltalk.addMethod(
  2634. smalltalk.method({
  2635. selector: "protocols",
  2636. category: '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. category: '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(_st($Smalltalk())._current())._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 current removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil]",
  2697. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "current", "resetClassesList", "selectClass:"],
  2698. referencedClasses: ["Smalltalk"]
  2699. }),
  2700. smalltalk.Browser);
  2701. smalltalk.addMethod(
  2702. smalltalk.method({
  2703. selector: "removeMethod",
  2704. category: '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. category: '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(_st($Smalltalk())._current())._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 current removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList]",
  2751. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "current", "updateCategoriesList"],
  2752. referencedClasses: ["Smalltalk"]
  2753. }),
  2754. smalltalk.Browser);
  2755. smalltalk.addMethod(
  2756. smalltalk.method({
  2757. selector: "renameClass",
  2758. category: '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. category: '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(_st($Smalltalk())._current())._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 current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
  2806. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "current", "updateCategoriesList"],
  2807. referencedClasses: ["Smalltalk"]
  2808. }),
  2809. smalltalk.Browser);
  2810. smalltalk.addMethod(
  2811. smalltalk.method({
  2812. selector: "renderBottomPanelOn:",
  2813. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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())._current())._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 current 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:", "current", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3065. referencedClasses: ["Smalltalk"]
  3066. }),
  3067. smalltalk.Browser);
  3068. smalltalk.addMethod(
  3069. smalltalk.method({
  3070. selector: "searchClassReferences",
  3071. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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"])._category_(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 category: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self\x0a\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09updateMethodsList;\x0a\x09\x09\x09updateSourceAndButtons]]",
  3293. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3294. referencedClasses: []
  3295. }),
  3296. smalltalk.Browser);
  3297. smalltalk.addMethod(
  3298. smalltalk.method({
  3299. selector: "showClassButtons",
  3300. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. category: '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. $4=_st($3)._at_put_("readonly","readonly");
  4914. self["@valueTextarea"]=$4;
  4915. self["@valueTextarea"];
  4916. $5=_st(html)._div();
  4917. $ctx2.sendIdx["div"]=2;
  4918. _st($5)._class_("amber_tabs inspector");
  4919. $ctx2.sendIdx["class:"]=4;
  4920. $6=_st($5)._with_((function(){
  4921. return smalltalk.withContext(function($ctx3) {
  4922. $7=_st(html)._button();
  4923. $ctx3.sendIdx["button"]=1;
  4924. _st($7)._class_("amber_button inspector refresh");
  4925. $ctx3.sendIdx["class:"]=5;
  4926. _st($7)._with_("Refresh");
  4927. $ctx3.sendIdx["with:"]=3;
  4928. $8=_st($7)._onClick_((function(){
  4929. return smalltalk.withContext(function($ctx4) {
  4930. return self._refresh();
  4931. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4932. $ctx3.sendIdx["onClick:"]=1;
  4933. $8;
  4934. $9=_st(html)._button();
  4935. _st($9)._class_("amber_button inspector dive");
  4936. $ctx3.sendIdx["class:"]=6;
  4937. _st($9)._with_("Dive");
  4938. $10=_st($9)._onClick_((function(){
  4939. return smalltalk.withContext(function($ctx4) {
  4940. return self._dive();
  4941. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  4942. self["@diveButton"]=$10;
  4943. return self["@diveButton"];
  4944. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4945. $ctx2.sendIdx["with:"]=2;
  4946. $6;
  4947. return _st(_st(html)._div())._class_("amber_clear");
  4948. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4949. $ctx1.sendIdx["with:"]=1;
  4950. self._updateVariablesList();
  4951. $11=self._updateValueTextarea();
  4952. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},smalltalk.Inspector)})},
  4953. args: ["html"],
  4954. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09variablesList := html ul class: 'amber_column variables'.\x0a\x09\x09\x09valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'.\x0a\x09\x09\x09html div class: 'amber_tabs inspector'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector refresh';\x0a\x09\x09\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09\x09\x09onClick: [self refresh].\x0a\x09\x09\x09\x09diveButton := html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector dive';\x0a\x09\x09\x09\x09\x09with: 'Dive';\x0a\x09\x09\x09\x09\x09onClick: [self dive]].\x0a\x09\x09\x09html div class: 'amber_clear'].\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea.",
  4955. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  4956. referencedClasses: []
  4957. }),
  4958. smalltalk.Inspector);
  4959. smalltalk.addMethod(
  4960. smalltalk.method({
  4961. selector: "selectVariable:",
  4962. category: 'updating',
  4963. fn: function (aString){
  4964. var self=this;
  4965. return smalltalk.withContext(function($ctx1) {
  4966. var $1;
  4967. self._selectedVariable_(aString);
  4968. self._updateVariablesList();
  4969. self._updateValueTextarea();
  4970. $1=self._updateButtons();
  4971. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},smalltalk.Inspector)})},
  4972. args: ["aString"],
  4973. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  4974. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  4975. referencedClasses: []
  4976. }),
  4977. smalltalk.Inspector);
  4978. smalltalk.addMethod(
  4979. smalltalk.method({
  4980. selector: "selectedVariable",
  4981. category: 'accessing',
  4982. fn: function (){
  4983. var self=this;
  4984. return smalltalk.withContext(function($ctx1) {
  4985. var $1;
  4986. $1=self["@selectedVariable"];
  4987. return $1;
  4988. }, function($ctx1) {$ctx1.fill(self,"selectedVariable",{},smalltalk.Inspector)})},
  4989. args: [],
  4990. source: "selectedVariable\x0a\x09^selectedVariable",
  4991. messageSends: [],
  4992. referencedClasses: []
  4993. }),
  4994. smalltalk.Inspector);
  4995. smalltalk.addMethod(
  4996. smalltalk.method({
  4997. selector: "selectedVariable:",
  4998. category: 'accessing',
  4999. fn: function (aString){
  5000. var self=this;
  5001. return smalltalk.withContext(function($ctx1) {
  5002. self["@selectedVariable"]=aString;
  5003. return self}, function($ctx1) {$ctx1.fill(self,"selectedVariable:",{aString:aString},smalltalk.Inspector)})},
  5004. args: ["aString"],
  5005. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  5006. messageSends: [],
  5007. referencedClasses: []
  5008. }),
  5009. smalltalk.Inspector);
  5010. smalltalk.addMethod(
  5011. smalltalk.method({
  5012. selector: "setLabel:",
  5013. category: 'accessing',
  5014. fn: function (aString){
  5015. var self=this;
  5016. return smalltalk.withContext(function($ctx1) {
  5017. self["@label"]=aString;
  5018. return self}, function($ctx1) {$ctx1.fill(self,"setLabel:",{aString:aString},smalltalk.Inspector)})},
  5019. args: ["aString"],
  5020. source: "setLabel: aString\x0a\x09label := aString",
  5021. messageSends: [],
  5022. referencedClasses: []
  5023. }),
  5024. smalltalk.Inspector);
  5025. smalltalk.addMethod(
  5026. smalltalk.method({
  5027. selector: "setVariables:",
  5028. category: 'accessing',
  5029. fn: function (aCollection){
  5030. var self=this;
  5031. return smalltalk.withContext(function($ctx1) {
  5032. self["@variables"]=aCollection;
  5033. return self}, function($ctx1) {$ctx1.fill(self,"setVariables:",{aCollection:aCollection},smalltalk.Inspector)})},
  5034. args: ["aCollection"],
  5035. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  5036. messageSends: [],
  5037. referencedClasses: []
  5038. }),
  5039. smalltalk.Inspector);
  5040. smalltalk.addMethod(
  5041. smalltalk.method({
  5042. selector: "sourceArea",
  5043. category: 'accessing',
  5044. fn: function (){
  5045. var self=this;
  5046. return smalltalk.withContext(function($ctx1) {
  5047. var $1;
  5048. $1=self["@sourceArea"];
  5049. return $1;
  5050. }, function($ctx1) {$ctx1.fill(self,"sourceArea",{},smalltalk.Inspector)})},
  5051. args: [],
  5052. source: "sourceArea\x0a\x09^sourceArea",
  5053. messageSends: [],
  5054. referencedClasses: []
  5055. }),
  5056. smalltalk.Inspector);
  5057. smalltalk.addMethod(
  5058. smalltalk.method({
  5059. selector: "updateButtons",
  5060. category: 'updating',
  5061. fn: function (){
  5062. var self=this;
  5063. return smalltalk.withContext(function($ctx1) {
  5064. var $3,$2,$1;
  5065. $3=self._selectedVariable();
  5066. $ctx1.sendIdx["selectedVariable"]=1;
  5067. $2=_st($3)._notNil();
  5068. $ctx1.sendIdx["notNil"]=1;
  5069. $1=_st($2)._and_((function(){
  5070. return smalltalk.withContext(function($ctx2) {
  5071. return _st(_st(self._variables())._at_(self._selectedVariable()))._notNil();
  5072. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5073. if(smalltalk.assert($1)){
  5074. _st(self["@diveButton"])._removeAt_("disabled");
  5075. } else {
  5076. _st(self["@diveButton"])._at_put_("disabled",true);
  5077. };
  5078. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},smalltalk.Inspector)})},
  5079. args: [],
  5080. 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']",
  5081. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  5082. referencedClasses: []
  5083. }),
  5084. smalltalk.Inspector);
  5085. smalltalk.addMethod(
  5086. smalltalk.method({
  5087. selector: "updateValueTextarea",
  5088. category: 'updating',
  5089. fn: function (){
  5090. var self=this;
  5091. return smalltalk.withContext(function($ctx1) {
  5092. var $1,$4,$3,$2;
  5093. $1=_st(self["@valueTextarea"])._asJQuery();
  5094. $4=self._selectedVariable();
  5095. $ctx1.sendIdx["selectedVariable"]=1;
  5096. $3=_st($4)._isNil();
  5097. if(smalltalk.assert($3)){
  5098. $2="";
  5099. } else {
  5100. $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
  5101. };
  5102. _st($1)._val_($2);
  5103. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},smalltalk.Inspector)})},
  5104. args: [],
  5105. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: ['']\x0a\x09\x09ifFalse: [(self variables at: self selectedVariable) printString])",
  5106. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  5107. referencedClasses: []
  5108. }),
  5109. smalltalk.Inspector);
  5110. smalltalk.addMethod(
  5111. smalltalk.method({
  5112. selector: "updateVariablesList",
  5113. category: 'updating',
  5114. fn: function (){
  5115. var self=this;
  5116. return smalltalk.withContext(function($ctx1) {
  5117. var $1,$2,$3;
  5118. _st(self["@variablesList"])._contents_((function(html){
  5119. return smalltalk.withContext(function($ctx2) {
  5120. return _st(_st(self._variables())._keys())._do_((function(each){
  5121. var li;
  5122. return smalltalk.withContext(function($ctx3) {
  5123. li=_st(html)._li();
  5124. li;
  5125. $1=li;
  5126. _st($1)._with_(each);
  5127. $2=_st($1)._onClick_((function(){
  5128. return smalltalk.withContext(function($ctx4) {
  5129. return self._selectVariable_(each);
  5130. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5131. $2;
  5132. $3=_st(self._selectedVariable()).__eq(each);
  5133. if(smalltalk.assert($3)){
  5134. return _st(li)._class_("selected");
  5135. };
  5136. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5137. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5138. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},smalltalk.Inspector)})},
  5139. args: [],
  5140. source: "updateVariablesList\x0a\x09variablesList contents: [:html |\x0a\x09\x09self variables keys do: [:each || li |\x0a\x09\x09\x09li := html li.\x0a\x09\x09\x09li\x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [self selectVariable: each].\x0a\x09\x09\x09self selectedVariable = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected']]]",
  5141. messageSends: ["contents:", "do:", "keys", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  5142. referencedClasses: []
  5143. }),
  5144. smalltalk.Inspector);
  5145. smalltalk.addMethod(
  5146. smalltalk.method({
  5147. selector: "variables",
  5148. category: 'accessing',
  5149. fn: function (){
  5150. var self=this;
  5151. return smalltalk.withContext(function($ctx1) {
  5152. var $1;
  5153. $1=self["@variables"];
  5154. return $1;
  5155. }, function($ctx1) {$ctx1.fill(self,"variables",{},smalltalk.Inspector)})},
  5156. args: [],
  5157. source: "variables\x0a\x09^variables",
  5158. messageSends: [],
  5159. referencedClasses: []
  5160. }),
  5161. smalltalk.Inspector);
  5162. smalltalk.addMethod(
  5163. smalltalk.method({
  5164. selector: "inspect:",
  5165. category: 'instance creation',
  5166. fn: function (anObject){
  5167. var self=this;
  5168. return smalltalk.withContext(function($ctx1) {
  5169. var $2,$3,$1;
  5170. $2=self._new();
  5171. _st($2)._inspect_(anObject);
  5172. _st($2)._open();
  5173. $3=_st($2)._yourself();
  5174. $1=$3;
  5175. return $1;
  5176. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},smalltalk.Inspector.klass)})},
  5177. args: ["anObject"],
  5178. source: "inspect: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  5179. messageSends: ["inspect:", "new", "open", "yourself"],
  5180. referencedClasses: []
  5181. }),
  5182. smalltalk.Inspector.klass);
  5183. smalltalk.addMethod(
  5184. smalltalk.method({
  5185. selector: "on:",
  5186. category: 'instance creation',
  5187. fn: function (anObject){
  5188. var self=this;
  5189. return smalltalk.withContext(function($ctx1) {
  5190. var $2,$3,$1;
  5191. $2=self._new();
  5192. _st($2)._inspect_(anObject);
  5193. $3=_st($2)._yourself();
  5194. $1=$3;
  5195. return $1;
  5196. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},smalltalk.Inspector.klass)})},
  5197. args: ["anObject"],
  5198. source: "on: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  5199. messageSends: ["inspect:", "new", "yourself"],
  5200. referencedClasses: []
  5201. }),
  5202. smalltalk.Inspector.klass);
  5203. smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5204. smalltalk.addMethod(
  5205. smalltalk.method({
  5206. selector: "percent",
  5207. category: 'accessing',
  5208. fn: function (){
  5209. var self=this;
  5210. return smalltalk.withContext(function($ctx1) {
  5211. var $2,$1;
  5212. $2=self["@percent"];
  5213. if(($receiver = $2) == nil || $receiver == null){
  5214. $1=(0);
  5215. } else {
  5216. $1=$2;
  5217. };
  5218. return $1;
  5219. }, function($ctx1) {$ctx1.fill(self,"percent",{},smalltalk.ProgressBar)})},
  5220. args: [],
  5221. source: "percent\x0a\x09^percent ifNil: [0]",
  5222. messageSends: ["ifNil:"],
  5223. referencedClasses: []
  5224. }),
  5225. smalltalk.ProgressBar);
  5226. smalltalk.addMethod(
  5227. smalltalk.method({
  5228. selector: "percent:",
  5229. category: 'accessing',
  5230. fn: function (aNumber){
  5231. var self=this;
  5232. return smalltalk.withContext(function($ctx1) {
  5233. self["@percent"]=aNumber;
  5234. return self}, function($ctx1) {$ctx1.fill(self,"percent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
  5235. args: ["aNumber"],
  5236. source: "percent: aNumber\x0a\x09percent := aNumber",
  5237. messageSends: [],
  5238. referencedClasses: []
  5239. }),
  5240. smalltalk.ProgressBar);
  5241. smalltalk.addMethod(
  5242. smalltalk.method({
  5243. selector: "renderOn:",
  5244. category: 'rendering',
  5245. fn: function (html){
  5246. var self=this;
  5247. return smalltalk.withContext(function($ctx1) {
  5248. var $1,$2;
  5249. $1=_st(html)._div();
  5250. _st($1)._class_("progress_bar");
  5251. $2=_st($1)._yourself();
  5252. self["@div"]=$2;
  5253. self._renderProgressBar();
  5254. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},smalltalk.ProgressBar)})},
  5255. args: ["html"],
  5256. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5257. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5258. referencedClasses: []
  5259. }),
  5260. smalltalk.ProgressBar);
  5261. smalltalk.addMethod(
  5262. smalltalk.method({
  5263. selector: "renderProgressBar",
  5264. category: 'rendering',
  5265. fn: function (){
  5266. var self=this;
  5267. return smalltalk.withContext(function($ctx1) {
  5268. var $1,$3,$4,$2;
  5269. _st(self["@div"])._contents_((function(html){
  5270. return smalltalk.withContext(function($ctx2) {
  5271. $1=_st(html)._div();
  5272. _st($1)._class_("progress");
  5273. $3=$1;
  5274. $4=_st("width:".__comma(_st(self._percent())._asString())).__comma("%");
  5275. $ctx2.sendIdx[","]=1;
  5276. $2=_st($3)._style_($4);
  5277. return $2;
  5278. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5279. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},smalltalk.ProgressBar)})},
  5280. args: [],
  5281. source: "renderProgressBar\x0a\x09div contents: [:html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%']",
  5282. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5283. referencedClasses: []
  5284. }),
  5285. smalltalk.ProgressBar);
  5286. smalltalk.addMethod(
  5287. smalltalk.method({
  5288. selector: "updatePercent:",
  5289. category: 'updating',
  5290. fn: function (aNumber){
  5291. var self=this;
  5292. return smalltalk.withContext(function($ctx1) {
  5293. self._percent_(aNumber);
  5294. self._renderProgressBar();
  5295. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},smalltalk.ProgressBar)})},
  5296. args: ["aNumber"],
  5297. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5298. messageSends: ["percent:", "renderProgressBar"],
  5299. referencedClasses: []
  5300. }),
  5301. smalltalk.ProgressBar);
  5302. smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5303. smalltalk.addMethod(
  5304. smalltalk.method({
  5305. selector: "canBeClosed",
  5306. category: 'testing',
  5307. fn: function (){
  5308. var self=this;
  5309. return smalltalk.withContext(function($ctx1) {
  5310. return true;
  5311. }, function($ctx1) {$ctx1.fill(self,"canBeClosed",{},smalltalk.ReferencesBrowser)})},
  5312. args: [],
  5313. source: "canBeClosed\x0a\x09^true",
  5314. messageSends: [],
  5315. referencedClasses: []
  5316. }),
  5317. smalltalk.ReferencesBrowser);
  5318. smalltalk.addMethod(
  5319. smalltalk.method({
  5320. selector: "classesAndMetaclasses",
  5321. category: 'accessing',
  5322. fn: function (){
  5323. var self=this;
  5324. function $Smalltalk(){return smalltalk.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5325. return smalltalk.withContext(function($ctx1) {
  5326. var $3,$2,$1;
  5327. $3=_st($Smalltalk())._current();
  5328. $ctx1.sendIdx["current"]=1;
  5329. $2=_st($3)._classes();
  5330. $ctx1.sendIdx["classes"]=1;
  5331. $1=_st($2).__comma(_st(_st(_st($Smalltalk())._current())._classes())._collect_((function(each){
  5332. return smalltalk.withContext(function($ctx2) {
  5333. return _st(each)._class();
  5334. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})));
  5335. return $1;
  5336. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},smalltalk.ReferencesBrowser)})},
  5337. args: [],
  5338. source: "classesAndMetaclasses\x0a\x09^Smalltalk current classes, (Smalltalk current classes collect: [:each | each class])",
  5339. messageSends: [",", "classes", "current", "collect:", "class"],
  5340. referencedClasses: ["Smalltalk"]
  5341. }),
  5342. smalltalk.ReferencesBrowser);
  5343. smalltalk.addMethod(
  5344. smalltalk.method({
  5345. selector: "implementors",
  5346. category: 'accessing',
  5347. fn: function (){
  5348. var self=this;
  5349. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5350. return smalltalk.withContext(function($ctx1) {
  5351. var $2,$1;
  5352. $2=self["@implementors"];
  5353. if(($receiver = $2) == nil || $receiver == null){
  5354. self["@implementors"]=_st($Array())._new();
  5355. $1=self["@implementors"];
  5356. } else {
  5357. $1=$2;
  5358. };
  5359. return $1;
  5360. }, function($ctx1) {$ctx1.fill(self,"implementors",{},smalltalk.ReferencesBrowser)})},
  5361. args: [],
  5362. source: "implementors\x0a\x09^implementors ifNil: [implementors := Array new]",
  5363. messageSends: ["ifNil:", "new"],
  5364. referencedClasses: ["Array"]
  5365. }),
  5366. smalltalk.ReferencesBrowser);
  5367. smalltalk.addMethod(
  5368. smalltalk.method({
  5369. selector: "initialize",
  5370. category: 'initialization',
  5371. fn: function (){
  5372. var self=this;
  5373. return smalltalk.withContext(function($ctx1) {
  5374. smalltalk.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []);
  5375. self["@selector"]="";
  5376. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.ReferencesBrowser)})},
  5377. args: [],
  5378. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  5379. messageSends: ["initialize"],
  5380. referencedClasses: []
  5381. }),
  5382. smalltalk.ReferencesBrowser);
  5383. smalltalk.addMethod(
  5384. smalltalk.method({
  5385. selector: "label",
  5386. category: 'accessing',
  5387. fn: function (){
  5388. var self=this;
  5389. return smalltalk.withContext(function($ctx1) {
  5390. return "[References]";
  5391. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.ReferencesBrowser)})},
  5392. args: [],
  5393. source: "label\x0a\x09^'[References]'",
  5394. messageSends: [],
  5395. referencedClasses: []
  5396. }),
  5397. smalltalk.ReferencesBrowser);
  5398. smalltalk.addMethod(
  5399. smalltalk.method({
  5400. selector: "matches",
  5401. category: 'accessing',
  5402. fn: function (){
  5403. var self=this;
  5404. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5405. return smalltalk.withContext(function($ctx1) {
  5406. var $2,$1;
  5407. $2=self["@matches"];
  5408. if(($receiver = $2) == nil || $receiver == null){
  5409. self["@matches"]=_st($Array())._new();
  5410. $1=self["@matches"];
  5411. } else {
  5412. $1=$2;
  5413. };
  5414. return $1;
  5415. }, function($ctx1) {$ctx1.fill(self,"matches",{},smalltalk.ReferencesBrowser)})},
  5416. args: [],
  5417. source: "matches\x0a\x09^matches ifNil: [matches := Array new]",
  5418. messageSends: ["ifNil:", "new"],
  5419. referencedClasses: ["Array"]
  5420. }),
  5421. smalltalk.ReferencesBrowser);
  5422. smalltalk.addMethod(
  5423. smalltalk.method({
  5424. selector: "openBrowserOn:",
  5425. category: 'actions',
  5426. fn: function (aMethod){
  5427. var self=this;
  5428. var browser;
  5429. function $Browser(){return smalltalk.Browser||(typeof Browser=="undefined"?nil:Browser)}
  5430. return smalltalk.withContext(function($ctx1) {
  5431. var $3,$2,$4,$1,$5,$6,$7;
  5432. $3=_st(aMethod)._methodClass();
  5433. $ctx1.sendIdx["methodClass"]=1;
  5434. $2=_st($3)._isMetaclass();
  5435. $ctx1.sendIdx["isMetaclass"]=1;
  5436. if(smalltalk.assert($2)){
  5437. $4=_st(aMethod)._methodClass();
  5438. $ctx1.sendIdx["methodClass"]=2;
  5439. $1=_st($4)._instanceClass();
  5440. } else {
  5441. $1=_st(aMethod)._methodClass();
  5442. $ctx1.sendIdx["methodClass"]=3;
  5443. };
  5444. browser=_st($Browser())._openOn_($1);
  5445. $5=_st(_st(aMethod)._methodClass())._isMetaclass();
  5446. if(smalltalk.assert($5)){
  5447. _st(browser)._selectTab_("class");
  5448. };
  5449. $6=browser;
  5450. _st($6)._selectProtocol_(_st(aMethod)._category());
  5451. $7=_st($6)._selectMethod_(aMethod);
  5452. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},smalltalk.ReferencesBrowser)})},
  5453. args: ["aMethod"],
  5454. 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",
  5455. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  5456. referencedClasses: ["Browser"]
  5457. }),
  5458. smalltalk.ReferencesBrowser);
  5459. smalltalk.addMethod(
  5460. smalltalk.method({
  5461. selector: "referencedClasses",
  5462. category: 'accessing',
  5463. fn: function (){
  5464. var self=this;
  5465. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5466. return smalltalk.withContext(function($ctx1) {
  5467. var $2,$1;
  5468. $2=self["@referencedClasses"];
  5469. if(($receiver = $2) == nil || $receiver == null){
  5470. self["@referencedClasses"]=_st($Array())._new();
  5471. $1=self["@referencedClasses"];
  5472. } else {
  5473. $1=$2;
  5474. };
  5475. return $1;
  5476. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},smalltalk.ReferencesBrowser)})},
  5477. args: [],
  5478. source: "referencedClasses\x0a\x09^referencedClasses ifNil: [referencedClasses := Array new]",
  5479. messageSends: ["ifNil:", "new"],
  5480. referencedClasses: ["Array"]
  5481. }),
  5482. smalltalk.ReferencesBrowser);
  5483. smalltalk.addMethod(
  5484. smalltalk.method({
  5485. selector: "renderBoxOn:",
  5486. category: 'rendering',
  5487. fn: function (html){
  5488. var self=this;
  5489. return smalltalk.withContext(function($ctx1) {
  5490. var $1;
  5491. self._renderInputOn_(html);
  5492. self._renderImplementorsOn_(html);
  5493. self._renderSendersOn_(html);
  5494. self._renderReferencedClassesOn_(html);
  5495. $1=self._renderMatchesOn_(html);
  5496. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5497. args: ["html"],
  5498. 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",
  5499. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  5500. referencedClasses: []
  5501. }),
  5502. smalltalk.ReferencesBrowser);
  5503. smalltalk.addMethod(
  5504. smalltalk.method({
  5505. selector: "renderImplementorsOn:",
  5506. category: 'rendering',
  5507. fn: function (html){
  5508. var self=this;
  5509. return smalltalk.withContext(function($ctx1) {
  5510. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  5511. self._updateImplementorsList();
  5512. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5513. args: ["html"],
  5514. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  5515. messageSends: ["class:", "ul", "updateImplementorsList"],
  5516. referencedClasses: []
  5517. }),
  5518. smalltalk.ReferencesBrowser);
  5519. smalltalk.addMethod(
  5520. smalltalk.method({
  5521. selector: "renderInputOn:",
  5522. category: 'rendering',
  5523. fn: function (html){
  5524. var self=this;
  5525. return smalltalk.withContext(function($ctx1) {
  5526. var $1,$2;
  5527. $1=_st(html)._input();
  5528. _st($1)._class_("implementors");
  5529. $2=_st($1)._yourself();
  5530. self["@input"]=$2;
  5531. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  5532. self._setInputEvents();
  5533. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5534. args: ["html"],
  5535. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  5536. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
  5537. referencedClasses: []
  5538. }),
  5539. smalltalk.ReferencesBrowser);
  5540. smalltalk.addMethod(
  5541. smalltalk.method({
  5542. selector: "renderMatchesOn:",
  5543. category: 'rendering',
  5544. fn: function (html){
  5545. var self=this;
  5546. return smalltalk.withContext(function($ctx1) {
  5547. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  5548. self._updateMatchesList();
  5549. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5550. args: ["html"],
  5551. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  5552. messageSends: ["class:", "ul", "updateMatchesList"],
  5553. referencedClasses: []
  5554. }),
  5555. smalltalk.ReferencesBrowser);
  5556. smalltalk.addMethod(
  5557. smalltalk.method({
  5558. selector: "renderReferencedClassesOn:",
  5559. category: 'rendering',
  5560. fn: function (html){
  5561. var self=this;
  5562. return smalltalk.withContext(function($ctx1) {
  5563. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  5564. self._updateReferencedClassesList();
  5565. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5566. args: ["html"],
  5567. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  5568. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  5569. referencedClasses: []
  5570. }),
  5571. smalltalk.ReferencesBrowser);
  5572. smalltalk.addMethod(
  5573. smalltalk.method({
  5574. selector: "renderSendersOn:",
  5575. category: 'rendering',
  5576. fn: function (html){
  5577. var self=this;
  5578. return smalltalk.withContext(function($ctx1) {
  5579. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  5580. self._updateSendersList();
  5581. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},smalltalk.ReferencesBrowser)})},
  5582. args: ["html"],
  5583. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  5584. messageSends: ["class:", "ul", "updateSendersList"],
  5585. referencedClasses: []
  5586. }),
  5587. smalltalk.ReferencesBrowser);
  5588. smalltalk.addMethod(
  5589. smalltalk.method({
  5590. selector: "search:",
  5591. category: 'actions',
  5592. fn: function (aString){
  5593. var self=this;
  5594. return smalltalk.withContext(function($ctx1) {
  5595. var $1;
  5596. self._searchReferencesFor_(aString);
  5597. self._updateImplementorsList();
  5598. self._updateSendersList();
  5599. self._updateReferencedClassesList();
  5600. $1=self._updateMatchesList();
  5601. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser)})},
  5602. args: ["aString"],
  5603. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  5604. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  5605. referencedClasses: []
  5606. }),
  5607. smalltalk.ReferencesBrowser);
  5608. smalltalk.addMethod(
  5609. smalltalk.method({
  5610. selector: "searchMethodSource",
  5611. category: 'actions',
  5612. fn: function (){
  5613. var self=this;
  5614. var regex;
  5615. return smalltalk.withContext(function($ctx1) {
  5616. var $1;
  5617. regex=_st(self["@selector"])._allButFirst();
  5618. _st(self._classesAndMetaclasses())._do_((function(each){
  5619. return smalltalk.withContext(function($ctx2) {
  5620. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  5621. return smalltalk.withContext(function($ctx3) {
  5622. $1=_st(_st(value)._source())._match_(regex);
  5623. if(smalltalk.assert($1)){
  5624. return _st(self._matches())._add_(value);
  5625. };
  5626. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5627. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5628. $ctx1.sendIdx["do:"]=1;
  5629. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},smalltalk.ReferencesBrowser)})},
  5630. args: [],
  5631. source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [:each |\x0a\x09\x09each methodDictionary values do: [:value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value]]]",
  5632. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "values", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  5633. referencedClasses: []
  5634. }),
  5635. smalltalk.ReferencesBrowser);
  5636. smalltalk.addMethod(
  5637. smalltalk.method({
  5638. selector: "searchReferencedClasses",
  5639. category: 'actions',
  5640. fn: function (){
  5641. var self=this;
  5642. return smalltalk.withContext(function($ctx1) {
  5643. var $2,$1;
  5644. _st(self._classesAndMetaclasses())._do_((function(each){
  5645. return smalltalk.withContext(function($ctx2) {
  5646. return _st(_st(_st(each)._methodDictionary())._values())._do_((function(value){
  5647. return smalltalk.withContext(function($ctx3) {
  5648. $2=_st(value)._referencedClasses();
  5649. $ctx3.sendIdx["referencedClasses"]=1;
  5650. $1=_st($2)._includes_(self["@selector"]);
  5651. if(smalltalk.assert($1)){
  5652. return _st(self._referencedClasses())._add_(value);
  5653. };
  5654. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5655. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5656. $ctx1.sendIdx["do:"]=1;
  5657. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},smalltalk.ReferencesBrowser)})},
  5658. args: [],
  5659. source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [:each |\x0a\x09\x09each methodDictionary values do: [:value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value]]]",
  5660. messageSends: ["do:", "classesAndMetaclasses", "values", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  5661. referencedClasses: []
  5662. }),
  5663. smalltalk.ReferencesBrowser);
  5664. smalltalk.addMethod(
  5665. smalltalk.method({
  5666. selector: "searchReferencesFor:",
  5667. category: 'actions',
  5668. fn: function (aString){
  5669. var self=this;
  5670. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5671. return smalltalk.withContext(function($ctx1) {
  5672. var $1;
  5673. self["@selector"]=aString;
  5674. self["@implementors"]=_st($Array())._new();
  5675. $ctx1.sendIdx["new"]=1;
  5676. self["@senders"]=_st($Array())._new();
  5677. $ctx1.sendIdx["new"]=2;
  5678. self["@referencedClasses"]=_st($Array())._new();
  5679. $ctx1.sendIdx["new"]=3;
  5680. self["@matches"]=_st($Array())._new();
  5681. self._searchMethodSource();
  5682. $1=_st(self["@selector"])._match_("^[A-Z]");
  5683. if(smalltalk.assert($1)){
  5684. self._searchReferencedClasses();
  5685. } else {
  5686. self._searchSelectorReferences();
  5687. };
  5688. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},smalltalk.ReferencesBrowser)})},
  5689. args: ["aString"],
  5690. 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]",
  5691. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  5692. referencedClasses: ["Array"]
  5693. }),
  5694. smalltalk.ReferencesBrowser);
  5695. smalltalk.addMethod(
  5696. smalltalk.method({
  5697. selector: "searchSelectorReferences",
  5698. category: 'actions',
  5699. fn: function (){
  5700. var self=this;
  5701. return smalltalk.withContext(function($ctx1) {
  5702. var $1,$2;
  5703. _st(self._classesAndMetaclasses())._do_((function(each){
  5704. return smalltalk.withContext(function($ctx2) {
  5705. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  5706. return smalltalk.withContext(function($ctx3) {
  5707. $1=_st(key).__eq(self["@selector"]);
  5708. if(smalltalk.assert($1)){
  5709. _st(self._implementors())._add_(value);
  5710. $ctx3.sendIdx["add:"]=1;
  5711. };
  5712. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  5713. if(smalltalk.assert($2)){
  5714. return _st(self._senders())._add_(value);
  5715. };
  5716. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)})}));
  5717. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5718. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},smalltalk.ReferencesBrowser)})},
  5719. args: [],
  5720. 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]]]",
  5721. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  5722. referencedClasses: []
  5723. }),
  5724. smalltalk.ReferencesBrowser);
  5725. smalltalk.addMethod(
  5726. smalltalk.method({
  5727. selector: "selector",
  5728. category: 'accessing',
  5729. fn: function (){
  5730. var self=this;
  5731. return smalltalk.withContext(function($ctx1) {
  5732. var $1;
  5733. $1=self["@selector"];
  5734. return $1;
  5735. }, function($ctx1) {$ctx1.fill(self,"selector",{},smalltalk.ReferencesBrowser)})},
  5736. args: [],
  5737. source: "selector\x0a\x09^selector",
  5738. messageSends: [],
  5739. referencedClasses: []
  5740. }),
  5741. smalltalk.ReferencesBrowser);
  5742. smalltalk.addMethod(
  5743. smalltalk.method({
  5744. selector: "senders",
  5745. category: 'accessing',
  5746. fn: function (){
  5747. var self=this;
  5748. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  5749. return smalltalk.withContext(function($ctx1) {
  5750. var $2,$1;
  5751. $2=self["@senders"];
  5752. if(($receiver = $2) == nil || $receiver == null){
  5753. self["@senders"]=_st($Array())._new();
  5754. $1=self["@senders"];
  5755. } else {
  5756. $1=$2;
  5757. };
  5758. return $1;
  5759. }, function($ctx1) {$ctx1.fill(self,"senders",{},smalltalk.ReferencesBrowser)})},
  5760. args: [],
  5761. source: "senders\x0a\x09^senders ifNil: [senders := Array new]",
  5762. messageSends: ["ifNil:", "new"],
  5763. referencedClasses: ["Array"]
  5764. }),
  5765. smalltalk.ReferencesBrowser);
  5766. smalltalk.addMethod(
  5767. smalltalk.method({
  5768. selector: "setInputEvents",
  5769. category: 'private',
  5770. fn: function (){
  5771. var self=this;
  5772. return smalltalk.withContext(function($ctx1) {
  5773. var $1,$3,$2;
  5774. $1=self["@input"];
  5775. _st($1)._onKeyUp_((function(){
  5776. return smalltalk.withContext(function($ctx2) {
  5777. self["@timer"]=_st((function(){
  5778. return smalltalk.withContext(function($ctx3) {
  5779. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  5780. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}))._valueWithTimeout_((100));
  5781. return self["@timer"];
  5782. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5783. $2=_st($1)._onKeyDown_((function(){
  5784. return smalltalk.withContext(function($ctx2) {
  5785. $3=self["@timer"];
  5786. if(($receiver = $3) == nil || $receiver == null){
  5787. return $3;
  5788. } else {
  5789. return _st(self["@timer"])._clearTimeout();
  5790. };
  5791. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  5792. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},smalltalk.ReferencesBrowser)})},
  5793. args: [],
  5794. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [timer := [self search: input asJQuery val] valueWithTimeout: 100];\x0a\x09\x09onKeyDown: [timer ifNotNil: [timer clearTimeout]]",
  5795. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  5796. referencedClasses: []
  5797. }),
  5798. smalltalk.ReferencesBrowser);
  5799. smalltalk.addMethod(
  5800. smalltalk.method({
  5801. selector: "updateImplementorsList",
  5802. category: 'updating',
  5803. fn: function (){
  5804. var self=this;
  5805. return smalltalk.withContext(function($ctx1) {
  5806. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5807. _st(self["@implementorsList"])._contents_((function(html){
  5808. return smalltalk.withContext(function($ctx2) {
  5809. $1=_st(html)._li();
  5810. $ctx2.sendIdx["li"]=1;
  5811. _st($1)._class_("column_label");
  5812. $2=$1;
  5813. $7=self._implementors();
  5814. $ctx2.sendIdx["implementors"]=1;
  5815. $6=_st($7)._size();
  5816. $5=_st($6)._asString();
  5817. $ctx2.sendIdx["asString"]=1;
  5818. $4="Implementors (".__comma($5);
  5819. $ctx2.sendIdx[","]=2;
  5820. $3=_st($4).__comma(")");
  5821. $ctx2.sendIdx[","]=1;
  5822. _st($2)._with_($3);
  5823. $ctx2.sendIdx["with:"]=1;
  5824. $8=_st($1)._style_("font-weight: bold");
  5825. $8;
  5826. return _st(self._implementors())._do_((function(each){
  5827. var li;
  5828. return smalltalk.withContext(function($ctx3) {
  5829. li=_st(html)._li();
  5830. li;
  5831. $9=li;
  5832. $10=$9;
  5833. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  5834. $ctx3.sendIdx[","]=3;
  5835. _st($10)._with_($11);
  5836. $12=_st($9)._onClick_((function(){
  5837. return smalltalk.withContext(function($ctx4) {
  5838. return self._openBrowserOn_(each);
  5839. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5840. return $12;
  5841. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5842. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5843. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},smalltalk.ReferencesBrowser)})},
  5844. args: [],
  5845. 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]]]",
  5846. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5847. referencedClasses: []
  5848. }),
  5849. smalltalk.ReferencesBrowser);
  5850. smalltalk.addMethod(
  5851. smalltalk.method({
  5852. selector: "updateMatchesList",
  5853. category: 'updating',
  5854. fn: function (){
  5855. var self=this;
  5856. return smalltalk.withContext(function($ctx1) {
  5857. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5858. _st(self["@matchesList"])._contents_((function(html){
  5859. return smalltalk.withContext(function($ctx2) {
  5860. $1=_st(html)._li();
  5861. $ctx2.sendIdx["li"]=1;
  5862. _st($1)._class_("column_label");
  5863. $2=$1;
  5864. $7=self._matches();
  5865. $ctx2.sendIdx["matches"]=1;
  5866. $6=_st($7)._size();
  5867. $5=_st($6)._asString();
  5868. $ctx2.sendIdx["asString"]=1;
  5869. $4="Regex matches (".__comma($5);
  5870. $ctx2.sendIdx[","]=2;
  5871. $3=_st($4).__comma(")");
  5872. $ctx2.sendIdx[","]=1;
  5873. _st($2)._with_($3);
  5874. $ctx2.sendIdx["with:"]=1;
  5875. $8=_st($1)._style_("font-weight: bold");
  5876. $8;
  5877. return _st(self._matches())._do_((function(each){
  5878. var li;
  5879. return smalltalk.withContext(function($ctx3) {
  5880. li=_st(html)._li();
  5881. li;
  5882. $9=li;
  5883. $10=$9;
  5884. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5885. $ctx3.sendIdx[","]=3;
  5886. _st($10)._with_($11);
  5887. $12=_st($9)._onClick_((function(){
  5888. return smalltalk.withContext(function($ctx4) {
  5889. return self._openBrowserOn_(each);
  5890. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5891. return $12;
  5892. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5893. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5894. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},smalltalk.ReferencesBrowser)})},
  5895. args: [],
  5896. 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]]]",
  5897. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5898. referencedClasses: []
  5899. }),
  5900. smalltalk.ReferencesBrowser);
  5901. smalltalk.addMethod(
  5902. smalltalk.method({
  5903. selector: "updateReferencedClassesList",
  5904. category: 'updating',
  5905. fn: function (){
  5906. var self=this;
  5907. return smalltalk.withContext(function($ctx1) {
  5908. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5909. _st(self["@referencedClassesList"])._contents_((function(html){
  5910. return smalltalk.withContext(function($ctx2) {
  5911. $1=_st(html)._li();
  5912. $ctx2.sendIdx["li"]=1;
  5913. _st($1)._class_("column_label");
  5914. $2=$1;
  5915. $7=self._referencedClasses();
  5916. $ctx2.sendIdx["referencedClasses"]=1;
  5917. $6=_st($7)._size();
  5918. $5=_st($6)._asString();
  5919. $ctx2.sendIdx["asString"]=1;
  5920. $4="Class references (".__comma($5);
  5921. $ctx2.sendIdx[","]=2;
  5922. $3=_st($4).__comma(")");
  5923. $ctx2.sendIdx[","]=1;
  5924. _st($2)._with_($3);
  5925. $ctx2.sendIdx["with:"]=1;
  5926. $8=_st($1)._style_("font-weight: bold");
  5927. $8;
  5928. return _st(self._referencedClasses())._do_((function(each){
  5929. return smalltalk.withContext(function($ctx3) {
  5930. $9=_st(html)._li();
  5931. $10=$9;
  5932. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5933. $ctx3.sendIdx[","]=3;
  5934. _st($10)._with_($11);
  5935. $12=_st($9)._onClick_((function(){
  5936. return smalltalk.withContext(function($ctx4) {
  5937. return self._openBrowserOn_(each);
  5938. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5939. return $12;
  5940. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5941. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5942. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},smalltalk.ReferencesBrowser)})},
  5943. args: [],
  5944. 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]]]",
  5945. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5946. referencedClasses: []
  5947. }),
  5948. smalltalk.ReferencesBrowser);
  5949. smalltalk.addMethod(
  5950. smalltalk.method({
  5951. selector: "updateSendersList",
  5952. category: 'updating',
  5953. fn: function (){
  5954. var self=this;
  5955. return smalltalk.withContext(function($ctx1) {
  5956. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5957. _st(self["@sendersList"])._contents_((function(html){
  5958. return smalltalk.withContext(function($ctx2) {
  5959. $1=_st(html)._li();
  5960. $ctx2.sendIdx["li"]=1;
  5961. _st($1)._class_("column_label");
  5962. $2=$1;
  5963. $7=self._senders();
  5964. $ctx2.sendIdx["senders"]=1;
  5965. $6=_st($7)._size();
  5966. $5=_st($6)._asString();
  5967. $ctx2.sendIdx["asString"]=1;
  5968. $4="Senders (".__comma($5);
  5969. $ctx2.sendIdx[","]=2;
  5970. $3=_st($4).__comma(")");
  5971. $ctx2.sendIdx[","]=1;
  5972. _st($2)._with_($3);
  5973. $ctx2.sendIdx["with:"]=1;
  5974. $8=_st($1)._style_("font-weight: bold");
  5975. $8;
  5976. return _st(self._senders())._do_((function(each){
  5977. return smalltalk.withContext(function($ctx3) {
  5978. $9=_st(html)._li();
  5979. $10=$9;
  5980. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5981. $ctx3.sendIdx[","]=3;
  5982. _st($10)._with_($11);
  5983. $12=_st($9)._onClick_((function(){
  5984. return smalltalk.withContext(function($ctx4) {
  5985. return self._openBrowserOn_(each);
  5986. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5987. return $12;
  5988. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5989. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5990. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},smalltalk.ReferencesBrowser)})},
  5991. args: [],
  5992. 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]]]",
  5993. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5994. referencedClasses: []
  5995. }),
  5996. smalltalk.ReferencesBrowser);
  5997. smalltalk.addMethod(
  5998. smalltalk.method({
  5999. selector: "search:",
  6000. category: 'instance creation',
  6001. fn: function (aString){
  6002. var self=this;
  6003. return smalltalk.withContext(function($ctx1) {
  6004. var $2,$3,$1;
  6005. $2=self._new();
  6006. _st($2)._searchReferencesFor_(aString);
  6007. $3=_st($2)._open();
  6008. $1=$3;
  6009. return $1;
  6010. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},smalltalk.ReferencesBrowser.klass)})},
  6011. args: ["aString"],
  6012. source: "search: aString\x0a\x09^self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  6013. messageSends: ["searchReferencesFor:", "new", "open"],
  6014. referencedClasses: []
  6015. }),
  6016. smalltalk.ReferencesBrowser.klass);
  6017. smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  6018. smalltalk.addMethod(
  6019. smalltalk.method({
  6020. selector: "allClasses",
  6021. category: 'accessing',
  6022. fn: function (){
  6023. var self=this;
  6024. function $TestCase(){return smalltalk.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  6025. return smalltalk.withContext(function($ctx1) {
  6026. var $1;
  6027. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  6028. return smalltalk.withContext(function($ctx2) {
  6029. return _st(_st(each)._isAbstract())._not();
  6030. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6031. return $1;
  6032. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},smalltalk.TestRunner)})},
  6033. args: [],
  6034. source: "allClasses\x0a\x09^TestCase allSubclasses select: [ :each | each isAbstract not ]",
  6035. messageSends: ["select:", "allSubclasses", "not", "isAbstract"],
  6036. referencedClasses: ["TestCase"]
  6037. }),
  6038. smalltalk.TestRunner);
  6039. smalltalk.addMethod(
  6040. smalltalk.method({
  6041. selector: "classes",
  6042. category: 'accessing',
  6043. fn: function (){
  6044. var self=this;
  6045. return smalltalk.withContext(function($ctx1) {
  6046. var $2,$1;
  6047. $1=_st(_st(self._allClasses())._select_((function(each){
  6048. return smalltalk.withContext(function($ctx2) {
  6049. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6050. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  6051. return smalltalk.withContext(function($ctx2) {
  6052. $2=_st(a)._name();
  6053. $ctx2.sendIdx["name"]=1;
  6054. return _st($2).__gt(_st(b)._name());
  6055. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
  6056. return $1;
  6057. }, function($ctx1) {$ctx1.fill(self,"classes",{},smalltalk.TestRunner)})},
  6058. args: [],
  6059. source: "classes\x0a\x09^(self allClasses\x0a\x09select: [:each | self selectedCategories includes: each category])\x0a\x09sort: [:a :b | a name > b name]",
  6060. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  6061. referencedClasses: []
  6062. }),
  6063. smalltalk.TestRunner);
  6064. smalltalk.addMethod(
  6065. smalltalk.method({
  6066. selector: "initialize",
  6067. category: 'initialization',
  6068. fn: function (){
  6069. var self=this;
  6070. function $TestResult(){return smalltalk.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  6071. return smalltalk.withContext(function($ctx1) {
  6072. smalltalk.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
  6073. self["@result"]=_st($TestResult())._new();
  6074. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},smalltalk.TestRunner)})},
  6075. args: [],
  6076. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6077. messageSends: ["initialize", "new"],
  6078. referencedClasses: ["TestResult"]
  6079. }),
  6080. smalltalk.TestRunner);
  6081. smalltalk.addMethod(
  6082. smalltalk.method({
  6083. selector: "isSelectedCategory:",
  6084. category: 'testing',
  6085. fn: function (aCategory){
  6086. var self=this;
  6087. return smalltalk.withContext(function($ctx1) {
  6088. var $1;
  6089. $1=_st(self._selectedCategories())._includes_(aCategory);
  6090. return $1;
  6091. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},smalltalk.TestRunner)})},
  6092. args: ["aCategory"],
  6093. source: "isSelectedCategory: aCategory\x0a\x09^(self selectedCategories includes: aCategory)",
  6094. messageSends: ["includes:", "selectedCategories"],
  6095. referencedClasses: []
  6096. }),
  6097. smalltalk.TestRunner);
  6098. smalltalk.addMethod(
  6099. smalltalk.method({
  6100. selector: "isSelectedClass:",
  6101. category: 'testing',
  6102. fn: function (aClass){
  6103. var self=this;
  6104. return smalltalk.withContext(function($ctx1) {
  6105. var $1;
  6106. $1=_st(self._selectedClasses())._includes_(aClass);
  6107. return $1;
  6108. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},smalltalk.TestRunner)})},
  6109. args: ["aClass"],
  6110. source: "isSelectedClass: aClass\x0a\x09^(self selectedClasses includes: aClass)",
  6111. messageSends: ["includes:", "selectedClasses"],
  6112. referencedClasses: []
  6113. }),
  6114. smalltalk.TestRunner);
  6115. smalltalk.addMethod(
  6116. smalltalk.method({
  6117. selector: "label",
  6118. category: 'accessing',
  6119. fn: function (){
  6120. var self=this;
  6121. return smalltalk.withContext(function($ctx1) {
  6122. return "SUnit";
  6123. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.TestRunner)})},
  6124. args: [],
  6125. source: "label\x0a\x09^'SUnit'",
  6126. messageSends: [],
  6127. referencedClasses: []
  6128. }),
  6129. smalltalk.TestRunner);
  6130. smalltalk.addMethod(
  6131. smalltalk.method({
  6132. selector: "packages",
  6133. category: 'accessing',
  6134. fn: function (){
  6135. var self=this;
  6136. var packages;
  6137. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6138. return smalltalk.withContext(function($ctx1) {
  6139. var $2,$3,$1,$4;
  6140. packages=_st($Array())._new();
  6141. _st(self._allClasses())._do_((function(each){
  6142. return smalltalk.withContext(function($ctx2) {
  6143. $2=packages;
  6144. $3=_st(each)._category();
  6145. $ctx2.sendIdx["category"]=1;
  6146. $1=_st($2)._includes_($3);
  6147. if(! smalltalk.assert($1)){
  6148. return _st(packages)._add_(_st(each)._category());
  6149. };
  6150. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6151. $4=_st(packages)._sort();
  6152. return $4;
  6153. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},smalltalk.TestRunner)})},
  6154. args: [],
  6155. 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",
  6156. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6157. referencedClasses: ["Array"]
  6158. }),
  6159. smalltalk.TestRunner);
  6160. smalltalk.addMethod(
  6161. smalltalk.method({
  6162. selector: "performFailure:",
  6163. category: 'actions',
  6164. fn: function (aTestCase){
  6165. var self=this;
  6166. return smalltalk.withContext(function($ctx1) {
  6167. _st(aTestCase)._runCase();
  6168. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},smalltalk.TestRunner)})},
  6169. args: ["aTestCase"],
  6170. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6171. messageSends: ["runCase"],
  6172. referencedClasses: []
  6173. }),
  6174. smalltalk.TestRunner);
  6175. smalltalk.addMethod(
  6176. smalltalk.method({
  6177. selector: "printErrors",
  6178. category: 'printing',
  6179. fn: function (){
  6180. var self=this;
  6181. return smalltalk.withContext(function($ctx1) {
  6182. var $1;
  6183. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6184. return $1;
  6185. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},smalltalk.TestRunner)})},
  6186. args: [],
  6187. source: "printErrors\x0a\x09^self result errors size asString , ' errors, '",
  6188. messageSends: [",", "asString", "size", "errors", "result"],
  6189. referencedClasses: []
  6190. }),
  6191. smalltalk.TestRunner);
  6192. smalltalk.addMethod(
  6193. smalltalk.method({
  6194. selector: "printFailures",
  6195. category: 'printing',
  6196. fn: function (){
  6197. var self=this;
  6198. return smalltalk.withContext(function($ctx1) {
  6199. var $1;
  6200. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6201. return $1;
  6202. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},smalltalk.TestRunner)})},
  6203. args: [],
  6204. source: "printFailures\x0a\x09^self result failures size asString, ' failures'",
  6205. messageSends: [",", "asString", "size", "failures", "result"],
  6206. referencedClasses: []
  6207. }),
  6208. smalltalk.TestRunner);
  6209. smalltalk.addMethod(
  6210. smalltalk.method({
  6211. selector: "printPasses",
  6212. category: 'printing',
  6213. fn: function (){
  6214. var self=this;
  6215. return smalltalk.withContext(function($ctx1) {
  6216. var $6,$5,$9,$8,$7,$4,$3,$2,$1;
  6217. $6=self._result();
  6218. $ctx1.sendIdx["result"]=1;
  6219. $5=_st($6)._runs();
  6220. $9=self._result();
  6221. $ctx1.sendIdx["result"]=2;
  6222. $8=_st($9)._errors();
  6223. $7=_st($8)._size();
  6224. $ctx1.sendIdx["size"]=1;
  6225. $4=_st($5).__minus($7);
  6226. $3=_st($4).__minus(_st(_st(self._result())._failures())._size());
  6227. $ctx1.sendIdx["-"]=1;
  6228. $2=_st($3)._asString();
  6229. $1=_st($2).__comma(" passes, ");
  6230. return $1;
  6231. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},smalltalk.TestRunner)})},
  6232. args: [],
  6233. source: "printPasses\x0a\x09^(self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6234. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6235. referencedClasses: []
  6236. }),
  6237. smalltalk.TestRunner);
  6238. smalltalk.addMethod(
  6239. smalltalk.method({
  6240. selector: "printTotal",
  6241. category: 'printing',
  6242. fn: function (){
  6243. var self=this;
  6244. return smalltalk.withContext(function($ctx1) {
  6245. var $1;
  6246. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6247. return $1;
  6248. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},smalltalk.TestRunner)})},
  6249. args: [],
  6250. source: "printTotal\x0a\x09^self result total asString, ' runs, '",
  6251. messageSends: [",", "asString", "total", "result"],
  6252. referencedClasses: []
  6253. }),
  6254. smalltalk.TestRunner);
  6255. smalltalk.addMethod(
  6256. smalltalk.method({
  6257. selector: "progressBar",
  6258. category: 'accessing',
  6259. fn: function (){
  6260. var self=this;
  6261. function $ProgressBar(){return smalltalk.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6262. return smalltalk.withContext(function($ctx1) {
  6263. var $2,$1;
  6264. $2=self["@progressBar"];
  6265. if(($receiver = $2) == nil || $receiver == null){
  6266. self["@progressBar"]=_st($ProgressBar())._new();
  6267. $1=self["@progressBar"];
  6268. } else {
  6269. $1=$2;
  6270. };
  6271. return $1;
  6272. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},smalltalk.TestRunner)})},
  6273. args: [],
  6274. source: "progressBar\x0a\x09^progressBar ifNil: [progressBar := ProgressBar new]",
  6275. messageSends: ["ifNil:", "new"],
  6276. referencedClasses: ["ProgressBar"]
  6277. }),
  6278. smalltalk.TestRunner);
  6279. smalltalk.addMethod(
  6280. smalltalk.method({
  6281. selector: "renderBoxOn:",
  6282. category: 'rendering',
  6283. fn: function (html){
  6284. var self=this;
  6285. return smalltalk.withContext(function($ctx1) {
  6286. var $1;
  6287. self._renderCategoriesOn_(html);
  6288. self._renderClassesOn_(html);
  6289. $1=self._renderResultsOn_(html);
  6290. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.TestRunner)})},
  6291. args: ["html"],
  6292. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6293. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6294. referencedClasses: []
  6295. }),
  6296. smalltalk.TestRunner);
  6297. smalltalk.addMethod(
  6298. smalltalk.method({
  6299. selector: "renderButtonsOn:",
  6300. category: 'rendering',
  6301. fn: function (html){
  6302. var self=this;
  6303. return smalltalk.withContext(function($ctx1) {
  6304. var $1,$2;
  6305. $1=_st(html)._button();
  6306. _st($1)._with_("Run selected");
  6307. $2=_st($1)._onClick_((function(){
  6308. return smalltalk.withContext(function($ctx2) {
  6309. return self._run_(self._testCases());
  6310. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6311. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.TestRunner)})},
  6312. args: ["html"],
  6313. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [self run: self testCases]",
  6314. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6315. referencedClasses: []
  6316. }),
  6317. smalltalk.TestRunner);
  6318. smalltalk.addMethod(
  6319. smalltalk.method({
  6320. selector: "renderCategoriesOn:",
  6321. category: 'rendering',
  6322. fn: function (html){
  6323. var self=this;
  6324. return smalltalk.withContext(function($ctx1) {
  6325. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6326. self._updateCategoriesList();
  6327. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},smalltalk.TestRunner)})},
  6328. args: ["html"],
  6329. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6330. messageSends: ["class:", "ul", "updateCategoriesList"],
  6331. referencedClasses: []
  6332. }),
  6333. smalltalk.TestRunner);
  6334. smalltalk.addMethod(
  6335. smalltalk.method({
  6336. selector: "renderClassesOn:",
  6337. category: 'rendering',
  6338. fn: function (html){
  6339. var self=this;
  6340. return smalltalk.withContext(function($ctx1) {
  6341. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6342. self._updateClassesList();
  6343. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},smalltalk.TestRunner)})},
  6344. args: ["html"],
  6345. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6346. messageSends: ["class:", "ul", "updateClassesList"],
  6347. referencedClasses: []
  6348. }),
  6349. smalltalk.TestRunner);
  6350. smalltalk.addMethod(
  6351. smalltalk.method({
  6352. selector: "renderErrorsOn:",
  6353. category: 'rendering',
  6354. fn: function (html){
  6355. var self=this;
  6356. return smalltalk.withContext(function($ctx1) {
  6357. var $1,$2,$3,$4;
  6358. _st(_st(self._result())._errors())._do_((function(each){
  6359. return smalltalk.withContext(function($ctx2) {
  6360. $1=_st(html)._li();
  6361. _st($1)._class_("errors");
  6362. $2=$1;
  6363. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6364. $ctx2.sendIdx[","]=1;
  6365. _st($2)._with_($3);
  6366. $4=_st($1)._onClick_((function(){
  6367. return smalltalk.withContext(function($ctx3) {
  6368. return self._performFailure_(each);
  6369. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6370. return $4;
  6371. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6372. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},smalltalk.TestRunner)})},
  6373. args: ["html"],
  6374. 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]]",
  6375. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6376. referencedClasses: []
  6377. }),
  6378. smalltalk.TestRunner);
  6379. smalltalk.addMethod(
  6380. smalltalk.method({
  6381. selector: "renderFailuresOn:",
  6382. category: 'rendering',
  6383. fn: function (html){
  6384. var self=this;
  6385. return smalltalk.withContext(function($ctx1) {
  6386. var $1,$2,$3,$4;
  6387. _st(_st(self._result())._failures())._do_((function(each){
  6388. return smalltalk.withContext(function($ctx2) {
  6389. $1=_st(html)._li();
  6390. _st($1)._class_("failures");
  6391. $2=$1;
  6392. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6393. $ctx2.sendIdx[","]=1;
  6394. _st($2)._with_($3);
  6395. $4=_st($1)._onClick_((function(){
  6396. return smalltalk.withContext(function($ctx3) {
  6397. return self._performFailure_(each);
  6398. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6399. return $4;
  6400. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6401. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},smalltalk.TestRunner)})},
  6402. args: ["html"],
  6403. 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]]",
  6404. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6405. referencedClasses: []
  6406. }),
  6407. smalltalk.TestRunner);
  6408. smalltalk.addMethod(
  6409. smalltalk.method({
  6410. selector: "renderResultsOn:",
  6411. category: 'rendering',
  6412. fn: function (html){
  6413. var self=this;
  6414. return smalltalk.withContext(function($ctx1) {
  6415. self["@statusDiv"]=_st(html)._div();
  6416. _st(html)._with_(self._progressBar());
  6417. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6418. self._updateMethodsList();
  6419. self._updateStatusDiv();
  6420. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},smalltalk.TestRunner)})},
  6421. args: ["html"],
  6422. 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",
  6423. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6424. referencedClasses: []
  6425. }),
  6426. smalltalk.TestRunner);
  6427. smalltalk.addMethod(
  6428. smalltalk.method({
  6429. selector: "result",
  6430. category: 'accessing',
  6431. fn: function (){
  6432. var self=this;
  6433. return smalltalk.withContext(function($ctx1) {
  6434. var $1;
  6435. $1=self["@result"];
  6436. return $1;
  6437. }, function($ctx1) {$ctx1.fill(self,"result",{},smalltalk.TestRunner)})},
  6438. args: [],
  6439. source: "result\x0a\x09^result",
  6440. messageSends: [],
  6441. referencedClasses: []
  6442. }),
  6443. smalltalk.TestRunner);
  6444. smalltalk.addMethod(
  6445. smalltalk.method({
  6446. selector: "run:",
  6447. category: 'actions',
  6448. fn: function (aCollection){
  6449. var self=this;
  6450. var worker;
  6451. function $TestSuiteRunner(){return smalltalk.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6452. function $ResultAnnouncement(){return smalltalk.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6453. return smalltalk.withContext(function($ctx1) {
  6454. var $1;
  6455. worker=_st($TestSuiteRunner())._on_(aCollection);
  6456. self["@result"]=_st(worker)._result();
  6457. $ctx1.sendIdx["result"]=1;
  6458. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6459. return smalltalk.withContext(function($ctx2) {
  6460. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  6461. if(smalltalk.assert($1)){
  6462. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6463. self._updateStatusDiv();
  6464. return self._updateMethodsList();
  6465. };
  6466. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6467. _st(worker)._run();
  6468. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},smalltalk.TestRunner)})},
  6469. args: ["aCollection"],
  6470. 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",
  6471. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6472. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6473. }),
  6474. smalltalk.TestRunner);
  6475. smalltalk.addMethod(
  6476. smalltalk.method({
  6477. selector: "selectAllCategories",
  6478. category: 'actions',
  6479. fn: function (){
  6480. var self=this;
  6481. return smalltalk.withContext(function($ctx1) {
  6482. var $1,$2;
  6483. _st(self._packages())._do_((function(each){
  6484. return smalltalk.withContext(function($ctx2) {
  6485. $1=_st(self["@selectedCategories"])._includes_(each);
  6486. if(! smalltalk.assert($1)){
  6487. return _st(self._selectedCategories())._add_(each);
  6488. };
  6489. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6490. self._updateCategoriesList();
  6491. $2=self._updateClassesList();
  6492. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},smalltalk.TestRunner)})},
  6493. args: [],
  6494. 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",
  6495. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6496. referencedClasses: []
  6497. }),
  6498. smalltalk.TestRunner);
  6499. smalltalk.addMethod(
  6500. smalltalk.method({
  6501. selector: "selectAllClasses",
  6502. category: 'actions',
  6503. fn: function (){
  6504. var self=this;
  6505. return smalltalk.withContext(function($ctx1) {
  6506. var $1,$2;
  6507. _st(self._classes())._do_((function(each){
  6508. return smalltalk.withContext(function($ctx2) {
  6509. $1=_st(self["@selectedClasses"])._includes_(each);
  6510. if(! smalltalk.assert($1)){
  6511. return _st(self._selectedClasses())._add_(each);
  6512. };
  6513. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6514. self._updateCategoriesList();
  6515. $2=self._updateClassesList();
  6516. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},smalltalk.TestRunner)})},
  6517. args: [],
  6518. 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",
  6519. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6520. referencedClasses: []
  6521. }),
  6522. smalltalk.TestRunner);
  6523. smalltalk.addMethod(
  6524. smalltalk.method({
  6525. selector: "selectedCategories",
  6526. category: 'accessing',
  6527. fn: function (){
  6528. var self=this;
  6529. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6530. return smalltalk.withContext(function($ctx1) {
  6531. var $2,$1;
  6532. $2=self["@selectedCategories"];
  6533. if(($receiver = $2) == nil || $receiver == null){
  6534. self["@selectedCategories"]=_st($Array())._new();
  6535. $1=self["@selectedCategories"];
  6536. } else {
  6537. $1=$2;
  6538. };
  6539. return $1;
  6540. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},smalltalk.TestRunner)})},
  6541. args: [],
  6542. source: "selectedCategories\x0a\x09^selectedCategories ifNil: [selectedCategories := Array new]",
  6543. messageSends: ["ifNil:", "new"],
  6544. referencedClasses: ["Array"]
  6545. }),
  6546. smalltalk.TestRunner);
  6547. smalltalk.addMethod(
  6548. smalltalk.method({
  6549. selector: "selectedClasses",
  6550. category: 'accessing',
  6551. fn: function (){
  6552. var self=this;
  6553. function $Array(){return smalltalk.Array||(typeof Array=="undefined"?nil:Array)}
  6554. return smalltalk.withContext(function($ctx1) {
  6555. var $2,$1;
  6556. $2=self["@selectedClasses"];
  6557. if(($receiver = $2) == nil || $receiver == null){
  6558. self["@selectedClasses"]=_st($Array())._new();
  6559. $1=self["@selectedClasses"];
  6560. } else {
  6561. $1=$2;
  6562. };
  6563. return $1;
  6564. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},smalltalk.TestRunner)})},
  6565. args: [],
  6566. source: "selectedClasses\x0a\x09^selectedClasses ifNil: [selectedClasses := Array new]",
  6567. messageSends: ["ifNil:", "new"],
  6568. referencedClasses: ["Array"]
  6569. }),
  6570. smalltalk.TestRunner);
  6571. smalltalk.addMethod(
  6572. smalltalk.method({
  6573. selector: "statusInfo",
  6574. category: 'accessing',
  6575. fn: function (){
  6576. var self=this;
  6577. return smalltalk.withContext(function($ctx1) {
  6578. var $2,$1;
  6579. $2=_st(_st(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  6580. $ctx1.sendIdx[","]=2;
  6581. $1=_st($2).__comma(self._printFailures());
  6582. $ctx1.sendIdx[","]=1;
  6583. return $1;
  6584. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},smalltalk.TestRunner)})},
  6585. args: [],
  6586. source: "statusInfo\x0a\x09^self printTotal, self printPasses, self printErrors, self printFailures",
  6587. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6588. referencedClasses: []
  6589. }),
  6590. smalltalk.TestRunner);
  6591. smalltalk.addMethod(
  6592. smalltalk.method({
  6593. selector: "testCases",
  6594. category: 'accessing',
  6595. fn: function (){
  6596. var self=this;
  6597. var testCases;
  6598. return smalltalk.withContext(function($ctx1) {
  6599. var $1;
  6600. testCases=[];
  6601. _st(_st(self._selectedClasses())._select_((function(each){
  6602. return smalltalk.withContext(function($ctx2) {
  6603. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6604. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6605. return smalltalk.withContext(function($ctx2) {
  6606. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6607. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6608. $1=testCases;
  6609. return $1;
  6610. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},smalltalk.TestRunner)})},
  6611. args: [],
  6612. 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",
  6613. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6614. referencedClasses: []
  6615. }),
  6616. smalltalk.TestRunner);
  6617. smalltalk.addMethod(
  6618. smalltalk.method({
  6619. selector: "toggleCategory:",
  6620. category: 'actions',
  6621. fn: function (aCategory){
  6622. var self=this;
  6623. return smalltalk.withContext(function($ctx1) {
  6624. var $1,$2;
  6625. $1=self._isSelectedCategory_(aCategory);
  6626. if(smalltalk.assert($1)){
  6627. _st(self["@selectedCategories"])._remove_(aCategory);
  6628. } else {
  6629. _st(self["@selectedCategories"])._add_(aCategory);
  6630. };
  6631. self._updateCategoriesList();
  6632. $2=self._updateClassesList();
  6633. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},smalltalk.TestRunner)})},
  6634. args: ["aCategory"],
  6635. 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",
  6636. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6637. referencedClasses: []
  6638. }),
  6639. smalltalk.TestRunner);
  6640. smalltalk.addMethod(
  6641. smalltalk.method({
  6642. selector: "toggleClass:",
  6643. category: 'actions',
  6644. fn: function (aClass){
  6645. var self=this;
  6646. return smalltalk.withContext(function($ctx1) {
  6647. var $1;
  6648. $1=self._isSelectedClass_(aClass);
  6649. if(smalltalk.assert($1)){
  6650. _st(self["@selectedClasses"])._remove_(aClass);
  6651. } else {
  6652. _st(self["@selectedClasses"])._add_(aClass);
  6653. };
  6654. self._updateClassesList();
  6655. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},smalltalk.TestRunner)})},
  6656. args: ["aClass"],
  6657. 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",
  6658. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6659. referencedClasses: []
  6660. }),
  6661. smalltalk.TestRunner);
  6662. smalltalk.addMethod(
  6663. smalltalk.method({
  6664. selector: "updateCategoriesList",
  6665. category: 'updating',
  6666. fn: function (){
  6667. var self=this;
  6668. return smalltalk.withContext(function($ctx1) {
  6669. var $1,$2,$3,$4,$5;
  6670. _st(self["@packagesList"])._contents_((function(html){
  6671. return smalltalk.withContext(function($ctx2) {
  6672. $1=_st(html)._li();
  6673. $ctx2.sendIdx["li"]=1;
  6674. _st($1)._class_("all");
  6675. $ctx2.sendIdx["class:"]=1;
  6676. _st($1)._with_("All");
  6677. $ctx2.sendIdx["with:"]=1;
  6678. $2=_st($1)._onClick_((function(){
  6679. return smalltalk.withContext(function($ctx3) {
  6680. return self._selectAllCategories();
  6681. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6682. $ctx2.sendIdx["onClick:"]=1;
  6683. $2;
  6684. return _st(self._packages())._do_((function(each){
  6685. var li;
  6686. return smalltalk.withContext(function($ctx3) {
  6687. li=_st(html)._li();
  6688. li;
  6689. $3=_st(self._selectedCategories())._includes_(each);
  6690. if(smalltalk.assert($3)){
  6691. _st(li)._class_("selected");
  6692. };
  6693. $4=li;
  6694. _st($4)._with_(each);
  6695. $5=_st($4)._onClick_((function(){
  6696. return smalltalk.withContext(function($ctx4) {
  6697. return self._toggleCategory_(each);
  6698. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6699. return $5;
  6700. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6701. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6702. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},smalltalk.TestRunner)})},
  6703. args: [],
  6704. 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]]]",
  6705. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6706. referencedClasses: []
  6707. }),
  6708. smalltalk.TestRunner);
  6709. smalltalk.addMethod(
  6710. smalltalk.method({
  6711. selector: "updateClassesList",
  6712. category: 'updating',
  6713. fn: function (){
  6714. var self=this;
  6715. return smalltalk.withContext(function($ctx1) {
  6716. var $1,$2,$3,$4,$5,$6;
  6717. _st(self["@classesList"])._contents_((function(html){
  6718. return smalltalk.withContext(function($ctx2) {
  6719. $1=_st(self._selectedCategories())._isEmpty();
  6720. if(! smalltalk.assert($1)){
  6721. $2=_st(html)._li();
  6722. $ctx2.sendIdx["li"]=1;
  6723. _st($2)._class_("all");
  6724. $ctx2.sendIdx["class:"]=1;
  6725. _st($2)._with_("All");
  6726. $ctx2.sendIdx["with:"]=1;
  6727. $3=_st($2)._onClick_((function(){
  6728. return smalltalk.withContext(function($ctx3) {
  6729. return self._selectAllClasses();
  6730. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6731. $ctx2.sendIdx["onClick:"]=1;
  6732. $3;
  6733. };
  6734. return _st(self._classes())._do_((function(each){
  6735. var li;
  6736. return smalltalk.withContext(function($ctx3) {
  6737. li=_st(html)._li();
  6738. li;
  6739. $4=_st(self._selectedClasses())._includes_(each);
  6740. if(smalltalk.assert($4)){
  6741. _st(li)._class_("selected");
  6742. };
  6743. $5=li;
  6744. _st($5)._with_(_st(each)._name());
  6745. $6=_st($5)._onClick_((function(){
  6746. return smalltalk.withContext(function($ctx4) {
  6747. return self._toggleClass_(each);
  6748. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6749. return $6;
  6750. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6751. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6752. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},smalltalk.TestRunner)})},
  6753. args: [],
  6754. 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]]]",
  6755. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6756. referencedClasses: []
  6757. }),
  6758. smalltalk.TestRunner);
  6759. smalltalk.addMethod(
  6760. smalltalk.method({
  6761. selector: "updateMethodsList",
  6762. category: 'updating',
  6763. fn: function (){
  6764. var self=this;
  6765. return smalltalk.withContext(function($ctx1) {
  6766. _st(self["@methodsList"])._contents_((function(html){
  6767. return smalltalk.withContext(function($ctx2) {
  6768. self._renderErrorsOn_(html);
  6769. return self._renderFailuresOn_(html);
  6770. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6771. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},smalltalk.TestRunner)})},
  6772. args: [],
  6773. source: "updateMethodsList\x0a\x09methodsList contents: [:html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html]",
  6774. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6775. referencedClasses: []
  6776. }),
  6777. smalltalk.TestRunner);
  6778. smalltalk.addMethod(
  6779. smalltalk.method({
  6780. selector: "updateStatusDiv",
  6781. category: 'updating',
  6782. fn: function (){
  6783. var self=this;
  6784. return smalltalk.withContext(function($ctx1) {
  6785. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6786. _st(self["@statusDiv"])._contents_((function(html){
  6787. return smalltalk.withContext(function($ctx2) {
  6788. return _st(_st(html)._span())._with_(self._statusInfo());
  6789. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6790. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},smalltalk.TestRunner)})},
  6791. args: [],
  6792. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [:html |\x0a\x09\x09html span with: self statusInfo]",
  6793. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6794. referencedClasses: []
  6795. }),
  6796. smalltalk.TestRunner);
  6797. smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
  6798. smalltalk.addMethod(
  6799. smalltalk.method({
  6800. selector: "clearWorkspace",
  6801. category: 'actions',
  6802. fn: function (){
  6803. var self=this;
  6804. return smalltalk.withContext(function($ctx1) {
  6805. _st(self["@sourceArea"])._clear();
  6806. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},smalltalk.Workspace)})},
  6807. args: [],
  6808. source: "clearWorkspace\x0a\x09sourceArea clear",
  6809. messageSends: ["clear"],
  6810. referencedClasses: []
  6811. }),
  6812. smalltalk.Workspace);
  6813. smalltalk.addMethod(
  6814. smalltalk.method({
  6815. selector: "doIt",
  6816. category: 'actions',
  6817. fn: function (){
  6818. var self=this;
  6819. return smalltalk.withContext(function($ctx1) {
  6820. _st(self["@sourceArea"])._doIt();
  6821. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},smalltalk.Workspace)})},
  6822. args: [],
  6823. source: "doIt\x0a\x09sourceArea doIt",
  6824. messageSends: ["doIt"],
  6825. referencedClasses: []
  6826. }),
  6827. smalltalk.Workspace);
  6828. smalltalk.addMethod(
  6829. smalltalk.method({
  6830. selector: "fileIn",
  6831. category: 'actions',
  6832. fn: function (){
  6833. var self=this;
  6834. return smalltalk.withContext(function($ctx1) {
  6835. _st(self["@sourceArea"])._fileIn();
  6836. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},smalltalk.Workspace)})},
  6837. args: [],
  6838. source: "fileIn\x0a\x09sourceArea fileIn",
  6839. messageSends: ["fileIn"],
  6840. referencedClasses: []
  6841. }),
  6842. smalltalk.Workspace);
  6843. smalltalk.addMethod(
  6844. smalltalk.method({
  6845. selector: "inspectIt",
  6846. category: 'actions',
  6847. fn: function (){
  6848. var self=this;
  6849. return smalltalk.withContext(function($ctx1) {
  6850. _st(self["@sourceArea"])._inspectIt();
  6851. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},smalltalk.Workspace)})},
  6852. args: [],
  6853. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6854. messageSends: ["inspectIt"],
  6855. referencedClasses: []
  6856. }),
  6857. smalltalk.Workspace);
  6858. smalltalk.addMethod(
  6859. smalltalk.method({
  6860. selector: "label",
  6861. category: 'accessing',
  6862. fn: function (){
  6863. var self=this;
  6864. return smalltalk.withContext(function($ctx1) {
  6865. return "Workspace";
  6866. }, function($ctx1) {$ctx1.fill(self,"label",{},smalltalk.Workspace)})},
  6867. args: [],
  6868. source: "label\x0a\x09^'Workspace'",
  6869. messageSends: [],
  6870. referencedClasses: []
  6871. }),
  6872. smalltalk.Workspace);
  6873. smalltalk.addMethod(
  6874. smalltalk.method({
  6875. selector: "printIt",
  6876. category: 'actions',
  6877. fn: function (){
  6878. var self=this;
  6879. return smalltalk.withContext(function($ctx1) {
  6880. _st(self["@sourceArea"])._printIt();
  6881. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},smalltalk.Workspace)})},
  6882. args: [],
  6883. source: "printIt\x0a\x09sourceArea printIt",
  6884. messageSends: ["printIt"],
  6885. referencedClasses: []
  6886. }),
  6887. smalltalk.Workspace);
  6888. smalltalk.addMethod(
  6889. smalltalk.method({
  6890. selector: "renderBoxOn:",
  6891. category: 'rendering',
  6892. fn: function (html){
  6893. var self=this;
  6894. function $SourceArea(){return smalltalk.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  6895. return smalltalk.withContext(function($ctx1) {
  6896. self["@sourceArea"]=_st($SourceArea())._new();
  6897. _st(self["@sourceArea"])._renderOn_(html);
  6898. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},smalltalk.Workspace)})},
  6899. args: ["html"],
  6900. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  6901. messageSends: ["new", "renderOn:"],
  6902. referencedClasses: ["SourceArea"]
  6903. }),
  6904. smalltalk.Workspace);
  6905. smalltalk.addMethod(
  6906. smalltalk.method({
  6907. selector: "renderButtonsOn:",
  6908. category: 'rendering',
  6909. fn: function (html){
  6910. var self=this;
  6911. return smalltalk.withContext(function($ctx1) {
  6912. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  6913. $1=_st(html)._button();
  6914. $ctx1.sendIdx["button"]=1;
  6915. _st($1)._with_("DoIt");
  6916. $ctx1.sendIdx["with:"]=1;
  6917. _st($1)._title_("ctrl+d");
  6918. $ctx1.sendIdx["title:"]=1;
  6919. $2=_st($1)._onClick_((function(){
  6920. return smalltalk.withContext(function($ctx2) {
  6921. return self._doIt();
  6922. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6923. $ctx1.sendIdx["onClick:"]=1;
  6924. $3=_st(html)._button();
  6925. $ctx1.sendIdx["button"]=2;
  6926. _st($3)._with_("PrintIt");
  6927. $ctx1.sendIdx["with:"]=2;
  6928. _st($3)._title_("ctrl+p");
  6929. $ctx1.sendIdx["title:"]=2;
  6930. $4=_st($3)._onClick_((function(){
  6931. return smalltalk.withContext(function($ctx2) {
  6932. return self._printIt();
  6933. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  6934. $ctx1.sendIdx["onClick:"]=2;
  6935. $5=_st(html)._button();
  6936. $ctx1.sendIdx["button"]=3;
  6937. _st($5)._with_("InspectIt");
  6938. $ctx1.sendIdx["with:"]=3;
  6939. _st($5)._title_("ctrl+i");
  6940. $ctx1.sendIdx["title:"]=3;
  6941. $6=_st($5)._onClick_((function(){
  6942. return smalltalk.withContext(function($ctx2) {
  6943. return self._inspectIt();
  6944. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  6945. $ctx1.sendIdx["onClick:"]=3;
  6946. $7=_st(html)._button();
  6947. $ctx1.sendIdx["button"]=4;
  6948. _st($7)._with_("FileIn");
  6949. $ctx1.sendIdx["with:"]=4;
  6950. _st($7)._title_("ctrl+f");
  6951. $8=_st($7)._onClick_((function(){
  6952. return smalltalk.withContext(function($ctx2) {
  6953. return self._fileIn();
  6954. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  6955. $ctx1.sendIdx["onClick:"]=4;
  6956. $9=_st(html)._button();
  6957. _st($9)._with_("Clear workspace");
  6958. $10=_st($9)._onClick_((function(){
  6959. return smalltalk.withContext(function($ctx2) {
  6960. return self._clearWorkspace();
  6961. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  6962. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},smalltalk.Workspace)})},
  6963. args: ["html"],
  6964. 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]",
  6965. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  6966. referencedClasses: []
  6967. }),
  6968. smalltalk.Workspace);
  6969. smalltalk.addMethod(
  6970. smalltalk.method({
  6971. selector: "show",
  6972. category: 'actions',
  6973. fn: function (){
  6974. var self=this;
  6975. return smalltalk.withContext(function($ctx1) {
  6976. smalltalk.Workspace.superclass.fn.prototype._show.apply(_st(self), []);
  6977. _st(self["@sourceArea"])._focus();
  6978. return self}, function($ctx1) {$ctx1.fill(self,"show",{},smalltalk.Workspace)})},
  6979. args: [],
  6980. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  6981. messageSends: ["show", "focus"],
  6982. referencedClasses: []
  6983. }),
  6984. smalltalk.Workspace);
  6985. smalltalk.addMethod(
  6986. smalltalk.method({
  6987. selector: "inspectOn:",
  6988. category: '*IDE',
  6989. fn: function (anInspector){
  6990. var self=this;
  6991. var variables;
  6992. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6993. return smalltalk.withContext(function($ctx1) {
  6994. var $1;
  6995. variables=_st($Dictionary())._new();
  6996. _st(variables)._at_put_("#self",self);
  6997. $ctx1.sendIdx["at:put:"]=1;
  6998. _st(variables)._at_put_("#year",self._year());
  6999. $ctx1.sendIdx["at:put:"]=2;
  7000. _st(variables)._at_put_("#month",self._month());
  7001. $ctx1.sendIdx["at:put:"]=3;
  7002. _st(variables)._at_put_("#day",self._day());
  7003. $ctx1.sendIdx["at:put:"]=4;
  7004. _st(variables)._at_put_("#hours",self._hours());
  7005. $ctx1.sendIdx["at:put:"]=5;
  7006. _st(variables)._at_put_("#minutes",self._minutes());
  7007. $ctx1.sendIdx["at:put:"]=6;
  7008. _st(variables)._at_put_("#seconds",self._seconds());
  7009. $ctx1.sendIdx["at:put:"]=7;
  7010. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  7011. _st(anInspector)._setLabel_(self._printString());
  7012. $1=_st(anInspector)._setVariables_(variables);
  7013. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Date)})},
  7014. args: ["anInspector"],
  7015. 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",
  7016. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  7017. referencedClasses: ["Dictionary"]
  7018. }),
  7019. smalltalk.Date);
  7020. smalltalk.addMethod(
  7021. smalltalk.method({
  7022. selector: "inspectOn:",
  7023. category: '*IDE',
  7024. fn: function (anInspector){
  7025. var self=this;
  7026. var variables;
  7027. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7028. return smalltalk.withContext(function($ctx1) {
  7029. var $1;
  7030. variables=_st($Dictionary())._new();
  7031. _st(variables)._at_put_("#self",self);
  7032. $ctx1.sendIdx["at:put:"]=1;
  7033. self._withIndexDo_((function(each,i){
  7034. return smalltalk.withContext(function($ctx2) {
  7035. return _st(variables)._at_put_(i,each);
  7036. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  7037. _st(anInspector)._setLabel_(self._printString());
  7038. $1=_st(anInspector)._setVariables_(variables);
  7039. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Collection)})},
  7040. args: ["anInspector"],
  7041. 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",
  7042. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  7043. referencedClasses: ["Dictionary"]
  7044. }),
  7045. smalltalk.Collection);
  7046. smalltalk.addMethod(
  7047. smalltalk.method({
  7048. selector: "inspectOn:",
  7049. category: '*IDE',
  7050. fn: function (anInspector){
  7051. var self=this;
  7052. var label;
  7053. return smalltalk.withContext(function($ctx1) {
  7054. var $3,$2,$1,$5,$4;
  7055. smalltalk.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  7056. $3=self._printString();
  7057. $ctx1.sendIdx["printString"]=1;
  7058. $2=_st($3)._size();
  7059. $1=_st($2).__gt((30));
  7060. if(smalltalk.assert($1)){
  7061. $5=self._printString();
  7062. $ctx1.sendIdx["printString"]=2;
  7063. $4=_st($5)._copyFrom_to_((1),(30));
  7064. label=_st($4).__comma("...'");
  7065. label;
  7066. } else {
  7067. label=self._printString();
  7068. label;
  7069. };
  7070. _st(anInspector)._setLabel_(label);
  7071. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},smalltalk.String)})},
  7072. args: ["anInspector"],
  7073. 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",
  7074. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7075. referencedClasses: []
  7076. }),
  7077. smalltalk.String);
  7078. smalltalk.addMethod(
  7079. smalltalk.method({
  7080. selector: "inspectOn:",
  7081. category: '*IDE',
  7082. fn: function (anInspector){
  7083. var self=this;
  7084. var variables;
  7085. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7086. return smalltalk.withContext(function($ctx1) {
  7087. var $1;
  7088. variables=_st($Dictionary())._new();
  7089. _st(variables)._at_put_("#self",self);
  7090. $ctx1.sendIdx["at:put:"]=1;
  7091. _st(variables)._at_put_("#home",self._home());
  7092. $ctx1.sendIdx["at:put:"]=2;
  7093. _st(variables)._at_put_("#receiver",self._receiver());
  7094. $ctx1.sendIdx["at:put:"]=3;
  7095. _st(variables)._at_put_("#selector",self._selector());
  7096. $ctx1.sendIdx["at:put:"]=4;
  7097. _st(variables)._at_put_("#temps",self._temps());
  7098. $ctx1.sendIdx["at:put:"]=5;
  7099. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7100. return smalltalk.withContext(function($ctx2) {
  7101. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7102. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7103. _st(anInspector)._setLabel_(self._printString());
  7104. $1=_st(anInspector)._setVariables_(variables);
  7105. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.MethodContext)})},
  7106. args: ["anInspector"],
  7107. 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",
  7108. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7109. referencedClasses: ["Dictionary"]
  7110. }),
  7111. smalltalk.MethodContext);
  7112. smalltalk.addMethod(
  7113. smalltalk.method({
  7114. selector: "inspectOn:",
  7115. category: '*IDE',
  7116. fn: function (anInspector){
  7117. var self=this;
  7118. var variables;
  7119. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7120. return smalltalk.withContext(function($ctx1) {
  7121. var $1;
  7122. variables=_st($Dictionary())._new();
  7123. _st(variables)._at_put_("#self",self);
  7124. $ctx1.sendIdx["at:put:"]=1;
  7125. _st(variables)._at_put_("#keys",self._keys());
  7126. $ctx1.sendIdx["at:put:"]=2;
  7127. self._keysAndValuesDo_((function(key,value){
  7128. return smalltalk.withContext(function($ctx2) {
  7129. return _st(variables)._at_put_(key,value);
  7130. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  7131. _st(anInspector)._setLabel_(self._printString());
  7132. $1=_st(anInspector)._setVariables_(variables);
  7133. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.HashedCollection)})},
  7134. args: ["anInspector"],
  7135. 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",
  7136. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  7137. referencedClasses: ["Dictionary"]
  7138. }),
  7139. smalltalk.HashedCollection);
  7140. smalltalk.addMethod(
  7141. smalltalk.method({
  7142. selector: "inspectOn:",
  7143. category: '*IDE',
  7144. fn: function (anInspector){
  7145. var self=this;
  7146. var variables;
  7147. function $Dictionary(){return smalltalk.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7148. return smalltalk.withContext(function($ctx1) {
  7149. var $1;
  7150. variables=_st($Dictionary())._new();
  7151. _st(variables)._at_put_("#self",self);
  7152. $ctx1.sendIdx["at:put:"]=1;
  7153. _st(self["@elements"])._withIndexDo_((function(each,i){
  7154. return smalltalk.withContext(function($ctx2) {
  7155. return _st(variables)._at_put_(i,each);
  7156. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  7157. _st(anInspector)._setLabel_(self._printString());
  7158. $1=_st(anInspector)._setVariables_(variables);
  7159. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},smalltalk.Set)})},
  7160. args: ["anInspector"],
  7161. 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",
  7162. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  7163. referencedClasses: ["Dictionary"]
  7164. }),
  7165. smalltalk.Set);
  7166. });