2
0

IDE.js 268 KB

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