IDE.js 268 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432
  1. define("amber_core/IDE", ["amber_vm/smalltalk", "amber_vm/nil", "amber_vm/_st", "amber_vm/globals", "amber_core/Web", "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,$receiver;
  97. $1=self["@nodes"];
  98. if(($receiver = $1) == null || $receiver.isNil){
  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 $ConsoleErrorHandler(){return globals.ConsoleErrorHandler||(typeof ConsoleErrorHandler=="undefined"?nil:ConsoleErrorHandler)}
  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($ConsoleErrorHandler())._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\x09ConsoleErrorHandler new handleError: error ]",
  448. messageSends: ["on:do:", "error:", "new", "open", "handleError:"],
  449. referencedClasses: ["Debugger", "Error", "ConsoleErrorHandler"]
  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,$receiver;
  532. result=self._eval_(self._currentLineOrSelection());
  533. $1=self._onDoIt();
  534. $ctx1.sendIdx["onDoIt"]=1;
  535. if(($receiver = $1) == null || $receiver.isNil){
  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. return smalltalk.withContext(function($ctx1) {
  636. if(anEvent.ctrlKey) {
  637. if(anEvent.keyCode === 80) { //ctrl+p
  638. self._printIt();
  639. anEvent.preventDefault();
  640. return false;
  641. }
  642. if(anEvent.keyCode === 68) { //ctrl+d
  643. self._doIt();
  644. anEvent.preventDefault();
  645. return false;
  646. }
  647. if(anEvent.keyCode === 73) { //ctrl+i
  648. self._inspectIt();
  649. anEvent.preventDefault();
  650. return false;
  651. }
  652. };
  653. return self}, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},globals.SourceArea)})},
  654. args: ["anEvent"],
  655. 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}>",
  656. messageSends: [],
  657. referencedClasses: []
  658. }),
  659. globals.SourceArea);
  660. smalltalk.addMethod(
  661. smalltalk.method({
  662. selector: "inspectIt",
  663. protocol: 'actions',
  664. fn: function (){
  665. var self=this;
  666. return smalltalk.withContext(function($ctx1) {
  667. _st(self._doIt())._inspect();
  668. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.SourceArea)})},
  669. args: [],
  670. source: "inspectIt\x0a\x09self doIt inspect",
  671. messageSends: ["inspect", "doIt"],
  672. referencedClasses: []
  673. }),
  674. globals.SourceArea);
  675. smalltalk.addMethod(
  676. smalltalk.method({
  677. selector: "onDoIt",
  678. protocol: 'accessing',
  679. fn: function (){
  680. var self=this;
  681. var $1;
  682. $1=self["@onDoIt"];
  683. return $1;
  684. },
  685. args: [],
  686. source: "onDoIt\x0a\x09^ onDoIt",
  687. messageSends: [],
  688. referencedClasses: []
  689. }),
  690. globals.SourceArea);
  691. smalltalk.addMethod(
  692. smalltalk.method({
  693. selector: "onDoIt:",
  694. protocol: 'accessing',
  695. fn: function (aBlock){
  696. var self=this;
  697. self["@onDoIt"]=aBlock;
  698. return self},
  699. args: ["aBlock"],
  700. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  701. messageSends: [],
  702. referencedClasses: []
  703. }),
  704. globals.SourceArea);
  705. smalltalk.addMethod(
  706. smalltalk.method({
  707. selector: "onKeyDown:",
  708. protocol: 'events',
  709. fn: function (aBlock){
  710. var self=this;
  711. return smalltalk.withContext(function($ctx1) {
  712. _st(self["@div"])._onKeyDown_(aBlock);
  713. return self}, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},globals.SourceArea)})},
  714. args: ["aBlock"],
  715. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  716. messageSends: ["onKeyDown:"],
  717. referencedClasses: []
  718. }),
  719. globals.SourceArea);
  720. smalltalk.addMethod(
  721. smalltalk.method({
  722. selector: "onKeyUp:",
  723. protocol: 'events',
  724. fn: function (aBlock){
  725. var self=this;
  726. return smalltalk.withContext(function($ctx1) {
  727. _st(self["@div"])._onKeyUp_(aBlock);
  728. return self}, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},globals.SourceArea)})},
  729. args: ["aBlock"],
  730. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  731. messageSends: ["onKeyUp:"],
  732. referencedClasses: []
  733. }),
  734. globals.SourceArea);
  735. smalltalk.addMethod(
  736. smalltalk.method({
  737. selector: "print:",
  738. protocol: 'actions',
  739. fn: function (aString){
  740. var self=this;
  741. var start,stop,currentLine;
  742. function $HashedCollection(){return globals.HashedCollection||(typeof HashedCollection=="undefined"?nil:HashedCollection)}
  743. return smalltalk.withContext(function($ctx1) {
  744. var $1,$2,$4,$3,$5,$6,$7,$8,$9,$10,$12,$11;
  745. $1=_st(self["@editor"])._getCursor_(false);
  746. $ctx1.sendIdx["getCursor:"]=1;
  747. currentLine=_st($1)._line();
  748. start=_st($HashedCollection())._new();
  749. $ctx1.sendIdx["new"]=1;
  750. _st(start)._at_put_("line",currentLine);
  751. $ctx1.sendIdx["at:put:"]=1;
  752. $2=start;
  753. $4=_st(self["@editor"])._getCursor_(false);
  754. $ctx1.sendIdx["getCursor:"]=2;
  755. $3=_st($4)._ch();
  756. _st($2)._at_put_("ch",$3);
  757. $ctx1.sendIdx["at:put:"]=2;
  758. $5=_st(self["@editor"])._getSelection();
  759. $ctx1.sendIdx["getSelection"]=1;
  760. _st($5)._ifEmpty_((function(){
  761. return smalltalk.withContext(function($ctx2) {
  762. $6=start;
  763. $7=_st(_st(self["@editor"])._getLine_(currentLine))._size();
  764. $ctx2.sendIdx["size"]=1;
  765. _st($6)._at_put_("ch",$7);
  766. $ctx2.sendIdx["at:put:"]=3;
  767. return _st(self["@editor"])._setSelection_end_(globals.HashedCollection._newFromPairs_(["line",currentLine,"ch",(0)]),start);
  768. $ctx2.sendIdx["setSelection:end:"]=1;
  769. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  770. stop=_st($HashedCollection())._new();
  771. _st(stop)._at_put_("line",currentLine);
  772. $ctx1.sendIdx["at:put:"]=4;
  773. $8=stop;
  774. $9=_st(_st(_st(start)._at_("ch")).__plus(_st(aString)._size())).__plus((2));
  775. $ctx1.sendIdx["+"]=1;
  776. _st($8)._at_put_("ch",$9);
  777. $10=self["@editor"];
  778. $12=_st(_st(_st(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  779. $ctx1.sendIdx[","]=2;
  780. $11=_st($12).__comma(" ");
  781. $ctx1.sendIdx[","]=1;
  782. _st($10)._replaceSelection_($11);
  783. _st(self["@editor"])._setCursor_(_st(self["@editor"])._getCursor_(true));
  784. _st(self["@editor"])._setSelection_end_(stop,start);
  785. return self}, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},globals.SourceArea)})},
  786. args: ["aString"],
  787. 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",
  788. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "+", "at:", "replaceSelection:", ",", "setCursor:"],
  789. referencedClasses: ["HashedCollection"]
  790. }),
  791. globals.SourceArea);
  792. smalltalk.addMethod(
  793. smalltalk.method({
  794. selector: "printIt",
  795. protocol: 'actions',
  796. fn: function (){
  797. var self=this;
  798. return smalltalk.withContext(function($ctx1) {
  799. self._print_(_st(self._doIt())._printString());
  800. self._focus();
  801. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.SourceArea)})},
  802. args: [],
  803. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  804. messageSends: ["print:", "printString", "doIt", "focus"],
  805. referencedClasses: []
  806. }),
  807. globals.SourceArea);
  808. smalltalk.addMethod(
  809. smalltalk.method({
  810. selector: "receiver",
  811. protocol: 'accessing',
  812. fn: function (){
  813. var self=this;
  814. function $DoIt(){return globals.DoIt||(typeof DoIt=="undefined"?nil:DoIt)}
  815. return smalltalk.withContext(function($ctx1) {
  816. var $2,$1,$receiver;
  817. $2=self["@receiver"];
  818. if(($receiver = $2) == null || $receiver.isNil){
  819. $1=_st($DoIt())._new();
  820. } else {
  821. $1=$2;
  822. };
  823. return $1;
  824. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.SourceArea)})},
  825. args: [],
  826. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  827. messageSends: ["ifNil:", "new"],
  828. referencedClasses: ["DoIt"]
  829. }),
  830. globals.SourceArea);
  831. smalltalk.addMethod(
  832. smalltalk.method({
  833. selector: "receiver:",
  834. protocol: 'accessing',
  835. fn: function (anObject){
  836. var self=this;
  837. self["@receiver"]=anObject;
  838. return self},
  839. args: ["anObject"],
  840. source: "receiver: anObject\x0a\x09receiver := anObject",
  841. messageSends: [],
  842. referencedClasses: []
  843. }),
  844. globals.SourceArea);
  845. smalltalk.addMethod(
  846. smalltalk.method({
  847. selector: "renderOn:",
  848. protocol: 'rendering',
  849. fn: function (html){
  850. var self=this;
  851. var textarea;
  852. return smalltalk.withContext(function($ctx1) {
  853. self["@div"]=_st(_st(html)._div())._class_("source");
  854. _st(self["@div"])._with_((function(){
  855. return smalltalk.withContext(function($ctx2) {
  856. textarea=_st(html)._textarea();
  857. return textarea;
  858. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  859. self._setEditorOn_(_st(textarea)._element());
  860. _st(self["@div"])._onKeyDown_((function(e){
  861. return smalltalk.withContext(function($ctx2) {
  862. return self._handleKeyDown_(e);
  863. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)})}));
  864. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},globals.SourceArea)})},
  865. args: ["html"],
  866. 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 ]",
  867. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
  868. referencedClasses: []
  869. }),
  870. globals.SourceArea);
  871. smalltalk.addMethod(
  872. smalltalk.method({
  873. selector: "selection",
  874. protocol: 'accessing',
  875. fn: function (){
  876. var self=this;
  877. return smalltalk.withContext(function($ctx1) {
  878. var $1;
  879. $1=_st(self["@editor"])._getSelection();
  880. return $1;
  881. }, function($ctx1) {$ctx1.fill(self,"selection",{},globals.SourceArea)})},
  882. args: [],
  883. source: "selection\x0a\x09^ editor getSelection",
  884. messageSends: ["getSelection"],
  885. referencedClasses: []
  886. }),
  887. globals.SourceArea);
  888. smalltalk.addMethod(
  889. smalltalk.method({
  890. selector: "setEditorOn:",
  891. protocol: 'accessing',
  892. fn: function (aTextarea){
  893. var self=this;
  894. return smalltalk.withContext(function($ctx1) {
  895. self['@editor'] = CodeMirror.fromTextArea(aTextarea, {
  896. theme: 'ide.codeMirrorTheme'._settingValueIfAbsent_('default'),
  897. mode: 'text/x-stsrc',
  898. lineNumbers: true,
  899. enterMode: 'flat',
  900. indentWithTabs: true,
  901. indentUnit: 4,
  902. matchBrackets: true,
  903. electricChars: false
  904. });
  905. return self}, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},globals.SourceArea)})},
  906. args: ["aTextarea"],
  907. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'ide.codeMirrorTheme'._settingValueIfAbsent_('default'),\x0a\x09\x09mode: 'text/x-stsrc',\x0a\x09\x09lineNumbers: true,\x0a\x09\x09enterMode: 'flat',\x0a\x09\x09indentWithTabs: true,\x0a\x09\x09indentUnit: 4,\x0a\x09\x09matchBrackets: true,\x0a\x09\x09electricChars: false\x0a\x09})>",
  908. messageSends: [],
  909. referencedClasses: []
  910. }),
  911. globals.SourceArea);
  912. smalltalk.addMethod(
  913. smalltalk.method({
  914. selector: "val",
  915. protocol: 'accessing',
  916. fn: function (){
  917. var self=this;
  918. return smalltalk.withContext(function($ctx1) {
  919. var $1;
  920. $1=_st(self["@editor"])._getValue();
  921. return $1;
  922. }, function($ctx1) {$ctx1.fill(self,"val",{},globals.SourceArea)})},
  923. args: [],
  924. source: "val\x0a\x09^ editor getValue",
  925. messageSends: ["getValue"],
  926. referencedClasses: []
  927. }),
  928. globals.SourceArea);
  929. smalltalk.addMethod(
  930. smalltalk.method({
  931. selector: "val:",
  932. protocol: 'accessing',
  933. fn: function (aString){
  934. var self=this;
  935. return smalltalk.withContext(function($ctx1) {
  936. _st(self["@editor"])._setValue_(aString);
  937. return self}, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},globals.SourceArea)})},
  938. args: ["aString"],
  939. source: "val: aString\x0a\x09editor setValue: aString",
  940. messageSends: ["setValue:"],
  941. referencedClasses: []
  942. }),
  943. globals.SourceArea);
  944. smalltalk.addMethod(
  945. smalltalk.method({
  946. selector: "initialize",
  947. protocol: 'initialization',
  948. fn: function (){
  949. var self=this;
  950. return smalltalk.withContext(function($ctx1) {
  951. ($ctx1.supercall = true, globals.SourceArea.klass.superclass.fn.prototype._initialize.apply(_st(self), []));
  952. $ctx1.supercall = false;
  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. return smalltalk.withContext(function($ctx1) {
  968. CodeMirror.keyMap["default"].fallthrough = ["basic"] ;
  969. return self}, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},globals.SourceArea.klass)})},
  970. args: [],
  971. source: "setupCodeMirror\x0a\x09< CodeMirror.keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  972. messageSends: [],
  973. referencedClasses: []
  974. }),
  975. globals.SourceArea.klass);
  976. smalltalk.addClass('TabManager', globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  977. smalltalk.addMethod(
  978. smalltalk.method({
  979. selector: "addTab:",
  980. protocol: 'adding/Removing',
  981. fn: function (aWidget){
  982. var self=this;
  983. return smalltalk.withContext(function($ctx1) {
  984. _st(self._tabs())._add_(aWidget);
  985. _st(aWidget)._appendToJQuery_("#amber"._asJQuery());
  986. _st(aWidget)._hide();
  987. return self}, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},globals.TabManager)})},
  988. args: ["aWidget"],
  989. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  990. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
  991. referencedClasses: []
  992. }),
  993. globals.TabManager);
  994. smalltalk.addMethod(
  995. smalltalk.method({
  996. selector: "close",
  997. protocol: 'actions',
  998. fn: function (){
  999. var self=this;
  1000. return smalltalk.withContext(function($ctx1) {
  1001. var $1,$2,$3;
  1002. $1=self["@opened"];
  1003. if(smalltalk.assert($1)){
  1004. $2="#amber"._asJQuery();
  1005. $ctx1.sendIdx["asJQuery"]=1;
  1006. _st($2)._hide();
  1007. $ctx1.sendIdx["hide"]=1;
  1008. $3=_st(self["@ul"])._asJQuery();
  1009. $ctx1.sendIdx["asJQuery"]=2;
  1010. _st($3)._hide();
  1011. $ctx1.sendIdx["hide"]=2;
  1012. _st(self["@selectedTab"])._hide();
  1013. self._removeBodyMargin();
  1014. _st("body"._asJQuery())._removeClass_("amberBody");
  1015. self["@opened"]=false;
  1016. self["@opened"];
  1017. };
  1018. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabManager)})},
  1019. args: [],
  1020. 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 ]",
  1021. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
  1022. referencedClasses: []
  1023. }),
  1024. globals.TabManager);
  1025. smalltalk.addMethod(
  1026. smalltalk.method({
  1027. selector: "closeTab:",
  1028. protocol: 'actions',
  1029. fn: function (aWidget){
  1030. var self=this;
  1031. return smalltalk.withContext(function($ctx1) {
  1032. self._removeTab_(aWidget);
  1033. self._selectTab_(_st(self._tabs())._last());
  1034. _st(aWidget)._remove();
  1035. self._update();
  1036. return self}, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},globals.TabManager)})},
  1037. args: ["aWidget"],
  1038. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1039. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
  1040. referencedClasses: []
  1041. }),
  1042. globals.TabManager);
  1043. smalltalk.addMethod(
  1044. smalltalk.method({
  1045. selector: "initialize",
  1046. protocol: 'initialization',
  1047. fn: function (){
  1048. var self=this;
  1049. function $Inspector(){return globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  1050. function $IDEInspector(){return globals.IDEInspector||(typeof IDEInspector=="undefined"?nil:IDEInspector)}
  1051. function $IDETranscript(){return globals.IDETranscript||(typeof IDETranscript=="undefined"?nil:IDETranscript)}
  1052. function $Workspace(){return globals.Workspace||(typeof Workspace=="undefined"?nil:Workspace)}
  1053. function $TestRunner(){return globals.TestRunner||(typeof TestRunner=="undefined"?nil:TestRunner)}
  1054. return smalltalk.withContext(function($ctx1) {
  1055. var $1,$2,$3,$4,$5,$6,$7;
  1056. ($ctx1.supercall = true, globals.TabManager.superclass.fn.prototype._initialize.apply(_st(self), []));
  1057. $ctx1.supercall = false;
  1058. _st($Inspector())._register_($IDEInspector());
  1059. self["@opened"]=true;
  1060. $1=(function(html){
  1061. return smalltalk.withContext(function($ctx2) {
  1062. return _st(_st(html)._div())._id_("amber");
  1063. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})});
  1064. $2="body"._asJQuery();
  1065. $ctx1.sendIdx["asJQuery"]=1;
  1066. _st($1)._appendToJQuery_($2);
  1067. $ctx1.sendIdx["appendToJQuery:"]=1;
  1068. $3="body"._asJQuery();
  1069. $ctx1.sendIdx["asJQuery"]=2;
  1070. _st($3)._addClass_("amberBody");
  1071. self._appendToJQuery_("#amber"._asJQuery());
  1072. self._addTab_(_st($IDETranscript())._current());
  1073. $ctx1.sendIdx["addTab:"]=1;
  1074. $4=_st($Workspace())._new();
  1075. $ctx1.sendIdx["new"]=1;
  1076. self._addTab_($4);
  1077. $ctx1.sendIdx["addTab:"]=2;
  1078. $5=self._addTab_(_st($TestRunner())._new());
  1079. self._selectTab_(_st(self._tabs())._last());
  1080. self._onResize_((function(){
  1081. return smalltalk.withContext(function($ctx2) {
  1082. self._updateBodyMargin();
  1083. $6=self._updatePosition();
  1084. $ctx2.sendIdx["updatePosition"]=1;
  1085. return $6;
  1086. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1087. $7=self._onWindowResize_((function(){
  1088. return smalltalk.withContext(function($ctx2) {
  1089. return self._updatePosition();
  1090. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  1091. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TabManager)})},
  1092. args: [],
  1093. 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 ]",
  1094. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
  1095. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"]
  1096. }),
  1097. globals.TabManager);
  1098. smalltalk.addMethod(
  1099. smalltalk.method({
  1100. selector: "labelFor:",
  1101. protocol: 'accessing',
  1102. fn: function (aWidget){
  1103. var self=this;
  1104. var label,maxSize;
  1105. return smalltalk.withContext(function($ctx1) {
  1106. var $1,$4,$3,$2,$5,$6;
  1107. maxSize=(15);
  1108. $1=_st(aWidget)._label();
  1109. $ctx1.sendIdx["label"]=1;
  1110. $4=_st(aWidget)._label();
  1111. $ctx1.sendIdx["label"]=2;
  1112. $3=_st($4)._size();
  1113. $ctx1.sendIdx["size"]=1;
  1114. $2=_st($3)._min_(maxSize);
  1115. label=_st($1)._copyFrom_to_((0),$2);
  1116. $5=_st(_st(_st(aWidget)._label())._size()).__gt(maxSize);
  1117. if(smalltalk.assert($5)){
  1118. label=_st(label).__comma("...");
  1119. label;
  1120. };
  1121. $6=label;
  1122. return $6;
  1123. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},globals.TabManager)})},
  1124. args: ["aWidget"],
  1125. 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",
  1126. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","],
  1127. referencedClasses: []
  1128. }),
  1129. globals.TabManager);
  1130. smalltalk.addMethod(
  1131. smalltalk.method({
  1132. selector: "newBrowserTab",
  1133. protocol: 'actions',
  1134. fn: function (){
  1135. var self=this;
  1136. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1137. return smalltalk.withContext(function($ctx1) {
  1138. _st($Browser())._open();
  1139. return self}, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},globals.TabManager)})},
  1140. args: [],
  1141. source: "newBrowserTab\x0a\x09Browser open",
  1142. messageSends: ["open"],
  1143. referencedClasses: ["Browser"]
  1144. }),
  1145. globals.TabManager);
  1146. smalltalk.addMethod(
  1147. smalltalk.method({
  1148. selector: "onResize:",
  1149. protocol: 'actions',
  1150. fn: function (aBlock){
  1151. var self=this;
  1152. return smalltalk.withContext(function($ctx1) {
  1153. _st("#amber"._asJQuery())._resizable_(globals.HashedCollection._newFromPairs_(["handles","n","resize",aBlock,"minHeight",(230)]));
  1154. return self}, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},globals.TabManager)})},
  1155. args: ["aBlock"],
  1156. 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}",
  1157. messageSends: ["resizable:", "asJQuery"],
  1158. referencedClasses: []
  1159. }),
  1160. globals.TabManager);
  1161. smalltalk.addMethod(
  1162. smalltalk.method({
  1163. selector: "onWindowResize:",
  1164. protocol: 'actions',
  1165. fn: function (aBlock){
  1166. var self=this;
  1167. return smalltalk.withContext(function($ctx1) {
  1168. _st(_st(window)._asJQuery())._resize_(aBlock);
  1169. return self}, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},globals.TabManager)})},
  1170. args: ["aBlock"],
  1171. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1172. messageSends: ["resize:", "asJQuery"],
  1173. referencedClasses: []
  1174. }),
  1175. globals.TabManager);
  1176. smalltalk.addMethod(
  1177. smalltalk.method({
  1178. selector: "open",
  1179. protocol: 'actions',
  1180. fn: function (){
  1181. var self=this;
  1182. return smalltalk.withContext(function($ctx1) {
  1183. var $1,$2,$3;
  1184. $1=self["@opened"];
  1185. if(! smalltalk.assert($1)){
  1186. $2="body"._asJQuery();
  1187. $ctx1.sendIdx["asJQuery"]=1;
  1188. _st($2)._addClass_("amberBody");
  1189. $3="#amber"._asJQuery();
  1190. $ctx1.sendIdx["asJQuery"]=2;
  1191. _st($3)._show();
  1192. $ctx1.sendIdx["show"]=1;
  1193. _st(_st(self["@ul"])._asJQuery())._show();
  1194. $ctx1.sendIdx["show"]=2;
  1195. self._updateBodyMargin();
  1196. _st(self["@selectedTab"])._show();
  1197. self["@opened"]=true;
  1198. self["@opened"];
  1199. };
  1200. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabManager)})},
  1201. args: [],
  1202. 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 ]",
  1203. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
  1204. referencedClasses: []
  1205. }),
  1206. globals.TabManager);
  1207. smalltalk.addMethod(
  1208. smalltalk.method({
  1209. selector: "removeBodyMargin",
  1210. protocol: 'actions',
  1211. fn: function (){
  1212. var self=this;
  1213. return smalltalk.withContext(function($ctx1) {
  1214. self._setBodyMargin_((0));
  1215. return self}, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},globals.TabManager)})},
  1216. args: [],
  1217. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1218. messageSends: ["setBodyMargin:"],
  1219. referencedClasses: []
  1220. }),
  1221. globals.TabManager);
  1222. smalltalk.addMethod(
  1223. smalltalk.method({
  1224. selector: "removeTab:",
  1225. protocol: 'adding/Removing',
  1226. fn: function (aWidget){
  1227. var self=this;
  1228. return smalltalk.withContext(function($ctx1) {
  1229. _st(self._tabs())._remove_(aWidget);
  1230. self._update();
  1231. return self}, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},globals.TabManager)})},
  1232. args: ["aWidget"],
  1233. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1234. messageSends: ["remove:", "tabs", "update"],
  1235. referencedClasses: []
  1236. }),
  1237. globals.TabManager);
  1238. smalltalk.addMethod(
  1239. smalltalk.method({
  1240. selector: "renderOn:",
  1241. protocol: 'rendering',
  1242. fn: function (html){
  1243. var self=this;
  1244. return smalltalk.withContext(function($ctx1) {
  1245. var $1,$2;
  1246. _st(_st(html)._div())._id_("logo");
  1247. $ctx1.sendIdx["id:"]=1;
  1248. self._renderToolbarOn_(html);
  1249. $1=_st(html)._ul();
  1250. _st($1)._id_("amberTabs");
  1251. $2=_st($1)._yourself();
  1252. self["@ul"]=$2;
  1253. self._renderTabs();
  1254. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabManager)})},
  1255. args: ["html"],
  1256. 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",
  1257. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
  1258. referencedClasses: []
  1259. }),
  1260. globals.TabManager);
  1261. smalltalk.addMethod(
  1262. smalltalk.method({
  1263. selector: "renderTabFor:on:",
  1264. protocol: 'rendering',
  1265. fn: function (aWidget,html){
  1266. var self=this;
  1267. var li;
  1268. return smalltalk.withContext(function($ctx1) {
  1269. var $1,$2,$3,$4,$6,$7,$8,$9,$5,$10;
  1270. li=_st(html)._li();
  1271. $1=_st(self["@selectedTab"]).__eq(aWidget);
  1272. if(smalltalk.assert($1)){
  1273. _st(li)._class_("selected");
  1274. $ctx1.sendIdx["class:"]=1;
  1275. };
  1276. $2=li;
  1277. _st($2)._with_((function(){
  1278. return smalltalk.withContext(function($ctx2) {
  1279. $3=_st(html)._span();
  1280. $ctx2.sendIdx["span"]=1;
  1281. _st($3)._class_("ltab");
  1282. $ctx2.sendIdx["class:"]=2;
  1283. $4=_st(html)._span();
  1284. $ctx2.sendIdx["span"]=2;
  1285. _st($4)._class_("mtab");
  1286. $ctx2.sendIdx["class:"]=3;
  1287. $5=_st($4)._with_((function(){
  1288. return smalltalk.withContext(function($ctx3) {
  1289. $6=_st(aWidget)._canBeClosed();
  1290. if(smalltalk.assert($6)){
  1291. $7=_st(html)._span();
  1292. $ctx3.sendIdx["span"]=3;
  1293. _st($7)._class_("close");
  1294. $ctx3.sendIdx["class:"]=4;
  1295. _st($7)._with_("x");
  1296. $ctx3.sendIdx["with:"]=3;
  1297. $8=_st($7)._onClick_((function(){
  1298. return smalltalk.withContext(function($ctx4) {
  1299. return self._closeTab_(aWidget);
  1300. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  1301. $ctx3.sendIdx["onClick:"]=1;
  1302. $8;
  1303. };
  1304. $9=_st(html)._span();
  1305. $ctx3.sendIdx["span"]=4;
  1306. return _st($9)._with_(self._labelFor_(aWidget));
  1307. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1308. $ctx2.sendIdx["with:"]=2;
  1309. $5;
  1310. return _st(_st(html)._span())._class_("rtab");
  1311. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  1312. $ctx1.sendIdx["with:"]=1;
  1313. $10=_st($2)._onClick_((function(){
  1314. return smalltalk.withContext(function($ctx2) {
  1315. return self._selectTab_(aWidget);
  1316. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  1317. return self}, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},globals.TabManager)})},
  1318. args: ["aWidget", "html"],
  1319. 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 ]",
  1320. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"],
  1321. referencedClasses: []
  1322. }),
  1323. globals.TabManager);
  1324. smalltalk.addMethod(
  1325. smalltalk.method({
  1326. selector: "renderTabs",
  1327. protocol: 'rendering',
  1328. fn: function (){
  1329. var self=this;
  1330. return smalltalk.withContext(function($ctx1) {
  1331. var $1,$2,$3,$4,$5;
  1332. _st(self["@ul"])._contents_((function(html){
  1333. return smalltalk.withContext(function($ctx2) {
  1334. _st(self._tabs())._do_((function(each){
  1335. return smalltalk.withContext(function($ctx3) {
  1336. return self._renderTabFor_on_(each,html);
  1337. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)})}));
  1338. $1=_st(html)._li();
  1339. _st($1)._class_("newtab");
  1340. $ctx2.sendIdx["class:"]=1;
  1341. _st($1)._with_((function(){
  1342. return smalltalk.withContext(function($ctx3) {
  1343. $2=_st(html)._span();
  1344. $ctx3.sendIdx["span"]=1;
  1345. _st($2)._class_("ltab");
  1346. $ctx3.sendIdx["class:"]=2;
  1347. $3=_st(html)._span();
  1348. $ctx3.sendIdx["span"]=2;
  1349. _st($3)._class_("mtab");
  1350. $ctx3.sendIdx["class:"]=3;
  1351. $4=_st($3)._with_(" + ");
  1352. $4;
  1353. return _st(_st(html)._span())._class_("rtab");
  1354. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1355. $ctx2.sendIdx["with:"]=1;
  1356. $5=_st($1)._onClick_((function(){
  1357. return smalltalk.withContext(function($ctx3) {
  1358. return self._newBrowserTab();
  1359. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1360. return $5;
  1361. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1362. return self}, function($ctx1) {$ctx1.fill(self,"renderTabs",{},globals.TabManager)})},
  1363. args: [],
  1364. 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 ]]",
  1365. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
  1366. referencedClasses: []
  1367. }),
  1368. globals.TabManager);
  1369. smalltalk.addMethod(
  1370. smalltalk.method({
  1371. selector: "renderToolbarOn:",
  1372. protocol: 'rendering',
  1373. fn: function (html){
  1374. var self=this;
  1375. return smalltalk.withContext(function($ctx1) {
  1376. var $1,$3,$4,$5,$6,$7,$2;
  1377. $1=_st(html)._div();
  1378. $ctx1.sendIdx["div"]=1;
  1379. _st($1)._id_("amber_toolbar");
  1380. $ctx1.sendIdx["id:"]=1;
  1381. $2=_st($1)._with_((function(){
  1382. return smalltalk.withContext(function($ctx2) {
  1383. $3=_st(html)._input();
  1384. _st($3)._class_("implementors");
  1385. $4=_st($3)._yourself();
  1386. self["@input"]=$4;
  1387. self["@input"];
  1388. _st(self["@input"])._onKeyPress_((function(event){
  1389. return smalltalk.withContext(function($ctx3) {
  1390. $5=_st(_st(event)._keyCode()).__eq((13));
  1391. if(smalltalk.assert($5)){
  1392. return self._search_(_st(_st(self["@input"])._asJQuery())._val());
  1393. };
  1394. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)})}));
  1395. $6=_st(html)._div();
  1396. _st($6)._id_("amber_close");
  1397. $7=_st($6)._onClick_((function(){
  1398. return smalltalk.withContext(function($ctx3) {
  1399. return self._close();
  1400. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  1401. return $7;
  1402. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1403. return self}, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},globals.TabManager)})},
  1404. args: ["html"],
  1405. 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 ]]",
  1406. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"],
  1407. referencedClasses: []
  1408. }),
  1409. globals.TabManager);
  1410. smalltalk.addMethod(
  1411. smalltalk.method({
  1412. selector: "search:",
  1413. protocol: 'actions',
  1414. fn: function (aString){
  1415. var self=this;
  1416. var searchedClass;
  1417. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1418. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1419. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  1420. return smalltalk.withContext(function($ctx1) {
  1421. var $1;
  1422. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  1423. $1=_st(searchedClass)._isClass();
  1424. if(smalltalk.assert($1)){
  1425. _st($Browser())._openOn_(searchedClass);
  1426. } else {
  1427. _st($ReferencesBrowser())._search_(aString);
  1428. };
  1429. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},globals.TabManager)})},
  1430. args: ["aString"],
  1431. 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 ]",
  1432. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"],
  1433. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
  1434. }),
  1435. globals.TabManager);
  1436. smalltalk.addMethod(
  1437. smalltalk.method({
  1438. selector: "selectTab:",
  1439. protocol: 'actions',
  1440. fn: function (aWidget){
  1441. var self=this;
  1442. return smalltalk.withContext(function($ctx1) {
  1443. self._open();
  1444. self["@selectedTab"]=aWidget;
  1445. _st(self._tabs())._do_((function(each){
  1446. return smalltalk.withContext(function($ctx2) {
  1447. return _st(each)._hide();
  1448. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  1449. _st(aWidget)._show();
  1450. self._update();
  1451. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},globals.TabManager)})},
  1452. args: ["aWidget"],
  1453. 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",
  1454. messageSends: ["open", "do:", "tabs", "hide", "show", "update"],
  1455. referencedClasses: []
  1456. }),
  1457. globals.TabManager);
  1458. smalltalk.addMethod(
  1459. smalltalk.method({
  1460. selector: "setBodyMargin:",
  1461. protocol: 'actions',
  1462. fn: function (anInteger){
  1463. var self=this;
  1464. return smalltalk.withContext(function($ctx1) {
  1465. _st(".amberBody"._asJQuery())._css_put_("margin-bottom",_st(_st(anInteger)._asString()).__comma("px"));
  1466. return self}, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},globals.TabManager)})},
  1467. args: ["anInteger"],
  1468. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  1469. messageSends: ["css:put:", "asJQuery", ",", "asString"],
  1470. referencedClasses: []
  1471. }),
  1472. globals.TabManager);
  1473. smalltalk.addMethod(
  1474. smalltalk.method({
  1475. selector: "tabs",
  1476. protocol: 'accessing',
  1477. fn: function (){
  1478. var self=this;
  1479. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  1480. return smalltalk.withContext(function($ctx1) {
  1481. var $2,$1,$receiver;
  1482. $2=self["@tabs"];
  1483. if(($receiver = $2) == null || $receiver.isNil){
  1484. self["@tabs"]=_st($Array())._new();
  1485. $1=self["@tabs"];
  1486. } else {
  1487. $1=$2;
  1488. };
  1489. return $1;
  1490. }, function($ctx1) {$ctx1.fill(self,"tabs",{},globals.TabManager)})},
  1491. args: [],
  1492. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  1493. messageSends: ["ifNil:", "new"],
  1494. referencedClasses: ["Array"]
  1495. }),
  1496. globals.TabManager);
  1497. smalltalk.addMethod(
  1498. smalltalk.method({
  1499. selector: "update",
  1500. protocol: 'updating',
  1501. fn: function (){
  1502. var self=this;
  1503. return smalltalk.withContext(function($ctx1) {
  1504. self._renderTabs();
  1505. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabManager)})},
  1506. args: [],
  1507. source: "update\x0a\x09self renderTabs",
  1508. messageSends: ["renderTabs"],
  1509. referencedClasses: []
  1510. }),
  1511. globals.TabManager);
  1512. smalltalk.addMethod(
  1513. smalltalk.method({
  1514. selector: "updateBodyMargin",
  1515. protocol: 'actions',
  1516. fn: function (){
  1517. var self=this;
  1518. return smalltalk.withContext(function($ctx1) {
  1519. self._setBodyMargin_(_st("#amber"._asJQuery())._height());
  1520. return self}, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},globals.TabManager)})},
  1521. args: [],
  1522. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  1523. messageSends: ["setBodyMargin:", "height", "asJQuery"],
  1524. referencedClasses: []
  1525. }),
  1526. globals.TabManager);
  1527. smalltalk.addMethod(
  1528. smalltalk.method({
  1529. selector: "updatePosition",
  1530. protocol: 'actions',
  1531. fn: function (){
  1532. var self=this;
  1533. return smalltalk.withContext(function($ctx1) {
  1534. var $1,$2;
  1535. $1="#amber"._asJQuery();
  1536. _st($1)._css_put_("top","");
  1537. $ctx1.sendIdx["css:put:"]=1;
  1538. $2=_st($1)._css_put_("bottom","0px");
  1539. return self}, function($ctx1) {$ctx1.fill(self,"updatePosition",{},globals.TabManager)})},
  1540. args: [],
  1541. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  1542. messageSends: ["css:put:", "asJQuery"],
  1543. referencedClasses: []
  1544. }),
  1545. globals.TabManager);
  1546. globals.TabManager.klass.iVarNames = ['current'];
  1547. smalltalk.addMethod(
  1548. smalltalk.method({
  1549. selector: "current",
  1550. protocol: 'instance creation',
  1551. fn: function (){
  1552. var self=this;
  1553. return smalltalk.withContext(function($ctx1) {
  1554. var $2,$1,$receiver;
  1555. $2=self["@current"];
  1556. if(($receiver = $2) == null || $receiver.isNil){
  1557. self["@current"]=($ctx1.supercall = true, globals.TabManager.klass.superclass.fn.prototype._new.apply(_st(self), []));
  1558. $ctx1.supercall = false;
  1559. $1=self["@current"];
  1560. } else {
  1561. $1=$2;
  1562. };
  1563. return $1;
  1564. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.TabManager.klass)})},
  1565. args: [],
  1566. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  1567. messageSends: ["ifNil:", "new"],
  1568. referencedClasses: []
  1569. }),
  1570. globals.TabManager.klass);
  1571. smalltalk.addMethod(
  1572. smalltalk.method({
  1573. selector: "new",
  1574. protocol: 'instance creation',
  1575. fn: function (){
  1576. var self=this;
  1577. return smalltalk.withContext(function($ctx1) {
  1578. self._shouldNotImplement();
  1579. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.TabManager.klass)})},
  1580. args: [],
  1581. source: "new\x0a\x09self shouldNotImplement",
  1582. messageSends: ["shouldNotImplement"],
  1583. referencedClasses: []
  1584. }),
  1585. globals.TabManager.klass);
  1586. smalltalk.addMethod(
  1587. smalltalk.method({
  1588. selector: "toggleAmberIDE",
  1589. protocol: 'actions',
  1590. fn: function (){
  1591. var self=this;
  1592. function $Browser(){return globals.Browser||(typeof Browser=="undefined"?nil:Browser)}
  1593. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1594. return smalltalk.withContext(function($ctx1) {
  1595. var $3,$2,$1,$4,$5;
  1596. $3="#amber"._asJQuery();
  1597. $ctx1.sendIdx["asJQuery"]=1;
  1598. $2=_st($3)._length();
  1599. $1=_st($2).__eq((0));
  1600. if(smalltalk.assert($1)){
  1601. _st($Browser())._open();
  1602. $ctx1.sendIdx["open"]=1;
  1603. } else {
  1604. $4=_st("#amber"._asJQuery())._is_(":visible");
  1605. if(smalltalk.assert($4)){
  1606. $5=_st($TabManager())._current();
  1607. $ctx1.sendIdx["current"]=1;
  1608. _st($5)._close();
  1609. } else {
  1610. _st(_st($TabManager())._current())._open();
  1611. };
  1612. };
  1613. return self}, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},globals.TabManager.klass)})},
  1614. args: [],
  1615. 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 ] ]",
  1616. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"],
  1617. referencedClasses: ["Browser", "TabManager"]
  1618. }),
  1619. globals.TabManager.klass);
  1620. smalltalk.addClass('TabWidget', globals.Widget, ['div'], 'IDE');
  1621. smalltalk.addMethod(
  1622. smalltalk.method({
  1623. selector: "canBeClosed",
  1624. protocol: 'testing',
  1625. fn: function (){
  1626. var self=this;
  1627. return false;
  1628. },
  1629. args: [],
  1630. source: "canBeClosed\x0a\x09^ false",
  1631. messageSends: [],
  1632. referencedClasses: []
  1633. }),
  1634. globals.TabWidget);
  1635. smalltalk.addMethod(
  1636. smalltalk.method({
  1637. selector: "close",
  1638. protocol: 'actions',
  1639. fn: function (){
  1640. var self=this;
  1641. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1642. return smalltalk.withContext(function($ctx1) {
  1643. _st(_st($TabManager())._current())._closeTab_(self);
  1644. return self}, function($ctx1) {$ctx1.fill(self,"close",{},globals.TabWidget)})},
  1645. args: [],
  1646. source: "close\x0a\x09TabManager current closeTab: self",
  1647. messageSends: ["closeTab:", "current"],
  1648. referencedClasses: ["TabManager"]
  1649. }),
  1650. globals.TabWidget);
  1651. smalltalk.addMethod(
  1652. smalltalk.method({
  1653. selector: "hide",
  1654. protocol: 'actions',
  1655. fn: function (){
  1656. var self=this;
  1657. return smalltalk.withContext(function($ctx1) {
  1658. _st(_st(self["@div"])._asJQuery())._hide();
  1659. return self}, function($ctx1) {$ctx1.fill(self,"hide",{},globals.TabWidget)})},
  1660. args: [],
  1661. source: "hide\x0a\x09div asJQuery hide",
  1662. messageSends: ["hide", "asJQuery"],
  1663. referencedClasses: []
  1664. }),
  1665. globals.TabWidget);
  1666. smalltalk.addMethod(
  1667. smalltalk.method({
  1668. selector: "label",
  1669. protocol: 'accessing',
  1670. fn: function (){
  1671. var self=this;
  1672. return smalltalk.withContext(function($ctx1) {
  1673. self._subclassResponsibility();
  1674. return self}, function($ctx1) {$ctx1.fill(self,"label",{},globals.TabWidget)})},
  1675. args: [],
  1676. source: "label\x0a\x09self subclassResponsibility",
  1677. messageSends: ["subclassResponsibility"],
  1678. referencedClasses: []
  1679. }),
  1680. globals.TabWidget);
  1681. smalltalk.addMethod(
  1682. smalltalk.method({
  1683. selector: "open",
  1684. protocol: 'actions',
  1685. fn: function (){
  1686. var self=this;
  1687. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  1688. return smalltalk.withContext(function($ctx1) {
  1689. var $1;
  1690. $1=_st($TabManager())._current();
  1691. $ctx1.sendIdx["current"]=1;
  1692. _st($1)._addTab_(self);
  1693. _st(_st($TabManager())._current())._selectTab_(self);
  1694. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget)})},
  1695. args: [],
  1696. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  1697. messageSends: ["addTab:", "current", "selectTab:"],
  1698. referencedClasses: ["TabManager"]
  1699. }),
  1700. globals.TabWidget);
  1701. smalltalk.addMethod(
  1702. smalltalk.method({
  1703. selector: "remove",
  1704. protocol: 'actions',
  1705. fn: function (){
  1706. var self=this;
  1707. return smalltalk.withContext(function($ctx1) {
  1708. _st(_st(self["@div"])._asJQuery())._remove();
  1709. return self}, function($ctx1) {$ctx1.fill(self,"remove",{},globals.TabWidget)})},
  1710. args: [],
  1711. source: "remove\x0a\x09div asJQuery remove",
  1712. messageSends: ["remove", "asJQuery"],
  1713. referencedClasses: []
  1714. }),
  1715. globals.TabWidget);
  1716. smalltalk.addMethod(
  1717. smalltalk.method({
  1718. selector: "renderBoxOn:",
  1719. protocol: 'rendering',
  1720. fn: function (html){
  1721. var self=this;
  1722. return self},
  1723. args: ["html"],
  1724. source: "renderBoxOn: html",
  1725. messageSends: [],
  1726. referencedClasses: []
  1727. }),
  1728. globals.TabWidget);
  1729. smalltalk.addMethod(
  1730. smalltalk.method({
  1731. selector: "renderButtonsOn:",
  1732. protocol: 'rendering',
  1733. fn: function (html){
  1734. var self=this;
  1735. return self},
  1736. args: ["html"],
  1737. source: "renderButtonsOn: html",
  1738. messageSends: [],
  1739. referencedClasses: []
  1740. }),
  1741. globals.TabWidget);
  1742. smalltalk.addMethod(
  1743. smalltalk.method({
  1744. selector: "renderOn:",
  1745. protocol: 'rendering',
  1746. fn: function (html){
  1747. var self=this;
  1748. return smalltalk.withContext(function($ctx1) {
  1749. var $1,$2;
  1750. $1=_st(html)._div();
  1751. _st($1)._class_("amberTool");
  1752. $2=_st($1)._yourself();
  1753. self["@div"]=$2;
  1754. self._renderTab();
  1755. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.TabWidget)})},
  1756. args: ["html"],
  1757. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  1758. messageSends: ["class:", "div", "yourself", "renderTab"],
  1759. referencedClasses: []
  1760. }),
  1761. globals.TabWidget);
  1762. smalltalk.addMethod(
  1763. smalltalk.method({
  1764. selector: "renderTab",
  1765. protocol: 'rendering',
  1766. fn: function (){
  1767. var self=this;
  1768. return smalltalk.withContext(function($ctx1) {
  1769. var $1,$2,$3,$4;
  1770. _st(self["@div"])._contents_((function(html){
  1771. return smalltalk.withContext(function($ctx2) {
  1772. $1=_st(html)._div();
  1773. $ctx2.sendIdx["div"]=1;
  1774. _st($1)._class_("amber_box");
  1775. $ctx2.sendIdx["class:"]=1;
  1776. $2=_st($1)._with_((function(){
  1777. return smalltalk.withContext(function($ctx3) {
  1778. return self._renderBoxOn_(html);
  1779. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  1780. $ctx2.sendIdx["with:"]=1;
  1781. $2;
  1782. $3=_st(html)._div();
  1783. _st($3)._class_("amber_buttons");
  1784. $4=_st($3)._with_((function(){
  1785. return smalltalk.withContext(function($ctx3) {
  1786. return self._renderButtonsOn_(html);
  1787. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  1788. return $4;
  1789. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  1790. return self}, function($ctx1) {$ctx1.fill(self,"renderTab",{},globals.TabWidget)})},
  1791. args: [],
  1792. 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 ]]",
  1793. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
  1794. referencedClasses: []
  1795. }),
  1796. globals.TabWidget);
  1797. smalltalk.addMethod(
  1798. smalltalk.method({
  1799. selector: "show",
  1800. protocol: 'actions',
  1801. fn: function (){
  1802. var self=this;
  1803. return smalltalk.withContext(function($ctx1) {
  1804. _st(_st(self["@div"])._asJQuery())._show();
  1805. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.TabWidget)})},
  1806. args: [],
  1807. source: "show\x0a\x09div asJQuery show",
  1808. messageSends: ["show", "asJQuery"],
  1809. referencedClasses: []
  1810. }),
  1811. globals.TabWidget);
  1812. smalltalk.addMethod(
  1813. smalltalk.method({
  1814. selector: "update",
  1815. protocol: 'rendering',
  1816. fn: function (){
  1817. var self=this;
  1818. return smalltalk.withContext(function($ctx1) {
  1819. self._renderTab();
  1820. return self}, function($ctx1) {$ctx1.fill(self,"update",{},globals.TabWidget)})},
  1821. args: [],
  1822. source: "update\x0a\x09self renderTab",
  1823. messageSends: ["renderTab"],
  1824. referencedClasses: []
  1825. }),
  1826. globals.TabWidget);
  1827. smalltalk.addMethod(
  1828. smalltalk.method({
  1829. selector: "open",
  1830. protocol: 'instance creation',
  1831. fn: function (){
  1832. var self=this;
  1833. return smalltalk.withContext(function($ctx1) {
  1834. var $1;
  1835. $1=_st(self._new())._open();
  1836. return $1;
  1837. }, function($ctx1) {$ctx1.fill(self,"open",{},globals.TabWidget.klass)})},
  1838. args: [],
  1839. source: "open\x0a\x09^ self new open",
  1840. messageSends: ["open", "new"],
  1841. referencedClasses: []
  1842. }),
  1843. globals.TabWidget.klass);
  1844. smalltalk.addClass('Browser', globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  1845. smalltalk.addMethod(
  1846. smalltalk.method({
  1847. selector: "addInstanceVariableNamed:toClass:",
  1848. protocol: 'actions',
  1849. fn: function (aString,aClass){
  1850. var self=this;
  1851. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  1852. return smalltalk.withContext(function($ctx1) {
  1853. var $1,$2,$3,$4,$5;
  1854. $1=_st($ClassBuilder())._new();
  1855. $2=_st(aClass)._superclass();
  1856. $3=_st(aClass)._name();
  1857. $ctx1.sendIdx["name"]=1;
  1858. $4=_st(_st(aClass)._instanceVariableNames())._copy();
  1859. _st($4)._add_(aString);
  1860. $5=_st($4)._yourself();
  1861. _st($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$5,_st(_st(aClass)._package())._name());
  1862. return self}, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},globals.Browser)})},
  1863. args: ["aString", "aClass"],
  1864. 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",
  1865. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"],
  1866. referencedClasses: ["ClassBuilder"]
  1867. }),
  1868. globals.Browser);
  1869. smalltalk.addMethod(
  1870. smalltalk.method({
  1871. selector: "addNewClass",
  1872. protocol: 'actions',
  1873. fn: function (){
  1874. var self=this;
  1875. var className;
  1876. function $Object(){return globals.Object||(typeof Object=="undefined"?nil:Object)}
  1877. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  1878. return smalltalk.withContext(function($ctx1) {
  1879. var $1,$2;
  1880. className=self._prompt_("New class");
  1881. $1=_st(_st(className)._notNil())._and_((function(){
  1882. return smalltalk.withContext(function($ctx2) {
  1883. return _st(className)._notEmpty();
  1884. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1885. if(smalltalk.assert($1)){
  1886. _st($Object())._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  1887. self._resetClassesList();
  1888. $2=self._updateClassesList();
  1889. $2;
  1890. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  1891. };
  1892. return self}, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},globals.Browser)})},
  1893. args: [],
  1894. 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) ]",
  1895. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  1896. referencedClasses: ["Object", "Smalltalk"]
  1897. }),
  1898. globals.Browser);
  1899. smalltalk.addMethod(
  1900. smalltalk.method({
  1901. selector: "addNewProtocol",
  1902. protocol: 'actions',
  1903. fn: function (){
  1904. var self=this;
  1905. var newProtocol;
  1906. return smalltalk.withContext(function($ctx1) {
  1907. var $1;
  1908. newProtocol=self._prompt_("New method protocol");
  1909. $1=_st(_st(newProtocol)._notNil())._and_((function(){
  1910. return smalltalk.withContext(function($ctx2) {
  1911. return _st(newProtocol)._notEmpty();
  1912. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  1913. if(smalltalk.assert($1)){
  1914. _st(self["@selectedMethod"])._protocol_(newProtocol);
  1915. self._setMethodProtocol_(newProtocol);
  1916. };
  1917. return self}, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},globals.Browser)})},
  1918. args: [],
  1919. 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 ]",
  1920. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"],
  1921. referencedClasses: []
  1922. }),
  1923. globals.Browser);
  1924. smalltalk.addMethod(
  1925. smalltalk.method({
  1926. selector: "canBeClosed",
  1927. protocol: 'testing',
  1928. fn: function (){
  1929. var self=this;
  1930. return true;
  1931. },
  1932. args: [],
  1933. source: "canBeClosed\x0a\x09^ true",
  1934. messageSends: [],
  1935. referencedClasses: []
  1936. }),
  1937. globals.Browser);
  1938. smalltalk.addMethod(
  1939. smalltalk.method({
  1940. selector: "cancelChanges",
  1941. protocol: 'actions',
  1942. fn: function (){
  1943. var self=this;
  1944. return smalltalk.withContext(function($ctx1) {
  1945. var $2,$1;
  1946. $2=self["@unsavedChanges"];
  1947. if(smalltalk.assert($2)){
  1948. $1=self._confirm_("Cancel changes?");
  1949. } else {
  1950. $1=true;
  1951. };
  1952. return $1;
  1953. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},globals.Browser)})},
  1954. args: [],
  1955. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ self confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  1956. messageSends: ["ifTrue:ifFalse:", "confirm:"],
  1957. referencedClasses: []
  1958. }),
  1959. globals.Browser);
  1960. smalltalk.addMethod(
  1961. smalltalk.method({
  1962. selector: "classCommentSource",
  1963. protocol: 'accessing',
  1964. fn: function (){
  1965. var self=this;
  1966. return smalltalk.withContext(function($ctx1) {
  1967. var $1;
  1968. $1=_st(self["@selectedClass"])._comment();
  1969. return $1;
  1970. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},globals.Browser)})},
  1971. args: [],
  1972. source: "classCommentSource\x0a\x09^ selectedClass comment",
  1973. messageSends: ["comment"],
  1974. referencedClasses: []
  1975. }),
  1976. globals.Browser);
  1977. smalltalk.addMethod(
  1978. smalltalk.method({
  1979. selector: "classDeclarationSource",
  1980. protocol: 'accessing',
  1981. fn: function (){
  1982. var self=this;
  1983. var stream;
  1984. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  1985. return smalltalk.withContext(function($ctx1) {
  1986. var $1,$2,$3,$4,$6,$7,$5,$8,$9,$10,$11,$12,$13,$receiver;
  1987. stream=""._writeStream();
  1988. $1=self["@selectedClass"];
  1989. if(($receiver = $1) == null || $receiver.isNil){
  1990. $2=self._classDeclarationTemplate();
  1991. return $2;
  1992. } else {
  1993. $1;
  1994. };
  1995. $3=stream;
  1996. _st($3)._nextPutAll_(_st(_st(self["@selectedClass"])._superclass())._asString());
  1997. $ctx1.sendIdx["nextPutAll:"]=1;
  1998. _st($3)._nextPutAll_(" subclass: #");
  1999. $ctx1.sendIdx["nextPutAll:"]=2;
  2000. _st($3)._nextPutAll_(_st(self["@selectedClass"])._name());
  2001. $ctx1.sendIdx["nextPutAll:"]=3;
  2002. $4=$3;
  2003. $6=_st($String())._lf();
  2004. $ctx1.sendIdx["lf"]=1;
  2005. $7=_st($String())._tab();
  2006. $ctx1.sendIdx["tab"]=1;
  2007. $5=_st($6).__comma($7);
  2008. $ctx1.sendIdx[","]=1;
  2009. _st($4)._nextPutAll_($5);
  2010. $ctx1.sendIdx["nextPutAll:"]=4;
  2011. $8=_st($3)._nextPutAll_("instanceVariableNames: '");
  2012. $ctx1.sendIdx["nextPutAll:"]=5;
  2013. _st(_st(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2014. return smalltalk.withContext(function($ctx2) {
  2015. return _st(stream)._nextPutAll_(each);
  2016. $ctx2.sendIdx["nextPutAll:"]=6;
  2017. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2018. return smalltalk.withContext(function($ctx2) {
  2019. return _st(stream)._nextPutAll_(" ");
  2020. $ctx2.sendIdx["nextPutAll:"]=7;
  2021. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2022. $9=stream;
  2023. $10=$9;
  2024. $11=_st("'".__comma(_st($String())._lf())).__comma(_st($String())._tab());
  2025. $ctx1.sendIdx[","]=2;
  2026. _st($10)._nextPutAll_($11);
  2027. $ctx1.sendIdx["nextPutAll:"]=8;
  2028. _st($9)._nextPutAll_("package: '");
  2029. $ctx1.sendIdx["nextPutAll:"]=9;
  2030. _st($9)._nextPutAll_(_st(self["@selectedClass"])._category());
  2031. $ctx1.sendIdx["nextPutAll:"]=10;
  2032. $12=_st($9)._nextPutAll_("'");
  2033. $13=_st(stream)._contents();
  2034. return $13;
  2035. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},globals.Browser)})},
  2036. args: [],
  2037. 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",
  2038. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
  2039. referencedClasses: ["String"]
  2040. }),
  2041. globals.Browser);
  2042. smalltalk.addMethod(
  2043. smalltalk.method({
  2044. selector: "classDeclarationTemplate",
  2045. protocol: 'accessing',
  2046. fn: function (){
  2047. var self=this;
  2048. return smalltalk.withContext(function($ctx1) {
  2049. var $1;
  2050. $1=_st("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2051. $ctx1.sendIdx[","]=1;
  2052. return $1;
  2053. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},globals.Browser)})},
  2054. args: [],
  2055. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2056. messageSends: [",", "selectedPackage"],
  2057. referencedClasses: []
  2058. }),
  2059. globals.Browser);
  2060. smalltalk.addMethod(
  2061. smalltalk.method({
  2062. selector: "classes",
  2063. protocol: 'accessing',
  2064. fn: function (){
  2065. var self=this;
  2066. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2067. return smalltalk.withContext(function($ctx1) {
  2068. var $2,$1;
  2069. $1=_st(_st(_st(_st($Smalltalk())._classes())._select_((function(each){
  2070. return smalltalk.withContext(function($ctx2) {
  2071. return _st(_st(each)._category()).__eq(self["@selectedPackage"]);
  2072. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._sort_((function(a,b){
  2073. return smalltalk.withContext(function($ctx2) {
  2074. $2=_st(a)._name();
  2075. $ctx2.sendIdx["name"]=1;
  2076. return _st($2).__lt(_st(b)._name());
  2077. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)})})))._asSet();
  2078. return $1;
  2079. }, function($ctx1) {$ctx1.fill(self,"classes",{},globals.Browser)})},
  2080. args: [],
  2081. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  2082. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"],
  2083. referencedClasses: ["Smalltalk"]
  2084. }),
  2085. globals.Browser);
  2086. smalltalk.addMethod(
  2087. smalltalk.method({
  2088. selector: "commitPackage",
  2089. protocol: 'actions',
  2090. fn: function (){
  2091. var self=this;
  2092. function $Package(){return globals.Package||(typeof Package=="undefined"?nil:Package)}
  2093. return smalltalk.withContext(function($ctx1) {
  2094. var $1,$receiver;
  2095. $1=self["@selectedPackage"];
  2096. if(($receiver = $1) == null || $receiver.isNil){
  2097. $1;
  2098. } else {
  2099. _st(_st($Package())._named_(self["@selectedPackage"]))._commit();
  2100. };
  2101. return self}, function($ctx1) {$ctx1.fill(self,"commitPackage",{},globals.Browser)})},
  2102. args: [],
  2103. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2104. messageSends: ["ifNotNil:", "commit", "named:"],
  2105. referencedClasses: ["Package"]
  2106. }),
  2107. globals.Browser);
  2108. smalltalk.addMethod(
  2109. smalltalk.method({
  2110. selector: "compile",
  2111. protocol: 'actions',
  2112. fn: function (){
  2113. var self=this;
  2114. var currentEditLine;
  2115. return smalltalk.withContext(function($ctx1) {
  2116. var $1,$2,$3,$5,$4,$receiver;
  2117. self._disableSaveButton();
  2118. $1=_st(self["@sourceArea"])._editor();
  2119. $ctx1.sendIdx["editor"]=1;
  2120. currentEditLine=_st($1)._getCursor();
  2121. $2=_st(self["@selectedTab"]).__eq("comment");
  2122. if(smalltalk.assert($2)){
  2123. $3=self["@selectedClass"];
  2124. if(($receiver = $3) == null || $receiver.isNil){
  2125. $3;
  2126. } else {
  2127. self._compileClassComment();
  2128. };
  2129. } else {
  2130. $5=_st(self["@selectedProtocol"])._notNil();
  2131. $ctx1.sendIdx["notNil"]=1;
  2132. $4=_st($5)._or_((function(){
  2133. return smalltalk.withContext(function($ctx2) {
  2134. return _st(self["@selectedMethod"])._notNil();
  2135. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  2136. if(smalltalk.assert($4)){
  2137. self._compileMethodDefinition();
  2138. } else {
  2139. self._compileDefinition();
  2140. };
  2141. };
  2142. _st(_st(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  2143. return self}, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},globals.Browser)})},
  2144. args: [],
  2145. 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.",
  2146. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"],
  2147. referencedClasses: []
  2148. }),
  2149. globals.Browser);
  2150. smalltalk.addMethod(
  2151. smalltalk.method({
  2152. selector: "compileClassComment",
  2153. protocol: 'actions',
  2154. fn: function (){
  2155. var self=this;
  2156. return smalltalk.withContext(function($ctx1) {
  2157. _st(self["@selectedClass"])._comment_(_st(self["@sourceArea"])._val());
  2158. return self}, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},globals.Browser)})},
  2159. args: [],
  2160. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  2161. messageSends: ["comment:", "val"],
  2162. referencedClasses: []
  2163. }),
  2164. globals.Browser);
  2165. smalltalk.addMethod(
  2166. smalltalk.method({
  2167. selector: "compileDefinition",
  2168. protocol: 'actions',
  2169. fn: function (){
  2170. var self=this;
  2171. var newClass;
  2172. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2173. return smalltalk.withContext(function($ctx1) {
  2174. var $1;
  2175. newClass=_st(_st($Compiler())._new())._evaluateExpression_(_st(self["@sourceArea"])._val());
  2176. self._resetClassesList();
  2177. self._updateCategoriesList();
  2178. $1=self._updateClassesList();
  2179. self._selectClass_(newClass);
  2180. return self}, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},globals.Browser)})},
  2181. args: [],
  2182. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  2183. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
  2184. referencedClasses: ["Compiler"]
  2185. }),
  2186. globals.Browser);
  2187. smalltalk.addMethod(
  2188. smalltalk.method({
  2189. selector: "compileMethodDefinition",
  2190. protocol: 'actions',
  2191. fn: function (){
  2192. var self=this;
  2193. return smalltalk.withContext(function($ctx1) {
  2194. var $1;
  2195. $1=_st(self["@selectedTab"]).__eq("instance");
  2196. if(smalltalk.assert($1)){
  2197. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  2198. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  2199. } else {
  2200. self._compileMethodDefinitionFor_(_st(self["@selectedClass"])._class());
  2201. };
  2202. return self}, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},globals.Browser)})},
  2203. args: [],
  2204. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  2205. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"],
  2206. referencedClasses: []
  2207. }),
  2208. globals.Browser);
  2209. smalltalk.addMethod(
  2210. smalltalk.method({
  2211. selector: "compileMethodDefinitionFor:",
  2212. protocol: 'actions',
  2213. fn: function (aClass){
  2214. var self=this;
  2215. var compiler,method,source,node;
  2216. function $Compiler(){return globals.Compiler||(typeof Compiler=="undefined"?nil:Compiler)}
  2217. function $PlatformInterface(){return globals.PlatformInterface||(typeof PlatformInterface=="undefined"?nil:PlatformInterface)}
  2218. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2219. return smalltalk.withContext(function($ctx1) {
  2220. var $1,$2,$6,$5,$4,$3,$7,$9,$8,$10,$receiver;
  2221. var $early={};
  2222. try {
  2223. source=_st(self["@sourceArea"])._val();
  2224. $1=self["@selectedProtocol"];
  2225. if(($receiver = $1) == null || $receiver.isNil){
  2226. self["@selectedProtocol"]=_st(self["@selectedMethod"])._protocol();
  2227. self["@selectedProtocol"];
  2228. } else {
  2229. $1;
  2230. };
  2231. compiler=_st($Compiler())._new();
  2232. $ctx1.sendIdx["new"]=1;
  2233. _st(compiler)._source_(source);
  2234. node=_st(compiler)._parse_(source);
  2235. $2=_st(node)._isParseFailure();
  2236. if(smalltalk.assert($2)){
  2237. $6="PARSE ERROR: ".__comma(_st(node)._reason());
  2238. $ctx1.sendIdx[","]=3;
  2239. $5=_st($6).__comma(", position: ");
  2240. $ctx1.sendIdx[","]=2;
  2241. $4=_st($5).__comma(_st(_st(node)._position())._asString());
  2242. $ctx1.sendIdx[","]=1;
  2243. $3=self._alert_($4);
  2244. return $3;
  2245. };
  2246. _st(compiler)._currentClass_(aClass);
  2247. method=_st(compiler)._eval_(_st(compiler)._compileNode_(node));
  2248. _st(_st(compiler)._unknownVariables())._do_((function(each){
  2249. return smalltalk.withContext(function($ctx2) {
  2250. $7=_st($PlatformInterface())._existsGlobal_(each);
  2251. if(! smalltalk.assert($7)){
  2252. $9=_st("Declare '".__comma(each)).__comma("' as instance variable?");
  2253. $ctx2.sendIdx[","]=4;
  2254. $8=self._confirm_($9);
  2255. if(smalltalk.assert($8)){
  2256. self._addInstanceVariableNamed_toClass_(each,aClass);
  2257. $10=self._compileMethodDefinitionFor_(aClass);
  2258. throw $early=[$10];
  2259. };
  2260. };
  2261. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)})}));
  2262. _st(_st($ClassBuilder())._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  2263. self._updateMethodsList();
  2264. self._selectMethod_(method);
  2265. return self}
  2266. catch(e) {if(e===$early)return e[0]; throw e}
  2267. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,method:method,source:source,node:node},globals.Browser)})},
  2268. args: ["aClass"],
  2269. 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",
  2270. 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:"],
  2271. referencedClasses: ["Compiler", "PlatformInterface", "ClassBuilder"]
  2272. }),
  2273. globals.Browser);
  2274. smalltalk.addMethod(
  2275. smalltalk.method({
  2276. selector: "copyClass",
  2277. protocol: 'actions',
  2278. fn: function (){
  2279. var self=this;
  2280. var className;
  2281. function $ClassBuilder(){return globals.ClassBuilder||(typeof ClassBuilder=="undefined"?nil:ClassBuilder)}
  2282. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2283. return smalltalk.withContext(function($ctx1) {
  2284. var $1,$2;
  2285. className=self._prompt_("Copy class");
  2286. $1=_st(_st(className)._notNil())._and_((function(){
  2287. return smalltalk.withContext(function($ctx2) {
  2288. return _st(className)._notEmpty();
  2289. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2290. if(smalltalk.assert($1)){
  2291. _st(_st($ClassBuilder())._new())._copyClass_named_(self._selectedClass(),className);
  2292. self._resetClassesList();
  2293. $2=self._updateClassesList();
  2294. $2;
  2295. self._selectClass_(_st(_st($Smalltalk())._globals())._at_(className));
  2296. };
  2297. return self}, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},globals.Browser)})},
  2298. args: [],
  2299. 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) ]",
  2300. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"],
  2301. referencedClasses: ["ClassBuilder", "Smalltalk"]
  2302. }),
  2303. globals.Browser);
  2304. smalltalk.addMethod(
  2305. smalltalk.method({
  2306. selector: "declarationSource",
  2307. protocol: 'accessing',
  2308. fn: function (){
  2309. var self=this;
  2310. return smalltalk.withContext(function($ctx1) {
  2311. var $2,$1;
  2312. $2=_st(self["@selectedTab"]).__eq("instance");
  2313. if(smalltalk.assert($2)){
  2314. $1=self._classDeclarationSource();
  2315. } else {
  2316. $1=self._metaclassDeclarationSource();
  2317. };
  2318. return $1;
  2319. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},globals.Browser)})},
  2320. args: [],
  2321. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  2322. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"],
  2323. referencedClasses: []
  2324. }),
  2325. globals.Browser);
  2326. smalltalk.addMethod(
  2327. smalltalk.method({
  2328. selector: "disableSaveButton",
  2329. protocol: 'actions',
  2330. fn: function (){
  2331. var self=this;
  2332. return smalltalk.withContext(function($ctx1) {
  2333. var $1,$receiver;
  2334. $1=self["@saveButton"];
  2335. if(($receiver = $1) == null || $receiver.isNil){
  2336. $1;
  2337. } else {
  2338. _st(self["@saveButton"])._at_put_("disabled",true);
  2339. };
  2340. self["@unsavedChanges"]=false;
  2341. return self}, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},globals.Browser)})},
  2342. args: [],
  2343. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  2344. messageSends: ["ifNotNil:", "at:put:"],
  2345. referencedClasses: []
  2346. }),
  2347. globals.Browser);
  2348. smalltalk.addMethod(
  2349. smalltalk.method({
  2350. selector: "dummyMethodSource",
  2351. protocol: 'accessing',
  2352. fn: function (){
  2353. var self=this;
  2354. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  2355. },
  2356. args: [],
  2357. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  2358. messageSends: [],
  2359. referencedClasses: []
  2360. }),
  2361. globals.Browser);
  2362. smalltalk.addMethod(
  2363. smalltalk.method({
  2364. selector: "handleSourceAreaKeyDown:",
  2365. protocol: 'actions',
  2366. fn: function (anEvent){
  2367. var self=this;
  2368. return smalltalk.withContext(function($ctx1) {
  2369. if(anEvent.ctrlKey) {
  2370. if(anEvent.keyCode === 83) { //ctrl+s
  2371. self._compile();
  2372. anEvent.preventDefault();
  2373. return false;
  2374. }
  2375. }
  2376. ;
  2377. return self}, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},globals.Browser)})},
  2378. args: ["anEvent"],
  2379. 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>",
  2380. messageSends: [],
  2381. referencedClasses: []
  2382. }),
  2383. globals.Browser);
  2384. smalltalk.addMethod(
  2385. smalltalk.method({
  2386. selector: "hideClassButtons",
  2387. protocol: 'actions',
  2388. fn: function (){
  2389. var self=this;
  2390. return smalltalk.withContext(function($ctx1) {
  2391. _st(_st(self["@classButtons"])._asJQuery())._hide();
  2392. return self}, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},globals.Browser)})},
  2393. args: [],
  2394. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  2395. messageSends: ["hide", "asJQuery"],
  2396. referencedClasses: []
  2397. }),
  2398. globals.Browser);
  2399. smalltalk.addMethod(
  2400. smalltalk.method({
  2401. selector: "hideMethodButtons",
  2402. protocol: 'actions',
  2403. fn: function (){
  2404. var self=this;
  2405. return smalltalk.withContext(function($ctx1) {
  2406. _st(_st(self["@methodButtons"])._asJQuery())._hide();
  2407. return self}, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},globals.Browser)})},
  2408. args: [],
  2409. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  2410. messageSends: ["hide", "asJQuery"],
  2411. referencedClasses: []
  2412. }),
  2413. globals.Browser);
  2414. smalltalk.addMethod(
  2415. smalltalk.method({
  2416. selector: "initialize",
  2417. protocol: 'initialization',
  2418. fn: function (){
  2419. var self=this;
  2420. return smalltalk.withContext(function($ctx1) {
  2421. ($ctx1.supercall = true, globals.Browser.superclass.fn.prototype._initialize.apply(_st(self), []));
  2422. $ctx1.supercall = false;
  2423. self["@selectedTab"]="instance";
  2424. self["@selectedPackage"]=_st(self._packages())._first();
  2425. self["@unsavedChanges"]=false;
  2426. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Browser)})},
  2427. args: [],
  2428. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  2429. messageSends: ["initialize", "first", "packages"],
  2430. referencedClasses: []
  2431. }),
  2432. globals.Browser);
  2433. smalltalk.addMethod(
  2434. smalltalk.method({
  2435. selector: "label",
  2436. protocol: 'accessing',
  2437. fn: function (){
  2438. var self=this;
  2439. return smalltalk.withContext(function($ctx1) {
  2440. var $2,$1,$receiver;
  2441. $2=self["@selectedClass"];
  2442. if(($receiver = $2) == null || $receiver.isNil){
  2443. $1="Browser (nil)";
  2444. } else {
  2445. $1="Browser: ".__comma(_st(self["@selectedClass"])._name());
  2446. };
  2447. return $1;
  2448. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.Browser)})},
  2449. args: [],
  2450. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  2451. messageSends: ["ifNil:ifNotNil:", ",", "name"],
  2452. referencedClasses: []
  2453. }),
  2454. globals.Browser);
  2455. smalltalk.addMethod(
  2456. smalltalk.method({
  2457. selector: "metaclassDeclarationSource",
  2458. protocol: 'accessing',
  2459. fn: function (){
  2460. var self=this;
  2461. var stream;
  2462. return smalltalk.withContext(function($ctx1) {
  2463. var $1,$2,$3,$4,$receiver;
  2464. stream=""._writeStream();
  2465. $1=self["@selectedClass"];
  2466. if(($receiver = $1) == null || $receiver.isNil){
  2467. $1;
  2468. } else {
  2469. $2=stream;
  2470. _st($2)._nextPutAll_(_st(self["@selectedClass"])._asString());
  2471. $ctx1.sendIdx["nextPutAll:"]=1;
  2472. _st($2)._nextPutAll_(" class ");
  2473. $ctx1.sendIdx["nextPutAll:"]=2;
  2474. $3=_st($2)._nextPutAll_("instanceVariableNames: '");
  2475. $ctx1.sendIdx["nextPutAll:"]=3;
  2476. $3;
  2477. _st(_st(_st(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  2478. return smalltalk.withContext(function($ctx2) {
  2479. return _st(stream)._nextPutAll_(each);
  2480. $ctx2.sendIdx["nextPutAll:"]=4;
  2481. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}),(function(){
  2482. return smalltalk.withContext(function($ctx2) {
  2483. return _st(stream)._nextPutAll_(" ");
  2484. $ctx2.sendIdx["nextPutAll:"]=5;
  2485. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  2486. _st(stream)._nextPutAll_("'");
  2487. };
  2488. $4=_st(stream)._contents();
  2489. return $4;
  2490. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},globals.Browser)})},
  2491. args: [],
  2492. 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",
  2493. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
  2494. referencedClasses: []
  2495. }),
  2496. globals.Browser);
  2497. smalltalk.addMethod(
  2498. smalltalk.method({
  2499. selector: "methodSource",
  2500. protocol: 'accessing',
  2501. fn: function (){
  2502. var self=this;
  2503. return smalltalk.withContext(function($ctx1) {
  2504. var $2,$1,$receiver;
  2505. $2=self["@selectedMethod"];
  2506. if(($receiver = $2) == null || $receiver.isNil){
  2507. $1=self._dummyMethodSource();
  2508. } else {
  2509. $1=_st(self["@selectedMethod"])._source();
  2510. };
  2511. return $1;
  2512. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},globals.Browser)})},
  2513. args: [],
  2514. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  2515. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
  2516. referencedClasses: []
  2517. }),
  2518. globals.Browser);
  2519. smalltalk.addMethod(
  2520. smalltalk.method({
  2521. selector: "methods",
  2522. protocol: 'accessing',
  2523. fn: function (){
  2524. var self=this;
  2525. var klass;
  2526. return smalltalk.withContext(function($ctx1) {
  2527. var $1,$2,$3,$4,$7,$8,$6,$9,$5,$receiver;
  2528. $1=_st(self["@selectedTab"]).__eq("comment");
  2529. $ctx1.sendIdx["="]=1;
  2530. if(smalltalk.assert($1)){
  2531. $2=[];
  2532. return $2;
  2533. };
  2534. $3=self["@selectedClass"];
  2535. if(($receiver = $3) == null || $receiver.isNil){
  2536. $3;
  2537. } else {
  2538. $4=_st(self["@selectedTab"]).__eq("instance");
  2539. if(smalltalk.assert($4)){
  2540. klass=self["@selectedClass"];
  2541. } else {
  2542. klass=_st(self["@selectedClass"])._class();
  2543. };
  2544. klass;
  2545. };
  2546. $7=self["@selectedProtocol"];
  2547. if(($receiver = $7) == null || $receiver.isNil){
  2548. $8=klass;
  2549. if(($receiver = $8) == null || $receiver.isNil){
  2550. $6=[];
  2551. } else {
  2552. $6=_st(_st(klass)._methodDictionary())._values();
  2553. };
  2554. } else {
  2555. $6=_st(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  2556. };
  2557. $5=_st($6)._sort_((function(a,b){
  2558. return smalltalk.withContext(function($ctx2) {
  2559. $9=_st(a)._selector();
  2560. $ctx2.sendIdx["selector"]=1;
  2561. return _st($9).__lt(_st(b)._selector());
  2562. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)})}));
  2563. return $5;
  2564. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},globals.Browser)})},
  2565. args: [],
  2566. 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 ]",
  2567. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"],
  2568. referencedClasses: []
  2569. }),
  2570. globals.Browser);
  2571. smalltalk.addMethod(
  2572. smalltalk.method({
  2573. selector: "packages",
  2574. protocol: 'accessing',
  2575. fn: function (){
  2576. var self=this;
  2577. var packages;
  2578. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2579. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2580. return smalltalk.withContext(function($ctx1) {
  2581. var $2,$3,$1,$4;
  2582. packages=_st($Array())._new();
  2583. _st(_st($Smalltalk())._classes())._do_((function(each){
  2584. return smalltalk.withContext(function($ctx2) {
  2585. $2=packages;
  2586. $3=_st(each)._category();
  2587. $ctx2.sendIdx["category"]=1;
  2588. $1=_st($2)._includes_($3);
  2589. if(! smalltalk.assert($1)){
  2590. return _st(packages)._add_(_st(each)._category());
  2591. };
  2592. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  2593. $4=_st(packages)._sort();
  2594. return $4;
  2595. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.Browser)})},
  2596. args: [],
  2597. 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",
  2598. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"],
  2599. referencedClasses: ["Array", "Smalltalk"]
  2600. }),
  2601. globals.Browser);
  2602. smalltalk.addMethod(
  2603. smalltalk.method({
  2604. selector: "protocols",
  2605. protocol: 'accessing',
  2606. fn: function (){
  2607. var self=this;
  2608. var klass;
  2609. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  2610. return smalltalk.withContext(function($ctx1) {
  2611. var $1,$2,$3,$4,$5,$6,$7,$8,$receiver;
  2612. $1=self["@selectedClass"];
  2613. if(($receiver = $1) == null || $receiver.isNil){
  2614. $1;
  2615. } else {
  2616. $2=_st(self["@selectedTab"]).__eq("comment");
  2617. $ctx1.sendIdx["="]=1;
  2618. if(smalltalk.assert($2)){
  2619. $3=[];
  2620. return $3;
  2621. };
  2622. $4=_st(self["@selectedTab"]).__eq("instance");
  2623. if(smalltalk.assert($4)){
  2624. klass=self["@selectedClass"];
  2625. } else {
  2626. klass=_st(self["@selectedClass"])._class();
  2627. };
  2628. klass;
  2629. $5=_st(_st(klass)._methodDictionary())._isEmpty();
  2630. if(smalltalk.assert($5)){
  2631. $6=_st($Array())._with_("not yet classified");
  2632. return $6;
  2633. };
  2634. $7=_st(klass)._protocols();
  2635. return $7;
  2636. };
  2637. $8=_st($Array())._new();
  2638. return $8;
  2639. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},globals.Browser)})},
  2640. args: [],
  2641. 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",
  2642. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"],
  2643. referencedClasses: ["Array"]
  2644. }),
  2645. globals.Browser);
  2646. smalltalk.addMethod(
  2647. smalltalk.method({
  2648. selector: "removeClass",
  2649. protocol: 'actions',
  2650. fn: function (){
  2651. var self=this;
  2652. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2653. return smalltalk.withContext(function($ctx1) {
  2654. var $2,$1;
  2655. $2=_st("Do you really want to remove ".__comma(_st(self["@selectedClass"])._name())).__comma("?");
  2656. $ctx1.sendIdx[","]=1;
  2657. $1=self._confirm_($2);
  2658. if(smalltalk.assert($1)){
  2659. _st($Smalltalk())._removeClass_(self["@selectedClass"]);
  2660. self._resetClassesList();
  2661. self._selectClass_(nil);
  2662. };
  2663. return self}, function($ctx1) {$ctx1.fill(self,"removeClass",{},globals.Browser)})},
  2664. args: [],
  2665. 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 ]",
  2666. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"],
  2667. referencedClasses: ["Smalltalk"]
  2668. }),
  2669. globals.Browser);
  2670. smalltalk.addMethod(
  2671. smalltalk.method({
  2672. selector: "removeMethod",
  2673. protocol: 'actions',
  2674. fn: function (){
  2675. var self=this;
  2676. return smalltalk.withContext(function($ctx1) {
  2677. var $1,$3,$2,$4;
  2678. $1=self._cancelChanges();
  2679. if(smalltalk.assert($1)){
  2680. $3=_st("Do you really want to remove #".__comma(_st(self["@selectedMethod"])._selector())).__comma("?");
  2681. $ctx1.sendIdx[","]=1;
  2682. $2=self._confirm_($3);
  2683. if(smalltalk.assert($2)){
  2684. $4=_st(self["@selectedTab"]).__eq("instance");
  2685. if(smalltalk.assert($4)){
  2686. _st(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  2687. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  2688. } else {
  2689. _st(_st(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  2690. };
  2691. self._selectMethod_(nil);
  2692. };
  2693. };
  2694. return self}, function($ctx1) {$ctx1.fill(self,"removeMethod",{},globals.Browser)})},
  2695. args: [],
  2696. 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 ]]",
  2697. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"],
  2698. referencedClasses: []
  2699. }),
  2700. globals.Browser);
  2701. smalltalk.addMethod(
  2702. smalltalk.method({
  2703. selector: "removePackage",
  2704. protocol: 'actions',
  2705. fn: function (){
  2706. var self=this;
  2707. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2708. return smalltalk.withContext(function($ctx1) {
  2709. var $2,$1;
  2710. $2=_st("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  2711. $ctx1.sendIdx[","]=1;
  2712. $1=self._confirm_($2);
  2713. if(smalltalk.assert($1)){
  2714. _st($Smalltalk())._removePackage_(self["@selectedPackage"]);
  2715. self._updateCategoriesList();
  2716. };
  2717. return self}, function($ctx1) {$ctx1.fill(self,"removePackage",{},globals.Browser)})},
  2718. args: [],
  2719. 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 ]",
  2720. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"],
  2721. referencedClasses: ["Smalltalk"]
  2722. }),
  2723. globals.Browser);
  2724. smalltalk.addMethod(
  2725. smalltalk.method({
  2726. selector: "renameClass",
  2727. protocol: 'actions',
  2728. fn: function (){
  2729. var self=this;
  2730. var newName;
  2731. return smalltalk.withContext(function($ctx1) {
  2732. var $1,$2;
  2733. newName=self._prompt_("Rename class ".__comma(_st(self["@selectedClass"])._name()));
  2734. $1=_st(_st(newName)._notNil())._and_((function(){
  2735. return smalltalk.withContext(function($ctx2) {
  2736. return _st(newName)._notEmpty();
  2737. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2738. if(smalltalk.assert($1)){
  2739. _st(self["@selectedClass"])._rename_(newName);
  2740. self._updateClassesList();
  2741. $2=self._updateSourceAndButtons();
  2742. $2;
  2743. };
  2744. return self}, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},globals.Browser)})},
  2745. args: [],
  2746. 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 ]",
  2747. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"],
  2748. referencedClasses: []
  2749. }),
  2750. globals.Browser);
  2751. smalltalk.addMethod(
  2752. smalltalk.method({
  2753. selector: "renamePackage",
  2754. protocol: 'actions',
  2755. fn: function (){
  2756. var self=this;
  2757. var newName;
  2758. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  2759. return smalltalk.withContext(function($ctx1) {
  2760. var $1,$2,$receiver;
  2761. newName=self._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  2762. $1=newName;
  2763. if(($receiver = $1) == null || $receiver.isNil){
  2764. $1;
  2765. } else {
  2766. $2=_st(newName)._notEmpty();
  2767. if(smalltalk.assert($2)){
  2768. _st($Smalltalk())._renamePackage_to_(self["@selectedPackage"],newName);
  2769. self._updateCategoriesList();
  2770. };
  2771. };
  2772. return self}, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},globals.Browser)})},
  2773. args: [],
  2774. 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 ]]",
  2775. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "updateCategoriesList"],
  2776. referencedClasses: ["Smalltalk"]
  2777. }),
  2778. globals.Browser);
  2779. smalltalk.addMethod(
  2780. smalltalk.method({
  2781. selector: "renderBottomPanelOn:",
  2782. protocol: 'rendering',
  2783. fn: function (html){
  2784. var self=this;
  2785. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  2786. return smalltalk.withContext(function($ctx1) {
  2787. var $1,$2;
  2788. $1=_st(html)._div();
  2789. _st($1)._class_("amber_sourceCode");
  2790. $2=_st($1)._with_((function(){
  2791. return smalltalk.withContext(function($ctx2) {
  2792. self["@sourceArea"]=_st($SourceArea())._new();
  2793. self["@sourceArea"];
  2794. _st(self["@sourceArea"])._renderOn_(html);
  2795. _st(self["@sourceArea"])._onKeyDown_((function(e){
  2796. return smalltalk.withContext(function($ctx3) {
  2797. return self._handleSourceAreaKeyDown_(e);
  2798. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)})}));
  2799. return _st(self["@sourceArea"])._onKeyUp_((function(){
  2800. return smalltalk.withContext(function($ctx3) {
  2801. return self._updateStatus();
  2802. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2803. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2804. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Browser)})},
  2805. args: ["html"],
  2806. 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 ]]",
  2807. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
  2808. referencedClasses: ["SourceArea"]
  2809. }),
  2810. globals.Browser);
  2811. smalltalk.addMethod(
  2812. smalltalk.method({
  2813. selector: "renderBoxOn:",
  2814. protocol: 'rendering',
  2815. fn: function (html){
  2816. var self=this;
  2817. return smalltalk.withContext(function($ctx1) {
  2818. var $1;
  2819. self._renderTopPanelOn_(html);
  2820. self._renderTabsOn_(html);
  2821. $1=self._renderBottomPanelOn_(html);
  2822. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Browser)})},
  2823. args: ["html"],
  2824. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  2825. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
  2826. referencedClasses: []
  2827. }),
  2828. globals.Browser);
  2829. smalltalk.addMethod(
  2830. smalltalk.method({
  2831. selector: "renderButtonsOn:",
  2832. protocol: 'rendering',
  2833. fn: function (html){
  2834. var self=this;
  2835. return smalltalk.withContext(function($ctx1) {
  2836. var $1,$2,$3,$5,$6,$7,$8,$9,$10,$4;
  2837. self["@saveButton"]=_st(html)._button();
  2838. $ctx1.sendIdx["button"]=1;
  2839. $1=self["@saveButton"];
  2840. _st($1)._with_("Save");
  2841. $ctx1.sendIdx["with:"]=1;
  2842. $2=_st($1)._onClick_((function(){
  2843. return smalltalk.withContext(function($ctx2) {
  2844. return self._compile();
  2845. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2846. $ctx1.sendIdx["onClick:"]=1;
  2847. self["@methodButtons"]=_st(html)._span();
  2848. $ctx1.sendIdx["span"]=1;
  2849. self["@classButtons"]=_st(html)._span();
  2850. $3=_st(html)._div();
  2851. _st($3)._class_("right");
  2852. $4=_st($3)._with_((function(){
  2853. return smalltalk.withContext(function($ctx2) {
  2854. $5=_st(html)._button();
  2855. $ctx2.sendIdx["button"]=2;
  2856. _st($5)._with_("DoIt");
  2857. $ctx2.sendIdx["with:"]=3;
  2858. $6=_st($5)._onClick_((function(){
  2859. return smalltalk.withContext(function($ctx3) {
  2860. return _st(self["@sourceArea"])._doIt();
  2861. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  2862. $ctx2.sendIdx["onClick:"]=2;
  2863. $6;
  2864. $7=_st(html)._button();
  2865. $ctx2.sendIdx["button"]=3;
  2866. _st($7)._with_("PrintIt");
  2867. $ctx2.sendIdx["with:"]=4;
  2868. $8=_st($7)._onClick_((function(){
  2869. return smalltalk.withContext(function($ctx3) {
  2870. return _st(self["@sourceArea"])._printIt();
  2871. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  2872. $ctx2.sendIdx["onClick:"]=3;
  2873. $8;
  2874. $9=_st(html)._button();
  2875. _st($9)._with_("InspectIt");
  2876. $10=_st($9)._onClick_((function(){
  2877. return smalltalk.withContext(function($ctx3) {
  2878. return _st(self["@sourceArea"])._inspectIt();
  2879. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  2880. return $10;
  2881. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  2882. $ctx1.sendIdx["with:"]=2;
  2883. self._updateSourceAndButtons();
  2884. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Browser)})},
  2885. args: ["html"],
  2886. 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",
  2887. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
  2888. referencedClasses: []
  2889. }),
  2890. globals.Browser);
  2891. smalltalk.addMethod(
  2892. smalltalk.method({
  2893. selector: "renderTabsOn:",
  2894. protocol: 'rendering',
  2895. fn: function (html){
  2896. var self=this;
  2897. return smalltalk.withContext(function($ctx1) {
  2898. self["@tabsList"]=_st(_st(html)._ul())._class_("amber_tabs amber_browser");
  2899. self._updateTabsList();
  2900. return self}, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},globals.Browser)})},
  2901. args: ["html"],
  2902. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  2903. messageSends: ["class:", "ul", "updateTabsList"],
  2904. referencedClasses: []
  2905. }),
  2906. globals.Browser);
  2907. smalltalk.addMethod(
  2908. smalltalk.method({
  2909. selector: "renderTopPanelOn:",
  2910. protocol: 'rendering',
  2911. fn: function (html){
  2912. var self=this;
  2913. function $ClassesList(){return globals.ClassesList||(typeof ClassesList=="undefined"?nil:ClassesList)}
  2914. return smalltalk.withContext(function($ctx1) {
  2915. var $1,$3,$4,$6,$7,$8,$9,$10,$11,$5,$12,$13,$2;
  2916. $1=_st(html)._div();
  2917. $ctx1.sendIdx["div"]=1;
  2918. _st($1)._class_("top");
  2919. $ctx1.sendIdx["class:"]=1;
  2920. $2=_st($1)._with_((function(){
  2921. return smalltalk.withContext(function($ctx2) {
  2922. $3=_st(html)._ul();
  2923. $ctx2.sendIdx["ul"]=1;
  2924. self["@packagesList"]=_st($3)._class_("amber_column browser packages");
  2925. $ctx2.sendIdx["class:"]=2;
  2926. self["@packagesList"];
  2927. $4=_st(html)._div();
  2928. $ctx2.sendIdx["div"]=2;
  2929. _st($4)._class_("amber_packagesButtons");
  2930. $ctx2.sendIdx["class:"]=3;
  2931. $5=_st($4)._with_((function(){
  2932. return smalltalk.withContext(function($ctx3) {
  2933. $6=_st(html)._button();
  2934. $ctx3.sendIdx["button"]=1;
  2935. _st($6)._title_("Commit classes in this package to disk");
  2936. $ctx3.sendIdx["title:"]=1;
  2937. _st($6)._onClick_((function(){
  2938. return smalltalk.withContext(function($ctx4) {
  2939. return self._commitPackage();
  2940. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  2941. $ctx3.sendIdx["onClick:"]=1;
  2942. $7=_st($6)._with_("Commit");
  2943. $ctx3.sendIdx["with:"]=3;
  2944. $7;
  2945. $8=_st(html)._button();
  2946. $ctx3.sendIdx["button"]=2;
  2947. _st($8)._title_("Rename package");
  2948. $ctx3.sendIdx["title:"]=2;
  2949. _st($8)._onClick_((function(){
  2950. return smalltalk.withContext(function($ctx4) {
  2951. return self._renamePackage();
  2952. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  2953. $ctx3.sendIdx["onClick:"]=2;
  2954. $9=_st($8)._with_("Rename");
  2955. $ctx3.sendIdx["with:"]=4;
  2956. $9;
  2957. $10=_st(html)._button();
  2958. _st($10)._title_("Remove this package from the system");
  2959. _st($10)._onClick_((function(){
  2960. return smalltalk.withContext(function($ctx4) {
  2961. return self._removePackage();
  2962. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  2963. $11=_st($10)._with_("Remove");
  2964. return $11;
  2965. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  2966. $ctx2.sendIdx["with:"]=2;
  2967. $5;
  2968. self["@classesList"]=_st($ClassesList())._on_(self);
  2969. self["@classesList"];
  2970. _st(self["@classesList"])._renderOn_(html);
  2971. $12=_st(html)._ul();
  2972. $ctx2.sendIdx["ul"]=2;
  2973. self["@protocolsList"]=_st($12)._class_("amber_column browser protocols");
  2974. $ctx2.sendIdx["class:"]=4;
  2975. self["@protocolsList"];
  2976. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column browser methods");
  2977. $ctx2.sendIdx["class:"]=5;
  2978. self["@methodsList"];
  2979. self._updateCategoriesList();
  2980. self._updateClassesList();
  2981. self._updateProtocolsList();
  2982. $13=self._updateMethodsList();
  2983. $13;
  2984. return _st(_st(html)._div())._class_("amber_clear");
  2985. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  2986. $ctx1.sendIdx["with:"]=1;
  2987. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Browser)})},
  2988. args: ["html"],
  2989. 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' ]",
  2990. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
  2991. referencedClasses: ["ClassesList"]
  2992. }),
  2993. globals.Browser);
  2994. smalltalk.addMethod(
  2995. smalltalk.method({
  2996. selector: "resetClassesList",
  2997. protocol: 'updating',
  2998. fn: function (){
  2999. var self=this;
  3000. return smalltalk.withContext(function($ctx1) {
  3001. _st(self["@classesList"])._resetNodes();
  3002. return self}, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},globals.Browser)})},
  3003. args: [],
  3004. source: "resetClassesList\x0a\x09classesList resetNodes",
  3005. messageSends: ["resetNodes"],
  3006. referencedClasses: []
  3007. }),
  3008. globals.Browser);
  3009. smalltalk.addMethod(
  3010. smalltalk.method({
  3011. selector: "search:",
  3012. protocol: 'actions',
  3013. fn: function (aString){
  3014. var self=this;
  3015. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  3016. return smalltalk.withContext(function($ctx1) {
  3017. var $1,$2;
  3018. $1=self._cancelChanges();
  3019. if(smalltalk.assert($1)){
  3020. var searchedClass;
  3021. searchedClass=_st(_st($Smalltalk())._globals())._at_(aString);
  3022. searchedClass;
  3023. $2=_st(searchedClass)._isClass();
  3024. if(smalltalk.assert($2)){
  3025. _st(self._class())._openOn_(searchedClass);
  3026. } else {
  3027. self._searchReferencesOf_(aString);
  3028. };
  3029. };
  3030. return self}, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},globals.Browser)})},
  3031. args: ["aString"],
  3032. 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 ]]",
  3033. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"],
  3034. referencedClasses: ["Smalltalk"]
  3035. }),
  3036. globals.Browser);
  3037. smalltalk.addMethod(
  3038. smalltalk.method({
  3039. selector: "searchClassReferences",
  3040. protocol: 'actions',
  3041. fn: function (){
  3042. var self=this;
  3043. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3044. return smalltalk.withContext(function($ctx1) {
  3045. _st($ReferencesBrowser())._search_(_st(self["@selectedClass"])._name());
  3046. return self}, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},globals.Browser)})},
  3047. args: [],
  3048. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  3049. messageSends: ["search:", "name"],
  3050. referencedClasses: ["ReferencesBrowser"]
  3051. }),
  3052. globals.Browser);
  3053. smalltalk.addMethod(
  3054. smalltalk.method({
  3055. selector: "searchReferencesOf:",
  3056. protocol: 'actions',
  3057. fn: function (aString){
  3058. var self=this;
  3059. function $ReferencesBrowser(){return globals.ReferencesBrowser||(typeof ReferencesBrowser=="undefined"?nil:ReferencesBrowser)}
  3060. return smalltalk.withContext(function($ctx1) {
  3061. _st($ReferencesBrowser())._search_(aString);
  3062. return self}, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},globals.Browser)})},
  3063. args: ["aString"],
  3064. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  3065. messageSends: ["search:"],
  3066. referencedClasses: ["ReferencesBrowser"]
  3067. }),
  3068. globals.Browser);
  3069. smalltalk.addMethod(
  3070. smalltalk.method({
  3071. selector: "selectCategory:",
  3072. protocol: 'actions',
  3073. fn: function (aCategory){
  3074. var self=this;
  3075. return smalltalk.withContext(function($ctx1) {
  3076. var $1,$2;
  3077. $1=self._cancelChanges();
  3078. if(smalltalk.assert($1)){
  3079. self["@selectedPackage"]=aCategory;
  3080. self["@selectedPackage"];
  3081. self["@selectedMethod"]=nil;
  3082. self["@selectedProtocol"]=self["@selectedMethod"];
  3083. self["@selectedClass"]=self["@selectedProtocol"];
  3084. self["@selectedClass"];
  3085. self._resetClassesList();
  3086. self._updateCategoriesList();
  3087. self._updateClassesList();
  3088. self._updateProtocolsList();
  3089. self._updateMethodsList();
  3090. $2=self._updateSourceAndButtons();
  3091. $2;
  3092. };
  3093. return self}, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},globals.Browser)})},
  3094. args: ["aCategory"],
  3095. 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 ]",
  3096. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3097. referencedClasses: []
  3098. }),
  3099. globals.Browser);
  3100. smalltalk.addMethod(
  3101. smalltalk.method({
  3102. selector: "selectClass:",
  3103. protocol: 'actions',
  3104. fn: function (aClass){
  3105. var self=this;
  3106. return smalltalk.withContext(function($ctx1) {
  3107. var $1,$2;
  3108. $1=self._cancelChanges();
  3109. if(smalltalk.assert($1)){
  3110. self["@selectedClass"]=aClass;
  3111. self["@selectedClass"];
  3112. self["@selectedMethod"]=nil;
  3113. self["@selectedProtocol"]=self["@selectedMethod"];
  3114. self["@selectedProtocol"];
  3115. self._updateClassesList();
  3116. self._updateProtocolsList();
  3117. self._updateMethodsList();
  3118. $2=self._updateSourceAndButtons();
  3119. $2;
  3120. };
  3121. return self}, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},globals.Browser)})},
  3122. args: ["aClass"],
  3123. 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 ]",
  3124. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3125. referencedClasses: []
  3126. }),
  3127. globals.Browser);
  3128. smalltalk.addMethod(
  3129. smalltalk.method({
  3130. selector: "selectMethod:",
  3131. protocol: 'actions',
  3132. fn: function (aMethod){
  3133. var self=this;
  3134. return smalltalk.withContext(function($ctx1) {
  3135. var $1,$2;
  3136. $1=self._cancelChanges();
  3137. if(smalltalk.assert($1)){
  3138. self["@selectedMethod"]=aMethod;
  3139. self["@selectedMethod"];
  3140. self._updateProtocolsList();
  3141. self._updateMethodsList();
  3142. $2=self._updateSourceAndButtons();
  3143. $2;
  3144. };
  3145. return self}, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},globals.Browser)})},
  3146. args: ["aMethod"],
  3147. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3148. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3149. referencedClasses: []
  3150. }),
  3151. globals.Browser);
  3152. smalltalk.addMethod(
  3153. smalltalk.method({
  3154. selector: "selectProtocol:",
  3155. protocol: 'actions',
  3156. fn: function (aString){
  3157. var self=this;
  3158. return smalltalk.withContext(function($ctx1) {
  3159. var $1,$2;
  3160. $1=self._cancelChanges();
  3161. if(smalltalk.assert($1)){
  3162. self["@selectedProtocol"]=aString;
  3163. self["@selectedProtocol"];
  3164. self["@selectedMethod"]=nil;
  3165. self["@selectedMethod"];
  3166. self._updateProtocolsList();
  3167. self._updateMethodsList();
  3168. $2=self._updateSourceAndButtons();
  3169. $2;
  3170. };
  3171. return self}, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},globals.Browser)})},
  3172. args: ["aString"],
  3173. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  3174. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3175. referencedClasses: []
  3176. }),
  3177. globals.Browser);
  3178. smalltalk.addMethod(
  3179. smalltalk.method({
  3180. selector: "selectTab:",
  3181. protocol: 'actions',
  3182. fn: function (aString){
  3183. var self=this;
  3184. return smalltalk.withContext(function($ctx1) {
  3185. var $1;
  3186. $1=self._cancelChanges();
  3187. if(smalltalk.assert($1)){
  3188. self["@selectedTab"]=aString;
  3189. self["@selectedTab"];
  3190. self._selectProtocol_(nil);
  3191. self._updateTabsList();
  3192. };
  3193. return self}, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},globals.Browser)})},
  3194. args: ["aString"],
  3195. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  3196. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"],
  3197. referencedClasses: []
  3198. }),
  3199. globals.Browser);
  3200. smalltalk.addMethod(
  3201. smalltalk.method({
  3202. selector: "selectedClass",
  3203. protocol: 'accessing',
  3204. fn: function (){
  3205. var self=this;
  3206. var $1;
  3207. $1=self["@selectedClass"];
  3208. return $1;
  3209. },
  3210. args: [],
  3211. source: "selectedClass\x0a\x09^ selectedClass",
  3212. messageSends: [],
  3213. referencedClasses: []
  3214. }),
  3215. globals.Browser);
  3216. smalltalk.addMethod(
  3217. smalltalk.method({
  3218. selector: "selectedPackage",
  3219. protocol: 'accessing',
  3220. fn: function (){
  3221. var self=this;
  3222. var $1;
  3223. $1=self["@selectedPackage"];
  3224. return $1;
  3225. },
  3226. args: [],
  3227. source: "selectedPackage\x0a\x09^ selectedPackage",
  3228. messageSends: [],
  3229. referencedClasses: []
  3230. }),
  3231. globals.Browser);
  3232. smalltalk.addMethod(
  3233. smalltalk.method({
  3234. selector: "setMethodProtocol:",
  3235. protocol: 'actions',
  3236. fn: function (aString){
  3237. var self=this;
  3238. return smalltalk.withContext(function($ctx1) {
  3239. var $1,$2,$3;
  3240. $1=self._cancelChanges();
  3241. if(smalltalk.assert($1)){
  3242. $2=_st(self._protocols())._includes_(aString);
  3243. if(smalltalk.assert($2)){
  3244. _st(self["@selectedMethod"])._protocol_(aString);
  3245. self["@selectedProtocol"]=aString;
  3246. self["@selectedProtocol"];
  3247. self["@selectedMethod"]=self["@selectedMethod"];
  3248. self["@selectedMethod"];
  3249. self._updateProtocolsList();
  3250. self._updateMethodsList();
  3251. $3=self._updateSourceAndButtons();
  3252. $3;
  3253. } else {
  3254. self._addNewProtocol();
  3255. };
  3256. };
  3257. return self}, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},globals.Browser)})},
  3258. args: ["aString"],
  3259. 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 ]]",
  3260. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"],
  3261. referencedClasses: []
  3262. }),
  3263. globals.Browser);
  3264. smalltalk.addMethod(
  3265. smalltalk.method({
  3266. selector: "showClassButtons",
  3267. protocol: 'actions',
  3268. fn: function (){
  3269. var self=this;
  3270. return smalltalk.withContext(function($ctx1) {
  3271. _st(_st(self["@classButtons"])._asJQuery())._show();
  3272. return self}, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},globals.Browser)})},
  3273. args: [],
  3274. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  3275. messageSends: ["show", "asJQuery"],
  3276. referencedClasses: []
  3277. }),
  3278. globals.Browser);
  3279. smalltalk.addMethod(
  3280. smalltalk.method({
  3281. selector: "showMethodButtons",
  3282. protocol: 'actions',
  3283. fn: function (){
  3284. var self=this;
  3285. return smalltalk.withContext(function($ctx1) {
  3286. _st(_st(self["@methodButtons"])._asJQuery())._show();
  3287. return self}, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},globals.Browser)})},
  3288. args: [],
  3289. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  3290. messageSends: ["show", "asJQuery"],
  3291. referencedClasses: []
  3292. }),
  3293. globals.Browser);
  3294. smalltalk.addMethod(
  3295. smalltalk.method({
  3296. selector: "source",
  3297. protocol: 'accessing',
  3298. fn: function (){
  3299. var self=this;
  3300. return smalltalk.withContext(function($ctx1) {
  3301. var $1,$4,$3,$2,$6,$5,$receiver;
  3302. $1=_st(self["@selectedTab"]).__eq("comment");
  3303. if(! smalltalk.assert($1)){
  3304. $4=_st(self["@selectedProtocol"])._notNil();
  3305. $ctx1.sendIdx["notNil"]=1;
  3306. $3=_st($4)._or_((function(){
  3307. return smalltalk.withContext(function($ctx2) {
  3308. return _st(self["@selectedMethod"])._notNil();
  3309. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  3310. if(smalltalk.assert($3)){
  3311. $2=self._methodSource();
  3312. } else {
  3313. $2=self._declarationSource();
  3314. };
  3315. return $2;
  3316. };
  3317. $6=self["@selectedClass"];
  3318. if(($receiver = $6) == null || $receiver.isNil){
  3319. $5="";
  3320. } else {
  3321. $5=self._classCommentSource();
  3322. };
  3323. return $5;
  3324. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Browser)})},
  3325. args: [],
  3326. 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 ]",
  3327. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"],
  3328. referencedClasses: []
  3329. }),
  3330. globals.Browser);
  3331. smalltalk.addMethod(
  3332. smalltalk.method({
  3333. selector: "updateCategoriesList",
  3334. protocol: 'updating',
  3335. fn: function (){
  3336. var self=this;
  3337. return smalltalk.withContext(function($ctx1) {
  3338. var $1,$2,$3,$4;
  3339. _st(self["@packagesList"])._contents_((function(html){
  3340. return smalltalk.withContext(function($ctx2) {
  3341. return _st(self._packages())._do_((function(each){
  3342. var li,label;
  3343. return smalltalk.withContext(function($ctx3) {
  3344. $1=_st(each)._isEmpty();
  3345. if(smalltalk.assert($1)){
  3346. label="Unclassified";
  3347. label;
  3348. } else {
  3349. label=each;
  3350. label;
  3351. };
  3352. li=_st(html)._li();
  3353. li;
  3354. $2=_st(self["@selectedPackage"]).__eq(each);
  3355. if(smalltalk.assert($2)){
  3356. _st(li)._class_("selected");
  3357. };
  3358. $3=li;
  3359. _st($3)._with_(label);
  3360. $4=_st($3)._onClick_((function(){
  3361. return smalltalk.withContext(function($ctx4) {
  3362. return self._selectCategory_(each);
  3363. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  3364. return $4;
  3365. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)})}));
  3366. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3367. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.Browser)})},
  3368. args: [],
  3369. 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 ]] ]",
  3370. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"],
  3371. referencedClasses: []
  3372. }),
  3373. globals.Browser);
  3374. smalltalk.addMethod(
  3375. smalltalk.method({
  3376. selector: "updateClassesList",
  3377. protocol: 'updating',
  3378. fn: function (){
  3379. var self=this;
  3380. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  3381. return smalltalk.withContext(function($ctx1) {
  3382. _st(_st($TabManager())._current())._update();
  3383. _st(self["@classesList"])._updateNodes();
  3384. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.Browser)})},
  3385. args: [],
  3386. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  3387. messageSends: ["update", "current", "updateNodes"],
  3388. referencedClasses: ["TabManager"]
  3389. }),
  3390. globals.Browser);
  3391. smalltalk.addMethod(
  3392. smalltalk.method({
  3393. selector: "updateMethodsList",
  3394. protocol: 'updating',
  3395. fn: function (){
  3396. var self=this;
  3397. return smalltalk.withContext(function($ctx1) {
  3398. var $1,$2,$3;
  3399. _st(self["@methodsList"])._contents_((function(html){
  3400. return smalltalk.withContext(function($ctx2) {
  3401. return _st(self._methods())._do_((function(each){
  3402. var li;
  3403. return smalltalk.withContext(function($ctx3) {
  3404. li=_st(html)._li();
  3405. li;
  3406. $1=_st(self["@selectedMethod"]).__eq(each);
  3407. if(smalltalk.assert($1)){
  3408. _st(li)._class_("selected");
  3409. };
  3410. $2=li;
  3411. _st($2)._with_(_st(each)._selector());
  3412. $3=_st($2)._onClick_((function(){
  3413. return smalltalk.withContext(function($ctx4) {
  3414. return self._selectMethod_(each);
  3415. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3416. return $3;
  3417. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3418. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3419. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.Browser)})},
  3420. args: [],
  3421. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09self methods do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [ self selectMethod: each ]] ]",
  3422. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"],
  3423. referencedClasses: []
  3424. }),
  3425. globals.Browser);
  3426. smalltalk.addMethod(
  3427. smalltalk.method({
  3428. selector: "updateProtocolsList",
  3429. protocol: 'updating',
  3430. fn: function (){
  3431. var self=this;
  3432. return smalltalk.withContext(function($ctx1) {
  3433. var $1,$2,$3;
  3434. _st(self["@protocolsList"])._contents_((function(html){
  3435. return smalltalk.withContext(function($ctx2) {
  3436. return _st(self._protocols())._do_((function(each){
  3437. var li;
  3438. return smalltalk.withContext(function($ctx3) {
  3439. li=_st(html)._li();
  3440. li;
  3441. $1=_st(self["@selectedProtocol"]).__eq(each);
  3442. if(smalltalk.assert($1)){
  3443. _st(li)._class_("selected");
  3444. };
  3445. $2=li;
  3446. _st($2)._with_(each);
  3447. $3=_st($2)._onClick_((function(){
  3448. return smalltalk.withContext(function($ctx4) {
  3449. return self._selectProtocol_(each);
  3450. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  3451. return $3;
  3452. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  3453. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3454. return self}, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},globals.Browser)})},
  3455. args: [],
  3456. 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 ]] ]",
  3457. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"],
  3458. referencedClasses: []
  3459. }),
  3460. globals.Browser);
  3461. smalltalk.addMethod(
  3462. smalltalk.method({
  3463. selector: "updateSourceAndButtons",
  3464. protocol: 'updating',
  3465. fn: function (){
  3466. var self=this;
  3467. var currentProtocol;
  3468. return smalltalk.withContext(function($ctx1) {
  3469. 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;
  3470. self._disableSaveButton();
  3471. _st(self["@classButtons"])._contents_((function(html){
  3472. return smalltalk.withContext(function($ctx2) {
  3473. $1=_st(html)._button();
  3474. $ctx2.sendIdx["button"]=1;
  3475. _st($1)._title_("Create a new class");
  3476. _st($1)._onClick_((function(){
  3477. return smalltalk.withContext(function($ctx3) {
  3478. return self._addNewClass();
  3479. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  3480. $ctx2.sendIdx["onClick:"]=1;
  3481. $2=_st($1)._with_("New class");
  3482. $ctx2.sendIdx["with:"]=1;
  3483. $2;
  3484. $3=_st(html)._button();
  3485. $ctx2.sendIdx["button"]=2;
  3486. _st($3)._with_("Rename class");
  3487. $ctx2.sendIdx["with:"]=2;
  3488. $4=_st($3)._onClick_((function(){
  3489. return smalltalk.withContext(function($ctx3) {
  3490. return self._renameClass();
  3491. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3492. $ctx2.sendIdx["onClick:"]=2;
  3493. $4;
  3494. $5=_st(html)._button();
  3495. $ctx2.sendIdx["button"]=3;
  3496. _st($5)._with_("Copy class");
  3497. $ctx2.sendIdx["with:"]=3;
  3498. $6=_st($5)._onClick_((function(){
  3499. return smalltalk.withContext(function($ctx3) {
  3500. return self._copyClass();
  3501. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3502. $ctx2.sendIdx["onClick:"]=3;
  3503. $6;
  3504. $7=_st(html)._button();
  3505. $ctx2.sendIdx["button"]=4;
  3506. _st($7)._with_("Remove class");
  3507. $ctx2.sendIdx["with:"]=4;
  3508. $8=_st($7)._onClick_((function(){
  3509. return smalltalk.withContext(function($ctx3) {
  3510. return self._removeClass();
  3511. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)})}));
  3512. $ctx2.sendIdx["onClick:"]=4;
  3513. $8;
  3514. $9=_st(html)._button();
  3515. $ctx2.sendIdx["button"]=5;
  3516. _st($9)._with_("References");
  3517. $ctx2.sendIdx["with:"]=5;
  3518. $10=_st($9)._onClick_((function(){
  3519. return smalltalk.withContext(function($ctx3) {
  3520. return self._searchClassReferences();
  3521. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3522. $ctx2.sendIdx["onClick:"]=5;
  3523. return $10;
  3524. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  3525. $ctx1.sendIdx["contents:"]=1;
  3526. _st(self["@methodButtons"])._contents_((function(html){
  3527. var protocolSelect,referencesSelect;
  3528. return smalltalk.withContext(function($ctx2) {
  3529. $11=_st(html)._button();
  3530. _st($11)._with_("Remove method");
  3531. $ctx2.sendIdx["with:"]=6;
  3532. $12=_st($11)._onClick_((function(){
  3533. return smalltalk.withContext(function($ctx3) {
  3534. return self._removeMethod();
  3535. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)})}));
  3536. $12;
  3537. protocolSelect=_st(html)._select();
  3538. $ctx2.sendIdx["select"]=1;
  3539. protocolSelect;
  3540. $13=protocolSelect;
  3541. _st($13)._onChange_((function(){
  3542. return smalltalk.withContext(function($ctx3) {
  3543. $15=_st(protocolSelect)._asJQuery();
  3544. $ctx3.sendIdx["asJQuery"]=1;
  3545. $14=_st($15)._val();
  3546. $ctx3.sendIdx["val"]=1;
  3547. return self._setMethodProtocol_($14);
  3548. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3549. $ctx2.sendIdx["onChange:"]=1;
  3550. $16=_st($13)._with_((function(){
  3551. return smalltalk.withContext(function($ctx3) {
  3552. $17=_st(html)._option();
  3553. $ctx3.sendIdx["option"]=1;
  3554. _st($17)._with_("Method protocol");
  3555. $ctx3.sendIdx["with:"]=8;
  3556. $18=_st($17)._at_put_("disabled","disabled");
  3557. $ctx3.sendIdx["at:put:"]=1;
  3558. $18;
  3559. $19=_st(html)._option();
  3560. $ctx3.sendIdx["option"]=2;
  3561. _st($19)._class_("important");
  3562. $ctx3.sendIdx["class:"]=1;
  3563. $20=_st($19)._with_("New...");
  3564. $ctx3.sendIdx["with:"]=9;
  3565. $20;
  3566. currentProtocol=self["@selectedProtocol"];
  3567. currentProtocol;
  3568. $22=_st(currentProtocol)._isNil();
  3569. $ctx3.sendIdx["isNil"]=1;
  3570. $21=_st($22)._and_((function(){
  3571. return smalltalk.withContext(function($ctx4) {
  3572. return _st(self["@selectedMethod"])._notNil();
  3573. $ctx4.sendIdx["notNil"]=1;
  3574. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)})}));
  3575. if(smalltalk.assert($21)){
  3576. currentProtocol=_st(self["@selectedMethod"])._category();
  3577. currentProtocol;
  3578. };
  3579. return _st(self._protocols())._do_((function(each){
  3580. var option;
  3581. return smalltalk.withContext(function($ctx4) {
  3582. $23=_st(html)._option();
  3583. $ctx4.sendIdx["option"]=3;
  3584. option=_st($23)._with_(each);
  3585. $ctx4.sendIdx["with:"]=10;
  3586. option;
  3587. $24=_st(currentProtocol).__eq(each);
  3588. if(smalltalk.assert($24)){
  3589. return _st(option)._at_put_("selected","selected");
  3590. $ctx4.sendIdx["at:put:"]=2;
  3591. };
  3592. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)})}));
  3593. $ctx3.sendIdx["do:"]=1;
  3594. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3595. $ctx2.sendIdx["with:"]=7;
  3596. $16;
  3597. $25=_st(self["@selectedMethod"])._isNil();
  3598. $ctx2.sendIdx["isNil"]=2;
  3599. if(! smalltalk.assert($25)){
  3600. referencesSelect=_st(html)._select();
  3601. referencesSelect;
  3602. $26=referencesSelect;
  3603. _st($26)._onChange_((function(){
  3604. return smalltalk.withContext(function($ctx3) {
  3605. return self._searchReferencesOf_(_st(_st(referencesSelect)._asJQuery())._val());
  3606. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)})}));
  3607. $27=_st($26)._with_((function(){
  3608. var option;
  3609. return smalltalk.withContext(function($ctx3) {
  3610. $28=_st(html)._option();
  3611. $ctx3.sendIdx["option"]=4;
  3612. _st($28)._with_("References");
  3613. $ctx3.sendIdx["with:"]=12;
  3614. _st($28)._at_put_("disabled","disabled");
  3615. $ctx3.sendIdx["at:put:"]=3;
  3616. $29=_st($28)._at_put_("selected","selected");
  3617. $29;
  3618. $30=_st(html)._option();
  3619. $ctx3.sendIdx["option"]=5;
  3620. _st($30)._class_("important");
  3621. $31=_st($30)._with_(_st(self["@selectedMethod"])._selector());
  3622. $ctx3.sendIdx["with:"]=13;
  3623. $31;
  3624. return _st(_st(_st(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  3625. return smalltalk.withContext(function($ctx4) {
  3626. return _st(_st(html)._option())._with_(each);
  3627. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)})}));
  3628. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)})}));
  3629. $ctx2.sendIdx["with:"]=11;
  3630. return $27;
  3631. };
  3632. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)})}));
  3633. $32=_st(self["@selectedMethod"])._isNil();
  3634. $ctx1.sendIdx["isNil"]=3;
  3635. if(smalltalk.assert($32)){
  3636. self._hideMethodButtons();
  3637. $33=_st(_st(self["@selectedClass"])._isNil())._or_((function(){
  3638. return smalltalk.withContext(function($ctx2) {
  3639. return _st(self["@selectedProtocol"])._notNil();
  3640. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)})}));
  3641. if(smalltalk.assert($33)){
  3642. self._hideClassButtons();
  3643. $ctx1.sendIdx["hideClassButtons"]=1;
  3644. } else {
  3645. self._showClassButtons();
  3646. };
  3647. } else {
  3648. self._hideClassButtons();
  3649. self._showMethodButtons();
  3650. };
  3651. _st(self["@sourceArea"])._val_(self._source());
  3652. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},globals.Browser)})},
  3653. args: [],
  3654. 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",
  3655. 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"],
  3656. referencedClasses: []
  3657. }),
  3658. globals.Browser);
  3659. smalltalk.addMethod(
  3660. smalltalk.method({
  3661. selector: "updateStatus",
  3662. protocol: 'updating',
  3663. fn: function (){
  3664. var self=this;
  3665. return smalltalk.withContext(function($ctx1) {
  3666. var $1,$2,$3,$receiver;
  3667. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  3668. if(smalltalk.assert($1)){
  3669. $2=self["@saveButton"];
  3670. if(($receiver = $2) == null || $receiver.isNil){
  3671. $2;
  3672. } else {
  3673. _st(self["@saveButton"])._at_put_("disabled",true);
  3674. };
  3675. self["@unsavedChanges"]=false;
  3676. self["@unsavedChanges"];
  3677. } else {
  3678. $3=self["@saveButton"];
  3679. if(($receiver = $3) == null || $receiver.isNil){
  3680. $3;
  3681. } else {
  3682. _st(self["@saveButton"])._removeAt_("disabled");
  3683. };
  3684. self["@unsavedChanges"]=true;
  3685. self["@unsavedChanges"];
  3686. };
  3687. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Browser)})},
  3688. args: [],
  3689. 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 ]",
  3690. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  3691. referencedClasses: []
  3692. }),
  3693. globals.Browser);
  3694. smalltalk.addMethod(
  3695. smalltalk.method({
  3696. selector: "updateTabsList",
  3697. protocol: 'updating',
  3698. fn: function (){
  3699. var self=this;
  3700. return smalltalk.withContext(function($ctx1) {
  3701. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20;
  3702. _st(self["@tabsList"])._contents_((function(html){
  3703. var li;
  3704. return smalltalk.withContext(function($ctx2) {
  3705. li=_st(html)._li();
  3706. $ctx2.sendIdx["li"]=1;
  3707. li;
  3708. $1=_st(self["@selectedTab"]).__eq("instance");
  3709. $ctx2.sendIdx["="]=1;
  3710. if(smalltalk.assert($1)){
  3711. _st(li)._class_("selected");
  3712. $ctx2.sendIdx["class:"]=1;
  3713. };
  3714. $2=li;
  3715. _st($2)._with_((function(){
  3716. return smalltalk.withContext(function($ctx3) {
  3717. $3=_st(html)._span();
  3718. $ctx3.sendIdx["span"]=1;
  3719. _st($3)._class_("ltab");
  3720. $ctx3.sendIdx["class:"]=2;
  3721. $4=_st(html)._span();
  3722. $ctx3.sendIdx["span"]=2;
  3723. _st($4)._class_("mtab");
  3724. $ctx3.sendIdx["class:"]=3;
  3725. $5=_st($4)._with_("Instance");
  3726. $ctx3.sendIdx["with:"]=2;
  3727. $5;
  3728. $6=_st(html)._span();
  3729. $ctx3.sendIdx["span"]=3;
  3730. return _st($6)._class_("rtab");
  3731. $ctx3.sendIdx["class:"]=4;
  3732. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  3733. $ctx2.sendIdx["with:"]=1;
  3734. $7=_st($2)._onClick_((function(){
  3735. return smalltalk.withContext(function($ctx3) {
  3736. return self._selectTab_("instance");
  3737. $ctx3.sendIdx["selectTab:"]=1;
  3738. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)})}));
  3739. $ctx2.sendIdx["onClick:"]=1;
  3740. $7;
  3741. li=_st(html)._li();
  3742. $ctx2.sendIdx["li"]=2;
  3743. li;
  3744. $8=_st(self["@selectedTab"]).__eq("class");
  3745. $ctx2.sendIdx["="]=2;
  3746. if(smalltalk.assert($8)){
  3747. _st(li)._class_("selected");
  3748. $ctx2.sendIdx["class:"]=5;
  3749. };
  3750. $9=li;
  3751. _st($9)._with_((function(){
  3752. return smalltalk.withContext(function($ctx3) {
  3753. $10=_st(html)._span();
  3754. $ctx3.sendIdx["span"]=4;
  3755. _st($10)._class_("ltab");
  3756. $ctx3.sendIdx["class:"]=6;
  3757. $11=_st(html)._span();
  3758. $ctx3.sendIdx["span"]=5;
  3759. _st($11)._class_("mtab");
  3760. $ctx3.sendIdx["class:"]=7;
  3761. $12=_st($11)._with_("Class");
  3762. $ctx3.sendIdx["with:"]=4;
  3763. $12;
  3764. $13=_st(html)._span();
  3765. $ctx3.sendIdx["span"]=6;
  3766. return _st($13)._class_("rtab");
  3767. $ctx3.sendIdx["class:"]=8;
  3768. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)})}));
  3769. $ctx2.sendIdx["with:"]=3;
  3770. $14=_st($9)._onClick_((function(){
  3771. return smalltalk.withContext(function($ctx3) {
  3772. return self._selectTab_("class");
  3773. $ctx3.sendIdx["selectTab:"]=2;
  3774. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)})}));
  3775. $ctx2.sendIdx["onClick:"]=2;
  3776. $14;
  3777. li=_st(html)._li();
  3778. li;
  3779. $15=_st(self["@selectedTab"]).__eq("comment");
  3780. if(smalltalk.assert($15)){
  3781. _st(li)._class_("selected");
  3782. $ctx2.sendIdx["class:"]=9;
  3783. };
  3784. $16=li;
  3785. _st($16)._with_((function(){
  3786. return smalltalk.withContext(function($ctx3) {
  3787. $17=_st(html)._span();
  3788. $ctx3.sendIdx["span"]=7;
  3789. _st($17)._class_("ltab");
  3790. $ctx3.sendIdx["class:"]=10;
  3791. $18=_st(html)._span();
  3792. $ctx3.sendIdx["span"]=8;
  3793. _st($18)._class_("mtab");
  3794. $ctx3.sendIdx["class:"]=11;
  3795. $19=_st($18)._with_("Comment");
  3796. $19;
  3797. return _st(_st(html)._span())._class_("rtab");
  3798. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)})}));
  3799. $ctx2.sendIdx["with:"]=5;
  3800. $20=_st($16)._onClick_((function(){
  3801. return smalltalk.withContext(function($ctx3) {
  3802. return self._selectTab_("comment");
  3803. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)})}));
  3804. return $20;
  3805. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  3806. return self}, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},globals.Browser)})},
  3807. args: [],
  3808. 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 ]]",
  3809. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"],
  3810. referencedClasses: []
  3811. }),
  3812. globals.Browser);
  3813. smalltalk.addMethod(
  3814. smalltalk.method({
  3815. selector: "open",
  3816. protocol: 'convenience',
  3817. fn: function (){
  3818. var self=this;
  3819. return smalltalk.withContext(function($ctx1) {
  3820. _st(self._new())._open();
  3821. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.Browser.klass)})},
  3822. args: [],
  3823. source: "open\x0a\x09self new open",
  3824. messageSends: ["open", "new"],
  3825. referencedClasses: []
  3826. }),
  3827. globals.Browser.klass);
  3828. smalltalk.addMethod(
  3829. smalltalk.method({
  3830. selector: "openOn:",
  3831. protocol: 'convenience',
  3832. fn: function (aClass){
  3833. var self=this;
  3834. return smalltalk.withContext(function($ctx1) {
  3835. var $2,$3,$1;
  3836. $2=self._new();
  3837. _st($2)._open();
  3838. _st($2)._selectCategory_(_st(aClass)._category());
  3839. $3=_st($2)._selectClass_(aClass);
  3840. $1=$3;
  3841. return $1;
  3842. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},globals.Browser.klass)})},
  3843. args: ["aClass"],
  3844. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  3845. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
  3846. referencedClasses: []
  3847. }),
  3848. globals.Browser.klass);
  3849. smalltalk.addClass('Debugger', globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  3850. smalltalk.addMethod(
  3851. smalltalk.method({
  3852. selector: "allVariables",
  3853. protocol: 'accessing',
  3854. fn: function (){
  3855. var self=this;
  3856. var all;
  3857. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  3858. return smalltalk.withContext(function($ctx1) {
  3859. var $3,$2,$1,$4;
  3860. all=_st($Dictionary())._new();
  3861. $3=self._receiver();
  3862. $ctx1.sendIdx["receiver"]=1;
  3863. $2=_st($3)._class();
  3864. $1=_st($2)._allInstanceVariableNames();
  3865. _st($1)._do_((function(each){
  3866. return smalltalk.withContext(function($ctx2) {
  3867. return _st(all)._at_put_(each,_st(self._receiver())._instVarAt_(each));
  3868. $ctx2.sendIdx["at:put:"]=1;
  3869. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  3870. _st(_st(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  3871. return smalltalk.withContext(function($ctx2) {
  3872. return _st(all)._at_put_(key,value);
  3873. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)})}));
  3874. $4=all;
  3875. return $4;
  3876. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},globals.Debugger)})},
  3877. args: [],
  3878. 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",
  3879. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"],
  3880. referencedClasses: ["Dictionary"]
  3881. }),
  3882. globals.Debugger);
  3883. smalltalk.addMethod(
  3884. smalltalk.method({
  3885. selector: "canBeClosed",
  3886. protocol: 'testing',
  3887. fn: function (){
  3888. var self=this;
  3889. return true;
  3890. },
  3891. args: [],
  3892. source: "canBeClosed\x0a\x09^ true",
  3893. messageSends: [],
  3894. referencedClasses: []
  3895. }),
  3896. globals.Debugger);
  3897. smalltalk.addMethod(
  3898. smalltalk.method({
  3899. selector: "error",
  3900. protocol: 'accessing',
  3901. fn: function (){
  3902. var self=this;
  3903. var $1;
  3904. $1=self["@error"];
  3905. return $1;
  3906. },
  3907. args: [],
  3908. source: "error\x0a\x09^ error",
  3909. messageSends: [],
  3910. referencedClasses: []
  3911. }),
  3912. globals.Debugger);
  3913. smalltalk.addMethod(
  3914. smalltalk.method({
  3915. selector: "error:",
  3916. protocol: 'accessing',
  3917. fn: function (anError){
  3918. var self=this;
  3919. self["@error"]=anError;
  3920. return self},
  3921. args: ["anError"],
  3922. source: "error: anError\x0a\x09error := anError",
  3923. messageSends: [],
  3924. referencedClasses: []
  3925. }),
  3926. globals.Debugger);
  3927. smalltalk.addMethod(
  3928. smalltalk.method({
  3929. selector: "initialize",
  3930. protocol: 'initialization',
  3931. fn: function (){
  3932. var self=this;
  3933. return smalltalk.withContext(function($ctx1) {
  3934. ($ctx1.supercall = true, globals.Debugger.superclass.fn.prototype._initialize.apply(_st(self), []));
  3935. $ctx1.supercall = false;
  3936. _st(self["@unsavedChanges"]).__eq(false);
  3937. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.Debugger)})},
  3938. args: [],
  3939. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  3940. messageSends: ["initialize", "="],
  3941. referencedClasses: []
  3942. }),
  3943. globals.Debugger);
  3944. smalltalk.addMethod(
  3945. smalltalk.method({
  3946. selector: "inspectSelectedVariable",
  3947. protocol: 'actions',
  3948. fn: function (){
  3949. var self=this;
  3950. return smalltalk.withContext(function($ctx1) {
  3951. _st(self["@selectedVariable"])._inspect();
  3952. return self}, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},globals.Debugger)})},
  3953. args: [],
  3954. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  3955. messageSends: ["inspect"],
  3956. referencedClasses: []
  3957. }),
  3958. globals.Debugger);
  3959. smalltalk.addMethod(
  3960. smalltalk.method({
  3961. selector: "label",
  3962. protocol: 'accessing',
  3963. fn: function (){
  3964. var self=this;
  3965. return "[ Debugger ]";
  3966. },
  3967. args: [],
  3968. source: "label\x0a\x09^ '[ Debugger ]'",
  3969. messageSends: [],
  3970. referencedClasses: []
  3971. }),
  3972. globals.Debugger);
  3973. smalltalk.addMethod(
  3974. smalltalk.method({
  3975. selector: "method",
  3976. protocol: 'accessing',
  3977. fn: function (){
  3978. var self=this;
  3979. return smalltalk.withContext(function($ctx1) {
  3980. var $1;
  3981. $1=_st(self["@selectedContext"])._method();
  3982. return $1;
  3983. }, function($ctx1) {$ctx1.fill(self,"method",{},globals.Debugger)})},
  3984. args: [],
  3985. source: "method\x0a\x09^ selectedContext method",
  3986. messageSends: ["method"],
  3987. referencedClasses: []
  3988. }),
  3989. globals.Debugger);
  3990. smalltalk.addMethod(
  3991. smalltalk.method({
  3992. selector: "proceed",
  3993. protocol: 'actions',
  3994. fn: function (){
  3995. var self=this;
  3996. return smalltalk.withContext(function($ctx1) {
  3997. self._close();
  3998. _st(_st(self["@selectedContext"])._receiver())._perform_withArguments_(_st(self["@selectedContext"])._selector(),_st(self["@selectedContext"])._temps());
  3999. return self}, function($ctx1) {$ctx1.fill(self,"proceed",{},globals.Debugger)})},
  4000. args: [],
  4001. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
  4002. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "temps"],
  4003. referencedClasses: []
  4004. }),
  4005. globals.Debugger);
  4006. smalltalk.addMethod(
  4007. smalltalk.method({
  4008. selector: "receiver",
  4009. protocol: 'accessing',
  4010. fn: function (){
  4011. var self=this;
  4012. return smalltalk.withContext(function($ctx1) {
  4013. var $1;
  4014. $1=_st(self["@selectedContext"])._receiver();
  4015. return $1;
  4016. }, function($ctx1) {$ctx1.fill(self,"receiver",{},globals.Debugger)})},
  4017. args: [],
  4018. source: "receiver\x0a\x09^ selectedContext receiver",
  4019. messageSends: ["receiver"],
  4020. referencedClasses: []
  4021. }),
  4022. globals.Debugger);
  4023. smalltalk.addMethod(
  4024. smalltalk.method({
  4025. selector: "renderBottomPanelOn:",
  4026. protocol: 'rendering',
  4027. fn: function (html){
  4028. var self=this;
  4029. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4030. return smalltalk.withContext(function($ctx1) {
  4031. var $1,$2;
  4032. $1=_st(html)._div();
  4033. $ctx1.sendIdx["div"]=1;
  4034. _st($1)._class_("amber_sourceCode debugger");
  4035. $ctx1.sendIdx["class:"]=1;
  4036. $2=_st($1)._with_((function(){
  4037. return smalltalk.withContext(function($ctx2) {
  4038. self["@sourceArea"]=_st($SourceArea())._new();
  4039. self["@sourceArea"];
  4040. return _st(self["@sourceArea"])._renderOn_(html);
  4041. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4042. self["@ul2"]=_st(_st(html)._ul())._class_("amber_column debugger variables");
  4043. $ctx1.sendIdx["class:"]=2;
  4044. self["@inspector"]=_st(_st(html)._div())._class_("amber_column debugger inspector");
  4045. _st(self["@sourceArea"])._onKeyUp_((function(){
  4046. return smalltalk.withContext(function($ctx2) {
  4047. return self._updateStatus();
  4048. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4049. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.Debugger)})},
  4050. args: ["html"],
  4051. 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 ]",
  4052. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
  4053. referencedClasses: ["SourceArea"]
  4054. }),
  4055. globals.Debugger);
  4056. smalltalk.addMethod(
  4057. smalltalk.method({
  4058. selector: "renderBoxOn:",
  4059. protocol: 'rendering',
  4060. fn: function (html){
  4061. var self=this;
  4062. return smalltalk.withContext(function($ctx1) {
  4063. var $1;
  4064. self._renderTopPanelOn_(html);
  4065. $1=self._renderBottomPanelOn_(html);
  4066. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Debugger)})},
  4067. args: ["html"],
  4068. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4069. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4070. referencedClasses: []
  4071. }),
  4072. globals.Debugger);
  4073. smalltalk.addMethod(
  4074. smalltalk.method({
  4075. selector: "renderButtonsOn:",
  4076. protocol: 'rendering',
  4077. fn: function (html){
  4078. var self=this;
  4079. return smalltalk.withContext(function($ctx1) {
  4080. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15;
  4081. $1=_st(html)._button();
  4082. $ctx1.sendIdx["button"]=1;
  4083. _st($1)._with_("Save");
  4084. $ctx1.sendIdx["with:"]=1;
  4085. $2=_st($1)._onClick_((function(){
  4086. return smalltalk.withContext(function($ctx2) {
  4087. return self._save();
  4088. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4089. $ctx1.sendIdx["onClick:"]=1;
  4090. self["@saveButton"]=$2;
  4091. $3=_st(html)._button();
  4092. $ctx1.sendIdx["button"]=2;
  4093. _st($3)._with_("DoIt");
  4094. $ctx1.sendIdx["with:"]=2;
  4095. $4=_st($3)._onClick_((function(){
  4096. return smalltalk.withContext(function($ctx2) {
  4097. return _st(self["@sourceArea"])._doIt();
  4098. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4099. $ctx1.sendIdx["onClick:"]=2;
  4100. $5=_st(html)._button();
  4101. $ctx1.sendIdx["button"]=3;
  4102. _st($5)._with_("PrintIt");
  4103. $ctx1.sendIdx["with:"]=3;
  4104. $6=_st($5)._onClick_((function(){
  4105. return smalltalk.withContext(function($ctx2) {
  4106. return _st(self["@sourceArea"])._printIt();
  4107. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4108. $ctx1.sendIdx["onClick:"]=3;
  4109. $7=_st(html)._button();
  4110. $ctx1.sendIdx["button"]=4;
  4111. _st($7)._with_("InspectIt");
  4112. $ctx1.sendIdx["with:"]=4;
  4113. $8=_st($7)._onClick_((function(){
  4114. return smalltalk.withContext(function($ctx2) {
  4115. return _st(self["@sourceArea"])._inspectIt();
  4116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  4117. $ctx1.sendIdx["onClick:"]=4;
  4118. $9=_st(html)._button();
  4119. $ctx1.sendIdx["button"]=5;
  4120. _st($9)._with_("Proceed");
  4121. $ctx1.sendIdx["with:"]=5;
  4122. $10=_st($9)._onClick_((function(){
  4123. return smalltalk.withContext(function($ctx2) {
  4124. return self._proceed();
  4125. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  4126. $ctx1.sendIdx["onClick:"]=5;
  4127. $11=_st(html)._button();
  4128. $ctx1.sendIdx["button"]=6;
  4129. _st($11)._with_("Abandon");
  4130. $ctx1.sendIdx["with:"]=6;
  4131. $12=_st($11)._onClick_((function(){
  4132. return smalltalk.withContext(function($ctx2) {
  4133. return self._close();
  4134. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)})}));
  4135. $ctx1.sendIdx["onClick:"]=6;
  4136. $13=_st(html)._button();
  4137. _st($13)._class_("amber_button debugger inspect");
  4138. _st($13)._with_("Inspect");
  4139. $14=_st($13)._onClick_((function(){
  4140. return smalltalk.withContext(function($ctx2) {
  4141. return self._inspectSelectedVariable();
  4142. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)})}));
  4143. self["@inspectButton"]=$14;
  4144. self._updateSourceArea();
  4145. self._updateStatus();
  4146. self._updateVariablesList();
  4147. $15=self._updateInspector();
  4148. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Debugger)})},
  4149. args: ["html"],
  4150. 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",
  4151. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
  4152. referencedClasses: []
  4153. }),
  4154. globals.Debugger);
  4155. smalltalk.addMethod(
  4156. smalltalk.method({
  4157. selector: "renderContext:on:",
  4158. protocol: 'rendering',
  4159. fn: function (aContext,html){
  4160. var self=this;
  4161. var li;
  4162. return smalltalk.withContext(function($ctx1) {
  4163. var $1,$2,$3,$4,$receiver;
  4164. li=_st(html)._li();
  4165. $1=_st(self["@selectedContext"]).__eq(aContext);
  4166. if(smalltalk.assert($1)){
  4167. _st(li)._class_("selected");
  4168. };
  4169. $2=li;
  4170. _st($2)._with_(_st(aContext)._asString());
  4171. $3=_st($2)._onClick_((function(){
  4172. return smalltalk.withContext(function($ctx2) {
  4173. return self._selectContext_(aContext);
  4174. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4175. $4=_st(aContext)._outerContext();
  4176. $ctx1.sendIdx["outerContext"]=1;
  4177. if(($receiver = $4) == null || $receiver.isNil){
  4178. $4;
  4179. } else {
  4180. self._renderContext_on_(_st(aContext)._outerContext(),html);
  4181. };
  4182. return self}, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},globals.Debugger)})},
  4183. args: ["aContext", "html"],
  4184. 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 ]",
  4185. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"],
  4186. referencedClasses: []
  4187. }),
  4188. globals.Debugger);
  4189. smalltalk.addMethod(
  4190. smalltalk.method({
  4191. selector: "renderTopPanelOn:",
  4192. protocol: 'rendering',
  4193. fn: function (html){
  4194. var self=this;
  4195. return smalltalk.withContext(function($ctx1) {
  4196. var $1,$2,$4,$6,$8,$7,$5,$9,$10,$3;
  4197. $1=self._error();
  4198. $ctx1.sendIdx["error"]=1;
  4199. self["@selectedContext"]=_st($1)._context();
  4200. $ctx1.sendIdx["context"]=1;
  4201. $2=_st(html)._div();
  4202. $ctx1.sendIdx["div"]=1;
  4203. _st($2)._class_("top");
  4204. $ctx1.sendIdx["class:"]=1;
  4205. $3=_st($2)._with_((function(){
  4206. return smalltalk.withContext(function($ctx2) {
  4207. $4=_st(html)._div();
  4208. _st($4)._class_("label");
  4209. $ctx2.sendIdx["class:"]=2;
  4210. $6=$4;
  4211. $8=self._error();
  4212. $ctx2.sendIdx["error"]=2;
  4213. $7=_st($8)._messageText();
  4214. $5=_st($6)._with_($7);
  4215. $ctx2.sendIdx["with:"]=2;
  4216. $5;
  4217. $9=_st(html)._ul();
  4218. _st($9)._class_("amber_column debugger contexts");
  4219. $10=_st($9)._with_((function(){
  4220. return smalltalk.withContext(function($ctx3) {
  4221. return self._renderContext_on_(_st(self._error())._context(),html);
  4222. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4223. self["@ul"]=$10;
  4224. return self["@ul"];
  4225. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4226. $ctx1.sendIdx["with:"]=1;
  4227. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.Debugger)})},
  4228. args: ["html"],
  4229. 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 ]]",
  4230. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
  4231. referencedClasses: []
  4232. }),
  4233. globals.Debugger);
  4234. smalltalk.addMethod(
  4235. smalltalk.method({
  4236. selector: "save",
  4237. protocol: 'actions',
  4238. fn: function (){
  4239. var self=this;
  4240. var protocol;
  4241. return smalltalk.withContext(function($ctx1) {
  4242. var $4,$3,$2,$1;
  4243. $4=_st(self["@selectedContext"])._receiver();
  4244. $ctx1.sendIdx["receiver"]=1;
  4245. $3=_st($4)._class();
  4246. $ctx1.sendIdx["class"]=1;
  4247. $2=_st($3)._methodDictionary();
  4248. $1=_st($2)._at_(_st(self["@selectedContext"])._selector());
  4249. protocol=_st($1)._category();
  4250. _st(_st(_st(self["@selectedContext"])._receiver())._class())._compile_category_(_st(self["@sourceArea"])._val(),protocol);
  4251. self._updateStatus();
  4252. return self}, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},globals.Debugger)})},
  4253. args: [],
  4254. 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",
  4255. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:category:", "val", "updateStatus"],
  4256. referencedClasses: []
  4257. }),
  4258. globals.Debugger);
  4259. smalltalk.addMethod(
  4260. smalltalk.method({
  4261. selector: "selectContext:",
  4262. protocol: 'actions',
  4263. fn: function (aContext){
  4264. var self=this;
  4265. return smalltalk.withContext(function($ctx1) {
  4266. var $1;
  4267. self["@selectedContext"]=aContext;
  4268. self["@selectedVariable"]=nil;
  4269. self["@selectedVariableName"]=nil;
  4270. self._updateContextsList();
  4271. self._updateSourceArea();
  4272. self._updateInspector();
  4273. self._updateVariablesList();
  4274. $1=self._updateStatus();
  4275. return self}, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},globals.Debugger)})},
  4276. args: ["aContext"],
  4277. 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",
  4278. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
  4279. referencedClasses: []
  4280. }),
  4281. globals.Debugger);
  4282. smalltalk.addMethod(
  4283. smalltalk.method({
  4284. selector: "selectVariable:named:",
  4285. protocol: 'actions',
  4286. fn: function (anObject,aString){
  4287. var self=this;
  4288. return smalltalk.withContext(function($ctx1) {
  4289. self["@selectedVariable"]=anObject;
  4290. self["@selectedVariableName"]=aString;
  4291. _st(self["@inspector"])._contents_((function(html){
  4292. return smalltalk.withContext(function($ctx2) {
  4293. return _st(html)._with_(_st(anObject)._printString());
  4294. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4295. self._updateVariablesList();
  4296. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},globals.Debugger)})},
  4297. args: ["anObject", "aString"],
  4298. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  4299. messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
  4300. referencedClasses: []
  4301. }),
  4302. globals.Debugger);
  4303. smalltalk.addMethod(
  4304. smalltalk.method({
  4305. selector: "source",
  4306. protocol: 'accessing',
  4307. fn: function (){
  4308. var self=this;
  4309. return smalltalk.withContext(function($ctx1) {
  4310. var $2,$1,$receiver;
  4311. $2=self._method();
  4312. $ctx1.sendIdx["method"]=1;
  4313. if(($receiver = $2) == null || $receiver.isNil){
  4314. $1="Method doesn't exist!";
  4315. } else {
  4316. $1=_st(self._method())._source();
  4317. };
  4318. return $1;
  4319. }, function($ctx1) {$ctx1.fill(self,"source",{},globals.Debugger)})},
  4320. args: [],
  4321. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  4322. messageSends: ["ifNil:ifNotNil:", "method", "source"],
  4323. referencedClasses: []
  4324. }),
  4325. globals.Debugger);
  4326. smalltalk.addMethod(
  4327. smalltalk.method({
  4328. selector: "updateContextsList",
  4329. protocol: 'updating',
  4330. fn: function (){
  4331. var self=this;
  4332. return smalltalk.withContext(function($ctx1) {
  4333. _st(self["@ul"])._contents_((function(html){
  4334. return smalltalk.withContext(function($ctx2) {
  4335. return self._renderContext_on_(_st(self._error())._context(),html);
  4336. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4337. return self}, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},globals.Debugger)})},
  4338. args: [],
  4339. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  4340. messageSends: ["contents:", "renderContext:on:", "context", "error"],
  4341. referencedClasses: []
  4342. }),
  4343. globals.Debugger);
  4344. smalltalk.addMethod(
  4345. smalltalk.method({
  4346. selector: "updateInspector",
  4347. protocol: 'updating',
  4348. fn: function (){
  4349. var self=this;
  4350. return smalltalk.withContext(function($ctx1) {
  4351. _st(self["@inspector"])._contents_((function(html){
  4352. }));
  4353. return self}, function($ctx1) {$ctx1.fill(self,"updateInspector",{},globals.Debugger)})},
  4354. args: [],
  4355. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  4356. messageSends: ["contents:"],
  4357. referencedClasses: []
  4358. }),
  4359. globals.Debugger);
  4360. smalltalk.addMethod(
  4361. smalltalk.method({
  4362. selector: "updateSourceArea",
  4363. protocol: 'updating',
  4364. fn: function (){
  4365. var self=this;
  4366. return smalltalk.withContext(function($ctx1) {
  4367. _st(self["@sourceArea"])._val_(self._source());
  4368. return self}, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},globals.Debugger)})},
  4369. args: [],
  4370. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  4371. messageSends: ["val:", "source"],
  4372. referencedClasses: []
  4373. }),
  4374. globals.Debugger);
  4375. smalltalk.addMethod(
  4376. smalltalk.method({
  4377. selector: "updateStatus",
  4378. protocol: 'updating',
  4379. fn: function (){
  4380. var self=this;
  4381. return smalltalk.withContext(function($ctx1) {
  4382. var $1,$2,$3,$receiver;
  4383. $1=_st(_st(self["@sourceArea"])._val()).__eq(self._source());
  4384. if(smalltalk.assert($1)){
  4385. $2=self["@saveButton"];
  4386. if(($receiver = $2) == null || $receiver.isNil){
  4387. $2;
  4388. } else {
  4389. _st(self["@saveButton"])._at_put_("disabled",true);
  4390. };
  4391. self["@unsavedChanges"]=false;
  4392. self["@unsavedChanges"];
  4393. } else {
  4394. $3=self["@saveButton"];
  4395. if(($receiver = $3) == null || $receiver.isNil){
  4396. $3;
  4397. } else {
  4398. _st(self["@saveButton"])._removeAt_("disabled");
  4399. };
  4400. self["@unsavedChanges"]=true;
  4401. self["@unsavedChanges"];
  4402. };
  4403. return self}, function($ctx1) {$ctx1.fill(self,"updateStatus",{},globals.Debugger)})},
  4404. args: [],
  4405. 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 ]",
  4406. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"],
  4407. referencedClasses: []
  4408. }),
  4409. globals.Debugger);
  4410. smalltalk.addMethod(
  4411. smalltalk.method({
  4412. selector: "updateVariablesList",
  4413. protocol: 'updating',
  4414. fn: function (){
  4415. var self=this;
  4416. return smalltalk.withContext(function($ctx1) {
  4417. var $1,$2,$3,$4,$5,$6,$7,$receiver;
  4418. _st(self["@ul2"])._contents_((function(html){
  4419. var li;
  4420. return smalltalk.withContext(function($ctx2) {
  4421. $1=_st(html)._li();
  4422. $ctx2.sendIdx["li"]=1;
  4423. _st($1)._with_("self");
  4424. $ctx2.sendIdx["with:"]=1;
  4425. $2=_st($1)._onClick_((function(){
  4426. return smalltalk.withContext(function($ctx3) {
  4427. return self._selectVariable_named_(self._receiver(),"self");
  4428. $ctx3.sendIdx["selectVariable:named:"]=1;
  4429. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4430. $ctx2.sendIdx["onClick:"]=1;
  4431. li=$2;
  4432. li;
  4433. $3=_st(self["@selectedVariableName"]).__eq("self");
  4434. $ctx2.sendIdx["="]=1;
  4435. if(smalltalk.assert($3)){
  4436. _st(li)._class_("selected");
  4437. $ctx2.sendIdx["class:"]=1;
  4438. };
  4439. return _st(self._allVariables())._keysAndValuesDo_((function(key,value){
  4440. return smalltalk.withContext(function($ctx3) {
  4441. $4=_st(html)._li();
  4442. _st($4)._with_(key);
  4443. $5=_st($4)._onClick_((function(){
  4444. return smalltalk.withContext(function($ctx4) {
  4445. return self._selectVariable_named_(value,key);
  4446. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  4447. li=$5;
  4448. li;
  4449. $6=_st(self["@selectedVariableName"]).__eq(key);
  4450. if(smalltalk.assert($6)){
  4451. return _st(li)._class_("selected");
  4452. };
  4453. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)})}));
  4454. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)})}));
  4455. $7=self["@selectedVariable"];
  4456. if(($receiver = $7) == null || $receiver.isNil){
  4457. _st(self["@inspectButton"])._at_put_("disabled",true);
  4458. } else {
  4459. _st(self["@inspectButton"])._removeAt_("disabled");
  4460. };
  4461. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.Debugger)})},
  4462. args: [],
  4463. 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' ]",
  4464. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
  4465. referencedClasses: []
  4466. }),
  4467. globals.Debugger);
  4468. smalltalk.addClass('IDEInspector', globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  4469. smalltalk.addMethod(
  4470. smalltalk.method({
  4471. selector: "canBeClosed",
  4472. protocol: 'testing',
  4473. fn: function (){
  4474. var self=this;
  4475. return true;
  4476. },
  4477. args: [],
  4478. source: "canBeClosed\x0a\x09^ true",
  4479. messageSends: [],
  4480. referencedClasses: []
  4481. }),
  4482. globals.IDEInspector);
  4483. smalltalk.addMethod(
  4484. smalltalk.method({
  4485. selector: "dive",
  4486. protocol: 'actions',
  4487. fn: function (){
  4488. var self=this;
  4489. return smalltalk.withContext(function($ctx1) {
  4490. _st(_st(self._variables())._at_(self._selectedVariable()))._inspect();
  4491. return self}, function($ctx1) {$ctx1.fill(self,"dive",{},globals.IDEInspector)})},
  4492. args: [],
  4493. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  4494. messageSends: ["inspect", "at:", "variables", "selectedVariable"],
  4495. referencedClasses: []
  4496. }),
  4497. globals.IDEInspector);
  4498. smalltalk.addMethod(
  4499. smalltalk.method({
  4500. selector: "inspect:",
  4501. protocol: 'actions',
  4502. fn: function (anObject){
  4503. var self=this;
  4504. return smalltalk.withContext(function($ctx1) {
  4505. self["@object"]=anObject;
  4506. self["@variables"]=[];
  4507. _st(self["@object"])._inspectOn_(self);
  4508. return self}, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector)})},
  4509. args: ["anObject"],
  4510. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  4511. messageSends: ["inspectOn:"],
  4512. referencedClasses: []
  4513. }),
  4514. globals.IDEInspector);
  4515. smalltalk.addMethod(
  4516. smalltalk.method({
  4517. selector: "label",
  4518. protocol: 'accessing',
  4519. fn: function (){
  4520. var self=this;
  4521. return smalltalk.withContext(function($ctx1) {
  4522. var $2,$1,$receiver;
  4523. $2=self["@label"];
  4524. if(($receiver = $2) == null || $receiver.isNil){
  4525. $1="Inspector (nil)";
  4526. } else {
  4527. $1=$2;
  4528. };
  4529. return $1;
  4530. }, function($ctx1) {$ctx1.fill(self,"label",{},globals.IDEInspector)})},
  4531. args: [],
  4532. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  4533. messageSends: ["ifNil:"],
  4534. referencedClasses: []
  4535. }),
  4536. globals.IDEInspector);
  4537. smalltalk.addMethod(
  4538. smalltalk.method({
  4539. selector: "refresh",
  4540. protocol: 'actions',
  4541. fn: function (){
  4542. var self=this;
  4543. return smalltalk.withContext(function($ctx1) {
  4544. var $1;
  4545. self._inspect_(self["@object"]);
  4546. self._updateVariablesList();
  4547. $1=self._updateValueTextarea();
  4548. return self}, function($ctx1) {$ctx1.fill(self,"refresh",{},globals.IDEInspector)})},
  4549. args: [],
  4550. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  4551. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
  4552. referencedClasses: []
  4553. }),
  4554. globals.IDEInspector);
  4555. smalltalk.addMethod(
  4556. smalltalk.method({
  4557. selector: "renderBottomPanelOn:",
  4558. protocol: 'rendering',
  4559. fn: function (html){
  4560. var self=this;
  4561. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  4562. return smalltalk.withContext(function($ctx1) {
  4563. var $1,$3,$4,$2;
  4564. $1=_st(html)._div();
  4565. _st($1)._class_("amber_sourceCode");
  4566. $2=_st($1)._with_((function(){
  4567. return smalltalk.withContext(function($ctx2) {
  4568. $3=_st($SourceArea())._new();
  4569. _st($3)._receiver_(self["@object"]);
  4570. _st($3)._onDoIt_((function(){
  4571. return smalltalk.withContext(function($ctx3) {
  4572. return self._refresh();
  4573. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4574. $4=_st($3)._yourself();
  4575. self["@sourceArea"]=$4;
  4576. self["@sourceArea"];
  4577. return _st(self["@sourceArea"])._renderOn_(html);
  4578. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4579. return self}, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},globals.IDEInspector)})},
  4580. args: ["html"],
  4581. 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 ]",
  4582. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
  4583. referencedClasses: ["SourceArea"]
  4584. }),
  4585. globals.IDEInspector);
  4586. smalltalk.addMethod(
  4587. smalltalk.method({
  4588. selector: "renderBoxOn:",
  4589. protocol: 'rendering',
  4590. fn: function (html){
  4591. var self=this;
  4592. return smalltalk.withContext(function($ctx1) {
  4593. var $1;
  4594. self._renderTopPanelOn_(html);
  4595. $1=self._renderBottomPanelOn_(html);
  4596. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDEInspector)})},
  4597. args: ["html"],
  4598. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  4599. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
  4600. referencedClasses: []
  4601. }),
  4602. globals.IDEInspector);
  4603. smalltalk.addMethod(
  4604. smalltalk.method({
  4605. selector: "renderButtonsOn:",
  4606. protocol: 'rendering',
  4607. fn: function (html){
  4608. var self=this;
  4609. return smalltalk.withContext(function($ctx1) {
  4610. var $1,$3,$2,$4,$6,$5,$7,$8;
  4611. $1=_st(html)._button();
  4612. $ctx1.sendIdx["button"]=1;
  4613. _st($1)._with_("DoIt");
  4614. $ctx1.sendIdx["with:"]=1;
  4615. $2=_st($1)._onClick_((function(){
  4616. return smalltalk.withContext(function($ctx2) {
  4617. $3=self._sourceArea();
  4618. $ctx2.sendIdx["sourceArea"]=1;
  4619. return _st($3)._doIt();
  4620. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4621. $ctx1.sendIdx["onClick:"]=1;
  4622. $4=_st(html)._button();
  4623. $ctx1.sendIdx["button"]=2;
  4624. _st($4)._with_("PrintIt");
  4625. $ctx1.sendIdx["with:"]=2;
  4626. $5=_st($4)._onClick_((function(){
  4627. return smalltalk.withContext(function($ctx2) {
  4628. $6=self._sourceArea();
  4629. $ctx2.sendIdx["sourceArea"]=2;
  4630. return _st($6)._printIt();
  4631. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  4632. $ctx1.sendIdx["onClick:"]=2;
  4633. $7=_st(html)._button();
  4634. _st($7)._with_("InspectIt");
  4635. $8=_st($7)._onClick_((function(){
  4636. return smalltalk.withContext(function($ctx2) {
  4637. return _st(self._sourceArea())._inspectIt();
  4638. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  4639. self._updateButtons();
  4640. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDEInspector)})},
  4641. args: ["html"],
  4642. 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",
  4643. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
  4644. referencedClasses: []
  4645. }),
  4646. globals.IDEInspector);
  4647. smalltalk.addMethod(
  4648. smalltalk.method({
  4649. selector: "renderTopPanelOn:",
  4650. protocol: 'rendering',
  4651. fn: function (html){
  4652. var self=this;
  4653. return smalltalk.withContext(function($ctx1) {
  4654. var $1,$3,$4,$5,$7,$8,$9,$10,$6,$2,$11;
  4655. $1=_st(html)._div();
  4656. $ctx1.sendIdx["div"]=1;
  4657. _st($1)._class_("top");
  4658. $ctx1.sendIdx["class:"]=1;
  4659. $2=_st($1)._with_((function(){
  4660. return smalltalk.withContext(function($ctx2) {
  4661. self["@variablesList"]=_st(_st(html)._ul())._class_("amber_column variables");
  4662. $ctx2.sendIdx["class:"]=2;
  4663. self["@variablesList"];
  4664. $3=_st(html)._textarea();
  4665. _st($3)._class_("amber_column value");
  4666. $ctx2.sendIdx["class:"]=3;
  4667. _st($3)._at_put_("readonly","readonly");
  4668. $4=_st($3)._yourself();
  4669. self["@valueTextarea"]=$4;
  4670. self["@valueTextarea"];
  4671. $5=_st(html)._div();
  4672. $ctx2.sendIdx["div"]=2;
  4673. _st($5)._class_("amber_tabs inspector");
  4674. $ctx2.sendIdx["class:"]=4;
  4675. $6=_st($5)._with_((function(){
  4676. return smalltalk.withContext(function($ctx3) {
  4677. $7=_st(html)._button();
  4678. $ctx3.sendIdx["button"]=1;
  4679. _st($7)._class_("amber_button inspector refresh");
  4680. $ctx3.sendIdx["class:"]=5;
  4681. _st($7)._with_("Refresh");
  4682. $ctx3.sendIdx["with:"]=3;
  4683. $8=_st($7)._onClick_((function(){
  4684. return smalltalk.withContext(function($ctx4) {
  4685. return self._refresh();
  4686. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4687. $ctx3.sendIdx["onClick:"]=1;
  4688. $8;
  4689. $9=_st(html)._button();
  4690. _st($9)._class_("amber_button inspector dive");
  4691. $ctx3.sendIdx["class:"]=6;
  4692. _st($9)._with_("Dive");
  4693. $10=_st($9)._onClick_((function(){
  4694. return smalltalk.withContext(function($ctx4) {
  4695. return self._dive();
  4696. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)})}));
  4697. self["@diveButton"]=$10;
  4698. return self["@diveButton"];
  4699. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  4700. $ctx2.sendIdx["with:"]=2;
  4701. $6;
  4702. return _st(_st(html)._div())._class_("amber_clear");
  4703. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4704. $ctx1.sendIdx["with:"]=1;
  4705. self._updateVariablesList();
  4706. $11=self._updateValueTextarea();
  4707. return self}, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},globals.IDEInspector)})},
  4708. args: ["html"],
  4709. 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.",
  4710. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
  4711. referencedClasses: []
  4712. }),
  4713. globals.IDEInspector);
  4714. smalltalk.addMethod(
  4715. smalltalk.method({
  4716. selector: "selectVariable:",
  4717. protocol: 'updating',
  4718. fn: function (aString){
  4719. var self=this;
  4720. return smalltalk.withContext(function($ctx1) {
  4721. var $1;
  4722. self._selectedVariable_(aString);
  4723. self._updateVariablesList();
  4724. self._updateValueTextarea();
  4725. $1=self._updateButtons();
  4726. return self}, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},globals.IDEInspector)})},
  4727. args: ["aString"],
  4728. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  4729. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
  4730. referencedClasses: []
  4731. }),
  4732. globals.IDEInspector);
  4733. smalltalk.addMethod(
  4734. smalltalk.method({
  4735. selector: "selectedVariable",
  4736. protocol: 'accessing',
  4737. fn: function (){
  4738. var self=this;
  4739. var $1;
  4740. $1=self["@selectedVariable"];
  4741. return $1;
  4742. },
  4743. args: [],
  4744. source: "selectedVariable\x0a\x09^ selectedVariable",
  4745. messageSends: [],
  4746. referencedClasses: []
  4747. }),
  4748. globals.IDEInspector);
  4749. smalltalk.addMethod(
  4750. smalltalk.method({
  4751. selector: "selectedVariable:",
  4752. protocol: 'accessing',
  4753. fn: function (aString){
  4754. var self=this;
  4755. self["@selectedVariable"]=aString;
  4756. return self},
  4757. args: ["aString"],
  4758. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  4759. messageSends: [],
  4760. referencedClasses: []
  4761. }),
  4762. globals.IDEInspector);
  4763. smalltalk.addMethod(
  4764. smalltalk.method({
  4765. selector: "setLabel:",
  4766. protocol: 'accessing',
  4767. fn: function (aString){
  4768. var self=this;
  4769. self["@label"]=aString;
  4770. return self},
  4771. args: ["aString"],
  4772. source: "setLabel: aString\x0a\x09label := aString",
  4773. messageSends: [],
  4774. referencedClasses: []
  4775. }),
  4776. globals.IDEInspector);
  4777. smalltalk.addMethod(
  4778. smalltalk.method({
  4779. selector: "setVariables:",
  4780. protocol: 'accessing',
  4781. fn: function (aCollection){
  4782. var self=this;
  4783. self["@variables"]=aCollection;
  4784. return self},
  4785. args: ["aCollection"],
  4786. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  4787. messageSends: [],
  4788. referencedClasses: []
  4789. }),
  4790. globals.IDEInspector);
  4791. smalltalk.addMethod(
  4792. smalltalk.method({
  4793. selector: "sourceArea",
  4794. protocol: 'accessing',
  4795. fn: function (){
  4796. var self=this;
  4797. var $1;
  4798. $1=self["@sourceArea"];
  4799. return $1;
  4800. },
  4801. args: [],
  4802. source: "sourceArea\x0a\x09^ sourceArea",
  4803. messageSends: [],
  4804. referencedClasses: []
  4805. }),
  4806. globals.IDEInspector);
  4807. smalltalk.addMethod(
  4808. smalltalk.method({
  4809. selector: "updateButtons",
  4810. protocol: 'updating',
  4811. fn: function (){
  4812. var self=this;
  4813. return smalltalk.withContext(function($ctx1) {
  4814. var $3,$2,$1;
  4815. $3=self._selectedVariable();
  4816. $ctx1.sendIdx["selectedVariable"]=1;
  4817. $2=_st($3)._notNil();
  4818. $ctx1.sendIdx["notNil"]=1;
  4819. $1=_st($2)._and_((function(){
  4820. return smalltalk.withContext(function($ctx2) {
  4821. return _st(_st(self._variables())._at_(self._selectedVariable()))._notNil();
  4822. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  4823. if(smalltalk.assert($1)){
  4824. _st(self["@diveButton"])._removeAt_("disabled");
  4825. } else {
  4826. _st(self["@diveButton"])._at_put_("disabled",true);
  4827. };
  4828. return self}, function($ctx1) {$ctx1.fill(self,"updateButtons",{},globals.IDEInspector)})},
  4829. args: [],
  4830. 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' ]",
  4831. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"],
  4832. referencedClasses: []
  4833. }),
  4834. globals.IDEInspector);
  4835. smalltalk.addMethod(
  4836. smalltalk.method({
  4837. selector: "updateValueTextarea",
  4838. protocol: 'updating',
  4839. fn: function (){
  4840. var self=this;
  4841. return smalltalk.withContext(function($ctx1) {
  4842. var $1,$4,$3,$2;
  4843. $1=_st(self["@valueTextarea"])._asJQuery();
  4844. $4=self._selectedVariable();
  4845. $ctx1.sendIdx["selectedVariable"]=1;
  4846. $3=_st($4)._isNil();
  4847. if(smalltalk.assert($3)){
  4848. $2="";
  4849. } else {
  4850. $2=_st(_st(self._variables())._at_(self._selectedVariable()))._printString();
  4851. };
  4852. _st($1)._val_($2);
  4853. return self}, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},globals.IDEInspector)})},
  4854. args: [],
  4855. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  4856. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"],
  4857. referencedClasses: []
  4858. }),
  4859. globals.IDEInspector);
  4860. smalltalk.addMethod(
  4861. smalltalk.method({
  4862. selector: "updateVariablesList",
  4863. protocol: 'updating',
  4864. fn: function (){
  4865. var self=this;
  4866. return smalltalk.withContext(function($ctx1) {
  4867. var $1,$2,$3;
  4868. _st(self["@variablesList"])._contents_((function(html){
  4869. return smalltalk.withContext(function($ctx2) {
  4870. return _st(self._variables())._keysDo_((function(each){
  4871. var li;
  4872. return smalltalk.withContext(function($ctx3) {
  4873. li=_st(html)._li();
  4874. li;
  4875. $1=li;
  4876. _st($1)._with_(each);
  4877. $2=_st($1)._onClick_((function(){
  4878. return smalltalk.withContext(function($ctx4) {
  4879. return self._selectVariable_(each);
  4880. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)})}));
  4881. $2;
  4882. $3=_st(self._selectedVariable()).__eq(each);
  4883. if(smalltalk.assert($3)){
  4884. return _st(li)._class_("selected");
  4885. };
  4886. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)})}));
  4887. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  4888. return self}, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},globals.IDEInspector)})},
  4889. args: [],
  4890. 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' ]] ]",
  4891. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"],
  4892. referencedClasses: []
  4893. }),
  4894. globals.IDEInspector);
  4895. smalltalk.addMethod(
  4896. smalltalk.method({
  4897. selector: "variables",
  4898. protocol: 'accessing',
  4899. fn: function (){
  4900. var self=this;
  4901. var $1;
  4902. $1=self["@variables"];
  4903. return $1;
  4904. },
  4905. args: [],
  4906. source: "variables\x0a\x09^ variables",
  4907. messageSends: [],
  4908. referencedClasses: []
  4909. }),
  4910. globals.IDEInspector);
  4911. smalltalk.addMethod(
  4912. smalltalk.method({
  4913. selector: "inspect:",
  4914. protocol: 'instance creation',
  4915. fn: function (anObject){
  4916. var self=this;
  4917. return smalltalk.withContext(function($ctx1) {
  4918. var $2,$3,$1;
  4919. $2=self._new();
  4920. _st($2)._inspect_(anObject);
  4921. _st($2)._open();
  4922. $3=_st($2)._yourself();
  4923. $1=$3;
  4924. return $1;
  4925. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},globals.IDEInspector.klass)})},
  4926. args: ["anObject"],
  4927. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  4928. messageSends: ["inspect:", "new", "open", "yourself"],
  4929. referencedClasses: []
  4930. }),
  4931. globals.IDEInspector.klass);
  4932. smalltalk.addMethod(
  4933. smalltalk.method({
  4934. selector: "on:",
  4935. protocol: 'instance creation',
  4936. fn: function (anObject){
  4937. var self=this;
  4938. return smalltalk.withContext(function($ctx1) {
  4939. var $2,$3,$1;
  4940. $2=self._new();
  4941. _st($2)._inspect_(anObject);
  4942. $3=_st($2)._yourself();
  4943. $1=$3;
  4944. return $1;
  4945. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},globals.IDEInspector.klass)})},
  4946. args: ["anObject"],
  4947. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  4948. messageSends: ["inspect:", "new", "yourself"],
  4949. referencedClasses: []
  4950. }),
  4951. globals.IDEInspector.klass);
  4952. smalltalk.addClass('IDETranscript', globals.TabWidget, ['textarea'], 'IDE');
  4953. smalltalk.addMethod(
  4954. smalltalk.method({
  4955. selector: "clear",
  4956. protocol: 'actions',
  4957. fn: function (){
  4958. var self=this;
  4959. return smalltalk.withContext(function($ctx1) {
  4960. _st(_st(self["@textarea"])._asJQuery())._val_("");
  4961. return self}, function($ctx1) {$ctx1.fill(self,"clear",{},globals.IDETranscript)})},
  4962. args: [],
  4963. source: "clear\x0a\x09textarea asJQuery val: ''",
  4964. messageSends: ["val:", "asJQuery"],
  4965. referencedClasses: []
  4966. }),
  4967. globals.IDETranscript);
  4968. smalltalk.addMethod(
  4969. smalltalk.method({
  4970. selector: "cr",
  4971. protocol: 'actions',
  4972. fn: function (){
  4973. var self=this;
  4974. function $String(){return globals.String||(typeof String=="undefined"?nil:String)}
  4975. return smalltalk.withContext(function($ctx1) {
  4976. var $1;
  4977. $1=_st(self["@textarea"])._asJQuery();
  4978. $ctx1.sendIdx["asJQuery"]=1;
  4979. _st($1)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st($String())._cr()));
  4980. return self}, function($ctx1) {$ctx1.fill(self,"cr",{},globals.IDETranscript)})},
  4981. args: [],
  4982. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  4983. messageSends: ["val:", "asJQuery", ",", "val", "cr"],
  4984. referencedClasses: ["String"]
  4985. }),
  4986. globals.IDETranscript);
  4987. smalltalk.addMethod(
  4988. smalltalk.method({
  4989. selector: "label",
  4990. protocol: 'accessing',
  4991. fn: function (){
  4992. var self=this;
  4993. return "Transcript";
  4994. },
  4995. args: [],
  4996. source: "label\x0a\x09^ 'Transcript'",
  4997. messageSends: [],
  4998. referencedClasses: []
  4999. }),
  5000. globals.IDETranscript);
  5001. smalltalk.addMethod(
  5002. smalltalk.method({
  5003. selector: "open",
  5004. protocol: 'actions',
  5005. fn: function (){
  5006. var self=this;
  5007. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5008. return smalltalk.withContext(function($ctx1) {
  5009. var $1,$2;
  5010. $1=_st($TabManager())._current();
  5011. _st($1)._open();
  5012. $2=_st($1)._selectTab_(self);
  5013. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript)})},
  5014. args: [],
  5015. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  5016. messageSends: ["open", "current", "selectTab:"],
  5017. referencedClasses: ["TabManager"]
  5018. }),
  5019. globals.IDETranscript);
  5020. smalltalk.addMethod(
  5021. smalltalk.method({
  5022. selector: "renderBoxOn:",
  5023. protocol: 'rendering',
  5024. fn: function (html){
  5025. var self=this;
  5026. return smalltalk.withContext(function($ctx1) {
  5027. var $1,$2;
  5028. self["@textarea"]=_st(html)._textarea();
  5029. $1=self["@textarea"];
  5030. _st($1)._class_("amber_transcript");
  5031. $2=_st($1)._at_put_("spellcheck","false");
  5032. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.IDETranscript)})},
  5033. args: ["html"],
  5034. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  5035. messageSends: ["textarea", "class:", "at:put:"],
  5036. referencedClasses: []
  5037. }),
  5038. globals.IDETranscript);
  5039. smalltalk.addMethod(
  5040. smalltalk.method({
  5041. selector: "renderButtonsOn:",
  5042. protocol: 'rendering',
  5043. fn: function (html){
  5044. var self=this;
  5045. return smalltalk.withContext(function($ctx1) {
  5046. var $1,$2;
  5047. $1=_st(html)._button();
  5048. _st($1)._with_("Clear transcript");
  5049. $2=_st($1)._onClick_((function(){
  5050. return smalltalk.withContext(function($ctx2) {
  5051. return self._clear();
  5052. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  5053. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.IDETranscript)})},
  5054. args: ["html"],
  5055. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  5056. messageSends: ["with:", "button", "onClick:", "clear"],
  5057. referencedClasses: []
  5058. }),
  5059. globals.IDETranscript);
  5060. smalltalk.addMethod(
  5061. smalltalk.method({
  5062. selector: "show:",
  5063. protocol: 'actions',
  5064. fn: function (anObject){
  5065. var self=this;
  5066. return smalltalk.withContext(function($ctx1) {
  5067. var $1,$2,$receiver;
  5068. $1=self["@textarea"];
  5069. if(($receiver = $1) == null || $receiver.isNil){
  5070. self._open();
  5071. } else {
  5072. $1;
  5073. };
  5074. $2=_st(self["@textarea"])._asJQuery();
  5075. $ctx1.sendIdx["asJQuery"]=1;
  5076. _st($2)._val_(_st(_st(_st(self["@textarea"])._asJQuery())._val()).__comma(_st(anObject)._asString()));
  5077. return self}, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},globals.IDETranscript)})},
  5078. args: ["anObject"],
  5079. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  5080. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"],
  5081. referencedClasses: []
  5082. }),
  5083. globals.IDETranscript);
  5084. globals.IDETranscript.klass.iVarNames = ['current'];
  5085. smalltalk.addMethod(
  5086. smalltalk.method({
  5087. selector: "current",
  5088. protocol: 'instance creation',
  5089. fn: function (){
  5090. var self=this;
  5091. return smalltalk.withContext(function($ctx1) {
  5092. var $2,$1,$receiver;
  5093. $2=self["@current"];
  5094. if(($receiver = $2) == null || $receiver.isNil){
  5095. self["@current"]=($ctx1.supercall = true, globals.IDETranscript.klass.superclass.fn.prototype._new.apply(_st(self), []));
  5096. $ctx1.supercall = false;
  5097. $1=self["@current"];
  5098. } else {
  5099. $1=$2;
  5100. };
  5101. return $1;
  5102. }, function($ctx1) {$ctx1.fill(self,"current",{},globals.IDETranscript.klass)})},
  5103. args: [],
  5104. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  5105. messageSends: ["ifNil:", "new"],
  5106. referencedClasses: []
  5107. }),
  5108. globals.IDETranscript.klass);
  5109. smalltalk.addMethod(
  5110. smalltalk.method({
  5111. selector: "initialize",
  5112. protocol: 'initialization',
  5113. fn: function (){
  5114. var self=this;
  5115. function $Transcript(){return globals.Transcript||(typeof Transcript=="undefined"?nil:Transcript)}
  5116. return smalltalk.withContext(function($ctx1) {
  5117. _st($Transcript())._register_(self._current());
  5118. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.IDETranscript.klass)})},
  5119. args: [],
  5120. source: "initialize\x0a\x09Transcript register: self current",
  5121. messageSends: ["register:", "current"],
  5122. referencedClasses: ["Transcript"]
  5123. }),
  5124. globals.IDETranscript.klass);
  5125. smalltalk.addMethod(
  5126. smalltalk.method({
  5127. selector: "new",
  5128. protocol: 'instance creation',
  5129. fn: function (){
  5130. var self=this;
  5131. return smalltalk.withContext(function($ctx1) {
  5132. self._shouldNotImplement();
  5133. return self}, function($ctx1) {$ctx1.fill(self,"new",{},globals.IDETranscript.klass)})},
  5134. args: [],
  5135. source: "new\x0a\x09self shouldNotImplement",
  5136. messageSends: ["shouldNotImplement"],
  5137. referencedClasses: []
  5138. }),
  5139. globals.IDETranscript.klass);
  5140. smalltalk.addMethod(
  5141. smalltalk.method({
  5142. selector: "open",
  5143. protocol: 'instance creation',
  5144. fn: function (){
  5145. var self=this;
  5146. function $TabManager(){return globals.TabManager||(typeof TabManager=="undefined"?nil:TabManager)}
  5147. return smalltalk.withContext(function($ctx1) {
  5148. var $1,$2;
  5149. $1=_st($TabManager())._current();
  5150. $ctx1.sendIdx["current"]=1;
  5151. _st($1)._open();
  5152. $2=_st($1)._selectTab_(self._current());
  5153. return self}, function($ctx1) {$ctx1.fill(self,"open",{},globals.IDETranscript.klass)})},
  5154. args: [],
  5155. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  5156. messageSends: ["open", "current", "selectTab:"],
  5157. referencedClasses: ["TabManager"]
  5158. }),
  5159. globals.IDETranscript.klass);
  5160. smalltalk.addClass('ProgressBar', globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  5161. smalltalk.addMethod(
  5162. smalltalk.method({
  5163. selector: "percent",
  5164. protocol: 'accessing',
  5165. fn: function (){
  5166. var self=this;
  5167. return smalltalk.withContext(function($ctx1) {
  5168. var $2,$1,$receiver;
  5169. $2=self["@percent"];
  5170. if(($receiver = $2) == null || $receiver.isNil){
  5171. $1=(0);
  5172. } else {
  5173. $1=$2;
  5174. };
  5175. return $1;
  5176. }, function($ctx1) {$ctx1.fill(self,"percent",{},globals.ProgressBar)})},
  5177. args: [],
  5178. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  5179. messageSends: ["ifNil:"],
  5180. referencedClasses: []
  5181. }),
  5182. globals.ProgressBar);
  5183. smalltalk.addMethod(
  5184. smalltalk.method({
  5185. selector: "percent:",
  5186. protocol: 'accessing',
  5187. fn: function (aNumber){
  5188. var self=this;
  5189. self["@percent"]=aNumber;
  5190. return self},
  5191. args: ["aNumber"],
  5192. source: "percent: aNumber\x0a\x09percent := aNumber",
  5193. messageSends: [],
  5194. referencedClasses: []
  5195. }),
  5196. globals.ProgressBar);
  5197. smalltalk.addMethod(
  5198. smalltalk.method({
  5199. selector: "renderOn:",
  5200. protocol: 'rendering',
  5201. fn: function (html){
  5202. var self=this;
  5203. return smalltalk.withContext(function($ctx1) {
  5204. var $1,$2;
  5205. $1=_st(html)._div();
  5206. _st($1)._class_("progress_bar");
  5207. $2=_st($1)._yourself();
  5208. self["@div"]=$2;
  5209. self._renderProgressBar();
  5210. return self}, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},globals.ProgressBar)})},
  5211. args: ["html"],
  5212. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  5213. messageSends: ["class:", "div", "yourself", "renderProgressBar"],
  5214. referencedClasses: []
  5215. }),
  5216. globals.ProgressBar);
  5217. smalltalk.addMethod(
  5218. smalltalk.method({
  5219. selector: "renderProgressBar",
  5220. protocol: 'rendering',
  5221. fn: function (){
  5222. var self=this;
  5223. return smalltalk.withContext(function($ctx1) {
  5224. var $1,$3,$4,$2;
  5225. _st(self["@div"])._contents_((function(html){
  5226. return smalltalk.withContext(function($ctx2) {
  5227. $1=_st(html)._div();
  5228. _st($1)._class_("progress");
  5229. $3=$1;
  5230. $4=_st("width:".__comma(_st(self._percent())._asString())).__comma("%");
  5231. $ctx2.sendIdx[","]=1;
  5232. $2=_st($3)._style_($4);
  5233. return $2;
  5234. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  5235. return self}, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},globals.ProgressBar)})},
  5236. args: [],
  5237. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  5238. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
  5239. referencedClasses: []
  5240. }),
  5241. globals.ProgressBar);
  5242. smalltalk.addMethod(
  5243. smalltalk.method({
  5244. selector: "updatePercent:",
  5245. protocol: 'updating',
  5246. fn: function (aNumber){
  5247. var self=this;
  5248. return smalltalk.withContext(function($ctx1) {
  5249. self._percent_(aNumber);
  5250. self._renderProgressBar();
  5251. return self}, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},globals.ProgressBar)})},
  5252. args: ["aNumber"],
  5253. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  5254. messageSends: ["percent:", "renderProgressBar"],
  5255. referencedClasses: []
  5256. }),
  5257. globals.ProgressBar);
  5258. smalltalk.addClass('ReferencesBrowser', globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  5259. smalltalk.addMethod(
  5260. smalltalk.method({
  5261. selector: "canBeClosed",
  5262. protocol: 'testing',
  5263. fn: function (){
  5264. var self=this;
  5265. return true;
  5266. },
  5267. args: [],
  5268. source: "canBeClosed\x0a\x09^ true",
  5269. messageSends: [],
  5270. referencedClasses: []
  5271. }),
  5272. globals.ReferencesBrowser);
  5273. smalltalk.addMethod(
  5274. smalltalk.method({
  5275. selector: "classesAndMetaclasses",
  5276. protocol: 'accessing',
  5277. fn: function (){
  5278. var self=this;
  5279. function $Smalltalk(){return globals.Smalltalk||(typeof Smalltalk=="undefined"?nil:Smalltalk)}
  5280. return smalltalk.withContext(function($ctx1) {
  5281. var $2,$1;
  5282. $2=_st($Smalltalk())._classes();
  5283. $ctx1.sendIdx["classes"]=1;
  5284. $1=_st($2).__comma(_st(_st($Smalltalk())._classes())._collect_((function(each){
  5285. return smalltalk.withContext(function($ctx2) {
  5286. return _st(each)._class();
  5287. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})));
  5288. return $1;
  5289. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},globals.ReferencesBrowser)})},
  5290. args: [],
  5291. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  5292. messageSends: [",", "classes", "collect:", "class"],
  5293. referencedClasses: ["Smalltalk"]
  5294. }),
  5295. globals.ReferencesBrowser);
  5296. smalltalk.addMethod(
  5297. smalltalk.method({
  5298. selector: "implementors",
  5299. protocol: 'accessing',
  5300. fn: function (){
  5301. var self=this;
  5302. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  5303. return smalltalk.withContext(function($ctx1) {
  5304. var $2,$1,$receiver;
  5305. $2=self["@implementors"];
  5306. if(($receiver = $2) == null || $receiver.isNil){
  5307. self["@implementors"]=_st($Array())._new();
  5308. $1=self["@implementors"];
  5309. } else {
  5310. $1=$2;
  5311. };
  5312. return $1;
  5313. }, function($ctx1) {$ctx1.fill(self,"implementors",{},globals.ReferencesBrowser)})},
  5314. args: [],
  5315. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  5316. messageSends: ["ifNil:", "new"],
  5317. referencedClasses: ["Array"]
  5318. }),
  5319. globals.ReferencesBrowser);
  5320. smalltalk.addMethod(
  5321. smalltalk.method({
  5322. selector: "initialize",
  5323. protocol: 'initialization',
  5324. fn: function (){
  5325. var self=this;
  5326. return smalltalk.withContext(function($ctx1) {
  5327. ($ctx1.supercall = true, globals.ReferencesBrowser.superclass.fn.prototype._initialize.apply(_st(self), []));
  5328. $ctx1.supercall = false;
  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,$receiver;
  5360. $2=self["@matches"];
  5361. if(($receiver = $2) == null || $receiver.isNil){
  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,$receiver;
  5421. $2=self["@referencedClasses"];
  5422. if(($receiver = $2) == null || $receiver.isNil){
  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,$receiver;
  5701. $2=self["@senders"];
  5702. if(($receiver = $2) == null || $receiver.isNil){
  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,$receiver;
  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) == null || $receiver.isNil){
  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. ($ctx1.supercall = true, globals.TestRunner.superclass.fn.prototype._initialize.apply(_st(self), []));
  6023. $ctx1.supercall = false;
  6024. self["@result"]=_st($TestResult())._new();
  6025. return self}, function($ctx1) {$ctx1.fill(self,"initialize",{},globals.TestRunner)})},
  6026. args: [],
  6027. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  6028. messageSends: ["initialize", "new"],
  6029. referencedClasses: ["TestResult"]
  6030. }),
  6031. globals.TestRunner);
  6032. smalltalk.addMethod(
  6033. smalltalk.method({
  6034. selector: "isSelectedCategory:",
  6035. protocol: 'testing',
  6036. fn: function (aCategory){
  6037. var self=this;
  6038. return smalltalk.withContext(function($ctx1) {
  6039. var $1;
  6040. $1=_st(self._selectedCategories())._includes_(aCategory);
  6041. return $1;
  6042. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6043. args: ["aCategory"],
  6044. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  6045. messageSends: ["includes:", "selectedCategories"],
  6046. referencedClasses: []
  6047. }),
  6048. globals.TestRunner);
  6049. smalltalk.addMethod(
  6050. smalltalk.method({
  6051. selector: "isSelectedClass:",
  6052. protocol: 'testing',
  6053. fn: function (aClass){
  6054. var self=this;
  6055. return smalltalk.withContext(function($ctx1) {
  6056. var $1;
  6057. $1=_st(self._selectedClasses())._includes_(aClass);
  6058. return $1;
  6059. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},globals.TestRunner)})},
  6060. args: ["aClass"],
  6061. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  6062. messageSends: ["includes:", "selectedClasses"],
  6063. referencedClasses: []
  6064. }),
  6065. globals.TestRunner);
  6066. smalltalk.addMethod(
  6067. smalltalk.method({
  6068. selector: "label",
  6069. protocol: 'accessing',
  6070. fn: function (){
  6071. var self=this;
  6072. return "SUnit";
  6073. },
  6074. args: [],
  6075. source: "label\x0a\x09^ 'SUnit'",
  6076. messageSends: [],
  6077. referencedClasses: []
  6078. }),
  6079. globals.TestRunner);
  6080. smalltalk.addMethod(
  6081. smalltalk.method({
  6082. selector: "packages",
  6083. protocol: 'accessing',
  6084. fn: function (){
  6085. var self=this;
  6086. var packages;
  6087. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6088. return smalltalk.withContext(function($ctx1) {
  6089. var $2,$3,$1,$4;
  6090. packages=_st($Array())._new();
  6091. _st(self._allClasses())._do_((function(each){
  6092. return smalltalk.withContext(function($ctx2) {
  6093. $2=packages;
  6094. $3=_st(each)._category();
  6095. $ctx2.sendIdx["category"]=1;
  6096. $1=_st($2)._includes_($3);
  6097. if(! smalltalk.assert($1)){
  6098. return _st(packages)._add_(_st(each)._category());
  6099. };
  6100. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6101. $4=_st(packages)._sort();
  6102. return $4;
  6103. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},globals.TestRunner)})},
  6104. args: [],
  6105. 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",
  6106. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"],
  6107. referencedClasses: ["Array"]
  6108. }),
  6109. globals.TestRunner);
  6110. smalltalk.addMethod(
  6111. smalltalk.method({
  6112. selector: "performFailure:",
  6113. protocol: 'actions',
  6114. fn: function (aTestCase){
  6115. var self=this;
  6116. return smalltalk.withContext(function($ctx1) {
  6117. _st(aTestCase)._runCase();
  6118. return self}, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},globals.TestRunner)})},
  6119. args: ["aTestCase"],
  6120. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  6121. messageSends: ["runCase"],
  6122. referencedClasses: []
  6123. }),
  6124. globals.TestRunner);
  6125. smalltalk.addMethod(
  6126. smalltalk.method({
  6127. selector: "printErrors",
  6128. protocol: 'printing',
  6129. fn: function (){
  6130. var self=this;
  6131. return smalltalk.withContext(function($ctx1) {
  6132. var $1;
  6133. $1=_st(_st(_st(_st(self._result())._errors())._size())._asString()).__comma(" errors, ");
  6134. return $1;
  6135. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},globals.TestRunner)})},
  6136. args: [],
  6137. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  6138. messageSends: [",", "asString", "size", "errors", "result"],
  6139. referencedClasses: []
  6140. }),
  6141. globals.TestRunner);
  6142. smalltalk.addMethod(
  6143. smalltalk.method({
  6144. selector: "printFailures",
  6145. protocol: 'printing',
  6146. fn: function (){
  6147. var self=this;
  6148. return smalltalk.withContext(function($ctx1) {
  6149. var $1;
  6150. $1=_st(_st(_st(_st(self._result())._failures())._size())._asString()).__comma(" failures");
  6151. return $1;
  6152. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},globals.TestRunner)})},
  6153. args: [],
  6154. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  6155. messageSends: [",", "asString", "size", "failures", "result"],
  6156. referencedClasses: []
  6157. }),
  6158. globals.TestRunner);
  6159. smalltalk.addMethod(
  6160. smalltalk.method({
  6161. selector: "printPasses",
  6162. protocol: 'printing',
  6163. fn: function (){
  6164. var self=this;
  6165. return smalltalk.withContext(function($ctx1) {
  6166. var $6,$5,$9,$8,$7,$4,$3,$2,$1;
  6167. $6=self._result();
  6168. $ctx1.sendIdx["result"]=1;
  6169. $5=_st($6)._runs();
  6170. $9=self._result();
  6171. $ctx1.sendIdx["result"]=2;
  6172. $8=_st($9)._errors();
  6173. $7=_st($8)._size();
  6174. $ctx1.sendIdx["size"]=1;
  6175. $4=_st($5).__minus($7);
  6176. $3=_st($4).__minus(_st(_st(self._result())._failures())._size());
  6177. $ctx1.sendIdx["-"]=1;
  6178. $2=_st($3)._asString();
  6179. $1=_st($2).__comma(" passes, ");
  6180. return $1;
  6181. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},globals.TestRunner)})},
  6182. args: [],
  6183. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  6184. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"],
  6185. referencedClasses: []
  6186. }),
  6187. globals.TestRunner);
  6188. smalltalk.addMethod(
  6189. smalltalk.method({
  6190. selector: "printTotal",
  6191. protocol: 'printing',
  6192. fn: function (){
  6193. var self=this;
  6194. return smalltalk.withContext(function($ctx1) {
  6195. var $1;
  6196. $1=_st(_st(_st(self._result())._total())._asString()).__comma(" runs, ");
  6197. return $1;
  6198. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},globals.TestRunner)})},
  6199. args: [],
  6200. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  6201. messageSends: [",", "asString", "total", "result"],
  6202. referencedClasses: []
  6203. }),
  6204. globals.TestRunner);
  6205. smalltalk.addMethod(
  6206. smalltalk.method({
  6207. selector: "progressBar",
  6208. protocol: 'accessing',
  6209. fn: function (){
  6210. var self=this;
  6211. function $ProgressBar(){return globals.ProgressBar||(typeof ProgressBar=="undefined"?nil:ProgressBar)}
  6212. return smalltalk.withContext(function($ctx1) {
  6213. var $2,$1,$receiver;
  6214. $2=self["@progressBar"];
  6215. if(($receiver = $2) == null || $receiver.isNil){
  6216. self["@progressBar"]=_st($ProgressBar())._new();
  6217. $1=self["@progressBar"];
  6218. } else {
  6219. $1=$2;
  6220. };
  6221. return $1;
  6222. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},globals.TestRunner)})},
  6223. args: [],
  6224. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  6225. messageSends: ["ifNil:", "new"],
  6226. referencedClasses: ["ProgressBar"]
  6227. }),
  6228. globals.TestRunner);
  6229. smalltalk.addMethod(
  6230. smalltalk.method({
  6231. selector: "renderBoxOn:",
  6232. protocol: 'rendering',
  6233. fn: function (html){
  6234. var self=this;
  6235. return smalltalk.withContext(function($ctx1) {
  6236. var $1;
  6237. self._renderCategoriesOn_(html);
  6238. self._renderClassesOn_(html);
  6239. $1=self._renderResultsOn_(html);
  6240. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.TestRunner)})},
  6241. args: ["html"],
  6242. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  6243. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
  6244. referencedClasses: []
  6245. }),
  6246. globals.TestRunner);
  6247. smalltalk.addMethod(
  6248. smalltalk.method({
  6249. selector: "renderButtonsOn:",
  6250. protocol: 'rendering',
  6251. fn: function (html){
  6252. var self=this;
  6253. return smalltalk.withContext(function($ctx1) {
  6254. var $1,$2;
  6255. $1=_st(html)._button();
  6256. _st($1)._with_("Run selected");
  6257. $2=_st($1)._onClick_((function(){
  6258. return smalltalk.withContext(function($ctx2) {
  6259. return self._run_(self._testCases());
  6260. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6261. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.TestRunner)})},
  6262. args: ["html"],
  6263. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  6264. messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
  6265. referencedClasses: []
  6266. }),
  6267. globals.TestRunner);
  6268. smalltalk.addMethod(
  6269. smalltalk.method({
  6270. selector: "renderCategoriesOn:",
  6271. protocol: 'rendering',
  6272. fn: function (html){
  6273. var self=this;
  6274. return smalltalk.withContext(function($ctx1) {
  6275. self["@packagesList"]=_st(_st(html)._ul())._class_("amber_column sunit packages");
  6276. self._updateCategoriesList();
  6277. return self}, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},globals.TestRunner)})},
  6278. args: ["html"],
  6279. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  6280. messageSends: ["class:", "ul", "updateCategoriesList"],
  6281. referencedClasses: []
  6282. }),
  6283. globals.TestRunner);
  6284. smalltalk.addMethod(
  6285. smalltalk.method({
  6286. selector: "renderClassesOn:",
  6287. protocol: 'rendering',
  6288. fn: function (html){
  6289. var self=this;
  6290. return smalltalk.withContext(function($ctx1) {
  6291. self["@classesList"]=_st(_st(html)._ul())._class_("amber_column sunit classes");
  6292. self._updateClassesList();
  6293. return self}, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},globals.TestRunner)})},
  6294. args: ["html"],
  6295. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  6296. messageSends: ["class:", "ul", "updateClassesList"],
  6297. referencedClasses: []
  6298. }),
  6299. globals.TestRunner);
  6300. smalltalk.addMethod(
  6301. smalltalk.method({
  6302. selector: "renderErrorsOn:",
  6303. protocol: 'rendering',
  6304. fn: function (html){
  6305. var self=this;
  6306. return smalltalk.withContext(function($ctx1) {
  6307. var $1,$2,$3,$4;
  6308. _st(_st(self._result())._errors())._do_((function(each){
  6309. return smalltalk.withContext(function($ctx2) {
  6310. $1=_st(html)._li();
  6311. _st($1)._class_("errors");
  6312. $2=$1;
  6313. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6314. $ctx2.sendIdx[","]=1;
  6315. _st($2)._with_($3);
  6316. $4=_st($1)._onClick_((function(){
  6317. return smalltalk.withContext(function($ctx3) {
  6318. return self._performFailure_(each);
  6319. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6320. return $4;
  6321. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6322. return self}, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},globals.TestRunner)})},
  6323. args: ["html"],
  6324. 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 ]]",
  6325. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6326. referencedClasses: []
  6327. }),
  6328. globals.TestRunner);
  6329. smalltalk.addMethod(
  6330. smalltalk.method({
  6331. selector: "renderFailuresOn:",
  6332. protocol: 'rendering',
  6333. fn: function (html){
  6334. var self=this;
  6335. return smalltalk.withContext(function($ctx1) {
  6336. var $1,$2,$3,$4;
  6337. _st(_st(self._result())._failures())._do_((function(each){
  6338. return smalltalk.withContext(function($ctx2) {
  6339. $1=_st(html)._li();
  6340. _st($1)._class_("failures");
  6341. $2=$1;
  6342. $3=_st(_st(_st(_st(each)._class())._name()).__comma(" >> ")).__comma(_st(each)._selector());
  6343. $ctx2.sendIdx[","]=1;
  6344. _st($2)._with_($3);
  6345. $4=_st($1)._onClick_((function(){
  6346. return smalltalk.withContext(function($ctx3) {
  6347. return self._performFailure_(each);
  6348. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6349. return $4;
  6350. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6351. return self}, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},globals.TestRunner)})},
  6352. args: ["html"],
  6353. 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 ]]",
  6354. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"],
  6355. referencedClasses: []
  6356. }),
  6357. globals.TestRunner);
  6358. smalltalk.addMethod(
  6359. smalltalk.method({
  6360. selector: "renderResultsOn:",
  6361. protocol: 'rendering',
  6362. fn: function (html){
  6363. var self=this;
  6364. return smalltalk.withContext(function($ctx1) {
  6365. self["@statusDiv"]=_st(html)._div();
  6366. _st(html)._with_(self._progressBar());
  6367. self["@methodsList"]=_st(_st(html)._ul())._class_("amber_column sunit results");
  6368. self._updateMethodsList();
  6369. self._updateStatusDiv();
  6370. return self}, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},globals.TestRunner)})},
  6371. args: ["html"],
  6372. 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",
  6373. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
  6374. referencedClasses: []
  6375. }),
  6376. globals.TestRunner);
  6377. smalltalk.addMethod(
  6378. smalltalk.method({
  6379. selector: "result",
  6380. protocol: 'accessing',
  6381. fn: function (){
  6382. var self=this;
  6383. var $1;
  6384. $1=self["@result"];
  6385. return $1;
  6386. },
  6387. args: [],
  6388. source: "result\x0a\x09^ result",
  6389. messageSends: [],
  6390. referencedClasses: []
  6391. }),
  6392. globals.TestRunner);
  6393. smalltalk.addMethod(
  6394. smalltalk.method({
  6395. selector: "run:",
  6396. protocol: 'actions',
  6397. fn: function (aCollection){
  6398. var self=this;
  6399. var worker;
  6400. function $TestSuiteRunner(){return globals.TestSuiteRunner||(typeof TestSuiteRunner=="undefined"?nil:TestSuiteRunner)}
  6401. function $ResultAnnouncement(){return globals.ResultAnnouncement||(typeof ResultAnnouncement=="undefined"?nil:ResultAnnouncement)}
  6402. return smalltalk.withContext(function($ctx1) {
  6403. var $1;
  6404. worker=_st($TestSuiteRunner())._on_(aCollection);
  6405. self["@result"]=_st(worker)._result();
  6406. $ctx1.sendIdx["result"]=1;
  6407. _st(_st(worker)._announcer())._on_do_($ResultAnnouncement(),(function(ann){
  6408. return smalltalk.withContext(function($ctx2) {
  6409. $1=_st(_st(ann)._result()).__eq_eq(self["@result"]);
  6410. if(smalltalk.assert($1)){
  6411. _st(self._progressBar())._updatePercent_(_st(_st(_st(self["@result"])._runs()).__slash(_st(self["@result"])._total())).__star((100)));
  6412. self._updateStatusDiv();
  6413. return self._updateMethodsList();
  6414. };
  6415. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)})}));
  6416. _st(worker)._run();
  6417. return self}, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},globals.TestRunner)})},
  6418. args: ["aCollection"],
  6419. 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",
  6420. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"],
  6421. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
  6422. }),
  6423. globals.TestRunner);
  6424. smalltalk.addMethod(
  6425. smalltalk.method({
  6426. selector: "selectAllCategories",
  6427. protocol: 'actions',
  6428. fn: function (){
  6429. var self=this;
  6430. return smalltalk.withContext(function($ctx1) {
  6431. var $1,$2;
  6432. _st(self._packages())._do_((function(each){
  6433. return smalltalk.withContext(function($ctx2) {
  6434. $1=_st(self["@selectedCategories"])._includes_(each);
  6435. if(! smalltalk.assert($1)){
  6436. return _st(self._selectedCategories())._add_(each);
  6437. };
  6438. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6439. self._updateCategoriesList();
  6440. $2=self._updateClassesList();
  6441. return self}, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},globals.TestRunner)})},
  6442. args: [],
  6443. 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",
  6444. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"],
  6445. referencedClasses: []
  6446. }),
  6447. globals.TestRunner);
  6448. smalltalk.addMethod(
  6449. smalltalk.method({
  6450. selector: "selectAllClasses",
  6451. protocol: 'actions',
  6452. fn: function (){
  6453. var self=this;
  6454. return smalltalk.withContext(function($ctx1) {
  6455. var $1,$2;
  6456. _st(self._classes())._do_((function(each){
  6457. return smalltalk.withContext(function($ctx2) {
  6458. $1=_st(self["@selectedClasses"])._includes_(each);
  6459. if(! smalltalk.assert($1)){
  6460. return _st(self._selectedClasses())._add_(each);
  6461. };
  6462. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  6463. self._updateCategoriesList();
  6464. $2=self._updateClassesList();
  6465. return self}, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},globals.TestRunner)})},
  6466. args: [],
  6467. 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",
  6468. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"],
  6469. referencedClasses: []
  6470. }),
  6471. globals.TestRunner);
  6472. smalltalk.addMethod(
  6473. smalltalk.method({
  6474. selector: "selectedCategories",
  6475. protocol: 'accessing',
  6476. fn: function (){
  6477. var self=this;
  6478. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6479. return smalltalk.withContext(function($ctx1) {
  6480. var $2,$1,$receiver;
  6481. $2=self["@selectedCategories"];
  6482. if(($receiver = $2) == null || $receiver.isNil){
  6483. self["@selectedCategories"]=_st($Array())._new();
  6484. $1=self["@selectedCategories"];
  6485. } else {
  6486. $1=$2;
  6487. };
  6488. return $1;
  6489. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},globals.TestRunner)})},
  6490. args: [],
  6491. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  6492. messageSends: ["ifNil:", "new"],
  6493. referencedClasses: ["Array"]
  6494. }),
  6495. globals.TestRunner);
  6496. smalltalk.addMethod(
  6497. smalltalk.method({
  6498. selector: "selectedClasses",
  6499. protocol: 'accessing',
  6500. fn: function (){
  6501. var self=this;
  6502. function $Array(){return globals.Array||(typeof Array=="undefined"?nil:Array)}
  6503. return smalltalk.withContext(function($ctx1) {
  6504. var $2,$1,$receiver;
  6505. $2=self["@selectedClasses"];
  6506. if(($receiver = $2) == null || $receiver.isNil){
  6507. self["@selectedClasses"]=_st($Array())._new();
  6508. $1=self["@selectedClasses"];
  6509. } else {
  6510. $1=$2;
  6511. };
  6512. return $1;
  6513. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},globals.TestRunner)})},
  6514. args: [],
  6515. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  6516. messageSends: ["ifNil:", "new"],
  6517. referencedClasses: ["Array"]
  6518. }),
  6519. globals.TestRunner);
  6520. smalltalk.addMethod(
  6521. smalltalk.method({
  6522. selector: "statusInfo",
  6523. protocol: 'accessing',
  6524. fn: function (){
  6525. var self=this;
  6526. return smalltalk.withContext(function($ctx1) {
  6527. var $2,$1;
  6528. $2=_st(_st(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  6529. $ctx1.sendIdx[","]=2;
  6530. $1=_st($2).__comma(self._printFailures());
  6531. $ctx1.sendIdx[","]=1;
  6532. return $1;
  6533. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},globals.TestRunner)})},
  6534. args: [],
  6535. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  6536. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"],
  6537. referencedClasses: []
  6538. }),
  6539. globals.TestRunner);
  6540. smalltalk.addMethod(
  6541. smalltalk.method({
  6542. selector: "testCases",
  6543. protocol: 'accessing',
  6544. fn: function (){
  6545. var self=this;
  6546. var testCases;
  6547. return smalltalk.withContext(function($ctx1) {
  6548. var $1;
  6549. testCases=[];
  6550. _st(_st(self._selectedClasses())._select_((function(each){
  6551. return smalltalk.withContext(function($ctx2) {
  6552. return _st(self._selectedCategories())._includes_(_st(each)._category());
  6553. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})})))._do_((function(each){
  6554. return smalltalk.withContext(function($ctx2) {
  6555. return _st(testCases)._addAll_(_st(each)._buildSuite());
  6556. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)})}));
  6557. $1=testCases;
  6558. return $1;
  6559. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},globals.TestRunner)})},
  6560. args: [],
  6561. 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",
  6562. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"],
  6563. referencedClasses: []
  6564. }),
  6565. globals.TestRunner);
  6566. smalltalk.addMethod(
  6567. smalltalk.method({
  6568. selector: "toggleCategory:",
  6569. protocol: 'actions',
  6570. fn: function (aCategory){
  6571. var self=this;
  6572. return smalltalk.withContext(function($ctx1) {
  6573. var $1,$2;
  6574. $1=self._isSelectedCategory_(aCategory);
  6575. if(smalltalk.assert($1)){
  6576. _st(self["@selectedCategories"])._remove_(aCategory);
  6577. } else {
  6578. _st(self["@selectedCategories"])._add_(aCategory);
  6579. };
  6580. self._updateCategoriesList();
  6581. $2=self._updateClassesList();
  6582. return self}, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},globals.TestRunner)})},
  6583. args: ["aCategory"],
  6584. 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",
  6585. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"],
  6586. referencedClasses: []
  6587. }),
  6588. globals.TestRunner);
  6589. smalltalk.addMethod(
  6590. smalltalk.method({
  6591. selector: "toggleClass:",
  6592. protocol: 'actions',
  6593. fn: function (aClass){
  6594. var self=this;
  6595. return smalltalk.withContext(function($ctx1) {
  6596. var $1;
  6597. $1=self._isSelectedClass_(aClass);
  6598. if(smalltalk.assert($1)){
  6599. _st(self["@selectedClasses"])._remove_(aClass);
  6600. } else {
  6601. _st(self["@selectedClasses"])._add_(aClass);
  6602. };
  6603. self._updateClassesList();
  6604. return self}, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},globals.TestRunner)})},
  6605. args: ["aClass"],
  6606. 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",
  6607. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"],
  6608. referencedClasses: []
  6609. }),
  6610. globals.TestRunner);
  6611. smalltalk.addMethod(
  6612. smalltalk.method({
  6613. selector: "updateCategoriesList",
  6614. protocol: 'updating',
  6615. fn: function (){
  6616. var self=this;
  6617. return smalltalk.withContext(function($ctx1) {
  6618. var $1,$2,$3,$4,$5;
  6619. _st(self["@packagesList"])._contents_((function(html){
  6620. return smalltalk.withContext(function($ctx2) {
  6621. $1=_st(html)._li();
  6622. $ctx2.sendIdx["li"]=1;
  6623. _st($1)._class_("all");
  6624. $ctx2.sendIdx["class:"]=1;
  6625. _st($1)._with_("All");
  6626. $ctx2.sendIdx["with:"]=1;
  6627. $2=_st($1)._onClick_((function(){
  6628. return smalltalk.withContext(function($ctx3) {
  6629. return self._selectAllCategories();
  6630. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)})}));
  6631. $ctx2.sendIdx["onClick:"]=1;
  6632. $2;
  6633. return _st(self._packages())._do_((function(each){
  6634. var li;
  6635. return smalltalk.withContext(function($ctx3) {
  6636. li=_st(html)._li();
  6637. li;
  6638. $3=_st(self._selectedCategories())._includes_(each);
  6639. if(smalltalk.assert($3)){
  6640. _st(li)._class_("selected");
  6641. };
  6642. $4=li;
  6643. _st($4)._with_(each);
  6644. $5=_st($4)._onClick_((function(){
  6645. return smalltalk.withContext(function($ctx4) {
  6646. return self._toggleCategory_(each);
  6647. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)})}));
  6648. return $5;
  6649. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)})}));
  6650. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6651. return self}, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},globals.TestRunner)})},
  6652. args: [],
  6653. 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 ]] ]",
  6654. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"],
  6655. referencedClasses: []
  6656. }),
  6657. globals.TestRunner);
  6658. smalltalk.addMethod(
  6659. smalltalk.method({
  6660. selector: "updateClassesList",
  6661. protocol: 'updating',
  6662. fn: function (){
  6663. var self=this;
  6664. return smalltalk.withContext(function($ctx1) {
  6665. var $1,$2,$3,$4,$5,$6;
  6666. _st(self["@classesList"])._contents_((function(html){
  6667. return smalltalk.withContext(function($ctx2) {
  6668. $1=_st(self._selectedCategories())._isEmpty();
  6669. if(! smalltalk.assert($1)){
  6670. $2=_st(html)._li();
  6671. $ctx2.sendIdx["li"]=1;
  6672. _st($2)._class_("all");
  6673. $ctx2.sendIdx["class:"]=1;
  6674. _st($2)._with_("All");
  6675. $ctx2.sendIdx["with:"]=1;
  6676. $3=_st($2)._onClick_((function(){
  6677. return smalltalk.withContext(function($ctx3) {
  6678. return self._selectAllClasses();
  6679. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)})}));
  6680. $ctx2.sendIdx["onClick:"]=1;
  6681. $3;
  6682. };
  6683. return _st(self._classes())._do_((function(each){
  6684. var li;
  6685. return smalltalk.withContext(function($ctx3) {
  6686. li=_st(html)._li();
  6687. li;
  6688. $4=_st(self._selectedClasses())._includes_(each);
  6689. if(smalltalk.assert($4)){
  6690. _st(li)._class_("selected");
  6691. };
  6692. $5=li;
  6693. _st($5)._with_(_st(each)._name());
  6694. $6=_st($5)._onClick_((function(){
  6695. return smalltalk.withContext(function($ctx4) {
  6696. return self._toggleClass_(each);
  6697. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)})}));
  6698. return $6;
  6699. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)})}));
  6700. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6701. return self}, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},globals.TestRunner)})},
  6702. args: [],
  6703. 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 ]] ]",
  6704. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"],
  6705. referencedClasses: []
  6706. }),
  6707. globals.TestRunner);
  6708. smalltalk.addMethod(
  6709. smalltalk.method({
  6710. selector: "updateMethodsList",
  6711. protocol: 'updating',
  6712. fn: function (){
  6713. var self=this;
  6714. return smalltalk.withContext(function($ctx1) {
  6715. _st(self["@methodsList"])._contents_((function(html){
  6716. return smalltalk.withContext(function($ctx2) {
  6717. self._renderErrorsOn_(html);
  6718. return self._renderFailuresOn_(html);
  6719. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6720. return self}, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},globals.TestRunner)})},
  6721. args: [],
  6722. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  6723. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
  6724. referencedClasses: []
  6725. }),
  6726. globals.TestRunner);
  6727. smalltalk.addMethod(
  6728. smalltalk.method({
  6729. selector: "updateStatusDiv",
  6730. protocol: 'updating',
  6731. fn: function (){
  6732. var self=this;
  6733. return smalltalk.withContext(function($ctx1) {
  6734. _st(self["@statusDiv"])._class_("sunit status ".__comma(_st(self["@result"])._status()));
  6735. _st(self["@statusDiv"])._contents_((function(html){
  6736. return smalltalk.withContext(function($ctx2) {
  6737. return _st(_st(html)._span())._with_(self._statusInfo());
  6738. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)})}));
  6739. return self}, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},globals.TestRunner)})},
  6740. args: [],
  6741. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  6742. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"],
  6743. referencedClasses: []
  6744. }),
  6745. globals.TestRunner);
  6746. smalltalk.addClass('Workspace', globals.TabWidget, ['sourceArea'], 'IDE');
  6747. smalltalk.addMethod(
  6748. smalltalk.method({
  6749. selector: "clearWorkspace",
  6750. protocol: 'actions',
  6751. fn: function (){
  6752. var self=this;
  6753. return smalltalk.withContext(function($ctx1) {
  6754. _st(self["@sourceArea"])._clear();
  6755. return self}, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},globals.Workspace)})},
  6756. args: [],
  6757. source: "clearWorkspace\x0a\x09sourceArea clear",
  6758. messageSends: ["clear"],
  6759. referencedClasses: []
  6760. }),
  6761. globals.Workspace);
  6762. smalltalk.addMethod(
  6763. smalltalk.method({
  6764. selector: "doIt",
  6765. protocol: 'actions',
  6766. fn: function (){
  6767. var self=this;
  6768. return smalltalk.withContext(function($ctx1) {
  6769. _st(self["@sourceArea"])._doIt();
  6770. return self}, function($ctx1) {$ctx1.fill(self,"doIt",{},globals.Workspace)})},
  6771. args: [],
  6772. source: "doIt\x0a\x09sourceArea doIt",
  6773. messageSends: ["doIt"],
  6774. referencedClasses: []
  6775. }),
  6776. globals.Workspace);
  6777. smalltalk.addMethod(
  6778. smalltalk.method({
  6779. selector: "fileIn",
  6780. protocol: 'actions',
  6781. fn: function (){
  6782. var self=this;
  6783. return smalltalk.withContext(function($ctx1) {
  6784. _st(self["@sourceArea"])._fileIn();
  6785. return self}, function($ctx1) {$ctx1.fill(self,"fileIn",{},globals.Workspace)})},
  6786. args: [],
  6787. source: "fileIn\x0a\x09sourceArea fileIn",
  6788. messageSends: ["fileIn"],
  6789. referencedClasses: []
  6790. }),
  6791. globals.Workspace);
  6792. smalltalk.addMethod(
  6793. smalltalk.method({
  6794. selector: "inspectIt",
  6795. protocol: 'actions',
  6796. fn: function (){
  6797. var self=this;
  6798. return smalltalk.withContext(function($ctx1) {
  6799. _st(self["@sourceArea"])._inspectIt();
  6800. return self}, function($ctx1) {$ctx1.fill(self,"inspectIt",{},globals.Workspace)})},
  6801. args: [],
  6802. source: "inspectIt\x0a\x09sourceArea inspectIt",
  6803. messageSends: ["inspectIt"],
  6804. referencedClasses: []
  6805. }),
  6806. globals.Workspace);
  6807. smalltalk.addMethod(
  6808. smalltalk.method({
  6809. selector: "label",
  6810. protocol: 'accessing',
  6811. fn: function (){
  6812. var self=this;
  6813. return "Workspace";
  6814. },
  6815. args: [],
  6816. source: "label\x0a\x09^ 'Workspace'",
  6817. messageSends: [],
  6818. referencedClasses: []
  6819. }),
  6820. globals.Workspace);
  6821. smalltalk.addMethod(
  6822. smalltalk.method({
  6823. selector: "printIt",
  6824. protocol: 'actions',
  6825. fn: function (){
  6826. var self=this;
  6827. return smalltalk.withContext(function($ctx1) {
  6828. _st(self["@sourceArea"])._printIt();
  6829. return self}, function($ctx1) {$ctx1.fill(self,"printIt",{},globals.Workspace)})},
  6830. args: [],
  6831. source: "printIt\x0a\x09sourceArea printIt",
  6832. messageSends: ["printIt"],
  6833. referencedClasses: []
  6834. }),
  6835. globals.Workspace);
  6836. smalltalk.addMethod(
  6837. smalltalk.method({
  6838. selector: "renderBoxOn:",
  6839. protocol: 'rendering',
  6840. fn: function (html){
  6841. var self=this;
  6842. function $SourceArea(){return globals.SourceArea||(typeof SourceArea=="undefined"?nil:SourceArea)}
  6843. return smalltalk.withContext(function($ctx1) {
  6844. self["@sourceArea"]=_st($SourceArea())._new();
  6845. _st(self["@sourceArea"])._renderOn_(html);
  6846. return self}, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},globals.Workspace)})},
  6847. args: ["html"],
  6848. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  6849. messageSends: ["new", "renderOn:"],
  6850. referencedClasses: ["SourceArea"]
  6851. }),
  6852. globals.Workspace);
  6853. smalltalk.addMethod(
  6854. smalltalk.method({
  6855. selector: "renderButtonsOn:",
  6856. protocol: 'rendering',
  6857. fn: function (html){
  6858. var self=this;
  6859. return smalltalk.withContext(function($ctx1) {
  6860. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10;
  6861. $1=_st(html)._button();
  6862. $ctx1.sendIdx["button"]=1;
  6863. _st($1)._with_("DoIt");
  6864. $ctx1.sendIdx["with:"]=1;
  6865. _st($1)._title_("ctrl+d");
  6866. $ctx1.sendIdx["title:"]=1;
  6867. $2=_st($1)._onClick_((function(){
  6868. return smalltalk.withContext(function($ctx2) {
  6869. return self._doIt();
  6870. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)})}));
  6871. $ctx1.sendIdx["onClick:"]=1;
  6872. $3=_st(html)._button();
  6873. $ctx1.sendIdx["button"]=2;
  6874. _st($3)._with_("PrintIt");
  6875. $ctx1.sendIdx["with:"]=2;
  6876. _st($3)._title_("ctrl+p");
  6877. $ctx1.sendIdx["title:"]=2;
  6878. $4=_st($3)._onClick_((function(){
  6879. return smalltalk.withContext(function($ctx2) {
  6880. return self._printIt();
  6881. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)})}));
  6882. $ctx1.sendIdx["onClick:"]=2;
  6883. $5=_st(html)._button();
  6884. $ctx1.sendIdx["button"]=3;
  6885. _st($5)._with_("InspectIt");
  6886. $ctx1.sendIdx["with:"]=3;
  6887. _st($5)._title_("ctrl+i");
  6888. $ctx1.sendIdx["title:"]=3;
  6889. $6=_st($5)._onClick_((function(){
  6890. return smalltalk.withContext(function($ctx2) {
  6891. return self._inspectIt();
  6892. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)})}));
  6893. $ctx1.sendIdx["onClick:"]=3;
  6894. $7=_st(html)._button();
  6895. $ctx1.sendIdx["button"]=4;
  6896. _st($7)._with_("FileIn");
  6897. $ctx1.sendIdx["with:"]=4;
  6898. _st($7)._title_("ctrl+f");
  6899. $8=_st($7)._onClick_((function(){
  6900. return smalltalk.withContext(function($ctx2) {
  6901. return self._fileIn();
  6902. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)})}));
  6903. $ctx1.sendIdx["onClick:"]=4;
  6904. $9=_st(html)._button();
  6905. _st($9)._with_("Clear workspace");
  6906. $10=_st($9)._onClick_((function(){
  6907. return smalltalk.withContext(function($ctx2) {
  6908. return self._clearWorkspace();
  6909. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)})}));
  6910. return self}, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},globals.Workspace)})},
  6911. args: ["html"],
  6912. 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 ]",
  6913. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
  6914. referencedClasses: []
  6915. }),
  6916. globals.Workspace);
  6917. smalltalk.addMethod(
  6918. smalltalk.method({
  6919. selector: "show",
  6920. protocol: 'actions',
  6921. fn: function (){
  6922. var self=this;
  6923. return smalltalk.withContext(function($ctx1) {
  6924. ($ctx1.supercall = true, globals.Workspace.superclass.fn.prototype._show.apply(_st(self), []));
  6925. $ctx1.supercall = false;
  6926. _st(self["@sourceArea"])._focus();
  6927. return self}, function($ctx1) {$ctx1.fill(self,"show",{},globals.Workspace)})},
  6928. args: [],
  6929. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  6930. messageSends: ["show", "focus"],
  6931. referencedClasses: []
  6932. }),
  6933. globals.Workspace);
  6934. smalltalk.addMethod(
  6935. smalltalk.method({
  6936. selector: "inspectOn:",
  6937. protocol: '*IDE',
  6938. fn: function (anInspector){
  6939. var self=this;
  6940. var variables;
  6941. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6942. return smalltalk.withContext(function($ctx1) {
  6943. var $1;
  6944. variables=_st($Dictionary())._new();
  6945. _st(variables)._at_put_("#self",self);
  6946. $ctx1.sendIdx["at:put:"]=1;
  6947. _st(variables)._at_put_("#keys",self._keys());
  6948. $ctx1.sendIdx["at:put:"]=2;
  6949. self._keysAndValuesDo_((function(key,value){
  6950. return smalltalk.withContext(function($ctx2) {
  6951. return _st(variables)._at_put_(key,value);
  6952. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,1)})}));
  6953. _st(anInspector)._setLabel_(self._printString());
  6954. $1=_st(anInspector)._setVariables_(variables);
  6955. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.AssociativeCollection)})},
  6956. args: ["anInspector"],
  6957. 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",
  6958. messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
  6959. referencedClasses: ["Dictionary"]
  6960. }),
  6961. globals.AssociativeCollection);
  6962. smalltalk.addMethod(
  6963. smalltalk.method({
  6964. selector: "inspectOn:",
  6965. protocol: '*IDE',
  6966. fn: function (anInspector){
  6967. var self=this;
  6968. var variables;
  6969. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6970. return smalltalk.withContext(function($ctx1) {
  6971. var $1;
  6972. variables=_st($Dictionary())._new();
  6973. _st(variables)._at_put_("#self",self);
  6974. $ctx1.sendIdx["at:put:"]=1;
  6975. self._withIndexDo_((function(each,i){
  6976. return smalltalk.withContext(function($ctx2) {
  6977. return _st(variables)._at_put_(i,each);
  6978. }, function($ctx2) {$ctx2.fillBlock({each:each,i:i},$ctx1,1)})}));
  6979. _st(anInspector)._setLabel_(self._printString());
  6980. $1=_st(anInspector)._setVariables_(variables);
  6981. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Collection)})},
  6982. args: ["anInspector"],
  6983. 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",
  6984. messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
  6985. referencedClasses: ["Dictionary"]
  6986. }),
  6987. globals.Collection);
  6988. smalltalk.addMethod(
  6989. smalltalk.method({
  6990. selector: "inspectOn:",
  6991. protocol: '*IDE',
  6992. fn: function (anInspector){
  6993. var self=this;
  6994. var variables;
  6995. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  6996. return smalltalk.withContext(function($ctx1) {
  6997. var $1;
  6998. variables=_st($Dictionary())._new();
  6999. _st(variables)._at_put_("#self",self);
  7000. $ctx1.sendIdx["at:put:"]=1;
  7001. _st(variables)._at_put_("#year",self._year());
  7002. $ctx1.sendIdx["at:put:"]=2;
  7003. _st(variables)._at_put_("#month",self._month());
  7004. $ctx1.sendIdx["at:put:"]=3;
  7005. _st(variables)._at_put_("#day",self._day());
  7006. $ctx1.sendIdx["at:put:"]=4;
  7007. _st(variables)._at_put_("#hours",self._hours());
  7008. $ctx1.sendIdx["at:put:"]=5;
  7009. _st(variables)._at_put_("#minutes",self._minutes());
  7010. $ctx1.sendIdx["at:put:"]=6;
  7011. _st(variables)._at_put_("#seconds",self._seconds());
  7012. $ctx1.sendIdx["at:put:"]=7;
  7013. _st(variables)._at_put_("#milliseconds",self._milliseconds());
  7014. _st(anInspector)._setLabel_(self._printString());
  7015. $1=_st(anInspector)._setVariables_(variables);
  7016. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.Date)})},
  7017. args: ["anInspector"],
  7018. 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",
  7019. messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
  7020. referencedClasses: ["Dictionary"]
  7021. }),
  7022. globals.Date);
  7023. smalltalk.addMethod(
  7024. smalltalk.method({
  7025. selector: "inspectOn:",
  7026. protocol: '*IDE',
  7027. fn: function (anInspector){
  7028. var self=this;
  7029. var variables;
  7030. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7031. return smalltalk.withContext(function($ctx1) {
  7032. var $1;
  7033. variables=_st($Dictionary())._new();
  7034. _st(variables)._at_put_("#self",self);
  7035. $ctx1.sendIdx["at:put:"]=1;
  7036. _st(variables)._at_put_("#home",self._home());
  7037. $ctx1.sendIdx["at:put:"]=2;
  7038. _st(variables)._at_put_("#receiver",self._receiver());
  7039. $ctx1.sendIdx["at:put:"]=3;
  7040. _st(variables)._at_put_("#selector",self._selector());
  7041. $ctx1.sendIdx["at:put:"]=4;
  7042. _st(variables)._at_put_("#locals",self._locals());
  7043. $ctx1.sendIdx["at:put:"]=5;
  7044. _st(_st(self._class())._instanceVariableNames())._do_((function(each){
  7045. return smalltalk.withContext(function($ctx2) {
  7046. return _st(variables)._at_put_(each,self._instVarAt_(each));
  7047. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7048. _st(anInspector)._setLabel_(self._printString());
  7049. $1=_st(anInspector)._setVariables_(variables);
  7050. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables},globals.MethodContext)})},
  7051. args: ["anInspector"],
  7052. 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: '#locals' put: self locals.\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",
  7053. messageSends: ["new", "at:put:", "home", "receiver", "selector", "locals", "do:", "instanceVariableNames", "class", "instVarAt:", "setLabel:", "printString", "setVariables:"],
  7054. referencedClasses: ["Dictionary"]
  7055. }),
  7056. globals.MethodContext);
  7057. smalltalk.addMethod(
  7058. smalltalk.method({
  7059. selector: "inspectOn:",
  7060. protocol: '*IDE',
  7061. fn: function (anInspector){
  7062. var self=this;
  7063. var variables,i;
  7064. function $Dictionary(){return globals.Dictionary||(typeof Dictionary=="undefined"?nil:Dictionary)}
  7065. return smalltalk.withContext(function($ctx1) {
  7066. var $1;
  7067. variables=_st($Dictionary())._new();
  7068. _st(variables)._at_put_("#self",self);
  7069. $ctx1.sendIdx["at:put:"]=1;
  7070. i=(1);
  7071. self._do_((function(each){
  7072. return smalltalk.withContext(function($ctx2) {
  7073. _st(variables)._at_put_(i,each);
  7074. i=_st(i).__plus((1));
  7075. return i;
  7076. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)})}));
  7077. _st(anInspector)._setLabel_(self._printString());
  7078. $1=_st(anInspector)._setVariables_(variables);
  7079. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,variables:variables,i:i},globals.Set)})},
  7080. args: ["anInspector"],
  7081. 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",
  7082. messageSends: ["new", "at:put:", "do:", "+", "setLabel:", "printString", "setVariables:"],
  7083. referencedClasses: ["Dictionary"]
  7084. }),
  7085. globals.Set);
  7086. smalltalk.addMethod(
  7087. smalltalk.method({
  7088. selector: "inspectOn:",
  7089. protocol: '*IDE',
  7090. fn: function (anInspector){
  7091. var self=this;
  7092. var label;
  7093. return smalltalk.withContext(function($ctx1) {
  7094. var $3,$2,$1,$5,$4;
  7095. ($ctx1.supercall = true, globals.String.superclass.fn.prototype._inspectOn_.apply(_st(self), [anInspector]));
  7096. $ctx1.supercall = false;
  7097. $3=self._printString();
  7098. $ctx1.sendIdx["printString"]=1;
  7099. $2=_st($3)._size();
  7100. $1=_st($2).__gt((30));
  7101. if(smalltalk.assert($1)){
  7102. $5=self._printString();
  7103. $ctx1.sendIdx["printString"]=2;
  7104. $4=_st($5)._copyFrom_to_((1),(30));
  7105. label=_st($4).__comma("...'");
  7106. label;
  7107. } else {
  7108. label=self._printString();
  7109. label;
  7110. };
  7111. _st(anInspector)._setLabel_(label);
  7112. return self}, function($ctx1) {$ctx1.fill(self,"inspectOn:",{anInspector:anInspector,label:label},globals.String)})},
  7113. args: ["anInspector"],
  7114. 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",
  7115. messageSends: ["inspectOn:", "ifTrue:ifFalse:", ">", "size", "printString", ",", "copyFrom:to:", "setLabel:"],
  7116. referencedClasses: []
  7117. }),
  7118. globals.String);
  7119. });