IDE.js 265 KB

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