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