IDE.js 268 KB

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