IDE.js 266 KB

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