1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181 |
- smalltalk.addPackage('IDE', {});
- smalltalk.addClass('ClassesList', smalltalk.Widget, ['browser', 'ul', 'nodes'], 'IDE');
- smalltalk.addMethod(
- "_browser",
- smalltalk.method({
- selector: "browser",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@browser'];
- },
- args: [],
- source: "browser\x0a\x09^browser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_browser_",
- smalltalk.method({
- selector: "browser:",
- category: 'accessing',
- fn: function (aBrowser) {
- var self = this;
- self['@browser'] = aBrowser;
- return self;
- },
- args: ["aBrowser"],
- source: "browser: aBrowser\x0a\x09browser := aBrowser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_category",
- smalltalk.method({
- selector: "category",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedPackage", []);
- return $1;
- },
- args: [],
- source: "category\x0a\x09^self browser selectedPackage",
- messageSends: ["selectedPackage", "browser"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_getNodes",
- smalltalk.method({
- selector: "getNodes",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2;
- var classes;
- var children;
- var others;
- classes = smalltalk.send(smalltalk.send(self, "_browser", []), "_classes", []);
- children = [];
- others = [];
- smalltalk.send(classes, "_do_", [function (each) {$1 = smalltalk.send(classes, "_includes_", [smalltalk.send(each, "_superclass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(others, "_add_", [each]);} else {return smalltalk.send(children, "_add_", [each]);}}]);
- $2 = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassesListNode || ClassesListNode, "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, 0]);}]);
- return $2;
- },
- args: [],
- 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]",
- messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "add:", "includes:", "superclass", "collect:", "on:browser:classes:level:"],
- referencedClasses: ["ClassesListNode"]
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_nodes",
- smalltalk.method({
- selector: "nodes",
- category: 'accessing',
- fn: function () {
- var self = this;
- if (($receiver = self['@nodes']) == nil || $receiver == undefined) {
- self['@nodes'] = smalltalk.send(self, "_getNodes", []);
- self['@nodes'];
- } else {
- self['@nodes'];
- }
- return self['@nodes'];
- },
- args: [],
- source: "nodes\x0a\x09nodes ifNil: [nodes := self getNodes].\x0a\x09^nodes",
- messageSends: ["ifNil:", "getNodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_ul", []);
- smalltalk.send($1, "_class_", ["amber_column browser classes"]);
- $2 = smalltalk.send($1, "_yourself", []);
- self['@ul'] = $2;
- smalltalk.send(self, "_updateNodes", []);
- return self;
- },
- args: ["html"],
- source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
- messageSends: ["class:", "ul", "yourself", "updateNodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_resetNodes",
- smalltalk.method({
- selector: "resetNodes",
- category: 'accessing',
- fn: function () {
- var self = this;
- self['@nodes'] = nil;
- return self;
- },
- args: [],
- source: "resetNodes\x0a\x09nodes := nil",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_updateNodes",
- smalltalk.method({
- selector: "updateNodes",
- category: 'rendering',
- fn: function () {
- var self = this;
- smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_renderOn_", [html]);}]);}]);
- return self;
- },
- args: [],
- source: "updateNodes\x0a\x09ul contents: [:html |\x0a\x09\x09self nodes do: [:each |\x0a\x09\x09\x09each renderOn: html]]",
- messageSends: ["contents:", "do:", "renderOn:", "nodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesList);
- smalltalk.addMethod(
- "_on_",
- smalltalk.method({
- selector: "on:",
- category: 'instance creation',
- fn: function (aBrowser) {
- var self = this;
- var $2, $3, $1;
- $2 = smalltalk.send(self, "_new", []);
- smalltalk.send($2, "_browser_", [aBrowser]);
- $3 = smalltalk.send($2, "_yourself", []);
- $1 = $3;
- return $1;
- },
- args: ["aBrowser"],
- source: "on: aBrowser\x0a\x09^self new \x0a\x09\x09browser: aBrowser; \x0a\x09\x09yourself",
- messageSends: ["browser:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.ClassesList.klass);
- smalltalk.addClass('ClassesListNode', smalltalk.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
- smalltalk.addMethod(
- "_browser",
- smalltalk.method({
- selector: "browser",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@browser'];
- },
- args: [],
- source: "browser\x0a\x09^browser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_browser_",
- smalltalk.method({
- selector: "browser:",
- category: 'accessing',
- fn: function (aBrowser) {
- var self = this;
- self['@browser'] = aBrowser;
- return self;
- },
- args: ["aBrowser"],
- source: "browser: aBrowser\x0a\x09browser := aBrowser",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_getNodesFrom_",
- smalltalk.method({
- selector: "getNodesFrom:",
- category: 'accessing',
- fn: function (aCollection) {
- var self = this;
- var $1;
- var children;
- var others;
- children = [];
- others = [];
- smalltalk.send(aCollection, "_do_", [function (each) {$1 = smalltalk.send(smalltalk.send(each, "_superclass", []), "__eq", [smalltalk.send(self, "_theClass", [])]);if (smalltalk.assert($1)) {return smalltalk.send(children, "_add_", [each]);} else {return smalltalk.send(others, "_add_", [each]);}}]);
- self['@nodes'] = smalltalk.send(children, "_collect_", [function (each) {return smalltalk.send(smalltalk.ClassesListNode || ClassesListNode, "_on_browser_classes_level_", [each, smalltalk.send(self, "_browser", []), others, smalltalk.send(smalltalk.send(self, "_level", []), "__plus", [1])]);}]);
- return self;
- },
- args: ["aCollection"],
- 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]",
- messageSends: ["do:", "ifTrue:ifFalse:", "add:", "=", "theClass", "superclass", "collect:", "on:browser:classes:level:", "browser", "+", "level"],
- referencedClasses: ["ClassesListNode"]
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- var str;
- str = smalltalk.send(smalltalk.send(smalltalk.String || String, "_new", []), "_writeStream", []);
- smalltalk.send(smalltalk.send(self, "_level", []), "_timesRepeat_", [function () {return smalltalk.send(str, "_nextPutAll_", [" "]);}]);
- smalltalk.send(str, "_nextPutAll_", [smalltalk.send(smalltalk.send(self, "_theClass", []), "_name", [])]);
- $1 = smalltalk.send(str, "_contents", []);
- return $1;
- },
- args: [],
- 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",
- messageSends: ["writeStream", "new", "timesRepeat:", "nextPutAll:", "level", "name", "theClass", "contents"],
- referencedClasses: ["String"]
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_level",
- smalltalk.method({
- selector: "level",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@level'];
- },
- args: [],
- source: "level\x0a\x09^level",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_level_",
- smalltalk.method({
- selector: "level:",
- category: 'accessing',
- fn: function (anInteger) {
- var self = this;
- self['@level'] = anInteger;
- return self;
- },
- args: ["anInteger"],
- source: "level: anInteger\x0a\x09level := anInteger",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_nodes",
- smalltalk.method({
- selector: "nodes",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@nodes'];
- },
- args: [],
- source: "nodes\x0a\x09^nodes",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: '',
- fn: function (html) {
- var self = this;
- var $1, $2;
- var li;
- var cssClass;
- cssClass = "";
- li = smalltalk.send(smalltalk.send(html, "_li", []), "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_browser", []), "_selectClass_", [smalltalk.send(self, "_theClass", [])]);}]);
- smalltalk.send(smalltalk.send(li, "_asJQuery", []), "_html_", [smalltalk.send(self, "_label", [])]);
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_browser", []), "_selectedClass", []), "__eq", [smalltalk.send(self, "_theClass", [])]);
- if (smalltalk.assert($1)) {
- cssClass = smalltalk.send(cssClass, "__comma", [" selected"]);
- }
- $2 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_theClass", []), "_comment", []), "_isEmpty", []);
- if (!smalltalk.assert($2)) {
- cssClass = smalltalk.send(cssClass, "__comma", [" commented"]);
- }
- smalltalk.send(li, "_class_", [cssClass]);
- smalltalk.send(smalltalk.send(self, "_nodes", []), "_do_", [function (each) {return smalltalk.send(each, "_renderOn_", [html]);}]);
- return self;
- },
- args: ["html"],
- 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]",
- messageSends: ["onClick:", "selectClass:", "theClass", "browser", "li", "html:", "label", "asJQuery", "ifTrue:", ",", "=", "selectedClass", "ifFalse:", "isEmpty", "comment", "class:", "do:", "renderOn:", "nodes"],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_theClass",
- smalltalk.method({
- selector: "theClass",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@theClass'];
- },
- args: [],
- source: "theClass\x0a\x09^theClass",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_theClass_",
- smalltalk.method({
- selector: "theClass:",
- category: 'accessing',
- fn: function (aClass) {
- var self = this;
- self['@theClass'] = aClass;
- return self;
- },
- args: ["aClass"],
- source: "theClass: aClass\x0a\x09theClass := aClass",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode);
- smalltalk.addMethod(
- "_on_browser_classes_level_",
- smalltalk.method({
- selector: "on:browser:classes:level:",
- category: 'instance creation',
- fn: function (aClass, aBrowser, aCollection, anInteger) {
- var self = this;
- var $2, $3, $1;
- $2 = smalltalk.send(self, "_new", []);
- smalltalk.send($2, "_theClass_", [aClass]);
- smalltalk.send($2, "_browser_", [aBrowser]);
- smalltalk.send($2, "_level_", [anInteger]);
- smalltalk.send($2, "_getNodesFrom_", [aCollection]);
- $3 = smalltalk.send($2, "_yourself", []);
- $1 = $3;
- return $1;
- },
- args: ["aClass", "aBrowser", "aCollection", "anInteger"],
- 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",
- messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"],
- referencedClasses: []
- }),
- smalltalk.ClassesListNode.klass);
- smalltalk.addClass('DebugErrorHandler', smalltalk.ErrorHandler, [], 'IDE');
- smalltalk.addMethod(
- "_handleError_",
- smalltalk.method({
- selector: "handleError:",
- category: 'error handling',
- fn: function (anError) {
- var self = this;
- var $1, $2;
- smalltalk.send(function () {$1 = smalltalk.send(smalltalk.Debugger || Debugger, "_new", []);smalltalk.send($1, "_error_", [anError]);$2 = smalltalk.send($1, "_open", []);return $2;}, "_on_do_", [smalltalk.Error || Error, function (error) {return smalltalk.send(smalltalk.send(smalltalk.ErrorHandler || ErrorHandler, "_new", []), "_handleError_", [error]);}]);
- return self;
- },
- args: ["anError"],
- source: "handleError: anError\x0a\x09[Debugger new\x0a\x09\x09error: anError;\x0a\x09\x09open] on: Error do: [:error |\x0a\x09\x09\x09ErrorHandler new handleError: error]",
- messageSends: ["on:do:", "handleError:", "new", "error:", "open"],
- referencedClasses: ["Error", "ErrorHandler", "Debugger"]
- }),
- smalltalk.DebugErrorHandler);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_register", []);
- return self;
- },
- args: [],
- source: "initialize\x0a\x09self register",
- messageSends: ["register"],
- referencedClasses: []
- }),
- smalltalk.DebugErrorHandler.klass);
- smalltalk.addClass('SourceArea', smalltalk.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
- smalltalk.addMethod(
- "_clear",
- smalltalk.method({
- selector: "clear",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_val_", [""]);
- return self;
- },
- args: [],
- source: "clear\x0a self val: ''",
- messageSends: ["val:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_currentLine",
- smalltalk.method({
- selector: "currentLine",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@editor'], "_getLine_", [smalltalk.send(smalltalk.send(self['@editor'], "_getCursor", []), "_line", [])]);
- return $1;
- },
- args: [],
- source: "currentLine\x0a ^editor getLine: (editor getCursor line)",
- messageSends: ["getLine:", "line", "getCursor"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_currentLineOrSelection",
- smalltalk.method({
- selector: "currentLineOrSelection",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $2, $1;
- $2 = smalltalk.send(self['@editor'], "_somethingSelected", []);
- if (smalltalk.assert($2)) {
- $1 = smalltalk.send(self, "_selection", []);
- } else {
- $1 = smalltalk.send(self, "_currentLine", []);
- }
- return $1;
- },
- args: [],
- source: "currentLineOrSelection\x0a ^editor somethingSelected\x0a\x09ifFalse: [self currentLine]\x0a\x09ifTrue: [self selection]",
- messageSends: ["ifFalse:ifTrue:", "currentLine", "selection", "somethingSelected"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_doIt",
- smalltalk.method({
- selector: "doIt",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- var result;
- result = smalltalk.send(self, "_eval_", [smalltalk.send(self, "_currentLineOrSelection", [])]);
- $1 = smalltalk.send(self, "_onDoIt", []);
- if (($receiver = $1) == nil || $receiver == undefined) {
- } else {
- smalltalk.send(smalltalk.send(self, "_onDoIt", []), "_value", []);
- }
- return result;
- },
- args: [],
- source: "doIt\x0a | result |\x0a result := self eval: self currentLineOrSelection.\x0a self onDoIt ifNotNil: [self onDoIt value].\x0a ^result",
- messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "value", "onDoIt"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_editor",
- smalltalk.method({
- selector: "editor",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@editor'];
- },
- args: [],
- source: "editor\x0a\x09^editor",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_eval_",
- smalltalk.method({
- selector: "eval:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1, $2;
- var $early = {};
- try {
- var compiler;
- compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
- smalltalk.send(function () {return smalltalk.send(compiler, "_parseExpression_", [aString]);}, "_on_do_", [smalltalk.Error || Error, function (ex) {$1 = smalltalk.send(window, "_alert_", [smalltalk.send(ex, "_messageText", [])]);throw $early = [$1];}]);
- $2 = smalltalk.send(smalltalk.send(smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compile_forClass_", [smalltalk.send(smalltalk.send("doIt ^[", "__comma", [aString]), "__comma", ["] value"]), smalltalk.DoIt || DoIt])]), "_fn", []), "_applyTo_arguments_", [smalltalk.send(self, "_receiver", []), []]);
- return $2;
- } catch (e) {
- if (e === $early) {
- return e[0];
- }
- throw e;
- }
- },
- args: ["aString"],
- source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[compiler parseExpression: aString] on: Error do: [:ex |\x0a\x09\x09^window alert: ex messageText].\x0a\x09^(compiler eval: (compiler compile: 'doIt ^[', aString, '] value' forClass: DoIt)) fn applyTo: self receiver arguments: #()",
- messageSends: ["new", "on:do:", "alert:", "messageText", "parseExpression:", "applyTo:arguments:", "receiver", "fn", "eval:", "compile:forClass:", ","],
- referencedClasses: ["Compiler", "Error", "DoIt"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_fileIn",
- smalltalk.method({
- selector: "fileIn",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(smalltalk.Importer || Importer, "_new", []), "_import_", [smalltalk.send(smalltalk.send(self, "_currentLineOrSelection", []), "_readStream", [])]);
- return self;
- },
- args: [],
- source: "fileIn\x0a Importer new import: self currentLineOrSelection readStream",
- messageSends: ["import:", "readStream", "currentLineOrSelection", "new"],
- referencedClasses: ["Importer"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_focus",
- smalltalk.method({
- selector: "focus",
- category: 'actions',
- fn: function (){
- var self=this;
- smalltalk.send(smalltalk.send(self,"_editor",[]),"_focus",[]);
- return self},
- args: [],
- source: "focus\x0a self editor focus.",
- messageSends: ["focus", "editor"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_handleKeyDown_",
- smalltalk.method({
- selector: "handleKeyDown:",
- category: 'actions',
- fn: function (anEvent) {
- var self = this;
- if (anEvent.ctrlKey) {
- if (anEvent.keyCode === 80) {
- self._printIt();
- anEvent.preventDefault();
- return false;
- }
- if (anEvent.keyCode === 68) {
- self._doIt();
- anEvent.preventDefault();
- return false;
- }
- if (anEvent.keyCode === 73) {
- self._inspectIt();
- anEvent.preventDefault();
- return false;
- }
- }
- return self;
- },
- args: ["anEvent"],
- source: "handleKeyDown: anEvent\x0a <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}>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_inspectIt",
- smalltalk.method({
- selector: "inspectIt",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self, "_doIt", []), "_inspect", []);
- return self;
- },
- args: [],
- source: "inspectIt\x0a self doIt inspect",
- messageSends: ["inspect", "doIt"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onDoIt",
- smalltalk.method({
- selector: "onDoIt",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@onDoIt'];
- },
- args: [],
- source: "onDoIt\x0a\x09^onDoIt",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onDoIt_",
- smalltalk.method({
- selector: "onDoIt:",
- category: 'accessing',
- fn: function (aBlock) {
- var self = this;
- self['@onDoIt'] = aBlock;
- return self;
- },
- args: ["aBlock"],
- source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onKeyDown_",
- smalltalk.method({
- selector: "onKeyDown:",
- category: 'events',
- fn: function (aBlock) {
- var self = this;
- smalltalk.send(self['@div'], "_onKeyDown_", [aBlock]);
- return self;
- },
- args: ["aBlock"],
- source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
- messageSends: ["onKeyDown:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_onKeyUp_",
- smalltalk.method({
- selector: "onKeyUp:",
- category: 'events',
- fn: function (aBlock) {
- var self = this;
- smalltalk.send(self['@div'], "_onKeyUp_", [aBlock]);
- return self;
- },
- args: ["aBlock"],
- source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
- messageSends: ["onKeyUp:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_print_",
- smalltalk.method({
- selector: "print:",
- category: 'actions',
- fn: function (aString){
- var self=this;
- var start;
- var stop;
- var currentLine;
- currentLine=smalltalk.send(smalltalk.send(self["@editor"],"_getCursor_",[false]),"_line",[]);
- start=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
- smalltalk.send(start,"_at_put_",["line",currentLine]);
- smalltalk.send(start,"_at_put_",["ch",smalltalk.send(smalltalk.send(self["@editor"],"_getCursor_",[false]),"_ch",[])]);
- smalltalk.send(smalltalk.send(self["@editor"],"_getSelection",[]),"_ifEmpty_",[(function(){
- smalltalk.send(start,"_at_put_",["ch",smalltalk.send(smalltalk.send(self["@editor"],"_getLine_",[currentLine]),"_size",[])]);
- return smalltalk.send(self["@editor"],"_setSelection_end_",[smalltalk.HashedCollection._fromPairs_([smalltalk.send("line","__minus_gt",[currentLine]),smalltalk.send("ch","__minus_gt",[(0)])]),start]);
- })]);
- stop=smalltalk.send((smalltalk.HashedCollection || HashedCollection),"_new",[]);
- smalltalk.send(stop,"_at_put_",["line",currentLine]);
- smalltalk.send(stop,"_at_put_",["ch",smalltalk.send(smalltalk.send(smalltalk.send(start,"_at_",["ch"]),"__plus",[smalltalk.send(aString,"_size",[])]),"__plus",[(2)])]);
- smalltalk.send(self["@editor"],"_replaceSelection_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self["@editor"],"_getSelection",[]),"__comma",[" "]),"__comma",[aString]),"__comma",[" "])]);
- smalltalk.send(self["@editor"],"_setCursor_",[smalltalk.send(self["@editor"],"_getCursor_",[true])]);
- smalltalk.send(self["@editor"],"_setSelection_end_",[stop,start]);
- return self},
- args: ["aString"],
- source: "print: aString\x0a\x09| start stop currentLine |\x0a currentLine := (editor getCursor: false) line.\x0a\x09start := HashedCollection new.\x0a\x09start at: 'line' put: currentLine.\x0a\x09start at: 'ch' put: (editor getCursor: false) ch.\x0a (editor getSelection) ifEmpty: [\x0a \x09\x22select current line if selection is empty\x22\x0a \x09start at: 'ch' put: (editor getLine: currentLine) size.\x0a editor setSelection: #{'line' -> currentLine. 'ch' -> 0} end: start.\x0a ].\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",
- messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "size", "getLine:", "setSelection:end:", "->", "getSelection", "+", "at:", "replaceSelection:", ",", "setCursor:"],
- referencedClasses: ["HashedCollection"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_printIt",
- smalltalk.method({
- selector: "printIt",
- category: 'actions',
- fn: function (){
- var self=this;
- smalltalk.send(self,"_print_",[smalltalk.send(smalltalk.send(self,"_doIt",[]),"_printString",[])]);
- smalltalk.send(self,"_focus",[]);
- return self},
- args: [],
- source: "printIt\x0a self print: self doIt printString.\x0a\x09self focus.",
- messageSends: ["print:", "printString", "doIt", "focus"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_receiver",
- smalltalk.method({
- selector: "receiver",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@receiver']) == nil || $receiver == undefined) {
- $1 = smalltalk.send(smalltalk.DoIt || DoIt, "_new", []);
- } else {
- $1 = self['@receiver'];
- }
- return $1;
- },
- args: [],
- source: "receiver\x0a\x09^receiver ifNil: [DoIt new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["DoIt"]
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_receiver_",
- smalltalk.method({
- selector: "receiver:",
- category: 'accessing',
- fn: function (anObject) {
- var self = this;
- self['@receiver'] = anObject;
- return self;
- },
- args: ["anObject"],
- source: "receiver: anObject\x0a\x09receiver := anObject",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var textarea;
- self['@div'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["source"]);
- smalltalk.send(self['@div'], "_with_", [function () {textarea = smalltalk.send(html, "_textarea", []);return textarea;}]);
- smalltalk.send(self, "_setEditorOn_", [smalltalk.send(textarea, "_element", [])]);
- smalltalk.send(self['@div'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleKeyDown_", [e]);}]);
- return self;
- },
- args: ["html"],
- source: "renderOn: html\x0a | textarea |\x0a div := html div class: 'source'.\x0a div with: [textarea := html textarea].\x0a self setEditorOn: textarea element.\x0a div onKeyDown: [:e | self handleKeyDown: e]",
- messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selection",
- smalltalk.method({
- selector: "selection",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@editor'], "_getSelection", []);
- return $1;
- },
- args: [],
- source: "selection\x0a\x09^editor getSelection",
- messageSends: ["getSelection"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionEnd",
- smalltalk.method({
- selector: "selectionEnd",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd", []);
- return $1;
- },
- args: [],
- source: "selectionEnd\x0a ^textarea element selectionEnd",
- messageSends: ["selectionEnd", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionEnd_",
- smalltalk.method({
- selector: "selectionEnd:",
- category: 'accessing',
- fn: function (anInteger) {
- var self = this;
- smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionEnd_", [anInteger]);
- return self;
- },
- args: ["anInteger"],
- source: "selectionEnd: anInteger\x0a textarea element selectionEnd: anInteger",
- messageSends: ["selectionEnd:", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionStart",
- smalltalk.method({
- selector: "selectionStart",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart", []);
- return $1;
- },
- args: [],
- source: "selectionStart\x0a ^textarea element selectionStart",
- messageSends: ["selectionStart", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_selectionStart_",
- smalltalk.method({
- selector: "selectionStart:",
- category: 'accessing',
- fn: function (anInteger) {
- var self = this;
- smalltalk.send(smalltalk.send(textarea, "_element", []), "_selectionStart_", [anInteger]);
- return self;
- },
- args: ["anInteger"],
- source: "selectionStart: anInteger\x0a textarea element selectionStart: anInteger",
- messageSends: ["selectionStart:", "element"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_setEditorOn_",
- smalltalk.method({
- selector: "setEditorOn:",
- category: 'accessing',
- fn: function (aTextarea) {
- var self = this;
- self['@editor'] = CodeMirror.fromTextArea(aTextarea, {theme: "amber", lineNumbers: true, enterMode: "flat", matchBrackets: true, electricChars: false});
- return self;
- },
- args: ["aTextarea"],
- source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = CodeMirror.fromTextArea(aTextarea, {\x0a\x09\x09theme: 'amber',\x0a lineNumbers: true,\x0a enterMode: 'flat',\x0a matchBrackets: true,\x0a electricChars: false\x0a\x09})>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_val",
- smalltalk.method({
- selector: "val",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@editor'], "_getValue", []);
- return $1;
- },
- args: [],
- source: "val\x0a ^editor getValue",
- messageSends: ["getValue"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addMethod(
- "_val_",
- smalltalk.method({
- selector: "val:",
- category: 'accessing',
- fn: function (aString) {
- var self = this;
- smalltalk.send(self['@editor'], "_setValue_", [aString]);
- return self;
- },
- args: ["aString"],
- source: "val: aString\x0a editor setValue: aString",
- messageSends: ["setValue:"],
- referencedClasses: []
- }),
- smalltalk.SourceArea);
- smalltalk.addClass('TabManager', smalltalk.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
- smalltalk.addMethod(
- "_addTab_",
- smalltalk.method({
- selector: "addTab:",
- category: 'adding/Removing',
- fn: function (aWidget) {
- var self = this;
- smalltalk.send(smalltalk.send(self, "_tabs", []), "_add_", [aWidget]);
- smalltalk.send(aWidget, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
- smalltalk.send(aWidget, "_hide", []);
- return self;
- },
- args: ["aWidget"],
- source: "addTab: aWidget\x0a self tabs add: aWidget.\x0a aWidget appendToJQuery: '#amber' asJQuery.\x0a aWidget hide",
- messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_close",
- smalltalk.method({
- selector: "close",
- category: 'actions',
- fn: function () {
- var self = this;
- if (smalltalk.assert(self['@opened'])) {
- smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_hide", []);
- smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_hide", []);
- smalltalk.send(self['@selectedTab'], "_hide", []);
- smalltalk.send(self, "_removeBodyMargin", []);
- smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_removeClass_", ["amberBody"]);
- self['@opened'] = false;
- self['@opened'];
- }
- return self;
- },
- args: [],
- source: "close\x0a opened 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]",
- messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_closeTab_",
- smalltalk.method({
- selector: "closeTab:",
- category: 'actions',
- fn: function (aWidget) {
- var self = this;
- smalltalk.send(self, "_removeTab_", [aWidget]);
- smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
- smalltalk.send(aWidget, "_remove", []);
- smalltalk.send(self, "_update", []);
- return self;
- },
- args: ["aWidget"],
- source: "closeTab: aWidget\x0a self removeTab: aWidget.\x0a self selectTab: self tabs last.\x0a aWidget remove.\x0a self update",
- messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- var $1, $2, $3;
- smalltalk.send(self, "_initialize", [], smalltalk.Widget);
- self['@opened'] = true;
- smalltalk.send(function (html) {return smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["amber"]);}, "_appendToJQuery_", [smalltalk.send("body", "_asJQuery", [])]);
- smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
- smalltalk.send(self, "_appendToJQuery_", [smalltalk.send("#amber", "_asJQuery", [])]);
- smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.IDETranscript || IDETranscript, "_current", [])]);
- smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.Workspace || Workspace, "_new", [])]);
- $1 = smalltalk.send(self, "_addTab_", [smalltalk.send(smalltalk.TestRunner || TestRunner, "_new", [])]);
- smalltalk.send(self, "_selectTab_", [smalltalk.send(smalltalk.send(self, "_tabs", []), "_last", [])]);
- smalltalk.send(self, "_onResize_", [function () {smalltalk.send(self, "_updateBodyMargin", []);$2 = smalltalk.send(self, "_updatePosition", []);return $2;}]);
- $3 = smalltalk.send(self, "_onWindowResize_", [function () {return smalltalk.send(self, "_updatePosition", []);}]);
- return self;
- },
- args: [],
- source: "initialize\x0a super initialize.\x0a opened := true.\x0a [:html | html div id: 'amber'] appendToJQuery: 'body' asJQuery.\x0a 'body' asJQuery \x0a\x09addClass: 'amberBody'.\x0a self appendToJQuery: '#amber' asJQuery.\x0a self \x0a\x09addTab: IDETranscript current;\x0a\x09addTab: Workspace new;\x0a\x09addTab: TestRunner new.\x0a self selectTab: self tabs last.\x0a self \x0a\x09onResize: [self updateBodyMargin; updatePosition];\x0a\x09onWindowResize: [self updatePosition]",
- messageSends: ["initialize", "appendToJQuery:", "asJQuery", "id:", "div", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"],
- referencedClasses: ["IDETranscript", "Workspace", "TestRunner"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_labelFor_",
- smalltalk.method({
- selector: "labelFor:",
- category: 'accessing',
- fn: function (aWidget) {
- var self = this;
- var $1;
- var label;
- var maxSize;
- maxSize = 15;
- label = smalltalk.send(smalltalk.send(aWidget, "_label", []), "_copyFrom_to_", [0, smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "_min_", [maxSize])]);
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(aWidget, "_label", []), "_size", []), "__gt", [maxSize]);
- if (smalltalk.assert($1)) {
- label = smalltalk.send(label, "__comma", ["..."]);
- }
- return label;
- },
- args: ["aWidget"],
- 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",
- messageSends: ["copyFrom:to:", "min:", "size", "label", "ifTrue:", ",", ">"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_newBrowserTab",
- smalltalk.method({
- selector: "newBrowserTab",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.Browser || Browser, "_open", []);
- return self;
- },
- args: [],
- source: "newBrowserTab\x0a Browser open",
- messageSends: ["open"],
- referencedClasses: ["Browser"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_onResize_",
- smalltalk.method({
- selector: "onResize:",
- category: 'actions',
- fn: function (aBlock) {
- var self = this;
- jQuery("#amber").resizable({handles: "n", resize: aBlock, minHeight: 230});
- return self;
- },
- args: ["aBlock"],
- source: "onResize: aBlock\x0a <jQuery('#amber').resizable({\x0a\x09handles: 'n', \x0a\x09resize: aBlock,\x0a\x09minHeight: 230\x0a})>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_onWindowResize_",
- smalltalk.method({
- selector: "onWindowResize:",
- category: 'actions',
- fn: function (aBlock) {
- var self = this;
- jQuery(window).resize(aBlock);
- return self;
- },
- args: ["aBlock"],
- source: "onWindowResize: aBlock\x0a <jQuery(window).resize(aBlock)>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'actions',
- fn: function () {
- var self = this;
- if (!smalltalk.assert(self['@opened'])) {
- smalltalk.send(smalltalk.send("body", "_asJQuery", []), "_addClass_", ["amberBody"]);
- smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_show", []);
- smalltalk.send(smalltalk.send(self['@ul'], "_asJQuery", []), "_show", []);
- smalltalk.send(self, "_updateBodyMargin", []);
- smalltalk.send(self['@selectedTab'], "_show", []);
- self['@opened'] = true;
- self['@opened'];
- }
- return self;
- },
- args: [],
- source: "open\x0a opened 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]",
- messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_removeBodyMargin",
- smalltalk.method({
- selector: "removeBodyMargin",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_setBodyMargin_", [0]);
- return self;
- },
- args: [],
- source: "removeBodyMargin\x0a self setBodyMargin: 0",
- messageSends: ["setBodyMargin:"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_removeTab_",
- smalltalk.method({
- selector: "removeTab:",
- category: 'adding/Removing',
- fn: function (aWidget) {
- var self = this;
- smalltalk.send(smalltalk.send(self, "_tabs", []), "_remove_", [aWidget]);
- smalltalk.send(self, "_update", []);
- return self;
- },
- args: ["aWidget"],
- source: "removeTab: aWidget\x0a self tabs remove: aWidget.\x0a self update",
- messageSends: ["remove:", "tabs", "update"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- smalltalk.send(smalltalk.send(html, "_div", []), "_id_", ["logo"]);
- smalltalk.send(self, "_renderToolbarOn_", [html]);
- $1 = smalltalk.send(html, "_ul", []);
- smalltalk.send($1, "_id_", ["amberTabs"]);
- $2 = smalltalk.send($1, "_yourself", []);
- self['@ul'] = $2;
- smalltalk.send(self, "_renderTabs", []);
- return self;
- },
- args: ["html"],
- 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",
- messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderTabFor_on_",
- smalltalk.method({
- selector: "renderTabFor:on:",
- category: 'rendering',
- fn: function (aWidget, html) {
- var self = this;
- var $1, $2, $4, $5, $6, $3, $7;
- var li;
- li = smalltalk.send(html, "_li", []);
- $1 = smalltalk.send(self['@selectedTab'], "__eq", [aWidget]);
- if (smalltalk.assert($1)) {
- smalltalk.send(li, "_class_", ["selected"]);
- }
- smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", [function () {$4 = smalltalk.send(aWidget, "_canBeClosed", []);if (smalltalk.assert($4)) {$5 = smalltalk.send(html, "_span", []);smalltalk.send($5, "_class_", ["close"]);smalltalk.send($5, "_with_", ["x"]);$6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_closeTab_", [aWidget]);}]);$6;}return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_labelFor_", [aWidget])]);}]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);
- $7 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [aWidget]);}]);
- return self;
- },
- args: ["aWidget", "html"],
- 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]",
- messageSends: ["li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "closeTab:", "canBeClosed", "labelFor:", "selectTab:"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderTabs",
- smalltalk.method({
- selector: "renderTabs",
- category: 'rendering',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4;
- smalltalk.send(self['@ul'], "_contents_", [function (html) {smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {return smalltalk.send(self, "_renderTabFor_on_", [each, html]);}]);$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["newtab"]);smalltalk.send($1, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", [" + "]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$4 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_newBrowserTab", []);}]);return $4;}]);
- return self;
- },
- args: [],
- source: "renderTabs\x0a\x09ul contents: [:html |\x0a\x09 self tabs do: [:each |\x0a\x09\x09self renderTabFor: each on: html].\x0a\x09 html 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]]",
- messageSends: ["contents:", "do:", "renderTabFor:on:", "tabs", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_renderToolbarOn_",
- smalltalk.method({
- selector: "renderToolbarOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $3, $4, $5, $6, $7, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_id_", ["amber_toolbar"]);
- $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_input", []);smalltalk.send($3, "_class_", ["implementors"]);$4 = smalltalk.send($3, "_yourself", []);self['@input'] = $4;self['@input'];smalltalk.send(self['@input'], "_onKeyPress_", [function (event) {$5 = smalltalk.send(smalltalk.send(event, "_keyCode", []), "__eq", [13]);if (smalltalk.assert($5)) {return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}}]);$6 = smalltalk.send(html, "_div", []);smalltalk.send($6, "_id_", ["amber_close"]);$7 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);return $7;}]);
- return self;
- },
- args: ["html"],
- 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]]",
- messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "search:", "val", "asJQuery", "=", "keyCode", "onClick:", "close"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1;
- var searchedClass;
- searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
- $1 = smalltalk.send(searchedClass, "_isClass", []);
- if (smalltalk.assert($1)) {
- smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [searchedClass]);
- } else {
- smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
- }
- return self;
- },
- args: ["aString"],
- source: "search: aString\x0a\x09| searchedClass |\x0a\x09searchedClass := Smalltalk current at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [Browser openOn: searchedClass]\x0a\x09\x09\x09ifFalse: [ReferencesBrowser search: aString]",
- messageSends: ["at:", "current", "ifTrue:ifFalse:", "openOn:", "search:", "isClass"],
- referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_selectTab_",
- smalltalk.method({
- selector: "selectTab:",
- category: 'actions',
- fn: function (aWidget) {
- var self = this;
- smalltalk.send(self, "_open", []);
- self['@selectedTab'] = aWidget;
- smalltalk.send(smalltalk.send(self, "_tabs", []), "_do_", [function (each) {return smalltalk.send(each, "_hide", []);}]);
- smalltalk.send(aWidget, "_show", []);
- smalltalk.send(self, "_update", []);
- return self;
- },
- args: ["aWidget"],
- source: "selectTab: aWidget\x0a self open.\x0a selectedTab := aWidget.\x0a self tabs do: [:each |\x0a\x09each hide].\x0a aWidget show.\x0a\x09\x0a self update",
- messageSends: ["open", "do:", "hide", "tabs", "show", "update"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_setBodyMargin_",
- smalltalk.method({
- selector: "setBodyMargin:",
- category: 'actions',
- fn: function (anInteger) {
- var self = this;
- smalltalk.send(smalltalk.send(".amberBody", "_asJQuery", []), "_css_put_", ["margin-bottom", smalltalk.send(smalltalk.send(anInteger, "_asString", []), "__comma", ["px"])]);
- return self;
- },
- args: ["anInteger"],
- source: "setBodyMargin: anInteger\x0a '.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
- messageSends: ["css:put:", ",", "asString", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_tabs",
- smalltalk.method({
- selector: "tabs",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@tabs']) == nil || $receiver == undefined) {
- self['@tabs'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@tabs'];
- } else {
- $1 = self['@tabs'];
- }
- return $1;
- },
- args: [],
- source: "tabs\x0a ^tabs ifNil: [tabs := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_update",
- smalltalk.method({
- selector: "update",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_renderTabs", []);
- return self;
- },
- args: [],
- source: "update\x0a\x09self renderTabs",
- messageSends: ["renderTabs"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_updateBodyMargin",
- smalltalk.method({
- selector: "updateBodyMargin",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_setBodyMargin_", [smalltalk.send(smalltalk.send("#amber", "_asJQuery", []), "_height", [])]);
- return self;
- },
- args: [],
- source: "updateBodyMargin\x0a self setBodyMargin: '#amber' asJQuery height",
- messageSends: ["setBodyMargin:", "height", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.addMethod(
- "_updatePosition",
- smalltalk.method({
- selector: "updatePosition",
- category: 'actions',
- fn: function () {
- var self = this;
- jQuery("#amber").css("top", "").css("bottom", "0px");
- return self;
- },
- args: [],
- source: "updatePosition\x0a <jQuery('#amber').css('top', '').css('bottom', '0px')>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabManager);
- smalltalk.TabManager.klass.iVarNames = ['current'];
- smalltalk.addMethod(
- "_current",
- smalltalk.method({
- selector: "current",
- category: 'instance creation',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@current']) == nil || $receiver == undefined) {
- self['@current'] = smalltalk.send(self, "_new", [], smalltalk.Widget.klass);
- $1 = self['@current'];
- } else {
- $1 = self['@current'];
- }
- return $1;
- },
- args: [],
- source: "current\x0a ^current ifNil: [current := super new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: []
- }),
- smalltalk.TabManager.klass);
- smalltalk.addMethod(
- "_new",
- smalltalk.method({
- selector: "new",
- category: 'instance creation',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_shouldNotImplement", []);
- return self;
- },
- args: [],
- source: "new\x0a self shouldNotImplement",
- messageSends: ["shouldNotImplement"],
- referencedClasses: []
- }),
- smalltalk.TabManager.klass);
- smalltalk.addClass('TabWidget', smalltalk.Widget, ['div'], 'IDE');
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function () {
- var self = this;
- return false;
- },
- args: [],
- source: "canBeClosed\x0a ^false",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_close",
- smalltalk.method({
- selector: "close",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_closeTab_", [self]);
- return self;
- },
- args: [],
- source: "close\x0a TabManager current closeTab: self",
- messageSends: ["closeTab:", "current"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_hide",
- smalltalk.method({
- selector: "hide",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_hide", []);
- return self;
- },
- args: [],
- source: "hide\x0a\x09div asJQuery hide",
- messageSends: ["hide", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_subclassResponsibility", []);
- return self;
- },
- args: [],
- source: "label\x0a self subclassResponsibility",
- messageSends: ["subclassResponsibility"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_addTab_", [self]);
- smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_selectTab_", [self]);
- return self;
- },
- args: [],
- source: "open\x0a TabManager current addTab: self.\x0a TabManager current selectTab: self",
- messageSends: ["addTab:", "current", "selectTab:"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_remove",
- smalltalk.method({
- selector: "remove",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_remove", []);
- return self;
- },
- args: [],
- source: "remove\x0a\x09div asJQuery remove",
- messageSends: ["remove", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- return self;
- },
- args: ["html"],
- source: "renderButtonsOn: html",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["amberTool"]);
- $2 = smalltalk.send($1, "_yourself", []);
- self['@div'] = $2;
- smalltalk.send(self, "_renderTab", []);
- return self;
- },
- args: ["html"],
- source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
- messageSends: ["class:", "div", "yourself", "renderTab"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_renderTab",
- smalltalk.method({
- selector: "renderTab",
- category: 'rendering',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4;
- smalltalk.send(self['@div'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_div", []);smalltalk.send($1, "_class_", ["amber_box"]);$2 = smalltalk.send($1, "_with_", [function () {return smalltalk.send(self, "_renderBoxOn_", [html]);}]);$2;$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["amber_buttons"]);$4 = smalltalk.send($3, "_with_", [function () {return smalltalk.send(self, "_renderButtonsOn_", [html]);}]);return $4;}]);
- return self;
- },
- args: [],
- source: "renderTab\x0a\x09div contents: [:html |\x0a\x09 html div\x0a\x09\x09class: 'amber_box';\x0a\x09\x09with: [self renderBoxOn: html].\x0a\x09 html div\x0a\x09\x09class: 'amber_buttons';\x0a\x09\x09with: [self renderButtonsOn: html]]",
- messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_show",
- smalltalk.method({
- selector: "show",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@div'], "_asJQuery", []), "_show", []);
- return self;
- },
- args: [],
- source: "show\x0a\x09div asJQuery show",
- messageSends: ["show", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_update",
- smalltalk.method({
- selector: "update",
- category: 'rendering',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_renderTab", []);
- return self;
- },
- args: [],
- source: "update\x0a\x09self renderTab",
- messageSends: ["renderTab"],
- referencedClasses: []
- }),
- smalltalk.TabWidget);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'instance creation',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
- return $1;
- },
- args: [],
- source: "open\x0a ^self new open",
- messageSends: ["open", "new"],
- referencedClasses: []
- }),
- smalltalk.TabWidget.klass);
- smalltalk.addClass('Browser', smalltalk.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
- smalltalk.addMethod(
- "_addInstanceVariableNamed_toClass_",
- smalltalk.method({
- selector: "addInstanceVariableNamed:toClass:",
- category: 'actions',
- fn: function (aString, aClass) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(smalltalk.send(aClass, "_instanceVariableNames", []), "_copy", []);
- smalltalk.send($1, "_add_", [aString]);
- $2 = smalltalk.send($1, "_yourself", []);
- smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_addSubclassOf_named_instanceVariableNames_package_", [smalltalk.send(aClass, "_superclass", []), smalltalk.send(aClass, "_name", []), $2, smalltalk.send(smalltalk.send(aClass, "_package", []), "_name", [])]);
- return self;
- },
- args: ["aString", "aClass"],
- 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",
- messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package", "new"],
- referencedClasses: ["ClassBuilder"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_addNewClass",
- smalltalk.method({
- selector: "addNewClass",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- var className;
- className = smalltalk.send(window, "_prompt_", ["New class"]);
- $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
- if (smalltalk.assert($1)) {
- smalltalk.send(smalltalk.Object || Object, "_subclass_instanceVariableNames_package_", [className, "", smalltalk.send(self, "_selectedPackage", [])]);
- smalltalk.send(self, "_resetClassesList", []);
- $2 = smalltalk.send(self, "_updateClassesList", []);
- smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
- }
- return self;
- },
- args: [],
- source: "addNewClass\x0a\x09| className |\x0a\x09className := window prompt: 'New class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09Object subclass: className instanceVariableNames: '' package: self selectedPackage.\x0a \x09 self \x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
- messageSends: ["prompt:", "ifTrue:", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
- referencedClasses: ["Object", "Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_addNewProtocol",
- smalltalk.method({
- selector: "addNewProtocol",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- var newProtocol;
- newProtocol = smalltalk.send(window, "_prompt_", ["New method protocol"]);
- $1 = smalltalk.send(smalltalk.send(newProtocol, "_notNil", []), "_and_", [function () {return smalltalk.send(newProtocol, "_notEmpty", []);}]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self['@selectedMethod'], "_category_", [newProtocol]);
- smalltalk.send(self, "_setMethodProtocol_", [newProtocol]);
- }
- return self;
- },
- args: [],
- source: "addNewProtocol\x0a | newProtocol |\x0a newProtocol := window prompt: 'New method protocol'.\x0a (newProtocol notNil and: [newProtocol notEmpty]) ifTrue: [\x0a\x09selectedMethod category: newProtocol.\x0a\x09self setMethodProtocol: newProtocol]",
- messageSends: ["prompt:", "ifTrue:", "category:", "setMethodProtocol:", "and:", "notEmpty", "notNil"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_ajaxPutAt_data_",
- smalltalk.method({
- selector: "ajaxPutAt:data:",
- category: 'network',
- fn: function (aURL,aString){
- var self=this;
- smalltalk.send(jQuery,"_ajax_options_",[aURL,smalltalk.HashedCollection._fromPairs_([smalltalk.send("type","__minus_gt",["PUT"]),smalltalk.send("data","__minus_gt",[aString]),smalltalk.send("contentType","__minus_gt",["text/plain;charset=UTF-8"]),smalltalk.send("error","__minus_gt",[(function(xhr){
- return smalltalk.send(window,"_alert_",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send("Commiting ","__comma",[aURL]),"__comma",[" failed with reason: \x22"]),"__comma",[smalltalk.send(xhr,"_responseText",[])]),"__comma",["\x22"])]);
- })])])]);
- return self},
- args: ["aURL", "aString"],
- source: "ajaxPutAt: aURL data: aString\x0a\x09jQuery\x0a\x09\x09ajax: aURL\x09options: #{\x09'type' -> 'PUT'.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'data' -> aString.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'contentType' -> 'text/plain;charset=UTF-8'.\x0a\x09\x09\x09\x09\x09\x09\x09\x09'error' -> [:xhr | window alert: 'Commiting ' , aURL , ' failed with reason: \x22' , (xhr responseText) , '\x22'] }",
- messageSends: ["ajax:options:", "->", "alert:", ",", "responseText"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function () {
- var self = this;
- return true;
- },
- args: [],
- source: "canBeClosed\x0a\x09^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_cancelChanges",
- smalltalk.method({
- selector: "cancelChanges",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- if (smalltalk.assert(self['@unsavedChanges'])) {
- $1 = smalltalk.send(window, "_confirm_", ["Cancel changes?"]);
- } else {
- $1 = true;
- }
- return $1;
- },
- args: [],
- source: "cancelChanges\x0a ^unsavedChanges \x0a\x09ifTrue: [window confirm: 'Cancel changes?']\x0a\x09ifFalse: [true]",
- messageSends: ["ifTrue:ifFalse:", "confirm:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classCommentSource",
- smalltalk.method({
- selector: "classCommentSource",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@selectedClass'], "_comment", []);
- return $1;
- },
- args: [],
- source: "classCommentSource\x0a ^selectedClass comment",
- messageSends: ["comment"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classDeclarationSource",
- smalltalk.method({
- selector: "classDeclarationSource",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4;
- var stream;
- stream = smalltalk.send("", "_writeStream", []);
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- $1 = smalltalk.send(self, "_classDeclarationTemplate", []);
- return $1;
- } else {
- self['@selectedClass'];
- }
- smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(self['@selectedClass'], "_superclass", []), "_asString", [])]);
- smalltalk.send(stream, "_nextPutAll_", [" subclass: #"]);
- smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
- smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send(smalltalk.String || String, "_lf", []), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
- $2 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
- smalltalk.send(smalltalk.send(self['@selectedClass'], "_instanceVariableNames", []), "_do_separatedBy_", [function (each) {return smalltalk.send(stream, "_nextPutAll_", [each]);}, function () {return smalltalk.send(stream, "_nextPutAll_", [" "]);}]);
- smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(smalltalk.send("'", "__comma", [smalltalk.send(smalltalk.String || String, "_lf", [])]), "__comma", [smalltalk.send(smalltalk.String || String, "_tab", [])])]);
- smalltalk.send(stream, "_nextPutAll_", ["package: '"]);
- smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_category", [])]);
- $3 = smalltalk.send(stream, "_nextPutAll_", ["'"]);
- $4 = smalltalk.send(stream, "_contents", []);
- return $4;
- },
- args: [],
- source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [^self classDeclarationTemplate].\x0a\x09stream \x0a\x09 nextPutAll: selectedClass superclass asString;\x0a\x09 nextPutAll: ' subclass: #';\x0a\x09 nextPutAll: selectedClass name;\x0a\x09 nextPutAll: String lf, String tab;\x0a\x09 nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames \x0a\x09 do: [:each | stream nextPutAll: each] \x0a\x09 separatedBy: [stream nextPutAll: ' '].\x0a\x09stream\x0a\x09 nextPutAll: '''', String lf, String tab;\x0a\x09 nextPutAll: 'package: ''';\x0a\x09 nextPutAll: selectedClass category;\x0a\x09 nextPutAll: ''''.\x0a\x09^stream contents",
- messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "tab", "lf", "do:separatedBy:", "instanceVariableNames", "category", "contents"],
- referencedClasses: ["String"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classDeclarationTemplate",
- smalltalk.method({
- selector: "classDeclarationTemplate",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send("Object subclass: #NameOfSubclass\n\tinstanceVariableNames: ''\n\tpackage: '", "__comma", [smalltalk.send(self, "_selectedPackage", [])]), "__comma", ["'"]);
- return $1;
- },
- args: [],
- source: "classDeclarationTemplate\x0a\x09^'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
- messageSends: [",", "selectedPackage"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_classes",
- smalltalk.method({
- selector: "classes",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedPackage']]);}]), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__lt", [smalltalk.send(b, "_name", [])]);}]), "_asSet", []);
- return $1;
- },
- args: [],
- source: "classes\x0a ^((Smalltalk current classes \x0a\x09select: [:each | each category = selectedPackage])\x0a\x09sort: [:a :b | a name < b name]) asSet",
- messageSends: ["asSet", "sort:", "<", "name", "select:", "=", "category", "classes", "current"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_commitPackage",
- smalltalk.method({
- selector: "commitPackage",
- category: 'actions',
- fn: function (){
- var self=this;
- if(($receiver = self["@selectedPackage"]) == nil || $receiver == undefined){
- self["@selectedPackage"];
- } else {
- var package;
- package=smalltalk.send((smalltalk.Package || Package),"_named_",[self["@selectedPackage"]]);
- package;
- smalltalk.send([smalltalk.send((smalltalk.Exporter || Exporter),"__minus_gt",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package,"_commitPathJs",[]),"__comma",["/"]),"__comma",[self["@selectedPackage"]]),"__comma",[".js"])]),smalltalk.send((smalltalk.StrippedExporter || StrippedExporter),"__minus_gt",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package,"_commitPathJs",[]),"__comma",["/"]),"__comma",[self["@selectedPackage"]]),"__comma",[".deploy.js"])]),smalltalk.send((smalltalk.ChunkExporter || ChunkExporter),"__minus_gt",[smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(package,"_commitPathSt",[]),"__comma",["/"]),"__comma",[self["@selectedPackage"]]),"__comma",[".st"])])],"_do_",[(function(commitStrategy){
- var fileContents;
- fileContents=smalltalk.send(smalltalk.send(smalltalk.send(commitStrategy,"_key",[]),"_new",[]),"_exportPackage_",[self["@selectedPackage"]]);
- fileContents;
- return smalltalk.send(self,"_ajaxPutAt_data_",[smalltalk.send(commitStrategy,"_value",[]),fileContents]);
- })]);
- };
- return self},
- args: [],
- source: "commitPackage\x0a\x09selectedPackage ifNotNil: [ |package|\x0a\x09\x09package := Package named: selectedPackage.\x0a\x09\x09{ \x09Exporter -> (package commitPathJs, '/', selectedPackage, '.js').\x0a\x09\x09\x09StrippedExporter -> (package commitPathJs, '/', selectedPackage, '.deploy.js').\x0a\x09\x09\x09ChunkExporter -> (package commitPathSt, '/', selectedPackage, '.st')\x0a\x09\x09} do: [:commitStrategy| |fileContents|\x0a\x09\x09\x09fileContents := (commitStrategy key new exportPackage: selectedPackage).\x0a\x09\x09\x09self ajaxPutAt: commitStrategy value data: fileContents\x0a \x09\x09]\x0a\x09]",
- messageSends: ["ifNotNil:", "named:", "do:", "exportPackage:", "new", "key", "ajaxPutAt:data:", "value", "->", ",", "commitPathJs", "commitPathSt"],
- referencedClasses: ["Package", "Exporter", "StrippedExporter", "ChunkExporter"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compile",
- smalltalk.method({
- selector: "compile",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- var currentEditLine;
- smalltalk.send(self, "_disableSaveButton", []);
- currentEditLine = smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_getCursor", []);
- $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
- if (smalltalk.assert($1)) {
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- self['@selectedClass'];
- } else {
- smalltalk.send(self, "_compileClassComment", []);
- }
- } else {
- $2 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
- if (smalltalk.assert($2)) {
- smalltalk.send(self, "_compileMethodDefinition", []);
- } else {
- smalltalk.send(self, "_compileDefinition", []);
- }
- }
- smalltalk.send(smalltalk.send(self['@sourceArea'], "_editor", []), "_setCursor_", [currentEditLine]);
- return self;
- },
- args: [],
- source: "compile\x0a | currentEditLine |\x0a self disableSaveButton.\x0a currentEditLine := sourceArea editor getCursor.\x0a selectedTab = #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 sourceArea editor setCursor: currentEditLine.",
- messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "compileDefinition", "compileMethodDefinition", "or:", "notNil", "=", "setCursor:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileClassComment",
- smalltalk.method({
- selector: "compileClassComment",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@selectedClass'], "_comment_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
- return self;
- },
- args: [],
- source: "compileClassComment\x0a selectedClass comment: sourceArea val",
- messageSends: ["comment:", "val"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileDefinition",
- smalltalk.method({
- selector: "compileDefinition",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- var newClass;
- newClass = smalltalk.send(smalltalk.send(smalltalk.Compiler || Compiler, "_new", []), "_evaluateExpression_", [smalltalk.send(self['@sourceArea'], "_val", [])]);
- smalltalk.send(self, "_resetClassesList", []);
- smalltalk.send(self, "_updateCategoriesList", []);
- $1 = smalltalk.send(self, "_updateClassesList", []);
- smalltalk.send(self, "_selectClass_", [newClass]);
- return self;
- },
- args: [],
- source: "compileDefinition\x0a | newClass |\x0a newClass := Compiler new evaluateExpression: sourceArea val.\x0a self \x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a self selectClass: newClass",
- messageSends: ["evaluateExpression:", "val", "new", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"],
- referencedClasses: ["Compiler"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileMethodDefinition",
- smalltalk.method({
- selector: "compileMethodDefinition",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self, "_compileMethodDefinitionFor_", [self['@selectedClass']]);
- } else {
- smalltalk.send(self, "_compileMethodDefinitionFor_", [smalltalk.send(self['@selectedClass'], "_class", [])]);
- }
- return self;
- },
- args: [],
- source: "compileMethodDefinition\x0a selectedTab = #instance\x0a\x09ifTrue: [self compileMethodDefinitionFor: selectedClass]\x0a\x09ifFalse: [self compileMethodDefinitionFor: selectedClass class]",
- messageSends: ["ifTrue:ifFalse:", "compileMethodDefinitionFor:", "class", "="],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_compileMethodDefinitionFor_",
- smalltalk.method({
- selector: "compileMethodDefinitionFor:",
- category: 'actions',
- fn: function (aClass) {
- var self = this;
- var $1, $2, $3, $4, $5;
- var $early = {};
- try {
- var compiler;
- var method;
- var source;
- var node;
- source = smalltalk.send(self['@sourceArea'], "_val", []);
- if (($receiver = self['@selectedProtocol']) == nil ||
- $receiver == undefined) {
- self['@selectedProtocol'] = smalltalk.send(self['@selectedMethod'], "_category", []);
- self['@selectedProtocol'];
- } else {
- self['@selectedProtocol'];
- }
- compiler = smalltalk.send(smalltalk.Compiler || Compiler, "_new", []);
- smalltalk.send(compiler, "_source_", [source]);
- node = smalltalk.send(compiler, "_parse_", [source]);
- $1 = smalltalk.send(node, "_isParseFailure", []);
- if (smalltalk.assert($1)) {
- $2 = smalltalk.send(window, "_alert_", [smalltalk.send(smalltalk.send(smalltalk.send("PARSE ERROR: ", "__comma", [smalltalk.send(node, "_reason", [])]), "__comma", [", position: "]), "__comma", [smalltalk.send(smalltalk.send(node, "_position", []), "_asString", [])])]);
- return $2;
- }
- smalltalk.send(compiler, "_currentClass_", [aClass]);
- method = smalltalk.send(compiler, "_eval_", [smalltalk.send(compiler, "_compileNode_", [node])]);
- smalltalk.send(method, "_category_", [self['@selectedProtocol']]);
- smalltalk.send(smalltalk.send(compiler, "_unknownVariables", []), "_do_", [function (each) {$3 = smalltalk.send(window, "_at_", [each]);if (($receiver = $3) == nil || $receiver == undefined) {$4 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Declare '", "__comma", [each]), "__comma", ["' as instance variable?"])]);if (smalltalk.assert($4)) {smalltalk.send(self, "_addInstanceVariableNamed_toClass_", [each, aClass]);$5 = smalltalk.send(self, "_compileMethodDefinitionFor_", [aClass]);throw $early = [$5];}} else {return $3;}}]);
- smalltalk.send(aClass, "_addCompiledMethod_", [method]);
- smalltalk.send(compiler, "_setupClass_", [aClass]);
- smalltalk.send(self, "_updateMethodsList", []);
- smalltalk.send(self, "_selectMethod_", [method]);
- return self;
- } catch (e) {
- if (e === $early) {
- return e[0];
- }
- throw e;
- }
- },
- args: ["aClass"],
- source: "compileMethodDefinitionFor: aClass\x0a | compiler method source node | \x0a source := sourceArea val.\x0a selectedProtocol ifNil: [selectedProtocol := selectedMethod category].\x0a compiler := Compiler new.\x0a compiler source: source.\x0a node := compiler parse: source.\x0a node isParseFailure ifTrue: [\x0a\x09^window alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString].\x0a compiler currentClass: aClass.\x0a method := compiler eval: (compiler compileNode: node).\x0a method category: selectedProtocol.\x0a compiler unknownVariables do: [:each |\x0a \x22Do not try to redeclare javascript's objects\x22\x0a (window at: each) ifNil: [\x0a\x09 \x09(window confirm: 'Declare ''', each, ''' as instance variable?') ifTrue: [\x0a\x09\x09\x09self addInstanceVariableNamed: each toClass: aClass.\x0a\x09\x09\x09^self compileMethodDefinitionFor: aClass]]].\x0a aClass addCompiledMethod: method.\x0a compiler setupClass: aClass.\x0a self updateMethodsList.\x0a self selectMethod: method",
- messageSends: ["val", "ifNil:", "category", "new", "source:", "parse:", "ifTrue:", "alert:", ",", "asString", "position", "reason", "isParseFailure", "currentClass:", "eval:", "compileNode:", "category:", "do:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "confirm:", "at:", "unknownVariables", "addCompiledMethod:", "setupClass:", "updateMethodsList", "selectMethod:"],
- referencedClasses: ["Compiler"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_copyClass",
- smalltalk.method({
- selector: "copyClass",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- var className;
- className = smalltalk.send(window, "_prompt_", ["Copy class"]);
- $1 = smalltalk.send(smalltalk.send(className, "_notNil", []), "_and_", [function () {return smalltalk.send(className, "_notEmpty", []);}]);
- if (smalltalk.assert($1)) {
- smalltalk.send(smalltalk.send(smalltalk.ClassBuilder || ClassBuilder, "_new", []), "_copyClass_named_", [smalltalk.send(self, "_selectedClass", []), className]);
- smalltalk.send(self, "_resetClassesList", []);
- $2 = smalltalk.send(self, "_updateClassesList", []);
- smalltalk.send(self, "_selectClass_", [smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [className])]);
- }
- return self;
- },
- args: [],
- source: "copyClass\x0a\x09| className |\x0a\x09className := window prompt: 'Copy class'.\x0a\x09(className notNil and: [className notEmpty]) ifTrue: [\x0a\x09\x09ClassBuilder new copyClass: self selectedClass named: className.\x0a \x09 self \x0a\x09\x09\x09resetClassesList;\x0a\x09\x09\x09updateClassesList.\x0a\x09\x09self selectClass: (Smalltalk current at: className)]",
- messageSends: ["prompt:", "ifTrue:", "copyClass:named:", "selectedClass", "new", "resetClassesList", "updateClassesList", "selectClass:", "at:", "current", "and:", "notEmpty", "notNil"],
- referencedClasses: ["ClassBuilder", "Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_declarationSource",
- smalltalk.method({
- selector: "declarationSource",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $2, $1;
- $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
- if (smalltalk.assert($2)) {
- $1 = smalltalk.send(self, "_classDeclarationSource", []);
- } else {
- $1 = smalltalk.send(self, "_metaclassDeclarationSource", []);
- }
- return $1;
- },
- args: [],
- source: "declarationSource\x0a ^selectedTab = #instance\x0a\x09ifTrue: [self classDeclarationSource]\x0a\x09ifFalse: [self metaclassDeclarationSource]",
- messageSends: ["ifTrue:ifFalse:", "classDeclarationSource", "metaclassDeclarationSource", "="],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_disableSaveButton",
- smalltalk.method({
- selector: "disableSaveButton",
- category: 'actions',
- fn: function () {
- var self = this;
- if (($receiver = self['@saveButton']) == nil || $receiver == undefined) {
- self['@saveButton'];
- } else {
- smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
- }
- self['@unsavedChanges'] = false;
- return self;
- },
- args: [],
- source: "disableSaveButton\x0a saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true].\x0a unsavedChanges := false",
- messageSends: ["ifNotNil:", "at:put:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_dummyMethodSource",
- smalltalk.method({
- selector: "dummyMethodSource",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "messageSelectorAndArgumentNames\n\t\"comment stating purpose of message\"\n\n\t| temporary variable names |\n\tstatements";
- },
- args: [],
- source: "dummyMethodSource\x0a ^'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_handleSourceAreaKeyDown_",
- smalltalk.method({
- selector: "handleSourceAreaKeyDown:",
- category: 'actions',
- fn: function (anEvent) {
- var self = this;
- if (anEvent.ctrlKey) {
- if (anEvent.keyCode === 83) {
- self._compile();
- anEvent.preventDefault();
- return false;
- }
- }
- return self;
- },
- args: ["anEvent"],
- 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>",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_hideClassButtons",
- smalltalk.method({
- selector: "hideClassButtons",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_hide", []);
- return self;
- },
- args: [],
- source: "hideClassButtons\x0a classButtons asJQuery hide",
- messageSends: ["hide", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_hideMethodButtons",
- smalltalk.method({
- selector: "hideMethodButtons",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_hide", []);
- return self;
- },
- args: [],
- source: "hideMethodButtons\x0a methodButtons asJQuery hide",
- messageSends: ["hide", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
- self['@selectedTab'] = smalltalk.symbolFor("instance");
- self['@selectedPackage'] = smalltalk.send(smalltalk.send(self, "_packages", []), "_first", []);
- self['@unsavedChanges'] = false;
- return self;
- },
- args: [],
- source: "initialize\x0a super initialize.\x0a selectedTab := #instance.\x0a selectedPackage := self packages first.\x0a unsavedChanges := false",
- messageSends: ["initialize", "first", "packages"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- $1 = "Browser (nil)";
- } else {
- $1 = smalltalk.send("Browser: ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]);
- }
- return $1;
- },
- args: [],
- source: "label\x0a ^selectedClass \x0a\x09ifNil: ['Browser (nil)']\x0a\x09ifNotNil: ['Browser: ', selectedClass name]",
- messageSends: ["ifNil:ifNotNil:", ",", "name"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_metaclassDeclarationSource",
- smalltalk.method({
- selector: "metaclassDeclarationSource",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2;
- var stream;
- stream = smalltalk.send("", "_writeStream", []);
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- self['@selectedClass'];
- } else {
- smalltalk.send(stream, "_nextPutAll_", [smalltalk.send(self['@selectedClass'], "_asString", [])]);
- smalltalk.send(stream, "_nextPutAll_", [" class "]);
- $1 = smalltalk.send(stream, "_nextPutAll_", ["instanceVariableNames: '"]);
- smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_instanceVariableNames", []), "_do_separatedBy_", [function (each) {return smalltalk.send(stream, "_nextPutAll_", [each]);}, function () {return smalltalk.send(stream, "_nextPutAll_", [" "]);}]);
- smalltalk.send(stream, "_nextPutAll_", ["'"]);
- }
- $2 = smalltalk.send(stream, "_contents", []);
- return $2;
- },
- args: [],
- source: "metaclassDeclarationSource\x0a | stream |\x0a stream := '' writeStream.\x0a selectedClass ifNotNil: [\x0a\x09stream \x0a\x09 nextPutAll: selectedClass asString;\x0a\x09 nextPutAll: ' class ';\x0a\x09 nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09 do: [:each | stream nextPutAll: each]\x0a\x09 separatedBy: [stream nextPutAll: ' '].\x0a\x09stream nextPutAll: ''''].\x0a ^stream contents",
- messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_methodSource",
- smalltalk.method({
- selector: "methodSource",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@selectedMethod']) == nil ||
- $receiver == undefined) {
- $1 = smalltalk.send(self, "_dummyMethodSource", []);
- } else {
- $1 = smalltalk.send(self['@selectedMethod'], "_source", []);
- }
- return $1;
- },
- args: [],
- source: "methodSource\x0a ^selectedMethod\x0a\x09ifNil: [self dummyMethodSource]\x0a\x09ifNotNil: [selectedMethod source]",
- messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_methods",
- smalltalk.method({
- selector: "methods",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2, $4, $3;
- var klass;
- $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
- if (smalltalk.assert($1)) {
- return [];
- }
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- self['@selectedClass'];
- } else {
- $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
- if (smalltalk.assert($2)) {
- klass = self['@selectedClass'];
- } else {
- klass = smalltalk.send(self['@selectedClass'], "_class", []);
- }
- }
- if (($receiver = self['@selectedProtocol']) == nil ||
- $receiver == undefined) {
- if (($receiver = klass) == nil || $receiver == undefined) {
- $4 = [];
- } else {
- $4 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []);
- }
- } else {
- $4 = smalltalk.send(smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_values", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_category", []), "__eq", [self['@selectedProtocol']]);}]);
- }
- $3 = smalltalk.send($4, "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_selector", []), "__lt", [smalltalk.send(b, "_selector", [])]);}]);
- return $3;
- },
- args: [],
- source: "methods\x0a | klass |\x0a selectedTab = #comment ifTrue: [^#()].\x0a selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09 ifTrue: [selectedClass]\x0a\x09 ifFalse: [selectedClass class]].\x0a ^(selectedProtocol \x0a\x09ifNil: [\x0a\x09 klass \x0a\x09\x09ifNil: [#()] \x0a\x09\x09ifNotNil: [klass methodDictionary values]]\x0a\x09ifNotNil: [\x0a\x09 klass methodDictionary values select: [:each |\x0a\x09\x09each category = selectedProtocol]]) sort: [:a :b | a selector < b selector]",
- messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "<", "selector", "ifNil:ifNotNil:", "values", "methodDictionary", "select:", "category"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2;
- var packages;
- packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
- smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_do_", [function (each) {$1 = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])]);if (!smalltalk.assert($1)) {return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);}}]);
- $2 = smalltalk.send(packages, "_sort", []);
- return $2;
- },
- args: [],
- source: "packages\x0a | packages |\x0a packages := Array new.\x0a Smalltalk current classes do: [:each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09 packages add: each category]].\x0a ^packages sort",
- messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "classes", "current", "sort"],
- referencedClasses: ["Array", "Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_protocols",
- smalltalk.method({
- selector: "protocols",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4, $5, $6;
- var klass;
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- self['@selectedClass'];
- } else {
- $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
- if (smalltalk.assert($1)) {
- return [];
- }
- $2 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
- if (smalltalk.assert($2)) {
- klass = self['@selectedClass'];
- } else {
- klass = smalltalk.send(self['@selectedClass'], "_class", []);
- }
- $3 = smalltalk.send(smalltalk.send(klass, "_methodDictionary", []), "_isEmpty", []);
- if (smalltalk.assert($3)) {
- $4 = smalltalk.send(smalltalk.Array || Array, "_with_", ["not yet classified"]);
- return $4;
- }
- $5 = smalltalk.send(klass, "_protocols", []);
- return $5;
- }
- $6 = smalltalk.send(smalltalk.Array || Array, "_new", []);
- return $6;
- },
- args: [],
- source: "protocols\x0a | klass |\x0a selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [^#()].\x0a\x09klass := selectedTab = #instance\x0a\x09 ifTrue: [selectedClass]\x0a\x09 ifFalse: [selectedClass class].\x0a\x09klass methodDictionary isEmpty ifTrue: [\x0a\x09 ^Array with: 'not yet classified'].\x0a\x09^klass protocols].\x0a ^Array new",
- messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "with:", "isEmpty", "methodDictionary", "protocols", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_removeClass",
- smalltalk.method({
- selector: "removeClass",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])]), "__comma", ["?"])]);
- if (smalltalk.assert($1)) {
- smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removeClass_", [self['@selectedClass']]);
- smalltalk.send(self, "_resetClassesList", []);
- smalltalk.send(self, "_selectClass_", [nil]);
- }
- return self;
- },
- args: [],
- source: "removeClass\x0a (window confirm: 'Do you really want to remove ', selectedClass name, '?')\x0a\x09ifTrue: [\x0a\x09 Smalltalk current removeClass: selectedClass.\x0a\x09 self resetClassesList.\x0a\x09 self selectClass: nil]",
- messageSends: ["ifTrue:", "removeClass:", "current", "resetClassesList", "selectClass:", "confirm:", ",", "name"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_removeMethod",
- smalltalk.method({
- selector: "removeMethod",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2, $3;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- $2 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove #", "__comma", [smalltalk.send(self['@selectedMethod'], "_selector", [])]), "__comma", ["?"])]);
- if (smalltalk.assert($2)) {
- $3 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);
- if (smalltalk.assert($3)) {
- smalltalk.send(self['@selectedClass'], "_removeCompiledMethod_", [self['@selectedMethod']]);
- } else {
- smalltalk.send(smalltalk.send(self['@selectedClass'], "_class", []), "_removeCompiledMethod_", [self['@selectedMethod']]);
- }
- smalltalk.send(self, "_selectMethod_", [nil]);
- }
- }
- return self;
- },
- args: [],
- source: "removeMethod\x0a self cancelChanges ifTrue: [\x0a\x09(window confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09 ifTrue: [\x0a\x09\x09selectedTab = #instance \x0a\x09\x09\x09ifTrue: [selectedClass removeCompiledMethod: selectedMethod]\x0a\x09\x09\x09ifFalse: [selectedClass class removeCompiledMethod: selectedMethod].\x0a\x09\x09self selectMethod: nil]]",
- messageSends: ["ifTrue:", "ifTrue:ifFalse:", "removeCompiledMethod:", "class", "=", "selectMethod:", "confirm:", ",", "selector", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_removePackage",
- smalltalk.method({
- selector: "removePackage",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(window, "_confirm_", [smalltalk.send(smalltalk.send("Do you really want to remove the whole package ", "__comma", [self['@selectedPackage']]), "__comma", [" with all its classes?"])]);
- if (smalltalk.assert($1)) {
- smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_removePackage_", [self['@selectedPackage']]);
- smalltalk.send(self, "_updateCategoriesList", []);
- }
- return self;
- },
- args: [],
- source: "removePackage\x0a\x0a (window confirm: 'Do you really want to remove the whole package ', selectedPackage, ' with all its classes?')\x0a\x09ifTrue: [\x0a\x09 Smalltalk current removePackage: selectedPackage.\x0a\x09 self updateCategoriesList]",
- messageSends: ["ifTrue:", "removePackage:", "current", "updateCategoriesList", "confirm:", ","],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renameClass",
- smalltalk.method({
- selector: "renameClass",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- var newName;
- newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename class ", "__comma", [smalltalk.send(self['@selectedClass'], "_name", [])])]);
- $1 = smalltalk.send(smalltalk.send(newName, "_notNil", []), "_and_", [function () {return smalltalk.send(newName, "_notEmpty", []);}]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self['@selectedClass'], "_rename_", [newName]);
- smalltalk.send(self, "_updateClassesList", []);
- $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
- }
- return self;
- },
- args: [],
- source: "renameClass\x0a | newName |\x0a newName := window prompt: 'Rename class ', selectedClass name.\x0a (newName notNil and: [newName notEmpty]) ifTrue: [\x0a\x09selectedClass rename: newName.\x0a\x09self \x0a\x09\x09updateClassesList;\x0a\x09\x09updateSourceAndButtons]",
- messageSends: ["prompt:", ",", "name", "ifTrue:", "rename:", "updateClassesList", "updateSourceAndButtons", "and:", "notEmpty", "notNil"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renamePackage",
- smalltalk.method({
- selector: "renamePackage",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- var newName;
- newName = smalltalk.send(window, "_prompt_", [smalltalk.send("Rename package ", "__comma", [self['@selectedPackage']])]);
- if (($receiver = newName) == nil || $receiver == undefined) {
- } else {
- $1 = smalltalk.send(newName, "_notEmpty", []);
- if (smalltalk.assert($1)) {
- smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_renamePackage_to_", [self['@selectedPackage'], newName]);
- smalltalk.send(self, "_updateCategoriesList", []);
- }
- }
- return self;
- },
- args: [],
- source: "renamePackage\x0a\x0a | newName |\x0a newName := window prompt: 'Rename package ', selectedPackage.\x0a newName ifNotNil: [\x0a newName notEmpty ifTrue: [\x0a\x09Smalltalk current renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList]]",
- messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "renamePackage:to:", "current", "updateCategoriesList", "notEmpty"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderBottomPanelOn_",
- smalltalk.method({
- selector: "renderBottomPanelOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["amber_sourceCode"]);
- $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);smalltalk.send(self['@sourceArea'], "_onKeyDown_", [function (e) {return smalltalk.send(self, "_handleSourceAreaKeyDown_", [e]);}]);return smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);}]);
- return self;
- },
- args: ["html"],
- source: "renderBottomPanelOn: html\x0a html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09 sourceArea := SourceArea new.\x0a\x09 sourceArea renderOn: html.\x0a sourceArea onKeyDown: [:e |\x0a self handleSourceAreaKeyDown: e].\x0a\x09 sourceArea onKeyUp: [self updateStatus]]",
- messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1;
- smalltalk.send(self, "_renderTopPanelOn_", [html]);
- smalltalk.send(self, "_renderTabsOn_", [html]);
- $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html\x0a self \x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
- messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2, $4, $5, $6, $7, $8, $9, $3;
- self['@saveButton'] = smalltalk.send(html, "_button", []);
- smalltalk.send(self['@saveButton'], "_with_", ["Save"]);
- $1 = smalltalk.send(self['@saveButton'], "_onClick_", [function () {return smalltalk.send(self, "_compile", []);}]);
- self['@methodButtons'] = smalltalk.send(html, "_span", []);
- self['@classButtons'] = smalltalk.send(html, "_span", []);
- $2 = smalltalk.send(html, "_div", []);
- smalltalk.send($2, "_class_", ["right"]);
- $3 = smalltalk.send($2, "_with_", [function () {$4 = smalltalk.send(html, "_button", []);smalltalk.send($4, "_with_", ["DoIt"]);$5 = smalltalk.send($4, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);$5;$6 = smalltalk.send(html, "_button", []);smalltalk.send($6, "_with_", ["PrintIt"]);$7 = smalltalk.send($6, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);$7;$8 = smalltalk.send(html, "_button", []);smalltalk.send($8, "_with_", ["InspectIt"]);$9 = smalltalk.send($8, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);return $9;}]);
- smalltalk.send(self, "_updateSourceAndButtons", []);
- return self;
- },
- args: ["html"],
- source: "renderButtonsOn: html\x0a saveButton := html button.\x0a saveButton \x0a\x09with: 'Save';\x0a\x09onClick: [self compile].\x0a methodButtons := html span.\x0a classButtons := html span.\x0a html 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 self updateSourceAndButtons",
- messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderTabsOn_",
- smalltalk.method({
- selector: "renderTabsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@tabsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_tabs amber_browser"]);
- smalltalk.send(self, "_updateTabsList", []);
- return self;
- },
- args: ["html"],
- source: "renderTabsOn: html\x0a tabsList := html ul class: 'amber_tabs amber_browser'.\x0a self updateTabsList.",
- messageSends: ["class:", "ul", "updateTabsList"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_renderTopPanelOn_",
- smalltalk.method({
- selector: "renderTopPanelOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $3, $5, $6, $7, $8, $9, $10, $4, $11, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["top"]);
- $2 = smalltalk.send($1, "_with_", [function () {self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser packages"]);self['@packagesList'];$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["amber_packagesButtons"]);$4 = smalltalk.send($3, "_with_", [function () {$5 = smalltalk.send(html, "_button", []);smalltalk.send($5, "_title_", ["Commit classes in this package to disk"]);smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_commitPackage", []);}]);$6 = smalltalk.send($5, "_with_", ["Commit"]);$6;$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_title_", ["Rename package"]);smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_renamePackage", []);}]);$8 = smalltalk.send($7, "_with_", ["Rename"]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_title_", ["Remove this package from the system"]);smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_removePackage", []);}]);$10 = smalltalk.send($9, "_with_", ["Remove"]);return $10;}]);$4;self['@classesList'] = smalltalk.send(smalltalk.ClassesList || ClassesList, "_on_", [self]);self['@classesList'];smalltalk.send(self['@classesList'], "_renderOn_", [html]);self['@protocolsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser protocols"]);self['@protocolsList'];self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column browser methods"]);self['@methodsList'];smalltalk.send(self, "_updateCategoriesList", []);smalltalk.send(self, "_updateClassesList", []);smalltalk.send(self, "_updateProtocolsList", []);$11 = smalltalk.send(self, "_updateMethodsList", []);$11;return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);}]);
- return self;
- },
- args: ["html"],
- 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\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\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\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']",
- messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"],
- referencedClasses: ["ClassesList"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_resetClassesList",
- smalltalk.method({
- selector: "resetClassesList",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self['@classesList'], "_resetNodes", []);
- return self;
- },
- args: [],
- source: "resetClassesList\x0a\x09classesList resetNodes",
- messageSends: ["resetNodes"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- var searchedClass;
- searchedClass = smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_at_", [aString]);
- $2 = smalltalk.send(searchedClass, "_isClass", []);
- if (smalltalk.assert($2)) {
- smalltalk.send(smalltalk.send(self, "_class", []), "_openOn_", [searchedClass]);
- } else {
- smalltalk.send(self, "_searchReferencesOf_", [aString]);
- }
- }
- return self;
- },
- args: ["aString"],
- source: "search: aString\x0a\x09self cancelChanges ifTrue: [| searchedClass |\x0a\x09\x09searchedClass := Smalltalk current at: aString.\x0a\x09\x09searchedClass isClass\x0a\x09\x09\x09ifTrue: [self class openOn: searchedClass]\x0a\x09\x09\x09ifFalse: [self searchReferencesOf: aString]]",
- messageSends: ["ifTrue:", "at:", "current", "ifTrue:ifFalse:", "openOn:", "class", "searchReferencesOf:", "isClass", "cancelChanges"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_searchClassReferences",
- smalltalk.method({
- selector: "searchClassReferences",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [smalltalk.send(self['@selectedClass'], "_name", [])]);
- return self;
- },
- args: [],
- source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
- messageSends: ["search:", "name"],
- referencedClasses: ["ReferencesBrowser"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_searchReferencesOf_",
- smalltalk.method({
- selector: "searchReferencesOf:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- smalltalk.send(smalltalk.ReferencesBrowser || ReferencesBrowser, "_search_", [aString]);
- return self;
- },
- args: ["aString"],
- source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
- messageSends: ["search:"],
- referencedClasses: ["ReferencesBrowser"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectCategory_",
- smalltalk.method({
- selector: "selectCategory:",
- category: 'actions',
- fn: function (aCategory) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- self['@selectedPackage'] = aCategory;
- self['@selectedPackage'];
- self['@selectedMethod'] = nil;
- self['@selectedProtocol'] = self['@selectedMethod'];
- self['@selectedClass'] = self['@selectedProtocol'];
- self['@selectedClass'];
- smalltalk.send(self, "_resetClassesList", []);
- smalltalk.send(self, "_updateCategoriesList", []);
- smalltalk.send(self, "_updateClassesList", []);
- smalltalk.send(self, "_updateProtocolsList", []);
- smalltalk.send(self, "_updateMethodsList", []);
- $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
- }
- return self;
- },
- args: ["aCategory"],
- source: "selectCategory: aCategory\x0a self cancelChanges ifTrue: [\x0a\x09selectedPackage := aCategory.\x0a\x09selectedClass := selectedProtocol := selectedMethod := nil.\x0a\x09self resetClassesList.\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList;\x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectClass_",
- smalltalk.method({
- selector: "selectClass:",
- category: 'actions',
- fn: function (aClass) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- self['@selectedClass'] = aClass;
- self['@selectedClass'];
- self['@selectedMethod'] = nil;
- self['@selectedProtocol'] = self['@selectedMethod'];
- self['@selectedProtocol'];
- smalltalk.send(self, "_updateClassesList", []);
- smalltalk.send(self, "_updateProtocolsList", []);
- smalltalk.send(self, "_updateMethodsList", []);
- $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
- }
- return self;
- },
- args: ["aClass"],
- source: "selectClass: aClass\x0a self cancelChanges ifTrue: [\x0a\x09selectedClass := aClass.\x0a\x09selectedProtocol := selectedMethod := nil.\x0a\x09self \x0a\x09 updateClassesList;\x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectMethod_",
- smalltalk.method({
- selector: "selectMethod:",
- category: 'actions',
- fn: function (aMethod) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- self['@selectedMethod'] = aMethod;
- self['@selectedMethod'];
- smalltalk.send(self, "_updateProtocolsList", []);
- smalltalk.send(self, "_updateMethodsList", []);
- $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
- }
- return self;
- },
- args: ["aMethod"],
- source: "selectMethod: aMethod\x0a self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self \x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectProtocol_",
- smalltalk.method({
- selector: "selectProtocol:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- self['@selectedProtocol'] = aString;
- self['@selectedProtocol'];
- self['@selectedMethod'] = nil;
- self['@selectedMethod'];
- smalltalk.send(self, "_updateProtocolsList", []);
- smalltalk.send(self, "_updateMethodsList", []);
- $2 = smalltalk.send(self, "_updateSourceAndButtons", []);
- }
- return self;
- },
- args: ["aString"],
- source: "selectProtocol: aString\x0a self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self \x0a\x09 updateProtocolsList;\x0a\x09 updateMethodsList;\x0a\x09 updateSourceAndButtons]",
- messageSends: ["ifTrue:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectTab_",
- smalltalk.method({
- selector: "selectTab:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- self['@selectedTab'] = aString;
- self['@selectedTab'];
- smalltalk.send(self, "_selectProtocol_", [nil]);
- smalltalk.send(self, "_updateTabsList", []);
- }
- return self;
- },
- args: ["aString"],
- source: "selectTab: aString\x0a self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList]",
- messageSends: ["ifTrue:", "selectProtocol:", "updateTabsList", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectedClass",
- smalltalk.method({
- selector: "selectedClass",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@selectedClass'];
- },
- args: [],
- source: "selectedClass\x0a\x09^selectedClass",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_selectedPackage",
- smalltalk.method({
- selector: "selectedPackage",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@selectedPackage'];
- },
- args: [],
- source: "selectedPackage\x0a\x09^selectedPackage",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_setMethodProtocol_",
- smalltalk.method({
- selector: "setMethodProtocol:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1, $2, $3;
- $1 = smalltalk.send(self, "_cancelChanges", []);
- if (smalltalk.assert($1)) {
- $2 = smalltalk.send(smalltalk.send(self, "_protocols", []), "_includes_", [aString]);
- if (smalltalk.assert($2)) {
- smalltalk.send(self['@selectedMethod'], "_category_", [aString]);
- self['@selectedProtocol'] = aString;
- self['@selectedProtocol'];
- self['@selectedMethod'] = self['@selectedMethod'];
- self['@selectedMethod'];
- smalltalk.send(self, "_updateProtocolsList", []);
- smalltalk.send(self, "_updateMethodsList", []);
- $3 = smalltalk.send(self, "_updateSourceAndButtons", []);
- } else {
- smalltalk.send(self, "_addNewProtocol", []);
- }
- }
- return self;
- },
- args: ["aString"],
- source: "setMethodProtocol: aString\x0a self cancelChanges ifTrue: [\x0a\x09(self protocols includes: aString)\x0a\x09 ifFalse: [self addNewProtocol]\x0a\x09 ifTrue: [\x0a\x09\x09selectedMethod category: aString.\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09selectedMethod := selectedMethod.\x0a\x09\x09self \x0a\x09\x09 updateProtocolsList;\x0a\x09\x09 updateMethodsList;\x0a\x09\x09 updateSourceAndButtons]]",
- messageSends: ["ifTrue:", "ifFalse:ifTrue:", "addNewProtocol", "category:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons", "includes:", "protocols", "cancelChanges"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_showClassButtons",
- smalltalk.method({
- selector: "showClassButtons",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@classButtons'], "_asJQuery", []), "_show", []);
- return self;
- },
- args: [],
- source: "showClassButtons\x0a classButtons asJQuery show",
- messageSends: ["show", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_showMethodButtons",
- smalltalk.method({
- selector: "showMethodButtons",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@methodButtons'], "_asJQuery", []), "_show", []);
- return self;
- },
- args: [],
- source: "showMethodButtons\x0a methodButtons asJQuery show",
- messageSends: ["show", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_source",
- smalltalk.method({
- selector: "source",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $3, $2, $4;
- $1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);
- if (!smalltalk.assert($1)) {
- $3 = smalltalk.send(smalltalk.send(self['@selectedProtocol'], "_notNil", []), "_or_", [function () {return smalltalk.send(self['@selectedMethod'], "_notNil", []);}]);
- if (smalltalk.assert($3)) {
- $2 = smalltalk.send(self, "_methodSource", []);
- } else {
- $2 = smalltalk.send(self, "_declarationSource", []);
- }
- return $2;
- }
- if (($receiver = self['@selectedClass']) == nil ||
- $receiver == undefined) {
- $4 = "";
- } else {
- $4 = smalltalk.send(self, "_classCommentSource", []);
- }
- return $4;
- },
- args: [],
- source: "source\x0a selectedTab = #comment ifFalse: [\x0a\x09^(selectedProtocol notNil or: [selectedMethod notNil])\x0a\x09 ifFalse: [self declarationSource]\x0a\x09 ifTrue: [self methodSource]].\x0a ^selectedClass\x0a\x09ifNil: ['']\x0a\x09ifNotNil: [self classCommentSource]",
- messageSends: ["ifFalse:", "ifFalse:ifTrue:", "declarationSource", "methodSource", "or:", "notNil", "=", "ifNil:ifNotNil:", "classCommentSource"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateCategoriesList",
- smalltalk.method({
- selector: "updateCategoriesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3;
- smalltalk.send(self['@packagesList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {var li;var label;$1 = smalltalk.send(each, "_isEmpty", []);if (smalltalk.assert($1)) {label = "Unclassified";} else {label = each;}li = smalltalk.send(html, "_li", []);$2 = smalltalk.send(self['@selectedPackage'], "__eq", [each]);if (smalltalk.assert($2)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [label]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectCategory_", [each]);}]);return $3;}]);}]);
- return self;
- },
- args: [],
- source: "updateCategoriesList\x0a packagesList contents: [:html |\x0a\x09self packages do: [:each || li label |\x0a\x09 each isEmpty \x0a\x09\x09ifTrue: [label := 'Unclassified']\x0a\x09\x09ifFalse: [label := each].\x0a\x09 li := html li.\x0a\x09 selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [self selectCategory: each]]]",
- messageSends: ["contents:", "do:", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectCategory:", "packages"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateClassesList",
- smalltalk.method({
- selector: "updateClassesList",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(smalltalk.TabManager || TabManager, "_current", []), "_update", []);
- smalltalk.send(self['@classesList'], "_updateNodes", []);
- return self;
- },
- args: [],
- source: "updateClassesList\x0a TabManager current update.\x0a classesList updateNodes",
- messageSends: ["update", "current", "updateNodes"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateMethodsList",
- smalltalk.method({
- selector: "updateMethodsList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(self['@methodsList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_methods", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedMethod'], "__eq", [each]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [smalltalk.send(each, "_selector", [])]);$2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectMethod_", [each]);}]);return $2;}]);}]);
- return self;
- },
- args: [],
- source: "updateMethodsList\x0a methodsList contents: [:html |\x0a\x09self methods do: [:each || li |\x0a\x09 li := html li.\x0a\x09 selectedMethod = each ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: each selector;\x0a\x09\x09onClick: [self selectMethod: each]]]",
- messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "selector", "onClick:", "selectMethod:", "methods"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateProtocolsList",
- smalltalk.method({
- selector: "updateProtocolsList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(self['@protocolsList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(self, "_protocols", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedProtocol'], "__eq", [each]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [each]);$2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectProtocol_", [each]);}]);return $2;}]);}]);
- return self;
- },
- args: [],
- source: "updateProtocolsList\x0a protocolsList contents: [:html |\x0a\x09self protocols do: [:each || li |\x0a\x09 li := html li.\x0a\x09 selectedProtocol = each ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li \x0a\x09\x09with: each;\x0a\x09\x09onClick: [self selectProtocol: each]]]",
- messageSends: ["contents:", "do:", "li", "ifTrue:", "class:", "=", "with:", "onClick:", "selectProtocol:", "protocols"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateSourceAndButtons",
- smalltalk.method({
- selector: "updateSourceAndButtons",
- category: 'updating',
- fn: function (){
- var self=this;
- var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$15,$16,$17,$18,$19,$13,$20,$22,$23,$24,$25,$21,$26,$27;
- var currentProtocol;
- smalltalk.send(self,"_disableSaveButton",[]);
- smalltalk.send(self["@classButtons"],"_contents_",[(function(html){
- $1=smalltalk.send(html,"_button",[]);
- smalltalk.send($1,"_title_",["Create a new class"]);
- smalltalk.send($1,"_onClick_",[(function(){
- return smalltalk.send(self,"_addNewClass",[]);
- })]);
- $2=smalltalk.send($1,"_with_",["New class"]);
- $2;
- $3=smalltalk.send(html,"_button",[]);
- smalltalk.send($3,"_with_",["Rename class"]);
- $4=smalltalk.send($3,"_onClick_",[(function(){
- return smalltalk.send(self,"_renameClass",[]);
- })]);
- $4;
- $5=smalltalk.send(html,"_button",[]);
- smalltalk.send($5,"_with_",["Copy class"]);
- $6=smalltalk.send($5,"_onClick_",[(function(){
- return smalltalk.send(self,"_copyClass",[]);
- })]);
- $6;
- $7=smalltalk.send(html,"_button",[]);
- smalltalk.send($7,"_with_",["Remove class"]);
- $8=smalltalk.send($7,"_onClick_",[(function(){
- return smalltalk.send(self,"_removeClass",[]);
- })]);
- $8;
- $9=smalltalk.send(html,"_button",[]);
- smalltalk.send($9,"_with_",["References"]);
- $10=smalltalk.send($9,"_onClick_",[(function(){
- return smalltalk.send(self,"_searchClassReferences",[]);
- })]);
- return $10;
- })]);
- smalltalk.send(self["@methodButtons"],"_contents_",[(function(html){
- var protocolSelect;
- var referencesSelect;
- $11=smalltalk.send(html,"_button",[]);
- smalltalk.send($11,"_with_",["Remove method"]);
- $12=smalltalk.send($11,"_onClick_",[(function(){
- return smalltalk.send(self,"_removeMethod",[]);
- })]);
- $12;
- protocolSelect=smalltalk.send(html,"_select",[]);
- protocolSelect;
- smalltalk.send(protocolSelect,"_onChange_",[(function(){
- return smalltalk.send(self,"_setMethodProtocol_",[smalltalk.send(smalltalk.send(protocolSelect,"_asJQuery",[]),"_val",[])]);
- })]);
- $13=smalltalk.send(protocolSelect,"_with_",[(function(){
- $14=smalltalk.send(html,"_option",[]);
- smalltalk.send($14,"_with_",["Method protocol"]);
- $15=smalltalk.send($14,"_at_put_",["disabled","disabled"]);
- $15;
- $16=smalltalk.send(html,"_option",[]);
- smalltalk.send($16,"_class_",["important"]);
- $17=smalltalk.send($16,"_with_",["New..."]);
- $17;
- currentProtocol=self["@selectedProtocol"];
- currentProtocol;
- $18=smalltalk.send(smalltalk.send(currentProtocol,"_isNil",[]),"_and_",[(function(){
- return smalltalk.send(self["@selectedMethod"],"_notNil",[]);
- })]);
- if(smalltalk.assert($18)){
- currentProtocol=smalltalk.send(self["@selectedMethod"],"_category",[]);
- currentProtocol;
- };
- return smalltalk.send(smalltalk.send(self,"_protocols",[]),"_do_",[(function(each){
- option=smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
- option;
- $19=smalltalk.send(currentProtocol,"__eq",[each]);
- if(smalltalk.assert($19)){
- return smalltalk.send(option,"_at_put_",["selected","selected"]);
- };
- })]);
- })]);
- $13;
- $20=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
- if(! smalltalk.assert($20)){
- referencesSelect=smalltalk.send(html,"_select",[]);
- referencesSelect;
- smalltalk.send(referencesSelect,"_onChange_",[(function(){
- return smalltalk.send(self,"_searchReferencesOf_",[smalltalk.send(smalltalk.send(referencesSelect,"_asJQuery",[]),"_val",[])]);
- })]);
- $21=smalltalk.send(referencesSelect,"_with_",[(function(){
- var option;
- $22=smalltalk.send(html,"_option",[]);
- smalltalk.send($22,"_with_",["References"]);
- smalltalk.send($22,"_at_put_",["disabled","disabled"]);
- $23=smalltalk.send($22,"_at_put_",["selected","selected"]);
- $23;
- $24=smalltalk.send(html,"_option",[]);
- smalltalk.send($24,"_class_",["important"]);
- $25=smalltalk.send($24,"_with_",[smalltalk.send(self["@selectedMethod"],"_selector",[])]);
- $25;
- return smalltalk.send(smalltalk.send(smalltalk.send(self["@selectedMethod"],"_messageSends",[]),"_sorted",[]),"_do_",[(function(each){
- return smalltalk.send(smalltalk.send(html,"_option",[]),"_with_",[each]);
- })]);
- })]);
- return $21;
- };
- })]);
- $26=smalltalk.send(self["@selectedMethod"],"_isNil",[]);
- if(smalltalk.assert($26)){
- smalltalk.send(self,"_hideMethodButtons",[]);
- $27=smalltalk.send(smalltalk.send(self["@selectedClass"],"_isNil",[]),"_or_",[(function(){
- return smalltalk.send(self["@selectedProtocol"],"_notNil",[]);
- })]);
- if(smalltalk.assert($27)){
- smalltalk.send(self,"_hideClassButtons",[]);
- } else {
- smalltalk.send(self,"_showClassButtons",[]);
- };
- } else {
- smalltalk.send(self,"_hideClassButtons",[]);
- smalltalk.send(self,"_showMethodButtons",[]);
- };
- smalltalk.send(self["@sourceArea"],"_val_",[smalltalk.send(self,"_source",[])]);
- return self},
- args: [],
- 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 protocolSelect\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 currentProtocol := selectedProtocol.\x0a (currentProtocol isNil and: [ selectedMethod notNil ])\x0a \x09ifTrue: [ currentProtocol := selectedMethod category].\x0a\x09\x09\x09\x09self protocols do: [:each |\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 referencesSelect\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 at: '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",
- messageSends: ["disableSaveButton", "contents:", "title:", "button", "onClick:", "addNewClass", "with:", "renameClass", "copyClass", "removeClass", "searchClassReferences", "removeMethod", "select", "onChange:", "setMethodProtocol:", "val", "asJQuery", "option", "at:put:", "class:", "ifTrue:", "category", "and:", "notNil", "isNil", "do:", "=", "protocols", "ifFalse:", "searchReferencesOf:", "selector", "sorted", "messageSends", "ifTrue:ifFalse:", "hideMethodButtons", "hideClassButtons", "showClassButtons", "or:", "showMethodButtons", "val:", "source"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateStatus",
- smalltalk.method({
- selector: "updateStatus",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
- if (smalltalk.assert($1)) {
- if (($receiver = self['@saveButton']) == nil ||
- $receiver == undefined) {
- self['@saveButton'];
- } else {
- smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
- }
- self['@unsavedChanges'] = false;
- self['@unsavedChanges'];
- } else {
- if (($receiver = self['@saveButton']) == nil ||
- $receiver == undefined) {
- self['@saveButton'];
- } else {
- smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
- }
- self['@unsavedChanges'] = true;
- self['@unsavedChanges'];
- }
- return self;
- },
- args: [],
- 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]",
- messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_updateTabsList",
- smalltalk.method({
- selector: "updateTabsList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12;
- smalltalk.send(self['@tabsList'], "_contents_", [function (html) {var li;li = smalltalk.send(html, "_li", []);$1 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("instance")]);if (smalltalk.assert($1)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$2 = smalltalk.send(html, "_span", []);smalltalk.send($2, "_class_", ["mtab"]);$3 = smalltalk.send($2, "_with_", ["Instance"]);$3;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$4 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("instance")]);}]);$4;li = smalltalk.send(html, "_li", []);$5 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("class")]);if (smalltalk.assert($5)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$6 = smalltalk.send(html, "_span", []);smalltalk.send($6, "_class_", ["mtab"]);$7 = smalltalk.send($6, "_with_", ["Class"]);$7;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$8 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("class")]);}]);$8;li = smalltalk.send(html, "_li", []);$9 = smalltalk.send(self['@selectedTab'], "__eq", [smalltalk.symbolFor("comment")]);if (smalltalk.assert($9)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [function () {smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["ltab"]);$10 = smalltalk.send(html, "_span", []);smalltalk.send($10, "_class_", ["mtab"]);$11 = smalltalk.send($10, "_with_", ["Comment"]);$11;return smalltalk.send(smalltalk.send(html, "_span", []), "_class_", ["rtab"]);}]);$12 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectTab_", [smalltalk.symbolFor("comment")]);}]);return $12;}]);
- return self;
- },
- args: [],
- source: "updateTabsList\x0a tabsList contents: [:html || li |\x0a\x09li := html li.\x0a\x09selectedTab = #instance ifTrue: [li class: 'selected'].\x0a\x09li\x0a\x09 with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Instance'.\x0a\x09\x09html span class: 'rtab'];\x0a\x09 onClick: [self selectTab: #instance].\x0a\x09li := html li.\x0a\x09selectedTab = #class ifTrue: [li class: 'selected'].\x0a\x09li\x0a\x09 with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Class'.\x0a\x09\x09html span class: 'rtab'];\x0a\x09 onClick: [self selectTab: #class].\x0a\x09li := html li.\x0a\x09selectedTab = #comment ifTrue: [li class: 'selected'].\x0a\x09li\x0a\x09 with: [\x0a\x09\x09html span class: 'ltab'.\x0a\x09\x09html span class: 'mtab'; with: 'Comment'.\x0a\x09\x09html span class: 'rtab'];\x0a\x09 onClick: [self selectTab: #comment]]",
- messageSends: ["contents:", "li", "ifTrue:", "class:", "=", "with:", "span", "onClick:", "selectTab:"],
- referencedClasses: []
- }),
- smalltalk.Browser);
- smalltalk.addMethod(
- "_commitPathJs",
- smalltalk.method({
- selector: "commitPathJs",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "js";
- },
- args: [],
- source: "commitPathJs\x0a\x09^'js'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser.klass);
- smalltalk.addMethod(
- "_commitPathSt",
- smalltalk.method({
- selector: "commitPathSt",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "st";
- },
- args: [],
- source: "commitPathSt\x0a\x09^'st'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Browser.klass);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'convenience',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self, "_new", []), "_open", []);
- return self;
- },
- args: [],
- source: "open\x0a self new open",
- messageSends: ["open", "new"],
- referencedClasses: []
- }),
- smalltalk.Browser.klass);
- smalltalk.addMethod(
- "_openOn_",
- smalltalk.method({
- selector: "openOn:",
- category: 'convenience',
- fn: function (aClass) {
- var self = this;
- var $2, $3, $1;
- $2 = smalltalk.send(self, "_new", []);
- smalltalk.send($2, "_open", []);
- smalltalk.send($2, "_selectCategory_", [smalltalk.send(aClass, "_category", [])]);
- $3 = smalltalk.send($2, "_selectClass_", [aClass]);
- $1 = $3;
- return $1;
- },
- args: ["aClass"],
- source: "openOn: aClass\x0a ^self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
- messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"],
- referencedClasses: []
- }),
- smalltalk.Browser.klass);
- smalltalk.addClass('Debugger', smalltalk.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
- smalltalk.addMethod(
- "_arguments",
- smalltalk.method({
- selector: "arguments",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $2, $1;
- $2 = smalltalk.send(self, "_method", []);
- if (($receiver = $2) == nil || $receiver == undefined) {
- $1 = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_collect_", [function (each) {return nil;}]);
- } else {
- $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_arguments", []);
- }
- return $1;
- },
- args: [],
- source: "arguments\x0a\x09^self method \x0a\x09\x09ifNil: [selectedContext temps collect: [:each | nil]]\x0a\x09\x09ifNotNil: [self method arguments]",
- messageSends: ["ifNil:ifNotNil:", "collect:", "temps", "arguments", "method"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function () {
- var self = this;
- return true;
- },
- args: [],
- source: "canBeClosed\x0a ^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_error",
- smalltalk.method({
- selector: "error",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@error'];
- },
- args: [],
- source: "error\x0a\x09^error",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_error_",
- smalltalk.method({
- selector: "error:",
- category: 'accessing',
- fn: function (anError) {
- var self = this;
- self['@error'] = anError;
- return self;
- },
- args: ["anError"],
- source: "error: anError\x0a\x09error := anError",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
- smalltalk.send(self['@unsavedChanges'], "__eq", [false]);
- return self;
- },
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
- messageSends: ["initialize", "="],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_inspectSelectedVariable",
- smalltalk.method({
- selector: "inspectSelectedVariable",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@selectedVariable'], "_inspect", []);
- return self;
- },
- args: [],
- source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
- messageSends: ["inspect"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "[Debugger]";
- },
- args: [],
- source: "label\x0a\x09^'[Debugger]'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_method",
- smalltalk.method({
- selector: "method",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodAt_", [smalltalk.send(self['@selectedContext'], "_selector", [])]);
- return $1;
- },
- args: [],
- source: "method\x0a\x09^selectedContext receiver class methodAt: selectedContext selector",
- messageSends: ["methodAt:", "selector", "class", "receiver"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_proceed",
- smalltalk.method({
- selector: "proceed",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_close", []);
- smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_perform_withArguments_", [smalltalk.send(self['@selectedContext'], "_selector", []), smalltalk.send(self['@selectedContext'], "_temps", [])]);
- return self;
- },
- args: [],
- source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext temps",
- messageSends: ["close", "perform:withArguments:", "selector", "temps", "receiver"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_receiver",
- smalltalk.method({
- selector: "receiver",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(self['@selectedContext'], "_receiver", []);
- return $1;
- },
- args: [],
- source: "receiver\x0a\x09^selectedContext receiver",
- messageSends: ["receiver"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderBottomPanelOn_",
- smalltalk.method({
- selector: "renderBottomPanelOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["amber_sourceCode debugger"]);
- $2 = smalltalk.send($1, "_with_", [function () {self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
- self['@ul2'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column debugger variables"]);
- self['@inspector'] = smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_column debugger inspector"]);
- smalltalk.send(self['@sourceArea'], "_onKeyUp_", [function () {return smalltalk.send(self, "_updateStatus", []);}]);
- return self;
- },
- args: ["html"],
- 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]",
- messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1;
- smalltalk.send(self, "_renderTopPanelOn_", [html]);
- $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html\x0a self \x0a\x09renderTopPanelOn: html;\x0a\x09renderBottomPanelOn: html",
- messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14, $15;
- $1 = smalltalk.send(html, "_button", []);
- smalltalk.send($1, "_with_", ["Save"]);
- $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_save", []);}]);
- self['@saveButton'] = $2;
- $3 = smalltalk.send(html, "_button", []);
- smalltalk.send($3, "_with_", ["DoIt"]);
- $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_doIt", []);}]);
- $5 = smalltalk.send(html, "_button", []);
- smalltalk.send($5, "_with_", ["PrintIt"]);
- $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_printIt", []);}]);
- $7 = smalltalk.send(html, "_button", []);
- smalltalk.send($7, "_with_", ["InspectIt"]);
- $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self['@sourceArea'], "_inspectIt", []);}]);
- $9 = smalltalk.send(html, "_button", []);
- smalltalk.send($9, "_with_", ["Proceed"]);
- $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_proceed", []);}]);
- $11 = smalltalk.send(html, "_button", []);
- smalltalk.send($11, "_with_", ["Abandon"]);
- $12 = smalltalk.send($11, "_onClick_", [function () {return smalltalk.send(self, "_close", []);}]);
- $13 = smalltalk.send(html, "_button", []);
- smalltalk.send($13, "_class_", ["amber_button debugger inspect"]);
- smalltalk.send($13, "_with_", ["Inspect"]);
- $14 = smalltalk.send($13, "_onClick_", [function () {return smalltalk.send(self, "_inspectSelectedVariable", []);}]);
- self['@inspectButton'] = $14;
- smalltalk.send(self, "_updateSourceArea", []);
- smalltalk.send(self, "_updateStatus", []);
- smalltalk.send(self, "_updateVariablesList", []);
- $15 = smalltalk.send(self, "_updateInspector", []);
- return self;
- },
- args: ["html"],
- 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\x09 self \x0a\x09\x09updateSourceArea;\x0a\x09\x09updateStatus;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateInspector",
- messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderContext_on_",
- smalltalk.method({
- selector: "renderContext:on:",
- category: 'rendering',
- fn: function (aContext, html) {
- var self = this;
- var $1, $2, $3;
- var li;
- li = smalltalk.send(html, "_li", []);
- $1 = smalltalk.send(self['@selectedContext'], "__eq", [aContext]);
- if (smalltalk.assert($1)) {
- smalltalk.send(li, "_class_", ["selected"]);
- }
- smalltalk.send(li, "_with_", [smalltalk.send(aContext, "_asString", [])]);
- $2 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectContext_", [aContext]);}]);
- $3 = smalltalk.send(aContext, "_home", []);
- if (($receiver = $3) == nil || $receiver == undefined) {
- } else {
- smalltalk.send(self, "_renderContext_on_", [smalltalk.send(aContext, "_home", []), html]);
- }
- return self;
- },
- args: ["aContext", "html"],
- 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 home ifNotNil: [self renderContext: aContext home on: html]",
- messageSends: ["li", "ifTrue:", "class:", "=", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "renderContext:on:", "home"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_renderTopPanelOn_",
- smalltalk.method({
- selector: "renderTopPanelOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $3, $4, $5, $6, $2;
- self['@selectedContext'] = smalltalk.send(smalltalk.send(self, "_error", []), "_context", []);
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["top"]);
- $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(html, "_div", []);smalltalk.send($3, "_class_", ["label"]);$4 = smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(self, "_error", []), "_messageText", [])]);$4;$5 = smalltalk.send(html, "_ul", []);smalltalk.send($5, "_class_", ["amber_column debugger contexts"]);$6 = smalltalk.send($5, "_with_", [function () {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);self['@ul'] = $6;return self['@ul'];}]);
- return self;
- },
- args: ["html"],
- 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]]",
- messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_save",
- smalltalk.method({
- selector: "save",
- category: 'actions',
- fn: function () {
- var self = this;
- var protocol;
- protocol = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_methodDictionary", []), "_at_", [smalltalk.send(self['@selectedContext'], "_selector", [])]), "_category", []);
- smalltalk.send(smalltalk.send(smalltalk.send(self['@selectedContext'], "_receiver", []), "_class", []), "_compile_category_", [smalltalk.send(self['@sourceArea'], "_val", []), protocol]);
- smalltalk.send(self, "_updateStatus", []);
- return self;
- },
- args: [],
- 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",
- messageSends: ["category", "at:", "selector", "methodDictionary", "class", "receiver", "compile:category:", "val", "updateStatus"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_selectContext_",
- smalltalk.method({
- selector: "selectContext:",
- category: 'actions',
- fn: function (aContext) {
- var self = this;
- var $1;
- self['@selectedContext'] = aContext;
- self['@selectedVariable'] = nil;
- self['@selectedVariableName'] = nil;
- smalltalk.send(self, "_updateContextsList", []);
- smalltalk.send(self, "_updateSourceArea", []);
- smalltalk.send(self, "_updateInspector", []);
- smalltalk.send(self, "_updateVariablesList", []);
- $1 = smalltalk.send(self, "_updateStatus", []);
- return self;
- },
- args: ["aContext"],
- 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",
- messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_selectVariable_named_",
- smalltalk.method({
- selector: "selectVariable:named:",
- category: 'actions',
- fn: function (anObject, aString) {
- var self = this;
- self['@selectedVariable'] = anObject;
- self['@selectedVariableName'] = aString;
- smalltalk.send(self['@inspector'], "_contents_", [function (html) {return smalltalk.send(html, "_with_", [smalltalk.send(anObject, "_printString", [])]);}]);
- smalltalk.send(self, "_updateVariablesList", []);
- return self;
- },
- args: ["anObject", "aString"],
- source: "selectVariable: anObject named: aString\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [:html | html with: anObject printString].\x0a\x09self updateVariablesList",
- messageSends: ["contents:", "with:", "printString", "updateVariablesList"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_source",
- smalltalk.method({
- selector: "source",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $2, $1;
- $2 = smalltalk.send(self, "_method", []);
- if (($receiver = $2) == nil || $receiver == undefined) {
- $1 = "Method doesn't exist!";
- } else {
- $1 = smalltalk.send(smalltalk.send(self, "_method", []), "_source", []);
- }
- return $1;
- },
- args: [],
- source: "source\x0a\x09^self method \x0a\x09\x09ifNil: ['Method doesn''t exist!']\x0a\x09\x09ifNotNil: [self method source]",
- messageSends: ["ifNil:ifNotNil:", "source", "method"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateContextsList",
- smalltalk.method({
- selector: "updateContextsList",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self['@ul'], "_contents_", [function (html) {return smalltalk.send(self, "_renderContext_on_", [smalltalk.send(smalltalk.send(self, "_error", []), "_context", []), html]);}]);
- return self;
- },
- args: [],
- source: "updateContextsList\x0a\x09ul contents: [:html |\x0a\x09\x09self renderContext: self error context on: html]",
- messageSends: ["contents:", "renderContext:on:", "context", "error"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateInspector",
- smalltalk.method({
- selector: "updateInspector",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self['@inspector'], "_contents_", [function (html) {}]);
- return self;
- },
- args: [],
- source: "updateInspector\x0a\x09inspector contents: [:html |]",
- messageSends: ["contents:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateSourceArea",
- smalltalk.method({
- selector: "updateSourceArea",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self['@sourceArea'], "_val_", [smalltalk.send(self, "_source", [])]);
- return self;
- },
- args: [],
- source: "updateSourceArea\x0a\x09 sourceArea val: self source",
- messageSends: ["val:", "source"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateStatus",
- smalltalk.method({
- selector: "updateStatus",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(self['@sourceArea'], "_val", []), "__eq", [smalltalk.send(self, "_source", [])]);
- if (smalltalk.assert($1)) {
- if (($receiver = self['@saveButton']) == nil ||
- $receiver == undefined) {
- self['@saveButton'];
- } else {
- smalltalk.send(self['@saveButton'], "_at_put_", ["disabled", true]);
- }
- self['@unsavedChanges'] = false;
- self['@unsavedChanges'];
- } else {
- if (($receiver = self['@saveButton']) == nil ||
- $receiver == undefined) {
- self['@saveButton'];
- } else {
- smalltalk.send(self['@saveButton'], "_removeAt_", ["disabled"]);
- }
- self['@unsavedChanges'] = true;
- self['@unsavedChanges'];
- }
- return self;
- },
- args: [],
- 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]",
- messageSends: ["ifTrue:ifFalse:", "ifNotNil:", "at:put:", "removeAt:", "=", "source", "val"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addMethod(
- "_updateVariablesList",
- smalltalk.method({
- selector: "updateVariablesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4, $5, $6, $7, $8, $9;
- smalltalk.send(self['@ul2'], "_contents_", [function (html) {var li;$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_with_", ["self"]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [smalltalk.send(self, "_receiver", []), "self"]);}]);li = $2;$3 = smalltalk.send(self['@selectedVariableName'], "__eq", ["self"]);if (smalltalk.assert($3)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(smalltalk.send(self, "_arguments", []), "_withIndexDo_", [function (each, index) {var param;param = smalltalk.send(smalltalk.send(self['@selectedContext'], "_temps", []), "_at_", [index]);$4 = smalltalk.send(html, "_li", []);smalltalk.send($4, "_with_", [each]);$5 = smalltalk.send($4, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [param, each]);}]);li = $5;li;$6 = smalltalk.send(self['@selectedVariableName'], "__eq", [each]);if (smalltalk.assert($6)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);return smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_receiver", []), "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {var ivar;ivar = smalltalk.send(smalltalk.send(self, "_receiver", []), "_instVarAt_", [each]);$7 = smalltalk.send(html, "_li", []);smalltalk.send($7, "_with_", [each]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_named_", [ivar, each]);}]);li = $8;li;$9 = smalltalk.send(self['@selectedVariableName'], "__eq", [each]);if (smalltalk.assert($9)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);}]);
- if (($receiver = self['@selectedVariable']) == nil ||
- $receiver == undefined) {
- smalltalk.send(self['@inspectButton'], "_at_put_", ["disabled", true]);
- } else {
- smalltalk.send(self['@inspectButton'], "_removeAt_", ["disabled"]);
- }
- return self;
- },
- args: [],
- 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 selectedVariableName = 'self' ifTrue: [\x0a\x09\x09\x09li class: 'selected'].\x0a self arguments withIndexDo: [:each :index | | param |\x0a param := selectedContext temps at: index.\x0a li := html li \x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [self selectVariable: param named: each].\x0a selectedVariableName = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected']].\x0a self receiver class allInstanceVariableNames do: [:each | | ivar |\x0a ivar := self receiver instVarAt: each.\x0a li := html li \x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [self selectVariable: ivar named: each].\x0a selectedVariableName = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected']]].\x0a\x09selectedVariable ifNil: [inspectButton at: 'disabled' put: true] ifNotNil: [inspectButton removeAt: 'disabled']",
- messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "class:", "=", "withIndexDo:", "at:", "temps", "arguments", "do:", "instVarAt:", "allInstanceVariableNames", "class", "ifNil:ifNotNil:", "at:put:", "removeAt:"],
- referencedClasses: []
- }),
- smalltalk.Debugger);
- smalltalk.addClass('IDETranscript', smalltalk.TabWidget, ['textarea'], 'IDE');
- smalltalk.addMethod(
- "_clear",
- smalltalk.method({
- selector: "clear",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [""]);
- return self;
- },
- args: [],
- source: "clear\x0a textarea asJQuery val: ''",
- messageSends: ["val:", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_cr",
- smalltalk.method({
- selector: "cr",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(smalltalk.String || String, "_cr", [])])]);
- return self;
- },
- args: [],
- source: "cr\x0a textarea asJQuery val: textarea asJQuery val, String cr.",
- messageSends: ["val:", ",", "cr", "val", "asJQuery"],
- referencedClasses: ["String"]
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "Transcript";
- },
- args: [],
- source: "label\x0a ^'Transcript'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
- smalltalk.send($1, "_open", []);
- $2 = smalltalk.send($1, "_selectTab_", [self]);
- return self;
- },
- args: [],
- source: "open\x0a TabManager current \x0a\x09open;\x0a\x09selectTab: self",
- messageSends: ["open", "current", "selectTab:"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1;
- self['@textarea'] = smalltalk.send(html, "_textarea", []);
- smalltalk.send(self['@textarea'], "_class_", ["amber_transcript"]);
- $1 = smalltalk.send(self['@textarea'], "_at_put_", ["spellcheck", "false"]);
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html\x0a textarea := html textarea.\x0a textarea \x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
- messageSends: ["textarea", "class:", "at:put:"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_button", []);
- smalltalk.send($1, "_with_", ["Clear transcript"]);
- $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_clear", []);}]);
- return self;
- },
- args: ["html"],
- source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [self clear]",
- messageSends: ["with:", "button", "onClick:", "clear"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.addMethod(
- "_show_",
- smalltalk.method({
- selector: "show:",
- category: 'actions',
- fn: function (anObject) {
- var self = this;
- if (($receiver = self['@textarea']) == nil || $receiver == undefined) {
- smalltalk.send(self, "_open", []);
- } else {
- self['@textarea'];
- }
- smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val_", [smalltalk.send(smalltalk.send(smalltalk.send(self['@textarea'], "_asJQuery", []), "_val", []), "__comma", [smalltalk.send(anObject, "_asString", [])])]);
- return self;
- },
- args: ["anObject"],
- source: "show: anObject\x0a textarea ifNil: [self open].\x0a textarea asJQuery val: textarea asJQuery val, anObject asString.",
- messageSends: ["ifNil:", "open", "val:", ",", "asString", "val", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript);
- smalltalk.IDETranscript.klass.iVarNames = ['current'];
- smalltalk.addMethod(
- "_current",
- smalltalk.method({
- selector: "current",
- category: 'instance creation',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@current']) == nil || $receiver == undefined) {
- self['@current'] = smalltalk.send(self, "_new", [], smalltalk.TabWidget.klass);
- $1 = self['@current'];
- } else {
- $1 = self['@current'];
- }
- return $1;
- },
- args: [],
- source: "current\x0a\x09^current ifNil: [current := super new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.Transcript || Transcript, "_register_", [smalltalk.send(self, "_current", [])]);
- return self;
- },
- args: [],
- source: "initialize\x0a\x09Transcript register: self current",
- messageSends: ["register:", "current"],
- referencedClasses: ["Transcript"]
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addMethod(
- "_new",
- smalltalk.method({
- selector: "new",
- category: 'instance creation',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_shouldNotImplement", []);
- return self;
- },
- args: [],
- source: "new\x0a self shouldNotImplement",
- messageSends: ["shouldNotImplement"],
- referencedClasses: []
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addMethod(
- "_open",
- smalltalk.method({
- selector: "open",
- category: 'instance creation',
- fn: function () {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(smalltalk.TabManager || TabManager, "_current", []);
- smalltalk.send($1, "_open", []);
- $2 = smalltalk.send($1, "_selectTab_", [smalltalk.send(self, "_current", [])]);
- return self;
- },
- args: [],
- source: "open\x0a TabManager current \x0a\x09open;\x0a\x09selectTab: self current",
- messageSends: ["open", "current", "selectTab:"],
- referencedClasses: ["TabManager"]
- }),
- smalltalk.IDETranscript.klass);
- smalltalk.addClass('Inspector', smalltalk.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function () {
- var self = this;
- return true;
- },
- args: [],
- source: "canBeClosed\x0a\x09^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_dive",
- smalltalk.method({
- selector: "dive",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_inspect", []);
- return self;
- },
- args: [],
- source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
- messageSends: ["inspect", "at:", "selectedVariable", "variables"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_inspect_",
- smalltalk.method({
- selector: "inspect:",
- category: 'actions',
- fn: function (anObject) {
- var self = this;
- self['@object'] = anObject;
- self['@variables'] = [];
- smalltalk.send(self['@object'], "_inspectOn_", [self]);
- return self;
- },
- args: ["anObject"],
- source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
- messageSends: ["inspectOn:"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@label']) == nil || $receiver == undefined) {
- $1 = "Inspector (nil)";
- } else {
- $1 = self['@label'];
- }
- return $1;
- },
- args: [],
- source: "label\x0a\x09^label ifNil: ['Inspector (nil)']",
- messageSends: ["ifNil:"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_refresh",
- smalltalk.method({
- selector: "refresh",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- smalltalk.send(self, "_inspect_", [self['@object']]);
- smalltalk.send(self, "_updateVariablesList", []);
- $1 = smalltalk.send(self, "_updateValueTextarea", []);
- return self;
- },
- args: [],
- source: "refresh\x0a\x09self \x0a\x09\x09inspect: object; \x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
- messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderBottomPanelOn_",
- smalltalk.method({
- selector: "renderBottomPanelOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $3, $4, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["amber_sourceCode"]);
- $2 = smalltalk.send($1, "_with_", [function () {$3 = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);smalltalk.send($3, "_receiver_", [self['@object']]);smalltalk.send($3, "_onDoIt_", [function () {return smalltalk.send(self, "_refresh", []);}]);$4 = smalltalk.send($3, "_yourself", []);self['@sourceArea'] = $4;self['@sourceArea'];return smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);}]);
- return self;
- },
- args: ["html"],
- source: "renderBottomPanelOn: html\x0a html div\x0a\x09class: 'amber_sourceCode';\x0a\x09with: [\x0a\x09 sourceArea := SourceArea new\x0a\x09\x09receiver: object;\x0a\x09\x09onDoIt: [self refresh];\x0a\x09\x09yourself.\x0a sourceArea renderOn: html]",
- messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1;
- smalltalk.send(self, "_renderTopPanelOn_", [html]);
- $1 = smalltalk.send(self, "_renderBottomPanelOn_", [html]);
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html\x0a\x09self \x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
- messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2, $3, $4, $5, $6;
- $1 = smalltalk.send(html, "_button", []);
- smalltalk.send($1, "_with_", ["DoIt"]);
- $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_doIt", []);}]);
- $3 = smalltalk.send(html, "_button", []);
- smalltalk.send($3, "_with_", ["PrintIt"]);
- $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_printIt", []);}]);
- $5 = smalltalk.send(html, "_button", []);
- smalltalk.send($5, "_with_", ["InspectIt"]);
- $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(smalltalk.send(self, "_sourceArea", []), "_inspectIt", []);}]);
- smalltalk.send(self, "_updateButtons", []);
- return self;
- },
- args: ["html"],
- 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",
- messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_renderTopPanelOn_",
- smalltalk.method({
- selector: "renderTopPanelOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $3, $4, $5, $7, $8, $9, $10, $6, $2, $11;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["top"]);
- $2 = smalltalk.send($1, "_with_", [function () {self['@variablesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column variables"]);self['@variablesList'];$3 = smalltalk.send(html, "_textarea", []);smalltalk.send($3, "_class_", ["amber_column value"]);$4 = smalltalk.send($3, "_at_put_", ["readonly", "readonly"]);self['@valueTextarea'] = $4;self['@valueTextarea'];$5 = smalltalk.send(html, "_div", []);smalltalk.send($5, "_class_", ["amber_tabs inspector"]);$6 = smalltalk.send($5, "_with_", [function () {$7 = smalltalk.send(html, "_button", []);smalltalk.send($7, "_class_", ["amber_button inspector refresh"]);smalltalk.send($7, "_with_", ["Refresh"]);$8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_refresh", []);}]);$8;$9 = smalltalk.send(html, "_button", []);smalltalk.send($9, "_class_", ["amber_button inspector dive"]);smalltalk.send($9, "_with_", ["Dive"]);$10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_dive", []);}]);self['@diveButton'] = $10;return self['@diveButton'];}]);$6;return smalltalk.send(smalltalk.send(html, "_div", []), "_class_", ["amber_clear"]);}]);
- smalltalk.send(self, "_updateVariablesList", []);
- $11 = smalltalk.send(self, "_updateValueTextarea", []);
- return self;
- },
- args: ["html"],
- source: "renderTopPanelOn: html\x0a\x09html div \x0a\x09\x09class: 'top'; \x0a\x09\x09with: [\x0a\x09\x09\x09variablesList := html ul class: 'amber_column variables'.\x0a\x09\x09\x09valueTextarea := html textarea class: 'amber_column value'; at: 'readonly' put: 'readonly'.\x0a\x09\x09\x09html div class: 'amber_tabs inspector'; with: [\x0a\x09\x09\x09\x09html button\x0a\x09\x09\x09\x09\x09class: 'amber_button inspector refresh';\x0a\x09\x09\x09\x09\x09with: 'Refresh';\x0a\x09\x09\x09\x09\x09onClick: [self refresh].\x0a\x09\x09\x09\x09diveButton := html button \x0a\x09\x09\x09\x09\x09class: 'amber_button inspector dive';\x0a\x09\x09\x09\x09\x09with: 'Dive'; \x0a\x09\x09\x09\x09\x09onClick: [self dive]].\x0a\x09\x09\x09html div class: 'amber_clear'].\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea.",
- messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_selectVariable_",
- smalltalk.method({
- selector: "selectVariable:",
- category: 'updating',
- fn: function (aString) {
- var self = this;
- var $1;
- smalltalk.send(self, "_selectedVariable_", [aString]);
- smalltalk.send(self, "_updateVariablesList", []);
- smalltalk.send(self, "_updateValueTextarea", []);
- $1 = smalltalk.send(self, "_updateButtons", []);
- return self;
- },
- args: ["aString"],
- source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self \x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
- messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_selectedVariable",
- smalltalk.method({
- selector: "selectedVariable",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@selectedVariable'];
- },
- args: [],
- source: "selectedVariable\x0a\x09^selectedVariable",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_selectedVariable_",
- smalltalk.method({
- selector: "selectedVariable:",
- category: 'accessing',
- fn: function (aString) {
- var self = this;
- self['@selectedVariable'] = aString;
- return self;
- },
- args: ["aString"],
- source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_setLabel_",
- smalltalk.method({
- selector: "setLabel:",
- category: 'accessing',
- fn: function (aString) {
- var self = this;
- self['@label'] = aString;
- return self;
- },
- args: ["aString"],
- source: "setLabel: aString\x0a\x09label := aString",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_setVariables_",
- smalltalk.method({
- selector: "setVariables:",
- category: 'accessing',
- fn: function (aCollection) {
- var self = this;
- self['@variables'] = aCollection;
- return self;
- },
- args: ["aCollection"],
- source: "setVariables: aCollection\x0a\x09variables := aCollection",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_sourceArea",
- smalltalk.method({
- selector: "sourceArea",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@sourceArea'];
- },
- args: [],
- source: "sourceArea\x0a\x09^sourceArea",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_updateButtons",
- smalltalk.method({
- selector: "updateButtons",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_notNil", []), "_and_", [function () {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_notNil", []);}]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self['@diveButton'], "_removeAt_", ["disabled"]);
- } else {
- smalltalk.send(self['@diveButton'], "_at_put_", ["disabled", true]);
- }
- return self;
- },
- args: [],
- 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']",
- messageSends: ["ifFalse:ifTrue:", "at:put:", "removeAt:", "and:", "notNil", "at:", "selectedVariable", "variables"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_updateValueTextarea",
- smalltalk.method({
- selector: "updateValueTextarea",
- category: 'updating',
- fn: function () {
- var self = this;
- var $2, $1;
- $2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "_isNil", []);
- if (smalltalk.assert($2)) {
- $1 = "";
- } else {
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_at_", [smalltalk.send(self, "_selectedVariable", [])]), "_printString", []);
- }
- smalltalk.send(smalltalk.send(self['@valueTextarea'], "_asJQuery", []), "_val_", [$1]);
- return self;
- },
- args: [],
- source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: ['']\x0a\x09\x09ifFalse: [(self variables at: self selectedVariable) printString])",
- messageSends: ["val:", "ifTrue:ifFalse:", "printString", "at:", "selectedVariable", "variables", "isNil", "asJQuery"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_updateVariablesList",
- smalltalk.method({
- selector: "updateVariablesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(self['@variablesList'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(smalltalk.send(self, "_variables", []), "_keys", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [each]);$1 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_selectVariable_", [each]);}]);$1;$2 = smalltalk.send(smalltalk.send(self, "_selectedVariable", []), "__eq", [each]);if (smalltalk.assert($2)) {return smalltalk.send(li, "_class_", ["selected"]);}}]);}]);
- return self;
- },
- args: [],
- source: "updateVariablesList\x0a\x09variablesList contents: [:html |\x0a\x09\x09self variables keys do: [:each || li |\x0a\x09\x09\x09li := html li.\x0a\x09\x09\x09li\x0a\x09\x09\x09\x09with: each;\x0a\x09\x09\x09\x09onClick: [self selectVariable: each].\x0a\x09\x09\x09self selectedVariable = each ifTrue: [\x0a\x09\x09\x09\x09li class: 'selected']]]",
- messageSends: ["contents:", "do:", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "class:", "=", "selectedVariable", "keys", "variables"],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_variables",
- smalltalk.method({
- selector: "variables",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@variables'];
- },
- args: [],
- source: "variables\x0a\x09^variables",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Inspector);
- smalltalk.addMethod(
- "_on_",
- smalltalk.method({
- selector: "on:",
- category: 'instance creation',
- fn: function (anObject) {
- var self = this;
- var $2, $3, $1;
- $2 = smalltalk.send(self, "_new", []);
- smalltalk.send($2, "_inspect_", [anObject]);
- $3 = smalltalk.send($2, "_yourself", []);
- $1 = $3;
- return $1;
- },
- args: ["anObject"],
- source: "on: anObject\x0a\x09^self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
- messageSends: ["inspect:", "new", "yourself"],
- referencedClasses: []
- }),
- smalltalk.Inspector.klass);
- smalltalk.addClass('ProgressBar', smalltalk.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
- smalltalk.addMethod(
- "_percent",
- smalltalk.method({
- selector: "percent",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@percent']) == nil || $receiver == undefined) {
- $1 = 0;
- } else {
- $1 = self['@percent'];
- }
- return $1;
- },
- args: [],
- source: "percent\x0a\x09^percent ifNil: [0]",
- messageSends: ["ifNil:"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_percent_",
- smalltalk.method({
- selector: "percent:",
- category: 'accessing',
- fn: function (aNumber) {
- var self = this;
- self['@percent'] = aNumber;
- return self;
- },
- args: ["aNumber"],
- source: "percent: aNumber\x0a\x09percent := aNumber",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_renderOn_",
- smalltalk.method({
- selector: "renderOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_div", []);
- smalltalk.send($1, "_class_", ["progress_bar"]);
- $2 = smalltalk.send($1, "_yourself", []);
- self['@div'] = $2;
- smalltalk.send(self, "_renderProgressBar", []);
- return self;
- },
- args: ["html"],
- source: "renderOn: html \x0a\x09div := html div \x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
- messageSends: ["class:", "div", "yourself", "renderProgressBar"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_renderProgressBar",
- smalltalk.method({
- selector: "renderProgressBar",
- category: 'rendering',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(self['@div'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_div", []);smalltalk.send($1, "_class_", ["progress"]);$2 = smalltalk.send($1, "_style_", [smalltalk.send(smalltalk.send("width:", "__comma", [smalltalk.send(smalltalk.send(self, "_percent", []), "_asString", [])]), "__comma", ["%"])]);return $2;}]);
- return self;
- },
- args: [],
- source: "renderProgressBar\x0a\x09div contents: [:html |\x0a\x09\x09html div \x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%']",
- messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addMethod(
- "_updatePercent_",
- smalltalk.method({
- selector: "updatePercent:",
- category: 'updating',
- fn: function (aNumber) {
- var self = this;
- smalltalk.send(self, "_percent_", [aNumber]);
- smalltalk.send(self, "_renderProgressBar", []);
- return self;
- },
- args: ["aNumber"],
- source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
- messageSends: ["percent:", "renderProgressBar"],
- referencedClasses: []
- }),
- smalltalk.ProgressBar);
- smalltalk.addClass('ReferencesBrowser', smalltalk.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
- smalltalk.addMethod(
- "_canBeClosed",
- smalltalk.method({
- selector: "canBeClosed",
- category: 'testing',
- fn: function () {
- var self = this;
- return true;
- },
- args: [],
- source: "canBeClosed\x0a\x09^true",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_classesAndMetaclasses",
- smalltalk.method({
- selector: "classesAndMetaclasses",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.Smalltalk || Smalltalk, "_current", []), "_classes", []), "_collect_", [function (each) {return smalltalk.send(each, "_class", []);}])]);
- return $1;
- },
- args: [],
- source: "classesAndMetaclasses\x0a\x09^Smalltalk current classes, (Smalltalk current classes collect: [:each | each class])",
- messageSends: [",", "collect:", "class", "classes", "current"],
- referencedClasses: ["Smalltalk"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_implementors",
- smalltalk.method({
- selector: "implementors",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@implementors']) == nil ||
- $receiver == undefined) {
- self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@implementors'];
- } else {
- $1 = self['@implementors'];
- }
- return $1;
- },
- args: [],
- source: "implementors\x0a\x09^implementors ifNil: [implementors := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
- self['@selector'] = "";
- return self;
- },
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
- messageSends: ["initialize"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "[References]";
- },
- args: [],
- source: "label\x0a\x09^'[References]'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_matches",
- smalltalk.method({
- selector: "matches",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@matches']) == nil || $receiver == undefined) {
- self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@matches'];
- } else {
- $1 = self['@matches'];
- }
- return $1;
- },
- args: [],
- source: "matches\x0a\x09^matches ifNil: [matches := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_openBrowserOn_",
- smalltalk.method({
- selector: "openBrowserOn:",
- category: 'actions',
- fn: function (aMethod) {
- var self = this;
- var $2, $1, $3, $4;
- var browser;
- $2 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
- if (smalltalk.assert($2)) {
- $1 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_instanceClass", []);
- } else {
- $1 = smalltalk.send(aMethod, "_methodClass", []);
- }
- browser = smalltalk.send(smalltalk.Browser || Browser, "_openOn_", [$1]);
- $3 = smalltalk.send(smalltalk.send(aMethod, "_methodClass", []), "_isMetaclass", []);
- if (smalltalk.assert($3)) {
- smalltalk.send(browser, "_selectTab_", [smalltalk.symbolFor("class")]);
- }
- smalltalk.send(browser, "_selectProtocol_", [smalltalk.send(aMethod, "_category", [])]);
- $4 = smalltalk.send(browser, "_selectMethod_", [aMethod]);
- return self;
- },
- args: ["aMethod"],
- source: "openBrowserOn: aMethod\x0a | browser |\x0a browser := Browser openOn: (aMethod methodClass isMetaclass \x0a\x09\x09ifTrue: [aMethod methodClass instanceClass] ifFalse: [aMethod methodClass]).\x0a aMethod methodClass isMetaclass ifTrue: [browser selectTab: #class].\x0a browser\x0a selectProtocol: aMethod category;\x0a selectMethod: aMethod",
- messageSends: ["openOn:", "ifTrue:ifFalse:", "instanceClass", "methodClass", "isMetaclass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"],
- referencedClasses: ["Browser"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_referencedClasses",
- smalltalk.method({
- selector: "referencedClasses",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@referencedClasses']) == nil ||
- $receiver == undefined) {
- self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@referencedClasses'];
- } else {
- $1 = self['@referencedClasses'];
- }
- return $1;
- },
- args: [],
- source: "referencedClasses\x0a\x09^referencedClasses ifNil: [referencedClasses := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1;
- smalltalk.send(self, "_renderInputOn_", [html]);
- smalltalk.send(self, "_renderImplementorsOn_", [html]);
- smalltalk.send(self, "_renderSendersOn_", [html]);
- smalltalk.send(self, "_renderReferencedClassesOn_", [html]);
- $1 = smalltalk.send(self, "_renderMatchesOn_", [html]);
- return self;
- },
- args: ["html"],
- 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",
- messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderImplementorsOn_",
- smalltalk.method({
- selector: "renderImplementorsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@implementorsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column implementors"]);
- smalltalk.send(self, "_updateImplementorsList", []);
- return self;
- },
- args: ["html"],
- source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
- messageSends: ["class:", "ul", "updateImplementorsList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderInputOn_",
- smalltalk.method({
- selector: "renderInputOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_input", []);
- smalltalk.send($1, "_class_", ["implementors"]);
- $2 = smalltalk.send($1, "_yourself", []);
- self['@input'] = $2;
- smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val_", [self['@selector']]);
- smalltalk.send(self, "_setInputEvents", []);
- return self;
- },
- args: ["html"],
- source: "renderInputOn: html\x0a\x09input := html input \x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
- messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderMatchesOn_",
- smalltalk.method({
- selector: "renderMatchesOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@matchesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column matches"]);
- smalltalk.send(self, "_updateMatchesList", []);
- return self;
- },
- args: ["html"],
- source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
- messageSends: ["class:", "ul", "updateMatchesList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderReferencedClassesOn_",
- smalltalk.method({
- selector: "renderReferencedClassesOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@referencedClassesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column referenced_classes"]);
- smalltalk.send(self, "_updateReferencedClassesList", []);
- return self;
- },
- args: ["html"],
- source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
- messageSends: ["class:", "ul", "updateReferencedClassesList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_renderSendersOn_",
- smalltalk.method({
- selector: "renderSendersOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@sendersList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column senders"]);
- smalltalk.send(self, "_updateSendersList", []);
- return self;
- },
- args: ["html"],
- source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
- messageSends: ["class:", "ul", "updateSendersList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1;
- smalltalk.send(self, "_searchReferencesFor_", [aString]);
- smalltalk.send(self, "_updateImplementorsList", []);
- smalltalk.send(self, "_updateSendersList", []);
- smalltalk.send(self, "_updateReferencedClassesList", []);
- $1 = smalltalk.send(self, "_updateMatchesList", []);
- return self;
- },
- args: ["aString"],
- source: "search: aString\x0a\x09self \x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
- messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchMethodSource",
- smalltalk.method({
- selector: "searchMethodSource",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- var regex;
- regex = smalltalk.send(self['@selector'], "_allButFirst", []);
- smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [function (value) {$1 = smalltalk.send(smalltalk.send(value, "_source", []), "_match_", [regex]);if (smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_matches", []), "_add_", [value]);}}]);}]);
- return self;
- },
- args: [],
- source: "searchMethodSource\x0a\x09| regex |\x0a\x09regex := selector allButFirst.\x0a\x09self classesAndMetaclasses do: [:each |\x0a\x09\x09each methodDictionary values do: [:value |\x0a\x09\x09\x09(value source match: regex) ifTrue: [\x0a\x09\x09\x09\x09self matches add: value]]]",
- messageSends: ["allButFirst", "do:", "ifTrue:", "add:", "matches", "match:", "source", "values", "methodDictionary", "classesAndMetaclasses"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchReferencedClasses",
- smalltalk.method({
- selector: "searchReferencedClasses",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1;
- smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_values", []), "_do_", [function (value) {$1 = smalltalk.send(smalltalk.send(value, "_referencedClasses", []), "_includes_", [self['@selector']]);if (smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_add_", [value]);}}]);}]);
- return self;
- },
- args: [],
- source: "searchReferencedClasses\x0a\x09self classesAndMetaclasses do: [:each |\x0a\x09\x09each methodDictionary values do: [:value |\x0a\x09\x09\x09(value referencedClasses includes: selector) ifTrue: [\x0a\x09\x09\x09\x09self referencedClasses add: value]]]",
- messageSends: ["do:", "ifTrue:", "add:", "referencedClasses", "includes:", "values", "methodDictionary", "classesAndMetaclasses"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchReferencesFor_",
- smalltalk.method({
- selector: "searchReferencesFor:",
- category: 'actions',
- fn: function (aString) {
- var self = this;
- var $1;
- self['@selector'] = aString;
- self['@implementors'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- self['@referencedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- self['@matches'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- smalltalk.send(self, "_searchMethodSource", []);
- $1 = smalltalk.send(self['@selector'], "_match_", ["^[A-Z]"]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self, "_searchReferencedClasses", []);
- } else {
- smalltalk.send(self, "_searchSelectorReferences", []);
- }
- return self;
- },
- args: ["aString"],
- 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]",
- messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "searchSelectorReferences", "searchReferencedClasses", "match:"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_searchSelectorReferences",
- smalltalk.method({
- selector: "searchSelectorReferences",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(smalltalk.send(self, "_classesAndMetaclasses", []), "_do_", [function (each) {return smalltalk.send(smalltalk.send(each, "_methodDictionary", []), "_keysAndValuesDo_", [function (key, value) {$1 = smalltalk.send(key, "__eq", [self['@selector']]);if (smalltalk.assert($1)) {smalltalk.send(smalltalk.send(self, "_implementors", []), "_add_", [value]);}$2 = smalltalk.send(smalltalk.send(value, "_messageSends", []), "_includes_", [self['@selector']]);if (smalltalk.assert($2)) {return smalltalk.send(smalltalk.send(self, "_senders", []), "_add_", [value]);}}]);}]);
- return self;
- },
- args: [],
- 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]]]",
- messageSends: ["do:", "keysAndValuesDo:", "ifTrue:", "add:", "implementors", "=", "senders", "includes:", "messageSends", "methodDictionary", "classesAndMetaclasses"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_selector",
- smalltalk.method({
- selector: "selector",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@selector'];
- },
- args: [],
- source: "selector\x0a\x09^selector",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_senders",
- smalltalk.method({
- selector: "senders",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@senders']) == nil || $receiver == undefined) {
- self['@senders'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@senders'];
- } else {
- $1 = self['@senders'];
- }
- return $1;
- },
- args: [],
- source: "senders\x0a\x09^senders ifNil: [senders := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_setInputEvents",
- smalltalk.method({
- selector: "setInputEvents",
- category: 'private',
- fn: function () {
- var self = this;
- var $1;
- smalltalk.send(self['@input'], "_onKeyUp_", [function () {self['@timer'] = smalltalk.send(function () {return smalltalk.send(self, "_search_", [smalltalk.send(smalltalk.send(self['@input'], "_asJQuery", []), "_val", [])]);}, "_valueWithTimeout_", [100]);return self['@timer'];}]);
- $1 = smalltalk.send(self['@input'], "_onKeyDown_", [function () {if (($receiver = self['@timer']) == nil || $receiver == undefined) {return self['@timer'];} else {return smalltalk.send(self['@timer'], "_clearTimeout", []);}}]);
- return self;
- },
- args: [],
- source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [timer := [self search: input asJQuery val] valueWithTimeout: 100];\x0a\x09\x09onKeyDown: [timer ifNotNil: [timer clearTimeout]]",
- messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateImplementorsList",
- smalltalk.method({
- selector: "updateImplementorsList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3;
- smalltalk.send(self['@implementorsList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Implementors (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_implementors", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_implementors", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(self, "_selector", [])])]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $3;}]);}]);
- return self;
- },
- args: [],
- source: "updateImplementorsList\x0a implementorsList 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 li := html li.\x0a\x09 li\x0a\x09\x09with: (each methodClass asString, ' >> ', self selector);\x0a\x09\x09onClick: [self openBrowserOn: each]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateMatchesList",
- smalltalk.method({
- selector: "updateMatchesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3;
- smalltalk.send(self['@matchesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Regex matches (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_matches", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_matches", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);smalltalk.send(li, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$3 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $3;}]);}]);
- return self;
- },
- args: [],
- source: "updateMatchesList\x0a matchesList 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 li := html li.\x0a\x09 li\x0a\x09\x09with: (each methodClass asString, ' >> ', each selector);\x0a\x09\x09onClick: [self openBrowserOn: each]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateReferencedClassesList",
- smalltalk.method({
- selector: "updateReferencedClassesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4;
- smalltalk.send(self['@referencedClassesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Class references (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_referencedClasses", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $4;}]);}]);
- return self;
- },
- args: [],
- 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]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_updateSendersList",
- smalltalk.method({
- selector: "updateSendersList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4;
- smalltalk.send(self['@sendersList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["column_label"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send("Senders (", "__comma", [smalltalk.send(smalltalk.send(smalltalk.send(self, "_senders", []), "_size", []), "_asString", [])]), "__comma", [")"])]);$2 = smalltalk.send($1, "_style_", ["font-weight: bold"]);$2;return smalltalk.send(smalltalk.send(self, "_senders", []), "_do_", [function (each) {$3 = smalltalk.send(html, "_li", []);smalltalk.send($3, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_methodClass", []), "_asString", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_openBrowserOn_", [each]);}]);return $4;}]);}]);
- return self;
- },
- args: [],
- 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]]]",
- messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "selector", "methodClass", "onClick:", "openBrowserOn:"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser);
- smalltalk.addMethod(
- "_search_",
- smalltalk.method({
- selector: "search:",
- category: 'instance creation',
- fn: function (aString) {
- var self = this;
- var $2, $3, $1;
- $2 = smalltalk.send(self, "_new", []);
- smalltalk.send($2, "_searchReferencesFor_", [aString]);
- $3 = smalltalk.send($2, "_open", []);
- $1 = $3;
- return $1;
- },
- args: ["aString"],
- source: "search: aString\x0a\x09^self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
- messageSends: ["searchReferencesFor:", "new", "open"],
- referencedClasses: []
- }),
- smalltalk.ReferencesBrowser.klass);
- smalltalk.addClass('TestRunner', smalltalk.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
- smalltalk.addMethod(
- "_allClasses",
- smalltalk.method({
- selector: "allClasses",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.TestCase || TestCase, "_allSubclasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(each, "_isAbstract", []), "_not", []);}]);
- return $1;
- },
- args: [],
- source: "allClasses\x0a\x09^TestCase allSubclasses select: [ :each | each isAbstract not ]",
- messageSends: ["select:", "not", "isAbstract", "allSubclasses"],
- referencedClasses: ["TestCase"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_classes",
- smalltalk.method({
- selector: "classes",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_allClasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);}]), "_sort_", [function (a, b) {return smalltalk.send(smalltalk.send(a, "_name", []), "__gt", [smalltalk.send(b, "_name", [])]);}]);
- return $1;
- },
- args: [],
- source: "classes\x0a ^(self allClasses \x0a\x09select: [:each | self selectedCategories includes: each category])\x0a\x09sort: [:a :b | a name > b name]",
- messageSends: ["sort:", ">", "name", "select:", "includes:", "category", "selectedCategories", "allClasses"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_initialize",
- smalltalk.method({
- selector: "initialize",
- category: 'initialization',
- fn: function () {
- var self = this;
- smalltalk.send(self, "_initialize", [], smalltalk.TabWidget);
- self['@result'] = smalltalk.send(smalltalk.TestResult || TestResult, "_new", []);
- return self;
- },
- args: [],
- source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
- messageSends: ["initialize", "new"],
- referencedClasses: ["TestResult"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_isSelectedCategory_",
- smalltalk.method({
- selector: "isSelectedCategory:",
- category: 'testing',
- fn: function (aCategory) {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [aCategory]);
- return $1;
- },
- args: ["aCategory"],
- source: "isSelectedCategory: aCategory\x0a\x09^(self selectedCategories includes: aCategory)",
- messageSends: ["includes:", "selectedCategories"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_isSelectedClass_",
- smalltalk.method({
- selector: "isSelectedClass:",
- category: 'testing',
- fn: function (aClass) {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [aClass]);
- return $1;
- },
- args: ["aClass"],
- source: "isSelectedClass: aClass\x0a\x09^(self selectedClasses includes: aClass)",
- messageSends: ["includes:", "selectedClasses"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "SUnit";
- },
- args: [],
- source: "label\x0a ^'SUnit'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_packages",
- smalltalk.method({
- selector: "packages",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1, $2;
- var packages;
- packages = smalltalk.send(smalltalk.Array || Array, "_new", []);
- smalltalk.send(smalltalk.send(self, "_allClasses", []), "_do_", [function (each) {$1 = smalltalk.send(packages, "_includes_", [smalltalk.send(each, "_category", [])]);if (!smalltalk.assert($1)) {return smalltalk.send(packages, "_add_", [smalltalk.send(each, "_category", [])]);}}]);
- $2 = smalltalk.send(packages, "_sort", []);
- return $2;
- },
- args: [],
- source: "packages\x0a | packages |\x0a packages := Array new.\x0a self allClasses do: [:each |\x0a\x09(packages includes: each category) ifFalse: [\x0a\x09 packages add: each category]].\x0a ^packages sort",
- messageSends: ["new", "do:", "ifFalse:", "add:", "category", "includes:", "allClasses", "sort"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_performFailure_",
- smalltalk.method({
- selector: "performFailure:",
- category: 'actions',
- fn: function (aTestCase){
- var self=this;
- smalltalk.send(aTestCase,"_runCase",[]);
- return self},
- args: ["aTestCase"],
- source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
- messageSends: ["runCase"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printErrors",
- smalltalk.method({
- selector: "printErrors",
- category: 'printing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_size", []), "_asString", []), "__comma", [" errors, "]);
- return $1;
- },
- args: [],
- source: "printErrors\x0a\x09^self result errors size asString , ' errors, '",
- messageSends: [",", "asString", "size", "errors", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printFailures",
- smalltalk.method({
- selector: "printFailures",
- category: 'printing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_size", []), "_asString", []), "__comma", [" failures"]);
- return $1;
- },
- args: [],
- source: "printFailures\x0a\x09^self result failures size asString, ' failures'",
- messageSends: [",", "asString", "size", "failures", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printPasses",
- smalltalk.method({
- selector: "printPasses",
- category: 'printing',
- fn: function (){
- var self=this;
- var $1;
- $1=smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_runs",[]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_errors",[]),"_size",[])]),"__minus",[smalltalk.send(smalltalk.send(smalltalk.send(self,"_result",[]),"_failures",[]),"_size",[])]),"_asString",[]),"__comma",[" passes, "]);
- return $1;
- },
- args: [],
- source: "printPasses\x0a\x09^(self result runs - self result errors size - self result failures size) asString , ' passes, '",
- messageSends: [",", "asString", "-", "size", "failures", "result", "errors", "runs"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_printTotal",
- smalltalk.method({
- selector: "printTotal",
- category: 'printing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_total", []), "_asString", []), "__comma", [" runs, "]);
- return $1;
- },
- args: [],
- source: "printTotal\x0a\x09^self result total asString, ' runs, '",
- messageSends: [",", "asString", "total", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_progressBar",
- smalltalk.method({
- selector: "progressBar",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@progressBar']) == nil || $receiver == undefined) {
- self['@progressBar'] = smalltalk.send(smalltalk.ProgressBar || ProgressBar, "_new", []);
- $1 = self['@progressBar'];
- } else {
- $1 = self['@progressBar'];
- }
- return $1;
- },
- args: [],
- source: "progressBar\x0a\x09^progressBar ifNil: [progressBar := ProgressBar new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["ProgressBar"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1;
- smalltalk.send(self, "_renderCategoriesOn_", [html]);
- smalltalk.send(self, "_renderClassesOn_", [html]);
- $1 = smalltalk.send(self, "_renderResultsOn_", [html]);
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html\x0a self \x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
- messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(html, "_button", []);
- smalltalk.send($1, "_with_", ["Run selected"]);
- $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_run_", [smalltalk.send(self, "_testCases", [])]);}]);
- return self;
- },
- args: ["html"],
- source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [self run: self testCases]",
- messageSends: ["with:", "button", "onClick:", "run:", "testCases"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderCategoriesOn_",
- smalltalk.method({
- selector: "renderCategoriesOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@packagesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit packages"]);
- smalltalk.send(self, "_updateCategoriesList", []);
- return self;
- },
- args: ["html"],
- source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
- messageSends: ["class:", "ul", "updateCategoriesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderClassesOn_",
- smalltalk.method({
- selector: "renderClassesOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@classesList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit classes"]);
- smalltalk.send(self, "_updateClassesList", []);
- return self;
- },
- args: ["html"],
- source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
- messageSends: ["class:", "ul", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderErrorsOn_",
- smalltalk.method({
- selector: "renderErrorsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_errors", []), "_do_", [function (each) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["errors"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_performFailure_", [each]);}]);return $2;}]);
- return self;
- },
- args: ["html"],
- 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 onClick: [self performFailure: each]]",
- messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "errors", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderFailuresOn_",
- smalltalk.method({
- selector: "renderFailuresOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2;
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_result", []), "_failures", []), "_do_", [function (each) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["failures"]);smalltalk.send($1, "_with_", [smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(each, "_class", []), "_name", []), "__comma", [" >> "]), "__comma", [smalltalk.send(each, "_selector", [])])]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_performFailure_", [each]);}]);return $2;}]);
- return self;
- },
- args: ["html"],
- 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 onClick: [self performFailure: each]]",
- messageSends: ["do:", "class:", "li", "with:", ",", "selector", "name", "class", "onClick:", "performFailure:", "failures", "result"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_renderResultsOn_",
- smalltalk.method({
- selector: "renderResultsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@statusDiv'] = smalltalk.send(html, "_div", []);
- smalltalk.send(html, "_with_", [smalltalk.send(self, "_progressBar", [])]);
- self['@methodsList'] = smalltalk.send(smalltalk.send(html, "_ul", []), "_class_", ["amber_column sunit results"]);
- smalltalk.send(self, "_updateMethodsList", []);
- smalltalk.send(self, "_updateStatusDiv", []);
- return self;
- },
- args: ["html"],
- 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",
- messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_result",
- smalltalk.method({
- selector: "result",
- category: 'accessing',
- fn: function () {
- var self = this;
- return self['@result'];
- },
- args: [],
- source: "result\x0a\x09^result",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_run_",
- smalltalk.method({
- selector: "run:",
- category: 'actions',
- fn: function (aCollection){
- var self=this;
- var $1;
- var worker;
- worker=smalltalk.send((smalltalk.TestSuiteRunner || TestSuiteRunner),"_on_",[aCollection]);
- self["@result"]=smalltalk.send(worker,"_result",[]);
- smalltalk.send(smalltalk.send(worker,"_announcer",[]),"_on_do_",[(smalltalk.ResultAnnouncement || ResultAnnouncement),(function(ann){
- $1=smalltalk.send(smalltalk.send(ann,"_result",[]),"__eq_eq",[self["@result"]]);
- if(smalltalk.assert($1)){
- smalltalk.send(smalltalk.send(self,"_progressBar",[]),"_updatePercent_",[smalltalk.send(smalltalk.send(smalltalk.send(self["@result"],"_runs",[]),"__slash",[smalltalk.send(self["@result"],"_total",[])]),"__star",[(100)])]);
- smalltalk.send(self,"_updateStatusDiv",[]);
- return smalltalk.send(self,"_updateMethodsList",[]);
- };
- })]);
- smalltalk.send(worker,"_run",[]);
- return self},
- args: ["aCollection"],
- source: "run: aCollection\x0a| worker |\x0a\x09worker := TestSuiteRunner on: aCollection.\x0a\x09result := worker result.\x0a worker announcer on: ResultAnnouncement do: [:ann |\x0a \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",
- messageSends: ["on:", "result", "on:do:", "ifTrue:", "updatePercent:", "*", "/", "total", "runs", "progressBar", "updateStatusDiv", "updateMethodsList", "==", "announcer", "run"],
- referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectAllCategories",
- smalltalk.method({
- selector: "selectAllCategories",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {$1 = smalltalk.send(self['@selectedCategories'], "_includes_", [each]);if (!smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_add_", [each]);}}]);
- smalltalk.send(self, "_updateCategoriesList", []);
- $2 = smalltalk.send(self, "_updateClassesList", []);
- return self;
- },
- args: [],
- 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 updateCategoriesList;\x0a\x09 updateClassesList",
- messageSends: ["do:", "ifFalse:", "add:", "selectedCategories", "includes:", "packages", "updateCategoriesList", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectAllClasses",
- smalltalk.method({
- selector: "selectAllClasses",
- category: 'actions',
- fn: function () {
- var self = this;
- var $1, $2;
- smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [function (each) {$1 = smalltalk.send(self['@selectedClasses'], "_includes_", [each]);if (!smalltalk.assert($1)) {return smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_add_", [each]);}}]);
- smalltalk.send(self, "_updateCategoriesList", []);
- $2 = smalltalk.send(self, "_updateClassesList", []);
- return self;
- },
- args: [],
- 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 updateCategoriesList;\x0a\x09 updateClassesList",
- messageSends: ["do:", "ifFalse:", "add:", "selectedClasses", "includes:", "classes", "updateCategoriesList", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectedCategories",
- smalltalk.method({
- selector: "selectedCategories",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@selectedCategories']) == nil ||
- $receiver == undefined) {
- self['@selectedCategories'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@selectedCategories'];
- } else {
- $1 = self['@selectedCategories'];
- }
- return $1;
- },
- args: [],
- source: "selectedCategories\x0a\x09^selectedCategories ifNil: [selectedCategories := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_selectedClasses",
- smalltalk.method({
- selector: "selectedClasses",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- if (($receiver = self['@selectedClasses']) == nil ||
- $receiver == undefined) {
- self['@selectedClasses'] = smalltalk.send(smalltalk.Array || Array, "_new", []);
- $1 = self['@selectedClasses'];
- } else {
- $1 = self['@selectedClasses'];
- }
- return $1;
- },
- args: [],
- source: "selectedClasses\x0a\x09^selectedClasses ifNil: [selectedClasses := Array new]",
- messageSends: ["ifNil:", "new"],
- referencedClasses: ["Array"]
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_statusInfo",
- smalltalk.method({
- selector: "statusInfo",
- category: 'accessing',
- fn: function () {
- var self = this;
- var $1;
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(smalltalk.send(self, "_printTotal", []), "__comma", [smalltalk.send(self, "_printPasses", [])]), "__comma", [smalltalk.send(self, "_printErrors", [])]), "__comma", [smalltalk.send(self, "_printFailures", [])]);
- return $1;
- },
- args: [],
- source: "statusInfo\x0a\x09^self printTotal, self printPasses, self printErrors, self printFailures",
- messageSends: [",", "printFailures", "printErrors", "printPasses", "printTotal"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_testCases",
- smalltalk.method({
- selector: "testCases",
- category: 'accessing',
- fn: function () {
- var self = this;
- var testCases;
- testCases = [];
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_select_", [function (each) {return smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [smalltalk.send(each, "_category", [])]);}]), "_do_", [function (each) {return smalltalk.send(testCases, "_addAll_", [smalltalk.send(each, "_buildSuite", [])]);}]);
- return testCases;
- },
- args: [],
- 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",
- messageSends: ["do:", "addAll:", "buildSuite", "select:", "includes:", "category", "selectedCategories", "selectedClasses"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_toggleCategory_",
- smalltalk.method({
- selector: "toggleCategory:",
- category: 'actions',
- fn: function (aCategory) {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(self, "_isSelectedCategory_", [aCategory]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self['@selectedCategories'], "_remove_", [aCategory]);
- } else {
- smalltalk.send(self['@selectedCategories'], "_add_", [aCategory]);
- }
- smalltalk.send(self, "_updateCategoriesList", []);
- $2 = smalltalk.send(self, "_updateClassesList", []);
- return self;
- },
- args: ["aCategory"],
- source: "toggleCategory: aCategory\x0a\x09(self isSelectedCategory: aCategory) \x0a\x09\x09ifFalse: [selectedCategories add: aCategory]\x0a\x09\x09ifTrue: [selectedCategories remove: aCategory].\x0a\x09self \x0a\x09 updateCategoriesList;\x0a\x09 updateClassesList",
- messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedCategory:", "updateCategoriesList", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_toggleClass_",
- smalltalk.method({
- selector: "toggleClass:",
- category: 'actions',
- fn: function (aClass) {
- var self = this;
- var $1;
- $1 = smalltalk.send(self, "_isSelectedClass_", [aClass]);
- if (smalltalk.assert($1)) {
- smalltalk.send(self['@selectedClasses'], "_remove_", [aClass]);
- } else {
- smalltalk.send(self['@selectedClasses'], "_add_", [aClass]);
- }
- smalltalk.send(self, "_updateClassesList", []);
- return self;
- },
- args: ["aClass"],
- source: "toggleClass: aClass\x0a\x09(self isSelectedClass: aClass) \x0a\x09\x09ifFalse: [selectedClasses add: aClass]\x0a\x09\x09ifTrue: [selectedClasses remove: aClass].\x0a\x09self \x0a\x09 updateClassesList",
- messageSends: ["ifFalse:ifTrue:", "add:", "remove:", "isSelectedClass:", "updateClassesList"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateCategoriesList",
- smalltalk.method({
- selector: "updateCategoriesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4;
- smalltalk.send(self['@packagesList'], "_contents_", [function (html) {$1 = smalltalk.send(html, "_li", []);smalltalk.send($1, "_class_", ["all"]);smalltalk.send($1, "_with_", ["All"]);$2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_selectAllCategories", []);}]);$2;return smalltalk.send(smalltalk.send(self, "_packages", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$3 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_includes_", [each]);if (smalltalk.assert($3)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [each]);$4 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_toggleCategory_", [each]);}]);return $4;}]);}]);
- return self;
- },
- args: [],
- source: "updateCategoriesList\x0a packagesList contents: [:html |\x0a\x09 html li \x0a\x09\x09class: 'all';\x0a\x09\x09with: 'All';\x0a\x09\x09onClick: [self selectAllCategories].\x0a\x09self packages do: [:each || li |\x0a\x09 li := html li.\x0a\x09 (self selectedCategories includes: each) ifTrue: [\x0a\x09\x09li class: 'selected'].\x0a\x09 li\x0a\x09\x09with: each;\x0a\x09\x09onClick: [self toggleCategory: each]]]",
- messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:", "packages"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateClassesList",
- smalltalk.method({
- selector: "updateClassesList",
- category: 'updating',
- fn: function () {
- var self = this;
- var $1, $2, $3, $4, $5;
- smalltalk.send(self['@classesList'], "_contents_", [function (html) {$1 = smalltalk.send(smalltalk.send(self, "_selectedCategories", []), "_isEmpty", []);if (!smalltalk.assert($1)) {$2 = smalltalk.send(html, "_li", []);smalltalk.send($2, "_class_", ["all"]);smalltalk.send($2, "_with_", ["All"]);$3 = smalltalk.send($2, "_onClick_", [function () {return smalltalk.send(self, "_selectAllClasses", []);}]);$3;}return smalltalk.send(smalltalk.send(self, "_classes", []), "_do_", [function (each) {var li;li = smalltalk.send(html, "_li", []);$4 = smalltalk.send(smalltalk.send(self, "_selectedClasses", []), "_includes_", [each]);if (smalltalk.assert($4)) {smalltalk.send(li, "_class_", ["selected"]);}smalltalk.send(li, "_with_", [smalltalk.send(each, "_name", [])]);$5 = smalltalk.send(li, "_onClick_", [function () {return smalltalk.send(self, "_toggleClass_", [each]);}]);return $5;}]);}]);
- return self;
- },
- args: [],
- source: "updateClassesList\x0a classesList 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]]]",
- messageSends: ["contents:", "ifFalse:", "class:", "li", "with:", "onClick:", "selectAllClasses", "isEmpty", "selectedCategories", "do:", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:", "classes"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateMethodsList",
- smalltalk.method({
- selector: "updateMethodsList",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self['@methodsList'], "_contents_", [function (html) {smalltalk.send(self, "_renderErrorsOn_", [html]);return smalltalk.send(self, "_renderFailuresOn_", [html]);}]);
- return self;
- },
- args: [],
- source: "updateMethodsList\x0a\x09methodsList contents: [:html |\x0a\x09\x09self renderErrorsOn: html.\x0a self renderFailuresOn: html]",
- messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addMethod(
- "_updateStatusDiv",
- smalltalk.method({
- selector: "updateStatusDiv",
- category: 'updating',
- fn: function () {
- var self = this;
- smalltalk.send(self['@statusDiv'], "_class_", [smalltalk.send("sunit status ", "__comma", [smalltalk.send(self['@result'], "_status", [])])]);
- smalltalk.send(self['@statusDiv'], "_contents_", [function (html) {return smalltalk.send(smalltalk.send(html, "_span", []), "_with_", [smalltalk.send(self, "_statusInfo", [])]);}]);
- return self;
- },
- args: [],
- source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [:html |\x0a\x09\x09html span with: self statusInfo]",
- messageSends: ["class:", ",", "status", "contents:", "with:", "statusInfo", "span"],
- referencedClasses: []
- }),
- smalltalk.TestRunner);
- smalltalk.addClass('Workspace', smalltalk.TabWidget, ['sourceArea'], 'IDE');
- smalltalk.addMethod(
- "_clearWorkspace",
- smalltalk.method({
- selector: "clearWorkspace",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@sourceArea'], "_clear", []);
- return self;
- },
- args: [],
- source: "clearWorkspace\x0a sourceArea clear",
- messageSends: ["clear"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_doIt",
- smalltalk.method({
- selector: "doIt",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@sourceArea'], "_doIt", []);
- return self;
- },
- args: [],
- source: "doIt\x0a sourceArea doIt",
- messageSends: ["doIt"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_fileIn",
- smalltalk.method({
- selector: "fileIn",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@sourceArea'], "_fileIn", []);
- return self;
- },
- args: [],
- source: "fileIn\x0a sourceArea fileIn",
- messageSends: ["fileIn"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_inspectIt",
- smalltalk.method({
- selector: "inspectIt",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@sourceArea'], "_inspectIt", []);
- return self;
- },
- args: [],
- source: "inspectIt\x0a sourceArea inspectIt",
- messageSends: ["inspectIt"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_label",
- smalltalk.method({
- selector: "label",
- category: 'accessing',
- fn: function () {
- var self = this;
- return "Workspace";
- },
- args: [],
- source: "label\x0a ^'Workspace'",
- messageSends: [],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_printIt",
- smalltalk.method({
- selector: "printIt",
- category: 'actions',
- fn: function () {
- var self = this;
- smalltalk.send(self['@sourceArea'], "_printIt", []);
- return self;
- },
- args: [],
- source: "printIt\x0a\x09sourceArea printIt",
- messageSends: ["printIt"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_renderBoxOn_",
- smalltalk.method({
- selector: "renderBoxOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- self['@sourceArea'] = smalltalk.send(smalltalk.SourceArea || SourceArea, "_new", []);
- smalltalk.send(self['@sourceArea'], "_renderOn_", [html]);
- return self;
- },
- args: ["html"],
- source: "renderBoxOn: html\x0a sourceArea := SourceArea new.\x0a sourceArea renderOn: html",
- messageSends: ["new", "renderOn:"],
- referencedClasses: ["SourceArea"]
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_renderButtonsOn_",
- smalltalk.method({
- selector: "renderButtonsOn:",
- category: 'rendering',
- fn: function (html) {
- var self = this;
- var $1, $2, $3, $4, $5, $6, $7, $8, $9, $10;
- $1 = smalltalk.send(html, "_button", []);
- smalltalk.send($1, "_with_", ["DoIt"]);
- smalltalk.send($1, "_title_", ["ctrl+d"]);
- $2 = smalltalk.send($1, "_onClick_", [function () {return smalltalk.send(self, "_doIt", []);}]);
- $3 = smalltalk.send(html, "_button", []);
- smalltalk.send($3, "_with_", ["PrintIt"]);
- smalltalk.send($3, "_title_", ["ctrl+p"]);
- $4 = smalltalk.send($3, "_onClick_", [function () {return smalltalk.send(self, "_printIt", []);}]);
- $5 = smalltalk.send(html, "_button", []);
- smalltalk.send($5, "_with_", ["InspectIt"]);
- smalltalk.send($5, "_title_", ["ctrl+i"]);
- $6 = smalltalk.send($5, "_onClick_", [function () {return smalltalk.send(self, "_inspectIt", []);}]);
- $7 = smalltalk.send(html, "_button", []);
- smalltalk.send($7, "_with_", ["FileIn"]);
- smalltalk.send($7, "_title_", ["ctrl+f"]);
- $8 = smalltalk.send($7, "_onClick_", [function () {return smalltalk.send(self, "_fileIn", []);}]);
- $9 = smalltalk.send(html, "_button", []);
- smalltalk.send($9, "_with_", ["Clear workspace"]);
- $10 = smalltalk.send($9, "_onClick_", [function () {return smalltalk.send(self, "_clearWorkspace", []);}]);
- return self;
- },
- args: ["html"],
- source: "renderButtonsOn: html\x0a html button\x0a\x09with: 'DoIt';\x0a\x09title: 'ctrl+d';\x0a\x09onClick: [self doIt].\x0a html button\x0a\x09with: 'PrintIt';\x0a\x09title: 'ctrl+p';\x0a\x09onClick: [self printIt].\x0a html button\x0a\x09with: 'InspectIt';\x0a\x09title: 'ctrl+i';\x0a\x09onClick: [self inspectIt].\x0a html button\x0a\x09with: 'FileIn';\x0a\x09title: 'ctrl+f';\x0a\x09onClick: [self fileIn].\x0a html button\x0a\x09with: 'Clear workspace';\x0a\x09onClick: [self clearWorkspace]",
- messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_show",
- smalltalk.method({
- selector: "show",
- category: 'actions',
- fn: function (){
- var self=this;
- smalltalk.send(self,"_show",[],smalltalk.TabWidget);
- smalltalk.send(self["@sourceArea"],"_focus",[]);
- return self},
- args: [],
- source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
- messageSends: ["show", "focus"],
- referencedClasses: []
- }),
- smalltalk.Workspace);
- smalltalk.addMethod(
- "_inspect",
- smalltalk.method({
- selector: "inspect",
- category: '*IDE',
- fn: function () {
- var self = this;
- var $1, $2;
- $1 = smalltalk.send(smalltalk.Inspector || Inspector, "_new", []);
- smalltalk.send($1, "_inspect_", [self]);
- $2 = smalltalk.send($1, "_open", []);
- return self;
- },
- args: [],
- source: "inspect\x0a\x09Inspector new \x0a\x09\x09inspect: self;\x0a\x09\x09open",
- messageSends: ["inspect:", "new", "open"],
- referencedClasses: ["Inspector"]
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_allInstanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09self class allInstanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each)].\x0a\x09anInspector \x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
- messageSends: ["new", "at:put:", "do:", "instVarAt:", "allInstanceVariableNames", "class", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Object);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(self, "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Collection);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(variables, "_at_put_", ["#keys", smalltalk.send(self, "_keys", [])]);
- smalltalk.send(self, "_keysAndValuesDo_", [function (key, value) {return smalltalk.send(variables, "_at_put_", [key, value]);}]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "keys", "keysAndValuesDo:", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.HashedCollection);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var label;
- smalltalk.send(self, "_inspectOn_", [anInspector], smalltalk.CharacterArray);
- $1 = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_size", []), "__gt", [30]);
- if (smalltalk.assert($1)) {
- label = smalltalk.send(smalltalk.send(smalltalk.send(self, "_printString", []), "_copyFrom_to_", [1, 30]), "__comma", ["...'"]);
- } else {
- label = smalltalk.send(self, "_printString", []);
- }
- smalltalk.send(anInspector, "_setLabel_", [label]);
- return self;
- },
- args: ["anInspector"],
- 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",
- messageSends: ["inspectOn:", "ifTrue:ifFalse:", ",", "copyFrom:to:", "printString", ">", "size", "setLabel:"],
- referencedClasses: []
- }),
- smalltalk.String);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(self['@elements'], "_withIndexDo_", [function (each, i) {return smalltalk.send(variables, "_at_put_", [i, each]);}]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09elements withIndexDo: [:each :i |\x0a\x09\x09variables at: i put: each].\x0a\x09anInspector \x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
- messageSends: ["new", "at:put:", "withIndexDo:", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Set);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
- smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
- smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
- smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
- smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
- smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
- smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Date);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(variables, "_at_put_", ["#year", smalltalk.send(self, "_year", [])]);
- smalltalk.send(variables, "_at_put_", ["#month", smalltalk.send(self, "_month", [])]);
- smalltalk.send(variables, "_at_put_", ["#day", smalltalk.send(self, "_day", [])]);
- smalltalk.send(variables, "_at_put_", ["#hours", smalltalk.send(self, "_hours", [])]);
- smalltalk.send(variables, "_at_put_", ["#minutes", smalltalk.send(self, "_minutes", [])]);
- smalltalk.send(variables, "_at_put_", ["#seconds", smalltalk.send(self, "_seconds", [])]);
- smalltalk.send(variables, "_at_put_", ["#milliseconds", smalltalk.send(self, "_milliseconds", [])]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- 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",
- messageSends: ["new", "at:put:", "year", "month", "day", "hours", "minutes", "seconds", "milliseconds", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.Date);
- smalltalk.addMethod(
- "_inspectOn_",
- smalltalk.method({
- selector: "inspectOn:",
- category: '*IDE',
- fn: function (anInspector) {
- var self = this;
- var $1;
- var variables;
- variables = smalltalk.send(smalltalk.Dictionary || Dictionary, "_new", []);
- smalltalk.send(variables, "_at_put_", ["#self", self]);
- smalltalk.send(variables, "_at_put_", ["#home", smalltalk.send(self, "_home", [])]);
- smalltalk.send(variables, "_at_put_", ["#receiver", smalltalk.send(self, "_receiver", [])]);
- smalltalk.send(variables, "_at_put_", ["#selector", smalltalk.send(self, "_selector", [])]);
- smalltalk.send(variables, "_at_put_", ["#temps", smalltalk.send(self, "_temps", [])]);
- smalltalk.send(smalltalk.send(smalltalk.send(self, "_class", []), "_instanceVariableNames", []), "_do_", [function (each) {return smalltalk.send(variables, "_at_put_", [each, smalltalk.send(self, "_instVarAt_", [each])]);}]);
- smalltalk.send(anInspector, "_setLabel_", [smalltalk.send(self, "_printString", [])]);
- $1 = smalltalk.send(anInspector, "_setVariables_", [variables]);
- return self;
- },
- args: ["anInspector"],
- source: "inspectOn: anInspector\x0a\x09| variables |\x0a\x09variables := Dictionary new.\x0a\x09variables at: '#self' put: self.\x0a\x09variables at: '#home' put: self home.\x0a\x09variables at: '#receiver' put: self receiver.\x0a\x09variables at: '#selector' put: self selector.\x0a\x09variables at: '#temps' put: self temps.\x0a\x09self class instanceVariableNames do: [:each |\x0a\x09\x09variables at: each put: (self instVarAt: each)].\x0a\x09anInspector \x0a\x09\x09setLabel: self printString;\x0a\x09\x09setVariables: variables",
- messageSends: ["new", "at:put:", "home", "receiver", "selector", "temps", "do:", "instVarAt:", "instanceVariableNames", "class", "setLabel:", "printString", "setVariables:"],
- referencedClasses: ["Dictionary"]
- }),
- smalltalk.MethodContext);
|