IDE.js 274 KB

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