IDE.js 270 KB

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