2
0

IDE.js 267 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Canvas", "amber_core/Kernel-Objects", "amber_core/Kernel-Collections", "amber_core/Kernel-Methods"], function(smalltalk,nil,_st, globals){
  2. smalltalk.addPackage('IDE');
  3. smalltalk.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber_core"};
  4. smalltalk.addClass('ClassesList', globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  5. smalltalk.addMethod(
  6. smalltalk.method({
  7. selector: "browser",
  8. protocol: 'accessing',
  9. fn: function (){
  10. var self=this;
  11. var $1;
  12. $1=self["@browser"];
  13. return $1;
  14. },
  15. args: [],
  16. source: "browser\x0a\x09^ browser",
  17. messageSends: [],
  18. referencedClasses: []
  19. }),
  20. globals.ClassesList);
  21. smalltalk.addMethod(
  22. smalltalk.method({
  23. selector: "browser:",
  24. protocol: 'accessing',
  25. fn: function (aBrowser){
  26. var self=this;
  27. self["@browser"]=aBrowser;
  28. return self},
  29. args: ["aBrowser"],
  30. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  31. messageSends: [],
  32. referencedClasses: []
  33. }),
  34. globals.ClassesList);
  35. smalltalk.addMethod(
  36. smalltalk.method({
  37. selector: "category",
  38. protocol: 'accessing',
  39. fn: function (){
  40. var self=this;
  41. return smalltalk.withContext(function($ctx1) {
  42. var $1;
  43. $1=_st(self._browser())._selectedPackage();
  44. return $1;
  45. }, function($ctx1) {$ctx1.fill(self,"category",{},globals.ClassesList)})},
  46. args: [],
  47. source: "category\x0a\x09^ self browser selectedPackage",
  48. messageSends: ["selectedPackage", "browser"],
  49. referencedClasses: []
  50. }),
  51. globals.ClassesList);
  52. smalltalk.addMethod(
  53. smalltalk.method({
  54. selector: "getNodes",
  55. protocol: 'accessing',
  56. fn: function (){
  57. var self=this;
  58. var classes,children,others;
  59. function $ClassesListNode(){return globals.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  60. return smalltalk.withContext(function($ctx1) {
  61. var $1,$2,$3;
  62. $1=self._browser();
  63. $ctx1.sendIdx["browser"]=1;
  64. classes=_st($1)._classes();
  65. children=[];
  66. others=[];
  67. _st(classes)._do_((function(each){
  68. return smalltalk.withContext(function($ctx2) {
  69. $2=_st(classes)._includes_(_st(each)._superclass());
  70. if(smalltalk.assert($2)){
  71. return _st(others)._add_(each);
  72. } else {
  73. return _st(children)._add_(each);
  74. $ctx2.sendIdx["add:"]=1;
  75. };
  76. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  77. $3=_st(children)._collect_((function(each){
  78. return smalltalk.withContext(function($ctx2) {
  79. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,(0));
  80. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  81. return $3;
  82. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},globals.ClassesList)})},
  83. args: [],
  84. 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 ]",
  85. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"],
  86. referencedClasses: ["ClassesListNode"]
  87. }),
  88. globals.ClassesList);
  89. smalltalk.addMethod(
  90. smalltalk.method({
  91. selector: "nodes",
  92. protocol: 'accessing',
  93. fn: function (){
  94. var self=this;
  95. return smalltalk.withContext(function($ctx1) {
  96. var $1,$2;
  97. $1=self["@nodes"];
  98. if(($receiver = $1) == nil || $receiver == null){
  99. self["@nodes"]=self._getNodes();
  100. self["@nodes"];
  101. } else {
  102. $1;
  103. };
  104. $2=self["@nodes"];
  105. return $2;
  106. }, function($ctx1) {$ctx1.fill(self,"nodes",{},globals.ClassesList)})},
  107. args: [],
  108. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  109. messageSends: ["ifNil:", "getNodes"],
  110. referencedClasses: []
  111. }),
  112. globals.ClassesList);
  113. smalltalk.addMethod(
  114. smalltalk.method({
  115. selector: "renderOn:",
  116. protocol: 'rendering',
  117. fn: function (html){
  118. var self=this;
  119. return smalltalk.withContext(function($ctx1) {
  120. var $1,$2;
  121. $1=_st(html)._ul();
  122. _st($1)._class_("amber_column browser classes");
  123. $2=_st($1)._yourself();
  124. self["@ul"]=$2;
  125. self._updateNodes();
  126. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ClassesList)})},
  127. args: ["html"],
  128. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  129. messageSends: ["class:", "ul", "yourself", "updateNodes"],
  130. referencedClasses: []
  131. }),
  132. globals.ClassesList);
  133. smalltalk.addMethod(
  134. smalltalk.method({
  135. selector: "resetNodes",
  136. protocol: 'accessing',
  137. fn: function (){
  138. var self=this;
  139. self["@nodes"]=nil;
  140. return self},
  141. args: [],
  142. source: "resetNodes\x0a\x09nodes := nil",
  143. messageSends: [],
  144. referencedClasses: []
  145. }),
  146. globals.ClassesList);
  147. smalltalk.addMethod(
  148. smalltalk.method({
  149. selector: "updateNodes",
  150. protocol: 'rendering',
  151. fn: function (){
  152. var self=this;
  153. return smalltalk.withContext(function($ctx1) {
  154. _st(self["@ul"])._contents_((function(html){
  155. return smalltalk.withContext(function($ctx2) {
  156. return _st(self._nodes())._do_((function(each){
  157. return smalltalk.withContext(function($ctx3) {
  158. return _st(each)._renderOn_(html);
  159. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  160. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  161. return self}, function($ctx1) {$ctx1.fill(self,"updateNodes",{},globals.ClassesList)})},
  162. args: [],
  163. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  164. messageSends: ["contents:", "do:", "nodes", "renderOn:"],
  165. referencedClasses: []
  166. }),
  167. globals.ClassesList);
  168. smalltalk.addMethod(
  169. smalltalk.method({
  170. selector: "on:",
  171. protocol: 'instance creation',
  172. fn: function (aBrowser){
  173. var self=this;
  174. return smalltalk.withContext(function($ctx1) {
  175. var $2,$3,$1;
  176. $2=self._new();
  177. _st($2)._browser_(aBrowser);
  178. $3=_st($2)._yourself();
  179. $1=$3;
  180. return $1;
  181. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},globals.ClassesList.klass)})},
  182. args: ["aBrowser"],
  183. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  184. messageSends: ["browser:", "new", "yourself"],
  185. referencedClasses: []
  186. }),
  187. globals.ClassesList.klass);
  188. smalltalk.addClass('ClassesListNode', globals.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  189. smalltalk.addMethod(
  190. smalltalk.method({
  191. selector: "browser",
  192. protocol: 'accessing',
  193. fn: function (){
  194. var self=this;
  195. var $1;
  196. $1=self["@browser"];
  197. return $1;
  198. },
  199. args: [],
  200. source: "browser\x0a\x09^ browser",
  201. messageSends: [],
  202. referencedClasses: []
  203. }),
  204. globals.ClassesListNode);
  205. smalltalk.addMethod(
  206. smalltalk.method({
  207. selector: "browser:",
  208. protocol: 'accessing',
  209. fn: function (aBrowser){
  210. var self=this;
  211. self["@browser"]=aBrowser;
  212. return self},
  213. args: ["aBrowser"],
  214. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  215. messageSends: [],
  216. referencedClasses: []
  217. }),
  218. globals.ClassesListNode);
  219. smalltalk.addMethod(
  220. smalltalk.method({
  221. selector: "getNodesFrom:",
  222. protocol: 'accessing',
  223. fn: function (aCollection){
  224. var self=this;
  225. var children,others;
  226. function $ClassesListNode(){return globals.ClassesListNode||(typeof ClassesListNode=="undefined"?nil:ClassesListNode)}
  227. return smalltalk.withContext(function($ctx1) {
  228. var $1;
  229. children=[];
  230. others=[];
  231. _st(aCollection)._do_((function(each){
  232. return smalltalk.withContext(function($ctx2) {
  233. $1=_st(_st(each)._superclass()).__eq(self._theClass());
  234. if(smalltalk.assert($1)){
  235. return _st(children)._add_(each);
  236. $ctx2.sendIdx["add:"]=1;
  237. } else {
  238. return _st(others)._add_(each);
  239. };
  240. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  241. self["@nodes"]=_st(children)._collect_((function(each){
  242. return smalltalk.withContext(function($ctx2) {
  243. return _st($ClassesListNode())._on_browser_classes_level_(each,self._browser(),others,_st(self._level()).__plus((1)));
  244. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  245. return self}, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},globals.ClassesListNode)})},
  246. args: ["aCollection"],
  247. 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 ]",
  248. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
  249. referencedClasses: ["ClassesListNode"]
  250. }),
  251. globals.ClassesListNode);
  252. smalltalk.addMethod(
  253. smalltalk.method({
  254. selector: "label",
  255. protocol: 'accessing',
  256. fn: function (){
  257. var self=this;
  258. var str;
  259. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  260. return smalltalk.withContext(function($ctx1) {
  261. var $1;
  262. str=_st(_st($String())._new())._writeStream();
  263. _st(self._level())._timesRepeat_((function(){
  264. return smalltalk.withContext(function($ctx2) {
  265. return _st(str)._nextPutAll_("    ");
  266. $ctx2.sendIdx["nextPutAll:"]=1;
  267. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  268. _st(str)._nextPutAll_(_st(self._theClass())._name());
  269. $1=_st(str)._contents();
  270. return $1;
  271. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},globals.ClassesListNode)})},
  272. args: [],
  273. 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",
  274. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"],
  275. referencedClasses: ["String"]
  276. }),
  277. globals.ClassesListNode);
  278. smalltalk.addMethod(
  279. smalltalk.method({
  280. selector: "level",
  281. protocol: 'accessing',
  282. fn: function (){
  283. var self=this;
  284. var $1;
  285. $1=self["@level"];
  286. return $1;
  287. },
  288. args: [],
  289. source: "level\x0a\x09^ level",
  290. messageSends: [],
  291. referencedClasses: []
  292. }),
  293. globals.ClassesListNode);
  294. smalltalk.addMethod(
  295. smalltalk.method({
  296. selector: "level:",
  297. protocol: 'accessing',
  298. fn: function (anInteger){
  299. var self=this;
  300. self["@level"]=anInteger;
  301. return self},
  302. args: ["anInteger"],
  303. source: "level: anInteger\x0a\x09level := anInteger",
  304. messageSends: [],
  305. referencedClasses: []
  306. }),
  307. globals.ClassesListNode);
  308. smalltalk.addMethod(
  309. smalltalk.method({
  310. selector: "nodes",
  311. protocol: 'accessing',
  312. fn: function (){
  313. var self=this;
  314. var $1;
  315. $1=self["@nodes"];
  316. return $1;
  317. },
  318. args: [],
  319. source: "nodes\x0a\x09^ nodes",
  320. messageSends: [],
  321. referencedClasses: []
  322. }),
  323. globals.ClassesListNode);
  324. smalltalk.addMethod(
  325. smalltalk.method({
  326. selector: "renderOn:",
  327. protocol: 'rendering',
  328. fn: function (html){
  329. var self=this;
  330. var li,cssClass;
  331. return smalltalk.withContext(function($ctx1) {
  332. var $1,$2,$4,$5,$3,$6;
  333. cssClass="";
  334. li=_st(_st(html)._li())._onClick_((function(){
  335. return smalltalk.withContext(function($ctx2) {
  336. $1=self._browser();
  337. $ctx2.sendIdx["browser"]=1;
  338. $2=self._theClass();
  339. $ctx2.sendIdx["theClass"]=1;
  340. return _st($1)._selectClass_($2);
  341. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  342. _st(_st(li)._asJQuery())._html_(self._label());
  343. $4=_st(self._browser())._selectedClass();
  344. $5=self._theClass();
  345. $ctx1.sendIdx["theClass"]=2;
  346. $3=_st($4).__eq($5);
  347. if(smalltalk.assert($3)){
  348. cssClass=_st(cssClass).__comma(" selected");
  349. $ctx1.sendIdx[","]=1;
  350. cssClass;
  351. };
  352. $6=_st(_st(self._theClass())._comment())._isEmpty();
  353. if(! smalltalk.assert($6)){
  354. cssClass=_st(cssClass).__comma(" commented");
  355. cssClass;
  356. };
  357. _st(li)._class_(cssClass);
  358. _st(self._nodes())._do_((function(each){
  359. return smalltalk.withContext(function($ctx2) {
  360. return _st(each)._renderOn_(html);
  361. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)})}));
  362. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},globals.ClassesListNode)})},
  363. args: ["html"],
  364. 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 ]",
  365. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"],
  366. referencedClasses: []
  367. }),
  368. globals.ClassesListNode);
  369. smalltalk.addMethod(
  370. smalltalk.method({
  371. selector: "theClass",
  372. protocol: 'accessing',
  373. fn: function (){
  374. var self=this;
  375. var $1;
  376. $1=self["@theClass"];
  377. return $1;
  378. },
  379. args: [],
  380. source: "theClass\x0a\x09^ theClass",
  381. messageSends: [],
  382. referencedClasses: []
  383. }),
  384. globals.ClassesListNode);
  385. smalltalk.addMethod(
  386. smalltalk.method({
  387. selector: "theClass:",
  388. protocol: 'accessing',
  389. fn: function (aClass){
  390. var self=this;
  391. self["@theClass"]=aClass;
  392. return self},
  393. args: ["aClass"],
  394. source: "theClass: aClass\x0a\x09theClass := aClass",
  395. messageSends: [],
  396. referencedClasses: []
  397. }),
  398. globals.ClassesListNode);
  399. smalltalk.addMethod(
  400. smalltalk.method({
  401. selector: "on:browser:classes:level:",
  402. protocol: 'instance creation',
  403. fn: function (aClass,aBrowser,aCollection,anInteger){
  404. var self=this;
  405. return smalltalk.withContext(function($ctx1) {
  406. var $2,$3,$1;
  407. $2=self._new();
  408. _st($2)._theClass_(aClass);
  409. _st($2)._browser_(aBrowser);
  410. _st($2)._level_(anInteger);
  411. _st($2)._getNodesFrom_(aCollection);
  412. $3=_st($2)._yourself();
  413. $1=$3;
  414. return $1;
  415. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},globals.ClassesListNode.klass)})},
  416. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  417. 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",
  418. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
  419. referencedClasses: []
  420. }),
  421. globals.ClassesListNode.klass);
  422. smalltalk.addClass('DebugErrorHandler', globals.Object, [], 'IDE');
  423. smalltalk.addMethod(
  424. smalltalk.method({
  425. selector: "handleError:",
  426. protocol: 'error handling',
  427. fn: function (anError){
  428. var self=this;
  429. function $Debugger(){return globals.Debugger||(typeof Debugger=="undefined"?nil:Debugger)}
  430. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  431. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  432. return smalltalk.withContext(function($ctx1) {
  433. var $1,$2;
  434. _st((function(){
  435. return smalltalk.withContext(function($ctx2) {
  436. $1=_st($Debugger())._new();
  437. $ctx2.sendIdx["new"]=1;
  438. _st($1)._error_(anError);
  439. $2=_st($1)._open();
  440. return $2;
  441. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(error){
  442. return smalltalk.withContext(function($ctx2) {
  443. return _st(_st($ErrorHandler())._new())._handleError_(error);
  444. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)})}));
  445. return self}, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},globals.DebugErrorHandler)})},
  446. args: ["anError"],
  447. 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 ]",
  448. messageSends: ["on:do:", "error:", "new", "open", "handleError:"],
  449. referencedClasses: ["Debugger", "Error", "ErrorHandler"]
  450. }),
  451. globals.DebugErrorHandler);
  452. smalltalk.addMethod(
  453. smalltalk.method({
  454. selector: "initialize",
  455. protocol: 'initialization',
  456. fn: function (){
  457. var self=this;
  458. function $ErrorHandler(){return globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  459. return smalltalk.withContext(function($ctx1) {
  460. _st($ErrorHandler())._register_(self._new());
  461. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.DebugErrorHandler.klass)})},
  462. args: [],
  463. source: "initialize\x0a\x09ErrorHandler register: self new",
  464. messageSends: ["register:", "new"],
  465. referencedClasses: ["ErrorHandler"]
  466. }),
  467. globals.DebugErrorHandler.klass);
  468. smalltalk.addClass('SourceArea', globals.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  469. smalltalk.addMethod(
  470. smalltalk.method({
  471. selector: "clear",
  472. protocol: 'actions',
  473. fn: function (){
  474. var self=this;
  475. return smalltalk.withContext(function($ctx1) {
  476. self._val_("");
  477. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.SourceArea)})},
  478. args: [],
  479. source: "clear\x0a\x09self val: ''",
  480. messageSends: ["val:"],
  481. referencedClasses: []
  482. }),
  483. globals.SourceArea);
  484. smalltalk.addMethod(
  485. smalltalk.method({
  486. selector: "currentLine",
  487. protocol: 'accessing',
  488. fn: function (){
  489. var self=this;
  490. return smalltalk.withContext(function($ctx1) {
  491. var $1;
  492. $1=_st(self["@editor"])._getLine_(_st(_st(self["@editor"])._getCursor())._line());
  493. return $1;
  494. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},globals.SourceArea)})},
  495. args: [],
  496. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  497. messageSends: ["getLine:", "line", "getCursor"],
  498. referencedClasses: []
  499. }),
  500. globals.SourceArea);
  501. smalltalk.addMethod(
  502. smalltalk.method({
  503. selector: "currentLineOrSelection",
  504. protocol: 'accessing',
  505. fn: function (){
  506. var self=this;
  507. return smalltalk.withContext(function($ctx1) {
  508. var $2,$1;
  509. $2=_st(self["@editor"])._somethingSelected();
  510. if(smalltalk.assert($2)){
  511. $1=self._selection();
  512. } else {
  513. $1=self._currentLine();
  514. };
  515. return $1;
  516. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},globals.SourceArea)})},
  517. args: [],
  518. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  519. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"],
  520. referencedClasses: []
  521. }),
  522. globals.SourceArea);
  523. smalltalk.addMethod(
  524. smalltalk.method({
  525. selector: "doIt",
  526. protocol: 'actions',
  527. fn: function (){
  528. var self=this;
  529. var result;
  530. return smalltalk.withContext(function($ctx1) {
  531. var $1,$2;
  532. result=self._eval_(self._currentLineOrSelection());
  533. $1=self._onDoIt();
  534. $ctx1.sendIdx["onDoIt"]=1;
  535. if(($receiver = $1) == nil || $receiver == null){
  536. $1;
  537. } else {
  538. _st(self._onDoIt())._value();
  539. };
  540. $2=result;
  541. return $2;
  542. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},globals.SourceArea)})},
  543. args: [],
  544. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  545. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"],
  546. referencedClasses: []
  547. }),
  548. globals.SourceArea);
  549. smalltalk.addMethod(
  550. smalltalk.method({
  551. selector: "editor",
  552. protocol: 'accessing',
  553. fn: function (){
  554. var self=this;
  555. var $1;
  556. $1=self["@editor"];
  557. return $1;
  558. },
  559. args: [],
  560. source: "editor\x0a\x09^ editor",
  561. messageSends: [],
  562. referencedClasses: []
  563. }),
  564. globals.SourceArea);
  565. smalltalk.addMethod(
  566. smalltalk.method({
  567. selector: "eval:",
  568. protocol: 'actions',
  569. fn: function (aString){
  570. var self=this;
  571. var compiler;
  572. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  573. function $Error(){return globals.Error||(typeof Error=="undefined"?nil:Error)}
  574. return smalltalk.withContext(function($ctx1) {
  575. var $1,$2;
  576. var $early={};
  577. try {
  578. compiler=_st($Compiler())._new();
  579. _st((function(){
  580. return smalltalk.withContext(function($ctx2) {
  581. return _st(compiler)._parseExpression_(aString);
  582. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}))._on_do_($Error(),(function(ex){
  583. return smalltalk.withContext(function($ctx2) {
  584. $1=self._alert_(_st(ex)._messageText());
  585. throw $early=[$1];
  586. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)})}));
  587. $2=_st(compiler)._evaluateExpression_on_(aString,self._receiver());
  588. return $2;
  589. }
  590. catch(e) {if(e===$early)return e[0]; throw e}
  591. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},globals.SourceArea)})},
  592. args: ["aString"],
  593. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ self alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: self receiver",
  594. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"],
  595. referencedClasses: ["Compiler", "Error"]
  596. }),
  597. globals.SourceArea);
  598. smalltalk.addMethod(
  599. smalltalk.method({
  600. selector: "fileIn",
  601. protocol: 'actions',
  602. fn: function (){
  603. var self=this;
  604. function $Importer(){return globals.Importer||(typeof Importer=="undefined"?nil:Importer)}
  605. return smalltalk.withContext(function($ctx1) {
  606. _st(_st($Importer())._new())._import_(_st(self._currentLineOrSelection())._readStream());
  607. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.SourceArea)})},
  608. args: [],
  609. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  610. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"],
  611. referencedClasses: ["Importer"]
  612. }),
  613. globals.SourceArea);
  614. smalltalk.addMethod(
  615. smalltalk.method({
  616. selector: "focus",
  617. protocol: 'actions',
  618. fn: function (){
  619. var self=this;
  620. return smalltalk.withContext(function($ctx1) {
  621. _st(self._editor())._focus();
  622. return self}, function($ctx1) {$ctx1.fill(self,"focus",{},globals.SourceArea)})},
  623. args: [],
  624. source: "focus\x0a\x09self editor focus.",
  625. messageSends: ["focus", "editor"],
  626. referencedClasses: []
  627. }),
  628. globals.SourceArea);
  629. smalltalk.addMethod(
  630. smalltalk.method({
  631. selector: "handleKeyDown:",
  632. protocol: 'actions',
  633. fn: function (anEvent){
  634. var self=this;
  635. if(anEvent.ctrlKey) {
  636. if(anEvent.keyCode === 80) { //ctrl+p
  637. self._printIt();
  638. anEvent.preventDefault();
  639. return false;
  640. }
  641. if(anEvent.keyCode === 68) { //ctrl+d
  642. self._doIt();
  643. anEvent.preventDefault();
  644. return false;
  645. }
  646. if(anEvent.keyCode === 73) { //ctrl+i
  647. self._inspectIt();
  648. anEvent.preventDefault();
  649. return false;
  650. }
  651. };
  652. return self},
  653. args: ["anEvent"],
  654. source: "handleKeyDown: anEvent\x0a\x09<if(anEvent.ctrlKey) {\x0a\x09\x09if(anEvent.keyCode === 80) { //ctrl+p\x0a\x09\x09\x09self._printIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 68) { //ctrl+d\x0a\x09\x09\x09self._doIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09\x09if(anEvent.keyCode === 73) { //ctrl+i\x0a\x09\x09\x09self._inspectIt();\x0a\x09\x09\x09anEvent.preventDefault();\x0a\x09\x09\x09return false;\x0a\x09\x09}\x0a\x09}>",
  655. messageSends: [],
  656. referencedClasses: []
  657. }),
  658. globals.SourceArea);
  659. smalltalk.addMethod(
  660. smalltalk.method({
  661. selector: "inspectIt",
  662. protocol: 'actions',
  663. fn: function (){
  664. var self=this;
  665. return smalltalk.withContext(function($ctx1) {
  666. _st(self._doIt())._inspect();
  667. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.SourceArea)})},
  668. args: [],
  669. source: "inspectIt\x0a\x09self doIt inspect",
  670. messageSends: ["inspect", "doIt"],
  671. referencedClasses: []
  672. }),
  673. globals.SourceArea);
  674. smalltalk.addMethod(
  675. smalltalk.method({
  676. selector: "onDoIt",
  677. protocol: 'accessing',
  678. fn: function (){
  679. var self=this;
  680. var $1;
  681. $1=self["@onDoIt"];
  682. return $1;
  683. },
  684. args: [],
  685. source: "onDoIt\x0a\x09^ onDoIt",
  686. messageSends: [],
  687. referencedClasses: []
  688. }),
  689. globals.SourceArea);
  690. smalltalk.addMethod(
  691. smalltalk.method({
  692. selector: "onDoIt:",
  693. protocol: 'accessing',
  694. fn: function (aBlock){
  695. var self=this;
  696. self["@onDoIt"]=aBlock;
  697. return self},
  698. args: ["aBlock"],
  699. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  700. messageSends: [],
  701. referencedClasses: []
  702. }),
  703. globals.SourceArea);
  704. smalltalk.addMethod(
  705. smalltalk.method({
  706. selector: "onKeyDown:",
  707. protocol: 'events',
  708. fn: function (aBlock){
  709. var self=this;
  710. return smalltalk.withContext(function($ctx1) {
  711. _st(self["@div"])._onKeyDown_(aBlock);
  712. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},globals.SourceArea)})},
  713. args: ["aBlock"],
  714. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  715. messageSends: ["onKeyDown:"],
  716. referencedClasses: []
  717. }),
  718. globals.SourceArea);
  719. smalltalk.addMethod(
  720. smalltalk.method({
  721. selector: "onKeyUp:",
  722. protocol: 'events',
  723. fn: function (aBlock){
  724. var self=this;
  725. return smalltalk.withContext(function($ctx1) {
  726. _st(self["@div"])._onKeyUp_(aBlock);
  727. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},globals.SourceArea)})},
  728. args: ["aBlock"],
  729. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  730. messageSends: ["onKeyUp:"],
  731. referencedClasses: []
  732. }),
  733. globals.SourceArea);
  734. smalltalk.addMethod(
  735. smalltalk.method({
  736. selector: "print:",
  737. protocol: 'actions',
  738. fn: function (aString){
  739. var self=this;
  740. var start,stop,currentLine;
  741. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  742. return smalltalk.withContext(function($ctx1) {
  743. var $1,$2,$4,$3,$5,$6,$7,$8,$10,$9,$11,$12,$13,$15,$14;
  744. $1=_st(self["@editor"])._getCursor_(false);
  745. $ctx1.sendIdx["getCursor:"]=1;
  746. currentLine=_st($1)._line();
  747. start=_st($HashedCollection())._new();
  748. $ctx1.sendIdx["new"]=1;
  749. _st(start)._at_put_("line",currentLine);
  750. $ctx1.sendIdx["at:put:"]=1;
  751. $2=start;
  752. $4=_st(self["@editor"])._getCursor_(false);
  753. $ctx1.sendIdx["getCursor:"]=2;
  754. $3=_st($4)._ch();
  755. _st($2)._at_put_("ch",$3);
  756. $ctx1.sendIdx["at:put:"]=2;
  757. $5=_st(self["@editor"])._getSelection();
  758. $ctx1.sendIdx["getSelection"]=1;
  759. _st($5)._ifEmpty_((function(){
  760. return smalltalk.withContext(function($ctx2) {
  761. $6=start;
  762. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  763. $ctx2.sendIdx["size"]=1;
  764. _st($6)._at_put_("ch",$7);
  765. $ctx2.sendIdx["at:put:"]=3;
  766. $8=self["@editor"];
  767. $10="line".__minus_gt(currentLine);
  768. $ctx2.sendIdx["->"]=1;
  769. $9=globals.HashedCollection._from_([$10,"ch".__minus_gt((0))]);
  770. return _st($8)._setSelection_end_($9,start);
  771. $ctx2.sendIdx["setSelection:end:"]=1;
  772. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  773. stop=_st($HashedCollection())._new();
  774. _st(stop)._at_put_("line",currentLine);
  775. $ctx1.sendIdx["at:put:"]=4;
  776. $11=stop;
  777. $12=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
  778. $ctx1.sendIdx["+"]=1;
  779. _st($11)._at_put_("ch",$12);
  780. $13=self["@editor"];
  781. $15=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  782. $ctx1.sendIdx[","]=2;
  783. $14=_st($15).__comma(" ");
  784. $ctx1.sendIdx[","]=1;
  785. _st($13)._replaceSelection_($14);
  786. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  787. _st(self["@editor"])._setSelection_end_(stop,start);
  788. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},globals.SourceArea)})},
  789. args: ["aString"],
  790. source: "print: aString\x0a\x09| start stop currentLine |\x0a\x09currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a\x09(editor getSelection) ifEmpty: [\x0a\x09\x09\x22select current line if selection is empty\x22\x0a\x09\x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a\x09\x09editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a\x09].\x0a\x09stop := HashedCollection new.\x0a\x09stop at: 'line' put: currentLine.\x0a\x09stop at: 'ch' put: ((start at: 'ch') + aString size + 2).\x0a\x0a\x09editor replaceSelection: (editor getSelection, ' ', aString, ' ').\x0a\x09editor setCursor: (editor getCursor: true).\x0a\x09editor setSelection: stop end: start",
  791. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "->", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  792. referencedClasses: ["HashedCollection"]
  793. }),
  794. globals.SourceArea);
  795. smalltalk.addMethod(
  796. smalltalk.method({
  797. selector: "printIt",
  798. protocol: 'actions',
  799. fn: function (){
  800. var self=this;
  801. return smalltalk.withContext(function($ctx1) {
  802. self._print_(_st(self._doIt())._printString());
  803. self._focus();
  804. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.SourceArea)})},
  805. args: [],
  806. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  807. messageSends: ["print:", "printString", "doIt", "focus"],
  808. referencedClasses: []
  809. }),
  810. globals.SourceArea);
  811. smalltalk.addMethod(
  812. smalltalk.method({
  813. selector: "receiver",
  814. protocol: 'accessing',
  815. fn: function (){
  816. var self=this;
  817. function $DoIt(){return globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  818. return smalltalk.withContext(function($ctx1) {
  819. var $2,$1;
  820. $2=self["@receiver"];
  821. if(($receiver = $2) == nil || $receiver == null){
  822. $1=_st($DoIt())._new();
  823. } else {
  824. $1=$2;
  825. };
  826. return $1;
  827. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.SourceArea)})},
  828. args: [],
  829. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  830. messageSends: ["ifNil:", "new"],
  831. referencedClasses: ["DoIt"]
  832. }),
  833. globals.SourceArea);
  834. smalltalk.addMethod(
  835. smalltalk.method({
  836. selector: "receiver:",
  837. protocol: 'accessing',
  838. fn: function (anObject){
  839. var self=this;
  840. self["@receiver"]=anObject;
  841. return self},
  842. args: ["anObject"],
  843. source: "receiver: anObject\x0a\x09receiver := anObject",
  844. messageSends: [],
  845. referencedClasses: []
  846. }),
  847. globals.SourceArea);
  848. smalltalk.addMethod(
  849. smalltalk.method({
  850. selector: "renderOn:",
  851. protocol: 'rendering',
  852. fn: function (html){
  853. var self=this;
  854. var textarea;
  855. return smalltalk.withContext(function($ctx1) {
  856. self["@div"]=_st(_st(html)._div())._class_("source");
  857. _st(self["@div"])._with_((function(){
  858. return smalltalk.withContext(function($ctx2) {
  859. textarea=_st(html)._textarea();
  860. return textarea;
  861. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  862. self._setEditorOn_(_st(textarea)._element());
  863. _st(self["@div"])._onKeyDown_((function(e){
  864. return smalltalk.withContext(function($ctx2) {
  865. return self._handleKeyDown_(e);
  866. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  867. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},globals.SourceArea)})},
  868. args: ["html"],
  869. source: "renderOn: html\x0a\x09| textarea |\x0a\x09div := html div class: 'source'.\x0a\x09div with: [ textarea := html textarea ].\x0a\x09self setEditorOn: textarea element.\x0a\x09div onKeyDown: [ :e | self handleKeyDown: e ]",
  870. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  871. referencedClasses: []
  872. }),
  873. globals.SourceArea);
  874. smalltalk.addMethod(
  875. smalltalk.method({
  876. selector: "selection",
  877. protocol: 'accessing',
  878. fn: function (){
  879. var self=this;
  880. return smalltalk.withContext(function($ctx1) {
  881. var $1;
  882. $1=_st(self["@editor"])._getSelection();
  883. return $1;
  884. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.SourceArea)})},
  885. args: [],
  886. source: "selection\x0a\x09^ editor getSelection",
  887. messageSends: ["getSelection"],
  888. referencedClasses: []
  889. }),
  890. globals.SourceArea);
  891. smalltalk.addMethod(
  892. smalltalk.method({
  893. selector: "setEditorOn:",
  894. protocol: 'accessing',
  895. fn: function (aTextarea){
  896. var self=this;
  897. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  898. theme: 'default',
  899. lineNumbers: true,
  900. enterMode: 'flat',
  901. indentWithTabs: true,
  902. indentUnit: 4,
  903. matchBrackets: true,
  904. electricChars: false
  905. });
  906. return self},
  907. args: ["aTextarea"],
  908. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'default',\x0a\x09\x09\x09\x09lineNumbers: true,\x0a\x09\x09\x09\x09enterMode: 'flat',\x0a\x09\x09\x09\x09indentWithTabs: true,\x0a\x09\x09\x09\x09indentUnit: 4,\x0a\x09\x09\x09\x09matchBrackets: true,\x0a\x09\x09\x09\x09electricChars: false\x0a\x09})>",
  909. messageSends: [],
  910. referencedClasses: []
  911. }),
  912. globals.SourceArea);
  913. smalltalk.addMethod(
  914. smalltalk.method({
  915. selector: "val",
  916. protocol: 'accessing',
  917. fn: function (){
  918. var self=this;
  919. return smalltalk.withContext(function($ctx1) {
  920. var $1;
  921. $1=_st(self["@editor"])._getValue();
  922. return $1;
  923. }, function($ctx1) {$ctx1.fill(self,"val",{},globals.SourceArea)})},
  924. args: [],
  925. source: "val\x0a\x09^ editor getValue",
  926. messageSends: ["getValue"],
  927. referencedClasses: []
  928. }),
  929. globals.SourceArea);
  930. smalltalk.addMethod(
  931. smalltalk.method({
  932. selector: "val:",
  933. protocol: 'accessing',
  934. fn: function (aString){
  935. var self=this;
  936. return smalltalk.withContext(function($ctx1) {
  937. _st(self["@editor"])._setValue_(aString);
  938. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},globals.SourceArea)})},
  939. args: ["aString"],
  940. source: "val: aString\x0a\x09editor setValue: aString",
  941. messageSends: ["setValue:"],
  942. referencedClasses: []
  943. }),
  944. globals.SourceArea);
  945. smalltalk.addMethod(
  946. smalltalk.method({
  947. selector: "initialize",
  948. protocol: 'initialization',
  949. fn: function (){
  950. var self=this;
  951. return smalltalk.withContext(function($ctx1) {
  952. globals.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []);
  953. self._setupCodeMirror();
  954. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.SourceArea.klass)})},
  955. args: [],
  956. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  957. messageSends: ["initialize", "setupCodeMirror"],
  958. referencedClasses: []
  959. }),
  960. globals.SourceArea.klass);
  961. smalltalk.addMethod(
  962. smalltalk.method({
  963. selector: "setupCodeMirror",
  964. protocol: 'initialization',
  965. fn: function (){
  966. var self=this;
  967. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  968. return self},
  969. args: [],
  970. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  971. messageSends: [],
  972. referencedClasses: []
  973. }),
  974. globals.SourceArea.klass);
  975. smalltalk.addClass('TabManager', globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  976. smalltalk.addMethod(
  977. smalltalk.method({
  978. selector: "addTab:",
  979. protocol: 'adding/Removing',
  980. fn: function (aWidget){
  981. var self=this;
  982. return smalltalk.withContext(function($ctx1) {
  983. _st(self._tabs())._add_(aWidget);
  984. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  985. _st(aWidget)._hide();
  986. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},globals.TabManager)})},
  987. args: ["aWidget"],
  988. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  989. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  990. referencedClasses: []
  991. }),
  992. globals.TabManager);
  993. smalltalk.addMethod(
  994. smalltalk.method({
  995. selector: "close",
  996. protocol: 'actions',
  997. fn: function (){
  998. var self=this;
  999. return smalltalk.withContext(function($ctx1) {
  1000. var $1,$2,$3;
  1001. $1=self["@opened"];
  1002. if(smalltalk.assert($1)){
  1003. $2="#amber"._asJQuery();
  1004. $ctx1.sendIdx["asJQuery"]=1;
  1005. _st($2)._hide();
  1006. $ctx1.sendIdx["hide"]=1;
  1007. $3=_st(self["@ul"])._asJQuery();
  1008. $ctx1.sendIdx["asJQuery"]=2;
  1009. _st($3)._hide();
  1010. $ctx1.sendIdx["hide"]=2;
  1011. _st(self["@selectedTab"])._hide();
  1012. self._removeBodyMargin();
  1013. _st("body"._asJQuery())._removeClass_("amberBody");
  1014. self["@opened"]=false;
  1015. self["@opened"];
  1016. };
  1017. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabManager)})},
  1018. args: [],
  1019. source: "close\x0a\x09opened ifTrue: [\x0a\x09'#amber' asJQuery hide.\x0a\x09ul asJQuery hide.\x0a\x09selectedTab hide.\x0a\x09self removeBodyMargin.\x0a\x09'body' asJQuery removeClass: 'amberBody'.\x0a\x09opened := false ]",
  1020. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1021. referencedClasses: []
  1022. }),
  1023. globals.TabManager);
  1024. smalltalk.addMethod(
  1025. smalltalk.method({
  1026. selector: "closeTab:",
  1027. protocol: 'actions',
  1028. fn: function (aWidget){
  1029. var self=this;
  1030. return smalltalk.withContext(function($ctx1) {
  1031. self._removeTab_(aWidget);
  1032. self._selectTab_(_st(self._tabs())._last());
  1033. _st(aWidget)._remove();
  1034. self._update();
  1035. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},globals.TabManager)})},
  1036. args: ["aWidget"],
  1037. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1038. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1039. referencedClasses: []
  1040. }),
  1041. globals.TabManager);
  1042. smalltalk.addMethod(
  1043. smalltalk.method({
  1044. selector: "initialize",
  1045. protocol: 'initialization',
  1046. fn: function (){
  1047. var self=this;
  1048. function $Inspector(){return globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1049. function $IDEInspector(){return globals.IDEInspector||(typeof IDEInspector=="undefined"?nil:IDEInspector)}
  1050. function $IDETranscript(){return globals.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1051. function $Workspace(){return globals.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1052. function $TestRunner(){return globals.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1053. return smalltalk.withContext(function($ctx1) {
  1054. var $1,$2,$3,$4,$5,$6,$7;
  1055. globals.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []);
  1056. _st($Inspector())._register_($IDEInspector());
  1057. self["@opened"]=true;
  1058. $1=(function(html){
  1059. return smalltalk.withContext(function($ctx2) {
  1060. return _st(_st(html)._div())._id_("amber");
  1061. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1062. $2="body"._asJQuery();
  1063. $ctx1.sendIdx["asJQuery"]=1;
  1064. _st($1)._appendToJQuery_($2);
  1065. $ctx1.sendIdx["appendToJQuery:"]=1;
  1066. $3="body"._asJQuery();
  1067. $ctx1.sendIdx["asJQuery"]=2;
  1068. _st($3)._addClass_("amberBody");
  1069. self._appendToJQuery_("#amber"._asJQuery());
  1070. self._addTab_(_st($IDETranscript())._current());
  1071. $ctx1.sendIdx["addTab:"]=1;
  1072. $4=_st($Workspace())._new();
  1073. $ctx1.sendIdx["new"]=1;
  1074. self._addTab_($4);
  1075. $ctx1.sendIdx["addTab:"]=2;
  1076. $5=self._addTab_(_st($TestRunner())._new());
  1077. self._selectTab_(_st(self._tabs())._last());
  1078. self._onResize_((function(){
  1079. return smalltalk.withContext(function($ctx2) {
  1080. self._updateBodyMargin();
  1081. $6=self._updatePosition();
  1082. $ctx2.sendIdx["updatePosition"]=1;
  1083. return $6;
  1084. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1085. $7=self._onWindowResize_((function(){
  1086. return smalltalk.withContext(function($ctx2) {
  1087. return self._updatePosition();
  1088. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1089. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TabManager)})},
  1090. args: [],
  1091. source: "initialize\x0a\x09super initialize.\x0a\x09Inspector register: IDEInspector.\x0a\x09opened := true.\x0a\x09[ :html | html div id: 'amber' ] appendToJQuery: 'body' asJQuery.\x0a\x09'body' asJQuery\x0a\x09addClass: 'amberBody'.\x0a\x09self appendToJQuery: '#amber' asJQuery.\x0a\x09self\x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a\x09self selectTab: self tabs last.\x0a\x09self\x0a\x09onResize: [ self updateBodyMargin; updatePosition ];\x0a\x09onWindowResize: [ self updatePosition ]",
  1092. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1093. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"]
  1094. }),
  1095. globals.TabManager);
  1096. smalltalk.addMethod(
  1097. smalltalk.method({
  1098. selector: "labelFor:",
  1099. protocol: 'accessing',
  1100. fn: function (aWidget){
  1101. var self=this;
  1102. var label,maxSize;
  1103. return smalltalk.withContext(function($ctx1) {
  1104. var $1,$4,$3,$2,$5,$6;
  1105. maxSize=(15);
  1106. $1=_st(aWidget)._label();
  1107. $ctx1.sendIdx["label"]=1;
  1108. $4=_st(aWidget)._label();
  1109. $ctx1.sendIdx["label"]=2;
  1110. $3=_st($4)._size();
  1111. $ctx1.sendIdx["size"]=1;
  1112. $2=_st($3)._min_(maxSize);
  1113. label=_st($1)._copyFrom_to_((0),$2);
  1114. $5=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  1115. if(smalltalk.assert($5)){
  1116. label=_st(label).__comma("...");
  1117. label;
  1118. };
  1119. $6=label;
  1120. return $6;
  1121. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},globals.TabManager)})},
  1122. args: ["aWidget"],
  1123. 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",
  1124. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1125. referencedClasses: []
  1126. }),
  1127. globals.TabManager);
  1128. smalltalk.addMethod(
  1129. smalltalk.method({
  1130. selector: "newBrowserTab",
  1131. protocol: 'actions',
  1132. fn: function (){
  1133. var self=this;
  1134. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1135. return smalltalk.withContext(function($ctx1) {
  1136. _st($Browser())._open();
  1137. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},globals.TabManager)})},
  1138. args: [],
  1139. source: "newBrowserTab\x0a\x09Browser open",
  1140. messageSends: ["open"],
  1141. referencedClasses: ["Browser"]
  1142. }),
  1143. globals.TabManager);
  1144. smalltalk.addMethod(
  1145. smalltalk.method({
  1146. selector: "onResize:",
  1147. protocol: 'actions',
  1148. fn: function (aBlock){
  1149. var self=this;
  1150. return smalltalk.withContext(function($ctx1) {
  1151. var $1,$3,$4,$2;
  1152. $1="#amber"._asJQuery();
  1153. $3="handles".__minus_gt("n");
  1154. $ctx1.sendIdx["->"]=1;
  1155. $4="resize".__minus_gt(aBlock);
  1156. $ctx1.sendIdx["->"]=2;
  1157. $2=globals.HashedCollection._from_([$3,$4,"minHeight".__minus_gt((230))]);
  1158. _st($1)._resizable_($2);
  1159. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},globals.TabManager)})},
  1160. args: ["aBlock"],
  1161. source: "onResize: aBlock\x0a\x09'#amber' asJQuery resizable: #{\x0a\x09\x09'handles' -> 'n'.\x0a\x09\x09'resize' -> aBlock.\x0a\x09\x09'minHeight' -> 230\x0a\x09}",
  1162. messageSends: ["resizable:", "asJQuery", "->"],
  1163. referencedClasses: []
  1164. }),
  1165. globals.TabManager);
  1166. smalltalk.addMethod(
  1167. smalltalk.method({
  1168. selector: "onWindowResize:",
  1169. protocol: 'actions',
  1170. fn: function (aBlock){
  1171. var self=this;
  1172. return smalltalk.withContext(function($ctx1) {
  1173. _st(_st(window)._asJQuery())._resize_(aBlock);
  1174. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},globals.TabManager)})},
  1175. args: ["aBlock"],
  1176. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1177. messageSends: ["resize:", "asJQuery"],
  1178. referencedClasses: []
  1179. }),
  1180. globals.TabManager);
  1181. smalltalk.addMethod(
  1182. smalltalk.method({
  1183. selector: "open",
  1184. protocol: 'actions',
  1185. fn: function (){
  1186. var self=this;
  1187. return smalltalk.withContext(function($ctx1) {
  1188. var $1,$2,$3;
  1189. $1=self["@opened"];
  1190. if(! smalltalk.assert($1)){
  1191. $2="body"._asJQuery();
  1192. $ctx1.sendIdx["asJQuery"]=1;
  1193. _st($2)._addClass_("amberBody");
  1194. $3="#amber"._asJQuery();
  1195. $ctx1.sendIdx["asJQuery"]=2;
  1196. _st($3)._show();
  1197. $ctx1.sendIdx["show"]=1;
  1198. _st(_st(self["@ul"])._asJQuery())._show();
  1199. $ctx1.sendIdx["show"]=2;
  1200. self._updateBodyMargin();
  1201. _st(self["@selectedTab"])._show();
  1202. self["@opened"]=true;
  1203. self["@opened"];
  1204. };
  1205. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabManager)})},
  1206. args: [],
  1207. source: "open\x0a\x09opened ifFalse: [\x0a\x09'body' asJQuery addClass: 'amberBody'.\x0a\x09'#amber' asJQuery show.\x0a\x09ul asJQuery show.\x0a\x09self updateBodyMargin.\x0a\x09selectedTab show.\x0a\x09opened := true ]",
  1208. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1209. referencedClasses: []
  1210. }),
  1211. globals.TabManager);
  1212. smalltalk.addMethod(
  1213. smalltalk.method({
  1214. selector: "removeBodyMargin",
  1215. protocol: 'actions',
  1216. fn: function (){
  1217. var self=this;
  1218. return smalltalk.withContext(function($ctx1) {
  1219. self._setBodyMargin_((0));
  1220. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},globals.TabManager)})},
  1221. args: [],
  1222. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1223. messageSends: ["setBodyMargin:"],
  1224. referencedClasses: []
  1225. }),
  1226. globals.TabManager);
  1227. smalltalk.addMethod(
  1228. smalltalk.method({
  1229. selector: "removeTab:",
  1230. protocol: 'adding/Removing',
  1231. fn: function (aWidget){
  1232. var self=this;
  1233. return smalltalk.withContext(function($ctx1) {
  1234. _st(self._tabs())._remove_(aWidget);
  1235. self._update();
  1236. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},globals.TabManager)})},
  1237. args: ["aWidget"],
  1238. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1239. messageSends: ["remove:", "tabs", "update"],
  1240. referencedClasses: []
  1241. }),
  1242. globals.TabManager);
  1243. smalltalk.addMethod(
  1244. smalltalk.method({
  1245. selector: "renderOn:",
  1246. protocol: 'rendering',
  1247. fn: function (html){
  1248. var self=this;
  1249. return smalltalk.withContext(function($ctx1) {
  1250. var $1,$2;
  1251. _st(_st(html)._div())._id_("logo");
  1252. $ctx1.sendIdx["id:"]=1;
  1253. self._renderToolbarOn_(html);
  1254. $1=_st(html)._ul();
  1255. _st($1)._id_("amberTabs");
  1256. $2=_st($1)._yourself();
  1257. self["@ul"]=$2;
  1258. self._renderTabs();
  1259. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabManager)})},
  1260. args: ["html"],
  1261. 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",
  1262. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1263. referencedClasses: []
  1264. }),
  1265. globals.TabManager);
  1266. smalltalk.addMethod(
  1267. smalltalk.method({
  1268. selector: "renderTabFor:on:",
  1269. protocol: 'rendering',
  1270. fn: function (aWidget,html){
  1271. var self=this;
  1272. var li;
  1273. return smalltalk.withContext(function($ctx1) {
  1274. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10;
  1275. li=_st(html)._li();
  1276. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1277. if(smalltalk.assert($1)){
  1278. _st(li)._class_("selected");
  1279. $ctx1.sendIdx["class:"]=1;
  1280. };
  1281. $2=li;
  1282. _st($2)._with_((function(){
  1283. return smalltalk.withContext(function($ctx2) {
  1284. $3=_st(html)._span();
  1285. $ctx2.sendIdx["span"]=1;
  1286. _st($3)._class_("ltab");
  1287. $ctx2.sendIdx["class:"]=2;
  1288. $4=_st(html)._span();
  1289. $ctx2.sendIdx["span"]=2;
  1290. _st($4)._class_("mtab");
  1291. $ctx2.sendIdx["class:"]=3;
  1292. $5=_st($4)._with_((function(){
  1293. return smalltalk.withContext(function($ctx3) {
  1294. $6=_st(aWidget)._canBeClosed();
  1295. if(smalltalk.assert($6)){
  1296. $7=_st(html)._span();
  1297. $ctx3.sendIdx["span"]=3;
  1298. _st($7)._class_("close");
  1299. $ctx3.sendIdx["class:"]=4;
  1300. _st($7)._with_("x");
  1301. $ctx3.sendIdx["with:"]=3;
  1302. $8=_st($7)._onClick_((function(){
  1303. return smalltalk.withContext(function($ctx4) {
  1304. return self._closeTab_(aWidget);
  1305. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1306. $ctx3.sendIdx["onClick:"]=1;
  1307. $8;
  1308. };
  1309. $9=_st(html)._span();
  1310. $ctx3.sendIdx["span"]=4;
  1311. return _st($9)._with_(self._labelFor_(aWidget));
  1312. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1313. $ctx2.sendIdx["with:"]=2;
  1314. $5;
  1315. return _st(_st(html)._span())._class_("rtab");
  1316. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1317. $ctx1.sendIdx["with:"]=1;
  1318. $10=_st($2)._onClick_((function(){
  1319. return smalltalk.withContext(function($ctx2) {
  1320. return self._selectTab_(aWidget);
  1321. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1322. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},globals.TabManager)})},
  1323. args: ["aWidget", "html"],
  1324. 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 ]",
  1325. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1326. referencedClasses: []
  1327. }),
  1328. globals.TabManager);
  1329. smalltalk.addMethod(
  1330. smalltalk.method({
  1331. selector: "renderTabs",
  1332. protocol: 'rendering',
  1333. fn: function (){
  1334. var self=this;
  1335. return smalltalk.withContext(function($ctx1) {
  1336. var $1,$2,$3,$4,$5;
  1337. _st(self["@ul"])._contents_((function(html){
  1338. return smalltalk.withContext(function($ctx2) {
  1339. _st(self._tabs())._do_((function(each){
  1340. return smalltalk.withContext(function($ctx3) {
  1341. return self._renderTabFor_on_(each,html);
  1342. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1343. $1=_st(html)._li();
  1344. _st($1)._class_("newtab");
  1345. $ctx2.sendIdx["class:"]=1;
  1346. _st($1)._with_((function(){
  1347. return smalltalk.withContext(function($ctx3) {
  1348. $2=_st(html)._span();
  1349. $ctx3.sendIdx["span"]=1;
  1350. _st($2)._class_("ltab");
  1351. $ctx3.sendIdx["class:"]=2;
  1352. $3=_st(html)._span();
  1353. $ctx3.sendIdx["span"]=2;
  1354. _st($3)._class_("mtab");
  1355. $ctx3.sendIdx["class:"]=3;
  1356. $4=_st($3)._with_(" + ");
  1357. $4;
  1358. return _st(_st(html)._span())._class_("rtab");
  1359. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1360. $ctx2.sendIdx["with:"]=1;
  1361. $5=_st($1)._onClick_((function(){
  1362. return smalltalk.withContext(function($ctx3) {
  1363. return self._newBrowserTab();
  1364. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1365. return $5;
  1366. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1367. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},globals.TabManager)})},
  1368. args: [],
  1369. source: "renderTabs\x0a\x09ul contents: [ :html |\x0a\x09\x09self tabs do: [ :each |\x0a\x09\x09self renderTabFor: each on: html ].\x0a\x09\x09html li\x0a\x09\x09class: 'newtab';\x0a\x09\x09with: [\x0a\x09\x09\x09html span class: 'ltab'.\x0a\x09\x09\x09html span class: 'mtab'; with: ' + '.\x0a\x09\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self newBrowserTab ]]",
  1370. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1371. referencedClasses: []
  1372. }),
  1373. globals.TabManager);
  1374. smalltalk.addMethod(
  1375. smalltalk.method({
  1376. selector: "renderToolbarOn:",
  1377. protocol: 'rendering',
  1378. fn: function (html){
  1379. var self=this;
  1380. return smalltalk.withContext(function($ctx1) {
  1381. var $1,$3,$4,$5,$6,$7,$2;
  1382. $1=_st(html)._div();
  1383. $ctx1.sendIdx["div"]=1;
  1384. _st($1)._id_("amber_toolbar");
  1385. $ctx1.sendIdx["id:"]=1;
  1386. $2=_st($1)._with_((function(){
  1387. return smalltalk.withContext(function($ctx2) {
  1388. $3=_st(html)._input();
  1389. _st($3)._class_("implementors");
  1390. $4=_st($3)._yourself();
  1391. self["@input"]=$4;
  1392. self["@input"];
  1393. _st(self["@input"])._onKeyPress_((function(event){
  1394. return smalltalk.withContext(function($ctx3) {
  1395. $5=_st(_st(event)._keyCode()).__eq((13));
  1396. if(smalltalk.assert($5)){
  1397. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1398. };
  1399. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1400. $6=_st(html)._div();
  1401. _st($6)._id_("amber_close");
  1402. $7=_st($6)._onClick_((function(){
  1403. return smalltalk.withContext(function($ctx3) {
  1404. return self._close();
  1405. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1406. return $7;
  1407. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1408. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},globals.TabManager)})},
  1409. args: ["html"],
  1410. 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 ]]",
  1411. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1412. referencedClasses: []
  1413. }),
  1414. globals.TabManager);
  1415. smalltalk.addMethod(
  1416. smalltalk.method({
  1417. selector: "search:",
  1418. protocol: 'actions',
  1419. fn: function (aString){
  1420. var self=this;
  1421. var searchedClass;
  1422. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1423. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1424. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1425. return smalltalk.withContext(function($ctx1) {
  1426. var $1;
  1427. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  1428. $1=_st(searchedClass)._isClass();
  1429. if(smalltalk.assert($1)){
  1430. _st($Browser())._openOn_(searchedClass);
  1431. } else {
  1432. _st($ReferencesBrowser())._search_(aString);
  1433. };
  1434. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},globals.TabManager)})},
  1435. args: ["aString"],
  1436. source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk globals at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [ Browser openOn: searchedClass ]\x0a\x09\x09\x09ifFalse: [ ReferencesBrowser search: aString ]",
  1437. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1438. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1439. }),
  1440. globals.TabManager);
  1441. smalltalk.addMethod(
  1442. smalltalk.method({
  1443. selector: "selectTab:",
  1444. protocol: 'actions',
  1445. fn: function (aWidget){
  1446. var self=this;
  1447. return smalltalk.withContext(function($ctx1) {
  1448. self._open();
  1449. self["@selectedTab"]=aWidget;
  1450. _st(self._tabs())._do_((function(each){
  1451. return smalltalk.withContext(function($ctx2) {
  1452. return _st(each)._hide();
  1453. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1454. _st(aWidget)._show();
  1455. self._update();
  1456. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},globals.TabManager)})},
  1457. args: ["aWidget"],
  1458. source: "selectTab: aWidget\x0a\x09self open.\x0a\x09selectedTab := aWidget.\x0a\x09self tabs do: [ :each |\x0a\x09each hide ].\x0a\x09aWidget show.\x0a\x09\x0a\x09self update",
  1459. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1460. referencedClasses: []
  1461. }),
  1462. globals.TabManager);
  1463. smalltalk.addMethod(
  1464. smalltalk.method({
  1465. selector: "setBodyMargin:",
  1466. protocol: 'actions',
  1467. fn: function (anInteger){
  1468. var self=this;
  1469. return smalltalk.withContext(function($ctx1) {
  1470. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1471. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},globals.TabManager)})},
  1472. args: ["anInteger"],
  1473. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1474. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1475. referencedClasses: []
  1476. }),
  1477. globals.TabManager);
  1478. smalltalk.addMethod(
  1479. smalltalk.method({
  1480. selector: "tabs",
  1481. protocol: 'accessing',
  1482. fn: function (){
  1483. var self=this;
  1484. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  1485. return smalltalk.withContext(function($ctx1) {
  1486. var $2,$1;
  1487. $2=self["@tabs"];
  1488. if(($receiver = $2) == nil || $receiver == null){
  1489. self["@tabs"]=_st($Array())._new();
  1490. $1=self["@tabs"];
  1491. } else {
  1492. $1=$2;
  1493. };
  1494. return $1;
  1495. }, function($ctx1) {$ctx1.fill(self,"tabs",{},globals.TabManager)})},
  1496. args: [],
  1497. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  1498. messageSends: ["ifNil:", "new"],
  1499. referencedClasses: ["Array"]
  1500. }),
  1501. globals.TabManager);
  1502. smalltalk.addMethod(
  1503. smalltalk.method({
  1504. selector: "update",
  1505. protocol: 'updating',
  1506. fn: function (){
  1507. var self=this;
  1508. return smalltalk.withContext(function($ctx1) {
  1509. self._renderTabs();
  1510. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabManager)})},
  1511. args: [],
  1512. source: "update\x0a\x09self renderTabs",
  1513. messageSends: ["renderTabs"],
  1514. referencedClasses: []
  1515. }),
  1516. globals.TabManager);
  1517. smalltalk.addMethod(
  1518. smalltalk.method({
  1519. selector: "updateBodyMargin",
  1520. protocol: 'actions',
  1521. fn: function (){
  1522. var self=this;
  1523. return smalltalk.withContext(function($ctx1) {
  1524. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1525. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},globals.TabManager)})},
  1526. args: [],
  1527. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1528. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1529. referencedClasses: []
  1530. }),
  1531. globals.TabManager);
  1532. smalltalk.addMethod(
  1533. smalltalk.method({
  1534. selector: "updatePosition",
  1535. protocol: 'actions',
  1536. fn: function (){
  1537. var self=this;
  1538. return smalltalk.withContext(function($ctx1) {
  1539. var $1,$2;
  1540. $1="#amber"._asJQuery();
  1541. _st($1)._css_put_("top","");
  1542. $ctx1.sendIdx["css:put:"]=1;
  1543. $2=_st($1)._css_put_("bottom","0px");
  1544. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},globals.TabManager)})},
  1545. args: [],
  1546. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1547. messageSends: ["css:put:", "asJQuery"],
  1548. referencedClasses: []
  1549. }),
  1550. globals.TabManager);
  1551. globals.TabManager.klass.iVarNames = ['current'];
  1552. smalltalk.addMethod(
  1553. smalltalk.method({
  1554. selector: "current",
  1555. protocol: 'instance creation',
  1556. fn: function (){
  1557. var self=this;
  1558. return smalltalk.withContext(function($ctx1) {
  1559. var $2,$1;
  1560. $2=self["@current"];
  1561. if(($receiver = $2) == nil || $receiver == null){
  1562. self["@current"]=globals.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []);
  1563. $1=self["@current"];
  1564. } else {
  1565. $1=$2;
  1566. };
  1567. return $1;
  1568. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.TabManager.klass)})},
  1569. args: [],
  1570. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  1571. messageSends: ["ifNil:", "new"],
  1572. referencedClasses: []
  1573. }),
  1574. globals.TabManager.klass);
  1575. smalltalk.addMethod(
  1576. smalltalk.method({
  1577. selector: "new",
  1578. protocol: 'instance creation',
  1579. fn: function (){
  1580. var self=this;
  1581. return smalltalk.withContext(function($ctx1) {
  1582. self._shouldNotImplement();
  1583. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.TabManager.klass)})},
  1584. args: [],
  1585. source: "new\x0a\x09self shouldNotImplement",
  1586. messageSends: ["shouldNotImplement"],
  1587. referencedClasses: []
  1588. }),
  1589. globals.TabManager.klass);
  1590. smalltalk.addMethod(
  1591. smalltalk.method({
  1592. selector: "toggleAmberIDE",
  1593. protocol: 'actions',
  1594. fn: function (){
  1595. var self=this;
  1596. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1597. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1598. return smalltalk.withContext(function($ctx1) {
  1599. var $3,$2,$1,$4,$5;
  1600. $3="#amber"._asJQuery();
  1601. $ctx1.sendIdx["asJQuery"]=1;
  1602. $2=_st($3)._length();
  1603. $1=_st($2).__eq((0));
  1604. if(smalltalk.assert($1)){
  1605. _st($Browser())._open();
  1606. $ctx1.sendIdx["open"]=1;
  1607. } else {
  1608. $4=_st("#amber"._asJQuery())._is_(":visible");
  1609. if(smalltalk.assert($4)){
  1610. $5=_st($TabManager())._current();
  1611. $ctx1.sendIdx["current"]=1;
  1612. _st($5)._close();
  1613. } else {
  1614. _st(_st($TabManager())._current())._open();
  1615. };
  1616. };
  1617. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},globals.TabManager.klass)})},
  1618. args: [],
  1619. source: "toggleAmberIDE\x0a\x09'#amber' asJQuery length = 0\x0a\x09\x09ifTrue: [ Browser open ]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09('#amber' asJQuery is: ':visible')\x0a\x09\x09\x09\x09ifTrue: [ TabManager current close ]\x0a\x09\x09\x09\x09ifFalse: [ TabManager current open ] ]",
  1620. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1621. referencedClasses: ["Browser", "TabManager"]
  1622. }),
  1623. globals.TabManager.klass);
  1624. smalltalk.addClass('TabWidget', globals.Widget, ['div'], 'IDE');
  1625. smalltalk.addMethod(
  1626. smalltalk.method({
  1627. selector: "canBeClosed",
  1628. protocol: 'testing',
  1629. fn: function (){
  1630. var self=this;
  1631. return false;
  1632. },
  1633. args: [],
  1634. source: "canBeClosed\x0a\x09^ false",
  1635. messageSends: [],
  1636. referencedClasses: []
  1637. }),
  1638. globals.TabWidget);
  1639. smalltalk.addMethod(
  1640. smalltalk.method({
  1641. selector: "close",
  1642. protocol: 'actions',
  1643. fn: function (){
  1644. var self=this;
  1645. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1646. return smalltalk.withContext(function($ctx1) {
  1647. _st(_st($TabManager())._current())._closeTab_(self);
  1648. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabWidget)})},
  1649. args: [],
  1650. source: "close\x0a\x09TabManager current closeTab: self",
  1651. messageSends: ["closeTab:", "current"],
  1652. referencedClasses: ["TabManager"]
  1653. }),
  1654. globals.TabWidget);
  1655. smalltalk.addMethod(
  1656. smalltalk.method({
  1657. selector: "hide",
  1658. protocol: 'actions',
  1659. fn: function (){
  1660. var self=this;
  1661. return smalltalk.withContext(function($ctx1) {
  1662. _st(_st(self["@div"])._asJQuery())._hide();
  1663. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},globals.TabWidget)})},
  1664. args: [],
  1665. source: "hide\x0a\x09div asJQuery hide",
  1666. messageSends: ["hide", "asJQuery"],
  1667. referencedClasses: []
  1668. }),
  1669. globals.TabWidget);
  1670. smalltalk.addMethod(
  1671. smalltalk.method({
  1672. selector: "label",
  1673. protocol: 'accessing',
  1674. fn: function (){
  1675. var self=this;
  1676. return smalltalk.withContext(function($ctx1) {
  1677. self._subclassResponsibility();
  1678. return self}, function($ctx1) {$ctx1.fill(self,"label",{},globals.TabWidget)})},
  1679. args: [],
  1680. source: "label\x0a\x09self subclassResponsibility",
  1681. messageSends: ["subclassResponsibility"],
  1682. referencedClasses: []
  1683. }),
  1684. globals.TabWidget);
  1685. smalltalk.addMethod(
  1686. smalltalk.method({
  1687. selector: "open",
  1688. protocol: 'actions',
  1689. fn: function (){
  1690. var self=this;
  1691. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1692. return smalltalk.withContext(function($ctx1) {
  1693. var $1;
  1694. $1=_st($TabManager())._current();
  1695. $ctx1.sendIdx["current"]=1;
  1696. _st($1)._addTab_(self);
  1697. _st(_st($TabManager())._current())._selectTab_(self);
  1698. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget)})},
  1699. args: [],
  1700. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1701. messageSends: ["addTab:", "current", "selectTab:"],
  1702. referencedClasses: ["TabManager"]
  1703. }),
  1704. globals.TabWidget);
  1705. smalltalk.addMethod(
  1706. smalltalk.method({
  1707. selector: "remove",
  1708. protocol: 'actions',
  1709. fn: function (){
  1710. var self=this;
  1711. return smalltalk.withContext(function($ctx1) {
  1712. _st(_st(self["@div"])._asJQuery())._remove();
  1713. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},globals.TabWidget)})},
  1714. args: [],
  1715. source: "remove\x0a\x09div asJQuery remove",
  1716. messageSends: ["remove", "asJQuery"],
  1717. referencedClasses: []
  1718. }),
  1719. globals.TabWidget);
  1720. smalltalk.addMethod(
  1721. smalltalk.method({
  1722. selector: "renderBoxOn:",
  1723. protocol: 'rendering',
  1724. fn: function (html){
  1725. var self=this;
  1726. return self},
  1727. args: ["html"],
  1728. source: "renderBoxOn: html",
  1729. messageSends: [],
  1730. referencedClasses: []
  1731. }),
  1732. globals.TabWidget);
  1733. smalltalk.addMethod(
  1734. smalltalk.method({
  1735. selector: "renderButtonsOn:",
  1736. protocol: 'rendering',
  1737. fn: function (html){
  1738. var self=this;
  1739. return self},
  1740. args: ["html"],
  1741. source: "renderButtonsOn: html",
  1742. messageSends: [],
  1743. referencedClasses: []
  1744. }),
  1745. globals.TabWidget);
  1746. smalltalk.addMethod(
  1747. smalltalk.method({
  1748. selector: "renderOn:",
  1749. protocol: 'rendering',
  1750. fn: function (html){
  1751. var self=this;
  1752. return smalltalk.withContext(function($ctx1) {
  1753. var $1,$2;
  1754. $1=_st(html)._div();
  1755. _st($1)._class_("amberTool");
  1756. $2=_st($1)._yourself();
  1757. self["@div"]=$2;
  1758. self._renderTab();
  1759. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabWidget)})},
  1760. args: ["html"],
  1761. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1762. messageSends: ["class:", "div", "yourself", "renderTab"],
  1763. referencedClasses: []
  1764. }),
  1765. globals.TabWidget);
  1766. smalltalk.addMethod(
  1767. smalltalk.method({
  1768. selector: "renderTab",
  1769. protocol: 'rendering',
  1770. fn: function (){
  1771. var self=this;
  1772. return smalltalk.withContext(function($ctx1) {
  1773. var $1,$2,$3,$4;
  1774. _st(self["@div"])._contents_((function(html){
  1775. return smalltalk.withContext(function($ctx2) {
  1776. $1=_st(html)._div();
  1777. $ctx2.sendIdx["div"]=1;
  1778. _st($1)._class_("amber_box");
  1779. $ctx2.sendIdx["class:"]=1;
  1780. $2=_st($1)._with_((function(){
  1781. return smalltalk.withContext(function($ctx3) {
  1782. return self._renderBoxOn_(html);
  1783. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1784. $ctx2.sendIdx["with:"]=1;
  1785. $2;
  1786. $3=_st(html)._div();
  1787. _st($3)._class_("amber_buttons");
  1788. $4=_st($3)._with_((function(){
  1789. return smalltalk.withContext(function($ctx3) {
  1790. return self._renderButtonsOn_(html);
  1791. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1792. return $4;
  1793. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1794. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},globals.TabWidget)})},
  1795. args: [],
  1796. source: "renderTab\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [ self renderBoxOn: html ].\x0a\x09\x09html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [ self renderButtonsOn: html ]]",
  1797. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1798. referencedClasses: []
  1799. }),
  1800. globals.TabWidget);
  1801. smalltalk.addMethod(
  1802. smalltalk.method({
  1803. selector: "show",
  1804. protocol: 'actions',
  1805. fn: function (){
  1806. var self=this;
  1807. return smalltalk.withContext(function($ctx1) {
  1808. _st(_st(self["@div"])._asJQuery())._show();
  1809. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.TabWidget)})},
  1810. args: [],
  1811. source: "show\x0a\x09div asJQuery show",
  1812. messageSends: ["show", "asJQuery"],
  1813. referencedClasses: []
  1814. }),
  1815. globals.TabWidget);
  1816. smalltalk.addMethod(
  1817. smalltalk.method({
  1818. selector: "update",
  1819. protocol: 'rendering',
  1820. fn: function (){
  1821. var self=this;
  1822. return smalltalk.withContext(function($ctx1) {
  1823. self._renderTab();
  1824. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabWidget)})},
  1825. args: [],
  1826. source: "update\x0a\x09self renderTab",
  1827. messageSends: ["renderTab"],
  1828. referencedClasses: []
  1829. }),
  1830. globals.TabWidget);
  1831. smalltalk.addMethod(
  1832. smalltalk.method({
  1833. selector: "open",
  1834. protocol: 'instance creation',
  1835. fn: function (){
  1836. var self=this;
  1837. return smalltalk.withContext(function($ctx1) {
  1838. var $1;
  1839. $1=_st(self._new())._open();
  1840. return $1;
  1841. }, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget.klass)})},
  1842. args: [],
  1843. source: "open\x0a\x09^ self new open",
  1844. messageSends: ["open", "new"],
  1845. referencedClasses: []
  1846. }),
  1847. globals.TabWidget.klass);
  1848. smalltalk.addClass('Browser', globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1849. smalltalk.addMethod(
  1850. smalltalk.method({
  1851. selector: "addInstanceVariableNamed:toClass:",
  1852. protocol: 'actions',
  1853. fn: function (aString,aClass){
  1854. var self=this;
  1855. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1856. return smalltalk.withContext(function($ctx1) {
  1857. var $1,$2,$3,$4,$5;
  1858. $1=_st($ClassBuilder())._new();
  1859. $2=_st(aClass)._superclass();
  1860. $3=_st(aClass)._name();
  1861. $ctx1.sendIdx["name"]=1;
  1862. $4=_st(_st(aClass)._instanceVariableNames())._copy();
  1863. _st($4)._add_(aString);
  1864. $5=_st($4)._yourself();
  1865. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
  1866. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},globals.Browser)})},
  1867. args: ["aString", "aClass"],
  1868. 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",
  1869. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1870. referencedClasses: ["ClassBuilder"]
  1871. }),
  1872. globals.Browser);
  1873. smalltalk.addMethod(
  1874. smalltalk.method({
  1875. selector: "addNewClass",
  1876. protocol: 'actions',
  1877. fn: function (){
  1878. var self=this;
  1879. var className;
  1880. function $Object(){return globals.Object||(typeof Object=="undefined"?nil:Object)}
  1881. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1882. return smalltalk.withContext(function($ctx1) {
  1883. var $1,$2;
  1884. className=self._prompt_("New class");
  1885. $1=_st(_st(className)._notNil())._and_((function(){
  1886. return smalltalk.withContext(function($ctx2) {
  1887. return _st(className)._notEmpty();
  1888. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1889. if(smalltalk.assert($1)){
  1890. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1891. self._resetClassesList();
  1892. $2=self._updateClassesList();
  1893. $2;
  1894. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  1895. };
  1896. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},globals.Browser)})},
  1897. args: [],
  1898. source: "addNewClass\x0a\x09| className |\x0a\x09className := self prompt: 'New class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk globals at: className) ]",
  1899. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  1900. referencedClasses: ["Object", "Smalltalk"]
  1901. }),
  1902. globals.Browser);
  1903. smalltalk.addMethod(
  1904. smalltalk.method({
  1905. selector: "addNewProtocol",
  1906. protocol: 'actions',
  1907. fn: function (){
  1908. var self=this;
  1909. var newProtocol;
  1910. return smalltalk.withContext(function($ctx1) {
  1911. var $1;
  1912. newProtocol=self._prompt_("New method protocol");
  1913. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1914. return smalltalk.withContext(function($ctx2) {
  1915. return _st(newProtocol)._notEmpty();
  1916. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1917. if(smalltalk.assert($1)){
  1918. _st(self["@selectedMethod"])._protocol_(newProtocol);
  1919. self._setMethodProtocol_(newProtocol);
  1920. };
  1921. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},globals.Browser)})},
  1922. args: [],
  1923. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09\x0a\x09newProtocol := self prompt: 'New method protocol'.\x0a\x09\x0a\x09(newProtocol notNil and: [ newProtocol notEmpty ]) ifTrue: [\x0a\x09\x09selectedMethod protocol: newProtocol.\x0a\x09\x09self setMethodProtocol: newProtocol ]",
  1924. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"],
  1925. referencedClasses: []
  1926. }),
  1927. globals.Browser);
  1928. smalltalk.addMethod(
  1929. smalltalk.method({
  1930. selector: "canBeClosed",
  1931. protocol: 'testing',
  1932. fn: function (){
  1933. var self=this;
  1934. return true;
  1935. },
  1936. args: [],
  1937. source: "canBeClosed\x0a\x09^ true",
  1938. messageSends: [],
  1939. referencedClasses: []
  1940. }),
  1941. globals.Browser);
  1942. smalltalk.addMethod(
  1943. smalltalk.method({
  1944. selector: "cancelChanges",
  1945. protocol: 'actions',
  1946. fn: function (){
  1947. var self=this;
  1948. return smalltalk.withContext(function($ctx1) {
  1949. var $2,$1;
  1950. $2=self["@unsavedChanges"];
  1951. if(smalltalk.assert($2)){
  1952. $1=self._confirm_("Cancel changes?");
  1953. } else {
  1954. $1=true;
  1955. };
  1956. return $1;
  1957. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},globals.Browser)})},
  1958. args: [],
  1959. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ self confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  1960. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  1961. referencedClasses: []
  1962. }),
  1963. globals.Browser);
  1964. smalltalk.addMethod(
  1965. smalltalk.method({
  1966. selector: "classCommentSource",
  1967. protocol: 'accessing',
  1968. fn: function (){
  1969. var self=this;
  1970. return smalltalk.withContext(function($ctx1) {
  1971. var $1;
  1972. $1=_st(self["@selectedClass"])._comment();
  1973. return $1;
  1974. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},globals.Browser)})},
  1975. args: [],
  1976. source: "classCommentSource\x0a\x09^ selectedClass comment",
  1977. messageSends: ["comment"],
  1978. referencedClasses: []
  1979. }),
  1980. globals.Browser);
  1981. smalltalk.addMethod(
  1982. smalltalk.method({
  1983. selector: "classDeclarationSource",
  1984. protocol: 'accessing',
  1985. fn: function (){
  1986. var self=this;
  1987. var stream;
  1988. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  1989. return smalltalk.withContext(function($ctx1) {
  1990. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$11,$12,$13;
  1991. stream=""._writeStream();
  1992. $1=self["@selectedClass"];
  1993. if(($receiver = $1) == nil || $receiver == null){
  1994. $2=self._classDeclarationTemplate();
  1995. return $2;
  1996. } else {
  1997. $1;
  1998. };
  1999. $3=stream;
  2000. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  2001. $ctx1.sendIdx["nextPutAll:"]=1;
  2002. _st($3)._nextPutAll_(" subclass: #");
  2003. $ctx1.sendIdx["nextPutAll:"]=2;
  2004. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2005. $ctx1.sendIdx["nextPutAll:"]=3;
  2006. $4=$3;
  2007. $6=_st($String())._lf();
  2008. $ctx1.sendIdx["lf"]=1;
  2009. $7=_st($String())._tab();
  2010. $ctx1.sendIdx["tab"]=1;
  2011. $5=_st($6).__comma($7);
  2012. $ctx1.sendIdx[","]=1;
  2013. _st($4)._nextPutAll_($5);
  2014. $ctx1.sendIdx["nextPutAll:"]=4;
  2015. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2016. $ctx1.sendIdx["nextPutAll:"]=5;
  2017. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2018. return smalltalk.withContext(function($ctx2) {
  2019. return _st(stream)._nextPutAll_(each);
  2020. $ctx2.sendIdx["nextPutAll:"]=6;
  2021. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2022. return smalltalk.withContext(function($ctx2) {
  2023. return _st(stream)._nextPutAll_(" ");
  2024. $ctx2.sendIdx["nextPutAll:"]=7;
  2025. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2026. $9=stream;
  2027. $10=$9;
  2028. $11=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
  2029. $ctx1.sendIdx[","]=2;
  2030. _st($10)._nextPutAll_($11);
  2031. $ctx1.sendIdx["nextPutAll:"]=8;
  2032. _st($9)._nextPutAll_("package: '");
  2033. $ctx1.sendIdx["nextPutAll:"]=9;
  2034. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2035. $ctx1.sendIdx["nextPutAll:"]=10;
  2036. $12=_st($9)._nextPutAll_("'");
  2037. $13=_st(stream)._contents();
  2038. return $13;
  2039. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},globals.Browser)})},
  2040. args: [],
  2041. source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [ ^ self classDeclarationTemplate ].\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass superclass asString;\x0a\x09\x09nextPutAll: ' subclass: #';\x0a\x09\x09nextPutAll: selectedClass name;\x0a\x09\x09nextPutAll: String lf, String tab;\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream\x0a\x09\x09nextPutAll: '''', String lf, String tab;\x0a\x09\x09nextPutAll: 'package: ''';\x0a\x09\x09nextPutAll: selectedClass category;\x0a\x09\x09nextPutAll: ''''.\x0a\x09^ stream contents",
  2042. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2043. referencedClasses: ["String"]
  2044. }),
  2045. globals.Browser);
  2046. smalltalk.addMethod(
  2047. smalltalk.method({
  2048. selector: "classDeclarationTemplate",
  2049. protocol: 'accessing',
  2050. fn: function (){
  2051. var self=this;
  2052. return smalltalk.withContext(function($ctx1) {
  2053. var $1;
  2054. $1=_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2055. $ctx1.sendIdx[","]=1;
  2056. return $1;
  2057. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},globals.Browser)})},
  2058. args: [],
  2059. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2060. messageSends: [",", "selectedPackage"],
  2061. referencedClasses: []
  2062. }),
  2063. globals.Browser);
  2064. smalltalk.addMethod(
  2065. smalltalk.method({
  2066. selector: "classes",
  2067. protocol: 'accessing',
  2068. fn: function (){
  2069. var self=this;
  2070. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2071. return smalltalk.withContext(function($ctx1) {
  2072. var $2,$1;
  2073. $1=_st(_st(_st(_st($Smalltalk())._classes())._select_((function(each){
  2074. return smalltalk.withContext(function($ctx2) {
  2075. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2076. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2077. return smalltalk.withContext(function($ctx2) {
  2078. $2=_st(a)._name();
  2079. $ctx2.sendIdx["name"]=1;
  2080. return _st($2).__lt(_st(b)._name());
  2081. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2082. return $1;
  2083. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.Browser)})},
  2084. args: [],
  2085. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  2086. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"],
  2087. referencedClasses: ["Smalltalk"]
  2088. }),
  2089. globals.Browser);
  2090. smalltalk.addMethod(
  2091. smalltalk.method({
  2092. selector: "commitPackage",
  2093. protocol: 'actions',
  2094. fn: function (){
  2095. var self=this;
  2096. function $Package(){return globals.Package||(typeof Package=="undefined"?nil:Package)}
  2097. return smalltalk.withContext(function($ctx1) {
  2098. var $1;
  2099. $1=self["@selectedPackage"];
  2100. if(($receiver = $1) == nil || $receiver == null){
  2101. $1;
  2102. } else {
  2103. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2104. };
  2105. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},globals.Browser)})},
  2106. args: [],
  2107. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2108. messageSends: ["ifNotNil:", "commit", "named:"],
  2109. referencedClasses: ["Package"]
  2110. }),
  2111. globals.Browser);
  2112. smalltalk.addMethod(
  2113. smalltalk.method({
  2114. selector: "compile",
  2115. protocol: 'actions',
  2116. fn: function (){
  2117. var self=this;
  2118. var currentEditLine;
  2119. return smalltalk.withContext(function($ctx1) {
  2120. var $1,$2,$3,$5,$4;
  2121. self._disableSaveButton();
  2122. $1=_st(self["@sourceArea"])._editor();
  2123. $ctx1.sendIdx["editor"]=1;
  2124. currentEditLine=_st($1)._getCursor();
  2125. $2=_st(self["@selectedTab"]).__eq("comment");
  2126. if(smalltalk.assert($2)){
  2127. $3=self["@selectedClass"];
  2128. if(($receiver = $3) == nil || $receiver == null){
  2129. $3;
  2130. } else {
  2131. self._compileClassComment();
  2132. };
  2133. } else {
  2134. $5=_st(self["@selectedProtocol"])._notNil();
  2135. $ctx1.sendIdx["notNil"]=1;
  2136. $4=_st($5)._or_((function(){
  2137. return smalltalk.withContext(function($ctx2) {
  2138. return _st(self["@selectedMethod"])._notNil();
  2139. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2140. if(smalltalk.assert($4)){
  2141. self._compileMethodDefinition();
  2142. } else {
  2143. self._compileDefinition();
  2144. };
  2145. };
  2146. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  2147. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},globals.Browser)})},
  2148. args: [],
  2149. source: "compile\x0a\x09| currentEditLine |\x0a\x09self disableSaveButton.\x0a\x09currentEditLine := sourceArea editor getCursor.\x0a\x09selectedTab = #comment\x0a\x09ifTrue: [\x0a\x09\x09\x09selectedClass ifNotNil: [\x0a\x09\x09\x09\x09self compileClassComment ]]\x0a\x09ifFalse: [\x0a\x09\x09\x09(selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09ifFalse: [ self compileDefinition ]\x0a\x09\x09\x09\x09ifTrue: [ self compileMethodDefinition ]].\x0a\x09sourceArea editor setCursor: currentEditLine.",
  2150. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2151. referencedClasses: []
  2152. }),
  2153. globals.Browser);
  2154. smalltalk.addMethod(
  2155. smalltalk.method({
  2156. selector: "compileClassComment",
  2157. protocol: 'actions',
  2158. fn: function (){
  2159. var self=this;
  2160. return smalltalk.withContext(function($ctx1) {
  2161. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2162. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},globals.Browser)})},
  2163. args: [],
  2164. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2165. messageSends: ["comment:", "val"],
  2166. referencedClasses: []
  2167. }),
  2168. globals.Browser);
  2169. smalltalk.addMethod(
  2170. smalltalk.method({
  2171. selector: "compileDefinition",
  2172. protocol: 'actions',
  2173. fn: function (){
  2174. var self=this;
  2175. var newClass;
  2176. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2177. return smalltalk.withContext(function($ctx1) {
  2178. var $1;
  2179. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2180. self._resetClassesList();
  2181. self._updateCategoriesList();
  2182. $1=self._updateClassesList();
  2183. self._selectClass_(newClass);
  2184. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},globals.Browser)})},
  2185. args: [],
  2186. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2187. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2188. referencedClasses: ["Compiler"]
  2189. }),
  2190. globals.Browser);
  2191. smalltalk.addMethod(
  2192. smalltalk.method({
  2193. selector: "compileMethodDefinition",
  2194. protocol: 'actions',
  2195. fn: function (){
  2196. var self=this;
  2197. return smalltalk.withContext(function($ctx1) {
  2198. var $1;
  2199. $1=_st(self["@selectedTab"]).__eq("instance");
  2200. if(smalltalk.assert($1)){
  2201. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2202. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2203. } else {
  2204. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2205. };
  2206. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},globals.Browser)})},
  2207. args: [],
  2208. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  2209. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2210. referencedClasses: []
  2211. }),
  2212. globals.Browser);
  2213. smalltalk.addMethod(
  2214. smalltalk.method({
  2215. selector: "compileMethodDefinitionFor:",
  2216. protocol: 'actions',
  2217. fn: function (aClass){
  2218. var self=this;
  2219. var compiler,method,source,node;
  2220. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2221. function $PlatformInterface(){return globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2222. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2223. return smalltalk.withContext(function($ctx1) {
  2224. var $1,$2,$6,$5,$4,$3,$7,$9,$8,$10;
  2225. var $early={};
  2226. try {
  2227. source=_st(self["@sourceArea"])._val();
  2228. $1=self["@selectedProtocol"];
  2229. if(($receiver = $1) == nil || $receiver == null){
  2230. self["@selectedProtocol"]=_st(self["@selectedMethod"])._protocol();
  2231. self["@selectedProtocol"];
  2232. } else {
  2233. $1;
  2234. };
  2235. compiler=_st($Compiler())._new();
  2236. $ctx1.sendIdx["new"]=1;
  2237. _st(compiler)._source_(source);
  2238. node=_st(compiler)._parse_(source);
  2239. $2=_st(node)._isParseFailure();
  2240. if(smalltalk.assert($2)){
  2241. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2242. $ctx1.sendIdx[","]=3;
  2243. $5=_st($6).__comma(", position: ");
  2244. $ctx1.sendIdx[","]=2;
  2245. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2246. $ctx1.sendIdx[","]=1;
  2247. $3=self._alert_($4);
  2248. return $3;
  2249. };
  2250. _st(compiler)._currentClass_(aClass);
  2251. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2252. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2253. return smalltalk.withContext(function($ctx2) {
  2254. $7=_st($PlatformInterface())._existsGlobal_(each);
  2255. if(! smalltalk.assert($7)){
  2256. $9=_st("Declare '".__comma(each)).__comma("' as instance variable?");
  2257. $ctx2.sendIdx[","]=4;
  2258. $8=self._confirm_($9);
  2259. if(smalltalk.assert($8)){
  2260. self._addInstanceVariableNamed_toClass_(each,aClass);
  2261. $10=self._compileMethodDefinitionFor_(aClass);
  2262. throw $early=[$10];
  2263. };
  2264. };
  2265. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2266. _st(_st($ClassBuilder())._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  2267. self._updateMethodsList();
  2268. self._selectMethod_(method);
  2269. return self}
  2270. catch(e) {if(e===$early)return e[0]; throw e}
  2271. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},globals.Browser)})},
  2272. args: ["aClass"],
  2273. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler method source node |\x0a\x09source := sourceArea val.\x0a\x09selectedProtocol ifNil: [ selectedProtocol := selectedMethod protocol ].\x0a\x09compiler := Compiler new.\x0a\x09compiler source: source.\x0a\x09node := compiler parse: source.\x0a\x09node isParseFailure ifTrue: [\x0a\x09^ self alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09compiler currentClass: aClass.\x0a\x09method := compiler eval: (compiler compileNode: node).\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(PlatformInterface existsGlobal: each) ifFalse: [\x0a\x09\x09(self confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^ self compileMethodDefinitionFor: aClass ]] ].\x0a\x09ClassBuilder new installMethod: method forClass: aClass protocol: selectedProtocol.\x0a\x09self updateMethodsList.\x0a\x09self selectMethod: method",
  2274. messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "currentClass:", "eval:", "compileNode:", "do:", "unknownVariables", "ifFalse:", "existsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"],
  2275. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2276. }),
  2277. globals.Browser);
  2278. smalltalk.addMethod(
  2279. smalltalk.method({
  2280. selector: "copyClass",
  2281. protocol: 'actions',
  2282. fn: function (){
  2283. var self=this;
  2284. var className;
  2285. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2286. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2287. return smalltalk.withContext(function($ctx1) {
  2288. var $1,$2;
  2289. className=self._prompt_("Copy class");
  2290. $1=_st(_st(className)._notNil())._and_((function(){
  2291. return smalltalk.withContext(function($ctx2) {
  2292. return _st(className)._notEmpty();
  2293. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2294. if(smalltalk.assert($1)){
  2295. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2296. self._resetClassesList();
  2297. $2=self._updateClassesList();
  2298. $2;
  2299. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  2300. };
  2301. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},globals.Browser)})},
  2302. args: [],
  2303. source: "copyClass\x0a\x09| className |\x0a\x09className := self prompt: 'Copy class'.\x0a\x09(className notNil and: [ className notEmpty ]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a\x09\x09\x09self\x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk globals at: className) ]",
  2304. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  2305. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2306. }),
  2307. globals.Browser);
  2308. smalltalk.addMethod(
  2309. smalltalk.method({
  2310. selector: "declarationSource",
  2311. protocol: 'accessing',
  2312. fn: function (){
  2313. var self=this;
  2314. return smalltalk.withContext(function($ctx1) {
  2315. var $2,$1;
  2316. $2=_st(self["@selectedTab"]).__eq("instance");
  2317. if(smalltalk.assert($2)){
  2318. $1=self._classDeclarationSource();
  2319. } else {
  2320. $1=self._metaclassDeclarationSource();
  2321. };
  2322. return $1;
  2323. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},globals.Browser)})},
  2324. args: [],
  2325. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  2326. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2327. referencedClasses: []
  2328. }),
  2329. globals.Browser);
  2330. smalltalk.addMethod(
  2331. smalltalk.method({
  2332. selector: "disableSaveButton",
  2333. protocol: 'actions',
  2334. fn: function (){
  2335. var self=this;
  2336. return smalltalk.withContext(function($ctx1) {
  2337. var $1;
  2338. $1=self["@saveButton"];
  2339. if(($receiver = $1) == nil || $receiver == null){
  2340. $1;
  2341. } else {
  2342. _st(self["@saveButton"])._at_put_("disabled",true);
  2343. };
  2344. self["@unsavedChanges"]=false;
  2345. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},globals.Browser)})},
  2346. args: [],
  2347. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  2348. messageSends: ["ifNotNil:", "at:put:"],
  2349. referencedClasses: []
  2350. }),
  2351. globals.Browser);
  2352. smalltalk.addMethod(
  2353. smalltalk.method({
  2354. selector: "dummyMethodSource",
  2355. protocol: 'accessing',
  2356. fn: function (){
  2357. var self=this;
  2358. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2359. },
  2360. args: [],
  2361. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2362. messageSends: [],
  2363. referencedClasses: []
  2364. }),
  2365. globals.Browser);
  2366. smalltalk.addMethod(
  2367. smalltalk.method({
  2368. selector: "handleSourceAreaKeyDown:",
  2369. protocol: 'actions',
  2370. fn: function (anEvent){
  2371. var self=this;
  2372. if(anEvent.ctrlKey) {
  2373. if(anEvent.keyCode === 83) { //ctrl+s
  2374. self._compile();
  2375. anEvent.preventDefault();
  2376. return false;
  2377. }
  2378. }
  2379. ;
  2380. return self},
  2381. args: ["anEvent"],
  2382. 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>",
  2383. messageSends: [],
  2384. referencedClasses: []
  2385. }),
  2386. globals.Browser);
  2387. smalltalk.addMethod(
  2388. smalltalk.method({
  2389. selector: "hideClassButtons",
  2390. protocol: 'actions',
  2391. fn: function (){
  2392. var self=this;
  2393. return smalltalk.withContext(function($ctx1) {
  2394. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2395. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},globals.Browser)})},
  2396. args: [],
  2397. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2398. messageSends: ["hide", "asJQuery"],
  2399. referencedClasses: []
  2400. }),
  2401. globals.Browser);
  2402. smalltalk.addMethod(
  2403. smalltalk.method({
  2404. selector: "hideMethodButtons",
  2405. protocol: 'actions',
  2406. fn: function (){
  2407. var self=this;
  2408. return smalltalk.withContext(function($ctx1) {
  2409. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2410. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},globals.Browser)})},
  2411. args: [],
  2412. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2413. messageSends: ["hide", "asJQuery"],
  2414. referencedClasses: []
  2415. }),
  2416. globals.Browser);
  2417. smalltalk.addMethod(
  2418. smalltalk.method({
  2419. selector: "initialize",
  2420. protocol: 'initialization',
  2421. fn: function (){
  2422. var self=this;
  2423. return smalltalk.withContext(function($ctx1) {
  2424. globals.Browser.superclass.fn.prototype._initialize.apply(_st(self), []);
  2425. self["@selectedTab"]="instance";
  2426. self["@selectedPackage"]=_st(self._packages())._first();
  2427. self["@unsavedChanges"]=false;
  2428. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Browser)})},
  2429. args: [],
  2430. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2431. messageSends: ["initialize", "first", "packages"],
  2432. referencedClasses: []
  2433. }),
  2434. globals.Browser);
  2435. smalltalk.addMethod(
  2436. smalltalk.method({
  2437. selector: "label",
  2438. protocol: 'accessing',
  2439. fn: function (){
  2440. var self=this;
  2441. return smalltalk.withContext(function($ctx1) {
  2442. var $2,$1;
  2443. $2=self["@selectedClass"];
  2444. if(($receiver = $2) == nil || $receiver == null){
  2445. $1="Browser (nil)";
  2446. } else {
  2447. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2448. };
  2449. return $1;
  2450. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.Browser)})},
  2451. args: [],
  2452. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  2453. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2454. referencedClasses: []
  2455. }),
  2456. globals.Browser);
  2457. smalltalk.addMethod(
  2458. smalltalk.method({
  2459. selector: "metaclassDeclarationSource",
  2460. protocol: 'accessing',
  2461. fn: function (){
  2462. var self=this;
  2463. var stream;
  2464. return smalltalk.withContext(function($ctx1) {
  2465. var $1,$2,$3,$4;
  2466. stream=""._writeStream();
  2467. $1=self["@selectedClass"];
  2468. if(($receiver = $1) == nil || $receiver == null){
  2469. $1;
  2470. } else {
  2471. $2=stream;
  2472. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2473. $ctx1.sendIdx["nextPutAll:"]=1;
  2474. _st($2)._nextPutAll_(" class ");
  2475. $ctx1.sendIdx["nextPutAll:"]=2;
  2476. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2477. $ctx1.sendIdx["nextPutAll:"]=3;
  2478. $3;
  2479. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2480. return smalltalk.withContext(function($ctx2) {
  2481. return _st(stream)._nextPutAll_(each);
  2482. $ctx2.sendIdx["nextPutAll:"]=4;
  2483. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2484. return smalltalk.withContext(function($ctx2) {
  2485. return _st(stream)._nextPutAll_(" ");
  2486. $ctx2.sendIdx["nextPutAll:"]=5;
  2487. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2488. _st(stream)._nextPutAll_("'");
  2489. };
  2490. $4=_st(stream)._contents();
  2491. return $4;
  2492. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},globals.Browser)})},
  2493. args: [],
  2494. source: "metaclassDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNotNil: [\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass asString;\x0a\x09\x09nextPutAll: ' class ';\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream nextPutAll: '''' ].\x0a\x09^ stream contents",
  2495. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2496. referencedClasses: []
  2497. }),
  2498. globals.Browser);
  2499. smalltalk.addMethod(
  2500. smalltalk.method({
  2501. selector: "methodSource",
  2502. protocol: 'accessing',
  2503. fn: function (){
  2504. var self=this;
  2505. return smalltalk.withContext(function($ctx1) {
  2506. var $2,$1;
  2507. $2=self["@selectedMethod"];
  2508. if(($receiver = $2) == nil || $receiver == null){
  2509. $1=self._dummyMethodSource();
  2510. } else {
  2511. $1=_st(self["@selectedMethod"])._source();
  2512. };
  2513. return $1;
  2514. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},globals.Browser)})},
  2515. args: [],
  2516. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  2517. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2518. referencedClasses: []
  2519. }),
  2520. globals.Browser);
  2521. smalltalk.addMethod(
  2522. smalltalk.method({
  2523. selector: "methods",
  2524. protocol: 'accessing',
  2525. fn: function (){
  2526. var self=this;
  2527. var klass;
  2528. return smalltalk.withContext(function($ctx1) {
  2529. var $1,$2,$3,$4,$7,$8,$6,$9,$5;
  2530. $1=_st(self["@selectedTab"]).__eq("comment");
  2531. $ctx1.sendIdx["="]=1;
  2532. if(smalltalk.assert($1)){
  2533. $2=[];
  2534. return $2;
  2535. };
  2536. $3=self["@selectedClass"];
  2537. if(($receiver = $3) == nil || $receiver == null){
  2538. $3;
  2539. } else {
  2540. $4=_st(self["@selectedTab"]).__eq("instance");
  2541. if(smalltalk.assert($4)){
  2542. klass=self["@selectedClass"];
  2543. } else {
  2544. klass=_st(self["@selectedClass"])._class();
  2545. };
  2546. klass;
  2547. };
  2548. $7=self["@selectedProtocol"];
  2549. if(($receiver = $7) == nil || $receiver == null){
  2550. $8=klass;
  2551. if(($receiver = $8) == nil || $receiver == null){
  2552. $6=[];
  2553. } else {
  2554. $6=_st(_st(klass)._methodDictionary())._values();
  2555. };
  2556. } else {
  2557. $6=_st(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  2558. };
  2559. $5=_st($6)._sort_((function(a,b){
  2560. return smalltalk.withContext(function($ctx2) {
  2561. $9=_st(a)._selector();
  2562. $ctx2.sendIdx["selector"]=1;
  2563. return _st($9).__lt(_st(b)._selector());
  2564. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)})}));
  2565. return $5;
  2566. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},globals.Browser)})},
  2567. args: [],
  2568. source: "methods\x0a\x09| klass |\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ]].\x0a\x09^ (selectedProtocol\x0a\x09ifNil: [\x0a\x09\x09klass\x0a\x09\x09ifNil: [ #() ]\x0a\x09\x09ifNotNil: [ klass methodDictionary values ]]\x0a\x09ifNotNil: [\x0a\x09\x09klass methodsInProtocol: selectedProtocol ]) \x0a\x09\x09\x09\x09sort: [ :a :b | a selector < b selector ]",
  2569. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"],
  2570. referencedClasses: []
  2571. }),
  2572. globals.Browser);
  2573. smalltalk.addMethod(
  2574. smalltalk.method({
  2575. selector: "packages",
  2576. protocol: 'accessing',
  2577. fn: function (){
  2578. var self=this;
  2579. var packages;
  2580. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2581. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2582. return smalltalk.withContext(function($ctx1) {
  2583. var $2,$3,$1,$4;
  2584. packages=_st($Array())._new();
  2585. _st(_st($Smalltalk())._classes())._do_((function(each){
  2586. return smalltalk.withContext(function($ctx2) {
  2587. $2=packages;
  2588. $3=_st(each)._category();
  2589. $ctx2.sendIdx["category"]=1;
  2590. $1=_st($2)._includes_($3);
  2591. if(! smalltalk.assert($1)){
  2592. return _st(packages)._add_(_st(each)._category());
  2593. };
  2594. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2595. $4=_st(packages)._sort();
  2596. return $4;
  2597. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.Browser)})},
  2598. args: [],
  2599. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09Smalltalk classes do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  2600. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"],
  2601. referencedClasses: ["Array", "Smalltalk"]
  2602. }),
  2603. globals.Browser);
  2604. smalltalk.addMethod(
  2605. smalltalk.method({
  2606. selector: "protocols",
  2607. protocol: 'accessing',
  2608. fn: function (){
  2609. var self=this;
  2610. var klass;
  2611. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2612. return smalltalk.withContext(function($ctx1) {
  2613. var $1,$2,$3,$4,$5,$6,$7,$8;
  2614. $1=self["@selectedClass"];
  2615. if(($receiver = $1) == nil || $receiver == null){
  2616. $1;
  2617. } else {
  2618. $2=_st(self["@selectedTab"]).__eq("comment");
  2619. $ctx1.sendIdx["="]=1;
  2620. if(smalltalk.assert($2)){
  2621. $3=[];
  2622. return $3;
  2623. };
  2624. $4=_st(self["@selectedTab"]).__eq("instance");
  2625. if(smalltalk.assert($4)){
  2626. klass=self["@selectedClass"];
  2627. } else {
  2628. klass=_st(self["@selectedClass"])._class();
  2629. };
  2630. klass;
  2631. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2632. if(smalltalk.assert($5)){
  2633. $6=_st($Array())._with_("not yet classified");
  2634. return $6;
  2635. };
  2636. $7=_st(klass)._protocols();
  2637. return $7;
  2638. };
  2639. $8=_st($Array())._new();
  2640. return $8;
  2641. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},globals.Browser)})},
  2642. args: [],
  2643. source: "protocols\x0a\x09| klass |\x0a\x09selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ].\x0a\x09klass methodDictionary isEmpty ifTrue: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  2644. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  2645. referencedClasses: ["Array"]
  2646. }),
  2647. globals.Browser);
  2648. smalltalk.addMethod(
  2649. smalltalk.method({
  2650. selector: "removeClass",
  2651. protocol: 'actions',
  2652. fn: function (){
  2653. var self=this;
  2654. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2655. return smalltalk.withContext(function($ctx1) {
  2656. var $2,$1;
  2657. $2=_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?");
  2658. $ctx1.sendIdx[","]=1;
  2659. $1=self._confirm_($2);
  2660. if(smalltalk.assert($1)){
  2661. _st($Smalltalk())._removeClass_(self["@selectedClass"]);
  2662. self._resetClassesList();
  2663. self._selectClass_(nil);
  2664. };
  2665. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},globals.Browser)})},
  2666. args: [],
  2667. source: "removeClass\x0a\x09(self confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk removeClass: selectedClass.\x0a\x09\x09self resetClassesList.\x0a\x09\x09self selectClass: nil ]",
  2668. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"],
  2669. referencedClasses: ["Smalltalk"]
  2670. }),
  2671. globals.Browser);
  2672. smalltalk.addMethod(
  2673. smalltalk.method({
  2674. selector: "removeMethod",
  2675. protocol: 'actions',
  2676. fn: function (){
  2677. var self=this;
  2678. return smalltalk.withContext(function($ctx1) {
  2679. var $1,$3,$2,$4;
  2680. $1=self._cancelChanges();
  2681. if(smalltalk.assert($1)){
  2682. $3=_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?");
  2683. $ctx1.sendIdx[","]=1;
  2684. $2=self._confirm_($3);
  2685. if(smalltalk.assert($2)){
  2686. $4=_st(self["@selectedTab"]).__eq("instance");
  2687. if(smalltalk.assert($4)){
  2688. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2689. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  2690. } else {
  2691. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2692. };
  2693. self._selectMethod_(nil);
  2694. };
  2695. };
  2696. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},globals.Browser)})},
  2697. args: [],
  2698. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [ selectedClass removeCompiledMethod: selectedMethod ]\x0a\x09\x09\x09ifFalse: [ selectedClass class removeCompiledMethod: selectedMethod ].\x0a\x09\x09self selectMethod: nil ]]",
  2699. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  2700. referencedClasses: []
  2701. }),
  2702. globals.Browser);
  2703. smalltalk.addMethod(
  2704. smalltalk.method({
  2705. selector: "removePackage",
  2706. protocol: 'actions',
  2707. fn: function (){
  2708. var self=this;
  2709. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2710. return smalltalk.withContext(function($ctx1) {
  2711. var $2,$1;
  2712. $2=_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  2713. $ctx1.sendIdx[","]=1;
  2714. $1=self._confirm_($2);
  2715. if(smalltalk.assert($1)){
  2716. _st($Smalltalk())._removePackage_(self["@selectedPackage"]);
  2717. self._updateCategoriesList();
  2718. };
  2719. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},globals.Browser)})},
  2720. args: [],
  2721. source: "removePackage\x0a\x0a\x09(self confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09\x09Smalltalk removePackage: selectedPackage.\x0a\x09\x09self updateCategoriesList ]",
  2722. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"],
  2723. referencedClasses: ["Smalltalk"]
  2724. }),
  2725. globals.Browser);
  2726. smalltalk.addMethod(
  2727. smalltalk.method({
  2728. selector: "renameClass",
  2729. protocol: 'actions',
  2730. fn: function (){
  2731. var self=this;
  2732. var newName;
  2733. return smalltalk.withContext(function($ctx1) {
  2734. var $1,$2;
  2735. newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
  2736. $1=_st(_st(newName)._notNil())._and_((function(){
  2737. return smalltalk.withContext(function($ctx2) {
  2738. return _st(newName)._notEmpty();
  2739. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2740. if(smalltalk.assert($1)){
  2741. _st(self["@selectedClass"])._rename_(newName);
  2742. self._updateClassesList();
  2743. $2=self._updateSourceAndButtons();
  2744. $2;
  2745. };
  2746. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},globals.Browser)})},
  2747. args: [],
  2748. source: "renameClass\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename class ', selectedClass name.\x0a\x09(newName notNil and: [ newName notEmpty ]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons ]",
  2749. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  2750. referencedClasses: []
  2751. }),
  2752. globals.Browser);
  2753. smalltalk.addMethod(
  2754. smalltalk.method({
  2755. selector: "renamePackage",
  2756. protocol: 'actions',
  2757. fn: function (){
  2758. var self=this;
  2759. var newName;
  2760. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2761. return smalltalk.withContext(function($ctx1) {
  2762. var $1,$2;
  2763. newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  2764. $1=newName;
  2765. if(($receiver = $1) == nil || $receiver == null){
  2766. $1;
  2767. } else {
  2768. $2=_st(newName)._notEmpty();
  2769. if(smalltalk.assert($2)){
  2770. _st($Smalltalk())._renamePackage_to_(self["@selectedPackage"],newName);
  2771. self._updateCategoriesList();
  2772. };
  2773. };
  2774. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},globals.Browser)})},
  2775. args: [],
  2776. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := self prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  2777. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "updateCategoriesList"],
  2778. referencedClasses: ["Smalltalk"]
  2779. }),
  2780. globals.Browser);
  2781. smalltalk.addMethod(
  2782. smalltalk.method({
  2783. selector: "renderBottomPanelOn:",
  2784. protocol: 'rendering',
  2785. fn: function (html){
  2786. var self=this;
  2787. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2788. return smalltalk.withContext(function($ctx1) {
  2789. var $1,$2;
  2790. $1=_st(html)._div();
  2791. _st($1)._class_("amber_sourceCode");
  2792. $2=_st($1)._with_((function(){
  2793. return smalltalk.withContext(function($ctx2) {
  2794. self["@sourceArea"]=_st($SourceArea())._new();
  2795. self["@sourceArea"];
  2796. _st(self["@sourceArea"])._renderOn_(html);
  2797. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2798. return smalltalk.withContext(function($ctx3) {
  2799. return self._handleSourceAreaKeyDown_(e);
  2800. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)})}));
  2801. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2802. return smalltalk.withContext(function($ctx3) {
  2803. return self._updateStatus();
  2804. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2805. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2806. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Browser)})},
  2807. args: ["html"],
  2808. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new.\x0a\x09\x09sourceArea renderOn: html.\x0a\x09\x09\x09sourceArea onKeyDown: [ :e |\x0a\x09\x09\x09\x09self handleSourceAreaKeyDown: e ].\x0a\x09\x09sourceArea onKeyUp: [ self updateStatus ]]",
  2809. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
  2810. referencedClasses: ["SourceArea"]
  2811. }),
  2812. globals.Browser);
  2813. smalltalk.addMethod(
  2814. smalltalk.method({
  2815. selector: "renderBoxOn:",
  2816. protocol: 'rendering',
  2817. fn: function (html){
  2818. var self=this;
  2819. return smalltalk.withContext(function($ctx1) {
  2820. var $1;
  2821. self._renderTopPanelOn_(html);
  2822. self._renderTabsOn_(html);
  2823. $1=self._renderBottomPanelOn_(html);
  2824. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Browser)})},
  2825. args: ["html"],
  2826. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2827. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2828. referencedClasses: []
  2829. }),
  2830. globals.Browser);
  2831. smalltalk.addMethod(
  2832. smalltalk.method({
  2833. selector: "renderButtonsOn:",
  2834. protocol: 'rendering',
  2835. fn: function (html){
  2836. var self=this;
  2837. return smalltalk.withContext(function($ctx1) {
  2838. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2839. self["@saveButton"]=_st(html)._button();
  2840. $ctx1.sendIdx["button"]=1;
  2841. $1=self["@saveButton"];
  2842. _st($1)._with_("Save");
  2843. $ctx1.sendIdx["with:"]=1;
  2844. $2=_st($1)._onClick_((function(){
  2845. return smalltalk.withContext(function($ctx2) {
  2846. return self._compile();
  2847. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2848. $ctx1.sendIdx["onClick:"]=1;
  2849. self["@methodButtons"]=_st(html)._span();
  2850. $ctx1.sendIdx["span"]=1;
  2851. self["@classButtons"]=_st(html)._span();
  2852. $3=_st(html)._div();
  2853. _st($3)._class_("right");
  2854. $4=_st($3)._with_((function(){
  2855. return smalltalk.withContext(function($ctx2) {
  2856. $5=_st(html)._button();
  2857. $ctx2.sendIdx["button"]=2;
  2858. _st($5)._with_("DoIt");
  2859. $ctx2.sendIdx["with:"]=3;
  2860. $6=_st($5)._onClick_((function(){
  2861. return smalltalk.withContext(function($ctx3) {
  2862. return _st(self["@sourceArea"])._doIt();
  2863. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2864. $ctx2.sendIdx["onClick:"]=2;
  2865. $6;
  2866. $7=_st(html)._button();
  2867. $ctx2.sendIdx["button"]=3;
  2868. _st($7)._with_("PrintIt");
  2869. $ctx2.sendIdx["with:"]=4;
  2870. $8=_st($7)._onClick_((function(){
  2871. return smalltalk.withContext(function($ctx3) {
  2872. return _st(self["@sourceArea"])._printIt();
  2873. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2874. $ctx2.sendIdx["onClick:"]=3;
  2875. $8;
  2876. $9=_st(html)._button();
  2877. _st($9)._with_("InspectIt");
  2878. $10=_st($9)._onClick_((function(){
  2879. return smalltalk.withContext(function($ctx3) {
  2880. return _st(self["@sourceArea"])._inspectIt();
  2881. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  2882. return $10;
  2883. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2884. $ctx1.sendIdx["with:"]=2;
  2885. self._updateSourceAndButtons();
  2886. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Browser)})},
  2887. args: ["html"],
  2888. source: "renderButtonsOn: html\x0a\x09saveButton := html button.\x0a\x09saveButton\x0a\x09with: 'Save';\x0a\x09onClick: [ self compile ].\x0a\x09methodButtons := html span.\x0a\x09classButtons := html span.\x0a\x09html div\x0a\x09class: 'right';\x0a\x09with: [\x0a\x09\x09html button\x0a\x09\x09\x09with: 'DoIt';\x0a\x09\x09\x09onClick: [ sourceArea doIt ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'PrintIt';\x0a\x09\x09\x09onClick: [ sourceArea printIt ].\x0a\x09\x09html button with: 'InspectIt';\x0a\x09\x09\x09onClick: [ sourceArea inspectIt ]].\x0a\x09self updateSourceAndButtons",
  2889. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
  2890. referencedClasses: []
  2891. }),
  2892. globals.Browser);
  2893. smalltalk.addMethod(
  2894. smalltalk.method({
  2895. selector: "renderTabsOn:",
  2896. protocol: 'rendering',
  2897. fn: function (html){
  2898. var self=this;
  2899. return smalltalk.withContext(function($ctx1) {
  2900. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2901. self._updateTabsList();
  2902. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},globals.Browser)})},
  2903. args: ["html"],
  2904. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  2905. messageSends: ["class:", "ul", "updateTabsList"],
  2906. referencedClasses: []
  2907. }),
  2908. globals.Browser);
  2909. smalltalk.addMethod(
  2910. smalltalk.method({
  2911. selector: "renderTopPanelOn:",
  2912. protocol: 'rendering',
  2913. fn: function (html){
  2914. var self=this;
  2915. function $ClassesList(){return globals.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2916. return smalltalk.withContext(function($ctx1) {
  2917. var $1,$3,$4,$6,$7,$8,$9,$10,$11,$5,$12,$13,$2;
  2918. $1=_st(html)._div();
  2919. $ctx1.sendIdx["div"]=1;
  2920. _st($1)._class_("top");
  2921. $ctx1.sendIdx["class:"]=1;
  2922. $2=_st($1)._with_((function(){
  2923. return smalltalk.withContext(function($ctx2) {
  2924. $3=_st(html)._ul();
  2925. $ctx2.sendIdx["ul"]=1;
  2926. self["@packagesList"]=_st($3)._class_("amber_column browser packages");
  2927. $ctx2.sendIdx["class:"]=2;
  2928. self["@packagesList"];
  2929. $4=_st(html)._div();
  2930. $ctx2.sendIdx["div"]=2;
  2931. _st($4)._class_("amber_packagesButtons");
  2932. $ctx2.sendIdx["class:"]=3;
  2933. $5=_st($4)._with_((function(){
  2934. return smalltalk.withContext(function($ctx3) {
  2935. $6=_st(html)._button();
  2936. $ctx3.sendIdx["button"]=1;
  2937. _st($6)._title_("Commit classes in this package to disk");
  2938. $ctx3.sendIdx["title:"]=1;
  2939. _st($6)._onClick_((function(){
  2940. return smalltalk.withContext(function($ctx4) {
  2941. return self._commitPackage();
  2942. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  2943. $ctx3.sendIdx["onClick:"]=1;
  2944. $7=_st($6)._with_("Commit");
  2945. $ctx3.sendIdx["with:"]=3;
  2946. $7;
  2947. $8=_st(html)._button();
  2948. $ctx3.sendIdx["button"]=2;
  2949. _st($8)._title_("Rename package");
  2950. $ctx3.sendIdx["title:"]=2;
  2951. _st($8)._onClick_((function(){
  2952. return smalltalk.withContext(function($ctx4) {
  2953. return self._renamePackage();
  2954. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  2955. $ctx3.sendIdx["onClick:"]=2;
  2956. $9=_st($8)._with_("Rename");
  2957. $ctx3.sendIdx["with:"]=4;
  2958. $9;
  2959. $10=_st(html)._button();
  2960. _st($10)._title_("Remove this package from the system");
  2961. _st($10)._onClick_((function(){
  2962. return smalltalk.withContext(function($ctx4) {
  2963. return self._removePackage();
  2964. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  2965. $11=_st($10)._with_("Remove");
  2966. return $11;
  2967. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  2968. $ctx2.sendIdx["with:"]=2;
  2969. $5;
  2970. self["@classesList"]=_st($ClassesList())._on_(self);
  2971. self["@classesList"];
  2972. _st(self["@classesList"])._renderOn_(html);
  2973. $12=_st(html)._ul();
  2974. $ctx2.sendIdx["ul"]=2;
  2975. self["@protocolsList"]=_st($12)._class_("amber_column browser protocols");
  2976. $ctx2.sendIdx["class:"]=4;
  2977. self["@protocolsList"];
  2978. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2979. $ctx2.sendIdx["class:"]=5;
  2980. self["@methodsList"];
  2981. self._updateCategoriesList();
  2982. self._updateClassesList();
  2983. self._updateProtocolsList();
  2984. $13=self._updateMethodsList();
  2985. $13;
  2986. return _st(_st(html)._div())._class_("amber_clear");
  2987. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2988. $ctx1.sendIdx["with:"]=1;
  2989. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Browser)})},
  2990. args: ["html"],
  2991. source: "renderTopPanelOn: html\x0a\x09html div\x0a\x09\x09class: 'top';\x0a\x09\x09with: [\x0a\x09\x09\x09packagesList := html ul class: 'amber_column browser packages'.\x0a\x09\x09\x09\x09html div class: 'amber_packagesButtons'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Commit classes in this package to disk';\x0a\x09\x09\x09\x09\x09onClick: [ self commitPackage ];\x0a\x09\x09\x09\x09\x09with: 'Commit'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Rename package';\x0a\x09\x09\x09\x09\x09onClick: [ self renamePackage ];\x0a\x09\x09\x09\x09\x09with: 'Rename'.\x0a\x09\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09title: 'Remove this package from the system';\x0a\x09\x09\x09\x09\x09onClick: [ self removePackage ];\x0a\x09\x09\x09\x09\x09with: 'Remove' ].\x0a\x09\x09\x09classesList := ClassesList on: self.\x0a\x09\x09\x09classesList renderOn: html.\x0a\x09\x09\x09protocolsList := html ul class: 'amber_column browser protocols'.\x0a\x09\x09\x09methodsList := html ul class: 'amber_column browser methods'.\x0a\x09\x09\x09self\x0a\x09\x09\x09\x09updateCategoriesList;\x0a\x09\x09\x09\x09updateClassesList;\x0a\x09\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09\x09updateMethodsList.\x0a\x09\x09\x09html div class: 'amber_clear' ]",
  2992. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  2993. referencedClasses: ["ClassesList"]
  2994. }),
  2995. globals.Browser);
  2996. smalltalk.addMethod(
  2997. smalltalk.method({
  2998. selector: "resetClassesList",
  2999. protocol: 'updating',
  3000. fn: function (){
  3001. var self=this;
  3002. return smalltalk.withContext(function($ctx1) {
  3003. _st(self["@classesList"])._resetNodes();
  3004. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},globals.Browser)})},
  3005. args: [],
  3006. source: "resetClassesList\x0a\x09classesList resetNodes",
  3007. messageSends: ["resetNodes"],
  3008. referencedClasses: []
  3009. }),
  3010. globals.Browser);
  3011. smalltalk.addMethod(
  3012. smalltalk.method({
  3013. selector: "search:",
  3014. protocol: 'actions',
  3015. fn: function (aString){
  3016. var self=this;
  3017. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3018. return smalltalk.withContext(function($ctx1) {
  3019. var $1,$2;
  3020. $1=self._cancelChanges();
  3021. if(smalltalk.assert($1)){
  3022. var searchedClass;
  3023. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  3024. searchedClass;
  3025. $2=_st(searchedClass)._isClass();
  3026. if(smalltalk.assert($2)){
  3027. _st(self._class())._openOn_(searchedClass);
  3028. } else {
  3029. self._searchReferencesOf_(aString);
  3030. };
  3031. };
  3032. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.Browser)})},
  3033. args: ["aString"],
  3034. source: "search: aString\x0a\x09self cancelChanges ifTrue: [ | searchedClass |\x0a\x09\x09searchedClass := Smalltalk globals at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [ self class openOn: searchedClass ]\x0a\x09\x09\x09ifFalse: [ self searchReferencesOf: aString ]]",
  3035. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3036. referencedClasses: ["Smalltalk"]
  3037. }),
  3038. globals.Browser);
  3039. smalltalk.addMethod(
  3040. smalltalk.method({
  3041. selector: "searchClassReferences",
  3042. protocol: 'actions',
  3043. fn: function (){
  3044. var self=this;
  3045. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3046. return smalltalk.withContext(function($ctx1) {
  3047. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  3048. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},globals.Browser)})},
  3049. args: [],
  3050. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  3051. messageSends: ["search:", "name"],
  3052. referencedClasses: ["ReferencesBrowser"]
  3053. }),
  3054. globals.Browser);
  3055. smalltalk.addMethod(
  3056. smalltalk.method({
  3057. selector: "searchReferencesOf:",
  3058. protocol: 'actions',
  3059. fn: function (aString){
  3060. var self=this;
  3061. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3062. return smalltalk.withContext(function($ctx1) {
  3063. _st($ReferencesBrowser())._search_(aString);
  3064. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},globals.Browser)})},
  3065. args: ["aString"],
  3066. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  3067. messageSends: ["search:"],
  3068. referencedClasses: ["ReferencesBrowser"]
  3069. }),
  3070. globals.Browser);
  3071. smalltalk.addMethod(
  3072. smalltalk.method({
  3073. selector: "selectCategory:",
  3074. protocol: 'actions',
  3075. fn: function (aCategory){
  3076. var self=this;
  3077. return smalltalk.withContext(function($ctx1) {
  3078. var $1,$2;
  3079. $1=self._cancelChanges();
  3080. if(smalltalk.assert($1)){
  3081. self["@selectedPackage"]=aCategory;
  3082. self["@selectedPackage"];
  3083. self["@selectedMethod"]=nil;
  3084. self["@selectedProtocol"]=self["@selectedMethod"];
  3085. self["@selectedClass"]=self["@selectedProtocol"];
  3086. self["@selectedClass"];
  3087. self._resetClassesList();
  3088. self._updateCategoriesList();
  3089. self._updateClassesList();
  3090. self._updateProtocolsList();
  3091. self._updateMethodsList();
  3092. $2=self._updateSourceAndButtons();
  3093. $2;
  3094. };
  3095. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},globals.Browser)})},
  3096. args: ["aCategory"],
  3097. source: "selectCategory: aCategory\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedPackage := aCategory.\x0a\x09selectedClass := selectedProtocol := selectedMethod := nil.\x0a\x09self resetClassesList.\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3098. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3099. referencedClasses: []
  3100. }),
  3101. globals.Browser);
  3102. smalltalk.addMethod(
  3103. smalltalk.method({
  3104. selector: "selectClass:",
  3105. protocol: 'actions',
  3106. fn: function (aClass){
  3107. var self=this;
  3108. return smalltalk.withContext(function($ctx1) {
  3109. var $1,$2;
  3110. $1=self._cancelChanges();
  3111. if(smalltalk.assert($1)){
  3112. self["@selectedClass"]=aClass;
  3113. self["@selectedClass"];
  3114. self["@selectedMethod"]=nil;
  3115. self["@selectedProtocol"]=self["@selectedMethod"];
  3116. self["@selectedProtocol"];
  3117. self._updateClassesList();
  3118. self._updateProtocolsList();
  3119. self._updateMethodsList();
  3120. $2=self._updateSourceAndButtons();
  3121. $2;
  3122. };
  3123. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},globals.Browser)})},
  3124. args: ["aClass"],
  3125. source: "selectClass: aClass\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedClass := aClass.\x0a\x09selectedProtocol := selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateClassesList;\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3126. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3127. referencedClasses: []
  3128. }),
  3129. globals.Browser);
  3130. smalltalk.addMethod(
  3131. smalltalk.method({
  3132. selector: "selectMethod:",
  3133. protocol: 'actions',
  3134. fn: function (aMethod){
  3135. var self=this;
  3136. return smalltalk.withContext(function($ctx1) {
  3137. var $1,$2;
  3138. $1=self._cancelChanges();
  3139. if(smalltalk.assert($1)){
  3140. self["@selectedMethod"]=aMethod;
  3141. self["@selectedMethod"];
  3142. self._updateProtocolsList();
  3143. self._updateMethodsList();
  3144. $2=self._updateSourceAndButtons();
  3145. $2;
  3146. };
  3147. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},globals.Browser)})},
  3148. args: ["aMethod"],
  3149. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3150. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3151. referencedClasses: []
  3152. }),
  3153. globals.Browser);
  3154. smalltalk.addMethod(
  3155. smalltalk.method({
  3156. selector: "selectProtocol:",
  3157. protocol: 'actions',
  3158. fn: function (aString){
  3159. var self=this;
  3160. return smalltalk.withContext(function($ctx1) {
  3161. var $1,$2;
  3162. $1=self._cancelChanges();
  3163. if(smalltalk.assert($1)){
  3164. self["@selectedProtocol"]=aString;
  3165. self["@selectedProtocol"];
  3166. self["@selectedMethod"]=nil;
  3167. self["@selectedMethod"];
  3168. self._updateProtocolsList();
  3169. self._updateMethodsList();
  3170. $2=self._updateSourceAndButtons();
  3171. $2;
  3172. };
  3173. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},globals.Browser)})},
  3174. args: ["aString"],
  3175. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3176. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3177. referencedClasses: []
  3178. }),
  3179. globals.Browser);
  3180. smalltalk.addMethod(
  3181. smalltalk.method({
  3182. selector: "selectTab:",
  3183. protocol: 'actions',
  3184. fn: function (aString){
  3185. var self=this;
  3186. return smalltalk.withContext(function($ctx1) {
  3187. var $1;
  3188. $1=self._cancelChanges();
  3189. if(smalltalk.assert($1)){
  3190. self["@selectedTab"]=aString;
  3191. self["@selectedTab"];
  3192. self._selectProtocol_(nil);
  3193. self._updateTabsList();
  3194. };
  3195. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},globals.Browser)})},
  3196. args: ["aString"],
  3197. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  3198. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  3199. referencedClasses: []
  3200. }),
  3201. globals.Browser);
  3202. smalltalk.addMethod(
  3203. smalltalk.method({
  3204. selector: "selectedClass",
  3205. protocol: 'accessing',
  3206. fn: function (){
  3207. var self=this;
  3208. var $1;
  3209. $1=self["@selectedClass"];
  3210. return $1;
  3211. },
  3212. args: [],
  3213. source: "selectedClass\x0a\x09^ selectedClass",
  3214. messageSends: [],
  3215. referencedClasses: []
  3216. }),
  3217. globals.Browser);
  3218. smalltalk.addMethod(
  3219. smalltalk.method({
  3220. selector: "selectedPackage",
  3221. protocol: 'accessing',
  3222. fn: function (){
  3223. var self=this;
  3224. var $1;
  3225. $1=self["@selectedPackage"];
  3226. return $1;
  3227. },
  3228. args: [],
  3229. source: "selectedPackage\x0a\x09^ selectedPackage",
  3230. messageSends: [],
  3231. referencedClasses: []
  3232. }),
  3233. globals.Browser);
  3234. smalltalk.addMethod(
  3235. smalltalk.method({
  3236. selector: "setMethodProtocol:",
  3237. protocol: 'actions',
  3238. fn: function (aString){
  3239. var self=this;
  3240. return smalltalk.withContext(function($ctx1) {
  3241. var $1,$2,$3;
  3242. $1=self._cancelChanges();
  3243. if(smalltalk.assert($1)){
  3244. $2=_st(self._protocols())._includes_(aString);
  3245. if(smalltalk.assert($2)){
  3246. _st(self["@selectedMethod"])._protocol_(aString);
  3247. self["@selectedProtocol"]=aString;
  3248. self["@selectedProtocol"];
  3249. self["@selectedMethod"]=self["@selectedMethod"];
  3250. self["@selectedMethod"];
  3251. self._updateProtocolsList();
  3252. self._updateMethodsList();
  3253. $3=self._updateSourceAndButtons();
  3254. $3;
  3255. } else {
  3256. self._addNewProtocol();
  3257. };
  3258. };
  3259. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},globals.Browser)})},
  3260. args: ["aString"],
  3261. source: "setMethodProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09\x09ifFalse: [ self addNewProtocol ]\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedMethod protocol: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self\x0a\x09\x09\x09updateProtocolsList;\x0a\x09\x09\x09updateMethodsList;\x0a\x09\x09\x09updateSourceAndButtons ]]",
  3262. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3263. referencedClasses: []
  3264. }),
  3265. globals.Browser);
  3266. smalltalk.addMethod(
  3267. smalltalk.method({
  3268. selector: "showClassButtons",
  3269. protocol: 'actions',
  3270. fn: function (){
  3271. var self=this;
  3272. return smalltalk.withContext(function($ctx1) {
  3273. _st(_st(self["@classButtons"])._asJQuery())._show();
  3274. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},globals.Browser)})},
  3275. args: [],
  3276. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  3277. messageSends: ["show", "asJQuery"],
  3278. referencedClasses: []
  3279. }),
  3280. globals.Browser);
  3281. smalltalk.addMethod(
  3282. smalltalk.method({
  3283. selector: "showMethodButtons",
  3284. protocol: 'actions',
  3285. fn: function (){
  3286. var self=this;
  3287. return smalltalk.withContext(function($ctx1) {
  3288. _st(_st(self["@methodButtons"])._asJQuery())._show();
  3289. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},globals.Browser)})},
  3290. args: [],
  3291. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  3292. messageSends: ["show", "asJQuery"],
  3293. referencedClasses: []
  3294. }),
  3295. globals.Browser);
  3296. smalltalk.addMethod(
  3297. smalltalk.method({
  3298. selector: "source",
  3299. protocol: 'accessing',
  3300. fn: function (){
  3301. var self=this;
  3302. return smalltalk.withContext(function($ctx1) {
  3303. var $1,$4,$3,$2,$6,$5;
  3304. $1=_st(self["@selectedTab"]).__eq("comment");
  3305. if(! smalltalk.assert($1)){
  3306. $4=_st(self["@selectedProtocol"])._notNil();
  3307. $ctx1.sendIdx["notNil"]=1;
  3308. $3=_st($4)._or_((function(){
  3309. return smalltalk.withContext(function($ctx2) {
  3310. return _st(self["@selectedMethod"])._notNil();
  3311. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3312. if(smalltalk.assert($3)){
  3313. $2=self._methodSource();
  3314. } else {
  3315. $2=self._declarationSource();
  3316. };
  3317. return $2;
  3318. };
  3319. $6=self["@selectedClass"];
  3320. if(($receiver = $6) == nil || $receiver == null){
  3321. $5="";
  3322. } else {
  3323. $5=self._classCommentSource();
  3324. };
  3325. return $5;
  3326. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Browser)})},
  3327. args: [],
  3328. source: "source\x0a\x09selectedTab = #comment ifFalse: [\x0a\x09^ (selectedProtocol notNil or: [ selectedMethod notNil ])\x0a\x09\x09ifFalse: [ self declarationSource ]\x0a\x09\x09ifTrue: [ self methodSource ]].\x0a\x09^ selectedClass\x0a\x09ifNil: [ '' ]\x0a\x09ifNotNil: [ self classCommentSource ]",
  3329. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  3330. referencedClasses: []
  3331. }),
  3332. globals.Browser);
  3333. smalltalk.addMethod(
  3334. smalltalk.method({
  3335. selector: "updateCategoriesList",
  3336. protocol: 'updating',
  3337. fn: function (){
  3338. var self=this;
  3339. return smalltalk.withContext(function($ctx1) {
  3340. var $1,$2,$3,$4;
  3341. _st(self["@packagesList"])._contents_((function(html){
  3342. return smalltalk.withContext(function($ctx2) {
  3343. return _st(self._packages())._do_((function(each){
  3344. var li,label;
  3345. return smalltalk.withContext(function($ctx3) {
  3346. $1=_st(each)._isEmpty();
  3347. if(smalltalk.assert($1)){
  3348. label="Unclassified";
  3349. label;
  3350. } else {
  3351. label=each;
  3352. label;
  3353. };
  3354. li=_st(html)._li();
  3355. li;
  3356. $2=_st(self["@selectedPackage"]).__eq(each);
  3357. if(smalltalk.assert($2)){
  3358. _st(li)._class_("selected");
  3359. };
  3360. $3=li;
  3361. _st($3)._with_(label);
  3362. $4=_st($3)._onClick_((function(){
  3363. return smalltalk.withContext(function($ctx4) {
  3364. return self._selectCategory_(each);
  3365. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  3366. return $4;
  3367. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)})}));
  3368. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3369. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.Browser)})},
  3370. args: [],
  3371. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09each isEmpty\x0a\x09\x09ifTrue: [ label := 'Unclassified' ]\x0a\x09\x09ifFalse: [ label := each ].\x0a\x09\x09li := html li.\x0a\x09\x09selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [ self selectCategory: each ]] ]",
  3372. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  3373. referencedClasses: []
  3374. }),
  3375. globals.Browser);
  3376. smalltalk.addMethod(
  3377. smalltalk.method({
  3378. selector: "updateClassesList",
  3379. protocol: 'updating',
  3380. fn: function (){
  3381. var self=this;
  3382. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3383. return smalltalk.withContext(function($ctx1) {
  3384. _st(_st($TabManager())._current())._update();
  3385. _st(self["@classesList"])._updateNodes();
  3386. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.Browser)})},
  3387. args: [],
  3388. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  3389. messageSends: ["update", "current", "updateNodes"],
  3390. referencedClasses: ["TabManager"]
  3391. }),
  3392. globals.Browser);
  3393. smalltalk.addMethod(
  3394. smalltalk.method({
  3395. selector: "updateMethodsList",
  3396. protocol: 'updating',
  3397. fn: function (){
  3398. var self=this;
  3399. return smalltalk.withContext(function($ctx1) {
  3400. var $1,$2,$3;
  3401. _st(self["@methodsList"])._contents_((function(html){
  3402. return smalltalk.withContext(function($ctx2) {
  3403. return _st(self._methods())._do_((function(each){
  3404. var li;
  3405. return smalltalk.withContext(function($ctx3) {
  3406. li=_st(html)._li();
  3407. li;
  3408. $1=_st(self["@selectedMethod"]).__eq(each);
  3409. if(smalltalk.assert($1)){
  3410. _st(li)._class_("selected");
  3411. };
  3412. $2=li;
  3413. _st($2)._with_(_st(each)._selector());
  3414. $3=_st($2)._onClick_((function(){
  3415. return smalltalk.withContext(function($ctx4) {
  3416. return self._selectMethod_(each);
  3417. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3418. return $3;
  3419. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3420. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3421. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.Browser)})},
  3422. args: [],
  3423. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09self methods do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [ self selectMethod: each ]] ]",
  3424. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  3425. referencedClasses: []
  3426. }),
  3427. globals.Browser);
  3428. smalltalk.addMethod(
  3429. smalltalk.method({
  3430. selector: "updateProtocolsList",
  3431. protocol: 'updating',
  3432. fn: function (){
  3433. var self=this;
  3434. return smalltalk.withContext(function($ctx1) {
  3435. var $1,$2,$3;
  3436. _st(self["@protocolsList"])._contents_((function(html){
  3437. return smalltalk.withContext(function($ctx2) {
  3438. return _st(self._protocols())._do_((function(each){
  3439. var li;
  3440. return smalltalk.withContext(function($ctx3) {
  3441. li=_st(html)._li();
  3442. li;
  3443. $1=_st(self["@selectedProtocol"]).__eq(each);
  3444. if(smalltalk.assert($1)){
  3445. _st(li)._class_("selected");
  3446. };
  3447. $2=li;
  3448. _st($2)._with_(each);
  3449. $3=_st($2)._onClick_((function(){
  3450. return smalltalk.withContext(function($ctx4) {
  3451. return self._selectProtocol_(each);
  3452. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3453. return $3;
  3454. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3455. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3456. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},globals.Browser)})},
  3457. args: [],
  3458. source: "updateProtocolsList\x0a\x09protocolsList contents: [ :html |\x0a\x09self protocols do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedProtocol = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self selectProtocol: each ]] ]",
  3459. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  3460. referencedClasses: []
  3461. }),
  3462. globals.Browser);
  3463. smalltalk.addMethod(
  3464. smalltalk.method({
  3465. selector: "updateSourceAndButtons",
  3466. protocol: 'updating',
  3467. fn: function (){
  3468. var self=this;
  3469. var currentProtocol;
  3470. return smalltalk.withContext(function($ctx1) {
  3471. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$15,$14,$17,$18,$19,$20,$22,$21,$23,$24,$16,$25,$26,$28,$29,$30,$31,$27,$32,$33;
  3472. self._disableSaveButton();
  3473. _st(self["@classButtons"])._contents_((function(html){
  3474. return smalltalk.withContext(function($ctx2) {
  3475. $1=_st(html)._button();
  3476. $ctx2.sendIdx["button"]=1;
  3477. _st($1)._title_("Create a new class");
  3478. _st($1)._onClick_((function(){
  3479. return smalltalk.withContext(function($ctx3) {
  3480. return self._addNewClass();
  3481. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3482. $ctx2.sendIdx["onClick:"]=1;
  3483. $2=_st($1)._with_("New class");
  3484. $ctx2.sendIdx["with:"]=1;
  3485. $2;
  3486. $3=_st(html)._button();
  3487. $ctx2.sendIdx["button"]=2;
  3488. _st($3)._with_("Rename class");
  3489. $ctx2.sendIdx["with:"]=2;
  3490. $4=_st($3)._onClick_((function(){
  3491. return smalltalk.withContext(function($ctx3) {
  3492. return self._renameClass();
  3493. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3494. $ctx2.sendIdx["onClick:"]=2;
  3495. $4;
  3496. $5=_st(html)._button();
  3497. $ctx2.sendIdx["button"]=3;
  3498. _st($5)._with_("Copy class");
  3499. $ctx2.sendIdx["with:"]=3;
  3500. $6=_st($5)._onClick_((function(){
  3501. return smalltalk.withContext(function($ctx3) {
  3502. return self._copyClass();
  3503. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3504. $ctx2.sendIdx["onClick:"]=3;
  3505. $6;
  3506. $7=_st(html)._button();
  3507. $ctx2.sendIdx["button"]=4;
  3508. _st($7)._with_("Remove class");
  3509. $ctx2.sendIdx["with:"]=4;
  3510. $8=_st($7)._onClick_((function(){
  3511. return smalltalk.withContext(function($ctx3) {
  3512. return self._removeClass();
  3513. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  3514. $ctx2.sendIdx["onClick:"]=4;
  3515. $8;
  3516. $9=_st(html)._button();
  3517. $ctx2.sendIdx["button"]=5;
  3518. _st($9)._with_("References");
  3519. $ctx2.sendIdx["with:"]=5;
  3520. $10=_st($9)._onClick_((function(){
  3521. return smalltalk.withContext(function($ctx3) {
  3522. return self._searchClassReferences();
  3523. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3524. $ctx2.sendIdx["onClick:"]=5;
  3525. return $10;
  3526. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3527. $ctx1.sendIdx["contents:"]=1;
  3528. _st(self["@methodButtons"])._contents_((function(html){
  3529. var protocolSelect,referencesSelect;
  3530. return smalltalk.withContext(function($ctx2) {
  3531. $11=_st(html)._button();
  3532. _st($11)._with_("Remove method");
  3533. $ctx2.sendIdx["with:"]=6;
  3534. $12=_st($11)._onClick_((function(){
  3535. return smalltalk.withContext(function($ctx3) {
  3536. return self._removeMethod();
  3537. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)})}));
  3538. $12;
  3539. protocolSelect=_st(html)._select();
  3540. $ctx2.sendIdx["select"]=1;
  3541. protocolSelect;
  3542. $13=protocolSelect;
  3543. _st($13)._onChange_((function(){
  3544. return smalltalk.withContext(function($ctx3) {
  3545. $15=_st(protocolSelect)._asJQuery();
  3546. $ctx3.sendIdx["asJQuery"]=1;
  3547. $14=_st($15)._val();
  3548. $ctx3.sendIdx["val"]=1;
  3549. return self._setMethodProtocol_($14);
  3550. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3551. $ctx2.sendIdx["onChange:"]=1;
  3552. $16=_st($13)._with_((function(){
  3553. return smalltalk.withContext(function($ctx3) {
  3554. $17=_st(html)._option();
  3555. $ctx3.sendIdx["option"]=1;
  3556. _st($17)._with_("Method protocol");
  3557. $ctx3.sendIdx["with:"]=8;
  3558. $18=_st($17)._at_put_("disabled","disabled");
  3559. $ctx3.sendIdx["at:put:"]=1;
  3560. $18;
  3561. $19=_st(html)._option();
  3562. $ctx3.sendIdx["option"]=2;
  3563. _st($19)._class_("important");
  3564. $ctx3.sendIdx["class:"]=1;
  3565. $20=_st($19)._with_("New...");
  3566. $ctx3.sendIdx["with:"]=9;
  3567. $20;
  3568. currentProtocol=self["@selectedProtocol"];
  3569. currentProtocol;
  3570. $22=_st(currentProtocol)._isNil();
  3571. $ctx3.sendIdx["isNil"]=1;
  3572. $21=_st($22)._and_((function(){
  3573. return smalltalk.withContext(function($ctx4) {
  3574. return _st(self["@selectedMethod"])._notNil();
  3575. $ctx4.sendIdx["notNil"]=1;
  3576. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)})}));
  3577. if(smalltalk.assert($21)){
  3578. currentProtocol=_st(self["@selectedMethod"])._category();
  3579. currentProtocol;
  3580. };
  3581. return _st(self._protocols())._do_((function(each){
  3582. var option;
  3583. return smalltalk.withContext(function($ctx4) {
  3584. $23=_st(html)._option();
  3585. $ctx4.sendIdx["option"]=3;
  3586. option=_st($23)._with_(each);
  3587. $ctx4.sendIdx["with:"]=10;
  3588. option;
  3589. $24=_st(currentProtocol).__eq(each);
  3590. if(smalltalk.assert($24)){
  3591. return _st(option)._at_put_("selected","selected");
  3592. $ctx4.sendIdx["at:put:"]=2;
  3593. };
  3594. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)})}));
  3595. $ctx3.sendIdx["do:"]=1;
  3596. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3597. $ctx2.sendIdx["with:"]=7;
  3598. $16;
  3599. $25=_st(self["@selectedMethod"])._isNil();
  3600. $ctx2.sendIdx["isNil"]=2;
  3601. if(! smalltalk.assert($25)){
  3602. referencesSelect=_st(html)._select();
  3603. referencesSelect;
  3604. $26=referencesSelect;
  3605. _st($26)._onChange_((function(){
  3606. return smalltalk.withContext(function($ctx3) {
  3607. return self._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  3608. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)})}));
  3609. $27=_st($26)._with_((function(){
  3610. var option;
  3611. return smalltalk.withContext(function($ctx3) {
  3612. $28=_st(html)._option();
  3613. $ctx3.sendIdx["option"]=4;
  3614. _st($28)._with_("References");
  3615. $ctx3.sendIdx["with:"]=12;
  3616. _st($28)._at_put_("disabled","disabled");
  3617. $ctx3.sendIdx["at:put:"]=3;
  3618. $29=_st($28)._at_put_("selected","selected");
  3619. $29;
  3620. $30=_st(html)._option();
  3621. $ctx3.sendIdx["option"]=5;
  3622. _st($30)._class_("important");
  3623. $31=_st($30)._with_(_st(self["@selectedMethod"])._selector());
  3624. $ctx3.sendIdx["with:"]=13;
  3625. $31;
  3626. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  3627. return smalltalk.withContext(function($ctx4) {
  3628. return _st(_st(html)._option())._with_(each);
  3629. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)})}));
  3630. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)})}));
  3631. $ctx2.sendIdx["with:"]=11;
  3632. return $27;
  3633. };
  3634. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)})}));
  3635. $32=_st(self["@selectedMethod"])._isNil();
  3636. $ctx1.sendIdx["isNil"]=3;
  3637. if(smalltalk.assert($32)){
  3638. self._hideMethodButtons();
  3639. $33=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  3640. return smalltalk.withContext(function($ctx2) {
  3641. return _st(self["@selectedProtocol"])._notNil();
  3642. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)})}));
  3643. if(smalltalk.assert($33)){
  3644. self._hideClassButtons();
  3645. $ctx1.sendIdx["hideClassButtons"]=1;
  3646. } else {
  3647. self._showClassButtons();
  3648. };
  3649. } else {
  3650. self._hideClassButtons();
  3651. self._showMethodButtons();
  3652. };
  3653. _st(self["@sourceArea"])._val_(self._source());
  3654. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},globals.Browser)})},
  3655. args: [],
  3656. source: "updateSourceAndButtons\x0a\x09| currentProtocol |\x0a\x0a\x09self disableSaveButton.\x0a\x09classButtons contents: [ :html |\x0a\x09\x09html button\x0a\x09\x09\x09title: 'Create a new class';\x0a\x09\x09\x09onClick: [ self addNewClass ];\x0a\x09\x09\x09with: 'New class'.\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Rename class';\x0a\x09\x09\x09onClick: [ self renameClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Copy class';\x0a\x09\x09\x09onClick: [ self copyClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove class';\x0a\x09\x09\x09onClick: [ self removeClass ].\x0a\x09\x09html button\x0a\x09\x09\x09with: 'References';\x0a\x09\x09\x09onClick: [ self searchClassReferences ]].\x0a\x09methodButtons contents: [ :html | | protocolSelect referencesSelect |\x0a\x09\x09html button\x0a\x09\x09\x09with: 'Remove method';\x0a\x09\x09\x09onClick: [ self removeMethod ].\x0a\x09\x09protocolSelect := html select.\x0a\x09\x09\x09\x09protocolSelect\x0a\x09\x09\x09onChange: [ self setMethodProtocol: protocolSelect asJQuery val ];\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09with: 'Method protocol';\x0a\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled'.\x0a\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09with: 'New...'.\x0a\x09\x09\x09\x09currentProtocol := selectedProtocol.\x0a\x09\x09\x09\x09(currentProtocol isNil and: [ selectedMethod notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ currentProtocol := selectedMethod category ].\x0a\x09\x09\x09\x09self protocols do: [ :each | | option |\x0a\x09\x09\x09\x09\x09option := html option with: each.\x0a\x09\x09\x09\x09\x09currentProtocol = each ifTrue: [ option at: 'selected' put: 'selected' ] ] ].\x0a\x09\x09selectedMethod isNil ifFalse: [\x0a\x09\x09\x09referencesSelect := html select.\x0a\x09\x09\x09\x09\x09\x09referencesSelect\x0a\x09\x09\x09\x09onChange: [ self searchReferencesOf: referencesSelect asJQuery val ];\x0a\x09\x09\x09\x09with: [ |option|\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09with: 'References';\x0a\x09\x09\x09\x09\x09\x09at: 'disabled' put: 'disabled';\x0a\x09\x09\x09\x09\x09\x09at: 'selected' put: 'selected'.\x0a\x09\x09\x09\x09\x09html option\x0a\x09\x09\x09\x09\x09\x09class: 'important';\x0a\x09\x09\x09\x09\x09\x09with: selectedMethod selector.\x0a\x09\x09\x09\x09\x09selectedMethod messageSends sorted do: [ :each |\x0a\x09\x09\x09\x09\x09\x09html option with: each ]] ]].\x0a\x09selectedMethod isNil\x0a\x09\x09ifTrue: [\x0a\x09\x09\x09self hideMethodButtons.\x0a\x09\x09\x09\x09(selectedClass isNil or: [ selectedProtocol notNil ])\x0a\x09\x09\x09\x09\x09ifTrue: [ self hideClassButtons ]\x0a\x09\x09\x09\x09\x09ifFalse: [ self showClassButtons ]]\x0a\x09\x09ifFalse: [\x0a\x09\x09\x09self hideClassButtons.\x0a\x09\x09\x09self showMethodButtons ].\x0a\x09sourceArea val: self source",
  3657. messageSends: ["disableSaveButton", "contents:", "title:", "button", "onClick:", "addNewClass", "with:", "renameClass", "copyClass", "removeClass", "searchClassReferences", "removeMethod", "select", "onChange:", "setMethodProtocol:", "val", "asJQuery", "option", "at:put:", "class:", "ifTrue:", "and:", "isNil", "notNil", "category", "do:", "protocols", "=", "ifFalse:", "searchReferencesOf:", "selector", "sorted", "messageSends", "ifTrue:ifFalse:", "hideMethodButtons", "or:", "hideClassButtons", "showClassButtons", "showMethodButtons", "val:", "source"],
  3658. referencedClasses: []
  3659. }),
  3660. globals.Browser);
  3661. smalltalk.addMethod(
  3662. smalltalk.method({
  3663. selector: "updateStatus",
  3664. protocol: 'updating',
  3665. fn: function (){
  3666. var self=this;
  3667. return smalltalk.withContext(function($ctx1) {
  3668. var $1,$2,$3;
  3669. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  3670. if(smalltalk.assert($1)){
  3671. $2=self["@saveButton"];
  3672. if(($receiver = $2) == nil || $receiver == null){
  3673. $2;
  3674. } else {
  3675. _st(self["@saveButton"])._at_put_("disabled",true);
  3676. };
  3677. self["@unsavedChanges"]=false;
  3678. self["@unsavedChanges"];
  3679. } else {
  3680. $3=self["@saveButton"];
  3681. if(($receiver = $3) == nil || $receiver == null){
  3682. $3;
  3683. } else {
  3684. _st(self["@saveButton"])._removeAt_("disabled");
  3685. };
  3686. self["@unsavedChanges"]=true;
  3687. self["@unsavedChanges"];
  3688. };
  3689. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Browser)})},
  3690. args: [],
  3691. 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 ]",
  3692. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  3693. referencedClasses: []
  3694. }),
  3695. globals.Browser);
  3696. smalltalk.addMethod(
  3697. smalltalk.method({
  3698. selector: "updateTabsList",
  3699. protocol: 'updating',
  3700. fn: function (){
  3701. var self=this;
  3702. return smalltalk.withContext(function($ctx1) {
  3703. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20;
  3704. _st(self["@tabsList"])._contents_((function(html){
  3705. var li;
  3706. return smalltalk.withContext(function($ctx2) {
  3707. li=_st(html)._li();
  3708. $ctx2.sendIdx["li"]=1;
  3709. li;
  3710. $1=_st(self["@selectedTab"]).__eq("instance");
  3711. $ctx2.sendIdx["="]=1;
  3712. if(smalltalk.assert($1)){
  3713. _st(li)._class_("selected");
  3714. $ctx2.sendIdx["class:"]=1;
  3715. };
  3716. $2=li;
  3717. _st($2)._with_((function(){
  3718. return smalltalk.withContext(function($ctx3) {
  3719. $3=_st(html)._span();
  3720. $ctx3.sendIdx["span"]=1;
  3721. _st($3)._class_("ltab");
  3722. $ctx3.sendIdx["class:"]=2;
  3723. $4=_st(html)._span();
  3724. $ctx3.sendIdx["span"]=2;
  3725. _st($4)._class_("mtab");
  3726. $ctx3.sendIdx["class:"]=3;
  3727. $5=_st($4)._with_("Instance");
  3728. $ctx3.sendIdx["with:"]=2;
  3729. $5;
  3730. $6=_st(html)._span();
  3731. $ctx3.sendIdx["span"]=3;
  3732. return _st($6)._class_("rtab");
  3733. $ctx3.sendIdx["class:"]=4;
  3734. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3735. $ctx2.sendIdx["with:"]=1;
  3736. $7=_st($2)._onClick_((function(){
  3737. return smalltalk.withContext(function($ctx3) {
  3738. return self._selectTab_("instance");
  3739. $ctx3.sendIdx["selectTab:"]=1;
  3740. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3741. $ctx2.sendIdx["onClick:"]=1;
  3742. $7;
  3743. li=_st(html)._li();
  3744. $ctx2.sendIdx["li"]=2;
  3745. li;
  3746. $8=_st(self["@selectedTab"]).__eq("class");
  3747. $ctx2.sendIdx["="]=2;
  3748. if(smalltalk.assert($8)){
  3749. _st(li)._class_("selected");
  3750. $ctx2.sendIdx["class:"]=5;
  3751. };
  3752. $9=li;
  3753. _st($9)._with_((function(){
  3754. return smalltalk.withContext(function($ctx3) {
  3755. $10=_st(html)._span();
  3756. $ctx3.sendIdx["span"]=4;
  3757. _st($10)._class_("ltab");
  3758. $ctx3.sendIdx["class:"]=6;
  3759. $11=_st(html)._span();
  3760. $ctx3.sendIdx["span"]=5;
  3761. _st($11)._class_("mtab");
  3762. $ctx3.sendIdx["class:"]=7;
  3763. $12=_st($11)._with_("Class");
  3764. $ctx3.sendIdx["with:"]=4;
  3765. $12;
  3766. $13=_st(html)._span();
  3767. $ctx3.sendIdx["span"]=6;
  3768. return _st($13)._class_("rtab");
  3769. $ctx3.sendIdx["class:"]=8;
  3770. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3771. $ctx2.sendIdx["with:"]=3;
  3772. $14=_st($9)._onClick_((function(){
  3773. return smalltalk.withContext(function($ctx3) {
  3774. return self._selectTab_("class");
  3775. $ctx3.sendIdx["selectTab:"]=2;
  3776. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  3777. $ctx2.sendIdx["onClick:"]=2;
  3778. $14;
  3779. li=_st(html)._li();
  3780. li;
  3781. $15=_st(self["@selectedTab"]).__eq("comment");
  3782. if(smalltalk.assert($15)){
  3783. _st(li)._class_("selected");
  3784. $ctx2.sendIdx["class:"]=9;
  3785. };
  3786. $16=li;
  3787. _st($16)._with_((function(){
  3788. return smalltalk.withContext(function($ctx3) {
  3789. $17=_st(html)._span();
  3790. $ctx3.sendIdx["span"]=7;
  3791. _st($17)._class_("ltab");
  3792. $ctx3.sendIdx["class:"]=10;
  3793. $18=_st(html)._span();
  3794. $ctx3.sendIdx["span"]=8;
  3795. _st($18)._class_("mtab");
  3796. $ctx3.sendIdx["class:"]=11;
  3797. $19=_st($18)._with_("Comment");
  3798. $19;
  3799. return _st(_st(html)._span())._class_("rtab");
  3800. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3801. $ctx2.sendIdx["with:"]=5;
  3802. $20=_st($16)._onClick_((function(){
  3803. return smalltalk.withContext(function($ctx3) {
  3804. return self._selectTab_("comment");
  3805. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3806. return $20;
  3807. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  3808. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},globals.Browser)})},
  3809. args: [],
  3810. source: "updateTabsList\x0a\x09tabsList contents: [ :html || li |\x0a\x09li := html li.\x0a\x09selectedTab = #instance ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Instance'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #instance ].\x0a\x09li := html li.\x0a\x09selectedTab = #class ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Class'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #class ].\x0a\x09li := html li.\x0a\x09selectedTab = #comment ifTrue: [ li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Comment'.\x0a\x09\x09html span class: 'rtab' ];\x0a\x09\x09onClick: [ self selectTab: #comment ]]",
  3811. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  3812. referencedClasses: []
  3813. }),
  3814. globals.Browser);
  3815. smalltalk.addMethod(
  3816. smalltalk.method({
  3817. selector: "open",
  3818. protocol: 'convenience',
  3819. fn: function (){
  3820. var self=this;
  3821. return smalltalk.withContext(function($ctx1) {
  3822. _st(self._new())._open();
  3823. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.Browser.klass)})},
  3824. args: [],
  3825. source: "open\x0a\x09self new open",
  3826. messageSends: ["open", "new"],
  3827. referencedClasses: []
  3828. }),
  3829. globals.Browser.klass);
  3830. smalltalk.addMethod(
  3831. smalltalk.method({
  3832. selector: "openOn:",
  3833. protocol: 'convenience',
  3834. fn: function (aClass){
  3835. var self=this;
  3836. return smalltalk.withContext(function($ctx1) {
  3837. var $2,$3,$1;
  3838. $2=self._new();
  3839. _st($2)._open();
  3840. _st($2)._selectCategory_(_st(aClass)._category());
  3841. $3=_st($2)._selectClass_(aClass);
  3842. $1=$3;
  3843. return $1;
  3844. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},globals.Browser.klass)})},
  3845. args: ["aClass"],
  3846. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  3847. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
  3848. referencedClasses: []
  3849. }),
  3850. globals.Browser.klass);
  3851. smalltalk.addClass('Debugger', globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3852. smalltalk.addMethod(
  3853. smalltalk.method({
  3854. selector: "allVariables",
  3855. protocol: 'accessing',
  3856. fn: function (){
  3857. var self=this;
  3858. var all;
  3859. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3860. return smalltalk.withContext(function($ctx1) {
  3861. var $3,$2,$1,$4;
  3862. all=_st($Dictionary())._new();
  3863. $3=self._receiver();
  3864. $ctx1.sendIdx["receiver"]=1;
  3865. $2=_st($3)._class();
  3866. $1=_st($2)._allInstanceVariableNames();
  3867. _st($1)._do_((function(each){
  3868. return smalltalk.withContext(function($ctx2) {
  3869. return _st(all)._at_put_(each,_st(self._receiver())._instVarAt_(each));
  3870. $ctx2.sendIdx["at:put:"]=1;
  3871. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  3872. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3873. return smalltalk.withContext(function($ctx2) {
  3874. return _st(all)._at_put_(key,value);
  3875. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)})}));
  3876. $4=all;
  3877. return $4;
  3878. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},globals.Debugger)})},
  3879. args: [],
  3880. source: "allVariables\x0a\x09| all |\x0a\x09all := Dictionary new.\x0a\x0a\x09self receiver class allInstanceVariableNames do: [ :each |\x0a\x09\x09all at: each put: (self receiver instVarAt: each) ].\x0a\x09\x0a\x09selectedContext locals keysAndValuesDo: [ :key :value |\x0a\x09\x09all at: key put: value ].\x0a\x09\x0a\x09^ all",
  3881. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"],
  3882. referencedClasses: ["Dictionary"]
  3883. }),
  3884. globals.Debugger);
  3885. smalltalk.addMethod(
  3886. smalltalk.method({
  3887. selector: "canBeClosed",
  3888. protocol: 'testing',
  3889. fn: function (){
  3890. var self=this;
  3891. return true;
  3892. },
  3893. args: [],
  3894. source: "canBeClosed\x0a\x09^ true",
  3895. messageSends: [],
  3896. referencedClasses: []
  3897. }),
  3898. globals.Debugger);
  3899. smalltalk.addMethod(
  3900. smalltalk.method({
  3901. selector: "error",
  3902. protocol: 'accessing',
  3903. fn: function (){
  3904. var self=this;
  3905. var $1;
  3906. $1=self["@error"];
  3907. return $1;
  3908. },
  3909. args: [],
  3910. source: "error\x0a\x09^ error",
  3911. messageSends: [],
  3912. referencedClasses: []
  3913. }),
  3914. globals.Debugger);
  3915. smalltalk.addMethod(
  3916. smalltalk.method({
  3917. selector: "error:",
  3918. protocol: 'accessing',
  3919. fn: function (anError){
  3920. var self=this;
  3921. self["@error"]=anError;
  3922. return self},
  3923. args: ["anError"],
  3924. source: "error: anError\x0a\x09error := anError",
  3925. messageSends: [],
  3926. referencedClasses: []
  3927. }),
  3928. globals.Debugger);
  3929. smalltalk.addMethod(
  3930. smalltalk.method({
  3931. selector: "initialize",
  3932. protocol: 'initialization',
  3933. fn: function (){
  3934. var self=this;
  3935. return smalltalk.withContext(function($ctx1) {
  3936. globals.Debugger.superclass.fn.prototype._initialize.apply(_st(self), []);
  3937. _st(self["@unsavedChanges"]).__eq(false);
  3938. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Debugger)})},
  3939. args: [],
  3940. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  3941. messageSends: ["initialize", "="],
  3942. referencedClasses: []
  3943. }),
  3944. globals.Debugger);
  3945. smalltalk.addMethod(
  3946. smalltalk.method({
  3947. selector: "inspectSelectedVariable",
  3948. protocol: 'actions',
  3949. fn: function (){
  3950. var self=this;
  3951. return smalltalk.withContext(function($ctx1) {
  3952. _st(self["@selectedVariable"])._inspect();
  3953. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},globals.Debugger)})},
  3954. args: [],
  3955. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  3956. messageSends: ["inspect"],
  3957. referencedClasses: []
  3958. }),
  3959. globals.Debugger);
  3960. smalltalk.addMethod(
  3961. smalltalk.method({
  3962. selector: "label",
  3963. protocol: 'accessing',
  3964. fn: function (){
  3965. var self=this;
  3966. return "[ Debugger ]";
  3967. },
  3968. args: [],
  3969. source: "label\x0a\x09^ '[ Debugger ]'",
  3970. messageSends: [],
  3971. referencedClasses: []
  3972. }),
  3973. globals.Debugger);
  3974. smalltalk.addMethod(
  3975. smalltalk.method({
  3976. selector: "method",
  3977. protocol: 'accessing',
  3978. fn: function (){
  3979. var self=this;
  3980. return smalltalk.withContext(function($ctx1) {
  3981. var $1;
  3982. $1=_st(self["@selectedContext"])._method();
  3983. return $1;
  3984. }, function($ctx1) {$ctx1.fill(self,"method",{},globals.Debugger)})},
  3985. args: [],
  3986. source: "method\x0a\x09^ selectedContext method",
  3987. messageSends: ["method"],
  3988. referencedClasses: []
  3989. }),
  3990. globals.Debugger);
  3991. smalltalk.addMethod(
  3992. smalltalk.method({
  3993. selector: "proceed",
  3994. protocol: 'actions',
  3995. fn: function (){
  3996. var self=this;
  3997. return smalltalk.withContext(function($ctx1) {
  3998. self._close();
  3999. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  4000. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},globals.Debugger)})},
  4001. args: [],
  4002. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  4003. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  4004. referencedClasses: []
  4005. }),
  4006. globals.Debugger);
  4007. smalltalk.addMethod(
  4008. smalltalk.method({
  4009. selector: "receiver",
  4010. protocol: 'accessing',
  4011. fn: function (){
  4012. var self=this;
  4013. return smalltalk.withContext(function($ctx1) {
  4014. var $1;
  4015. $1=_st(self["@selectedContext"])._receiver();
  4016. return $1;
  4017. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.Debugger)})},
  4018. args: [],
  4019. source: "receiver\x0a\x09^ selectedContext receiver",
  4020. messageSends: ["receiver"],
  4021. referencedClasses: []
  4022. }),
  4023. globals.Debugger);
  4024. smalltalk.addMethod(
  4025. smalltalk.method({
  4026. selector: "renderBottomPanelOn:",
  4027. protocol: 'rendering',
  4028. fn: function (html){
  4029. var self=this;
  4030. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4031. return smalltalk.withContext(function($ctx1) {
  4032. var $1,$2;
  4033. $1=_st(html)._div();
  4034. $ctx1.sendIdx["div"]=1;
  4035. _st($1)._class_("amber_sourceCode debugger");
  4036. $ctx1.sendIdx["class:"]=1;
  4037. $2=_st($1)._with_((function(){
  4038. return smalltalk.withContext(function($ctx2) {
  4039. self["@sourceArea"]=_st($SourceArea())._new();
  4040. self["@sourceArea"];
  4041. return _st(self["@sourceArea"])._renderOn_(html);
  4042. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4043. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  4044. $ctx1.sendIdx["class:"]=2;
  4045. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  4046. _st(self["@sourceArea"])._onKeyUp_((function(){
  4047. return smalltalk.withContext(function($ctx2) {
  4048. return self._updateStatus();
  4049. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4050. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Debugger)})},
  4051. args: ["html"],
  4052. 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 ]",
  4053. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
  4054. referencedClasses: ["SourceArea"]
  4055. }),
  4056. globals.Debugger);
  4057. smalltalk.addMethod(
  4058. smalltalk.method({
  4059. selector: "renderBoxOn:",
  4060. protocol: 'rendering',
  4061. fn: function (html){
  4062. var self=this;
  4063. return smalltalk.withContext(function($ctx1) {
  4064. var $1;
  4065. self._renderTopPanelOn_(html);
  4066. $1=self._renderBottomPanelOn_(html);
  4067. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Debugger)})},
  4068. args: ["html"],
  4069. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4070. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4071. referencedClasses: []
  4072. }),
  4073. globals.Debugger);
  4074. smalltalk.addMethod(
  4075. smalltalk.method({
  4076. selector: "renderButtonsOn:",
  4077. protocol: 'rendering',
  4078. fn: function (html){
  4079. var self=this;
  4080. return smalltalk.withContext(function($ctx1) {
  4081. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  4082. $1=_st(html)._button();
  4083. $ctx1.sendIdx["button"]=1;
  4084. _st($1)._with_("Save");
  4085. $ctx1.sendIdx["with:"]=1;
  4086. $2=_st($1)._onClick_((function(){
  4087. return smalltalk.withContext(function($ctx2) {
  4088. return self._save();
  4089. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4090. $ctx1.sendIdx["onClick:"]=1;
  4091. self["@saveButton"]=$2;
  4092. $3=_st(html)._button();
  4093. $ctx1.sendIdx["button"]=2;
  4094. _st($3)._with_("DoIt");
  4095. $ctx1.sendIdx["with:"]=2;
  4096. $4=_st($3)._onClick_((function(){
  4097. return smalltalk.withContext(function($ctx2) {
  4098. return _st(self["@sourceArea"])._doIt();
  4099. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4100. $ctx1.sendIdx["onClick:"]=2;
  4101. $5=_st(html)._button();
  4102. $ctx1.sendIdx["button"]=3;
  4103. _st($5)._with_("PrintIt");
  4104. $ctx1.sendIdx["with:"]=3;
  4105. $6=_st($5)._onClick_((function(){
  4106. return smalltalk.withContext(function($ctx2) {
  4107. return _st(self["@sourceArea"])._printIt();
  4108. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4109. $ctx1.sendIdx["onClick:"]=3;
  4110. $7=_st(html)._button();
  4111. $ctx1.sendIdx["button"]=4;
  4112. _st($7)._with_("InspectIt");
  4113. $ctx1.sendIdx["with:"]=4;
  4114. $8=_st($7)._onClick_((function(){
  4115. return smalltalk.withContext(function($ctx2) {
  4116. return _st(self["@sourceArea"])._inspectIt();
  4117. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  4118. $ctx1.sendIdx["onClick:"]=4;
  4119. $9=_st(html)._button();
  4120. $ctx1.sendIdx["button"]=5;
  4121. _st($9)._with_("Proceed");
  4122. $ctx1.sendIdx["with:"]=5;
  4123. $10=_st($9)._onClick_((function(){
  4124. return smalltalk.withContext(function($ctx2) {
  4125. return self._proceed();
  4126. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  4127. $ctx1.sendIdx["onClick:"]=5;
  4128. $11=_st(html)._button();
  4129. $ctx1.sendIdx["button"]=6;
  4130. _st($11)._with_("Abandon");
  4131. $ctx1.sendIdx["with:"]=6;
  4132. $12=_st($11)._onClick_((function(){
  4133. return smalltalk.withContext(function($ctx2) {
  4134. return self._close();
  4135. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  4136. $ctx1.sendIdx["onClick:"]=6;
  4137. $13=_st(html)._button();
  4138. _st($13)._class_("amber_button debugger inspect");
  4139. _st($13)._with_("Inspect");
  4140. $14=_st($13)._onClick_((function(){
  4141. return smalltalk.withContext(function($ctx2) {
  4142. return self._inspectSelectedVariable();
  4143. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
  4144. self["@inspectButton"]=$14;
  4145. self._updateSourceArea();
  4146. self._updateStatus();
  4147. self._updateVariablesList();
  4148. $15=self._updateInspector();
  4149. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Debugger)})},
  4150. args: ["html"],
  4151. source: "renderButtonsOn: html\x0a\x09saveButton := html button\x0a\x09\x09with: 'Save';\x0a\x09\x09onClick: [ self save ].\x0a\x09html button\x0a\x09\x09with: 'DoIt';\x0a\x09\x09onClick: [ sourceArea doIt ].\x0a\x09html button\x0a\x09\x09with: 'PrintIt';\x0a\x09\x09onClick: [ sourceArea printIt ].\x0a\x09html button\x0a\x09\x09with: 'InspectIt';\x0a\x09\x09onClick: [ sourceArea inspectIt ].\x0a\x09html button\x0a\x09\x09with: 'Proceed';\x0a\x09\x09onClick: [ self proceed ].\x0a\x09html button\x0a\x09\x09with: 'Abandon';\x0a\x09\x09onClick: [ self close ].\x0a\x09inspectButton := html button\x0a\x09\x09class: 'amber_button debugger inspect';\x0a\x09\x09with: 'Inspect';\x0a\x09\x09onClick: [ self inspectSelectedVariable ].\x0a\x09self\x0a\x09\x09updateSourceArea;\x0a\x09\x09updateStatus;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateInspector",
  4152. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  4153. referencedClasses: []
  4154. }),
  4155. globals.Debugger);
  4156. smalltalk.addMethod(
  4157. smalltalk.method({
  4158. selector: "renderContext:on:",
  4159. protocol: 'rendering',
  4160. fn: function (aContext,html){
  4161. var self=this;
  4162. var li;
  4163. return smalltalk.withContext(function($ctx1) {
  4164. var $1,$2,$3,$4;
  4165. li=_st(html)._li();
  4166. $1=_st(self["@selectedContext"]).__eq(aContext);
  4167. if(smalltalk.assert($1)){
  4168. _st(li)._class_("selected");
  4169. };
  4170. $2=li;
  4171. _st($2)._with_(_st(aContext)._asString());
  4172. $3=_st($2)._onClick_((function(){
  4173. return smalltalk.withContext(function($ctx2) {
  4174. return self._selectContext_(aContext);
  4175. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4176. $4=_st(aContext)._outerContext();
  4177. $ctx1.sendIdx["outerContext"]=1;
  4178. if(($receiver = $4) == nil || $receiver == null){
  4179. $4;
  4180. } else {
  4181. self._renderContext_on_(_st(aContext)._outerContext(),html);
  4182. };
  4183. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},globals.Debugger)})},
  4184. args: ["aContext", "html"],
  4185. source: "renderContext: aContext on: html\x0a\x09| li |\x0a\x09li := html li.\x0a\x09selectedContext = aContext ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09li\x0a\x09\x09with: aContext asString;\x0a\x09\x09onClick: [ self selectContext: aContext ].\x0a\x09aContext outerContext ifNotNil: [ self renderContext: aContext outerContext on: html ]",
  4186. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"],
  4187. referencedClasses: []
  4188. }),
  4189. globals.Debugger);
  4190. smalltalk.addMethod(
  4191. smalltalk.method({
  4192. selector: "renderTopPanelOn:",
  4193. protocol: 'rendering',
  4194. fn: function (html){
  4195. var self=this;
  4196. return smalltalk.withContext(function($ctx1) {
  4197. var $1,$2,$4,$6,$8,$7,$5,$9,$10,$3;
  4198. $1=self._error();
  4199. $ctx1.sendIdx["error"]=1;
  4200. self["@selectedContext"]=_st($1)._context();
  4201. $ctx1.sendIdx["context"]=1;
  4202. $2=_st(html)._div();
  4203. $ctx1.sendIdx["div"]=1;
  4204. _st($2)._class_("top");
  4205. $ctx1.sendIdx["class:"]=1;
  4206. $3=_st($2)._with_((function(){
  4207. return smalltalk.withContext(function($ctx2) {
  4208. $4=_st(html)._div();
  4209. _st($4)._class_("label");
  4210. $ctx2.sendIdx["class:"]=2;
  4211. $6=$4;
  4212. $8=self._error();
  4213. $ctx2.sendIdx["error"]=2;
  4214. $7=_st($8)._messageText();
  4215. $5=_st($6)._with_($7);
  4216. $ctx2.sendIdx["with:"]=2;
  4217. $5;
  4218. $9=_st(html)._ul();
  4219. _st($9)._class_("amber_column debugger contexts");
  4220. $10=_st($9)._with_((function(){
  4221. return smalltalk.withContext(function($ctx3) {
  4222. return self._renderContext_on_(_st(self._error())._context(),html);
  4223. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4224. self["@ul"]=$10;
  4225. return self["@ul"];
  4226. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4227. $ctx1.sendIdx["with:"]=1;
  4228. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Debugger)})},
  4229. args: ["html"],
  4230. 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 ]]",
  4231. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
  4232. referencedClasses: []
  4233. }),
  4234. globals.Debugger);
  4235. smalltalk.addMethod(
  4236. smalltalk.method({
  4237. selector: "save",
  4238. protocol: 'actions',
  4239. fn: function (){
  4240. var self=this;
  4241. var protocol;
  4242. return smalltalk.withContext(function($ctx1) {
  4243. var $4,$3,$2,$1;
  4244. $4=_st(self["@selectedContext"])._receiver();
  4245. $ctx1.sendIdx["receiver"]=1;
  4246. $3=_st($4)._class();
  4247. $ctx1.sendIdx["class"]=1;
  4248. $2=_st($3)._methodDictionary();
  4249. $1=_st($2)._at_(_st(self["@selectedContext"])._selector());
  4250. protocol=_st($1)._category();
  4251. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  4252. self._updateStatus();
  4253. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},globals.Debugger)})},
  4254. args: [],
  4255. 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",
  4256. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  4257. referencedClasses: []
  4258. }),
  4259. globals.Debugger);
  4260. smalltalk.addMethod(
  4261. smalltalk.method({
  4262. selector: "selectContext:",
  4263. protocol: 'actions',
  4264. fn: function (aContext){
  4265. var self=this;
  4266. return smalltalk.withContext(function($ctx1) {
  4267. var $1;
  4268. self["@selectedContext"]=aContext;
  4269. self["@selectedVariable"]=nil;
  4270. self["@selectedVariableName"]=nil;
  4271. self._updateContextsList();
  4272. self._updateSourceArea();
  4273. self._updateInspector();
  4274. self._updateVariablesList();
  4275. $1=self._updateStatus();
  4276. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},globals.Debugger)})},
  4277. args: ["aContext"],
  4278. 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",
  4279. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  4280. referencedClasses: []
  4281. }),
  4282. globals.Debugger);
  4283. smalltalk.addMethod(
  4284. smalltalk.method({
  4285. selector: "selectVariable:named:",
  4286. protocol: 'actions',
  4287. fn: function (anObject,aString){
  4288. var self=this;
  4289. return smalltalk.withContext(function($ctx1) {
  4290. self["@selectedVariable"]=anObject;
  4291. self["@selectedVariableName"]=aString;
  4292. _st(self["@inspector"])._contents_((function(html){
  4293. return smalltalk.withContext(function($ctx2) {
  4294. return _st(html)._with_(_st(anObject)._printString());
  4295. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4296. self._updateVariablesList();
  4297. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},globals.Debugger)})},
  4298. args: ["anObject", "aString"],
  4299. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  4300. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  4301. referencedClasses: []
  4302. }),
  4303. globals.Debugger);
  4304. smalltalk.addMethod(
  4305. smalltalk.method({
  4306. selector: "source",
  4307. protocol: 'accessing',
  4308. fn: function (){
  4309. var self=this;
  4310. return smalltalk.withContext(function($ctx1) {
  4311. var $2,$1;
  4312. $2=self._method();
  4313. $ctx1.sendIdx["method"]=1;
  4314. if(($receiver = $2) == nil || $receiver == null){
  4315. $1="Method doesn't exist!";
  4316. } else {
  4317. $1=_st(self._method())._source();
  4318. };
  4319. return $1;
  4320. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Debugger)})},
  4321. args: [],
  4322. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  4323. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  4324. referencedClasses: []
  4325. }),
  4326. globals.Debugger);
  4327. smalltalk.addMethod(
  4328. smalltalk.method({
  4329. selector: "updateContextsList",
  4330. protocol: 'updating',
  4331. fn: function (){
  4332. var self=this;
  4333. return smalltalk.withContext(function($ctx1) {
  4334. _st(self["@ul"])._contents_((function(html){
  4335. return smalltalk.withContext(function($ctx2) {
  4336. return self._renderContext_on_(_st(self._error())._context(),html);
  4337. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4338. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},globals.Debugger)})},
  4339. args: [],
  4340. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  4341. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  4342. referencedClasses: []
  4343. }),
  4344. globals.Debugger);
  4345. smalltalk.addMethod(
  4346. smalltalk.method({
  4347. selector: "updateInspector",
  4348. protocol: 'updating',
  4349. fn: function (){
  4350. var self=this;
  4351. return smalltalk.withContext(function($ctx1) {
  4352. _st(self["@inspector"])._contents_((function(html){
  4353. return smalltalk.withContext(function($ctx2) {
  4354. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4355. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},globals.Debugger)})},
  4356. args: [],
  4357. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  4358. messageSends: ["contents:"],
  4359. referencedClasses: []
  4360. }),
  4361. globals.Debugger);
  4362. smalltalk.addMethod(
  4363. smalltalk.method({
  4364. selector: "updateSourceArea",
  4365. protocol: 'updating',
  4366. fn: function (){
  4367. var self=this;
  4368. return smalltalk.withContext(function($ctx1) {
  4369. _st(self["@sourceArea"])._val_(self._source());
  4370. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},globals.Debugger)})},
  4371. args: [],
  4372. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  4373. messageSends: ["val:", "source"],
  4374. referencedClasses: []
  4375. }),
  4376. globals.Debugger);
  4377. smalltalk.addMethod(
  4378. smalltalk.method({
  4379. selector: "updateStatus",
  4380. protocol: 'updating',
  4381. fn: function (){
  4382. var self=this;
  4383. return smalltalk.withContext(function($ctx1) {
  4384. var $1,$2,$3;
  4385. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  4386. if(smalltalk.assert($1)){
  4387. $2=self["@saveButton"];
  4388. if(($receiver = $2) == nil || $receiver == null){
  4389. $2;
  4390. } else {
  4391. _st(self["@saveButton"])._at_put_("disabled",true);
  4392. };
  4393. self["@unsavedChanges"]=false;
  4394. self["@unsavedChanges"];
  4395. } else {
  4396. $3=self["@saveButton"];
  4397. if(($receiver = $3) == nil || $receiver == null){
  4398. $3;
  4399. } else {
  4400. _st(self["@saveButton"])._removeAt_("disabled");
  4401. };
  4402. self["@unsavedChanges"]=true;
  4403. self["@unsavedChanges"];
  4404. };
  4405. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Debugger)})},
  4406. args: [],
  4407. 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 ]",
  4408. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  4409. referencedClasses: []
  4410. }),
  4411. globals.Debugger);
  4412. smalltalk.addMethod(
  4413. smalltalk.method({
  4414. selector: "updateVariablesList",
  4415. protocol: 'updating',
  4416. fn: function (){
  4417. var self=this;
  4418. return smalltalk.withContext(function($ctx1) {
  4419. var $1,$2,$3,$4,$5,$6,$7;
  4420. _st(self["@ul2"])._contents_((function(html){
  4421. var li;
  4422. return smalltalk.withContext(function($ctx2) {
  4423. $1=_st(html)._li();
  4424. $ctx2.sendIdx["li"]=1;
  4425. _st($1)._with_("self");
  4426. $ctx2.sendIdx["with:"]=1;
  4427. $2=_st($1)._onClick_((function(){
  4428. return smalltalk.withContext(function($ctx3) {
  4429. return self._selectVariable_named_(self._receiver(),"self");
  4430. $ctx3.sendIdx["selectVariable:named:"]=1;
  4431. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4432. $ctx2.sendIdx["onClick:"]=1;
  4433. li=$2;
  4434. li;
  4435. $3=_st(self["@selectedVariableName"]).__eq("self");
  4436. $ctx2.sendIdx["="]=1;
  4437. if(smalltalk.assert($3)){
  4438. _st(li)._class_("selected");
  4439. $ctx2.sendIdx["class:"]=1;
  4440. };
  4441. return _st(self._allVariables())._keysAndValuesDo_((function(key,value){
  4442. return smalltalk.withContext(function($ctx3) {
  4443. $4=_st(html)._li();
  4444. _st($4)._with_(key);
  4445. $5=_st($4)._onClick_((function(){
  4446. return smalltalk.withContext(function($ctx4) {
  4447. return self._selectVariable_named_(value,key);
  4448. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  4449. li=$5;
  4450. li;
  4451. $6=_st(self["@selectedVariableName"]).__eq(key);
  4452. if(smalltalk.assert($6)){
  4453. return _st(li)._class_("selected");
  4454. };
  4455. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)})}));
  4456. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  4457. $7=self["@selectedVariable"];
  4458. if(($receiver = $7) == nil || $receiver == null){
  4459. _st(self["@inspectButton"])._at_put_("disabled",true);
  4460. } else {
  4461. _st(self["@inspectButton"])._removeAt_("disabled");
  4462. };
  4463. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.Debugger)})},
  4464. args: [],
  4465. source: "updateVariablesList\x0a\x09ul2 contents: [ :html | | li |\x0a\x09\x09li := html li\x0a\x09\x09\x09with: 'self';\x0a\x09\x09\x09onClick: [ self selectVariable: self receiver named: 'self' ].\x0a\x09\x09\x09\x09selectedVariableName = 'self' ifTrue: [ li class: 'selected' ].\x0a\x09\x09\x0a\x09\x09self allVariables keysAndValuesDo: [ :key :value |\x0a\x09\x09\x09\x09\x09\x09li := html li\x0a\x09\x09\x09\x09\x09\x09\x09with: key;\x0a\x09\x09\x09\x09\x09\x09\x09onClick: [ self selectVariable: value named: key ].\x0a\x09\x09\x09\x09\x09\x09selectedVariableName = key ifTrue: [\x0a\x09\x09\x09\x09\x09\x09\x09li class: 'selected' ] ] ].\x0a\x09\x09\x09\x09\x09\x09\x09\x0a\x09selectedVariable\x0a\x09\x09ifNil: [ inspectButton at: 'disabled' put: true ]\x0a\x09\x09ifNotNil: [ inspectButton removeAt: 'disabled' ]",
  4466. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  4467. referencedClasses: []
  4468. }),
  4469. globals.Debugger);
  4470. smalltalk.addClass('IDEInspector', globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  4471. smalltalk.addMethod(
  4472. smalltalk.method({
  4473. selector: "canBeClosed",
  4474. protocol: 'testing',
  4475. fn: function (){
  4476. var self=this;
  4477. return true;
  4478. },
  4479. args: [],
  4480. source: "canBeClosed\x0a\x09^ true",
  4481. messageSends: [],
  4482. referencedClasses: []
  4483. }),
  4484. globals.IDEInspector);
  4485. smalltalk.addMethod(
  4486. smalltalk.method({
  4487. selector: "dive",
  4488. protocol: 'actions',
  4489. fn: function (){
  4490. var self=this;
  4491. return smalltalk.withContext(function($ctx1) {
  4492. _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
  4493. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},globals.IDEInspector)})},
  4494. args: [],
  4495. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  4496. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  4497. referencedClasses: []
  4498. }),
  4499. globals.IDEInspector);
  4500. smalltalk.addMethod(
  4501. smalltalk.method({
  4502. selector: "inspect:",
  4503. protocol: 'actions',
  4504. fn: function (anObject){
  4505. var self=this;
  4506. return smalltalk.withContext(function($ctx1) {
  4507. self["@object"]=anObject;
  4508. self["@variables"]=[];
  4509. _st(self["@object"])._inspectOn_(self);
  4510. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector)})},
  4511. args: ["anObject"],
  4512. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  4513. messageSends: ["inspectOn:"],
  4514. referencedClasses: []
  4515. }),
  4516. globals.IDEInspector);
  4517. smalltalk.addMethod(
  4518. smalltalk.method({
  4519. selector: "label",
  4520. protocol: 'accessing',
  4521. fn: function (){
  4522. var self=this;
  4523. return smalltalk.withContext(function($ctx1) {
  4524. var $2,$1;
  4525. $2=self["@label"];
  4526. if(($receiver = $2) == nil || $receiver == null){
  4527. $1="Inspector (nil)";
  4528. } else {
  4529. $1=$2;
  4530. };
  4531. return $1;
  4532. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.IDEInspector)})},
  4533. args: [],
  4534. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  4535. messageSends: ["ifNil:"],
  4536. referencedClasses: []
  4537. }),
  4538. globals.IDEInspector);
  4539. smalltalk.addMethod(
  4540. smalltalk.method({
  4541. selector: "refresh",
  4542. protocol: 'actions',
  4543. fn: function (){
  4544. var self=this;
  4545. return smalltalk.withContext(function($ctx1) {
  4546. var $1;
  4547. self._inspect_(self["@object"]);
  4548. self._updateVariablesList();
  4549. $1=self._updateValueTextarea();
  4550. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.IDEInspector)})},
  4551. args: [],
  4552. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  4553. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  4554. referencedClasses: []
  4555. }),
  4556. globals.IDEInspector);
  4557. smalltalk.addMethod(
  4558. smalltalk.method({
  4559. selector: "renderBottomPanelOn:",
  4560. protocol: 'rendering',
  4561. fn: function (html){
  4562. var self=this;
  4563. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4564. return smalltalk.withContext(function($ctx1) {
  4565. var $1,$3,$4,$2;
  4566. $1=_st(html)._div();
  4567. _st($1)._class_("amber_sourceCode");
  4568. $2=_st($1)._with_((function(){
  4569. return smalltalk.withContext(function($ctx2) {
  4570. $3=_st($SourceArea())._new();
  4571. _st($3)._receiver_(self["@object"]);
  4572. _st($3)._onDoIt_((function(){
  4573. return smalltalk.withContext(function($ctx3) {
  4574. return self._refresh();
  4575. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4576. $4=_st($3)._yourself();
  4577. self["@sourceArea"]=$4;
  4578. self["@sourceArea"];
  4579. return _st(self["@sourceArea"])._renderOn_(html);
  4580. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4581. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.IDEInspector)})},
  4582. args: ["html"],
  4583. source: "renderBottomPanelOn: html\x0a\x09html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09\x09sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [ self refresh ];\x0a\x09\x09yourself.\x0a\x09\x09\x09sourceArea renderOn: html ]",
  4584. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
  4585. referencedClasses: ["SourceArea"]
  4586. }),
  4587. globals.IDEInspector);
  4588. smalltalk.addMethod(
  4589. smalltalk.method({
  4590. selector: "renderBoxOn:",
  4591. protocol: 'rendering',
  4592. fn: function (html){
  4593. var self=this;
  4594. return smalltalk.withContext(function($ctx1) {
  4595. var $1;
  4596. self._renderTopPanelOn_(html);
  4597. $1=self._renderBottomPanelOn_(html);
  4598. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDEInspector)})},
  4599. args: ["html"],
  4600. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4601. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4602. referencedClasses: []
  4603. }),
  4604. globals.IDEInspector);
  4605. smalltalk.addMethod(
  4606. smalltalk.method({
  4607. selector: "renderButtonsOn:",
  4608. protocol: 'rendering',
  4609. fn: function (html){
  4610. var self=this;
  4611. return smalltalk.withContext(function($ctx1) {
  4612. var $1,$3,$2,$4,$6,$5,$7,$8;
  4613. $1=_st(html)._button();
  4614. $ctx1.sendIdx["button"]=1;
  4615. _st($1)._with_("DoIt");
  4616. $ctx1.sendIdx["with:"]=1;
  4617. $2=_st($1)._onClick_((function(){
  4618. return smalltalk.withContext(function($ctx2) {
  4619. $3=self._sourceArea();
  4620. $ctx2.sendIdx["sourceArea"]=1;
  4621. return _st($3)._doIt();
  4622. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4623. $ctx1.sendIdx["onClick:"]=1;
  4624. $4=_st(html)._button();
  4625. $ctx1.sendIdx["button"]=2;
  4626. _st($4)._with_("PrintIt");
  4627. $ctx1.sendIdx["with:"]=2;
  4628. $5=_st($4)._onClick_((function(){
  4629. return smalltalk.withContext(function($ctx2) {
  4630. $6=self._sourceArea();
  4631. $ctx2.sendIdx["sourceArea"]=2;
  4632. return _st($6)._printIt();
  4633. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4634. $ctx1.sendIdx["onClick:"]=2;
  4635. $7=_st(html)._button();
  4636. _st($7)._with_("InspectIt");
  4637. $8=_st($7)._onClick_((function(){
  4638. return smalltalk.withContext(function($ctx2) {
  4639. return _st(self._sourceArea())._inspectIt();
  4640. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4641. self._updateButtons();
  4642. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDEInspector)})},
  4643. args: ["html"],
  4644. 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",
  4645. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
  4646. referencedClasses: []
  4647. }),
  4648. globals.IDEInspector);
  4649. smalltalk.addMethod(
  4650. smalltalk.method({
  4651. selector: "renderTopPanelOn:",
  4652. protocol: 'rendering',
  4653. fn: function (html){
  4654. var self=this;
  4655. return smalltalk.withContext(function($ctx1) {
  4656. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11;
  4657. $1=_st(html)._div();
  4658. $ctx1.sendIdx["div"]=1;
  4659. _st($1)._class_("top");
  4660. $ctx1.sendIdx["class:"]=1;
  4661. $2=_st($1)._with_((function(){
  4662. return smalltalk.withContext(function($ctx2) {
  4663. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  4664. $ctx2.sendIdx["class:"]=2;
  4665. self["@variablesList"];
  4666. $3=_st(html)._textarea();
  4667. _st($3)._class_("amber_column value");
  4668. $ctx2.sendIdx["class:"]=3;
  4669. _st($3)._at_put_("readonly","readonly");
  4670. $4=_st($3)._yourself();
  4671. self["@valueTextarea"]=$4;
  4672. self["@valueTextarea"];
  4673. $5=_st(html)._div();
  4674. $ctx2.sendIdx["div"]=2;
  4675. _st($5)._class_("amber_tabs inspector");
  4676. $ctx2.sendIdx["class:"]=4;
  4677. $6=_st($5)._with_((function(){
  4678. return smalltalk.withContext(function($ctx3) {
  4679. $7=_st(html)._button();
  4680. $ctx3.sendIdx["button"]=1;
  4681. _st($7)._class_("amber_button inspector refresh");
  4682. $ctx3.sendIdx["class:"]=5;
  4683. _st($7)._with_("Refresh");
  4684. $ctx3.sendIdx["with:"]=3;
  4685. $8=_st($7)._onClick_((function(){
  4686. return smalltalk.withContext(function($ctx4) {
  4687. return self._refresh();
  4688. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4689. $ctx3.sendIdx["onClick:"]=1;
  4690. $8;
  4691. $9=_st(html)._button();
  4692. _st($9)._class_("amber_button inspector dive");
  4693. $ctx3.sendIdx["class:"]=6;
  4694. _st($9)._with_("Dive");
  4695. $10=_st($9)._onClick_((function(){
  4696. return smalltalk.withContext(function($ctx4) {
  4697. return self._dive();
  4698. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  4699. self["@diveButton"]=$10;
  4700. return self["@diveButton"];
  4701. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4702. $ctx2.sendIdx["with:"]=2;
  4703. $6;
  4704. return _st(_st(html)._div())._class_("amber_clear");
  4705. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4706. $ctx1.sendIdx["with:"]=1;
  4707. self._updateVariablesList();
  4708. $11=self._updateValueTextarea();
  4709. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.IDEInspector)})},
  4710. args: ["html"],
  4711. 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'; yourself.\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.",
  4712. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  4713. referencedClasses: []
  4714. }),
  4715. globals.IDEInspector);
  4716. smalltalk.addMethod(
  4717. smalltalk.method({
  4718. selector: "selectVariable:",
  4719. protocol: 'updating',
  4720. fn: function (aString){
  4721. var self=this;
  4722. return smalltalk.withContext(function($ctx1) {
  4723. var $1;
  4724. self._selectedVariable_(aString);
  4725. self._updateVariablesList();
  4726. self._updateValueTextarea();
  4727. $1=self._updateButtons();
  4728. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},globals.IDEInspector)})},
  4729. args: ["aString"],
  4730. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  4731. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  4732. referencedClasses: []
  4733. }),
  4734. globals.IDEInspector);
  4735. smalltalk.addMethod(
  4736. smalltalk.method({
  4737. selector: "selectedVariable",
  4738. protocol: 'accessing',
  4739. fn: function (){
  4740. var self=this;
  4741. var $1;
  4742. $1=self["@selectedVariable"];
  4743. return $1;
  4744. },
  4745. args: [],
  4746. source: "selectedVariable\x0a\x09^ selectedVariable",
  4747. messageSends: [],
  4748. referencedClasses: []
  4749. }),
  4750. globals.IDEInspector);
  4751. smalltalk.addMethod(
  4752. smalltalk.method({
  4753. selector: "selectedVariable:",
  4754. protocol: 'accessing',
  4755. fn: function (aString){
  4756. var self=this;
  4757. self["@selectedVariable"]=aString;
  4758. return self},
  4759. args: ["aString"],
  4760. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  4761. messageSends: [],
  4762. referencedClasses: []
  4763. }),
  4764. globals.IDEInspector);
  4765. smalltalk.addMethod(
  4766. smalltalk.method({
  4767. selector: "setLabel:",
  4768. protocol: 'accessing',
  4769. fn: function (aString){
  4770. var self=this;
  4771. self["@label"]=aString;
  4772. return self},
  4773. args: ["aString"],
  4774. source: "setLabel: aString\x0a\x09label := aString",
  4775. messageSends: [],
  4776. referencedClasses: []
  4777. }),
  4778. globals.IDEInspector);
  4779. smalltalk.addMethod(
  4780. smalltalk.method({
  4781. selector: "setVariables:",
  4782. protocol: 'accessing',
  4783. fn: function (aCollection){
  4784. var self=this;
  4785. self["@variables"]=aCollection;
  4786. return self},
  4787. args: ["aCollection"],
  4788. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  4789. messageSends: [],
  4790. referencedClasses: []
  4791. }),
  4792. globals.IDEInspector);
  4793. smalltalk.addMethod(
  4794. smalltalk.method({
  4795. selector: "sourceArea",
  4796. protocol: 'accessing',
  4797. fn: function (){
  4798. var self=this;
  4799. var $1;
  4800. $1=self["@sourceArea"];
  4801. return $1;
  4802. },
  4803. args: [],
  4804. source: "sourceArea\x0a\x09^ sourceArea",
  4805. messageSends: [],
  4806. referencedClasses: []
  4807. }),
  4808. globals.IDEInspector);
  4809. smalltalk.addMethod(
  4810. smalltalk.method({
  4811. selector: "updateButtons",
  4812. protocol: 'updating',
  4813. fn: function (){
  4814. var self=this;
  4815. return smalltalk.withContext(function($ctx1) {
  4816. var $3,$2,$1;
  4817. $3=self._selectedVariable();
  4818. $ctx1.sendIdx["selectedVariable"]=1;
  4819. $2=_st($3)._notNil();
  4820. $ctx1.sendIdx["notNil"]=1;
  4821. $1=_st($2)._and_((function(){
  4822. return smalltalk.withContext(function($ctx2) {
  4823. return _st(_st(self._variables())._at_(self._selectedVariable()))._notNil();
  4824. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4825. if(smalltalk.assert($1)){
  4826. _st(self["@diveButton"])._removeAt_("disabled");
  4827. } else {
  4828. _st(self["@diveButton"])._at_put_("disabled",true);
  4829. };
  4830. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},globals.IDEInspector)})},
  4831. args: [],
  4832. 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' ]",
  4833. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  4834. referencedClasses: []
  4835. }),
  4836. globals.IDEInspector);
  4837. smalltalk.addMethod(
  4838. smalltalk.method({
  4839. selector: "updateValueTextarea",
  4840. protocol: 'updating',
  4841. fn: function (){
  4842. var self=this;
  4843. return smalltalk.withContext(function($ctx1) {
  4844. var $1,$4,$3,$2;
  4845. $1=_st(self["@valueTextarea"])._asJQuery();
  4846. $4=self._selectedVariable();
  4847. $ctx1.sendIdx["selectedVariable"]=1;
  4848. $3=_st($4)._isNil();
  4849. if(smalltalk.assert($3)){
  4850. $2="";
  4851. } else {
  4852. $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
  4853. };
  4854. _st($1)._val_($2);
  4855. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},globals.IDEInspector)})},
  4856. args: [],
  4857. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  4858. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  4859. referencedClasses: []
  4860. }),
  4861. globals.IDEInspector);
  4862. smalltalk.addMethod(
  4863. smalltalk.method({
  4864. selector: "updateVariablesList",
  4865. protocol: 'updating',
  4866. fn: function (){
  4867. var self=this;
  4868. return smalltalk.withContext(function($ctx1) {
  4869. var $1,$2,$3;
  4870. _st(self["@variablesList"])._contents_((function(html){
  4871. return smalltalk.withContext(function($ctx2) {
  4872. return _st(self._variables())._keysDo_((function(each){
  4873. var li;
  4874. return smalltalk.withContext(function($ctx3) {
  4875. li=_st(html)._li();
  4876. li;
  4877. $1=li;
  4878. _st($1)._with_(each);
  4879. $2=_st($1)._onClick_((function(){
  4880. return smalltalk.withContext(function($ctx4) {
  4881. return self._selectVariable_(each);
  4882. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4883. $2;
  4884. $3=_st(self._selectedVariable()).__eq(each);
  4885. if(smalltalk.assert($3)){
  4886. return _st(li)._class_("selected");
  4887. };
  4888. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  4889. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4890. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.IDEInspector)})},
  4891. args: [],
  4892. source: "updateVariablesList\x0a\x09variablesList contents: [ :html |\x0a\x09\x09self variables keysDo: [ :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' ]] ]",
  4893. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  4894. referencedClasses: []
  4895. }),
  4896. globals.IDEInspector);
  4897. smalltalk.addMethod(
  4898. smalltalk.method({
  4899. selector: "variables",
  4900. protocol: 'accessing',
  4901. fn: function (){
  4902. var self=this;
  4903. var $1;
  4904. $1=self["@variables"];
  4905. return $1;
  4906. },
  4907. args: [],
  4908. source: "variables\x0a\x09^ variables",
  4909. messageSends: [],
  4910. referencedClasses: []
  4911. }),
  4912. globals.IDEInspector);
  4913. smalltalk.addMethod(
  4914. smalltalk.method({
  4915. selector: "inspect:",
  4916. protocol: 'instance creation',
  4917. fn: function (anObject){
  4918. var self=this;
  4919. return smalltalk.withContext(function($ctx1) {
  4920. var $2,$3,$1;
  4921. $2=self._new();
  4922. _st($2)._inspect_(anObject);
  4923. _st($2)._open();
  4924. $3=_st($2)._yourself();
  4925. $1=$3;
  4926. return $1;
  4927. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector.klass)})},
  4928. args: ["anObject"],
  4929. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  4930. messageSends: ["inspect:", "new", "open", "yourself"],
  4931. referencedClasses: []
  4932. }),
  4933. globals.IDEInspector.klass);
  4934. smalltalk.addMethod(
  4935. smalltalk.method({
  4936. selector: "on:",
  4937. protocol: 'instance creation',
  4938. fn: function (anObject){
  4939. var self=this;
  4940. return smalltalk.withContext(function($ctx1) {
  4941. var $2,$3,$1;
  4942. $2=self._new();
  4943. _st($2)._inspect_(anObject);
  4944. $3=_st($2)._yourself();
  4945. $1=$3;
  4946. return $1;
  4947. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},globals.IDEInspector.klass)})},
  4948. args: ["anObject"],
  4949. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  4950. messageSends: ["inspect:", "new", "yourself"],
  4951. referencedClasses: []
  4952. }),
  4953. globals.IDEInspector.klass);
  4954. smalltalk.addClass('IDETranscript', globals.TabWidget, ['textarea'], 'IDE');
  4955. smalltalk.addMethod(
  4956. smalltalk.method({
  4957. selector: "clear",
  4958. protocol: 'actions',
  4959. fn: function (){
  4960. var self=this;
  4961. return smalltalk.withContext(function($ctx1) {
  4962. _st(_st(self["@textarea"])._asJQuery())._val_("");
  4963. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.IDETranscript)})},
  4964. args: [],
  4965. source: "clear\x0a\x09textarea asJQuery val: ''",
  4966. messageSends: ["val:", "asJQuery"],
  4967. referencedClasses: []
  4968. }),
  4969. globals.IDETranscript);
  4970. smalltalk.addMethod(
  4971. smalltalk.method({
  4972. selector: "cr",
  4973. protocol: 'actions',
  4974. fn: function (){
  4975. var self=this;
  4976. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  4977. return smalltalk.withContext(function($ctx1) {
  4978. var $1;
  4979. $1=_st(self["@textarea"])._asJQuery();
  4980. $ctx1.sendIdx["asJQuery"]=1;
  4981. _st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
  4982. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},globals.IDETranscript)})},
  4983. args: [],
  4984. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  4985. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  4986. referencedClasses: ["String"]
  4987. }),
  4988. globals.IDETranscript);
  4989. smalltalk.addMethod(
  4990. smalltalk.method({
  4991. selector: "label",
  4992. protocol: 'accessing',
  4993. fn: function (){
  4994. var self=this;
  4995. return "Transcript";
  4996. },
  4997. args: [],
  4998. source: "label\x0a\x09^ 'Transcript'",
  4999. messageSends: [],
  5000. referencedClasses: []
  5001. }),
  5002. globals.IDETranscript);
  5003. smalltalk.addMethod(
  5004. smalltalk.method({
  5005. selector: "open",
  5006. protocol: 'actions',
  5007. fn: function (){
  5008. var self=this;
  5009. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5010. return smalltalk.withContext(function($ctx1) {
  5011. var $1,$2;
  5012. $1=_st($TabManager())._current();
  5013. _st($1)._open();
  5014. $2=_st($1)._selectTab_(self);
  5015. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript)})},
  5016. args: [],
  5017. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  5018. messageSends: ["open", "current", "selectTab:"],
  5019. referencedClasses: ["TabManager"]
  5020. }),
  5021. globals.IDETranscript);
  5022. smalltalk.addMethod(
  5023. smalltalk.method({
  5024. selector: "renderBoxOn:",
  5025. protocol: 'rendering',
  5026. fn: function (html){
  5027. var self=this;
  5028. return smalltalk.withContext(function($ctx1) {
  5029. var $1,$2;
  5030. self["@textarea"]=_st(html)._textarea();
  5031. $1=self["@textarea"];
  5032. _st($1)._class_("amber_transcript");
  5033. $2=_st($1)._at_put_("spellcheck","false");
  5034. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDETranscript)})},
  5035. args: ["html"],
  5036. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  5037. messageSends: ["textarea", "class:", "at:put:"],
  5038. referencedClasses: []
  5039. }),
  5040. globals.IDETranscript);
  5041. smalltalk.addMethod(
  5042. smalltalk.method({
  5043. selector: "renderButtonsOn:",
  5044. protocol: 'rendering',
  5045. fn: function (html){
  5046. var self=this;
  5047. return smalltalk.withContext(function($ctx1) {
  5048. var $1,$2;
  5049. $1=_st(html)._button();
  5050. _st($1)._with_("Clear transcript");
  5051. $2=_st($1)._onClick_((function(){
  5052. return smalltalk.withContext(function($ctx2) {
  5053. return self._clear();
  5054. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5055. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDETranscript)})},
  5056. args: ["html"],
  5057. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  5058. messageSends: ["with:", "button", "onClick:", "clear"],
  5059. referencedClasses: []
  5060. }),
  5061. globals.IDETranscript);
  5062. smalltalk.addMethod(
  5063. smalltalk.method({
  5064. selector: "show:",
  5065. protocol: 'actions',
  5066. fn: function (anObject){
  5067. var self=this;
  5068. return smalltalk.withContext(function($ctx1) {
  5069. var $1,$2;
  5070. $1=self["@textarea"];
  5071. if(($receiver = $1) == nil || $receiver == null){
  5072. self._open();
  5073. } else {
  5074. $1;
  5075. };
  5076. $2=_st(self["@textarea"])._asJQuery();
  5077. $ctx1.sendIdx["asJQuery"]=1;
  5078. _st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  5079. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},globals.IDETranscript)})},
  5080. args: ["anObject"],
  5081. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  5082. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  5083. referencedClasses: []
  5084. }),
  5085. globals.IDETranscript);
  5086. globals.IDETranscript.klass.iVarNames = ['current'];
  5087. smalltalk.addMethod(
  5088. smalltalk.method({
  5089. selector: "current",
  5090. protocol: 'instance creation',
  5091. fn: function (){
  5092. var self=this;
  5093. return smalltalk.withContext(function($ctx1) {
  5094. var $2,$1;
  5095. $2=self["@current"];
  5096. if(($receiver = $2) == nil || $receiver == null){
  5097. self["@current"]=globals.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []);
  5098. $1=self["@current"];
  5099. } else {
  5100. $1=$2;
  5101. };
  5102. return $1;
  5103. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.IDETranscript.klass)})},
  5104. args: [],
  5105. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  5106. messageSends: ["ifNil:", "new"],
  5107. referencedClasses: []
  5108. }),
  5109. globals.IDETranscript.klass);
  5110. smalltalk.addMethod(
  5111. smalltalk.method({
  5112. selector: "initialize",
  5113. protocol: 'initialization',
  5114. fn: function (){
  5115. var self=this;
  5116. function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  5117. return smalltalk.withContext(function($ctx1) {
  5118. _st($Transcript())._register_(self._current());
  5119. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.IDETranscript.klass)})},
  5120. args: [],
  5121. source: "initialize\x0a\x09Transcript register: self current",
  5122. messageSends: ["register:", "current"],
  5123. referencedClasses: ["Transcript"]
  5124. }),
  5125. globals.IDETranscript.klass);
  5126. smalltalk.addMethod(
  5127. smalltalk.method({
  5128. selector: "new",
  5129. protocol: 'instance creation',
  5130. fn: function (){
  5131. var self=this;
  5132. return smalltalk.withContext(function($ctx1) {
  5133. self._shouldNotImplement();
  5134. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.IDETranscript.klass)})},
  5135. args: [],
  5136. source: "new\x0a\x09self shouldNotImplement",
  5137. messageSends: ["shouldNotImplement"],
  5138. referencedClasses: []
  5139. }),
  5140. globals.IDETranscript.klass);
  5141. smalltalk.addMethod(
  5142. smalltalk.method({
  5143. selector: "open",
  5144. protocol: 'instance creation',
  5145. fn: function (){
  5146. var self=this;
  5147. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5148. return smalltalk.withContext(function($ctx1) {
  5149. var $1,$2;
  5150. $1=_st($TabManager())._current();
  5151. $ctx1.sendIdx["current"]=1;
  5152. _st($1)._open();
  5153. $2=_st($1)._selectTab_(self._current());
  5154. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript.klass)})},
  5155. args: [],
  5156. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  5157. messageSends: ["open", "current", "selectTab:"],
  5158. referencedClasses: ["TabManager"]
  5159. }),
  5160. globals.IDETranscript.klass);
  5161. smalltalk.addClass('ProgressBar', globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5162. smalltalk.addMethod(
  5163. smalltalk.method({
  5164. selector: "percent",
  5165. protocol: 'accessing',
  5166. fn: function (){
  5167. var self=this;
  5168. return smalltalk.withContext(function($ctx1) {
  5169. var $2,$1;
  5170. $2=self["@percent"];
  5171. if(($receiver = $2) == nil || $receiver == null){
  5172. $1=(0);
  5173. } else {
  5174. $1=$2;
  5175. };
  5176. return $1;
  5177. }, function($ctx1) {$ctx1.fill(self,"percent",{},globals.ProgressBar)})},
  5178. args: [],
  5179. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  5180. messageSends: ["ifNil:"],
  5181. referencedClasses: []
  5182. }),
  5183. globals.ProgressBar);
  5184. smalltalk.addMethod(
  5185. smalltalk.method({
  5186. selector: "percent:",
  5187. protocol: 'accessing',
  5188. fn: function (aNumber){
  5189. var self=this;
  5190. self["@percent"]=aNumber;
  5191. return self},
  5192. args: ["aNumber"],
  5193. source: "percent: aNumber\x0a\x09percent := aNumber",
  5194. messageSends: [],
  5195. referencedClasses: []
  5196. }),
  5197. globals.ProgressBar);
  5198. smalltalk.addMethod(
  5199. smalltalk.method({
  5200. selector: "renderOn:",
  5201. protocol: 'rendering',
  5202. fn: function (html){
  5203. var self=this;
  5204. return smalltalk.withContext(function($ctx1) {
  5205. var $1,$2;
  5206. $1=_st(html)._div();
  5207. _st($1)._class_("progress_bar");
  5208. $2=_st($1)._yourself();
  5209. self["@div"]=$2;
  5210. self._renderProgressBar();
  5211. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ProgressBar)})},
  5212. args: ["html"],
  5213. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5214. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5215. referencedClasses: []
  5216. }),
  5217. globals.ProgressBar);
  5218. smalltalk.addMethod(
  5219. smalltalk.method({
  5220. selector: "renderProgressBar",
  5221. protocol: 'rendering',
  5222. fn: function (){
  5223. var self=this;
  5224. return smalltalk.withContext(function($ctx1) {
  5225. var $1,$3,$4,$2;
  5226. _st(self["@div"])._contents_((function(html){
  5227. return smalltalk.withContext(function($ctx2) {
  5228. $1=_st(html)._div();
  5229. _st($1)._class_("progress");
  5230. $3=$1;
  5231. $4=_st("width:".__comma(_st(self._percent())._asString())).__comma("%");
  5232. $ctx2.sendIdx[","]=1;
  5233. $2=_st($3)._style_($4);
  5234. return $2;
  5235. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5236. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},globals.ProgressBar)})},
  5237. args: [],
  5238. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  5239. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5240. referencedClasses: []
  5241. }),
  5242. globals.ProgressBar);
  5243. smalltalk.addMethod(
  5244. smalltalk.method({
  5245. selector: "updatePercent:",
  5246. protocol: 'updating',
  5247. fn: function (aNumber){
  5248. var self=this;
  5249. return smalltalk.withContext(function($ctx1) {
  5250. self._percent_(aNumber);
  5251. self._renderProgressBar();
  5252. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},globals.ProgressBar)})},
  5253. args: ["aNumber"],
  5254. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5255. messageSends: ["percent:", "renderProgressBar"],
  5256. referencedClasses: []
  5257. }),
  5258. globals.ProgressBar);
  5259. smalltalk.addClass('ReferencesBrowser', globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5260. smalltalk.addMethod(
  5261. smalltalk.method({
  5262. selector: "canBeClosed",
  5263. protocol: 'testing',
  5264. fn: function (){
  5265. var self=this;
  5266. return true;
  5267. },
  5268. args: [],
  5269. source: "canBeClosed\x0a\x09^ true",
  5270. messageSends: [],
  5271. referencedClasses: []
  5272. }),
  5273. globals.ReferencesBrowser);
  5274. smalltalk.addMethod(
  5275. smalltalk.method({
  5276. selector: "classesAndMetaclasses",
  5277. protocol: 'accessing',
  5278. fn: function (){
  5279. var self=this;
  5280. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5281. return smalltalk.withContext(function($ctx1) {
  5282. var $2,$1;
  5283. $2=_st($Smalltalk())._classes();
  5284. $ctx1.sendIdx["classes"]=1;
  5285. $1=_st($2).__comma(_st(_st($Smalltalk())._classes())._collect_((function(each){
  5286. return smalltalk.withContext(function($ctx2) {
  5287. return _st(each)._class();
  5288. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})));
  5289. return $1;
  5290. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},globals.ReferencesBrowser)})},
  5291. args: [],
  5292. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  5293. messageSends: [",", "classes", "collect:", "class"],
  5294. referencedClasses: ["Smalltalk"]
  5295. }),
  5296. globals.ReferencesBrowser);
  5297. smalltalk.addMethod(
  5298. smalltalk.method({
  5299. selector: "implementors",
  5300. protocol: 'accessing',
  5301. fn: function (){
  5302. var self=this;
  5303. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5304. return smalltalk.withContext(function($ctx1) {
  5305. var $2,$1;
  5306. $2=self["@implementors"];
  5307. if(($receiver = $2) == nil || $receiver == null){
  5308. self["@implementors"]=_st($Array())._new();
  5309. $1=self["@implementors"];
  5310. } else {
  5311. $1=$2;
  5312. };
  5313. return $1;
  5314. }, function($ctx1) {$ctx1.fill(self,"implementors",{},globals.ReferencesBrowser)})},
  5315. args: [],
  5316. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  5317. messageSends: ["ifNil:", "new"],
  5318. referencedClasses: ["Array"]
  5319. }),
  5320. globals.ReferencesBrowser);
  5321. smalltalk.addMethod(
  5322. smalltalk.method({
  5323. selector: "initialize",
  5324. protocol: 'initialization',
  5325. fn: function (){
  5326. var self=this;
  5327. return smalltalk.withContext(function($ctx1) {
  5328. globals.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []);
  5329. self["@selector"]="";
  5330. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.ReferencesBrowser)})},
  5331. args: [],
  5332. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  5333. messageSends: ["initialize"],
  5334. referencedClasses: []
  5335. }),
  5336. globals.ReferencesBrowser);
  5337. smalltalk.addMethod(
  5338. smalltalk.method({
  5339. selector: "label",
  5340. protocol: 'accessing',
  5341. fn: function (){
  5342. var self=this;
  5343. return "[ References ]";
  5344. },
  5345. args: [],
  5346. source: "label\x0a\x09^ '[ References ]'",
  5347. messageSends: [],
  5348. referencedClasses: []
  5349. }),
  5350. globals.ReferencesBrowser);
  5351. smalltalk.addMethod(
  5352. smalltalk.method({
  5353. selector: "matches",
  5354. protocol: 'accessing',
  5355. fn: function (){
  5356. var self=this;
  5357. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5358. return smalltalk.withContext(function($ctx1) {
  5359. var $2,$1;
  5360. $2=self["@matches"];
  5361. if(($receiver = $2) == nil || $receiver == null){
  5362. self["@matches"]=_st($Array())._new();
  5363. $1=self["@matches"];
  5364. } else {
  5365. $1=$2;
  5366. };
  5367. return $1;
  5368. }, function($ctx1) {$ctx1.fill(self,"matches",{},globals.ReferencesBrowser)})},
  5369. args: [],
  5370. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  5371. messageSends: ["ifNil:", "new"],
  5372. referencedClasses: ["Array"]
  5373. }),
  5374. globals.ReferencesBrowser);
  5375. smalltalk.addMethod(
  5376. smalltalk.method({
  5377. selector: "openBrowserOn:",
  5378. protocol: 'actions',
  5379. fn: function (aMethod){
  5380. var self=this;
  5381. var browser;
  5382. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  5383. return smalltalk.withContext(function($ctx1) {
  5384. var $3,$2,$4,$1,$5,$6,$7;
  5385. $3=_st(aMethod)._methodClass();
  5386. $ctx1.sendIdx["methodClass"]=1;
  5387. $2=_st($3)._isMetaclass();
  5388. $ctx1.sendIdx["isMetaclass"]=1;
  5389. if(smalltalk.assert($2)){
  5390. $4=_st(aMethod)._methodClass();
  5391. $ctx1.sendIdx["methodClass"]=2;
  5392. $1=_st($4)._instanceClass();
  5393. } else {
  5394. $1=_st(aMethod)._methodClass();
  5395. $ctx1.sendIdx["methodClass"]=3;
  5396. };
  5397. browser=_st($Browser())._openOn_($1);
  5398. $5=_st(_st(aMethod)._methodClass())._isMetaclass();
  5399. if(smalltalk.assert($5)){
  5400. _st(browser)._selectTab_("class");
  5401. };
  5402. $6=browser;
  5403. _st($6)._selectProtocol_(_st(aMethod)._category());
  5404. $7=_st($6)._selectMethod_(aMethod);
  5405. return self}, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},globals.ReferencesBrowser)})},
  5406. args: ["aMethod"],
  5407. source: "openBrowserOn: aMethod\x0a\x09| browser |\x0a\x09browser := Browser openOn: (aMethod methodClass isMetaclass\x0a\x09\x09ifTrue: [ aMethod methodClass instanceClass ] ifFalse: [ aMethod methodClass ]).\x0a\x09aMethod methodClass isMetaclass ifTrue: [ browser selectTab: #class ].\x0a\x09browser\x0a\x09\x09selectProtocol: aMethod category;\x0a\x09\x09selectMethod: aMethod",
  5408. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
  5409. referencedClasses: ["Browser"]
  5410. }),
  5411. globals.ReferencesBrowser);
  5412. smalltalk.addMethod(
  5413. smalltalk.method({
  5414. selector: "referencedClasses",
  5415. protocol: 'accessing',
  5416. fn: function (){
  5417. var self=this;
  5418. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5419. return smalltalk.withContext(function($ctx1) {
  5420. var $2,$1;
  5421. $2=self["@referencedClasses"];
  5422. if(($receiver = $2) == nil || $receiver == null){
  5423. self["@referencedClasses"]=_st($Array())._new();
  5424. $1=self["@referencedClasses"];
  5425. } else {
  5426. $1=$2;
  5427. };
  5428. return $1;
  5429. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},globals.ReferencesBrowser)})},
  5430. args: [],
  5431. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  5432. messageSends: ["ifNil:", "new"],
  5433. referencedClasses: ["Array"]
  5434. }),
  5435. globals.ReferencesBrowser);
  5436. smalltalk.addMethod(
  5437. smalltalk.method({
  5438. selector: "renderBoxOn:",
  5439. protocol: 'rendering',
  5440. fn: function (html){
  5441. var self=this;
  5442. return smalltalk.withContext(function($ctx1) {
  5443. var $1;
  5444. self._renderInputOn_(html);
  5445. self._renderImplementorsOn_(html);
  5446. self._renderSendersOn_(html);
  5447. self._renderReferencedClassesOn_(html);
  5448. $1=self._renderMatchesOn_(html);
  5449. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.ReferencesBrowser)})},
  5450. args: ["html"],
  5451. 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",
  5452. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
  5453. referencedClasses: []
  5454. }),
  5455. globals.ReferencesBrowser);
  5456. smalltalk.addMethod(
  5457. smalltalk.method({
  5458. selector: "renderImplementorsOn:",
  5459. protocol: 'rendering',
  5460. fn: function (html){
  5461. var self=this;
  5462. return smalltalk.withContext(function($ctx1) {
  5463. self["@implementorsList"]=_st(_st(html)._ul())._class_("amber_column implementors");
  5464. self._updateImplementorsList();
  5465. return self}, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},globals.ReferencesBrowser)})},
  5466. args: ["html"],
  5467. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  5468. messageSends: ["class:", "ul", "updateImplementorsList"],
  5469. referencedClasses: []
  5470. }),
  5471. globals.ReferencesBrowser);
  5472. smalltalk.addMethod(
  5473. smalltalk.method({
  5474. selector: "renderInputOn:",
  5475. protocol: 'rendering',
  5476. fn: function (html){
  5477. var self=this;
  5478. return smalltalk.withContext(function($ctx1) {
  5479. var $1,$2;
  5480. $1=_st(html)._input();
  5481. _st($1)._class_("implementors");
  5482. $2=_st($1)._yourself();
  5483. self["@input"]=$2;
  5484. _st(_st(self["@input"])._asJQuery())._val_(self["@selector"]);
  5485. self._setInputEvents();
  5486. return self}, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},globals.ReferencesBrowser)})},
  5487. args: ["html"],
  5488. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  5489. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
  5490. referencedClasses: []
  5491. }),
  5492. globals.ReferencesBrowser);
  5493. smalltalk.addMethod(
  5494. smalltalk.method({
  5495. selector: "renderMatchesOn:",
  5496. protocol: 'rendering',
  5497. fn: function (html){
  5498. var self=this;
  5499. return smalltalk.withContext(function($ctx1) {
  5500. self["@matchesList"]=_st(_st(html)._ul())._class_("amber_column matches");
  5501. self._updateMatchesList();
  5502. return self}, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},globals.ReferencesBrowser)})},
  5503. args: ["html"],
  5504. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  5505. messageSends: ["class:", "ul", "updateMatchesList"],
  5506. referencedClasses: []
  5507. }),
  5508. globals.ReferencesBrowser);
  5509. smalltalk.addMethod(
  5510. smalltalk.method({
  5511. selector: "renderReferencedClassesOn:",
  5512. protocol: 'rendering',
  5513. fn: function (html){
  5514. var self=this;
  5515. return smalltalk.withContext(function($ctx1) {
  5516. self["@referencedClassesList"]=_st(_st(html)._ul())._class_("amber_column referenced_classes");
  5517. self._updateReferencedClassesList();
  5518. return self}, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},globals.ReferencesBrowser)})},
  5519. args: ["html"],
  5520. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  5521. messageSends: ["class:", "ul", "updateReferencedClassesList"],
  5522. referencedClasses: []
  5523. }),
  5524. globals.ReferencesBrowser);
  5525. smalltalk.addMethod(
  5526. smalltalk.method({
  5527. selector: "renderSendersOn:",
  5528. protocol: 'rendering',
  5529. fn: function (html){
  5530. var self=this;
  5531. return smalltalk.withContext(function($ctx1) {
  5532. self["@sendersList"]=_st(_st(html)._ul())._class_("amber_column senders");
  5533. self._updateSendersList();
  5534. return self}, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},globals.ReferencesBrowser)})},
  5535. args: ["html"],
  5536. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  5537. messageSends: ["class:", "ul", "updateSendersList"],
  5538. referencedClasses: []
  5539. }),
  5540. globals.ReferencesBrowser);
  5541. smalltalk.addMethod(
  5542. smalltalk.method({
  5543. selector: "search:",
  5544. protocol: 'actions',
  5545. fn: function (aString){
  5546. var self=this;
  5547. return smalltalk.withContext(function($ctx1) {
  5548. var $1;
  5549. self._searchReferencesFor_(aString);
  5550. self._updateImplementorsList();
  5551. self._updateSendersList();
  5552. self._updateReferencedClassesList();
  5553. $1=self._updateMatchesList();
  5554. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.ReferencesBrowser)})},
  5555. args: ["aString"],
  5556. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  5557. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
  5558. referencedClasses: []
  5559. }),
  5560. globals.ReferencesBrowser);
  5561. smalltalk.addMethod(
  5562. smalltalk.method({
  5563. selector: "searchMethodSource",
  5564. protocol: 'actions',
  5565. fn: function (){
  5566. var self=this;
  5567. var regex;
  5568. return smalltalk.withContext(function($ctx1) {
  5569. var $1;
  5570. regex=_st(self["@selector"])._allButFirst();
  5571. _st(self._classesAndMetaclasses())._do_((function(each){
  5572. return smalltalk.withContext(function($ctx2) {
  5573. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5574. return smalltalk.withContext(function($ctx3) {
  5575. $1=_st(_st(value)._source())._match_(regex);
  5576. if(smalltalk.assert($1)){
  5577. return _st(self._matches())._add_(value);
  5578. };
  5579. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5580. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5581. return self}, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},globals.ReferencesBrowser)})},
  5582. args: [],
  5583. source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value ]] ]",
  5584. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"],
  5585. referencedClasses: []
  5586. }),
  5587. globals.ReferencesBrowser);
  5588. smalltalk.addMethod(
  5589. smalltalk.method({
  5590. selector: "searchReferencedClasses",
  5591. protocol: 'actions',
  5592. fn: function (){
  5593. var self=this;
  5594. return smalltalk.withContext(function($ctx1) {
  5595. var $2,$1;
  5596. _st(self._classesAndMetaclasses())._do_((function(each){
  5597. return smalltalk.withContext(function($ctx2) {
  5598. return _st(_st(each)._methodDictionary())._valuesDo_((function(value){
  5599. return smalltalk.withContext(function($ctx3) {
  5600. $2=_st(value)._referencedClasses();
  5601. $ctx3.sendIdx["referencedClasses"]=1;
  5602. $1=_st($2)._includes_(self["@selector"]);
  5603. if(smalltalk.assert($1)){
  5604. return _st(self._referencedClasses())._add_(value);
  5605. };
  5606. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)})}));
  5607. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5608. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},globals.ReferencesBrowser)})},
  5609. args: [],
  5610. source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [ :each |\x0a\x09\x09each methodDictionary valuesDo: [ :value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value ]] ]",
  5611. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"],
  5612. referencedClasses: []
  5613. }),
  5614. globals.ReferencesBrowser);
  5615. smalltalk.addMethod(
  5616. smalltalk.method({
  5617. selector: "searchReferencesFor:",
  5618. protocol: 'actions',
  5619. fn: function (aString){
  5620. var self=this;
  5621. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5622. return smalltalk.withContext(function($ctx1) {
  5623. var $1;
  5624. self["@selector"]=aString;
  5625. self["@implementors"]=_st($Array())._new();
  5626. $ctx1.sendIdx["new"]=1;
  5627. self["@senders"]=_st($Array())._new();
  5628. $ctx1.sendIdx["new"]=2;
  5629. self["@referencedClasses"]=_st($Array())._new();
  5630. $ctx1.sendIdx["new"]=3;
  5631. self["@matches"]=_st($Array())._new();
  5632. self._searchMethodSource();
  5633. $1=_st(self["@selector"])._match_("^[A-Z]");
  5634. if(smalltalk.assert($1)){
  5635. self._searchReferencedClasses();
  5636. } else {
  5637. self._searchSelectorReferences();
  5638. };
  5639. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},globals.ReferencesBrowser)})},
  5640. args: ["aString"],
  5641. 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 ]",
  5642. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"],
  5643. referencedClasses: ["Array"]
  5644. }),
  5645. globals.ReferencesBrowser);
  5646. smalltalk.addMethod(
  5647. smalltalk.method({
  5648. selector: "searchSelectorReferences",
  5649. protocol: 'actions',
  5650. fn: function (){
  5651. var self=this;
  5652. return smalltalk.withContext(function($ctx1) {
  5653. var $1,$2;
  5654. _st(self._classesAndMetaclasses())._do_((function(each){
  5655. return smalltalk.withContext(function($ctx2) {
  5656. return _st(_st(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  5657. return smalltalk.withContext(function($ctx3) {
  5658. $1=_st(key).__eq(self["@selector"]);
  5659. if(smalltalk.assert($1)){
  5660. _st(self._implementors())._add_(value);
  5661. $ctx3.sendIdx["add:"]=1;
  5662. };
  5663. $2=_st(_st(value)._messageSends())._includes_(self["@selector"]);
  5664. if(smalltalk.assert($2)){
  5665. return _st(self._senders())._add_(value);
  5666. };
  5667. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)})}));
  5668. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5669. return self}, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},globals.ReferencesBrowser)})},
  5670. args: [],
  5671. 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 ]] ]",
  5672. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"],
  5673. referencedClasses: []
  5674. }),
  5675. globals.ReferencesBrowser);
  5676. smalltalk.addMethod(
  5677. smalltalk.method({
  5678. selector: "selector",
  5679. protocol: 'accessing',
  5680. fn: function (){
  5681. var self=this;
  5682. var $1;
  5683. $1=self["@selector"];
  5684. return $1;
  5685. },
  5686. args: [],
  5687. source: "selector\x0a\x09^ selector",
  5688. messageSends: [],
  5689. referencedClasses: []
  5690. }),
  5691. globals.ReferencesBrowser);
  5692. smalltalk.addMethod(
  5693. smalltalk.method({
  5694. selector: "senders",
  5695. protocol: 'accessing',
  5696. fn: function (){
  5697. var self=this;
  5698. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5699. return smalltalk.withContext(function($ctx1) {
  5700. var $2,$1;
  5701. $2=self["@senders"];
  5702. if(($receiver = $2) == nil || $receiver == null){
  5703. self["@senders"]=_st($Array())._new();
  5704. $1=self["@senders"];
  5705. } else {
  5706. $1=$2;
  5707. };
  5708. return $1;
  5709. }, function($ctx1) {$ctx1.fill(self,"senders",{},globals.ReferencesBrowser)})},
  5710. args: [],
  5711. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  5712. messageSends: ["ifNil:", "new"],
  5713. referencedClasses: ["Array"]
  5714. }),
  5715. globals.ReferencesBrowser);
  5716. smalltalk.addMethod(
  5717. smalltalk.method({
  5718. selector: "setInputEvents",
  5719. protocol: 'private',
  5720. fn: function (){
  5721. var self=this;
  5722. return smalltalk.withContext(function($ctx1) {
  5723. var $1,$3,$2;
  5724. $1=self["@input"];
  5725. _st($1)._onKeyUp_((function(){
  5726. return smalltalk.withContext(function($ctx2) {
  5727. self["@timer"]=_st((function(){
  5728. return smalltalk.withContext(function($ctx3) {
  5729. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  5730. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}))._valueWithTimeout_((100));
  5731. return self["@timer"];
  5732. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5733. $2=_st($1)._onKeyDown_((function(){
  5734. return smalltalk.withContext(function($ctx2) {
  5735. $3=self["@timer"];
  5736. if(($receiver = $3) == nil || $receiver == null){
  5737. return $3;
  5738. } else {
  5739. return _st(self["@timer"])._clearTimeout();
  5740. };
  5741. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  5742. return self}, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},globals.ReferencesBrowser)})},
  5743. args: [],
  5744. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  5745. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
  5746. referencedClasses: []
  5747. }),
  5748. globals.ReferencesBrowser);
  5749. smalltalk.addMethod(
  5750. smalltalk.method({
  5751. selector: "updateImplementorsList",
  5752. protocol: 'updating',
  5753. fn: function (){
  5754. var self=this;
  5755. return smalltalk.withContext(function($ctx1) {
  5756. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5757. _st(self["@implementorsList"])._contents_((function(html){
  5758. return smalltalk.withContext(function($ctx2) {
  5759. $1=_st(html)._li();
  5760. $ctx2.sendIdx["li"]=1;
  5761. _st($1)._class_("column_label");
  5762. $2=$1;
  5763. $7=self._implementors();
  5764. $ctx2.sendIdx["implementors"]=1;
  5765. $6=_st($7)._size();
  5766. $5=_st($6)._asString();
  5767. $ctx2.sendIdx["asString"]=1;
  5768. $4="Implementors (".__comma($5);
  5769. $ctx2.sendIdx[","]=2;
  5770. $3=_st($4).__comma(")");
  5771. $ctx2.sendIdx[","]=1;
  5772. _st($2)._with_($3);
  5773. $ctx2.sendIdx["with:"]=1;
  5774. $8=_st($1)._style_("font-weight: bold");
  5775. $8;
  5776. return _st(self._implementors())._do_((function(each){
  5777. var li;
  5778. return smalltalk.withContext(function($ctx3) {
  5779. li=_st(html)._li();
  5780. li;
  5781. $9=li;
  5782. $10=$9;
  5783. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  5784. $ctx3.sendIdx[","]=3;
  5785. _st($10)._with_($11);
  5786. $12=_st($9)._onClick_((function(){
  5787. return smalltalk.withContext(function($ctx4) {
  5788. return self._openBrowserOn_(each);
  5789. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5790. return $12;
  5791. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5792. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5793. return self}, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},globals.ReferencesBrowser)})},
  5794. args: [],
  5795. source: "updateImplementorsList\x0a\x09implementorsList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Implementors (', self implementors size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self implementors do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5796. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5797. referencedClasses: []
  5798. }),
  5799. globals.ReferencesBrowser);
  5800. smalltalk.addMethod(
  5801. smalltalk.method({
  5802. selector: "updateMatchesList",
  5803. protocol: 'updating',
  5804. fn: function (){
  5805. var self=this;
  5806. return smalltalk.withContext(function($ctx1) {
  5807. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5808. _st(self["@matchesList"])._contents_((function(html){
  5809. return smalltalk.withContext(function($ctx2) {
  5810. $1=_st(html)._li();
  5811. $ctx2.sendIdx["li"]=1;
  5812. _st($1)._class_("column_label");
  5813. $2=$1;
  5814. $7=self._matches();
  5815. $ctx2.sendIdx["matches"]=1;
  5816. $6=_st($7)._size();
  5817. $5=_st($6)._asString();
  5818. $ctx2.sendIdx["asString"]=1;
  5819. $4="Regex matches (".__comma($5);
  5820. $ctx2.sendIdx[","]=2;
  5821. $3=_st($4).__comma(")");
  5822. $ctx2.sendIdx[","]=1;
  5823. _st($2)._with_($3);
  5824. $ctx2.sendIdx["with:"]=1;
  5825. $8=_st($1)._style_("font-weight: bold");
  5826. $8;
  5827. return _st(self._matches())._do_((function(each){
  5828. var li;
  5829. return smalltalk.withContext(function($ctx3) {
  5830. li=_st(html)._li();
  5831. li;
  5832. $9=li;
  5833. $10=$9;
  5834. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5835. $ctx3.sendIdx[","]=3;
  5836. _st($10)._with_($11);
  5837. $12=_st($9)._onClick_((function(){
  5838. return smalltalk.withContext(function($ctx4) {
  5839. return self._openBrowserOn_(each);
  5840. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5841. return $12;
  5842. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  5843. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5844. return self}, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},globals.ReferencesBrowser)})},
  5845. args: [],
  5846. source: "updateMatchesList\x0a\x09matchesList contents: [ :html |\x0a\x09html li\x0a\x09\x09class: 'column_label';\x0a\x09\x09with: 'Regex matches (', self matches size asString, ')';\x0a\x09\x09style: 'font-weight: bold'.\x0a\x09self matches do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [ self openBrowserOn: each ]] ]",
  5847. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5848. referencedClasses: []
  5849. }),
  5850. globals.ReferencesBrowser);
  5851. smalltalk.addMethod(
  5852. smalltalk.method({
  5853. selector: "updateReferencedClassesList",
  5854. protocol: 'updating',
  5855. fn: function (){
  5856. var self=this;
  5857. return smalltalk.withContext(function($ctx1) {
  5858. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5859. _st(self["@referencedClassesList"])._contents_((function(html){
  5860. return smalltalk.withContext(function($ctx2) {
  5861. $1=_st(html)._li();
  5862. $ctx2.sendIdx["li"]=1;
  5863. _st($1)._class_("column_label");
  5864. $2=$1;
  5865. $7=self._referencedClasses();
  5866. $ctx2.sendIdx["referencedClasses"]=1;
  5867. $6=_st($7)._size();
  5868. $5=_st($6)._asString();
  5869. $ctx2.sendIdx["asString"]=1;
  5870. $4="Class references (".__comma($5);
  5871. $ctx2.sendIdx[","]=2;
  5872. $3=_st($4).__comma(")");
  5873. $ctx2.sendIdx[","]=1;
  5874. _st($2)._with_($3);
  5875. $ctx2.sendIdx["with:"]=1;
  5876. $8=_st($1)._style_("font-weight: bold");
  5877. $8;
  5878. return _st(self._referencedClasses())._do_((function(each){
  5879. return smalltalk.withContext(function($ctx3) {
  5880. $9=_st(html)._li();
  5881. $10=$9;
  5882. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5883. $ctx3.sendIdx[","]=3;
  5884. _st($10)._with_($11);
  5885. $12=_st($9)._onClick_((function(){
  5886. return smalltalk.withContext(function($ctx4) {
  5887. return self._openBrowserOn_(each);
  5888. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5889. return $12;
  5890. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5891. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5892. return self}, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},globals.ReferencesBrowser)})},
  5893. args: [],
  5894. 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 ]] ]",
  5895. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5896. referencedClasses: []
  5897. }),
  5898. globals.ReferencesBrowser);
  5899. smalltalk.addMethod(
  5900. smalltalk.method({
  5901. selector: "updateSendersList",
  5902. protocol: 'updating',
  5903. fn: function (){
  5904. var self=this;
  5905. return smalltalk.withContext(function($ctx1) {
  5906. var $1,$2,$7,$6,$5,$4,$3,$8,$9,$10,$11,$12;
  5907. _st(self["@sendersList"])._contents_((function(html){
  5908. return smalltalk.withContext(function($ctx2) {
  5909. $1=_st(html)._li();
  5910. $ctx2.sendIdx["li"]=1;
  5911. _st($1)._class_("column_label");
  5912. $2=$1;
  5913. $7=self._senders();
  5914. $ctx2.sendIdx["senders"]=1;
  5915. $6=_st($7)._size();
  5916. $5=_st($6)._asString();
  5917. $ctx2.sendIdx["asString"]=1;
  5918. $4="Senders (".__comma($5);
  5919. $ctx2.sendIdx[","]=2;
  5920. $3=_st($4).__comma(")");
  5921. $ctx2.sendIdx[","]=1;
  5922. _st($2)._with_($3);
  5923. $ctx2.sendIdx["with:"]=1;
  5924. $8=_st($1)._style_("font-weight: bold");
  5925. $8;
  5926. return _st(self._senders())._do_((function(each){
  5927. return smalltalk.withContext(function($ctx3) {
  5928. $9=_st(html)._li();
  5929. $10=$9;
  5930. $11=_st(_st(_st(_st(each)._methodClass())._asString()).__comma(" >> ")).__comma(_st(each)._selector());
  5931. $ctx3.sendIdx[","]=3;
  5932. _st($10)._with_($11);
  5933. $12=_st($9)._onClick_((function(){
  5934. return smalltalk.withContext(function($ctx4) {
  5935. return self._openBrowserOn_(each);
  5936. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  5937. return $12;
  5938. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  5939. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5940. return self}, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},globals.ReferencesBrowser)})},
  5941. args: [],
  5942. 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 ]] ]",
  5943. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"],
  5944. referencedClasses: []
  5945. }),
  5946. globals.ReferencesBrowser);
  5947. smalltalk.addMethod(
  5948. smalltalk.method({
  5949. selector: "search:",
  5950. protocol: 'instance creation',
  5951. fn: function (aString){
  5952. var self=this;
  5953. return smalltalk.withContext(function($ctx1) {
  5954. var $2,$3,$1;
  5955. $2=self._new();
  5956. _st($2)._searchReferencesFor_(aString);
  5957. $3=_st($2)._open();
  5958. $1=$3;
  5959. return $1;
  5960. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.ReferencesBrowser.klass)})},
  5961. args: ["aString"],
  5962. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  5963. messageSends: ["searchReferencesFor:", "new", "open"],
  5964. referencedClasses: []
  5965. }),
  5966. globals.ReferencesBrowser.klass);
  5967. smalltalk.addClass('TestRunner', globals.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  5968. smalltalk.addMethod(
  5969. smalltalk.method({
  5970. selector: "allClasses",
  5971. protocol: 'accessing',
  5972. fn: function (){
  5973. var self=this;
  5974. function $TestCase(){return globals.TestCase||(typeof TestCase=="undefined"?nil:TestCase)}
  5975. return smalltalk.withContext(function($ctx1) {
  5976. var $1;
  5977. $1=_st(_st($TestCase())._allSubclasses())._select_((function(each){
  5978. return smalltalk.withContext(function($ctx2) {
  5979. return _st(_st(each)._isAbstract())._not();
  5980. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  5981. return $1;
  5982. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},globals.TestRunner)})},
  5983. args: [],
  5984. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  5985. messageSends: ["select:", "allSubclasses", "not", "isAbstract"],
  5986. referencedClasses: ["TestCase"]
  5987. }),
  5988. globals.TestRunner);
  5989. smalltalk.addMethod(
  5990. smalltalk.method({
  5991. selector: "classes",
  5992. protocol: 'accessing',
  5993. fn: function (){
  5994. var self=this;
  5995. return smalltalk.withContext(function($ctx1) {
  5996. var $2,$1;
  5997. $1=_st(_st(self._allClasses())._select_((function(each){
  5998. return smalltalk.withContext(function($ctx2) {
  5999. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6000. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  6001. return smalltalk.withContext(function($ctx2) {
  6002. $2=_st(a)._name();
  6003. $ctx2.sendIdx["name"]=1;
  6004. return _st($2).__gt(_st(b)._name());
  6005. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})}));
  6006. return $1;
  6007. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.TestRunner)})},
  6008. args: [],
  6009. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  6010. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"],
  6011. referencedClasses: []
  6012. }),
  6013. globals.TestRunner);
  6014. smalltalk.addMethod(
  6015. smalltalk.method({
  6016. selector: "initialize",
  6017. protocol: 'initialization',
  6018. fn: function (){
  6019. var self=this;
  6020. function $TestResult(){return globals.TestResult||(typeof TestResult=="undefined"?nil:TestResult)}
  6021. return smalltalk.withContext(function($ctx1) {
  6022. globals.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []);
  6023. self["@result"]=_st($TestResult())._new();
  6024. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TestRunner)})},
  6025. args: [],
  6026. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6027. messageSends: ["initialize", "new"],
  6028. referencedClasses: ["TestResult"]
  6029. }),
  6030. globals.TestRunner);
  6031. smalltalk.addMethod(
  6032. smalltalk.method({
  6033. selector: "isSelectedCategory:",
  6034. protocol: 'testing',
  6035. fn: function (aCategory){
  6036. var self=this;
  6037. return smalltalk.withContext(function($ctx1) {
  6038. var $1;
  6039. $1=_st(self._selectedCategories())._includes_(aCategory);
  6040. return $1;
  6041. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6042. args: ["aCategory"],
  6043. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  6044. messageSends: ["includes:", "selectedCategories"],
  6045. referencedClasses: []
  6046. }),
  6047. globals.TestRunner);
  6048. smalltalk.addMethod(
  6049. smalltalk.method({
  6050. selector: "isSelectedClass:",
  6051. protocol: 'testing',
  6052. fn: function (aClass){
  6053. var self=this;
  6054. return smalltalk.withContext(function($ctx1) {
  6055. var $1;
  6056. $1=_st(self._selectedClasses())._includes_(aClass);
  6057. return $1;
  6058. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},globals.TestRunner)})},
  6059. args: ["aClass"],
  6060. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  6061. messageSends: ["includes:", "selectedClasses"],
  6062. referencedClasses: []
  6063. }),
  6064. globals.TestRunner);
  6065. smalltalk.addMethod(
  6066. smalltalk.method({
  6067. selector: "label",
  6068. protocol: 'accessing',
  6069. fn: function (){
  6070. var self=this;
  6071. return "SUnit";
  6072. },
  6073. args: [],
  6074. source: "label\x0a\x09^ 'SUnit'",
  6075. messageSends: [],
  6076. referencedClasses: []
  6077. }),
  6078. globals.TestRunner);
  6079. smalltalk.addMethod(
  6080. smalltalk.method({
  6081. selector: "packages",
  6082. protocol: 'accessing',
  6083. fn: function (){
  6084. var self=this;
  6085. var packages;
  6086. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6087. return smalltalk.withContext(function($ctx1) {
  6088. var $2,$3,$1,$4;
  6089. packages=_st($Array())._new();
  6090. _st(self._allClasses())._do_((function(each){
  6091. return smalltalk.withContext(function($ctx2) {
  6092. $2=packages;
  6093. $3=_st(each)._category();
  6094. $ctx2.sendIdx["category"]=1;
  6095. $1=_st($2)._includes_($3);
  6096. if(! smalltalk.assert($1)){
  6097. return _st(packages)._add_(_st(each)._category());
  6098. };
  6099. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6100. $4=_st(packages)._sort();
  6101. return $4;
  6102. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.TestRunner)})},
  6103. args: [],
  6104. source: "packages\x0a\x09| packages |\x0a\x09packages := Array new.\x0a\x09self allClasses do: [ :each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09\x09packages add: each category ]].\x0a\x09^ packages sort",
  6105. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6106. referencedClasses: ["Array"]
  6107. }),
  6108. globals.TestRunner);
  6109. smalltalk.addMethod(
  6110. smalltalk.method({
  6111. selector: "performFailure:",
  6112. protocol: 'actions',
  6113. fn: function (aTestCase){
  6114. var self=this;
  6115. return smalltalk.withContext(function($ctx1) {
  6116. _st(aTestCase)._runCase();
  6117. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},globals.TestRunner)})},
  6118. args: ["aTestCase"],
  6119. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6120. messageSends: ["runCase"],
  6121. referencedClasses: []
  6122. }),
  6123. globals.TestRunner);
  6124. smalltalk.addMethod(
  6125. smalltalk.method({
  6126. selector: "printErrors",
  6127. protocol: 'printing',
  6128. fn: function (){
  6129. var self=this;
  6130. return smalltalk.withContext(function($ctx1) {
  6131. var $1;
  6132. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6133. return $1;
  6134. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},globals.TestRunner)})},
  6135. args: [],
  6136. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  6137. messageSends: [",", "asString", "size", "errors", "result"],
  6138. referencedClasses: []
  6139. }),
  6140. globals.TestRunner);
  6141. smalltalk.addMethod(
  6142. smalltalk.method({
  6143. selector: "printFailures",
  6144. protocol: 'printing',
  6145. fn: function (){
  6146. var self=this;
  6147. return smalltalk.withContext(function($ctx1) {
  6148. var $1;
  6149. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6150. return $1;
  6151. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},globals.TestRunner)})},
  6152. args: [],
  6153. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  6154. messageSends: [",", "asString", "size", "failures", "result"],
  6155. referencedClasses: []
  6156. }),
  6157. globals.TestRunner);
  6158. smalltalk.addMethod(
  6159. smalltalk.method({
  6160. selector: "printPasses",
  6161. protocol: 'printing',
  6162. fn: function (){
  6163. var self=this;
  6164. return smalltalk.withContext(function($ctx1) {
  6165. var $6,$5,$9,$8,$7,$4,$3,$2,$1;
  6166. $6=self._result();
  6167. $ctx1.sendIdx["result"]=1;
  6168. $5=_st($6)._runs();
  6169. $9=self._result();
  6170. $ctx1.sendIdx["result"]=2;
  6171. $8=_st($9)._errors();
  6172. $7=_st($8)._size();
  6173. $ctx1.sendIdx["size"]=1;
  6174. $4=_st($5).__minus($7);
  6175. $3=_st($4).__minus(_st(_st(self._result())._failures())._size());
  6176. $ctx1.sendIdx["-"]=1;
  6177. $2=_st($3)._asString();
  6178. $1=_st($2).__comma(" passes, ");
  6179. return $1;
  6180. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},globals.TestRunner)})},
  6181. args: [],
  6182. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6183. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6184. referencedClasses: []
  6185. }),
  6186. globals.TestRunner);
  6187. smalltalk.addMethod(
  6188. smalltalk.method({
  6189. selector: "printTotal",
  6190. protocol: 'printing',
  6191. fn: function (){
  6192. var self=this;
  6193. return smalltalk.withContext(function($ctx1) {
  6194. var $1;
  6195. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6196. return $1;
  6197. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},globals.TestRunner)})},
  6198. args: [],
  6199. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  6200. messageSends: [",", "asString", "total", "result"],
  6201. referencedClasses: []
  6202. }),
  6203. globals.TestRunner);
  6204. smalltalk.addMethod(
  6205. smalltalk.method({
  6206. selector: "progressBar",
  6207. protocol: 'accessing',
  6208. fn: function (){
  6209. var self=this;
  6210. function $ProgressBar(){return globals.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6211. return smalltalk.withContext(function($ctx1) {
  6212. var $2,$1;
  6213. $2=self["@progressBar"];
  6214. if(($receiver = $2) == nil || $receiver == null){
  6215. self["@progressBar"]=_st($ProgressBar())._new();
  6216. $1=self["@progressBar"];
  6217. } else {
  6218. $1=$2;
  6219. };
  6220. return $1;
  6221. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},globals.TestRunner)})},
  6222. args: [],
  6223. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  6224. messageSends: ["ifNil:", "new"],
  6225. referencedClasses: ["ProgressBar"]
  6226. }),
  6227. globals.TestRunner);
  6228. smalltalk.addMethod(
  6229. smalltalk.method({
  6230. selector: "renderBoxOn:",
  6231. protocol: 'rendering',
  6232. fn: function (html){
  6233. var self=this;
  6234. return smalltalk.withContext(function($ctx1) {
  6235. var $1;
  6236. self._renderCategoriesOn_(html);
  6237. self._renderClassesOn_(html);
  6238. $1=self._renderResultsOn_(html);
  6239. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.TestRunner)})},
  6240. args: ["html"],
  6241. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6242. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6243. referencedClasses: []
  6244. }),
  6245. globals.TestRunner);
  6246. smalltalk.addMethod(
  6247. smalltalk.method({
  6248. selector: "renderButtonsOn:",
  6249. protocol: 'rendering',
  6250. fn: function (html){
  6251. var self=this;
  6252. return smalltalk.withContext(function($ctx1) {
  6253. var $1,$2;
  6254. $1=_st(html)._button();
  6255. _st($1)._with_("Run selected");
  6256. $2=_st($1)._onClick_((function(){
  6257. return smalltalk.withContext(function($ctx2) {
  6258. return self._run_(self._testCases());
  6259. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6260. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.TestRunner)})},
  6261. args: ["html"],
  6262. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  6263. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6264. referencedClasses: []
  6265. }),
  6266. globals.TestRunner);
  6267. smalltalk.addMethod(
  6268. smalltalk.method({
  6269. selector: "renderCategoriesOn:",
  6270. protocol: 'rendering',
  6271. fn: function (html){
  6272. var self=this;
  6273. return smalltalk.withContext(function($ctx1) {
  6274. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6275. self._updateCategoriesList();
  6276. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},globals.TestRunner)})},
  6277. args: ["html"],
  6278. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6279. messageSends: ["class:", "ul", "updateCategoriesList"],
  6280. referencedClasses: []
  6281. }),
  6282. globals.TestRunner);
  6283. smalltalk.addMethod(
  6284. smalltalk.method({
  6285. selector: "renderClassesOn:",
  6286. protocol: 'rendering',
  6287. fn: function (html){
  6288. var self=this;
  6289. return smalltalk.withContext(function($ctx1) {
  6290. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6291. self._updateClassesList();
  6292. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},globals.TestRunner)})},
  6293. args: ["html"],
  6294. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6295. messageSends: ["class:", "ul", "updateClassesList"],
  6296. referencedClasses: []
  6297. }),
  6298. globals.TestRunner);
  6299. smalltalk.addMethod(
  6300. smalltalk.method({
  6301. selector: "renderErrorsOn:",
  6302. protocol: 'rendering',
  6303. fn: function (html){
  6304. var self=this;
  6305. return smalltalk.withContext(function($ctx1) {
  6306. var $1,$2,$3,$4;
  6307. _st(_st(self._result())._errors())._do_((function(each){
  6308. return smalltalk.withContext(function($ctx2) {
  6309. $1=_st(html)._li();
  6310. _st($1)._class_("errors");
  6311. $2=$1;
  6312. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6313. $ctx2.sendIdx[","]=1;
  6314. _st($2)._with_($3);
  6315. $4=_st($1)._onClick_((function(){
  6316. return smalltalk.withContext(function($ctx3) {
  6317. return self._performFailure_(each);
  6318. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6319. return $4;
  6320. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6321. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},globals.TestRunner)})},
  6322. args: ["html"],
  6323. source: "renderErrorsOn: html\x0a\x09self result errors do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'errors';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  6324. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6325. referencedClasses: []
  6326. }),
  6327. globals.TestRunner);
  6328. smalltalk.addMethod(
  6329. smalltalk.method({
  6330. selector: "renderFailuresOn:",
  6331. protocol: 'rendering',
  6332. fn: function (html){
  6333. var self=this;
  6334. return smalltalk.withContext(function($ctx1) {
  6335. var $1,$2,$3,$4;
  6336. _st(_st(self._result())._failures())._do_((function(each){
  6337. return smalltalk.withContext(function($ctx2) {
  6338. $1=_st(html)._li();
  6339. _st($1)._class_("failures");
  6340. $2=$1;
  6341. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6342. $ctx2.sendIdx[","]=1;
  6343. _st($2)._with_($3);
  6344. $4=_st($1)._onClick_((function(){
  6345. return smalltalk.withContext(function($ctx3) {
  6346. return self._performFailure_(each);
  6347. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6348. return $4;
  6349. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6350. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},globals.TestRunner)})},
  6351. args: ["html"],
  6352. source: "renderFailuresOn: html\x0a\x09self result failures do: [ :each |\x0a\x09\x09html li\x0a\x09\x09\x09class: 'failures';\x0a\x09\x09\x09with: each class name, ' >> ', each selector;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self performFailure: each ]]",
  6353. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6354. referencedClasses: []
  6355. }),
  6356. globals.TestRunner);
  6357. smalltalk.addMethod(
  6358. smalltalk.method({
  6359. selector: "renderResultsOn:",
  6360. protocol: 'rendering',
  6361. fn: function (html){
  6362. var self=this;
  6363. return smalltalk.withContext(function($ctx1) {
  6364. self["@statusDiv"]=_st(html)._div();
  6365. _st(html)._with_(self._progressBar());
  6366. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6367. self._updateMethodsList();
  6368. self._updateStatusDiv();
  6369. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},globals.TestRunner)})},
  6370. args: ["html"],
  6371. 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",
  6372. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6373. referencedClasses: []
  6374. }),
  6375. globals.TestRunner);
  6376. smalltalk.addMethod(
  6377. smalltalk.method({
  6378. selector: "result",
  6379. protocol: 'accessing',
  6380. fn: function (){
  6381. var self=this;
  6382. var $1;
  6383. $1=self["@result"];
  6384. return $1;
  6385. },
  6386. args: [],
  6387. source: "result\x0a\x09^ result",
  6388. messageSends: [],
  6389. referencedClasses: []
  6390. }),
  6391. globals.TestRunner);
  6392. smalltalk.addMethod(
  6393. smalltalk.method({
  6394. selector: "run:",
  6395. protocol: 'actions',
  6396. fn: function (aCollection){
  6397. var self=this;
  6398. var worker;
  6399. function $TestSuiteRunner(){return globals.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6400. function $ResultAnnouncement(){return globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6401. return smalltalk.withContext(function($ctx1) {
  6402. var $1;
  6403. worker=_st($TestSuiteRunner())._on_(aCollection);
  6404. self["@result"]=_st(worker)._result();
  6405. $ctx1.sendIdx["result"]=1;
  6406. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6407. return smalltalk.withContext(function($ctx2) {
  6408. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  6409. if(smalltalk.assert($1)){
  6410. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6411. self._updateStatusDiv();
  6412. return self._updateMethodsList();
  6413. };
  6414. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6415. _st(worker)._run();
  6416. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},globals.TestRunner)})},
  6417. args: ["aCollection"],
  6418. source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a\x09worker announcer on: ResultAnnouncement do: [ :ann |\x0a\x09\x09ann result == result ifTrue: [\x0a\x09\x09\x09self progressBar updatePercent: result runs / result total * 100.\x0a\x09\x09\x09self updateStatusDiv.\x0a\x09\x09\x09self updateMethodsList\x0a\x09\x09]\x0a\x09].\x0a\x09worker run",
  6419. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6420. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6421. }),
  6422. globals.TestRunner);
  6423. smalltalk.addMethod(
  6424. smalltalk.method({
  6425. selector: "selectAllCategories",
  6426. protocol: 'actions',
  6427. fn: function (){
  6428. var self=this;
  6429. return smalltalk.withContext(function($ctx1) {
  6430. var $1,$2;
  6431. _st(self._packages())._do_((function(each){
  6432. return smalltalk.withContext(function($ctx2) {
  6433. $1=_st(self["@selectedCategories"])._includes_(each);
  6434. if(! smalltalk.assert($1)){
  6435. return _st(self._selectedCategories())._add_(each);
  6436. };
  6437. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6438. self._updateCategoriesList();
  6439. $2=self._updateClassesList();
  6440. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},globals.TestRunner)})},
  6441. args: [],
  6442. source: "selectAllCategories\x0a\x09self packages do: [ :each |\x0a\x09\x09(selectedCategories includes: each) ifFalse: [\x0a\x09\x09\x09self selectedCategories add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6443. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6444. referencedClasses: []
  6445. }),
  6446. globals.TestRunner);
  6447. smalltalk.addMethod(
  6448. smalltalk.method({
  6449. selector: "selectAllClasses",
  6450. protocol: 'actions',
  6451. fn: function (){
  6452. var self=this;
  6453. return smalltalk.withContext(function($ctx1) {
  6454. var $1,$2;
  6455. _st(self._classes())._do_((function(each){
  6456. return smalltalk.withContext(function($ctx2) {
  6457. $1=_st(self["@selectedClasses"])._includes_(each);
  6458. if(! smalltalk.assert($1)){
  6459. return _st(self._selectedClasses())._add_(each);
  6460. };
  6461. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6462. self._updateCategoriesList();
  6463. $2=self._updateClassesList();
  6464. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},globals.TestRunner)})},
  6465. args: [],
  6466. source: "selectAllClasses\x0a\x09self classes do: [ :each |\x0a\x09\x09(selectedClasses includes: each) ifFalse: [\x0a\x09\x09\x09self selectedClasses add: each ]].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6467. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6468. referencedClasses: []
  6469. }),
  6470. globals.TestRunner);
  6471. smalltalk.addMethod(
  6472. smalltalk.method({
  6473. selector: "selectedCategories",
  6474. protocol: 'accessing',
  6475. fn: function (){
  6476. var self=this;
  6477. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6478. return smalltalk.withContext(function($ctx1) {
  6479. var $2,$1;
  6480. $2=self["@selectedCategories"];
  6481. if(($receiver = $2) == nil || $receiver == null){
  6482. self["@selectedCategories"]=_st($Array())._new();
  6483. $1=self["@selectedCategories"];
  6484. } else {
  6485. $1=$2;
  6486. };
  6487. return $1;
  6488. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},globals.TestRunner)})},
  6489. args: [],
  6490. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  6491. messageSends: ["ifNil:", "new"],
  6492. referencedClasses: ["Array"]
  6493. }),
  6494. globals.TestRunner);
  6495. smalltalk.addMethod(
  6496. smalltalk.method({
  6497. selector: "selectedClasses",
  6498. protocol: 'accessing',
  6499. fn: function (){
  6500. var self=this;
  6501. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6502. return smalltalk.withContext(function($ctx1) {
  6503. var $2,$1;
  6504. $2=self["@selectedClasses"];
  6505. if(($receiver = $2) == nil || $receiver == null){
  6506. self["@selectedClasses"]=_st($Array())._new();
  6507. $1=self["@selectedClasses"];
  6508. } else {
  6509. $1=$2;
  6510. };
  6511. return $1;
  6512. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},globals.TestRunner)})},
  6513. args: [],
  6514. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  6515. messageSends: ["ifNil:", "new"],
  6516. referencedClasses: ["Array"]
  6517. }),
  6518. globals.TestRunner);
  6519. smalltalk.addMethod(
  6520. smalltalk.method({
  6521. selector: "statusInfo",
  6522. protocol: 'accessing',
  6523. fn: function (){
  6524. var self=this;
  6525. return smalltalk.withContext(function($ctx1) {
  6526. var $2,$1;
  6527. $2=_st(_st(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  6528. $ctx1.sendIdx[","]=2;
  6529. $1=_st($2).__comma(self._printFailures());
  6530. $ctx1.sendIdx[","]=1;
  6531. return $1;
  6532. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},globals.TestRunner)})},
  6533. args: [],
  6534. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  6535. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6536. referencedClasses: []
  6537. }),
  6538. globals.TestRunner);
  6539. smalltalk.addMethod(
  6540. smalltalk.method({
  6541. selector: "testCases",
  6542. protocol: 'accessing',
  6543. fn: function (){
  6544. var self=this;
  6545. var testCases;
  6546. return smalltalk.withContext(function($ctx1) {
  6547. var $1;
  6548. testCases=[];
  6549. _st(_st(self._selectedClasses())._select_((function(each){
  6550. return smalltalk.withContext(function($ctx2) {
  6551. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6552. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6553. return smalltalk.withContext(function($ctx2) {
  6554. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6555. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6556. $1=testCases;
  6557. return $1;
  6558. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},globals.TestRunner)})},
  6559. args: [],
  6560. 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",
  6561. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6562. referencedClasses: []
  6563. }),
  6564. globals.TestRunner);
  6565. smalltalk.addMethod(
  6566. smalltalk.method({
  6567. selector: "toggleCategory:",
  6568. protocol: 'actions',
  6569. fn: function (aCategory){
  6570. var self=this;
  6571. return smalltalk.withContext(function($ctx1) {
  6572. var $1,$2;
  6573. $1=self._isSelectedCategory_(aCategory);
  6574. if(smalltalk.assert($1)){
  6575. _st(self["@selectedCategories"])._remove_(aCategory);
  6576. } else {
  6577. _st(self["@selectedCategories"])._add_(aCategory);
  6578. };
  6579. self._updateCategoriesList();
  6580. $2=self._updateClassesList();
  6581. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6582. args: ["aCategory"],
  6583. source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory)\x0a\x09\x09ifFalse: [ selectedCategories add: aCategory ]\x0a\x09\x09ifTrue: [ selectedCategories remove: aCategory ].\x0a\x09self\x0a\x09\x09updateCategoriesList;\x0a\x09\x09updateClassesList",
  6584. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6585. referencedClasses: []
  6586. }),
  6587. globals.TestRunner);
  6588. smalltalk.addMethod(
  6589. smalltalk.method({
  6590. selector: "toggleClass:",
  6591. protocol: 'actions',
  6592. fn: function (aClass){
  6593. var self=this;
  6594. return smalltalk.withContext(function($ctx1) {
  6595. var $1;
  6596. $1=self._isSelectedClass_(aClass);
  6597. if(smalltalk.assert($1)){
  6598. _st(self["@selectedClasses"])._remove_(aClass);
  6599. } else {
  6600. _st(self["@selectedClasses"])._add_(aClass);
  6601. };
  6602. self._updateClassesList();
  6603. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},globals.TestRunner)})},
  6604. args: ["aClass"],
  6605. source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass)\x0a\x09\x09ifFalse: [ selectedClasses add: aClass ]\x0a\x09\x09ifTrue: [ selectedClasses remove: aClass ].\x0a\x09self\x0a\x09\x09updateClassesList",
  6606. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6607. referencedClasses: []
  6608. }),
  6609. globals.TestRunner);
  6610. smalltalk.addMethod(
  6611. smalltalk.method({
  6612. selector: "updateCategoriesList",
  6613. protocol: 'updating',
  6614. fn: function (){
  6615. var self=this;
  6616. return smalltalk.withContext(function($ctx1) {
  6617. var $1,$2,$3,$4,$5;
  6618. _st(self["@packagesList"])._contents_((function(html){
  6619. return smalltalk.withContext(function($ctx2) {
  6620. $1=_st(html)._li();
  6621. $ctx2.sendIdx["li"]=1;
  6622. _st($1)._class_("all");
  6623. $ctx2.sendIdx["class:"]=1;
  6624. _st($1)._with_("All");
  6625. $ctx2.sendIdx["with:"]=1;
  6626. $2=_st($1)._onClick_((function(){
  6627. return smalltalk.withContext(function($ctx3) {
  6628. return self._selectAllCategories();
  6629. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6630. $ctx2.sendIdx["onClick:"]=1;
  6631. $2;
  6632. return _st(self._packages())._do_((function(each){
  6633. var li;
  6634. return smalltalk.withContext(function($ctx3) {
  6635. li=_st(html)._li();
  6636. li;
  6637. $3=_st(self._selectedCategories())._includes_(each);
  6638. if(smalltalk.assert($3)){
  6639. _st(li)._class_("selected");
  6640. };
  6641. $4=li;
  6642. _st($4)._with_(each);
  6643. $5=_st($4)._onClick_((function(){
  6644. return smalltalk.withContext(function($ctx4) {
  6645. return self._toggleCategory_(each);
  6646. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6647. return $5;
  6648. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6649. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6650. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.TestRunner)})},
  6651. args: [],
  6652. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09\x09html li\x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [ self selectAllCategories ].\x0a\x09self packages do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [ self toggleCategory: each ]] ]",
  6653. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6654. referencedClasses: []
  6655. }),
  6656. globals.TestRunner);
  6657. smalltalk.addMethod(
  6658. smalltalk.method({
  6659. selector: "updateClassesList",
  6660. protocol: 'updating',
  6661. fn: function (){
  6662. var self=this;
  6663. return smalltalk.withContext(function($ctx1) {
  6664. var $1,$2,$3,$4,$5,$6;
  6665. _st(self["@classesList"])._contents_((function(html){
  6666. return smalltalk.withContext(function($ctx2) {
  6667. $1=_st(self._selectedCategories())._isEmpty();
  6668. if(! smalltalk.assert($1)){
  6669. $2=_st(html)._li();
  6670. $ctx2.sendIdx["li"]=1;
  6671. _st($2)._class_("all");
  6672. $ctx2.sendIdx["class:"]=1;
  6673. _st($2)._with_("All");
  6674. $ctx2.sendIdx["with:"]=1;
  6675. $3=_st($2)._onClick_((function(){
  6676. return smalltalk.withContext(function($ctx3) {
  6677. return self._selectAllClasses();
  6678. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6679. $ctx2.sendIdx["onClick:"]=1;
  6680. $3;
  6681. };
  6682. return _st(self._classes())._do_((function(each){
  6683. var li;
  6684. return smalltalk.withContext(function($ctx3) {
  6685. li=_st(html)._li();
  6686. li;
  6687. $4=_st(self._selectedClasses())._includes_(each);
  6688. if(smalltalk.assert($4)){
  6689. _st(li)._class_("selected");
  6690. };
  6691. $5=li;
  6692. _st($5)._with_(_st(each)._name());
  6693. $6=_st($5)._onClick_((function(){
  6694. return smalltalk.withContext(function($ctx4) {
  6695. return self._toggleClass_(each);
  6696. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6697. return $6;
  6698. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6699. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6700. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.TestRunner)})},
  6701. args: [],
  6702. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [ self selectAllClasses ]].\x0a\x09self classes do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [ self toggleClass: each ]] ]",
  6703. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6704. referencedClasses: []
  6705. }),
  6706. globals.TestRunner);
  6707. smalltalk.addMethod(
  6708. smalltalk.method({
  6709. selector: "updateMethodsList",
  6710. protocol: 'updating',
  6711. fn: function (){
  6712. var self=this;
  6713. return smalltalk.withContext(function($ctx1) {
  6714. _st(self["@methodsList"])._contents_((function(html){
  6715. return smalltalk.withContext(function($ctx2) {
  6716. self._renderErrorsOn_(html);
  6717. return self._renderFailuresOn_(html);
  6718. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6719. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.TestRunner)})},
  6720. args: [],
  6721. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  6722. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6723. referencedClasses: []
  6724. }),
  6725. globals.TestRunner);
  6726. smalltalk.addMethod(
  6727. smalltalk.method({
  6728. selector: "updateStatusDiv",
  6729. protocol: 'updating',
  6730. fn: function (){
  6731. var self=this;
  6732. return smalltalk.withContext(function($ctx1) {
  6733. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6734. _st(self["@statusDiv"])._contents_((function(html){
  6735. return smalltalk.withContext(function($ctx2) {
  6736. return _st(_st(html)._span())._with_(self._statusInfo());
  6737. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6738. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},globals.TestRunner)})},
  6739. args: [],
  6740. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  6741. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6742. referencedClasses: []
  6743. }),
  6744. globals.TestRunner);
  6745. smalltalk.addClass('Workspace', globals.TabWidget, ['sourceArea'], 'IDE');
  6746. smalltalk.addMethod(
  6747. smalltalk.method({
  6748. selector: "clearWorkspace",
  6749. protocol: 'actions',
  6750. fn: function (){
  6751. var self=this;
  6752. return smalltalk.withContext(function($ctx1) {
  6753. _st(self["@sourceArea"])._clear();
  6754. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},globals.Workspace)})},
  6755. args: [],
  6756. source: "clearWorkspace\x0a\x09sourceArea clear",
  6757. messageSends: ["clear"],
  6758. referencedClasses: []
  6759. }),
  6760. globals.Workspace);
  6761. smalltalk.addMethod(
  6762. smalltalk.method({
  6763. selector: "doIt",
  6764. protocol: 'actions',
  6765. fn: function (){
  6766. var self=this;
  6767. return smalltalk.withContext(function($ctx1) {
  6768. _st(self["@sourceArea"])._doIt();
  6769. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},globals.Workspace)})},
  6770. args: [],
  6771. source: "doIt\x0a\x09sourceArea doIt",
  6772. messageSends: ["doIt"],
  6773. referencedClasses: []
  6774. }),
  6775. globals.Workspace);
  6776. smalltalk.addMethod(
  6777. smalltalk.method({
  6778. selector: "fileIn",
  6779. protocol: 'actions',
  6780. fn: function (){
  6781. var self=this;
  6782. return smalltalk.withContext(function($ctx1) {
  6783. _st(self["@sourceArea"])._fileIn();
  6784. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.Workspace)})},
  6785. args: [],
  6786. source: "fileIn\x0a\x09sourceArea fileIn",
  6787. messageSends: ["fileIn"],
  6788. referencedClasses: []
  6789. }),
  6790. globals.Workspace);
  6791. smalltalk.addMethod(
  6792. smalltalk.method({
  6793. selector: "inspectIt",
  6794. protocol: 'actions',
  6795. fn: function (){
  6796. var self=this;
  6797. return smalltalk.withContext(function($ctx1) {
  6798. _st(self["@sourceArea"])._inspectIt();
  6799. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.Workspace)})},
  6800. args: [],
  6801. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6802. messageSends: ["inspectIt"],
  6803. referencedClasses: []
  6804. }),
  6805. globals.Workspace);
  6806. smalltalk.addMethod(
  6807. smalltalk.method({
  6808. selector: "label",
  6809. protocol: 'accessing',
  6810. fn: function (){
  6811. var self=this;
  6812. return "Workspace";
  6813. },
  6814. args: [],
  6815. source: "label\x0a\x09^ 'Workspace'",
  6816. messageSends: [],
  6817. referencedClasses: []
  6818. }),
  6819. globals.Workspace);
  6820. smalltalk.addMethod(
  6821. smalltalk.method({
  6822. selector: "printIt",
  6823. protocol: 'actions',
  6824. fn: function (){
  6825. var self=this;
  6826. return smalltalk.withContext(function($ctx1) {
  6827. _st(self["@sourceArea"])._printIt();
  6828. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.Workspace)})},
  6829. args: [],
  6830. source: "printIt\x0a\x09sourceArea printIt",
  6831. messageSends: ["printIt"],
  6832. referencedClasses: []
  6833. }),
  6834. globals.Workspace);
  6835. smalltalk.addMethod(
  6836. smalltalk.method({
  6837. selector: "renderBoxOn:",
  6838. protocol: 'rendering',
  6839. fn: function (html){
  6840. var self=this;
  6841. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  6842. return smalltalk.withContext(function($ctx1) {
  6843. self["@sourceArea"]=_st($SourceArea())._new();
  6844. _st(self["@sourceArea"])._renderOn_(html);
  6845. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Workspace)})},
  6846. args: ["html"],
  6847. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  6848. messageSends: ["new", "renderOn:"],
  6849. referencedClasses: ["SourceArea"]
  6850. }),
  6851. globals.Workspace);
  6852. smalltalk.addMethod(
  6853. smalltalk.method({
  6854. selector: "renderButtonsOn:",
  6855. protocol: 'rendering',
  6856. fn: function (html){
  6857. var self=this;
  6858. return smalltalk.withContext(function($ctx1) {
  6859. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  6860. $1=_st(html)._button();
  6861. $ctx1.sendIdx["button"]=1;
  6862. _st($1)._with_("DoIt");
  6863. $ctx1.sendIdx["with:"]=1;
  6864. _st($1)._title_("ctrl+d");
  6865. $ctx1.sendIdx["title:"]=1;
  6866. $2=_st($1)._onClick_((function(){
  6867. return smalltalk.withContext(function($ctx2) {
  6868. return self._doIt();
  6869. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6870. $ctx1.sendIdx["onClick:"]=1;
  6871. $3=_st(html)._button();
  6872. $ctx1.sendIdx["button"]=2;
  6873. _st($3)._with_("PrintIt");
  6874. $ctx1.sendIdx["with:"]=2;
  6875. _st($3)._title_("ctrl+p");
  6876. $ctx1.sendIdx["title:"]=2;
  6877. $4=_st($3)._onClick_((function(){
  6878. return smalltalk.withContext(function($ctx2) {
  6879. return self._printIt();
  6880. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  6881. $ctx1.sendIdx["onClick:"]=2;
  6882. $5=_st(html)._button();
  6883. $ctx1.sendIdx["button"]=3;
  6884. _st($5)._with_("InspectIt");
  6885. $ctx1.sendIdx["with:"]=3;
  6886. _st($5)._title_("ctrl+i");
  6887. $ctx1.sendIdx["title:"]=3;
  6888. $6=_st($5)._onClick_((function(){
  6889. return smalltalk.withContext(function($ctx2) {
  6890. return self._inspectIt();
  6891. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  6892. $ctx1.sendIdx["onClick:"]=3;
  6893. $7=_st(html)._button();
  6894. $ctx1.sendIdx["button"]=4;
  6895. _st($7)._with_("FileIn");
  6896. $ctx1.sendIdx["with:"]=4;
  6897. _st($7)._title_("ctrl+f");
  6898. $8=_st($7)._onClick_((function(){
  6899. return smalltalk.withContext(function($ctx2) {
  6900. return self._fileIn();
  6901. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  6902. $ctx1.sendIdx["onClick:"]=4;
  6903. $9=_st(html)._button();
  6904. _st($9)._with_("Clear workspace");
  6905. $10=_st($9)._onClick_((function(){
  6906. return smalltalk.withContext(function($ctx2) {
  6907. return self._clearWorkspace();
  6908. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  6909. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Workspace)})},
  6910. args: ["html"],
  6911. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [ self doIt ].\x0a\x09html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [ self printIt ].\x0a\x09html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [ self inspectIt ].\x0a\x09html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [ self fileIn ].\x0a\x09html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [ self clearWorkspace ]",
  6912. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  6913. referencedClasses: []
  6914. }),
  6915. globals.Workspace);
  6916. smalltalk.addMethod(
  6917. smalltalk.method({
  6918. selector: "show",
  6919. protocol: 'actions',
  6920. fn: function (){
  6921. var self=this;
  6922. return smalltalk.withContext(function($ctx1) {
  6923. globals.Workspace.superclass.fn.prototype._show.apply(_st(self), []);
  6924. _st(self["@sourceArea"])._focus();
  6925. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.Workspace)})},
  6926. args: [],
  6927. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  6928. messageSends: ["show", "focus"],
  6929. referencedClasses: []
  6930. }),
  6931. globals.Workspace);
  6932. smalltalk.addMethod(
  6933. smalltalk.method({
  6934. selector: "inspectOn:",
  6935. protocol: '*IDE',
  6936. fn: function (anInspector){
  6937. var self=this;
  6938. var variables;
  6939. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6940. return smalltalk.withContext(function($ctx1) {
  6941. var $1;
  6942. variables=_st($Dictionary())._new();
  6943. _st(variables)._at_put_("#self",self);
  6944. $ctx1.sendIdx["at:put:"]=1;
  6945. _st(variables)._at_put_("#year",self._year());
  6946. $ctx1.sendIdx["at:put:"]=2;
  6947. _st(variables)._at_put_("#month",self._month());
  6948. $ctx1.sendIdx["at:put:"]=3;
  6949. _st(variables)._at_put_("#day",self._day());
  6950. $ctx1.sendIdx["at:put:"]=4;
  6951. _st(variables)._at_put_("#hours",self._hours());
  6952. $ctx1.sendIdx["at:put:"]=5;
  6953. _st(variables)._at_put_("#minutes",self._minutes());
  6954. $ctx1.sendIdx["at:put:"]=6;
  6955. _st(variables)._at_put_("#seconds",self._seconds());
  6956. $ctx1.sendIdx["at:put:"]=7;
  6957. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  6958. _st(anInspector)._setLabel_(self._printString());
  6959. $1=_st(anInspector)._setVariables_(variables);
  6960. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Date)})},
  6961. args: ["anInspector"],
  6962. 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",
  6963. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  6964. referencedClasses: ["Dictionary"]
  6965. }),
  6966. globals.Date);
  6967. smalltalk.addMethod(
  6968. smalltalk.method({
  6969. selector: "inspectOn:",
  6970. protocol: '*IDE',
  6971. fn: function (anInspector){
  6972. var self=this;
  6973. var variables;
  6974. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6975. return smalltalk.withContext(function($ctx1) {
  6976. var $1;
  6977. variables=_st($Dictionary())._new();
  6978. _st(variables)._at_put_("#self",self);
  6979. $ctx1.sendIdx["at:put:"]=1;
  6980. self._withIndexDo_((function(each,i){
  6981. return smalltalk.withContext(function($ctx2) {
  6982. return _st(variables)._at_put_(i,each);
  6983. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  6984. _st(anInspector)._setLabel_(self._printString());
  6985. $1=_st(anInspector)._setVariables_(variables);
  6986. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Collection)})},
  6987. args: ["anInspector"],
  6988. 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",
  6989. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  6990. referencedClasses: ["Dictionary"]
  6991. }),
  6992. globals.Collection);
  6993. smalltalk.addMethod(
  6994. smalltalk.method({
  6995. selector: "inspectOn:",
  6996. protocol: '*IDE',
  6997. fn: function (anInspector){
  6998. var self=this;
  6999. var label;
  7000. return smalltalk.withContext(function($ctx1) {
  7001. var $3,$2,$1,$5,$4;
  7002. globals.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]);
  7003. $3=self._printString();
  7004. $ctx1.sendIdx["printString"]=1;
  7005. $2=_st($3)._size();
  7006. $1=_st($2).__gt((30));
  7007. if(smalltalk.assert($1)){
  7008. $5=self._printString();
  7009. $ctx1.sendIdx["printString"]=2;
  7010. $4=_st($5)._copyFrom_to_((1),(30));
  7011. label=_st($4).__comma("...'");
  7012. label;
  7013. } else {
  7014. label=self._printString();
  7015. label;
  7016. };
  7017. _st(anInspector)._setLabel_(label);
  7018. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},globals.String)})},
  7019. args: ["anInspector"],
  7020. 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",
  7021. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7022. referencedClasses: []
  7023. }),
  7024. globals.String);
  7025. smalltalk.addMethod(
  7026. smalltalk.method({
  7027. selector: "inspectOn:",
  7028. protocol: '*IDE',
  7029. fn: function (anInspector){
  7030. var self=this;
  7031. var variables;
  7032. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7033. return smalltalk.withContext(function($ctx1) {
  7034. var $1;
  7035. variables=_st($Dictionary())._new();
  7036. _st(variables)._at_put_("#self",self);
  7037. $ctx1.sendIdx["at:put:"]=1;
  7038. _st(variables)._at_put_("#home",self._home());
  7039. $ctx1.sendIdx["at:put:"]=2;
  7040. _st(variables)._at_put_("#receiver",self._receiver());
  7041. $ctx1.sendIdx["at:put:"]=3;
  7042. _st(variables)._at_put_("#selector",self._selector());
  7043. $ctx1.sendIdx["at:put:"]=4;
  7044. _st(variables)._at_put_("#temps",self._temps());
  7045. $ctx1.sendIdx["at:put:"]=5;
  7046. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7047. return smalltalk.withContext(function($ctx2) {
  7048. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7049. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7050. _st(anInspector)._setLabel_(self._printString());
  7051. $1=_st(anInspector)._setVariables_(variables);
  7052. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.MethodContext)})},
  7053. args: ["anInspector"],
  7054. 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",
  7055. messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7056. referencedClasses: ["Dictionary"]
  7057. }),
  7058. globals.MethodContext);
  7059. smalltalk.addMethod(
  7060. smalltalk.method({
  7061. selector: "inspectOn:",
  7062. protocol: '*IDE',
  7063. fn: function (anInspector){
  7064. var self=this;
  7065. var variables;
  7066. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7067. return smalltalk.withContext(function($ctx1) {
  7068. var $1;
  7069. variables=_st($Dictionary())._new();
  7070. _st(variables)._at_put_("#self",self);
  7071. $ctx1.sendIdx["at:put:"]=1;
  7072. _st(variables)._at_put_("#keys",self._keys());
  7073. $ctx1.sendIdx["at:put:"]=2;
  7074. self._keysAndValuesDo_((function(key,value){
  7075. return smalltalk.withContext(function($ctx2) {
  7076. return _st(variables)._at_put_(key,value);
  7077. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  7078. _st(anInspector)._setLabel_(self._printString());
  7079. $1=_st(anInspector)._setVariables_(variables);
  7080. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.AssociativeCollection)})},
  7081. args: ["anInspector"],
  7082. 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",
  7083. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  7084. referencedClasses: ["Dictionary"]
  7085. }),
  7086. globals.AssociativeCollection);
  7087. smalltalk.addMethod(
  7088. smalltalk.method({
  7089. selector: "inspectOn:",
  7090. protocol: '*IDE',
  7091. fn: function (anInspector){
  7092. var self=this;
  7093. var variables,i;
  7094. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7095. return smalltalk.withContext(function($ctx1) {
  7096. var $1;
  7097. variables=_st($Dictionary())._new();
  7098. _st(variables)._at_put_("#self",self);
  7099. $ctx1.sendIdx["at:put:"]=1;
  7100. i=(1);
  7101. self._do_((function(each){
  7102. return smalltalk.withContext(function($ctx2) {
  7103. _st(variables)._at_put_(i,each);
  7104. i=_st(i).__plus((1));
  7105. return i;
  7106. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7107. _st(anInspector)._setLabel_(self._printString());
  7108. $1=_st(anInspector)._setVariables_(variables);
  7109. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},globals.Set)})},
  7110. args: ["anInspector"],
  7111. source: "inspectOn: anInspector\x0a\x09| variables i |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09i := 1.\x0a\x09self do: [ :each |\x0a\x09\x09variables at: i put: each.\x0a\x09\x09i := i + 1 ].\x0a\x09anInspector\x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
  7112. messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"],
  7113. referencedClasses: ["Dictionary"]
  7114. }),
  7115. globals.Set);
  7116. });