IDE.js 269 KB

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