IDE.js 272 KB

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