IDE.js 358 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511
  1. define(["amber/boot"
  2. //>>excludeStart("imports", pragmas.excludeImports);
  3. , "codemirror/addon/hint/show-hint", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"
  4. //>>excludeEnd("imports");
  5. , "amber/web/Web", "amber_core/Kernel-Objects"], function($boot
  6. //>>excludeStart("imports", pragmas.excludeImports);
  7. //>>excludeEnd("imports");
  8. ){"use strict";
  9. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  10. var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  11. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  12. $core.addPackage('IDE');
  13. $core.packages["IDE"].innerEval = function (expr) { return eval(expr); };
  14. $core.packages["IDE"].imports = ["codemirror/addon/hint/show-hint", "codemirror/lib/codemirror", "codemirror/mode/smalltalk/smalltalk", "css!./resources/amber", "css!codemirror/addon/hint/show-hint", "css!codemirror/lib/codemirror", "css!codemirror/theme/ambiance", "jquery-ui"];
  15. $core.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
  16. $core.addClass('ClassesList', $globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  17. $core.addMethod(
  18. $core.method({
  19. selector: "browser",
  20. protocol: 'accessing',
  21. fn: function (){
  22. var self=this;
  23. return self["@browser"];
  24. },
  25. //>>excludeStart("ide", pragmas.excludeIdeData);
  26. args: [],
  27. source: "browser\x0a\x09^ browser",
  28. referencedClasses: [],
  29. //>>excludeEnd("ide");
  30. messageSends: []
  31. }),
  32. $globals.ClassesList);
  33. $core.addMethod(
  34. $core.method({
  35. selector: "browser:",
  36. protocol: 'accessing',
  37. fn: function (aBrowser){
  38. var self=this;
  39. self["@browser"]=aBrowser;
  40. return self;
  41. },
  42. //>>excludeStart("ide", pragmas.excludeIdeData);
  43. args: ["aBrowser"],
  44. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  45. referencedClasses: [],
  46. //>>excludeEnd("ide");
  47. messageSends: []
  48. }),
  49. $globals.ClassesList);
  50. $core.addMethod(
  51. $core.method({
  52. selector: "category",
  53. protocol: 'accessing',
  54. fn: function (){
  55. var self=this;
  56. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  57. return $core.withContext(function($ctx1) {
  58. //>>excludeEnd("ctx");
  59. return $recv(self._browser())._selectedPackage();
  60. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  61. }, function($ctx1) {$ctx1.fill(self,"category",{},$globals.ClassesList)});
  62. //>>excludeEnd("ctx");
  63. },
  64. //>>excludeStart("ide", pragmas.excludeIdeData);
  65. args: [],
  66. source: "category\x0a\x09^ self browser selectedPackage",
  67. referencedClasses: [],
  68. //>>excludeEnd("ide");
  69. messageSends: ["selectedPackage", "browser"]
  70. }),
  71. $globals.ClassesList);
  72. $core.addMethod(
  73. $core.method({
  74. selector: "getNodes",
  75. protocol: 'accessing',
  76. fn: function (){
  77. var self=this;
  78. var classes,children,others;
  79. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  80. return $core.withContext(function($ctx1) {
  81. //>>excludeEnd("ctx");
  82. var $1,$2;
  83. $1=self._browser();
  84. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  85. $ctx1.sendIdx["browser"]=1;
  86. //>>excludeEnd("ctx");
  87. classes=$recv($1)._classes();
  88. children=[];
  89. others=[];
  90. $recv(classes)._do_((function(each){
  91. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  92. return $core.withContext(function($ctx2) {
  93. //>>excludeEnd("ctx");
  94. $2=$recv(classes)._includes_($recv(each)._superclass());
  95. if($core.assert($2)){
  96. return $recv(others)._add_(each);
  97. } else {
  98. return $recv(children)._add_(each);
  99. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  100. $ctx2.sendIdx["add:"]=1;
  101. //>>excludeEnd("ctx");
  102. }
  103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  104. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  105. //>>excludeEnd("ctx");
  106. }));
  107. return $recv(children)._collect_((function(each){
  108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  109. return $core.withContext(function($ctx2) {
  110. //>>excludeEnd("ctx");
  111. return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,self._browser(),others,(0));
  112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  113. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  114. //>>excludeEnd("ctx");
  115. }));
  116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  117. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},$globals.ClassesList)});
  118. //>>excludeEnd("ctx");
  119. },
  120. //>>excludeStart("ide", pragmas.excludeIdeData);
  121. args: [],
  122. 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 ]",
  123. referencedClasses: ["ClassesListNode"],
  124. //>>excludeEnd("ide");
  125. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"]
  126. }),
  127. $globals.ClassesList);
  128. $core.addMethod(
  129. $core.method({
  130. selector: "nodes",
  131. protocol: 'accessing',
  132. fn: function (){
  133. var self=this;
  134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  135. return $core.withContext(function($ctx1) {
  136. //>>excludeEnd("ctx");
  137. var $1,$receiver;
  138. $1=self["@nodes"];
  139. if(($receiver = $1) == null || $receiver.isNil){
  140. self["@nodes"]=self._getNodes();
  141. self["@nodes"];
  142. } else {
  143. $1;
  144. }
  145. return self["@nodes"];
  146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  147. }, function($ctx1) {$ctx1.fill(self,"nodes",{},$globals.ClassesList)});
  148. //>>excludeEnd("ctx");
  149. },
  150. //>>excludeStart("ide", pragmas.excludeIdeData);
  151. args: [],
  152. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  153. referencedClasses: [],
  154. //>>excludeEnd("ide");
  155. messageSends: ["ifNil:", "getNodes"]
  156. }),
  157. $globals.ClassesList);
  158. $core.addMethod(
  159. $core.method({
  160. selector: "renderOn:",
  161. protocol: 'rendering',
  162. fn: function (html){
  163. var self=this;
  164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  165. return $core.withContext(function($ctx1) {
  166. //>>excludeEnd("ctx");
  167. var $1;
  168. $1=$recv(html)._ul();
  169. $recv($1)._class_("amber_column browser classes");
  170. self["@ul"]=$recv($1)._yourself();
  171. self._updateNodes();
  172. return self;
  173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  174. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.ClassesList)});
  175. //>>excludeEnd("ctx");
  176. },
  177. //>>excludeStart("ide", pragmas.excludeIdeData);
  178. args: ["html"],
  179. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  180. referencedClasses: [],
  181. //>>excludeEnd("ide");
  182. messageSends: ["class:", "ul", "yourself", "updateNodes"]
  183. }),
  184. $globals.ClassesList);
  185. $core.addMethod(
  186. $core.method({
  187. selector: "resetNodes",
  188. protocol: 'accessing',
  189. fn: function (){
  190. var self=this;
  191. self["@nodes"]=nil;
  192. return self;
  193. },
  194. //>>excludeStart("ide", pragmas.excludeIdeData);
  195. args: [],
  196. source: "resetNodes\x0a\x09nodes := nil",
  197. referencedClasses: [],
  198. //>>excludeEnd("ide");
  199. messageSends: []
  200. }),
  201. $globals.ClassesList);
  202. $core.addMethod(
  203. $core.method({
  204. selector: "updateNodes",
  205. protocol: 'rendering',
  206. fn: function (){
  207. var self=this;
  208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  209. return $core.withContext(function($ctx1) {
  210. //>>excludeEnd("ctx");
  211. $recv(self["@ul"])._contents_((function(html){
  212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  213. return $core.withContext(function($ctx2) {
  214. //>>excludeEnd("ctx");
  215. return $recv(self._nodes())._do_((function(each){
  216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  217. return $core.withContext(function($ctx3) {
  218. //>>excludeEnd("ctx");
  219. return $recv(each)._renderOn_(html);
  220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  221. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  222. //>>excludeEnd("ctx");
  223. }));
  224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  225. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  226. //>>excludeEnd("ctx");
  227. }));
  228. return self;
  229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  230. }, function($ctx1) {$ctx1.fill(self,"updateNodes",{},$globals.ClassesList)});
  231. //>>excludeEnd("ctx");
  232. },
  233. //>>excludeStart("ide", pragmas.excludeIdeData);
  234. args: [],
  235. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  236. referencedClasses: [],
  237. //>>excludeEnd("ide");
  238. messageSends: ["contents:", "do:", "nodes", "renderOn:"]
  239. }),
  240. $globals.ClassesList);
  241. $core.addMethod(
  242. $core.method({
  243. selector: "on:",
  244. protocol: 'instance creation',
  245. fn: function (aBrowser){
  246. var self=this;
  247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  248. return $core.withContext(function($ctx1) {
  249. //>>excludeEnd("ctx");
  250. var $1;
  251. $1=self._new();
  252. $recv($1)._browser_(aBrowser);
  253. return $recv($1)._yourself();
  254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  255. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},$globals.ClassesList.klass)});
  256. //>>excludeEnd("ctx");
  257. },
  258. //>>excludeStart("ide", pragmas.excludeIdeData);
  259. args: ["aBrowser"],
  260. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  261. referencedClasses: [],
  262. //>>excludeEnd("ide");
  263. messageSends: ["browser:", "new", "yourself"]
  264. }),
  265. $globals.ClassesList.klass);
  266. $core.addClass('ClassesListNode', $globals.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  267. $core.addMethod(
  268. $core.method({
  269. selector: "browser",
  270. protocol: 'accessing',
  271. fn: function (){
  272. var self=this;
  273. return self["@browser"];
  274. },
  275. //>>excludeStart("ide", pragmas.excludeIdeData);
  276. args: [],
  277. source: "browser\x0a\x09^ browser",
  278. referencedClasses: [],
  279. //>>excludeEnd("ide");
  280. messageSends: []
  281. }),
  282. $globals.ClassesListNode);
  283. $core.addMethod(
  284. $core.method({
  285. selector: "browser:",
  286. protocol: 'accessing',
  287. fn: function (aBrowser){
  288. var self=this;
  289. self["@browser"]=aBrowser;
  290. return self;
  291. },
  292. //>>excludeStart("ide", pragmas.excludeIdeData);
  293. args: ["aBrowser"],
  294. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  295. referencedClasses: [],
  296. //>>excludeEnd("ide");
  297. messageSends: []
  298. }),
  299. $globals.ClassesListNode);
  300. $core.addMethod(
  301. $core.method({
  302. selector: "getNodesFrom:",
  303. protocol: 'accessing',
  304. fn: function (aCollection){
  305. var self=this;
  306. var children,others;
  307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  308. return $core.withContext(function($ctx1) {
  309. //>>excludeEnd("ctx");
  310. var $1;
  311. children=[];
  312. others=[];
  313. $recv(aCollection)._do_((function(each){
  314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  315. return $core.withContext(function($ctx2) {
  316. //>>excludeEnd("ctx");
  317. $1=$recv($recv(each)._superclass()).__eq(self._theClass());
  318. if($core.assert($1)){
  319. return $recv(children)._add_(each);
  320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  321. $ctx2.sendIdx["add:"]=1;
  322. //>>excludeEnd("ctx");
  323. } else {
  324. return $recv(others)._add_(each);
  325. }
  326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  327. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  328. //>>excludeEnd("ctx");
  329. }));
  330. self["@nodes"]=$recv(children)._collect_((function(each){
  331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  332. return $core.withContext(function($ctx2) {
  333. //>>excludeEnd("ctx");
  334. return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,self._browser(),others,$recv(self._level()).__plus((1)));
  335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  336. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  337. //>>excludeEnd("ctx");
  338. }));
  339. return self;
  340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  341. }, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},$globals.ClassesListNode)});
  342. //>>excludeEnd("ctx");
  343. },
  344. //>>excludeStart("ide", pragmas.excludeIdeData);
  345. args: ["aCollection"],
  346. 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 ]",
  347. referencedClasses: ["ClassesListNode"],
  348. //>>excludeEnd("ide");
  349. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"]
  350. }),
  351. $globals.ClassesListNode);
  352. $core.addMethod(
  353. $core.method({
  354. selector: "label",
  355. protocol: 'accessing',
  356. fn: function (){
  357. var self=this;
  358. var str;
  359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  360. return $core.withContext(function($ctx1) {
  361. //>>excludeEnd("ctx");
  362. str=$recv($recv($globals.String)._new())._writeStream();
  363. $recv(self._level())._timesRepeat_((function(){
  364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  365. return $core.withContext(function($ctx2) {
  366. //>>excludeEnd("ctx");
  367. return $recv(str)._nextPutAll_("    ");
  368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  369. $ctx2.sendIdx["nextPutAll:"]=1;
  370. //>>excludeEnd("ctx");
  371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  372. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  373. //>>excludeEnd("ctx");
  374. }));
  375. $recv(str)._nextPutAll_($recv(self._theClass())._name());
  376. return $recv(str)._contents();
  377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  378. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},$globals.ClassesListNode)});
  379. //>>excludeEnd("ctx");
  380. },
  381. //>>excludeStart("ide", pragmas.excludeIdeData);
  382. args: [],
  383. 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",
  384. referencedClasses: ["String"],
  385. //>>excludeEnd("ide");
  386. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"]
  387. }),
  388. $globals.ClassesListNode);
  389. $core.addMethod(
  390. $core.method({
  391. selector: "level",
  392. protocol: 'accessing',
  393. fn: function (){
  394. var self=this;
  395. return self["@level"];
  396. },
  397. //>>excludeStart("ide", pragmas.excludeIdeData);
  398. args: [],
  399. source: "level\x0a\x09^ level",
  400. referencedClasses: [],
  401. //>>excludeEnd("ide");
  402. messageSends: []
  403. }),
  404. $globals.ClassesListNode);
  405. $core.addMethod(
  406. $core.method({
  407. selector: "level:",
  408. protocol: 'accessing',
  409. fn: function (anInteger){
  410. var self=this;
  411. self["@level"]=anInteger;
  412. return self;
  413. },
  414. //>>excludeStart("ide", pragmas.excludeIdeData);
  415. args: ["anInteger"],
  416. source: "level: anInteger\x0a\x09level := anInteger",
  417. referencedClasses: [],
  418. //>>excludeEnd("ide");
  419. messageSends: []
  420. }),
  421. $globals.ClassesListNode);
  422. $core.addMethod(
  423. $core.method({
  424. selector: "nodes",
  425. protocol: 'accessing',
  426. fn: function (){
  427. var self=this;
  428. return self["@nodes"];
  429. },
  430. //>>excludeStart("ide", pragmas.excludeIdeData);
  431. args: [],
  432. source: "nodes\x0a\x09^ nodes",
  433. referencedClasses: [],
  434. //>>excludeEnd("ide");
  435. messageSends: []
  436. }),
  437. $globals.ClassesListNode);
  438. $core.addMethod(
  439. $core.method({
  440. selector: "renderOn:",
  441. protocol: 'rendering',
  442. fn: function (html){
  443. var self=this;
  444. var li,cssClass;
  445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  446. return $core.withContext(function($ctx1) {
  447. //>>excludeEnd("ctx");
  448. var $1,$2,$4,$5,$3;
  449. cssClass="";
  450. li=$recv($recv(html)._li())._onClick_((function(){
  451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  452. return $core.withContext(function($ctx2) {
  453. //>>excludeEnd("ctx");
  454. $1=self._browser();
  455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  456. $ctx2.sendIdx["browser"]=1;
  457. //>>excludeEnd("ctx");
  458. $2=self._theClass();
  459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  460. $ctx2.sendIdx["theClass"]=1;
  461. //>>excludeEnd("ctx");
  462. return $recv($1)._selectClass_($2);
  463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  464. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  465. //>>excludeEnd("ctx");
  466. }));
  467. $recv($recv(li)._asJQuery())._html_(self._label());
  468. $4=$recv(self._browser())._selectedClass();
  469. $5=self._theClass();
  470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  471. $ctx1.sendIdx["theClass"]=2;
  472. //>>excludeEnd("ctx");
  473. $3=$recv($4).__eq($5);
  474. if($core.assert($3)){
  475. cssClass=$recv(cssClass).__comma(" selected");
  476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  477. $ctx1.sendIdx[","]=1;
  478. //>>excludeEnd("ctx");
  479. cssClass;
  480. }
  481. $recv($recv(self._theClass())._comment())._ifNotEmpty_((function(){
  482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  483. return $core.withContext(function($ctx2) {
  484. //>>excludeEnd("ctx");
  485. cssClass=$recv(cssClass).__comma(" commented");
  486. return cssClass;
  487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  488. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  489. //>>excludeEnd("ctx");
  490. }));
  491. $recv(li)._class_(cssClass);
  492. $recv(self._nodes())._do_((function(each){
  493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  494. return $core.withContext(function($ctx2) {
  495. //>>excludeEnd("ctx");
  496. return $recv(each)._renderOn_(html);
  497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  498. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  499. //>>excludeEnd("ctx");
  500. }));
  501. return self;
  502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  503. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},$globals.ClassesListNode)});
  504. //>>excludeEnd("ctx");
  505. },
  506. //>>excludeStart("ide", pragmas.excludeIdeData);
  507. args: ["html"],
  508. 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 ifNotEmpty: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [ :each |\x0a\x09\x09each renderOn: html ]",
  509. referencedClasses: [],
  510. //>>excludeEnd("ide");
  511. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifNotEmpty:", "comment", "class:", "do:", "nodes", "renderOn:"]
  512. }),
  513. $globals.ClassesListNode);
  514. $core.addMethod(
  515. $core.method({
  516. selector: "theClass",
  517. protocol: 'accessing',
  518. fn: function (){
  519. var self=this;
  520. return self["@theClass"];
  521. },
  522. //>>excludeStart("ide", pragmas.excludeIdeData);
  523. args: [],
  524. source: "theClass\x0a\x09^ theClass",
  525. referencedClasses: [],
  526. //>>excludeEnd("ide");
  527. messageSends: []
  528. }),
  529. $globals.ClassesListNode);
  530. $core.addMethod(
  531. $core.method({
  532. selector: "theClass:",
  533. protocol: 'accessing',
  534. fn: function (aClass){
  535. var self=this;
  536. self["@theClass"]=aClass;
  537. return self;
  538. },
  539. //>>excludeStart("ide", pragmas.excludeIdeData);
  540. args: ["aClass"],
  541. source: "theClass: aClass\x0a\x09theClass := aClass",
  542. referencedClasses: [],
  543. //>>excludeEnd("ide");
  544. messageSends: []
  545. }),
  546. $globals.ClassesListNode);
  547. $core.addMethod(
  548. $core.method({
  549. selector: "on:browser:classes:level:",
  550. protocol: 'instance creation',
  551. fn: function (aClass,aBrowser,aCollection,anInteger){
  552. var self=this;
  553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  554. return $core.withContext(function($ctx1) {
  555. //>>excludeEnd("ctx");
  556. var $1;
  557. $1=self._new();
  558. $recv($1)._theClass_(aClass);
  559. $recv($1)._browser_(aBrowser);
  560. $recv($1)._level_(anInteger);
  561. $recv($1)._getNodesFrom_(aCollection);
  562. return $recv($1)._yourself();
  563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  564. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},$globals.ClassesListNode.klass)});
  565. //>>excludeEnd("ctx");
  566. },
  567. //>>excludeStart("ide", pragmas.excludeIdeData);
  568. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  569. 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",
  570. referencedClasses: [],
  571. //>>excludeEnd("ide");
  572. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"]
  573. }),
  574. $globals.ClassesListNode.klass);
  575. $core.addClass('DebugErrorHandler', $globals.Object, [], 'IDE');
  576. $core.addMethod(
  577. $core.method({
  578. selector: "handleError:",
  579. protocol: 'error handling',
  580. fn: function (anError){
  581. var self=this;
  582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  583. return $core.withContext(function($ctx1) {
  584. //>>excludeEnd("ctx");
  585. var $1;
  586. $recv((function(){
  587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  588. return $core.withContext(function($ctx2) {
  589. //>>excludeEnd("ctx");
  590. $1=$recv($globals.Debugger)._new();
  591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  592. $ctx2.sendIdx["new"]=1;
  593. //>>excludeEnd("ctx");
  594. $recv($1)._error_(anError);
  595. return $recv($1)._open();
  596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  597. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  598. //>>excludeEnd("ctx");
  599. }))._on_do_($globals.Error,(function(error){
  600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  601. return $core.withContext(function($ctx2) {
  602. //>>excludeEnd("ctx");
  603. return $recv($recv($globals.ConsoleErrorHandler)._new())._handleError_(error);
  604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  605. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  606. //>>excludeEnd("ctx");
  607. }));
  608. return self;
  609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  610. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.DebugErrorHandler)});
  611. //>>excludeEnd("ctx");
  612. },
  613. //>>excludeStart("ide", pragmas.excludeIdeData);
  614. args: ["anError"],
  615. 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 ]",
  616. referencedClasses: ["Debugger", "Error", "ConsoleErrorHandler"],
  617. //>>excludeEnd("ide");
  618. messageSends: ["on:do:", "error:", "new", "open", "handleError:"]
  619. }),
  620. $globals.DebugErrorHandler);
  621. $core.addMethod(
  622. $core.method({
  623. selector: "initialize",
  624. protocol: 'initialization',
  625. fn: function (){
  626. var self=this;
  627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  628. return $core.withContext(function($ctx1) {
  629. //>>excludeEnd("ctx");
  630. $recv($globals.ErrorHandler)._register_(self._new());
  631. return self;
  632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  633. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.DebugErrorHandler.klass)});
  634. //>>excludeEnd("ctx");
  635. },
  636. //>>excludeStart("ide", pragmas.excludeIdeData);
  637. args: [],
  638. source: "initialize\x0a\x09ErrorHandler register: self new",
  639. referencedClasses: ["ErrorHandler"],
  640. //>>excludeEnd("ide");
  641. messageSends: ["register:", "new"]
  642. }),
  643. $globals.DebugErrorHandler.klass);
  644. $core.addClass('SourceArea', $globals.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  645. $core.addMethod(
  646. $core.method({
  647. selector: "clear",
  648. protocol: 'actions',
  649. fn: function (){
  650. var self=this;
  651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  652. return $core.withContext(function($ctx1) {
  653. //>>excludeEnd("ctx");
  654. self._val_("");
  655. return self;
  656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  657. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.SourceArea)});
  658. //>>excludeEnd("ctx");
  659. },
  660. //>>excludeStart("ide", pragmas.excludeIdeData);
  661. args: [],
  662. source: "clear\x0a\x09self val: ''",
  663. referencedClasses: [],
  664. //>>excludeEnd("ide");
  665. messageSends: ["val:"]
  666. }),
  667. $globals.SourceArea);
  668. $core.addMethod(
  669. $core.method({
  670. selector: "currentLine",
  671. protocol: 'accessing',
  672. fn: function (){
  673. var self=this;
  674. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  675. return $core.withContext(function($ctx1) {
  676. //>>excludeEnd("ctx");
  677. return $recv(self["@editor"])._getLine_($recv($recv(self["@editor"])._getCursor())._line());
  678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  679. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},$globals.SourceArea)});
  680. //>>excludeEnd("ctx");
  681. },
  682. //>>excludeStart("ide", pragmas.excludeIdeData);
  683. args: [],
  684. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  685. referencedClasses: [],
  686. //>>excludeEnd("ide");
  687. messageSends: ["getLine:", "line", "getCursor"]
  688. }),
  689. $globals.SourceArea);
  690. $core.addMethod(
  691. $core.method({
  692. selector: "currentLineOrSelection",
  693. protocol: 'accessing',
  694. fn: function (){
  695. var self=this;
  696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  697. return $core.withContext(function($ctx1) {
  698. //>>excludeEnd("ctx");
  699. var $1;
  700. $1=$recv(self["@editor"])._somethingSelected();
  701. if($core.assert($1)){
  702. return self._selection();
  703. } else {
  704. return self._currentLine();
  705. }
  706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  707. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},$globals.SourceArea)});
  708. //>>excludeEnd("ctx");
  709. },
  710. //>>excludeStart("ide", pragmas.excludeIdeData);
  711. args: [],
  712. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  713. referencedClasses: [],
  714. //>>excludeEnd("ide");
  715. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"]
  716. }),
  717. $globals.SourceArea);
  718. $core.addMethod(
  719. $core.method({
  720. selector: "doIt",
  721. protocol: 'actions',
  722. fn: function (){
  723. var self=this;
  724. var result;
  725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  726. return $core.withContext(function($ctx1) {
  727. //>>excludeEnd("ctx");
  728. var $1,$receiver;
  729. result=self._eval_(self._currentLineOrSelection());
  730. $1=self._onDoIt();
  731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  732. $ctx1.sendIdx["onDoIt"]=1;
  733. //>>excludeEnd("ctx");
  734. if(($receiver = $1) == null || $receiver.isNil){
  735. $1;
  736. } else {
  737. $recv(self._onDoIt())._value();
  738. }
  739. return result;
  740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  741. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},$globals.SourceArea)});
  742. //>>excludeEnd("ctx");
  743. },
  744. //>>excludeStart("ide", pragmas.excludeIdeData);
  745. args: [],
  746. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  747. referencedClasses: [],
  748. //>>excludeEnd("ide");
  749. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"]
  750. }),
  751. $globals.SourceArea);
  752. $core.addMethod(
  753. $core.method({
  754. selector: "editor",
  755. protocol: 'accessing',
  756. fn: function (){
  757. var self=this;
  758. return self["@editor"];
  759. },
  760. //>>excludeStart("ide", pragmas.excludeIdeData);
  761. args: [],
  762. source: "editor\x0a\x09^ editor",
  763. referencedClasses: [],
  764. //>>excludeEnd("ide");
  765. messageSends: []
  766. }),
  767. $globals.SourceArea);
  768. $core.addMethod(
  769. $core.method({
  770. selector: "eval:",
  771. protocol: 'actions',
  772. fn: function (aString){
  773. var self=this;
  774. var compiler;
  775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  776. return $core.withContext(function($ctx1) {
  777. //>>excludeEnd("ctx");
  778. var $early={};
  779. try {
  780. compiler=$recv($globals.Compiler)._new();
  781. $recv((function(){
  782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  783. return $core.withContext(function($ctx2) {
  784. //>>excludeEnd("ctx");
  785. return $recv(compiler)._parseExpression_(aString);
  786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  787. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  788. //>>excludeEnd("ctx");
  789. }))._on_do_($globals.Error,(function(ex){
  790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  791. return $core.withContext(function($ctx2) {
  792. //>>excludeEnd("ctx");
  793. throw $early=[$recv($globals.Terminal)._alert_($recv(ex)._messageText())];
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)});
  796. //>>excludeEnd("ctx");
  797. }));
  798. return $recv(compiler)._evaluateExpression_on_(aString,self._receiver());
  799. }
  800. catch(e) {if(e===$early)return e[0]; throw e}
  801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  802. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},$globals.SourceArea)});
  803. //>>excludeEnd("ctx");
  804. },
  805. //>>excludeStart("ide", pragmas.excludeIdeData);
  806. args: ["aString"],
  807. source: "eval: aString\x0a\x09| compiler |\x0a\x09compiler := Compiler new.\x0a\x09[ compiler parseExpression: aString ] on: Error do: [ :ex |\x0a\x09\x09^ Terminal alert: ex messageText ].\x0a\x09^ compiler evaluateExpression: aString on: self receiver",
  808. referencedClasses: ["Compiler", "Error", "Terminal"],
  809. //>>excludeEnd("ide");
  810. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"]
  811. }),
  812. $globals.SourceArea);
  813. $core.addMethod(
  814. $core.method({
  815. selector: "fileIn",
  816. protocol: 'actions',
  817. fn: function (){
  818. var self=this;
  819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  820. return $core.withContext(function($ctx1) {
  821. //>>excludeEnd("ctx");
  822. $recv($recv($globals.Importer)._new())._import_($recv(self._currentLineOrSelection())._readStream());
  823. return self;
  824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  825. }, function($ctx1) {$ctx1.fill(self,"fileIn",{},$globals.SourceArea)});
  826. //>>excludeEnd("ctx");
  827. },
  828. //>>excludeStart("ide", pragmas.excludeIdeData);
  829. args: [],
  830. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  831. referencedClasses: ["Importer"],
  832. //>>excludeEnd("ide");
  833. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"]
  834. }),
  835. $globals.SourceArea);
  836. $core.addMethod(
  837. $core.method({
  838. selector: "focus",
  839. protocol: 'actions',
  840. fn: function (){
  841. var self=this;
  842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  843. return $core.withContext(function($ctx1) {
  844. //>>excludeEnd("ctx");
  845. $recv(self._editor())._focus();
  846. return self;
  847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  848. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.SourceArea)});
  849. //>>excludeEnd("ctx");
  850. },
  851. //>>excludeStart("ide", pragmas.excludeIdeData);
  852. args: [],
  853. source: "focus\x0a\x09self editor focus.",
  854. referencedClasses: [],
  855. //>>excludeEnd("ide");
  856. messageSends: ["focus", "editor"]
  857. }),
  858. $globals.SourceArea);
  859. $core.addMethod(
  860. $core.method({
  861. selector: "handleKeyDown:",
  862. protocol: 'actions',
  863. fn: function (anEvent){
  864. var self=this;
  865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  866. return $core.withContext(function($ctx1) {
  867. //>>excludeEnd("ctx");
  868. if(anEvent.ctrlKey) {
  869. if(anEvent.keyCode === 80) { //ctrl+p
  870. self._printIt();
  871. anEvent.preventDefault();
  872. return false;
  873. }
  874. if(anEvent.keyCode === 68) { //ctrl+d
  875. self._doIt();
  876. anEvent.preventDefault();
  877. return false;
  878. }
  879. if(anEvent.keyCode === 73) { //ctrl+i
  880. self._inspectIt();
  881. anEvent.preventDefault();
  882. return false;
  883. }
  884. };
  885. return self;
  886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  887. }, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},$globals.SourceArea)});
  888. //>>excludeEnd("ctx");
  889. },
  890. //>>excludeStart("ide", pragmas.excludeIdeData);
  891. args: ["anEvent"],
  892. 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}>",
  893. referencedClasses: [],
  894. //>>excludeEnd("ide");
  895. messageSends: []
  896. }),
  897. $globals.SourceArea);
  898. $core.addMethod(
  899. $core.method({
  900. selector: "inspectIt",
  901. protocol: 'actions',
  902. fn: function (){
  903. var self=this;
  904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  905. return $core.withContext(function($ctx1) {
  906. //>>excludeEnd("ctx");
  907. $recv(self._doIt())._inspect();
  908. return self;
  909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  910. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.SourceArea)});
  911. //>>excludeEnd("ctx");
  912. },
  913. //>>excludeStart("ide", pragmas.excludeIdeData);
  914. args: [],
  915. source: "inspectIt\x0a\x09self doIt inspect",
  916. referencedClasses: [],
  917. //>>excludeEnd("ide");
  918. messageSends: ["inspect", "doIt"]
  919. }),
  920. $globals.SourceArea);
  921. $core.addMethod(
  922. $core.method({
  923. selector: "onDoIt",
  924. protocol: 'accessing',
  925. fn: function (){
  926. var self=this;
  927. return self["@onDoIt"];
  928. },
  929. //>>excludeStart("ide", pragmas.excludeIdeData);
  930. args: [],
  931. source: "onDoIt\x0a\x09^ onDoIt",
  932. referencedClasses: [],
  933. //>>excludeEnd("ide");
  934. messageSends: []
  935. }),
  936. $globals.SourceArea);
  937. $core.addMethod(
  938. $core.method({
  939. selector: "onDoIt:",
  940. protocol: 'accessing',
  941. fn: function (aBlock){
  942. var self=this;
  943. self["@onDoIt"]=aBlock;
  944. return self;
  945. },
  946. //>>excludeStart("ide", pragmas.excludeIdeData);
  947. args: ["aBlock"],
  948. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  949. referencedClasses: [],
  950. //>>excludeEnd("ide");
  951. messageSends: []
  952. }),
  953. $globals.SourceArea);
  954. $core.addMethod(
  955. $core.method({
  956. selector: "onKeyDown:",
  957. protocol: 'events',
  958. fn: function (aBlock){
  959. var self=this;
  960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  961. return $core.withContext(function($ctx1) {
  962. //>>excludeEnd("ctx");
  963. $recv(self["@div"])._onKeyDown_(aBlock);
  964. return self;
  965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  966. }, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},$globals.SourceArea)});
  967. //>>excludeEnd("ctx");
  968. },
  969. //>>excludeStart("ide", pragmas.excludeIdeData);
  970. args: ["aBlock"],
  971. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  972. referencedClasses: [],
  973. //>>excludeEnd("ide");
  974. messageSends: ["onKeyDown:"]
  975. }),
  976. $globals.SourceArea);
  977. $core.addMethod(
  978. $core.method({
  979. selector: "onKeyUp:",
  980. protocol: 'events',
  981. fn: function (aBlock){
  982. var self=this;
  983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  984. return $core.withContext(function($ctx1) {
  985. //>>excludeEnd("ctx");
  986. $recv(self["@div"])._onKeyUp_(aBlock);
  987. return self;
  988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  989. }, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},$globals.SourceArea)});
  990. //>>excludeEnd("ctx");
  991. },
  992. //>>excludeStart("ide", pragmas.excludeIdeData);
  993. args: ["aBlock"],
  994. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  995. referencedClasses: [],
  996. //>>excludeEnd("ide");
  997. messageSends: ["onKeyUp:"]
  998. }),
  999. $globals.SourceArea);
  1000. $core.addMethod(
  1001. $core.method({
  1002. selector: "print:",
  1003. protocol: 'actions',
  1004. fn: function (aString){
  1005. var self=this;
  1006. var start,stop,currentLine;
  1007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1008. return $core.withContext(function($ctx1) {
  1009. //>>excludeEnd("ctx");
  1010. var $1,$2,$4,$3,$5,$6,$7,$8,$9,$10,$12,$11;
  1011. $1=$recv(self["@editor"])._getCursor_(false);
  1012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1013. $ctx1.sendIdx["getCursor:"]=1;
  1014. //>>excludeEnd("ctx");
  1015. currentLine=$recv($1)._line();
  1016. start=$recv($globals.HashedCollection)._new();
  1017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1018. $ctx1.sendIdx["new"]=1;
  1019. //>>excludeEnd("ctx");
  1020. $recv(start)._at_put_("line",currentLine);
  1021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1022. $ctx1.sendIdx["at:put:"]=1;
  1023. //>>excludeEnd("ctx");
  1024. $2=start;
  1025. $4=$recv(self["@editor"])._getCursor_(false);
  1026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1027. $ctx1.sendIdx["getCursor:"]=2;
  1028. //>>excludeEnd("ctx");
  1029. $3=$recv($4)._ch();
  1030. $recv($2)._at_put_("ch",$3);
  1031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1032. $ctx1.sendIdx["at:put:"]=2;
  1033. //>>excludeEnd("ctx");
  1034. $5=$recv(self["@editor"])._getSelection();
  1035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1036. $ctx1.sendIdx["getSelection"]=1;
  1037. //>>excludeEnd("ctx");
  1038. $recv($5)._ifEmpty_((function(){
  1039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1040. return $core.withContext(function($ctx2) {
  1041. //>>excludeEnd("ctx");
  1042. $6=start;
  1043. $7=$recv($recv(self["@editor"])._getLine_(currentLine))._size();
  1044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1045. $ctx2.sendIdx["size"]=1;
  1046. //>>excludeEnd("ctx");
  1047. $recv($6)._at_put_("ch",$7);
  1048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1049. $ctx2.sendIdx["at:put:"]=3;
  1050. //>>excludeEnd("ctx");
  1051. return $recv(self["@editor"])._setSelection_end_($globals.HashedCollection._newFromPairs_(["line",currentLine,"ch",(0)]),start);
  1052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1053. $ctx2.sendIdx["setSelection:end:"]=1;
  1054. //>>excludeEnd("ctx");
  1055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1056. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1057. //>>excludeEnd("ctx");
  1058. }));
  1059. stop=$recv($globals.HashedCollection)._new();
  1060. $recv(stop)._at_put_("line",currentLine);
  1061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1062. $ctx1.sendIdx["at:put:"]=4;
  1063. //>>excludeEnd("ctx");
  1064. $8=stop;
  1065. $9=$recv($recv($recv(start)._at_("ch")).__plus($recv(aString)._size())).__plus((2));
  1066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1067. $ctx1.sendIdx["+"]=1;
  1068. //>>excludeEnd("ctx");
  1069. $recv($8)._at_put_("ch",$9);
  1070. $10=self["@editor"];
  1071. $12=$recv($recv($recv(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  1072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1073. $ctx1.sendIdx[","]=2;
  1074. //>>excludeEnd("ctx");
  1075. $11=$recv($12).__comma(" ");
  1076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1077. $ctx1.sendIdx[","]=1;
  1078. //>>excludeEnd("ctx");
  1079. $recv($10)._replaceSelection_($11);
  1080. $recv(self["@editor"])._setCursor_($recv(self["@editor"])._getCursor_(true));
  1081. $recv(self["@editor"])._setSelection_end_(stop,start);
  1082. return self;
  1083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1084. }, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},$globals.SourceArea)});
  1085. //>>excludeEnd("ctx");
  1086. },
  1087. //>>excludeStart("ide", pragmas.excludeIdeData);
  1088. args: ["aString"],
  1089. 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",
  1090. referencedClasses: ["HashedCollection"],
  1091. //>>excludeEnd("ide");
  1092. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "+", "at:", "replaceSelection:", ",", "setCursor:"]
  1093. }),
  1094. $globals.SourceArea);
  1095. $core.addMethod(
  1096. $core.method({
  1097. selector: "printIt",
  1098. protocol: 'actions',
  1099. fn: function (){
  1100. var self=this;
  1101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1102. return $core.withContext(function($ctx1) {
  1103. //>>excludeEnd("ctx");
  1104. self._print_($recv(self._doIt())._printString());
  1105. self._focus();
  1106. return self;
  1107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1108. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.SourceArea)});
  1109. //>>excludeEnd("ctx");
  1110. },
  1111. //>>excludeStart("ide", pragmas.excludeIdeData);
  1112. args: [],
  1113. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  1114. referencedClasses: [],
  1115. //>>excludeEnd("ide");
  1116. messageSends: ["print:", "printString", "doIt", "focus"]
  1117. }),
  1118. $globals.SourceArea);
  1119. $core.addMethod(
  1120. $core.method({
  1121. selector: "receiver",
  1122. protocol: 'accessing',
  1123. fn: function (){
  1124. var self=this;
  1125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1126. return $core.withContext(function($ctx1) {
  1127. //>>excludeEnd("ctx");
  1128. var $1,$receiver;
  1129. $1=self["@receiver"];
  1130. if(($receiver = $1) == null || $receiver.isNil){
  1131. return $recv($globals.DoIt)._new();
  1132. } else {
  1133. return $1;
  1134. }
  1135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1136. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.SourceArea)});
  1137. //>>excludeEnd("ctx");
  1138. },
  1139. //>>excludeStart("ide", pragmas.excludeIdeData);
  1140. args: [],
  1141. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  1142. referencedClasses: ["DoIt"],
  1143. //>>excludeEnd("ide");
  1144. messageSends: ["ifNil:", "new"]
  1145. }),
  1146. $globals.SourceArea);
  1147. $core.addMethod(
  1148. $core.method({
  1149. selector: "receiver:",
  1150. protocol: 'accessing',
  1151. fn: function (anObject){
  1152. var self=this;
  1153. self["@receiver"]=anObject;
  1154. return self;
  1155. },
  1156. //>>excludeStart("ide", pragmas.excludeIdeData);
  1157. args: ["anObject"],
  1158. source: "receiver: anObject\x0a\x09receiver := anObject",
  1159. referencedClasses: [],
  1160. //>>excludeEnd("ide");
  1161. messageSends: []
  1162. }),
  1163. $globals.SourceArea);
  1164. $core.addMethod(
  1165. $core.method({
  1166. selector: "renderOn:",
  1167. protocol: 'rendering',
  1168. fn: function (html){
  1169. var self=this;
  1170. var textarea;
  1171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1172. return $core.withContext(function($ctx1) {
  1173. //>>excludeEnd("ctx");
  1174. self["@div"]=$recv($recv(html)._div())._class_("source");
  1175. $recv(self["@div"])._with_((function(){
  1176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1177. return $core.withContext(function($ctx2) {
  1178. //>>excludeEnd("ctx");
  1179. textarea=$recv(html)._textarea();
  1180. return textarea;
  1181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1182. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1183. //>>excludeEnd("ctx");
  1184. }));
  1185. self._setEditorOn_($recv(textarea)._asDomNode());
  1186. $recv(self["@div"])._onKeyDown_((function(e){
  1187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1188. return $core.withContext(function($ctx2) {
  1189. //>>excludeEnd("ctx");
  1190. return self._handleKeyDown_(e);
  1191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1192. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  1193. //>>excludeEnd("ctx");
  1194. }));
  1195. return self;
  1196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1197. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},$globals.SourceArea)});
  1198. //>>excludeEnd("ctx");
  1199. },
  1200. //>>excludeStart("ide", pragmas.excludeIdeData);
  1201. args: ["html"],
  1202. source: "renderOn: html\x0a\x09| textarea |\x0a\x09div := html div class: 'source'.\x0a\x09div with: [ textarea := html textarea ].\x0a\x09self setEditorOn: textarea asDomNode.\x0a\x09div onKeyDown: [ :e | self handleKeyDown: e ]",
  1203. referencedClasses: [],
  1204. //>>excludeEnd("ide");
  1205. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "asDomNode", "onKeyDown:", "handleKeyDown:"]
  1206. }),
  1207. $globals.SourceArea);
  1208. $core.addMethod(
  1209. $core.method({
  1210. selector: "selection",
  1211. protocol: 'accessing',
  1212. fn: function (){
  1213. var self=this;
  1214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1215. return $core.withContext(function($ctx1) {
  1216. //>>excludeEnd("ctx");
  1217. return $recv(self["@editor"])._getSelection();
  1218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1219. }, function($ctx1) {$ctx1.fill(self,"selection",{},$globals.SourceArea)});
  1220. //>>excludeEnd("ctx");
  1221. },
  1222. //>>excludeStart("ide", pragmas.excludeIdeData);
  1223. args: [],
  1224. source: "selection\x0a\x09^ editor getSelection",
  1225. referencedClasses: [],
  1226. //>>excludeEnd("ide");
  1227. messageSends: ["getSelection"]
  1228. }),
  1229. $globals.SourceArea);
  1230. $core.addMethod(
  1231. $core.method({
  1232. selector: "setEditorOn:",
  1233. protocol: 'accessing',
  1234. fn: function (aTextarea){
  1235. var self=this;
  1236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1237. return $core.withContext(function($ctx1) {
  1238. //>>excludeEnd("ctx");
  1239. self['@editor'] = self._class()._codeMirror().fromTextArea(aTextarea, {
  1240. theme: 'ide.codeMirrorTheme'._settingValueIfAbsent_('default'),
  1241. mode: 'text/x-stsrc',
  1242. lineNumbers: true,
  1243. enterMode: 'flat',
  1244. indentWithTabs: true,
  1245. indentUnit: 4,
  1246. matchBrackets: true,
  1247. electricChars: false
  1248. });
  1249. return self;
  1250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1251. }, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},$globals.SourceArea)});
  1252. //>>excludeEnd("ctx");
  1253. },
  1254. //>>excludeStart("ide", pragmas.excludeIdeData);
  1255. args: ["aTextarea"],
  1256. source: "setEditorOn: aTextarea\x0a\x09<self['@editor'] = self._class()._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})>",
  1257. referencedClasses: [],
  1258. //>>excludeEnd("ide");
  1259. messageSends: []
  1260. }),
  1261. $globals.SourceArea);
  1262. $core.addMethod(
  1263. $core.method({
  1264. selector: "val",
  1265. protocol: 'accessing',
  1266. fn: function (){
  1267. var self=this;
  1268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1269. return $core.withContext(function($ctx1) {
  1270. //>>excludeEnd("ctx");
  1271. return $recv(self["@editor"])._getValue();
  1272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1273. }, function($ctx1) {$ctx1.fill(self,"val",{},$globals.SourceArea)});
  1274. //>>excludeEnd("ctx");
  1275. },
  1276. //>>excludeStart("ide", pragmas.excludeIdeData);
  1277. args: [],
  1278. source: "val\x0a\x09^ editor getValue",
  1279. referencedClasses: [],
  1280. //>>excludeEnd("ide");
  1281. messageSends: ["getValue"]
  1282. }),
  1283. $globals.SourceArea);
  1284. $core.addMethod(
  1285. $core.method({
  1286. selector: "val:",
  1287. protocol: 'accessing',
  1288. fn: function (aString){
  1289. var self=this;
  1290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1291. return $core.withContext(function($ctx1) {
  1292. //>>excludeEnd("ctx");
  1293. $recv(self["@editor"])._setValue_(aString);
  1294. return self;
  1295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1296. }, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},$globals.SourceArea)});
  1297. //>>excludeEnd("ctx");
  1298. },
  1299. //>>excludeStart("ide", pragmas.excludeIdeData);
  1300. args: ["aString"],
  1301. source: "val: aString\x0a\x09editor setValue: aString",
  1302. referencedClasses: [],
  1303. //>>excludeEnd("ide");
  1304. messageSends: ["setValue:"]
  1305. }),
  1306. $globals.SourceArea);
  1307. $core.addMethod(
  1308. $core.method({
  1309. selector: "codeMirror",
  1310. protocol: 'accessing',
  1311. fn: function (){
  1312. var self=this;
  1313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1314. return $core.withContext(function($ctx1) {
  1315. //>>excludeEnd("ctx");
  1316. return $recv(require)._value_("codemirror/lib/codemirror");
  1317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1318. }, function($ctx1) {$ctx1.fill(self,"codeMirror",{},$globals.SourceArea.klass)});
  1319. //>>excludeEnd("ctx");
  1320. },
  1321. //>>excludeStart("ide", pragmas.excludeIdeData);
  1322. args: [],
  1323. source: "codeMirror\x0a\x09^ require value: 'codemirror/lib/codemirror'",
  1324. referencedClasses: [],
  1325. //>>excludeEnd("ide");
  1326. messageSends: ["value:"]
  1327. }),
  1328. $globals.SourceArea.klass);
  1329. $core.addMethod(
  1330. $core.method({
  1331. selector: "initialize",
  1332. protocol: 'initialization',
  1333. fn: function (){
  1334. var self=this;
  1335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1336. return $core.withContext(function($ctx1) {
  1337. //>>excludeEnd("ctx");
  1338. (
  1339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1340. $ctx1.supercall = true,
  1341. //>>excludeEnd("ctx");
  1342. ($globals.SourceArea.klass.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  1343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1344. $ctx1.supercall = false;
  1345. //>>excludeEnd("ctx");;
  1346. self._setupCodeMirror();
  1347. return self;
  1348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1349. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.SourceArea.klass)});
  1350. //>>excludeEnd("ctx");
  1351. },
  1352. //>>excludeStart("ide", pragmas.excludeIdeData);
  1353. args: [],
  1354. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  1355. referencedClasses: [],
  1356. //>>excludeEnd("ide");
  1357. messageSends: ["initialize", "setupCodeMirror"]
  1358. }),
  1359. $globals.SourceArea.klass);
  1360. $core.addMethod(
  1361. $core.method({
  1362. selector: "setupCodeMirror",
  1363. protocol: 'initialization',
  1364. fn: function (){
  1365. var self=this;
  1366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1367. return $core.withContext(function($ctx1) {
  1368. //>>excludeEnd("ctx");
  1369. self._codeMirror().keyMap["default"].fallthrough = ["basic"] ;
  1370. return self;
  1371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1372. }, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},$globals.SourceArea.klass)});
  1373. //>>excludeEnd("ctx");
  1374. },
  1375. //>>excludeStart("ide", pragmas.excludeIdeData);
  1376. args: [],
  1377. source: "setupCodeMirror\x0a\x09< self._codeMirror().keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  1378. referencedClasses: [],
  1379. //>>excludeEnd("ide");
  1380. messageSends: []
  1381. }),
  1382. $globals.SourceArea.klass);
  1383. $core.addClass('TabManager', $globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  1384. $core.addMethod(
  1385. $core.method({
  1386. selector: "addTab:",
  1387. protocol: 'adding/Removing',
  1388. fn: function (aWidget){
  1389. var self=this;
  1390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1391. return $core.withContext(function($ctx1) {
  1392. //>>excludeEnd("ctx");
  1393. $recv(self._tabs())._add_(aWidget);
  1394. $recv(aWidget)._appendToJQuery_("#amber"._asJQuery());
  1395. $recv(aWidget)._hide();
  1396. return self;
  1397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1398. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},$globals.TabManager)});
  1399. //>>excludeEnd("ctx");
  1400. },
  1401. //>>excludeStart("ide", pragmas.excludeIdeData);
  1402. args: ["aWidget"],
  1403. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  1404. referencedClasses: [],
  1405. //>>excludeEnd("ide");
  1406. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"]
  1407. }),
  1408. $globals.TabManager);
  1409. $core.addMethod(
  1410. $core.method({
  1411. selector: "close",
  1412. protocol: 'actions',
  1413. fn: function (){
  1414. var self=this;
  1415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1416. return $core.withContext(function($ctx1) {
  1417. //>>excludeEnd("ctx");
  1418. var $1,$2,$3;
  1419. $1=self["@opened"];
  1420. if($core.assert($1)){
  1421. $2="#amber"._asJQuery();
  1422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1423. $ctx1.sendIdx["asJQuery"]=1;
  1424. //>>excludeEnd("ctx");
  1425. $recv($2)._hide();
  1426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1427. $ctx1.sendIdx["hide"]=1;
  1428. //>>excludeEnd("ctx");
  1429. $3=$recv(self["@ul"])._asJQuery();
  1430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1431. $ctx1.sendIdx["asJQuery"]=2;
  1432. //>>excludeEnd("ctx");
  1433. $recv($3)._hide();
  1434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1435. $ctx1.sendIdx["hide"]=2;
  1436. //>>excludeEnd("ctx");
  1437. $recv(self["@selectedTab"])._hide();
  1438. self._removeBodyMargin();
  1439. $recv("body"._asJQuery())._removeClass_("amberBody");
  1440. self["@opened"]=false;
  1441. self["@opened"];
  1442. }
  1443. return self;
  1444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1445. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.TabManager)});
  1446. //>>excludeEnd("ctx");
  1447. },
  1448. //>>excludeStart("ide", pragmas.excludeIdeData);
  1449. args: [],
  1450. 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 ]",
  1451. referencedClasses: [],
  1452. //>>excludeEnd("ide");
  1453. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"]
  1454. }),
  1455. $globals.TabManager);
  1456. $core.addMethod(
  1457. $core.method({
  1458. selector: "closeTab:",
  1459. protocol: 'actions',
  1460. fn: function (aWidget){
  1461. var self=this;
  1462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1463. return $core.withContext(function($ctx1) {
  1464. //>>excludeEnd("ctx");
  1465. self._removeTab_(aWidget);
  1466. self._selectTab_($recv(self._tabs())._last());
  1467. $recv(aWidget)._remove();
  1468. self._update();
  1469. return self;
  1470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1471. }, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},$globals.TabManager)});
  1472. //>>excludeEnd("ctx");
  1473. },
  1474. //>>excludeStart("ide", pragmas.excludeIdeData);
  1475. args: ["aWidget"],
  1476. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1477. referencedClasses: [],
  1478. //>>excludeEnd("ide");
  1479. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"]
  1480. }),
  1481. $globals.TabManager);
  1482. $core.addMethod(
  1483. $core.method({
  1484. selector: "initialize",
  1485. protocol: 'initialization',
  1486. fn: function (){
  1487. var self=this;
  1488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1489. return $core.withContext(function($ctx1) {
  1490. //>>excludeEnd("ctx");
  1491. var $1,$2,$3,$4,$5;
  1492. (
  1493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1494. $ctx1.supercall = true,
  1495. //>>excludeEnd("ctx");
  1496. ($globals.TabManager.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  1497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1498. $ctx1.supercall = false;
  1499. //>>excludeEnd("ctx");;
  1500. $recv($globals.Inspector)._register_($globals.IDEInspector);
  1501. self["@opened"]=true;
  1502. $1=(function(html){
  1503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1504. return $core.withContext(function($ctx2) {
  1505. //>>excludeEnd("ctx");
  1506. return $recv($recv(html)._div())._id_("amber");
  1507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1508. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1509. //>>excludeEnd("ctx");
  1510. });
  1511. $2="body"._asJQuery();
  1512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1513. $ctx1.sendIdx["asJQuery"]=1;
  1514. //>>excludeEnd("ctx");
  1515. $recv($1)._appendToJQuery_($2);
  1516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1517. $ctx1.sendIdx["appendToJQuery:"]=1;
  1518. //>>excludeEnd("ctx");
  1519. $3="body"._asJQuery();
  1520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1521. $ctx1.sendIdx["asJQuery"]=2;
  1522. //>>excludeEnd("ctx");
  1523. $recv($3)._addClass_("amberBody");
  1524. self._appendToJQuery_("#amber"._asJQuery());
  1525. self._addTab_($recv($globals.IDETranscript)._current());
  1526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1527. $ctx1.sendIdx["addTab:"]=1;
  1528. //>>excludeEnd("ctx");
  1529. $4=$recv($globals.Workspace)._new();
  1530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1531. $ctx1.sendIdx["new"]=1;
  1532. //>>excludeEnd("ctx");
  1533. self._addTab_($4);
  1534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1535. $ctx1.sendIdx["addTab:"]=2;
  1536. //>>excludeEnd("ctx");
  1537. self._addTab_($recv($globals.TestRunner)._new());
  1538. self._selectTab_($recv(self._tabs())._last());
  1539. self._onResize_((function(){
  1540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1541. return $core.withContext(function($ctx2) {
  1542. //>>excludeEnd("ctx");
  1543. self._updateBodyMargin();
  1544. $5=self._updatePosition();
  1545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1546. $ctx2.sendIdx["updatePosition"]=1;
  1547. //>>excludeEnd("ctx");
  1548. return $5;
  1549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1550. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1551. //>>excludeEnd("ctx");
  1552. }));
  1553. self._onWindowResize_((function(){
  1554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1555. return $core.withContext(function($ctx2) {
  1556. //>>excludeEnd("ctx");
  1557. return self._updatePosition();
  1558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1559. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1560. //>>excludeEnd("ctx");
  1561. }));
  1562. return self;
  1563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1564. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.TabManager)});
  1565. //>>excludeEnd("ctx");
  1566. },
  1567. //>>excludeStart("ide", pragmas.excludeIdeData);
  1568. args: [],
  1569. 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 ]",
  1570. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"],
  1571. //>>excludeEnd("ide");
  1572. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"]
  1573. }),
  1574. $globals.TabManager);
  1575. $core.addMethod(
  1576. $core.method({
  1577. selector: "labelFor:",
  1578. protocol: 'accessing',
  1579. fn: function (aWidget){
  1580. var self=this;
  1581. var label,maxSize;
  1582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1583. return $core.withContext(function($ctx1) {
  1584. //>>excludeEnd("ctx");
  1585. var $1,$4,$3,$2,$5;
  1586. maxSize=(15);
  1587. $1=$recv(aWidget)._label();
  1588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1589. $ctx1.sendIdx["label"]=1;
  1590. //>>excludeEnd("ctx");
  1591. $4=$recv(aWidget)._label();
  1592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1593. $ctx1.sendIdx["label"]=2;
  1594. //>>excludeEnd("ctx");
  1595. $3=$recv($4)._size();
  1596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1597. $ctx1.sendIdx["size"]=1;
  1598. //>>excludeEnd("ctx");
  1599. $2=$recv($3)._min_(maxSize);
  1600. label=$recv($1)._copyFrom_to_((0),$2);
  1601. $5=$recv($recv($recv(aWidget)._label())._size()).__gt(maxSize);
  1602. if($core.assert($5)){
  1603. label=$recv(label).__comma("...");
  1604. label;
  1605. }
  1606. return label;
  1607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1608. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},$globals.TabManager)});
  1609. //>>excludeEnd("ctx");
  1610. },
  1611. //>>excludeStart("ide", pragmas.excludeIdeData);
  1612. args: ["aWidget"],
  1613. 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",
  1614. referencedClasses: [],
  1615. //>>excludeEnd("ide");
  1616. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","]
  1617. }),
  1618. $globals.TabManager);
  1619. $core.addMethod(
  1620. $core.method({
  1621. selector: "newBrowserTab",
  1622. protocol: 'actions',
  1623. fn: function (){
  1624. var self=this;
  1625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1626. return $core.withContext(function($ctx1) {
  1627. //>>excludeEnd("ctx");
  1628. $recv($globals.Browser)._open();
  1629. return self;
  1630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1631. }, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},$globals.TabManager)});
  1632. //>>excludeEnd("ctx");
  1633. },
  1634. //>>excludeStart("ide", pragmas.excludeIdeData);
  1635. args: [],
  1636. source: "newBrowserTab\x0a\x09Browser open",
  1637. referencedClasses: ["Browser"],
  1638. //>>excludeEnd("ide");
  1639. messageSends: ["open"]
  1640. }),
  1641. $globals.TabManager);
  1642. $core.addMethod(
  1643. $core.method({
  1644. selector: "onResize:",
  1645. protocol: 'actions',
  1646. fn: function (aBlock){
  1647. var self=this;
  1648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1649. return $core.withContext(function($ctx1) {
  1650. //>>excludeEnd("ctx");
  1651. $recv("#amber"._asJQuery())._resizable_($globals.HashedCollection._newFromPairs_(["handles","n","resize",aBlock,"minHeight",(230)]));
  1652. return self;
  1653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1654. }, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},$globals.TabManager)});
  1655. //>>excludeEnd("ctx");
  1656. },
  1657. //>>excludeStart("ide", pragmas.excludeIdeData);
  1658. args: ["aBlock"],
  1659. 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}",
  1660. referencedClasses: [],
  1661. //>>excludeEnd("ide");
  1662. messageSends: ["resizable:", "asJQuery"]
  1663. }),
  1664. $globals.TabManager);
  1665. $core.addMethod(
  1666. $core.method({
  1667. selector: "onWindowResize:",
  1668. protocol: 'actions',
  1669. fn: function (aBlock){
  1670. var self=this;
  1671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1672. return $core.withContext(function($ctx1) {
  1673. //>>excludeEnd("ctx");
  1674. $recv($recv(window)._asJQuery())._resize_(aBlock);
  1675. return self;
  1676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1677. }, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},$globals.TabManager)});
  1678. //>>excludeEnd("ctx");
  1679. },
  1680. //>>excludeStart("ide", pragmas.excludeIdeData);
  1681. args: ["aBlock"],
  1682. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1683. referencedClasses: [],
  1684. //>>excludeEnd("ide");
  1685. messageSends: ["resize:", "asJQuery"]
  1686. }),
  1687. $globals.TabManager);
  1688. $core.addMethod(
  1689. $core.method({
  1690. selector: "open",
  1691. protocol: 'actions',
  1692. fn: function (){
  1693. var self=this;
  1694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1695. return $core.withContext(function($ctx1) {
  1696. //>>excludeEnd("ctx");
  1697. var $1,$2,$3;
  1698. $1=self["@opened"];
  1699. if(!$core.assert($1)){
  1700. $2="body"._asJQuery();
  1701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1702. $ctx1.sendIdx["asJQuery"]=1;
  1703. //>>excludeEnd("ctx");
  1704. $recv($2)._addClass_("amberBody");
  1705. $3="#amber"._asJQuery();
  1706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1707. $ctx1.sendIdx["asJQuery"]=2;
  1708. //>>excludeEnd("ctx");
  1709. $recv($3)._show();
  1710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1711. $ctx1.sendIdx["show"]=1;
  1712. //>>excludeEnd("ctx");
  1713. $recv($recv(self["@ul"])._asJQuery())._show();
  1714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1715. $ctx1.sendIdx["show"]=2;
  1716. //>>excludeEnd("ctx");
  1717. self._updateBodyMargin();
  1718. $recv(self["@selectedTab"])._show();
  1719. self["@opened"]=true;
  1720. self["@opened"];
  1721. }
  1722. return self;
  1723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1724. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabManager)});
  1725. //>>excludeEnd("ctx");
  1726. },
  1727. //>>excludeStart("ide", pragmas.excludeIdeData);
  1728. args: [],
  1729. 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 ]",
  1730. referencedClasses: [],
  1731. //>>excludeEnd("ide");
  1732. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"]
  1733. }),
  1734. $globals.TabManager);
  1735. $core.addMethod(
  1736. $core.method({
  1737. selector: "removeBodyMargin",
  1738. protocol: 'actions',
  1739. fn: function (){
  1740. var self=this;
  1741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1742. return $core.withContext(function($ctx1) {
  1743. //>>excludeEnd("ctx");
  1744. self._setBodyMargin_((0));
  1745. return self;
  1746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1747. }, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},$globals.TabManager)});
  1748. //>>excludeEnd("ctx");
  1749. },
  1750. //>>excludeStart("ide", pragmas.excludeIdeData);
  1751. args: [],
  1752. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1753. referencedClasses: [],
  1754. //>>excludeEnd("ide");
  1755. messageSends: ["setBodyMargin:"]
  1756. }),
  1757. $globals.TabManager);
  1758. $core.addMethod(
  1759. $core.method({
  1760. selector: "removeTab:",
  1761. protocol: 'adding/Removing',
  1762. fn: function (aWidget){
  1763. var self=this;
  1764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1765. return $core.withContext(function($ctx1) {
  1766. //>>excludeEnd("ctx");
  1767. $recv(self._tabs())._remove_(aWidget);
  1768. self._update();
  1769. return self;
  1770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1771. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},$globals.TabManager)});
  1772. //>>excludeEnd("ctx");
  1773. },
  1774. //>>excludeStart("ide", pragmas.excludeIdeData);
  1775. args: ["aWidget"],
  1776. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1777. referencedClasses: [],
  1778. //>>excludeEnd("ide");
  1779. messageSends: ["remove:", "tabs", "update"]
  1780. }),
  1781. $globals.TabManager);
  1782. $core.addMethod(
  1783. $core.method({
  1784. selector: "renderOn:",
  1785. protocol: 'rendering',
  1786. fn: function (html){
  1787. var self=this;
  1788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1789. return $core.withContext(function($ctx1) {
  1790. //>>excludeEnd("ctx");
  1791. var $1;
  1792. $recv($recv(html)._div())._id_("logo");
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. $ctx1.sendIdx["id:"]=1;
  1795. //>>excludeEnd("ctx");
  1796. self._renderToolbarOn_(html);
  1797. $1=$recv(html)._ul();
  1798. $recv($1)._id_("amberTabs");
  1799. self["@ul"]=$recv($1)._yourself();
  1800. self._renderTabs();
  1801. return self;
  1802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1803. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.TabManager)});
  1804. //>>excludeEnd("ctx");
  1805. },
  1806. //>>excludeStart("ide", pragmas.excludeIdeData);
  1807. args: ["html"],
  1808. 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",
  1809. referencedClasses: [],
  1810. //>>excludeEnd("ide");
  1811. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"]
  1812. }),
  1813. $globals.TabManager);
  1814. $core.addMethod(
  1815. $core.method({
  1816. selector: "renderTabFor:on:",
  1817. protocol: 'rendering',
  1818. fn: function (aWidget,html){
  1819. var self=this;
  1820. var li;
  1821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1822. return $core.withContext(function($ctx1) {
  1823. //>>excludeEnd("ctx");
  1824. var $1,$2,$3,$4,$6,$7,$8,$9,$5;
  1825. li=$recv(html)._li();
  1826. $1=$recv(self["@selectedTab"]).__eq(aWidget);
  1827. if($core.assert($1)){
  1828. $recv(li)._class_("selected");
  1829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1830. $ctx1.sendIdx["class:"]=1;
  1831. //>>excludeEnd("ctx");
  1832. }
  1833. $2=li;
  1834. $recv($2)._with_((function(){
  1835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1836. return $core.withContext(function($ctx2) {
  1837. //>>excludeEnd("ctx");
  1838. $3=$recv(html)._span();
  1839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1840. $ctx2.sendIdx["span"]=1;
  1841. //>>excludeEnd("ctx");
  1842. $recv($3)._class_("ltab");
  1843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1844. $ctx2.sendIdx["class:"]=2;
  1845. //>>excludeEnd("ctx");
  1846. $4=$recv(html)._span();
  1847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1848. $ctx2.sendIdx["span"]=2;
  1849. //>>excludeEnd("ctx");
  1850. $recv($4)._class_("mtab");
  1851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1852. $ctx2.sendIdx["class:"]=3;
  1853. //>>excludeEnd("ctx");
  1854. $5=$recv($4)._with_((function(){
  1855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1856. return $core.withContext(function($ctx3) {
  1857. //>>excludeEnd("ctx");
  1858. $6=$recv(aWidget)._canBeClosed();
  1859. if($core.assert($6)){
  1860. $7=$recv(html)._span();
  1861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1862. $ctx3.sendIdx["span"]=3;
  1863. //>>excludeEnd("ctx");
  1864. $recv($7)._class_("close");
  1865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1866. $ctx3.sendIdx["class:"]=4;
  1867. //>>excludeEnd("ctx");
  1868. $recv($7)._with_("x");
  1869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1870. $ctx3.sendIdx["with:"]=3;
  1871. //>>excludeEnd("ctx");
  1872. $8=$recv($7)._onClick_((function(){
  1873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1874. return $core.withContext(function($ctx4) {
  1875. //>>excludeEnd("ctx");
  1876. return self._closeTab_(aWidget);
  1877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1878. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  1879. //>>excludeEnd("ctx");
  1880. }));
  1881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1882. $ctx3.sendIdx["onClick:"]=1;
  1883. //>>excludeEnd("ctx");
  1884. $8;
  1885. }
  1886. $9=$recv(html)._span();
  1887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1888. $ctx3.sendIdx["span"]=4;
  1889. //>>excludeEnd("ctx");
  1890. return $recv($9)._with_(self._labelFor_(aWidget));
  1891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1892. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1893. //>>excludeEnd("ctx");
  1894. }));
  1895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1896. $ctx2.sendIdx["with:"]=2;
  1897. //>>excludeEnd("ctx");
  1898. $5;
  1899. return $recv($recv(html)._span())._class_("rtab");
  1900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1901. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1902. //>>excludeEnd("ctx");
  1903. }));
  1904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1905. $ctx1.sendIdx["with:"]=1;
  1906. //>>excludeEnd("ctx");
  1907. $recv($2)._onClick_((function(){
  1908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1909. return $core.withContext(function($ctx2) {
  1910. //>>excludeEnd("ctx");
  1911. return self._selectTab_(aWidget);
  1912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1913. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  1914. //>>excludeEnd("ctx");
  1915. }));
  1916. return self;
  1917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1918. }, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},$globals.TabManager)});
  1919. //>>excludeEnd("ctx");
  1920. },
  1921. //>>excludeStart("ide", pragmas.excludeIdeData);
  1922. args: ["aWidget", "html"],
  1923. 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 ]",
  1924. referencedClasses: [],
  1925. //>>excludeEnd("ide");
  1926. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"]
  1927. }),
  1928. $globals.TabManager);
  1929. $core.addMethod(
  1930. $core.method({
  1931. selector: "renderTabs",
  1932. protocol: 'rendering',
  1933. fn: function (){
  1934. var self=this;
  1935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1936. return $core.withContext(function($ctx1) {
  1937. //>>excludeEnd("ctx");
  1938. var $1,$2,$3;
  1939. $recv(self["@ul"])._contents_((function(html){
  1940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1941. return $core.withContext(function($ctx2) {
  1942. //>>excludeEnd("ctx");
  1943. $recv(self._tabs())._do_((function(each){
  1944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1945. return $core.withContext(function($ctx3) {
  1946. //>>excludeEnd("ctx");
  1947. return self._renderTabFor_on_(each,html);
  1948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1949. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  1950. //>>excludeEnd("ctx");
  1951. }));
  1952. $1=$recv(html)._li();
  1953. $recv($1)._class_("newtab");
  1954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1955. $ctx2.sendIdx["class:"]=1;
  1956. //>>excludeEnd("ctx");
  1957. $recv($1)._with_((function(){
  1958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1959. return $core.withContext(function($ctx3) {
  1960. //>>excludeEnd("ctx");
  1961. $2=$recv(html)._span();
  1962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1963. $ctx3.sendIdx["span"]=1;
  1964. //>>excludeEnd("ctx");
  1965. $recv($2)._class_("ltab");
  1966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1967. $ctx3.sendIdx["class:"]=2;
  1968. //>>excludeEnd("ctx");
  1969. $3=$recv(html)._span();
  1970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1971. $ctx3.sendIdx["span"]=2;
  1972. //>>excludeEnd("ctx");
  1973. $recv($3)._class_("mtab");
  1974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1975. $ctx3.sendIdx["class:"]=3;
  1976. //>>excludeEnd("ctx");
  1977. $recv($3)._with_(" + ");
  1978. return $recv($recv(html)._span())._class_("rtab");
  1979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1980. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1981. //>>excludeEnd("ctx");
  1982. }));
  1983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1984. $ctx2.sendIdx["with:"]=1;
  1985. //>>excludeEnd("ctx");
  1986. return $recv($1)._onClick_((function(){
  1987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1988. return $core.withContext(function($ctx3) {
  1989. //>>excludeEnd("ctx");
  1990. return self._newBrowserTab();
  1991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1992. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1993. //>>excludeEnd("ctx");
  1994. }));
  1995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1996. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1997. //>>excludeEnd("ctx");
  1998. }));
  1999. return self;
  2000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2001. }, function($ctx1) {$ctx1.fill(self,"renderTabs",{},$globals.TabManager)});
  2002. //>>excludeEnd("ctx");
  2003. },
  2004. //>>excludeStart("ide", pragmas.excludeIdeData);
  2005. args: [],
  2006. 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 ]]",
  2007. referencedClasses: [],
  2008. //>>excludeEnd("ide");
  2009. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"]
  2010. }),
  2011. $globals.TabManager);
  2012. $core.addMethod(
  2013. $core.method({
  2014. selector: "renderToolbarOn:",
  2015. protocol: 'rendering',
  2016. fn: function (html){
  2017. var self=this;
  2018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2019. return $core.withContext(function($ctx1) {
  2020. //>>excludeEnd("ctx");
  2021. var $1,$2,$3,$4;
  2022. $1=$recv(html)._div();
  2023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2024. $ctx1.sendIdx["div"]=1;
  2025. //>>excludeEnd("ctx");
  2026. $recv($1)._id_("amber_toolbar");
  2027. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2028. $ctx1.sendIdx["id:"]=1;
  2029. //>>excludeEnd("ctx");
  2030. $recv($1)._with_((function(){
  2031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2032. return $core.withContext(function($ctx2) {
  2033. //>>excludeEnd("ctx");
  2034. $2=$recv(html)._input();
  2035. $recv($2)._class_("implementors");
  2036. self["@input"]=$recv($2)._yourself();
  2037. self["@input"];
  2038. $recv(self["@input"])._onKeyPress_((function(event){
  2039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2040. return $core.withContext(function($ctx3) {
  2041. //>>excludeEnd("ctx");
  2042. $3=$recv($recv(event)._keyCode()).__eq((13));
  2043. if($core.assert($3)){
  2044. return self._search_($recv($recv(self["@input"])._asJQuery())._val());
  2045. }
  2046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2047. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)});
  2048. //>>excludeEnd("ctx");
  2049. }));
  2050. $4=$recv(html)._div();
  2051. $recv($4)._id_("amber_close");
  2052. return $recv($4)._onClick_((function(){
  2053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2054. return $core.withContext(function($ctx3) {
  2055. //>>excludeEnd("ctx");
  2056. return self._close();
  2057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2058. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  2059. //>>excludeEnd("ctx");
  2060. }));
  2061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2062. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2063. //>>excludeEnd("ctx");
  2064. }));
  2065. return self;
  2066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2067. }, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},$globals.TabManager)});
  2068. //>>excludeEnd("ctx");
  2069. },
  2070. //>>excludeStart("ide", pragmas.excludeIdeData);
  2071. args: ["html"],
  2072. 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 ]]",
  2073. referencedClasses: [],
  2074. //>>excludeEnd("ide");
  2075. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"]
  2076. }),
  2077. $globals.TabManager);
  2078. $core.addMethod(
  2079. $core.method({
  2080. selector: "search:",
  2081. protocol: 'actions',
  2082. fn: function (aString){
  2083. var self=this;
  2084. var searchedClass;
  2085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2086. return $core.withContext(function($ctx1) {
  2087. //>>excludeEnd("ctx");
  2088. var $1;
  2089. searchedClass=$recv($recv($globals.Smalltalk)._globals())._at_(aString);
  2090. $1=$recv(searchedClass)._isClass();
  2091. if($core.assert($1)){
  2092. $recv($globals.Browser)._openOn_(searchedClass);
  2093. } else {
  2094. $recv($globals.ReferencesBrowser)._search_(aString);
  2095. }
  2096. return self;
  2097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2098. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},$globals.TabManager)});
  2099. //>>excludeEnd("ctx");
  2100. },
  2101. //>>excludeStart("ide", pragmas.excludeIdeData);
  2102. args: ["aString"],
  2103. 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 ]",
  2104. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"],
  2105. //>>excludeEnd("ide");
  2106. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"]
  2107. }),
  2108. $globals.TabManager);
  2109. $core.addMethod(
  2110. $core.method({
  2111. selector: "selectTab:",
  2112. protocol: 'actions',
  2113. fn: function (aWidget){
  2114. var self=this;
  2115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2116. return $core.withContext(function($ctx1) {
  2117. //>>excludeEnd("ctx");
  2118. self._open();
  2119. self["@selectedTab"]=aWidget;
  2120. $recv(self._tabs())._do_((function(each){
  2121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2122. return $core.withContext(function($ctx2) {
  2123. //>>excludeEnd("ctx");
  2124. return $recv(each)._hide();
  2125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2126. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2127. //>>excludeEnd("ctx");
  2128. }));
  2129. $recv(aWidget)._show();
  2130. self._update();
  2131. return self;
  2132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2133. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},$globals.TabManager)});
  2134. //>>excludeEnd("ctx");
  2135. },
  2136. //>>excludeStart("ide", pragmas.excludeIdeData);
  2137. args: ["aWidget"],
  2138. 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",
  2139. referencedClasses: [],
  2140. //>>excludeEnd("ide");
  2141. messageSends: ["open", "do:", "tabs", "hide", "show", "update"]
  2142. }),
  2143. $globals.TabManager);
  2144. $core.addMethod(
  2145. $core.method({
  2146. selector: "setBodyMargin:",
  2147. protocol: 'actions',
  2148. fn: function (anInteger){
  2149. var self=this;
  2150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2151. return $core.withContext(function($ctx1) {
  2152. //>>excludeEnd("ctx");
  2153. $recv(".amberBody"._asJQuery())._css_put_("margin-bottom",$recv($recv(anInteger)._asString()).__comma("px"));
  2154. return self;
  2155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2156. }, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},$globals.TabManager)});
  2157. //>>excludeEnd("ctx");
  2158. },
  2159. //>>excludeStart("ide", pragmas.excludeIdeData);
  2160. args: ["anInteger"],
  2161. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  2162. referencedClasses: [],
  2163. //>>excludeEnd("ide");
  2164. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  2165. }),
  2166. $globals.TabManager);
  2167. $core.addMethod(
  2168. $core.method({
  2169. selector: "tabs",
  2170. protocol: 'accessing',
  2171. fn: function (){
  2172. var self=this;
  2173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2174. return $core.withContext(function($ctx1) {
  2175. //>>excludeEnd("ctx");
  2176. var $1,$receiver;
  2177. $1=self["@tabs"];
  2178. if(($receiver = $1) == null || $receiver.isNil){
  2179. self["@tabs"]=$recv($globals.Array)._new();
  2180. return self["@tabs"];
  2181. } else {
  2182. return $1;
  2183. }
  2184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2185. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.TabManager)});
  2186. //>>excludeEnd("ctx");
  2187. },
  2188. //>>excludeStart("ide", pragmas.excludeIdeData);
  2189. args: [],
  2190. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  2191. referencedClasses: ["Array"],
  2192. //>>excludeEnd("ide");
  2193. messageSends: ["ifNil:", "new"]
  2194. }),
  2195. $globals.TabManager);
  2196. $core.addMethod(
  2197. $core.method({
  2198. selector: "update",
  2199. protocol: 'updating',
  2200. fn: function (){
  2201. var self=this;
  2202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2203. return $core.withContext(function($ctx1) {
  2204. //>>excludeEnd("ctx");
  2205. self._renderTabs();
  2206. return self;
  2207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2208. }, function($ctx1) {$ctx1.fill(self,"update",{},$globals.TabManager)});
  2209. //>>excludeEnd("ctx");
  2210. },
  2211. //>>excludeStart("ide", pragmas.excludeIdeData);
  2212. args: [],
  2213. source: "update\x0a\x09self renderTabs",
  2214. referencedClasses: [],
  2215. //>>excludeEnd("ide");
  2216. messageSends: ["renderTabs"]
  2217. }),
  2218. $globals.TabManager);
  2219. $core.addMethod(
  2220. $core.method({
  2221. selector: "updateBodyMargin",
  2222. protocol: 'actions',
  2223. fn: function (){
  2224. var self=this;
  2225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2226. return $core.withContext(function($ctx1) {
  2227. //>>excludeEnd("ctx");
  2228. self._setBodyMargin_($recv("#amber"._asJQuery())._height());
  2229. return self;
  2230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2231. }, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},$globals.TabManager)});
  2232. //>>excludeEnd("ctx");
  2233. },
  2234. //>>excludeStart("ide", pragmas.excludeIdeData);
  2235. args: [],
  2236. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  2237. referencedClasses: [],
  2238. //>>excludeEnd("ide");
  2239. messageSends: ["setBodyMargin:", "height", "asJQuery"]
  2240. }),
  2241. $globals.TabManager);
  2242. $core.addMethod(
  2243. $core.method({
  2244. selector: "updatePosition",
  2245. protocol: 'actions',
  2246. fn: function (){
  2247. var self=this;
  2248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2249. return $core.withContext(function($ctx1) {
  2250. //>>excludeEnd("ctx");
  2251. var $1;
  2252. $1="#amber"._asJQuery();
  2253. $recv($1)._css_put_("top","");
  2254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2255. $ctx1.sendIdx["css:put:"]=1;
  2256. //>>excludeEnd("ctx");
  2257. $recv($1)._css_put_("bottom","0px");
  2258. return self;
  2259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2260. }, function($ctx1) {$ctx1.fill(self,"updatePosition",{},$globals.TabManager)});
  2261. //>>excludeEnd("ctx");
  2262. },
  2263. //>>excludeStart("ide", pragmas.excludeIdeData);
  2264. args: [],
  2265. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  2266. referencedClasses: [],
  2267. //>>excludeEnd("ide");
  2268. messageSends: ["css:put:", "asJQuery"]
  2269. }),
  2270. $globals.TabManager);
  2271. $globals.TabManager.klass.iVarNames = ['current'];
  2272. $core.addMethod(
  2273. $core.method({
  2274. selector: "current",
  2275. protocol: 'instance creation',
  2276. fn: function (){
  2277. var self=this;
  2278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2279. return $core.withContext(function($ctx1) {
  2280. //>>excludeEnd("ctx");
  2281. var $1,$receiver;
  2282. $1=self["@current"];
  2283. if(($receiver = $1) == null || $receiver.isNil){
  2284. self["@current"]=(
  2285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2286. $ctx1.supercall = true,
  2287. //>>excludeEnd("ctx");
  2288. ($globals.TabManager.klass.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
  2289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2290. $ctx1.supercall = false;
  2291. //>>excludeEnd("ctx");;
  2292. return self["@current"];
  2293. } else {
  2294. return $1;
  2295. }
  2296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2297. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.TabManager.klass)});
  2298. //>>excludeEnd("ctx");
  2299. },
  2300. //>>excludeStart("ide", pragmas.excludeIdeData);
  2301. args: [],
  2302. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2303. referencedClasses: [],
  2304. //>>excludeEnd("ide");
  2305. messageSends: ["ifNil:", "new"]
  2306. }),
  2307. $globals.TabManager.klass);
  2308. $core.addMethod(
  2309. $core.method({
  2310. selector: "new",
  2311. protocol: 'instance creation',
  2312. fn: function (){
  2313. var self=this;
  2314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2315. return $core.withContext(function($ctx1) {
  2316. //>>excludeEnd("ctx");
  2317. self._shouldNotImplement();
  2318. return self;
  2319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2320. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.TabManager.klass)});
  2321. //>>excludeEnd("ctx");
  2322. },
  2323. //>>excludeStart("ide", pragmas.excludeIdeData);
  2324. args: [],
  2325. source: "new\x0a\x09self shouldNotImplement",
  2326. referencedClasses: [],
  2327. //>>excludeEnd("ide");
  2328. messageSends: ["shouldNotImplement"]
  2329. }),
  2330. $globals.TabManager.klass);
  2331. $core.addMethod(
  2332. $core.method({
  2333. selector: "toggleAmberIDE",
  2334. protocol: 'actions',
  2335. fn: function (){
  2336. var self=this;
  2337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2338. return $core.withContext(function($ctx1) {
  2339. //>>excludeEnd("ctx");
  2340. var $3,$2,$1,$4,$5;
  2341. $3="#amber"._asJQuery();
  2342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2343. $ctx1.sendIdx["asJQuery"]=1;
  2344. //>>excludeEnd("ctx");
  2345. $2=$recv($3)._length();
  2346. $1=$recv($2).__eq((0));
  2347. if($core.assert($1)){
  2348. $recv($globals.Browser)._open();
  2349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2350. $ctx1.sendIdx["open"]=1;
  2351. //>>excludeEnd("ctx");
  2352. } else {
  2353. $4=$recv("#amber"._asJQuery())._is_(":visible");
  2354. if($core.assert($4)){
  2355. $5=$recv($globals.TabManager)._current();
  2356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2357. $ctx1.sendIdx["current"]=1;
  2358. //>>excludeEnd("ctx");
  2359. $recv($5)._close();
  2360. } else {
  2361. $recv($recv($globals.TabManager)._current())._open();
  2362. }
  2363. }
  2364. return self;
  2365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2366. }, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},$globals.TabManager.klass)});
  2367. //>>excludeEnd("ctx");
  2368. },
  2369. //>>excludeStart("ide", pragmas.excludeIdeData);
  2370. args: [],
  2371. 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 ] ]",
  2372. referencedClasses: ["Browser", "TabManager"],
  2373. //>>excludeEnd("ide");
  2374. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"]
  2375. }),
  2376. $globals.TabManager.klass);
  2377. $core.addClass('TabWidget', $globals.Widget, ['div'], 'IDE');
  2378. $core.addMethod(
  2379. $core.method({
  2380. selector: "canBeClosed",
  2381. protocol: 'testing',
  2382. fn: function (){
  2383. var self=this;
  2384. return false;
  2385. },
  2386. //>>excludeStart("ide", pragmas.excludeIdeData);
  2387. args: [],
  2388. source: "canBeClosed\x0a\x09^ false",
  2389. referencedClasses: [],
  2390. //>>excludeEnd("ide");
  2391. messageSends: []
  2392. }),
  2393. $globals.TabWidget);
  2394. $core.addMethod(
  2395. $core.method({
  2396. selector: "close",
  2397. protocol: 'actions',
  2398. fn: function (){
  2399. var self=this;
  2400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2401. return $core.withContext(function($ctx1) {
  2402. //>>excludeEnd("ctx");
  2403. $recv($recv($globals.TabManager)._current())._closeTab_(self);
  2404. return self;
  2405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2406. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.TabWidget)});
  2407. //>>excludeEnd("ctx");
  2408. },
  2409. //>>excludeStart("ide", pragmas.excludeIdeData);
  2410. args: [],
  2411. source: "close\x0a\x09TabManager current closeTab: self",
  2412. referencedClasses: ["TabManager"],
  2413. //>>excludeEnd("ide");
  2414. messageSends: ["closeTab:", "current"]
  2415. }),
  2416. $globals.TabWidget);
  2417. $core.addMethod(
  2418. $core.method({
  2419. selector: "hide",
  2420. protocol: 'actions',
  2421. fn: function (){
  2422. var self=this;
  2423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2424. return $core.withContext(function($ctx1) {
  2425. //>>excludeEnd("ctx");
  2426. $recv($recv(self["@div"])._asJQuery())._hide();
  2427. return self;
  2428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2429. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.TabWidget)});
  2430. //>>excludeEnd("ctx");
  2431. },
  2432. //>>excludeStart("ide", pragmas.excludeIdeData);
  2433. args: [],
  2434. source: "hide\x0a\x09div asJQuery hide",
  2435. referencedClasses: [],
  2436. //>>excludeEnd("ide");
  2437. messageSends: ["hide", "asJQuery"]
  2438. }),
  2439. $globals.TabWidget);
  2440. $core.addMethod(
  2441. $core.method({
  2442. selector: "label",
  2443. protocol: 'accessing',
  2444. fn: function (){
  2445. var self=this;
  2446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2447. return $core.withContext(function($ctx1) {
  2448. //>>excludeEnd("ctx");
  2449. self._subclassResponsibility();
  2450. return self;
  2451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2452. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.TabWidget)});
  2453. //>>excludeEnd("ctx");
  2454. },
  2455. //>>excludeStart("ide", pragmas.excludeIdeData);
  2456. args: [],
  2457. source: "label\x0a\x09self subclassResponsibility",
  2458. referencedClasses: [],
  2459. //>>excludeEnd("ide");
  2460. messageSends: ["subclassResponsibility"]
  2461. }),
  2462. $globals.TabWidget);
  2463. $core.addMethod(
  2464. $core.method({
  2465. selector: "open",
  2466. protocol: 'actions',
  2467. fn: function (){
  2468. var self=this;
  2469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2470. return $core.withContext(function($ctx1) {
  2471. //>>excludeEnd("ctx");
  2472. var $1;
  2473. $1=$recv($globals.TabManager)._current();
  2474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2475. $ctx1.sendIdx["current"]=1;
  2476. //>>excludeEnd("ctx");
  2477. $recv($1)._addTab_(self);
  2478. $recv($recv($globals.TabManager)._current())._selectTab_(self);
  2479. return self;
  2480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2481. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabWidget)});
  2482. //>>excludeEnd("ctx");
  2483. },
  2484. //>>excludeStart("ide", pragmas.excludeIdeData);
  2485. args: [],
  2486. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  2487. referencedClasses: ["TabManager"],
  2488. //>>excludeEnd("ide");
  2489. messageSends: ["addTab:", "current", "selectTab:"]
  2490. }),
  2491. $globals.TabWidget);
  2492. $core.addMethod(
  2493. $core.method({
  2494. selector: "remove",
  2495. protocol: 'actions',
  2496. fn: function (){
  2497. var self=this;
  2498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2499. return $core.withContext(function($ctx1) {
  2500. //>>excludeEnd("ctx");
  2501. $recv($recv(self["@div"])._asJQuery())._remove();
  2502. return self;
  2503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2504. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.TabWidget)});
  2505. //>>excludeEnd("ctx");
  2506. },
  2507. //>>excludeStart("ide", pragmas.excludeIdeData);
  2508. args: [],
  2509. source: "remove\x0a\x09div asJQuery remove",
  2510. referencedClasses: [],
  2511. //>>excludeEnd("ide");
  2512. messageSends: ["remove", "asJQuery"]
  2513. }),
  2514. $globals.TabWidget);
  2515. $core.addMethod(
  2516. $core.method({
  2517. selector: "renderBoxOn:",
  2518. protocol: 'rendering',
  2519. fn: function (html){
  2520. var self=this;
  2521. return self;
  2522. },
  2523. //>>excludeStart("ide", pragmas.excludeIdeData);
  2524. args: ["html"],
  2525. source: "renderBoxOn: html",
  2526. referencedClasses: [],
  2527. //>>excludeEnd("ide");
  2528. messageSends: []
  2529. }),
  2530. $globals.TabWidget);
  2531. $core.addMethod(
  2532. $core.method({
  2533. selector: "renderButtonsOn:",
  2534. protocol: 'rendering',
  2535. fn: function (html){
  2536. var self=this;
  2537. return self;
  2538. },
  2539. //>>excludeStart("ide", pragmas.excludeIdeData);
  2540. args: ["html"],
  2541. source: "renderButtonsOn: html",
  2542. referencedClasses: [],
  2543. //>>excludeEnd("ide");
  2544. messageSends: []
  2545. }),
  2546. $globals.TabWidget);
  2547. $core.addMethod(
  2548. $core.method({
  2549. selector: "renderOn:",
  2550. protocol: 'rendering',
  2551. fn: function (html){
  2552. var self=this;
  2553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2554. return $core.withContext(function($ctx1) {
  2555. //>>excludeEnd("ctx");
  2556. var $1;
  2557. $1=$recv(html)._div();
  2558. $recv($1)._class_("amberTool");
  2559. self["@div"]=$recv($1)._yourself();
  2560. self._renderTab();
  2561. return self;
  2562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2563. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.TabWidget)});
  2564. //>>excludeEnd("ctx");
  2565. },
  2566. //>>excludeStart("ide", pragmas.excludeIdeData);
  2567. args: ["html"],
  2568. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  2569. referencedClasses: [],
  2570. //>>excludeEnd("ide");
  2571. messageSends: ["class:", "div", "yourself", "renderTab"]
  2572. }),
  2573. $globals.TabWidget);
  2574. $core.addMethod(
  2575. $core.method({
  2576. selector: "renderTab",
  2577. protocol: 'rendering',
  2578. fn: function (){
  2579. var self=this;
  2580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2581. return $core.withContext(function($ctx1) {
  2582. //>>excludeEnd("ctx");
  2583. var $1,$2,$3;
  2584. $recv(self["@div"])._contents_((function(html){
  2585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2586. return $core.withContext(function($ctx2) {
  2587. //>>excludeEnd("ctx");
  2588. $1=$recv(html)._div();
  2589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2590. $ctx2.sendIdx["div"]=1;
  2591. //>>excludeEnd("ctx");
  2592. $recv($1)._class_("amber_box");
  2593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2594. $ctx2.sendIdx["class:"]=1;
  2595. //>>excludeEnd("ctx");
  2596. $2=$recv($1)._with_((function(){
  2597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2598. return $core.withContext(function($ctx3) {
  2599. //>>excludeEnd("ctx");
  2600. return self._renderBoxOn_(html);
  2601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2602. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  2603. //>>excludeEnd("ctx");
  2604. }));
  2605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2606. $ctx2.sendIdx["with:"]=1;
  2607. //>>excludeEnd("ctx");
  2608. $2;
  2609. $3=$recv(html)._div();
  2610. $recv($3)._class_("amber_buttons");
  2611. return $recv($3)._with_((function(){
  2612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2613. return $core.withContext(function($ctx3) {
  2614. //>>excludeEnd("ctx");
  2615. return self._renderButtonsOn_(html);
  2616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2617. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  2618. //>>excludeEnd("ctx");
  2619. }));
  2620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2621. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  2622. //>>excludeEnd("ctx");
  2623. }));
  2624. return self;
  2625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2626. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.TabWidget)});
  2627. //>>excludeEnd("ctx");
  2628. },
  2629. //>>excludeStart("ide", pragmas.excludeIdeData);
  2630. args: [],
  2631. 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 ]]",
  2632. referencedClasses: [],
  2633. //>>excludeEnd("ide");
  2634. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"]
  2635. }),
  2636. $globals.TabWidget);
  2637. $core.addMethod(
  2638. $core.method({
  2639. selector: "show",
  2640. protocol: 'actions',
  2641. fn: function (){
  2642. var self=this;
  2643. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2644. return $core.withContext(function($ctx1) {
  2645. //>>excludeEnd("ctx");
  2646. $recv($recv(self["@div"])._asJQuery())._show();
  2647. return self;
  2648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2649. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.TabWidget)});
  2650. //>>excludeEnd("ctx");
  2651. },
  2652. //>>excludeStart("ide", pragmas.excludeIdeData);
  2653. args: [],
  2654. source: "show\x0a\x09div asJQuery show",
  2655. referencedClasses: [],
  2656. //>>excludeEnd("ide");
  2657. messageSends: ["show", "asJQuery"]
  2658. }),
  2659. $globals.TabWidget);
  2660. $core.addMethod(
  2661. $core.method({
  2662. selector: "update",
  2663. protocol: 'rendering',
  2664. fn: function (){
  2665. var self=this;
  2666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2667. return $core.withContext(function($ctx1) {
  2668. //>>excludeEnd("ctx");
  2669. self._renderTab();
  2670. return self;
  2671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2672. }, function($ctx1) {$ctx1.fill(self,"update",{},$globals.TabWidget)});
  2673. //>>excludeEnd("ctx");
  2674. },
  2675. //>>excludeStart("ide", pragmas.excludeIdeData);
  2676. args: [],
  2677. source: "update\x0a\x09self renderTab",
  2678. referencedClasses: [],
  2679. //>>excludeEnd("ide");
  2680. messageSends: ["renderTab"]
  2681. }),
  2682. $globals.TabWidget);
  2683. $core.addMethod(
  2684. $core.method({
  2685. selector: "open",
  2686. protocol: 'instance creation',
  2687. fn: function (){
  2688. var self=this;
  2689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2690. return $core.withContext(function($ctx1) {
  2691. //>>excludeEnd("ctx");
  2692. return $recv(self._new())._open();
  2693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2694. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabWidget.klass)});
  2695. //>>excludeEnd("ctx");
  2696. },
  2697. //>>excludeStart("ide", pragmas.excludeIdeData);
  2698. args: [],
  2699. source: "open\x0a\x09^ self new open",
  2700. referencedClasses: [],
  2701. //>>excludeEnd("ide");
  2702. messageSends: ["open", "new"]
  2703. }),
  2704. $globals.TabWidget.klass);
  2705. $core.addClass('Browser', $globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  2706. $core.addMethod(
  2707. $core.method({
  2708. selector: "addInstanceVariableNamed:toClass:",
  2709. protocol: 'actions',
  2710. fn: function (aString,aClass){
  2711. var self=this;
  2712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2713. return $core.withContext(function($ctx1) {
  2714. //>>excludeEnd("ctx");
  2715. var $1,$2,$3,$5,$4;
  2716. $1=$recv($globals.ClassBuilder)._new();
  2717. $2=$recv(aClass)._superclass();
  2718. $3=$recv(aClass)._name();
  2719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2720. $ctx1.sendIdx["name"]=1;
  2721. //>>excludeEnd("ctx");
  2722. $5=$recv($recv(aClass)._instanceVariableNames())._copy();
  2723. $recv($5)._add_(aString);
  2724. $4=$recv($5)._yourself();
  2725. $recv($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$recv($recv(aClass)._package())._name());
  2726. return self;
  2727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2728. }, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},$globals.Browser)});
  2729. //>>excludeEnd("ctx");
  2730. },
  2731. //>>excludeStart("ide", pragmas.excludeIdeData);
  2732. args: ["aString", "aClass"],
  2733. 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",
  2734. referencedClasses: ["ClassBuilder"],
  2735. //>>excludeEnd("ide");
  2736. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"]
  2737. }),
  2738. $globals.Browser);
  2739. $core.addMethod(
  2740. $core.method({
  2741. selector: "addNewClass",
  2742. protocol: 'actions',
  2743. fn: function (){
  2744. var self=this;
  2745. var className;
  2746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2747. return $core.withContext(function($ctx1) {
  2748. //>>excludeEnd("ctx");
  2749. var $1;
  2750. className=$recv($globals.Terminal)._prompt_("New class");
  2751. $1=$recv($recv(className)._notNil())._and_((function(){
  2752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2753. return $core.withContext(function($ctx2) {
  2754. //>>excludeEnd("ctx");
  2755. return $recv(className)._notEmpty();
  2756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2757. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2758. //>>excludeEnd("ctx");
  2759. }));
  2760. if($core.assert($1)){
  2761. $recv($globals.Object)._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  2762. self._resetClassesList();
  2763. self._updateClassesList();
  2764. self._selectClass_($recv($recv($globals.Smalltalk)._globals())._at_(className));
  2765. }
  2766. return self;
  2767. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2768. }, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},$globals.Browser)});
  2769. //>>excludeEnd("ctx");
  2770. },
  2771. //>>excludeStart("ide", pragmas.excludeIdeData);
  2772. args: [],
  2773. source: "addNewClass\x0a\x09| className |\x0a\x09className := Terminal 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) ]",
  2774. referencedClasses: ["Terminal", "Object", "Smalltalk"],
  2775. //>>excludeEnd("ide");
  2776. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"]
  2777. }),
  2778. $globals.Browser);
  2779. $core.addMethod(
  2780. $core.method({
  2781. selector: "addNewProtocol",
  2782. protocol: 'actions',
  2783. fn: function (){
  2784. var self=this;
  2785. var newProtocol;
  2786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2787. return $core.withContext(function($ctx1) {
  2788. //>>excludeEnd("ctx");
  2789. var $1;
  2790. newProtocol=$recv($globals.Terminal)._prompt_("New method protocol");
  2791. $1=$recv($recv(newProtocol)._notNil())._and_((function(){
  2792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2793. return $core.withContext(function($ctx2) {
  2794. //>>excludeEnd("ctx");
  2795. return $recv(newProtocol)._notEmpty();
  2796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2797. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2798. //>>excludeEnd("ctx");
  2799. }));
  2800. if($core.assert($1)){
  2801. $recv(self["@selectedMethod"])._protocol_(newProtocol);
  2802. self._setMethodProtocol_(newProtocol);
  2803. }
  2804. return self;
  2805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2806. }, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},$globals.Browser)});
  2807. //>>excludeEnd("ctx");
  2808. },
  2809. //>>excludeStart("ide", pragmas.excludeIdeData);
  2810. args: [],
  2811. source: "addNewProtocol\x0a\x09| newProtocol |\x0a\x09\x0a\x09newProtocol := Terminal prompt: 'New method protocol'.\x0a\x09\x0a\x09(newProtocol notNil and: [ newProtocol notEmpty ]) ifTrue: [\x0a\x09\x09selectedMethod protocol: newProtocol.\x0a\x09\x09self setMethodProtocol: newProtocol ]",
  2812. referencedClasses: ["Terminal"],
  2813. //>>excludeEnd("ide");
  2814. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"]
  2815. }),
  2816. $globals.Browser);
  2817. $core.addMethod(
  2818. $core.method({
  2819. selector: "canBeClosed",
  2820. protocol: 'testing',
  2821. fn: function (){
  2822. var self=this;
  2823. return true;
  2824. },
  2825. //>>excludeStart("ide", pragmas.excludeIdeData);
  2826. args: [],
  2827. source: "canBeClosed\x0a\x09^ true",
  2828. referencedClasses: [],
  2829. //>>excludeEnd("ide");
  2830. messageSends: []
  2831. }),
  2832. $globals.Browser);
  2833. $core.addMethod(
  2834. $core.method({
  2835. selector: "cancelChanges",
  2836. protocol: 'actions',
  2837. fn: function (){
  2838. var self=this;
  2839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2840. return $core.withContext(function($ctx1) {
  2841. //>>excludeEnd("ctx");
  2842. var $1;
  2843. $1=self["@unsavedChanges"];
  2844. if($core.assert($1)){
  2845. return $recv($globals.Terminal)._confirm_("Cancel changes?");
  2846. } else {
  2847. return true;
  2848. }
  2849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2850. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},$globals.Browser)});
  2851. //>>excludeEnd("ctx");
  2852. },
  2853. //>>excludeStart("ide", pragmas.excludeIdeData);
  2854. args: [],
  2855. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ Terminal confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  2856. referencedClasses: ["Terminal"],
  2857. //>>excludeEnd("ide");
  2858. messageSends: ["ifTrue:ifFalse:", "confirm:"]
  2859. }),
  2860. $globals.Browser);
  2861. $core.addMethod(
  2862. $core.method({
  2863. selector: "classCommentSource",
  2864. protocol: 'accessing',
  2865. fn: function (){
  2866. var self=this;
  2867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2868. return $core.withContext(function($ctx1) {
  2869. //>>excludeEnd("ctx");
  2870. return $recv(self["@selectedClass"])._comment();
  2871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2872. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},$globals.Browser)});
  2873. //>>excludeEnd("ctx");
  2874. },
  2875. //>>excludeStart("ide", pragmas.excludeIdeData);
  2876. args: [],
  2877. source: "classCommentSource\x0a\x09^ selectedClass comment",
  2878. referencedClasses: [],
  2879. //>>excludeEnd("ide");
  2880. messageSends: ["comment"]
  2881. }),
  2882. $globals.Browser);
  2883. $core.addMethod(
  2884. $core.method({
  2885. selector: "classDeclarationTemplate",
  2886. protocol: 'accessing',
  2887. fn: function (){
  2888. var self=this;
  2889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2890. return $core.withContext(function($ctx1) {
  2891. //>>excludeEnd("ctx");
  2892. var $1;
  2893. $1=$recv("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2895. $ctx1.sendIdx[","]=1;
  2896. //>>excludeEnd("ctx");
  2897. return $1;
  2898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2899. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},$globals.Browser)});
  2900. //>>excludeEnd("ctx");
  2901. },
  2902. //>>excludeStart("ide", pragmas.excludeIdeData);
  2903. args: [],
  2904. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  2905. referencedClasses: [],
  2906. //>>excludeEnd("ide");
  2907. messageSends: [",", "selectedPackage"]
  2908. }),
  2909. $globals.Browser);
  2910. $core.addMethod(
  2911. $core.method({
  2912. selector: "classes",
  2913. protocol: 'accessing',
  2914. fn: function (){
  2915. var self=this;
  2916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2917. return $core.withContext(function($ctx1) {
  2918. //>>excludeEnd("ctx");
  2919. var $1;
  2920. return $recv($recv($recv($recv($globals.Smalltalk)._classes())._select_((function(each){
  2921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2922. return $core.withContext(function($ctx2) {
  2923. //>>excludeEnd("ctx");
  2924. return $recv($recv(each)._category()).__eq(self["@selectedPackage"]);
  2925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2926. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2927. //>>excludeEnd("ctx");
  2928. })))._sort_((function(a,b){
  2929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2930. return $core.withContext(function($ctx2) {
  2931. //>>excludeEnd("ctx");
  2932. $1=$recv(a)._name();
  2933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2934. $ctx2.sendIdx["name"]=1;
  2935. //>>excludeEnd("ctx");
  2936. return $recv($1).__lt($recv(b)._name());
  2937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2938. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)});
  2939. //>>excludeEnd("ctx");
  2940. })))._asSet();
  2941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2942. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.Browser)});
  2943. //>>excludeEnd("ctx");
  2944. },
  2945. //>>excludeStart("ide", pragmas.excludeIdeData);
  2946. args: [],
  2947. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  2948. referencedClasses: ["Smalltalk"],
  2949. //>>excludeEnd("ide");
  2950. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"]
  2951. }),
  2952. $globals.Browser);
  2953. $core.addMethod(
  2954. $core.method({
  2955. selector: "commitPackage",
  2956. protocol: 'actions',
  2957. fn: function (){
  2958. var self=this;
  2959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2960. return $core.withContext(function($ctx1) {
  2961. //>>excludeEnd("ctx");
  2962. var $1,$receiver;
  2963. $1=self["@selectedPackage"];
  2964. if(($receiver = $1) == null || $receiver.isNil){
  2965. $1;
  2966. } else {
  2967. $recv($recv($globals.Package)._named_(self["@selectedPackage"]))._commit();
  2968. }
  2969. return self;
  2970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2971. }, function($ctx1) {$ctx1.fill(self,"commitPackage",{},$globals.Browser)});
  2972. //>>excludeEnd("ctx");
  2973. },
  2974. //>>excludeStart("ide", pragmas.excludeIdeData);
  2975. args: [],
  2976. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  2977. referencedClasses: ["Package"],
  2978. //>>excludeEnd("ide");
  2979. messageSends: ["ifNotNil:", "commit", "named:"]
  2980. }),
  2981. $globals.Browser);
  2982. $core.addMethod(
  2983. $core.method({
  2984. selector: "compile",
  2985. protocol: 'actions',
  2986. fn: function (){
  2987. var self=this;
  2988. var currentEditLine;
  2989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2990. return $core.withContext(function($ctx1) {
  2991. //>>excludeEnd("ctx");
  2992. var $1,$2,$3,$5,$4,$receiver;
  2993. self._disableSaveButton();
  2994. $1=$recv(self["@sourceArea"])._editor();
  2995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2996. $ctx1.sendIdx["editor"]=1;
  2997. //>>excludeEnd("ctx");
  2998. currentEditLine=$recv($1)._getCursor();
  2999. $2=$recv(self["@selectedTab"]).__eq("comment");
  3000. if($core.assert($2)){
  3001. $3=self["@selectedClass"];
  3002. if(($receiver = $3) == null || $receiver.isNil){
  3003. $3;
  3004. } else {
  3005. self._compileClassComment();
  3006. }
  3007. } else {
  3008. $5=$recv(self["@selectedProtocol"])._notNil();
  3009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3010. $ctx1.sendIdx["notNil"]=1;
  3011. //>>excludeEnd("ctx");
  3012. $4=$recv($5)._or_((function(){
  3013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3014. return $core.withContext(function($ctx2) {
  3015. //>>excludeEnd("ctx");
  3016. return $recv(self["@selectedMethod"])._notNil();
  3017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3018. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  3019. //>>excludeEnd("ctx");
  3020. }));
  3021. if($core.assert($4)){
  3022. self._compileMethodDefinition();
  3023. } else {
  3024. self._compileDefinition();
  3025. }
  3026. }
  3027. $recv($recv(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  3028. return self;
  3029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3030. }, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},$globals.Browser)});
  3031. //>>excludeEnd("ctx");
  3032. },
  3033. //>>excludeStart("ide", pragmas.excludeIdeData);
  3034. args: [],
  3035. 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.",
  3036. referencedClasses: [],
  3037. //>>excludeEnd("ide");
  3038. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"]
  3039. }),
  3040. $globals.Browser);
  3041. $core.addMethod(
  3042. $core.method({
  3043. selector: "compileClassComment",
  3044. protocol: 'actions',
  3045. fn: function (){
  3046. var self=this;
  3047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3048. return $core.withContext(function($ctx1) {
  3049. //>>excludeEnd("ctx");
  3050. $recv(self["@selectedClass"])._comment_($recv(self["@sourceArea"])._val());
  3051. return self;
  3052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3053. }, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},$globals.Browser)});
  3054. //>>excludeEnd("ctx");
  3055. },
  3056. //>>excludeStart("ide", pragmas.excludeIdeData);
  3057. args: [],
  3058. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  3059. referencedClasses: [],
  3060. //>>excludeEnd("ide");
  3061. messageSends: ["comment:", "val"]
  3062. }),
  3063. $globals.Browser);
  3064. $core.addMethod(
  3065. $core.method({
  3066. selector: "compileDefinition",
  3067. protocol: 'actions',
  3068. fn: function (){
  3069. var self=this;
  3070. var newClass;
  3071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3072. return $core.withContext(function($ctx1) {
  3073. //>>excludeEnd("ctx");
  3074. newClass=$recv($recv($globals.Compiler)._new())._evaluateExpression_($recv(self["@sourceArea"])._val());
  3075. self._resetClassesList();
  3076. self._updateCategoriesList();
  3077. self._updateClassesList();
  3078. self._selectClass_(newClass);
  3079. return self;
  3080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3081. }, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},$globals.Browser)});
  3082. //>>excludeEnd("ctx");
  3083. },
  3084. //>>excludeStart("ide", pragmas.excludeIdeData);
  3085. args: [],
  3086. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  3087. referencedClasses: ["Compiler"],
  3088. //>>excludeEnd("ide");
  3089. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"]
  3090. }),
  3091. $globals.Browser);
  3092. $core.addMethod(
  3093. $core.method({
  3094. selector: "compileMethodDefinition",
  3095. protocol: 'actions',
  3096. fn: function (){
  3097. var self=this;
  3098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3099. return $core.withContext(function($ctx1) {
  3100. //>>excludeEnd("ctx");
  3101. self._compileMethodDefinitionFor_(self._selectedClassOrMetaClass());
  3102. return self;
  3103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3104. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},$globals.Browser)});
  3105. //>>excludeEnd("ctx");
  3106. },
  3107. //>>excludeStart("ide", pragmas.excludeIdeData);
  3108. args: [],
  3109. source: "compileMethodDefinition\x0a\x09self compileMethodDefinitionFor: self selectedClassOrMetaClass",
  3110. referencedClasses: [],
  3111. //>>excludeEnd("ide");
  3112. messageSends: ["compileMethodDefinitionFor:", "selectedClassOrMetaClass"]
  3113. }),
  3114. $globals.Browser);
  3115. $core.addMethod(
  3116. $core.method({
  3117. selector: "compileMethodDefinitionFor:",
  3118. protocol: 'actions',
  3119. fn: function (aClass){
  3120. var self=this;
  3121. var compiler,package_,method,compiledSource,source,node;
  3122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3123. return $core.withContext(function($ctx1) {
  3124. //>>excludeEnd("ctx");
  3125. var $1,$2,$5,$4,$3,$6,$8,$7,$receiver;
  3126. var $early={};
  3127. try {
  3128. source=$recv(self["@sourceArea"])._val();
  3129. $1=self["@selectedProtocol"];
  3130. if(($receiver = $1) == null || $receiver.isNil){
  3131. self["@selectedProtocol"]=$recv(self["@selectedMethod"])._protocol();
  3132. self["@selectedProtocol"];
  3133. } else {
  3134. $1;
  3135. }
  3136. compiler=$recv($globals.Compiler)._new();
  3137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3138. $ctx1.sendIdx["new"]=1;
  3139. //>>excludeEnd("ctx");
  3140. $recv(compiler)._source_(source);
  3141. node=$recv(compiler)._parse_(source);
  3142. $2=$recv(node)._isParseFailure();
  3143. if($core.assert($2)){
  3144. $5="PARSE ERROR: ".__comma($recv(node)._reason());
  3145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3146. $ctx1.sendIdx[","]=3;
  3147. //>>excludeEnd("ctx");
  3148. $4=$recv($5).__comma(", position: ");
  3149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3150. $ctx1.sendIdx[","]=2;
  3151. //>>excludeEnd("ctx");
  3152. $3=$recv($4).__comma($recv($recv(node)._position())._asString());
  3153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3154. $ctx1.sendIdx[","]=1;
  3155. //>>excludeEnd("ctx");
  3156. return $recv($globals.Terminal)._alert_($3);
  3157. }
  3158. package_=$recv(aClass)._packageOfProtocol_(self["@selectedProtocol"]);
  3159. compiledSource=$recv(compiler)._compileNode_forClass_package_(node,aClass,package_);
  3160. method=$recv(compiler)._eval_forPackage_(compiledSource,package_);
  3161. $recv($recv(compiler)._unknownVariables())._do_((function(each){
  3162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3163. return $core.withContext(function($ctx2) {
  3164. //>>excludeEnd("ctx");
  3165. $6=$recv($globals.Smalltalk)._existsJsGlobal_(each);
  3166. if(!$core.assert($6)){
  3167. $8=$recv("Declare '".__comma(each)).__comma("' as instance variable?");
  3168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3169. $ctx2.sendIdx[","]=4;
  3170. //>>excludeEnd("ctx");
  3171. $7=$recv($globals.Terminal)._confirm_($8);
  3172. if($core.assert($7)){
  3173. self._addInstanceVariableNamed_toClass_(each,aClass);
  3174. throw $early=[self._compileMethodDefinitionFor_(aClass)];
  3175. }
  3176. }
  3177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3178. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  3179. //>>excludeEnd("ctx");
  3180. }));
  3181. $recv($recv($globals.ClassBuilder)._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  3182. self._updateMethodsList();
  3183. self._selectMethod_(method);
  3184. return self;
  3185. }
  3186. catch(e) {if(e===$early)return e[0]; throw e}
  3187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3188. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,package_:package_,method:method,compiledSource:compiledSource,source:source,node:node},$globals.Browser)});
  3189. //>>excludeEnd("ctx");
  3190. },
  3191. //>>excludeStart("ide", pragmas.excludeIdeData);
  3192. args: ["aClass"],
  3193. source: "compileMethodDefinitionFor: aClass\x0a\x09| compiler package method compiledSource 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^ Terminal alert: 'PARSE ERROR: ', node reason, ', position: ', node position asString ].\x0a\x09package := aClass packageOfProtocol: selectedProtocol.\x0a\x09compiledSource := compiler compileNode: node forClass: aClass package: package.\x0a\x09method := compiler eval: compiledSource forPackage: package.\x0a\x09compiler unknownVariables do: [ :each |\x0a\x09\x09\x22Do not try to redeclare javascript's objects\x22\x0a\x09\x09(Smalltalk existsJsGlobal: each) ifFalse: [\x0a\x09\x09(Terminal 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",
  3194. referencedClasses: ["Compiler", "Terminal", "Smalltalk", "ClassBuilder"],
  3195. //>>excludeEnd("ide");
  3196. messageSends: ["val", "ifNil:", "protocol", "new", "source:", "parse:", "ifTrue:", "isParseFailure", "alert:", ",", "reason", "asString", "position", "packageOfProtocol:", "compileNode:forClass:package:", "eval:forPackage:", "do:", "unknownVariables", "ifFalse:", "existsJsGlobal:", "confirm:", "addInstanceVariableNamed:toClass:", "compileMethodDefinitionFor:", "installMethod:forClass:protocol:", "updateMethodsList", "selectMethod:"]
  3197. }),
  3198. $globals.Browser);
  3199. $core.addMethod(
  3200. $core.method({
  3201. selector: "copyClass",
  3202. protocol: 'actions',
  3203. fn: function (){
  3204. var self=this;
  3205. var className;
  3206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3207. return $core.withContext(function($ctx1) {
  3208. //>>excludeEnd("ctx");
  3209. var $1;
  3210. className=$recv($globals.Terminal)._prompt_("Copy class");
  3211. $1=$recv($recv(className)._notNil())._and_((function(){
  3212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3213. return $core.withContext(function($ctx2) {
  3214. //>>excludeEnd("ctx");
  3215. return $recv(className)._notEmpty();
  3216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3217. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3218. //>>excludeEnd("ctx");
  3219. }));
  3220. if($core.assert($1)){
  3221. $recv($recv($globals.ClassBuilder)._new())._copyClass_named_(self._selectedClass(),className);
  3222. self._resetClassesList();
  3223. self._updateClassesList();
  3224. self._selectClass_($recv($recv($globals.Smalltalk)._globals())._at_(className));
  3225. }
  3226. return self;
  3227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3228. }, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},$globals.Browser)});
  3229. //>>excludeEnd("ctx");
  3230. },
  3231. //>>excludeStart("ide", pragmas.excludeIdeData);
  3232. args: [],
  3233. source: "copyClass\x0a\x09| className |\x0a\x09className := Terminal 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) ]",
  3234. referencedClasses: ["Terminal", "ClassBuilder", "Smalltalk"],
  3235. //>>excludeEnd("ide");
  3236. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"]
  3237. }),
  3238. $globals.Browser);
  3239. $core.addMethod(
  3240. $core.method({
  3241. selector: "declarationSource",
  3242. protocol: 'accessing',
  3243. fn: function (){
  3244. var self=this;
  3245. var klass;
  3246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3247. return $core.withContext(function($ctx1) {
  3248. //>>excludeEnd("ctx");
  3249. var $1,$2,$receiver;
  3250. klass=self._selectedClassOrMetaClass();
  3251. $1=klass;
  3252. if(($receiver = $1) == null || $receiver.isNil){
  3253. $2=$recv(self["@selectedTab"]).__eq("instance");
  3254. if($core.assert($2)){
  3255. return self._classDeclarationTemplate();
  3256. } else {
  3257. return "";
  3258. }
  3259. } else {
  3260. return $recv(klass)._definition();
  3261. }
  3262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3263. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{klass:klass},$globals.Browser)});
  3264. //>>excludeEnd("ctx");
  3265. },
  3266. //>>excludeStart("ide", pragmas.excludeIdeData);
  3267. args: [],
  3268. source: "declarationSource\x0a\x09| klass |\x0a\x09klass := self selectedClassOrMetaClass.\x0a\x09^ klass ifNotNil: [ klass definition ] ifNil: [\x0a\x09\x09selectedTab = #instance ifTrue: [ self classDeclarationTemplate ] ifFalse: [ '' ] \x0a\x09]",
  3269. referencedClasses: [],
  3270. //>>excludeEnd("ide");
  3271. messageSends: ["selectedClassOrMetaClass", "ifNotNil:ifNil:", "definition", "ifTrue:ifFalse:", "=", "classDeclarationTemplate"]
  3272. }),
  3273. $globals.Browser);
  3274. $core.addMethod(
  3275. $core.method({
  3276. selector: "disableSaveButton",
  3277. protocol: 'actions',
  3278. fn: function (){
  3279. var self=this;
  3280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3281. return $core.withContext(function($ctx1) {
  3282. //>>excludeEnd("ctx");
  3283. var $1,$receiver;
  3284. $1=self["@saveButton"];
  3285. if(($receiver = $1) == null || $receiver.isNil){
  3286. $1;
  3287. } else {
  3288. $recv(self["@saveButton"])._at_put_("disabled",true);
  3289. }
  3290. self["@unsavedChanges"]=false;
  3291. return self;
  3292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3293. }, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},$globals.Browser)});
  3294. //>>excludeEnd("ctx");
  3295. },
  3296. //>>excludeStart("ide", pragmas.excludeIdeData);
  3297. args: [],
  3298. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  3299. referencedClasses: [],
  3300. //>>excludeEnd("ide");
  3301. messageSends: ["ifNotNil:", "at:put:"]
  3302. }),
  3303. $globals.Browser);
  3304. $core.addMethod(
  3305. $core.method({
  3306. selector: "dummyMethodSource",
  3307. protocol: 'accessing',
  3308. fn: function (){
  3309. var self=this;
  3310. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  3311. },
  3312. //>>excludeStart("ide", pragmas.excludeIdeData);
  3313. args: [],
  3314. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  3315. referencedClasses: [],
  3316. //>>excludeEnd("ide");
  3317. messageSends: []
  3318. }),
  3319. $globals.Browser);
  3320. $core.addMethod(
  3321. $core.method({
  3322. selector: "handleSourceAreaKeyDown:",
  3323. protocol: 'actions',
  3324. fn: function (anEvent){
  3325. var self=this;
  3326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3327. return $core.withContext(function($ctx1) {
  3328. //>>excludeEnd("ctx");
  3329. if(anEvent.ctrlKey) {
  3330. if(anEvent.keyCode === 83) { //ctrl+s
  3331. self._compile();
  3332. anEvent.preventDefault();
  3333. return false;
  3334. }
  3335. }
  3336. ;
  3337. return self;
  3338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3339. }, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},$globals.Browser)});
  3340. //>>excludeEnd("ctx");
  3341. },
  3342. //>>excludeStart("ide", pragmas.excludeIdeData);
  3343. args: ["anEvent"],
  3344. 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>",
  3345. referencedClasses: [],
  3346. //>>excludeEnd("ide");
  3347. messageSends: []
  3348. }),
  3349. $globals.Browser);
  3350. $core.addMethod(
  3351. $core.method({
  3352. selector: "hideClassButtons",
  3353. protocol: 'actions',
  3354. fn: function (){
  3355. var self=this;
  3356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3357. return $core.withContext(function($ctx1) {
  3358. //>>excludeEnd("ctx");
  3359. $recv($recv(self["@classButtons"])._asJQuery())._hide();
  3360. return self;
  3361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3362. }, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},$globals.Browser)});
  3363. //>>excludeEnd("ctx");
  3364. },
  3365. //>>excludeStart("ide", pragmas.excludeIdeData);
  3366. args: [],
  3367. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  3368. referencedClasses: [],
  3369. //>>excludeEnd("ide");
  3370. messageSends: ["hide", "asJQuery"]
  3371. }),
  3372. $globals.Browser);
  3373. $core.addMethod(
  3374. $core.method({
  3375. selector: "hideMethodButtons",
  3376. protocol: 'actions',
  3377. fn: function (){
  3378. var self=this;
  3379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3380. return $core.withContext(function($ctx1) {
  3381. //>>excludeEnd("ctx");
  3382. $recv($recv(self["@methodButtons"])._asJQuery())._hide();
  3383. return self;
  3384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3385. }, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},$globals.Browser)});
  3386. //>>excludeEnd("ctx");
  3387. },
  3388. //>>excludeStart("ide", pragmas.excludeIdeData);
  3389. args: [],
  3390. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  3391. referencedClasses: [],
  3392. //>>excludeEnd("ide");
  3393. messageSends: ["hide", "asJQuery"]
  3394. }),
  3395. $globals.Browser);
  3396. $core.addMethod(
  3397. $core.method({
  3398. selector: "initialize",
  3399. protocol: 'initialization',
  3400. fn: function (){
  3401. var self=this;
  3402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3403. return $core.withContext(function($ctx1) {
  3404. //>>excludeEnd("ctx");
  3405. (
  3406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3407. $ctx1.supercall = true,
  3408. //>>excludeEnd("ctx");
  3409. ($globals.Browser.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  3410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3411. $ctx1.supercall = false;
  3412. //>>excludeEnd("ctx");;
  3413. self["@selectedTab"]="instance";
  3414. self["@selectedPackage"]=$recv(self._packages())._first();
  3415. self["@unsavedChanges"]=false;
  3416. return self;
  3417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3418. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Browser)});
  3419. //>>excludeEnd("ctx");
  3420. },
  3421. //>>excludeStart("ide", pragmas.excludeIdeData);
  3422. args: [],
  3423. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  3424. referencedClasses: [],
  3425. //>>excludeEnd("ide");
  3426. messageSends: ["initialize", "first", "packages"]
  3427. }),
  3428. $globals.Browser);
  3429. $core.addMethod(
  3430. $core.method({
  3431. selector: "label",
  3432. protocol: 'accessing',
  3433. fn: function (){
  3434. var self=this;
  3435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3436. return $core.withContext(function($ctx1) {
  3437. //>>excludeEnd("ctx");
  3438. var $1,$receiver;
  3439. $1=self["@selectedClass"];
  3440. if(($receiver = $1) == null || $receiver.isNil){
  3441. return "Browser (nil)";
  3442. } else {
  3443. return "Browser: ".__comma($recv(self["@selectedClass"])._name());
  3444. }
  3445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3446. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.Browser)});
  3447. //>>excludeEnd("ctx");
  3448. },
  3449. //>>excludeStart("ide", pragmas.excludeIdeData);
  3450. args: [],
  3451. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  3452. referencedClasses: [],
  3453. //>>excludeEnd("ide");
  3454. messageSends: ["ifNil:ifNotNil:", ",", "name"]
  3455. }),
  3456. $globals.Browser);
  3457. $core.addMethod(
  3458. $core.method({
  3459. selector: "methodSource",
  3460. protocol: 'accessing',
  3461. fn: function (){
  3462. var self=this;
  3463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3464. return $core.withContext(function($ctx1) {
  3465. //>>excludeEnd("ctx");
  3466. var $1,$receiver;
  3467. $1=self["@selectedMethod"];
  3468. if(($receiver = $1) == null || $receiver.isNil){
  3469. return self._dummyMethodSource();
  3470. } else {
  3471. return $recv(self["@selectedMethod"])._source();
  3472. }
  3473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3474. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},$globals.Browser)});
  3475. //>>excludeEnd("ctx");
  3476. },
  3477. //>>excludeStart("ide", pragmas.excludeIdeData);
  3478. args: [],
  3479. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  3480. referencedClasses: [],
  3481. //>>excludeEnd("ide");
  3482. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"]
  3483. }),
  3484. $globals.Browser);
  3485. $core.addMethod(
  3486. $core.method({
  3487. selector: "methods",
  3488. protocol: 'accessing',
  3489. fn: function (){
  3490. var self=this;
  3491. var klass;
  3492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3493. return $core.withContext(function($ctx1) {
  3494. //>>excludeEnd("ctx");
  3495. var $1,$3,$4,$2,$5,$receiver;
  3496. $1=$recv(self["@selectedTab"]).__eq("comment");
  3497. if($core.assert($1)){
  3498. return [];
  3499. }
  3500. klass=self._selectedClassOrMetaClass();
  3501. $3=self["@selectedProtocol"];
  3502. if(($receiver = $3) == null || $receiver.isNil){
  3503. $4=klass;
  3504. if(($receiver = $4) == null || $receiver.isNil){
  3505. $2=[];
  3506. } else {
  3507. $2=$recv($recv(klass)._methodDictionary())._values();
  3508. }
  3509. } else {
  3510. $2=$recv(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  3511. }
  3512. return $recv($2)._sort_((function(a,b){
  3513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3514. return $core.withContext(function($ctx2) {
  3515. //>>excludeEnd("ctx");
  3516. $5=$recv(a)._selector();
  3517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3518. $ctx2.sendIdx["selector"]=1;
  3519. //>>excludeEnd("ctx");
  3520. return $recv($5).__lt($recv(b)._selector());
  3521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3522. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,6)});
  3523. //>>excludeEnd("ctx");
  3524. }));
  3525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3526. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},$globals.Browser)});
  3527. //>>excludeEnd("ctx");
  3528. },
  3529. //>>excludeStart("ide", pragmas.excludeIdeData);
  3530. args: [],
  3531. source: "methods\x0a\x09| klass |\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := self selectedClassOrMetaClass.\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 ]",
  3532. referencedClasses: [],
  3533. //>>excludeEnd("ide");
  3534. messageSends: ["ifTrue:", "=", "selectedClassOrMetaClass", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"]
  3535. }),
  3536. $globals.Browser);
  3537. $core.addMethod(
  3538. $core.method({
  3539. selector: "packages",
  3540. protocol: 'accessing',
  3541. fn: function (){
  3542. var self=this;
  3543. var packages;
  3544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3545. return $core.withContext(function($ctx1) {
  3546. //>>excludeEnd("ctx");
  3547. var $2,$3,$1;
  3548. packages=$recv($globals.Array)._new();
  3549. $recv($recv($globals.Smalltalk)._classes())._do_((function(each){
  3550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3551. return $core.withContext(function($ctx2) {
  3552. //>>excludeEnd("ctx");
  3553. $2=packages;
  3554. $3=$recv(each)._category();
  3555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3556. $ctx2.sendIdx["category"]=1;
  3557. //>>excludeEnd("ctx");
  3558. $1=$recv($2)._includes_($3);
  3559. if(!$core.assert($1)){
  3560. return $recv(packages)._add_($recv(each)._category());
  3561. }
  3562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3563. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3564. //>>excludeEnd("ctx");
  3565. }));
  3566. return $recv(packages)._sort();
  3567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3568. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},$globals.Browser)});
  3569. //>>excludeEnd("ctx");
  3570. },
  3571. //>>excludeStart("ide", pragmas.excludeIdeData);
  3572. args: [],
  3573. 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",
  3574. referencedClasses: ["Array", "Smalltalk"],
  3575. //>>excludeEnd("ide");
  3576. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"]
  3577. }),
  3578. $globals.Browser);
  3579. $core.addMethod(
  3580. $core.method({
  3581. selector: "protocols",
  3582. protocol: 'accessing',
  3583. fn: function (){
  3584. var self=this;
  3585. var klass;
  3586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3587. return $core.withContext(function($ctx1) {
  3588. //>>excludeEnd("ctx");
  3589. var $1,$2,$receiver;
  3590. var $early={};
  3591. try {
  3592. $1=self["@selectedClass"];
  3593. if(($receiver = $1) == null || $receiver.isNil){
  3594. $1;
  3595. } else {
  3596. $2=$recv(self["@selectedTab"]).__eq("comment");
  3597. if($core.assert($2)){
  3598. return [];
  3599. }
  3600. klass=self._selectedClassOrMetaClass();
  3601. klass;
  3602. $recv($recv(klass)._methodDictionary())._ifEmpty_((function(){
  3603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3604. return $core.withContext(function($ctx2) {
  3605. //>>excludeEnd("ctx");
  3606. throw $early=[$recv($globals.Array)._with_("not yet classified")];
  3607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3608. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3609. //>>excludeEnd("ctx");
  3610. }));
  3611. return $recv(klass)._protocols();
  3612. }
  3613. return $recv($globals.Array)._new();
  3614. }
  3615. catch(e) {if(e===$early)return e[0]; throw e}
  3616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3617. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},$globals.Browser)});
  3618. //>>excludeEnd("ctx");
  3619. },
  3620. //>>excludeStart("ide", pragmas.excludeIdeData);
  3621. args: [],
  3622. source: "protocols\x0a\x09| klass |\x0a\x09selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := self selectedClassOrMetaClass.\x0a\x09klass methodDictionary ifEmpty: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  3623. referencedClasses: ["Array"],
  3624. //>>excludeEnd("ide");
  3625. messageSends: ["ifNotNil:", "ifTrue:", "=", "selectedClassOrMetaClass", "ifEmpty:", "methodDictionary", "with:", "protocols", "new"]
  3626. }),
  3627. $globals.Browser);
  3628. $core.addMethod(
  3629. $core.method({
  3630. selector: "removeClass",
  3631. protocol: 'actions',
  3632. fn: function (){
  3633. var self=this;
  3634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3635. return $core.withContext(function($ctx1) {
  3636. //>>excludeEnd("ctx");
  3637. var $2,$1;
  3638. $2=$recv("Do you really want to remove ".__comma($recv(self["@selectedClass"])._name())).__comma("?");
  3639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3640. $ctx1.sendIdx[","]=1;
  3641. //>>excludeEnd("ctx");
  3642. $1=$recv($globals.Terminal)._confirm_($2);
  3643. if($core.assert($1)){
  3644. $recv($globals.Smalltalk)._removeClass_(self["@selectedClass"]);
  3645. self._resetClassesList();
  3646. self._selectClass_(nil);
  3647. }
  3648. return self;
  3649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3650. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.Browser)});
  3651. //>>excludeEnd("ctx");
  3652. },
  3653. //>>excludeStart("ide", pragmas.excludeIdeData);
  3654. args: [],
  3655. source: "removeClass\x0a\x09(Terminal 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 ]",
  3656. referencedClasses: ["Terminal", "Smalltalk"],
  3657. //>>excludeEnd("ide");
  3658. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"]
  3659. }),
  3660. $globals.Browser);
  3661. $core.addMethod(
  3662. $core.method({
  3663. selector: "removeMethod",
  3664. protocol: 'actions',
  3665. fn: function (){
  3666. var self=this;
  3667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3668. return $core.withContext(function($ctx1) {
  3669. //>>excludeEnd("ctx");
  3670. var $1,$3,$2;
  3671. $1=self._cancelChanges();
  3672. if($core.assert($1)){
  3673. $3=$recv("Do you really want to remove #".__comma($recv(self["@selectedMethod"])._selector())).__comma("?");
  3674. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3675. $ctx1.sendIdx[","]=1;
  3676. //>>excludeEnd("ctx");
  3677. $2=$recv($globals.Terminal)._confirm_($3);
  3678. if($core.assert($2)){
  3679. $recv(self._selectedClassOrMetaClass())._removeCompiledMethod_(self["@selectedMethod"]);
  3680. self._selectMethod_(nil);
  3681. }
  3682. }
  3683. return self;
  3684. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3685. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.Browser)});
  3686. //>>excludeEnd("ctx");
  3687. },
  3688. //>>excludeStart("ide", pragmas.excludeIdeData);
  3689. args: [],
  3690. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(Terminal confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09self selectedClassOrMetaClass removeCompiledMethod: selectedMethod.\x0a\x09\x09self selectMethod: nil ]]",
  3691. referencedClasses: ["Terminal"],
  3692. //>>excludeEnd("ide");
  3693. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "removeCompiledMethod:", "selectedClassOrMetaClass", "selectMethod:"]
  3694. }),
  3695. $globals.Browser);
  3696. $core.addMethod(
  3697. $core.method({
  3698. selector: "removePackage",
  3699. protocol: 'actions',
  3700. fn: function (){
  3701. var self=this;
  3702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3703. return $core.withContext(function($ctx1) {
  3704. //>>excludeEnd("ctx");
  3705. var $2,$1;
  3706. $2=$recv("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  3707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3708. $ctx1.sendIdx[","]=1;
  3709. //>>excludeEnd("ctx");
  3710. $1=$recv($globals.Terminal)._confirm_($2);
  3711. if($core.assert($1)){
  3712. $recv($globals.Smalltalk)._removePackage_(self["@selectedPackage"]);
  3713. self._updateCategoriesList();
  3714. }
  3715. return self;
  3716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3717. }, function($ctx1) {$ctx1.fill(self,"removePackage",{},$globals.Browser)});
  3718. //>>excludeEnd("ctx");
  3719. },
  3720. //>>excludeStart("ide", pragmas.excludeIdeData);
  3721. args: [],
  3722. source: "removePackage\x0a\x0a\x09(Terminal 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 ]",
  3723. referencedClasses: ["Terminal", "Smalltalk"],
  3724. //>>excludeEnd("ide");
  3725. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"]
  3726. }),
  3727. $globals.Browser);
  3728. $core.addMethod(
  3729. $core.method({
  3730. selector: "renameClass",
  3731. protocol: 'actions',
  3732. fn: function (){
  3733. var self=this;
  3734. var newName;
  3735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3736. return $core.withContext(function($ctx1) {
  3737. //>>excludeEnd("ctx");
  3738. var $1;
  3739. newName=$recv($globals.Terminal)._prompt_("Rename class ".__comma($recv(self["@selectedClass"])._name()));
  3740. $1=$recv($recv(newName)._notNil())._and_((function(){
  3741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3742. return $core.withContext(function($ctx2) {
  3743. //>>excludeEnd("ctx");
  3744. return $recv(newName)._notEmpty();
  3745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3746. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3747. //>>excludeEnd("ctx");
  3748. }));
  3749. if($core.assert($1)){
  3750. $recv(self["@selectedClass"])._rename_(newName);
  3751. self._updateClassesList();
  3752. self._updateSourceAndButtons();
  3753. }
  3754. return self;
  3755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3756. }, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},$globals.Browser)});
  3757. //>>excludeEnd("ctx");
  3758. },
  3759. //>>excludeStart("ide", pragmas.excludeIdeData);
  3760. args: [],
  3761. source: "renameClass\x0a\x09| newName |\x0a\x09newName := Terminal 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 ]",
  3762. referencedClasses: ["Terminal"],
  3763. //>>excludeEnd("ide");
  3764. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"]
  3765. }),
  3766. $globals.Browser);
  3767. $core.addMethod(
  3768. $core.method({
  3769. selector: "renamePackage",
  3770. protocol: 'actions',
  3771. fn: function (){
  3772. var self=this;
  3773. var newName;
  3774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3775. return $core.withContext(function($ctx1) {
  3776. //>>excludeEnd("ctx");
  3777. var $1,$receiver;
  3778. newName=$recv($globals.Terminal)._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  3779. $1=newName;
  3780. if(($receiver = $1) == null || $receiver.isNil){
  3781. $1;
  3782. } else {
  3783. $recv(newName)._ifNotEmpty_((function(){
  3784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3785. return $core.withContext(function($ctx2) {
  3786. //>>excludeEnd("ctx");
  3787. $recv($globals.Smalltalk)._renamePackage_to_(self["@selectedPackage"],newName);
  3788. return self._updateCategoriesList();
  3789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3790. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3791. //>>excludeEnd("ctx");
  3792. }));
  3793. }
  3794. return self;
  3795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3796. }, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},$globals.Browser)});
  3797. //>>excludeEnd("ctx");
  3798. },
  3799. //>>excludeStart("ide", pragmas.excludeIdeData);
  3800. args: [],
  3801. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := Terminal prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [ newName ifNotEmpty: [\x0a\x09Smalltalk renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  3802. referencedClasses: ["Terminal", "Smalltalk"],
  3803. //>>excludeEnd("ide");
  3804. messageSends: ["prompt:", ",", "ifNotNil:", "ifNotEmpty:", "renamePackage:to:", "updateCategoriesList"]
  3805. }),
  3806. $globals.Browser);
  3807. $core.addMethod(
  3808. $core.method({
  3809. selector: "renderBottomPanelOn:",
  3810. protocol: 'rendering',
  3811. fn: function (html){
  3812. var self=this;
  3813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3814. return $core.withContext(function($ctx1) {
  3815. //>>excludeEnd("ctx");
  3816. var $1;
  3817. $1=$recv(html)._div();
  3818. $recv($1)._class_("amber_sourceCode");
  3819. $recv($1)._with_((function(){
  3820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3821. return $core.withContext(function($ctx2) {
  3822. //>>excludeEnd("ctx");
  3823. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  3824. self["@sourceArea"];
  3825. $recv(self["@sourceArea"])._renderOn_(html);
  3826. $recv(self["@sourceArea"])._onKeyDown_((function(e){
  3827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3828. return $core.withContext(function($ctx3) {
  3829. //>>excludeEnd("ctx");
  3830. return self._handleSourceAreaKeyDown_(e);
  3831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3832. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)});
  3833. //>>excludeEnd("ctx");
  3834. }));
  3835. return $recv(self["@sourceArea"])._onKeyUp_((function(){
  3836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3837. return $core.withContext(function($ctx3) {
  3838. //>>excludeEnd("ctx");
  3839. return self._updateStatus();
  3840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3841. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3842. //>>excludeEnd("ctx");
  3843. }));
  3844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3845. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3846. //>>excludeEnd("ctx");
  3847. }));
  3848. return self;
  3849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3850. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.Browser)});
  3851. //>>excludeEnd("ctx");
  3852. },
  3853. //>>excludeStart("ide", pragmas.excludeIdeData);
  3854. args: ["html"],
  3855. 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 ]]",
  3856. referencedClasses: ["SourceArea"],
  3857. //>>excludeEnd("ide");
  3858. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"]
  3859. }),
  3860. $globals.Browser);
  3861. $core.addMethod(
  3862. $core.method({
  3863. selector: "renderBoxOn:",
  3864. protocol: 'rendering',
  3865. fn: function (html){
  3866. var self=this;
  3867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3868. return $core.withContext(function($ctx1) {
  3869. //>>excludeEnd("ctx");
  3870. self._renderTopPanelOn_(html);
  3871. self._renderTabsOn_(html);
  3872. self._renderBottomPanelOn_(html);
  3873. return self;
  3874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3875. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Browser)});
  3876. //>>excludeEnd("ctx");
  3877. },
  3878. //>>excludeStart("ide", pragmas.excludeIdeData);
  3879. args: ["html"],
  3880. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  3881. referencedClasses: [],
  3882. //>>excludeEnd("ide");
  3883. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"]
  3884. }),
  3885. $globals.Browser);
  3886. $core.addMethod(
  3887. $core.method({
  3888. selector: "renderButtonsOn:",
  3889. protocol: 'rendering',
  3890. fn: function (html){
  3891. var self=this;
  3892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3893. return $core.withContext(function($ctx1) {
  3894. //>>excludeEnd("ctx");
  3895. var $1,$2,$3,$5,$6,$7,$8,$9,$4;
  3896. self["@saveButton"]=$recv(html)._button();
  3897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3898. $ctx1.sendIdx["button"]=1;
  3899. //>>excludeEnd("ctx");
  3900. $1=self["@saveButton"];
  3901. $recv($1)._with_("Save");
  3902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3903. $ctx1.sendIdx["with:"]=1;
  3904. //>>excludeEnd("ctx");
  3905. $2=$recv($1)._onClick_((function(){
  3906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3907. return $core.withContext(function($ctx2) {
  3908. //>>excludeEnd("ctx");
  3909. return self._compile();
  3910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3911. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3912. //>>excludeEnd("ctx");
  3913. }));
  3914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3915. $ctx1.sendIdx["onClick:"]=1;
  3916. //>>excludeEnd("ctx");
  3917. self["@methodButtons"]=$recv(html)._span();
  3918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3919. $ctx1.sendIdx["span"]=1;
  3920. //>>excludeEnd("ctx");
  3921. self["@classButtons"]=$recv(html)._span();
  3922. $3=$recv(html)._div();
  3923. $recv($3)._class_("right");
  3924. $4=$recv($3)._with_((function(){
  3925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3926. return $core.withContext(function($ctx2) {
  3927. //>>excludeEnd("ctx");
  3928. $5=$recv(html)._button();
  3929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3930. $ctx2.sendIdx["button"]=2;
  3931. //>>excludeEnd("ctx");
  3932. $recv($5)._with_("DoIt");
  3933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3934. $ctx2.sendIdx["with:"]=3;
  3935. //>>excludeEnd("ctx");
  3936. $6=$recv($5)._onClick_((function(){
  3937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3938. return $core.withContext(function($ctx3) {
  3939. //>>excludeEnd("ctx");
  3940. return $recv(self["@sourceArea"])._doIt();
  3941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3942. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3943. //>>excludeEnd("ctx");
  3944. }));
  3945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3946. $ctx2.sendIdx["onClick:"]=2;
  3947. //>>excludeEnd("ctx");
  3948. $6;
  3949. $7=$recv(html)._button();
  3950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3951. $ctx2.sendIdx["button"]=3;
  3952. //>>excludeEnd("ctx");
  3953. $recv($7)._with_("PrintIt");
  3954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3955. $ctx2.sendIdx["with:"]=4;
  3956. //>>excludeEnd("ctx");
  3957. $8=$recv($7)._onClick_((function(){
  3958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3959. return $core.withContext(function($ctx3) {
  3960. //>>excludeEnd("ctx");
  3961. return $recv(self["@sourceArea"])._printIt();
  3962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3963. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  3964. //>>excludeEnd("ctx");
  3965. }));
  3966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3967. $ctx2.sendIdx["onClick:"]=3;
  3968. //>>excludeEnd("ctx");
  3969. $8;
  3970. $9=$recv(html)._button();
  3971. $recv($9)._with_("InspectIt");
  3972. return $recv($9)._onClick_((function(){
  3973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3974. return $core.withContext(function($ctx3) {
  3975. //>>excludeEnd("ctx");
  3976. return $recv(self["@sourceArea"])._inspectIt();
  3977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3978. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  3979. //>>excludeEnd("ctx");
  3980. }));
  3981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3982. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3983. //>>excludeEnd("ctx");
  3984. }));
  3985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3986. $ctx1.sendIdx["with:"]=2;
  3987. //>>excludeEnd("ctx");
  3988. self._updateSourceAndButtons();
  3989. return self;
  3990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3991. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Browser)});
  3992. //>>excludeEnd("ctx");
  3993. },
  3994. //>>excludeStart("ide", pragmas.excludeIdeData);
  3995. args: ["html"],
  3996. 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",
  3997. referencedClasses: [],
  3998. //>>excludeEnd("ide");
  3999. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"]
  4000. }),
  4001. $globals.Browser);
  4002. $core.addMethod(
  4003. $core.method({
  4004. selector: "renderTabsOn:",
  4005. protocol: 'rendering',
  4006. fn: function (html){
  4007. var self=this;
  4008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4009. return $core.withContext(function($ctx1) {
  4010. //>>excludeEnd("ctx");
  4011. self["@tabsList"]=$recv($recv(html)._ul())._class_("amber_tabs amber_browser");
  4012. self._updateTabsList();
  4013. return self;
  4014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4015. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.Browser)});
  4016. //>>excludeEnd("ctx");
  4017. },
  4018. //>>excludeStart("ide", pragmas.excludeIdeData);
  4019. args: ["html"],
  4020. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  4021. referencedClasses: [],
  4022. //>>excludeEnd("ide");
  4023. messageSends: ["class:", "ul", "updateTabsList"]
  4024. }),
  4025. $globals.Browser);
  4026. $core.addMethod(
  4027. $core.method({
  4028. selector: "renderTopPanelOn:",
  4029. protocol: 'rendering',
  4030. fn: function (html){
  4031. var self=this;
  4032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4033. return $core.withContext(function($ctx1) {
  4034. //>>excludeEnd("ctx");
  4035. var $1,$3,$4,$6,$7,$8,$9,$10,$5,$11,$2;
  4036. $1=$recv(html)._div();
  4037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4038. $ctx1.sendIdx["div"]=1;
  4039. //>>excludeEnd("ctx");
  4040. $recv($1)._class_("top");
  4041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4042. $ctx1.sendIdx["class:"]=1;
  4043. //>>excludeEnd("ctx");
  4044. $2=$recv($1)._with_((function(){
  4045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4046. return $core.withContext(function($ctx2) {
  4047. //>>excludeEnd("ctx");
  4048. $3=$recv(html)._ul();
  4049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4050. $ctx2.sendIdx["ul"]=1;
  4051. //>>excludeEnd("ctx");
  4052. self["@packagesList"]=$recv($3)._class_("amber_column browser packages");
  4053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4054. $ctx2.sendIdx["class:"]=2;
  4055. //>>excludeEnd("ctx");
  4056. self["@packagesList"];
  4057. $4=$recv(html)._div();
  4058. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4059. $ctx2.sendIdx["div"]=2;
  4060. //>>excludeEnd("ctx");
  4061. $recv($4)._class_("amber_packagesButtons");
  4062. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4063. $ctx2.sendIdx["class:"]=3;
  4064. //>>excludeEnd("ctx");
  4065. $5=$recv($4)._with_((function(){
  4066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4067. return $core.withContext(function($ctx3) {
  4068. //>>excludeEnd("ctx");
  4069. $6=$recv(html)._button();
  4070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4071. $ctx3.sendIdx["button"]=1;
  4072. //>>excludeEnd("ctx");
  4073. $recv($6)._title_("Commit classes in this package to disk");
  4074. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4075. $ctx3.sendIdx["title:"]=1;
  4076. //>>excludeEnd("ctx");
  4077. $recv($6)._onClick_((function(){
  4078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4079. return $core.withContext(function($ctx4) {
  4080. //>>excludeEnd("ctx");
  4081. return self._commitPackage();
  4082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4083. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  4084. //>>excludeEnd("ctx");
  4085. }));
  4086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4087. $ctx3.sendIdx["onClick:"]=1;
  4088. //>>excludeEnd("ctx");
  4089. $7=$recv($6)._with_("Commit");
  4090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4091. $ctx3.sendIdx["with:"]=3;
  4092. //>>excludeEnd("ctx");
  4093. $7;
  4094. $8=$recv(html)._button();
  4095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4096. $ctx3.sendIdx["button"]=2;
  4097. //>>excludeEnd("ctx");
  4098. $recv($8)._title_("Rename package");
  4099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4100. $ctx3.sendIdx["title:"]=2;
  4101. //>>excludeEnd("ctx");
  4102. $recv($8)._onClick_((function(){
  4103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4104. return $core.withContext(function($ctx4) {
  4105. //>>excludeEnd("ctx");
  4106. return self._renamePackage();
  4107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4108. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4109. //>>excludeEnd("ctx");
  4110. }));
  4111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4112. $ctx3.sendIdx["onClick:"]=2;
  4113. //>>excludeEnd("ctx");
  4114. $9=$recv($8)._with_("Rename");
  4115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4116. $ctx3.sendIdx["with:"]=4;
  4117. //>>excludeEnd("ctx");
  4118. $9;
  4119. $10=$recv(html)._button();
  4120. $recv($10)._title_("Remove this package from the system");
  4121. $recv($10)._onClick_((function(){
  4122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4123. return $core.withContext(function($ctx4) {
  4124. //>>excludeEnd("ctx");
  4125. return self._removePackage();
  4126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4127. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4128. //>>excludeEnd("ctx");
  4129. }));
  4130. return $recv($10)._with_("Remove");
  4131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4132. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4133. //>>excludeEnd("ctx");
  4134. }));
  4135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4136. $ctx2.sendIdx["with:"]=2;
  4137. //>>excludeEnd("ctx");
  4138. $5;
  4139. self["@classesList"]=$recv($globals.ClassesList)._on_(self);
  4140. self["@classesList"];
  4141. $recv(self["@classesList"])._renderOn_(html);
  4142. $11=$recv(html)._ul();
  4143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4144. $ctx2.sendIdx["ul"]=2;
  4145. //>>excludeEnd("ctx");
  4146. self["@protocolsList"]=$recv($11)._class_("amber_column browser protocols");
  4147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4148. $ctx2.sendIdx["class:"]=4;
  4149. //>>excludeEnd("ctx");
  4150. self["@protocolsList"];
  4151. self["@methodsList"]=$recv($recv(html)._ul())._class_("amber_column browser methods");
  4152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4153. $ctx2.sendIdx["class:"]=5;
  4154. //>>excludeEnd("ctx");
  4155. self["@methodsList"];
  4156. self._updateCategoriesList();
  4157. self._updateClassesList();
  4158. self._updateProtocolsList();
  4159. self._updateMethodsList();
  4160. return $recv($recv(html)._div())._class_("amber_clear");
  4161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4162. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4163. //>>excludeEnd("ctx");
  4164. }));
  4165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4166. $ctx1.sendIdx["with:"]=1;
  4167. //>>excludeEnd("ctx");
  4168. return self;
  4169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4170. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.Browser)});
  4171. //>>excludeEnd("ctx");
  4172. },
  4173. //>>excludeStart("ide", pragmas.excludeIdeData);
  4174. args: ["html"],
  4175. 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' ]",
  4176. referencedClasses: ["ClassesList"],
  4177. //>>excludeEnd("ide");
  4178. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"]
  4179. }),
  4180. $globals.Browser);
  4181. $core.addMethod(
  4182. $core.method({
  4183. selector: "resetClassesList",
  4184. protocol: 'updating',
  4185. fn: function (){
  4186. var self=this;
  4187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4188. return $core.withContext(function($ctx1) {
  4189. //>>excludeEnd("ctx");
  4190. $recv(self["@classesList"])._resetNodes();
  4191. return self;
  4192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4193. }, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},$globals.Browser)});
  4194. //>>excludeEnd("ctx");
  4195. },
  4196. //>>excludeStart("ide", pragmas.excludeIdeData);
  4197. args: [],
  4198. source: "resetClassesList\x0a\x09classesList resetNodes",
  4199. referencedClasses: [],
  4200. //>>excludeEnd("ide");
  4201. messageSends: ["resetNodes"]
  4202. }),
  4203. $globals.Browser);
  4204. $core.addMethod(
  4205. $core.method({
  4206. selector: "search:",
  4207. protocol: 'actions',
  4208. fn: function (aString){
  4209. var self=this;
  4210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4211. return $core.withContext(function($ctx1) {
  4212. //>>excludeEnd("ctx");
  4213. var $1,$2;
  4214. $1=self._cancelChanges();
  4215. if($core.assert($1)){
  4216. var searchedClass;
  4217. searchedClass=$recv($recv($globals.Smalltalk)._globals())._at_(aString);
  4218. searchedClass;
  4219. $2=$recv(searchedClass)._isClass();
  4220. if($core.assert($2)){
  4221. $recv(self._class())._openOn_(searchedClass);
  4222. } else {
  4223. self._searchReferencesOf_(aString);
  4224. }
  4225. }
  4226. return self;
  4227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4228. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.Browser)});
  4229. //>>excludeEnd("ctx");
  4230. },
  4231. //>>excludeStart("ide", pragmas.excludeIdeData);
  4232. args: ["aString"],
  4233. 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 ]]",
  4234. referencedClasses: ["Smalltalk"],
  4235. //>>excludeEnd("ide");
  4236. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"]
  4237. }),
  4238. $globals.Browser);
  4239. $core.addMethod(
  4240. $core.method({
  4241. selector: "searchClassReferences",
  4242. protocol: 'actions',
  4243. fn: function (){
  4244. var self=this;
  4245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4246. return $core.withContext(function($ctx1) {
  4247. //>>excludeEnd("ctx");
  4248. $recv($globals.ReferencesBrowser)._search_($recv(self["@selectedClass"])._name());
  4249. return self;
  4250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4251. }, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},$globals.Browser)});
  4252. //>>excludeEnd("ctx");
  4253. },
  4254. //>>excludeStart("ide", pragmas.excludeIdeData);
  4255. args: [],
  4256. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  4257. referencedClasses: ["ReferencesBrowser"],
  4258. //>>excludeEnd("ide");
  4259. messageSends: ["search:", "name"]
  4260. }),
  4261. $globals.Browser);
  4262. $core.addMethod(
  4263. $core.method({
  4264. selector: "searchReferencesOf:",
  4265. protocol: 'actions',
  4266. fn: function (aString){
  4267. var self=this;
  4268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4269. return $core.withContext(function($ctx1) {
  4270. //>>excludeEnd("ctx");
  4271. $recv($globals.ReferencesBrowser)._search_(aString);
  4272. return self;
  4273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4274. }, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},$globals.Browser)});
  4275. //>>excludeEnd("ctx");
  4276. },
  4277. //>>excludeStart("ide", pragmas.excludeIdeData);
  4278. args: ["aString"],
  4279. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  4280. referencedClasses: ["ReferencesBrowser"],
  4281. //>>excludeEnd("ide");
  4282. messageSends: ["search:"]
  4283. }),
  4284. $globals.Browser);
  4285. $core.addMethod(
  4286. $core.method({
  4287. selector: "selectCategory:",
  4288. protocol: 'actions',
  4289. fn: function (aCategory){
  4290. var self=this;
  4291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4292. return $core.withContext(function($ctx1) {
  4293. //>>excludeEnd("ctx");
  4294. var $1;
  4295. $1=self._cancelChanges();
  4296. if($core.assert($1)){
  4297. self["@selectedPackage"]=aCategory;
  4298. self["@selectedPackage"];
  4299. self["@selectedMethod"]=nil;
  4300. self["@selectedProtocol"]=self["@selectedMethod"];
  4301. self["@selectedClass"]=self["@selectedProtocol"];
  4302. self["@selectedClass"];
  4303. self._resetClassesList();
  4304. self._updateCategoriesList();
  4305. self._updateClassesList();
  4306. self._updateProtocolsList();
  4307. self._updateMethodsList();
  4308. self._updateSourceAndButtons();
  4309. }
  4310. return self;
  4311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4312. }, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},$globals.Browser)});
  4313. //>>excludeEnd("ctx");
  4314. },
  4315. //>>excludeStart("ide", pragmas.excludeIdeData);
  4316. args: ["aCategory"],
  4317. 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 ]",
  4318. referencedClasses: [],
  4319. //>>excludeEnd("ide");
  4320. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4321. }),
  4322. $globals.Browser);
  4323. $core.addMethod(
  4324. $core.method({
  4325. selector: "selectClass:",
  4326. protocol: 'actions',
  4327. fn: function (aClass){
  4328. var self=this;
  4329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4330. return $core.withContext(function($ctx1) {
  4331. //>>excludeEnd("ctx");
  4332. var $1;
  4333. $1=self._cancelChanges();
  4334. if($core.assert($1)){
  4335. self["@selectedClass"]=aClass;
  4336. self["@selectedClass"];
  4337. self["@selectedMethod"]=nil;
  4338. self["@selectedProtocol"]=self["@selectedMethod"];
  4339. self["@selectedProtocol"];
  4340. self._updateClassesList();
  4341. self._updateProtocolsList();
  4342. self._updateMethodsList();
  4343. self._updateSourceAndButtons();
  4344. }
  4345. return self;
  4346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4347. }, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},$globals.Browser)});
  4348. //>>excludeEnd("ctx");
  4349. },
  4350. //>>excludeStart("ide", pragmas.excludeIdeData);
  4351. args: ["aClass"],
  4352. 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 ]",
  4353. referencedClasses: [],
  4354. //>>excludeEnd("ide");
  4355. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4356. }),
  4357. $globals.Browser);
  4358. $core.addMethod(
  4359. $core.method({
  4360. selector: "selectMethod:",
  4361. protocol: 'actions',
  4362. fn: function (aMethod){
  4363. var self=this;
  4364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4365. return $core.withContext(function($ctx1) {
  4366. //>>excludeEnd("ctx");
  4367. var $1;
  4368. $1=self._cancelChanges();
  4369. if($core.assert($1)){
  4370. self["@selectedMethod"]=aMethod;
  4371. self["@selectedMethod"];
  4372. self._updateProtocolsList();
  4373. self._updateMethodsList();
  4374. self._updateSourceAndButtons();
  4375. }
  4376. return self;
  4377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4378. }, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},$globals.Browser)});
  4379. //>>excludeEnd("ctx");
  4380. },
  4381. //>>excludeStart("ide", pragmas.excludeIdeData);
  4382. args: ["aMethod"],
  4383. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4384. referencedClasses: [],
  4385. //>>excludeEnd("ide");
  4386. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4387. }),
  4388. $globals.Browser);
  4389. $core.addMethod(
  4390. $core.method({
  4391. selector: "selectProtocol:",
  4392. protocol: 'actions',
  4393. fn: function (aString){
  4394. var self=this;
  4395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4396. return $core.withContext(function($ctx1) {
  4397. //>>excludeEnd("ctx");
  4398. var $1;
  4399. $1=self._cancelChanges();
  4400. if($core.assert($1)){
  4401. self["@selectedProtocol"]=aString;
  4402. self["@selectedProtocol"];
  4403. self["@selectedMethod"]=nil;
  4404. self["@selectedMethod"];
  4405. self._updateProtocolsList();
  4406. self._updateMethodsList();
  4407. self._updateSourceAndButtons();
  4408. }
  4409. return self;
  4410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4411. }, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},$globals.Browser)});
  4412. //>>excludeEnd("ctx");
  4413. },
  4414. //>>excludeStart("ide", pragmas.excludeIdeData);
  4415. args: ["aString"],
  4416. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4417. referencedClasses: [],
  4418. //>>excludeEnd("ide");
  4419. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4420. }),
  4421. $globals.Browser);
  4422. $core.addMethod(
  4423. $core.method({
  4424. selector: "selectTab:",
  4425. protocol: 'actions',
  4426. fn: function (aString){
  4427. var self=this;
  4428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4429. return $core.withContext(function($ctx1) {
  4430. //>>excludeEnd("ctx");
  4431. var $1;
  4432. $1=self._cancelChanges();
  4433. if($core.assert($1)){
  4434. self["@selectedTab"]=aString;
  4435. self["@selectedTab"];
  4436. self._selectProtocol_(nil);
  4437. self._updateTabsList();
  4438. }
  4439. return self;
  4440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4441. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},$globals.Browser)});
  4442. //>>excludeEnd("ctx");
  4443. },
  4444. //>>excludeStart("ide", pragmas.excludeIdeData);
  4445. args: ["aString"],
  4446. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  4447. referencedClasses: [],
  4448. //>>excludeEnd("ide");
  4449. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"]
  4450. }),
  4451. $globals.Browser);
  4452. $core.addMethod(
  4453. $core.method({
  4454. selector: "selectedClass",
  4455. protocol: 'accessing',
  4456. fn: function (){
  4457. var self=this;
  4458. return self["@selectedClass"];
  4459. },
  4460. //>>excludeStart("ide", pragmas.excludeIdeData);
  4461. args: [],
  4462. source: "selectedClass\x0a\x09^ selectedClass",
  4463. referencedClasses: [],
  4464. //>>excludeEnd("ide");
  4465. messageSends: []
  4466. }),
  4467. $globals.Browser);
  4468. $core.addMethod(
  4469. $core.method({
  4470. selector: "selectedClassOrMetaClass",
  4471. protocol: 'accessing',
  4472. fn: function (){
  4473. var self=this;
  4474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4475. return $core.withContext(function($ctx1) {
  4476. //>>excludeEnd("ctx");
  4477. var $1,$2,$receiver;
  4478. $1=self["@selectedClass"];
  4479. if(($receiver = $1) == null || $receiver.isNil){
  4480. return $1;
  4481. } else {
  4482. $2=$recv(self["@selectedTab"]).__eq("instance");
  4483. if($core.assert($2)){
  4484. return self["@selectedClass"];
  4485. } else {
  4486. return $recv(self["@selectedClass"])._theMetaClass();
  4487. }
  4488. }
  4489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4490. }, function($ctx1) {$ctx1.fill(self,"selectedClassOrMetaClass",{},$globals.Browser)});
  4491. //>>excludeEnd("ctx");
  4492. },
  4493. //>>excludeStart("ide", pragmas.excludeIdeData);
  4494. args: [],
  4495. source: "selectedClassOrMetaClass\x0a\x09^ selectedClass ifNotNil: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09\x09ifFalse: [ selectedClass theMetaClass ] ]",
  4496. referencedClasses: [],
  4497. //>>excludeEnd("ide");
  4498. messageSends: ["ifNotNil:", "ifTrue:ifFalse:", "=", "theMetaClass"]
  4499. }),
  4500. $globals.Browser);
  4501. $core.addMethod(
  4502. $core.method({
  4503. selector: "selectedPackage",
  4504. protocol: 'accessing',
  4505. fn: function (){
  4506. var self=this;
  4507. return self["@selectedPackage"];
  4508. },
  4509. //>>excludeStart("ide", pragmas.excludeIdeData);
  4510. args: [],
  4511. source: "selectedPackage\x0a\x09^ selectedPackage",
  4512. referencedClasses: [],
  4513. //>>excludeEnd("ide");
  4514. messageSends: []
  4515. }),
  4516. $globals.Browser);
  4517. $core.addMethod(
  4518. $core.method({
  4519. selector: "setMethodProtocol:",
  4520. protocol: 'actions',
  4521. fn: function (aString){
  4522. var self=this;
  4523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4524. return $core.withContext(function($ctx1) {
  4525. //>>excludeEnd("ctx");
  4526. var $1,$2;
  4527. $1=self._cancelChanges();
  4528. if($core.assert($1)){
  4529. $2=$recv(self._protocols())._includes_(aString);
  4530. if($core.assert($2)){
  4531. $recv(self["@selectedMethod"])._protocol_(aString);
  4532. self["@selectedProtocol"]=aString;
  4533. self["@selectedProtocol"];
  4534. self["@selectedMethod"]=self["@selectedMethod"];
  4535. self["@selectedMethod"];
  4536. self._updateProtocolsList();
  4537. self._updateMethodsList();
  4538. self._updateSourceAndButtons();
  4539. } else {
  4540. self._addNewProtocol();
  4541. }
  4542. }
  4543. return self;
  4544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4545. }, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},$globals.Browser)});
  4546. //>>excludeEnd("ctx");
  4547. },
  4548. //>>excludeStart("ide", pragmas.excludeIdeData);
  4549. args: ["aString"],
  4550. 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 ]]",
  4551. referencedClasses: [],
  4552. //>>excludeEnd("ide");
  4553. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4554. }),
  4555. $globals.Browser);
  4556. $core.addMethod(
  4557. $core.method({
  4558. selector: "showClassButtons",
  4559. protocol: 'actions',
  4560. fn: function (){
  4561. var self=this;
  4562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4563. return $core.withContext(function($ctx1) {
  4564. //>>excludeEnd("ctx");
  4565. $recv($recv(self["@classButtons"])._asJQuery())._show();
  4566. return self;
  4567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4568. }, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},$globals.Browser)});
  4569. //>>excludeEnd("ctx");
  4570. },
  4571. //>>excludeStart("ide", pragmas.excludeIdeData);
  4572. args: [],
  4573. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  4574. referencedClasses: [],
  4575. //>>excludeEnd("ide");
  4576. messageSends: ["show", "asJQuery"]
  4577. }),
  4578. $globals.Browser);
  4579. $core.addMethod(
  4580. $core.method({
  4581. selector: "showMethodButtons",
  4582. protocol: 'actions',
  4583. fn: function (){
  4584. var self=this;
  4585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4586. return $core.withContext(function($ctx1) {
  4587. //>>excludeEnd("ctx");
  4588. $recv($recv(self["@methodButtons"])._asJQuery())._show();
  4589. return self;
  4590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4591. }, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},$globals.Browser)});
  4592. //>>excludeEnd("ctx");
  4593. },
  4594. //>>excludeStart("ide", pragmas.excludeIdeData);
  4595. args: [],
  4596. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  4597. referencedClasses: [],
  4598. //>>excludeEnd("ide");
  4599. messageSends: ["show", "asJQuery"]
  4600. }),
  4601. $globals.Browser);
  4602. $core.addMethod(
  4603. $core.method({
  4604. selector: "source",
  4605. protocol: 'accessing',
  4606. fn: function (){
  4607. var self=this;
  4608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4609. return $core.withContext(function($ctx1) {
  4610. //>>excludeEnd("ctx");
  4611. var $1,$3,$2,$4,$receiver;
  4612. $1=$recv(self["@selectedTab"]).__eq("comment");
  4613. if(!$core.assert($1)){
  4614. $3=$recv(self["@selectedProtocol"])._notNil();
  4615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4616. $ctx1.sendIdx["notNil"]=1;
  4617. //>>excludeEnd("ctx");
  4618. $2=$recv($3)._or_((function(){
  4619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4620. return $core.withContext(function($ctx2) {
  4621. //>>excludeEnd("ctx");
  4622. return $recv(self["@selectedMethod"])._notNil();
  4623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4624. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4625. //>>excludeEnd("ctx");
  4626. }));
  4627. if($core.assert($2)){
  4628. return self._methodSource();
  4629. } else {
  4630. return self._declarationSource();
  4631. }
  4632. }
  4633. $4=self["@selectedClass"];
  4634. if(($receiver = $4) == null || $receiver.isNil){
  4635. return "";
  4636. } else {
  4637. return self._classCommentSource();
  4638. }
  4639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4640. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Browser)});
  4641. //>>excludeEnd("ctx");
  4642. },
  4643. //>>excludeStart("ide", pragmas.excludeIdeData);
  4644. args: [],
  4645. 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 ]",
  4646. referencedClasses: [],
  4647. //>>excludeEnd("ide");
  4648. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"]
  4649. }),
  4650. $globals.Browser);
  4651. $core.addMethod(
  4652. $core.method({
  4653. selector: "updateCategoriesList",
  4654. protocol: 'updating',
  4655. fn: function (){
  4656. var self=this;
  4657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4658. return $core.withContext(function($ctx1) {
  4659. //>>excludeEnd("ctx");
  4660. var $1,$2;
  4661. $recv(self["@packagesList"])._contents_((function(html){
  4662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4663. return $core.withContext(function($ctx2) {
  4664. //>>excludeEnd("ctx");
  4665. return $recv(self._packages())._do_((function(each){
  4666. var li,label;
  4667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4668. return $core.withContext(function($ctx3) {
  4669. //>>excludeEnd("ctx");
  4670. label=$recv(each)._ifEmpty_((function(){
  4671. return "Unclassified";
  4672. }));
  4673. label;
  4674. li=$recv(html)._li();
  4675. li;
  4676. $1=$recv(self["@selectedPackage"]).__eq(each);
  4677. if($core.assert($1)){
  4678. $recv(li)._class_("selected");
  4679. }
  4680. $2=li;
  4681. $recv($2)._with_(label);
  4682. return $recv($2)._onClick_((function(){
  4683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4684. return $core.withContext(function($ctx4) {
  4685. //>>excludeEnd("ctx");
  4686. return self._selectCategory_(each);
  4687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4688. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4689. //>>excludeEnd("ctx");
  4690. }));
  4691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4692. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)});
  4693. //>>excludeEnd("ctx");
  4694. }));
  4695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4696. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4697. //>>excludeEnd("ctx");
  4698. }));
  4699. return self;
  4700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4701. }, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},$globals.Browser)});
  4702. //>>excludeEnd("ctx");
  4703. },
  4704. //>>excludeStart("ide", pragmas.excludeIdeData);
  4705. args: [],
  4706. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09label := each ifEmpty: [ 'Unclassified' ].\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 ]] ]",
  4707. referencedClasses: [],
  4708. //>>excludeEnd("ide");
  4709. messageSends: ["contents:", "do:", "packages", "ifEmpty:", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"]
  4710. }),
  4711. $globals.Browser);
  4712. $core.addMethod(
  4713. $core.method({
  4714. selector: "updateClassesList",
  4715. protocol: 'updating',
  4716. fn: function (){
  4717. var self=this;
  4718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4719. return $core.withContext(function($ctx1) {
  4720. //>>excludeEnd("ctx");
  4721. $recv($recv($globals.TabManager)._current())._update();
  4722. $recv(self["@classesList"])._updateNodes();
  4723. return self;
  4724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4725. }, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},$globals.Browser)});
  4726. //>>excludeEnd("ctx");
  4727. },
  4728. //>>excludeStart("ide", pragmas.excludeIdeData);
  4729. args: [],
  4730. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  4731. referencedClasses: ["TabManager"],
  4732. //>>excludeEnd("ide");
  4733. messageSends: ["update", "current", "updateNodes"]
  4734. }),
  4735. $globals.Browser);
  4736. $core.addMethod(
  4737. $core.method({
  4738. selector: "updateMethodsList",
  4739. protocol: 'updating',
  4740. fn: function (){
  4741. var self=this;
  4742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4743. return $core.withContext(function($ctx1) {
  4744. //>>excludeEnd("ctx");
  4745. var $1,$2;
  4746. $recv(self["@methodsList"])._contents_((function(html){
  4747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4748. return $core.withContext(function($ctx2) {
  4749. //>>excludeEnd("ctx");
  4750. return $recv(self._methods())._do_((function(each){
  4751. var li;
  4752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4753. return $core.withContext(function($ctx3) {
  4754. //>>excludeEnd("ctx");
  4755. li=$recv(html)._li();
  4756. li;
  4757. $1=$recv(self["@selectedMethod"]).__eq(each);
  4758. if($core.assert($1)){
  4759. $recv(li)._class_("selected");
  4760. }
  4761. $2=li;
  4762. $recv($2)._with_($recv(each)._selector());
  4763. return $recv($2)._onClick_((function(){
  4764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4765. return $core.withContext(function($ctx4) {
  4766. //>>excludeEnd("ctx");
  4767. return self._selectMethod_(each);
  4768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4769. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4770. //>>excludeEnd("ctx");
  4771. }));
  4772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4773. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  4774. //>>excludeEnd("ctx");
  4775. }));
  4776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4777. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4778. //>>excludeEnd("ctx");
  4779. }));
  4780. return self;
  4781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4782. }, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},$globals.Browser)});
  4783. //>>excludeEnd("ctx");
  4784. },
  4785. //>>excludeStart("ide", pragmas.excludeIdeData);
  4786. args: [],
  4787. 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 ]] ]",
  4788. referencedClasses: [],
  4789. //>>excludeEnd("ide");
  4790. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"]
  4791. }),
  4792. $globals.Browser);
  4793. $core.addMethod(
  4794. $core.method({
  4795. selector: "updateProtocolsList",
  4796. protocol: 'updating',
  4797. fn: function (){
  4798. var self=this;
  4799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4800. return $core.withContext(function($ctx1) {
  4801. //>>excludeEnd("ctx");
  4802. var $1,$2;
  4803. $recv(self["@protocolsList"])._contents_((function(html){
  4804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4805. return $core.withContext(function($ctx2) {
  4806. //>>excludeEnd("ctx");
  4807. return $recv(self._protocols())._do_((function(each){
  4808. var li;
  4809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4810. return $core.withContext(function($ctx3) {
  4811. //>>excludeEnd("ctx");
  4812. li=$recv(html)._li();
  4813. li;
  4814. $1=$recv(self["@selectedProtocol"]).__eq(each);
  4815. if($core.assert($1)){
  4816. $recv(li)._class_("selected");
  4817. }
  4818. $2=li;
  4819. $recv($2)._with_(each);
  4820. return $recv($2)._onClick_((function(){
  4821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4822. return $core.withContext(function($ctx4) {
  4823. //>>excludeEnd("ctx");
  4824. return self._selectProtocol_(each);
  4825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4826. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4827. //>>excludeEnd("ctx");
  4828. }));
  4829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4830. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  4831. //>>excludeEnd("ctx");
  4832. }));
  4833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4834. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4835. //>>excludeEnd("ctx");
  4836. }));
  4837. return self;
  4838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4839. }, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},$globals.Browser)});
  4840. //>>excludeEnd("ctx");
  4841. },
  4842. //>>excludeStart("ide", pragmas.excludeIdeData);
  4843. args: [],
  4844. 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 ]] ]",
  4845. referencedClasses: [],
  4846. //>>excludeEnd("ide");
  4847. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"]
  4848. }),
  4849. $globals.Browser);
  4850. $core.addMethod(
  4851. $core.method({
  4852. selector: "updateSourceAndButtons",
  4853. protocol: 'updating',
  4854. fn: function (){
  4855. var self=this;
  4856. var currentProtocol;
  4857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4858. return $core.withContext(function($ctx1) {
  4859. //>>excludeEnd("ctx");
  4860. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$14,$13,$16,$17,$18,$19,$21,$20,$22,$23,$15,$24,$25,$27,$28,$29,$26,$30,$31;
  4861. self._disableSaveButton();
  4862. $recv(self["@classButtons"])._contents_((function(html){
  4863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4864. return $core.withContext(function($ctx2) {
  4865. //>>excludeEnd("ctx");
  4866. $1=$recv(html)._button();
  4867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4868. $ctx2.sendIdx["button"]=1;
  4869. //>>excludeEnd("ctx");
  4870. $recv($1)._title_("Create a new class");
  4871. $recv($1)._onClick_((function(){
  4872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4873. return $core.withContext(function($ctx3) {
  4874. //>>excludeEnd("ctx");
  4875. return self._addNewClass();
  4876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4877. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4878. //>>excludeEnd("ctx");
  4879. }));
  4880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4881. $ctx2.sendIdx["onClick:"]=1;
  4882. //>>excludeEnd("ctx");
  4883. $2=$recv($1)._with_("New class");
  4884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4885. $ctx2.sendIdx["with:"]=1;
  4886. //>>excludeEnd("ctx");
  4887. $2;
  4888. $3=$recv(html)._button();
  4889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4890. $ctx2.sendIdx["button"]=2;
  4891. //>>excludeEnd("ctx");
  4892. $recv($3)._with_("Rename class");
  4893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4894. $ctx2.sendIdx["with:"]=2;
  4895. //>>excludeEnd("ctx");
  4896. $4=$recv($3)._onClick_((function(){
  4897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4898. return $core.withContext(function($ctx3) {
  4899. //>>excludeEnd("ctx");
  4900. return self._renameClass();
  4901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4902. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4903. //>>excludeEnd("ctx");
  4904. }));
  4905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4906. $ctx2.sendIdx["onClick:"]=2;
  4907. //>>excludeEnd("ctx");
  4908. $4;
  4909. $5=$recv(html)._button();
  4910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4911. $ctx2.sendIdx["button"]=3;
  4912. //>>excludeEnd("ctx");
  4913. $recv($5)._with_("Copy class");
  4914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4915. $ctx2.sendIdx["with:"]=3;
  4916. //>>excludeEnd("ctx");
  4917. $6=$recv($5)._onClick_((function(){
  4918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4919. return $core.withContext(function($ctx3) {
  4920. //>>excludeEnd("ctx");
  4921. return self._copyClass();
  4922. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4923. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4924. //>>excludeEnd("ctx");
  4925. }));
  4926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4927. $ctx2.sendIdx["onClick:"]=3;
  4928. //>>excludeEnd("ctx");
  4929. $6;
  4930. $7=$recv(html)._button();
  4931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4932. $ctx2.sendIdx["button"]=4;
  4933. //>>excludeEnd("ctx");
  4934. $recv($7)._with_("Remove class");
  4935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4936. $ctx2.sendIdx["with:"]=4;
  4937. //>>excludeEnd("ctx");
  4938. $8=$recv($7)._onClick_((function(){
  4939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4940. return $core.withContext(function($ctx3) {
  4941. //>>excludeEnd("ctx");
  4942. return self._removeClass();
  4943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4944. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  4945. //>>excludeEnd("ctx");
  4946. }));
  4947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4948. $ctx2.sendIdx["onClick:"]=4;
  4949. //>>excludeEnd("ctx");
  4950. $8;
  4951. $9=$recv(html)._button();
  4952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4953. $ctx2.sendIdx["button"]=5;
  4954. //>>excludeEnd("ctx");
  4955. $recv($9)._with_("References");
  4956. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4957. $ctx2.sendIdx["with:"]=5;
  4958. //>>excludeEnd("ctx");
  4959. $10=$recv($9)._onClick_((function(){
  4960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4961. return $core.withContext(function($ctx3) {
  4962. //>>excludeEnd("ctx");
  4963. return self._searchClassReferences();
  4964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4965. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)});
  4966. //>>excludeEnd("ctx");
  4967. }));
  4968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4969. $ctx2.sendIdx["onClick:"]=5;
  4970. //>>excludeEnd("ctx");
  4971. return $10;
  4972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4973. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4974. //>>excludeEnd("ctx");
  4975. }));
  4976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4977. $ctx1.sendIdx["contents:"]=1;
  4978. //>>excludeEnd("ctx");
  4979. $recv(self["@methodButtons"])._contents_((function(html){
  4980. var protocolSelect,referencesSelect;
  4981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4982. return $core.withContext(function($ctx2) {
  4983. //>>excludeEnd("ctx");
  4984. $11=$recv(html)._button();
  4985. $recv($11)._with_("Remove method");
  4986. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4987. $ctx2.sendIdx["with:"]=6;
  4988. //>>excludeEnd("ctx");
  4989. $recv($11)._onClick_((function(){
  4990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4991. return $core.withContext(function($ctx3) {
  4992. //>>excludeEnd("ctx");
  4993. return self._removeMethod();
  4994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4995. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)});
  4996. //>>excludeEnd("ctx");
  4997. }));
  4998. protocolSelect=$recv(html)._select();
  4999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5000. $ctx2.sendIdx["select"]=1;
  5001. //>>excludeEnd("ctx");
  5002. protocolSelect;
  5003. $12=protocolSelect;
  5004. $recv($12)._onChange_((function(){
  5005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5006. return $core.withContext(function($ctx3) {
  5007. //>>excludeEnd("ctx");
  5008. $14=$recv(protocolSelect)._asJQuery();
  5009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5010. $ctx3.sendIdx["asJQuery"]=1;
  5011. //>>excludeEnd("ctx");
  5012. $13=$recv($14)._val();
  5013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5014. $ctx3.sendIdx["val"]=1;
  5015. //>>excludeEnd("ctx");
  5016. return self._setMethodProtocol_($13);
  5017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5018. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)});
  5019. //>>excludeEnd("ctx");
  5020. }));
  5021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5022. $ctx2.sendIdx["onChange:"]=1;
  5023. //>>excludeEnd("ctx");
  5024. $15=$recv($12)._with_((function(){
  5025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5026. return $core.withContext(function($ctx3) {
  5027. //>>excludeEnd("ctx");
  5028. $16=$recv(html)._option();
  5029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5030. $ctx3.sendIdx["option"]=1;
  5031. //>>excludeEnd("ctx");
  5032. $recv($16)._with_("Method protocol");
  5033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5034. $ctx3.sendIdx["with:"]=8;
  5035. //>>excludeEnd("ctx");
  5036. $17=$recv($16)._at_put_("disabled","disabled");
  5037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5038. $ctx3.sendIdx["at:put:"]=1;
  5039. //>>excludeEnd("ctx");
  5040. $17;
  5041. $18=$recv(html)._option();
  5042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5043. $ctx3.sendIdx["option"]=2;
  5044. //>>excludeEnd("ctx");
  5045. $recv($18)._class_("important");
  5046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5047. $ctx3.sendIdx["class:"]=1;
  5048. //>>excludeEnd("ctx");
  5049. $19=$recv($18)._with_("New...");
  5050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5051. $ctx3.sendIdx["with:"]=9;
  5052. //>>excludeEnd("ctx");
  5053. $19;
  5054. currentProtocol=self["@selectedProtocol"];
  5055. currentProtocol;
  5056. $21=$recv(currentProtocol)._isNil();
  5057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5058. $ctx3.sendIdx["isNil"]=1;
  5059. //>>excludeEnd("ctx");
  5060. $20=$recv($21)._and_((function(){
  5061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5062. return $core.withContext(function($ctx4) {
  5063. //>>excludeEnd("ctx");
  5064. return $recv(self["@selectedMethod"])._notNil();
  5065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5066. $ctx4.sendIdx["notNil"]=1;
  5067. //>>excludeEnd("ctx");
  5068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5069. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)});
  5070. //>>excludeEnd("ctx");
  5071. }));
  5072. if($core.assert($20)){
  5073. currentProtocol=$recv(self["@selectedMethod"])._category();
  5074. currentProtocol;
  5075. }
  5076. return $recv(self._protocols())._do_((function(each){
  5077. var option;
  5078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5079. return $core.withContext(function($ctx4) {
  5080. //>>excludeEnd("ctx");
  5081. $22=$recv(html)._option();
  5082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5083. $ctx4.sendIdx["option"]=3;
  5084. //>>excludeEnd("ctx");
  5085. option=$recv($22)._with_(each);
  5086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5087. $ctx4.sendIdx["with:"]=10;
  5088. //>>excludeEnd("ctx");
  5089. option;
  5090. $23=$recv(currentProtocol).__eq(each);
  5091. if($core.assert($23)){
  5092. return $recv(option)._at_put_("selected","selected");
  5093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5094. $ctx4.sendIdx["at:put:"]=2;
  5095. //>>excludeEnd("ctx");
  5096. }
  5097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5098. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)});
  5099. //>>excludeEnd("ctx");
  5100. }));
  5101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5102. $ctx3.sendIdx["do:"]=1;
  5103. //>>excludeEnd("ctx");
  5104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5105. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)});
  5106. //>>excludeEnd("ctx");
  5107. }));
  5108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5109. $ctx2.sendIdx["with:"]=7;
  5110. //>>excludeEnd("ctx");
  5111. $15;
  5112. $24=$recv(self["@selectedMethod"])._isNil();
  5113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5114. $ctx2.sendIdx["isNil"]=2;
  5115. //>>excludeEnd("ctx");
  5116. if(!$core.assert($24)){
  5117. referencesSelect=$recv(html)._select();
  5118. referencesSelect;
  5119. $25=referencesSelect;
  5120. $recv($25)._onChange_((function(){
  5121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5122. return $core.withContext(function($ctx3) {
  5123. //>>excludeEnd("ctx");
  5124. return self._searchReferencesOf_($recv($recv(referencesSelect)._asJQuery())._val());
  5125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5126. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)});
  5127. //>>excludeEnd("ctx");
  5128. }));
  5129. $26=$recv($25)._with_((function(){
  5130. var option;
  5131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5132. return $core.withContext(function($ctx3) {
  5133. //>>excludeEnd("ctx");
  5134. $27=$recv(html)._option();
  5135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5136. $ctx3.sendIdx["option"]=4;
  5137. //>>excludeEnd("ctx");
  5138. $recv($27)._with_("References");
  5139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5140. $ctx3.sendIdx["with:"]=12;
  5141. //>>excludeEnd("ctx");
  5142. $recv($27)._at_put_("disabled","disabled");
  5143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5144. $ctx3.sendIdx["at:put:"]=3;
  5145. //>>excludeEnd("ctx");
  5146. $recv($27)._at_put_("selected","selected");
  5147. $28=$recv(html)._option();
  5148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5149. $ctx3.sendIdx["option"]=5;
  5150. //>>excludeEnd("ctx");
  5151. $recv($28)._class_("important");
  5152. $29=$recv($28)._with_($recv(self["@selectedMethod"])._selector());
  5153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5154. $ctx3.sendIdx["with:"]=13;
  5155. //>>excludeEnd("ctx");
  5156. $29;
  5157. return $recv($recv($recv(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  5158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5159. return $core.withContext(function($ctx4) {
  5160. //>>excludeEnd("ctx");
  5161. return $recv($recv(html)._option())._with_(each);
  5162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5163. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)});
  5164. //>>excludeEnd("ctx");
  5165. }));
  5166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5167. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)});
  5168. //>>excludeEnd("ctx");
  5169. }));
  5170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5171. $ctx2.sendIdx["with:"]=11;
  5172. //>>excludeEnd("ctx");
  5173. return $26;
  5174. }
  5175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5176. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)});
  5177. //>>excludeEnd("ctx");
  5178. }));
  5179. $30=$recv(self["@selectedMethod"])._isNil();
  5180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5181. $ctx1.sendIdx["isNil"]=3;
  5182. //>>excludeEnd("ctx");
  5183. if($core.assert($30)){
  5184. self._hideMethodButtons();
  5185. $31=$recv($recv(self["@selectedClass"])._isNil())._or_((function(){
  5186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5187. return $core.withContext(function($ctx2) {
  5188. //>>excludeEnd("ctx");
  5189. return $recv(self["@selectedProtocol"])._notNil();
  5190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5191. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)});
  5192. //>>excludeEnd("ctx");
  5193. }));
  5194. if($core.assert($31)){
  5195. self._hideClassButtons();
  5196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5197. $ctx1.sendIdx["hideClassButtons"]=1;
  5198. //>>excludeEnd("ctx");
  5199. } else {
  5200. self._showClassButtons();
  5201. }
  5202. } else {
  5203. self._hideClassButtons();
  5204. self._showMethodButtons();
  5205. }
  5206. $recv(self["@sourceArea"])._val_(self._source());
  5207. return self;
  5208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5209. }, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},$globals.Browser)});
  5210. //>>excludeEnd("ctx");
  5211. },
  5212. //>>excludeStart("ide", pragmas.excludeIdeData);
  5213. args: [],
  5214. 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",
  5215. referencedClasses: [],
  5216. //>>excludeEnd("ide");
  5217. 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"]
  5218. }),
  5219. $globals.Browser);
  5220. $core.addMethod(
  5221. $core.method({
  5222. selector: "updateStatus",
  5223. protocol: 'updating',
  5224. fn: function (){
  5225. var self=this;
  5226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5227. return $core.withContext(function($ctx1) {
  5228. //>>excludeEnd("ctx");
  5229. var $1,$2,$3,$receiver;
  5230. $1=$recv($recv(self["@sourceArea"])._val()).__eq(self._source());
  5231. if($core.assert($1)){
  5232. $2=self["@saveButton"];
  5233. if(($receiver = $2) == null || $receiver.isNil){
  5234. $2;
  5235. } else {
  5236. $recv(self["@saveButton"])._at_put_("disabled",true);
  5237. }
  5238. self["@unsavedChanges"]=false;
  5239. self["@unsavedChanges"];
  5240. } else {
  5241. $3=self["@saveButton"];
  5242. if(($receiver = $3) == null || $receiver.isNil){
  5243. $3;
  5244. } else {
  5245. $recv(self["@saveButton"])._removeAt_("disabled");
  5246. }
  5247. self["@unsavedChanges"]=true;
  5248. self["@unsavedChanges"];
  5249. }
  5250. return self;
  5251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5252. }, function($ctx1) {$ctx1.fill(self,"updateStatus",{},$globals.Browser)});
  5253. //>>excludeEnd("ctx");
  5254. },
  5255. //>>excludeStart("ide", pragmas.excludeIdeData);
  5256. args: [],
  5257. 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 ]",
  5258. referencedClasses: [],
  5259. //>>excludeEnd("ide");
  5260. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"]
  5261. }),
  5262. $globals.Browser);
  5263. $core.addMethod(
  5264. $core.method({
  5265. selector: "updateTabsList",
  5266. protocol: 'updating',
  5267. fn: function (){
  5268. var self=this;
  5269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5270. return $core.withContext(function($ctx1) {
  5271. //>>excludeEnd("ctx");
  5272. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18;
  5273. $recv(self["@tabsList"])._contents_((function(html){
  5274. var li;
  5275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5276. return $core.withContext(function($ctx2) {
  5277. //>>excludeEnd("ctx");
  5278. li=$recv(html)._li();
  5279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5280. $ctx2.sendIdx["li"]=1;
  5281. //>>excludeEnd("ctx");
  5282. li;
  5283. $1=$recv(self["@selectedTab"]).__eq("instance");
  5284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5285. $ctx2.sendIdx["="]=1;
  5286. //>>excludeEnd("ctx");
  5287. if($core.assert($1)){
  5288. $recv(li)._class_("selected");
  5289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5290. $ctx2.sendIdx["class:"]=1;
  5291. //>>excludeEnd("ctx");
  5292. }
  5293. $2=li;
  5294. $recv($2)._with_((function(){
  5295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5296. return $core.withContext(function($ctx3) {
  5297. //>>excludeEnd("ctx");
  5298. $3=$recv(html)._span();
  5299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5300. $ctx3.sendIdx["span"]=1;
  5301. //>>excludeEnd("ctx");
  5302. $recv($3)._class_("ltab");
  5303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5304. $ctx3.sendIdx["class:"]=2;
  5305. //>>excludeEnd("ctx");
  5306. $4=$recv(html)._span();
  5307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5308. $ctx3.sendIdx["span"]=2;
  5309. //>>excludeEnd("ctx");
  5310. $recv($4)._class_("mtab");
  5311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5312. $ctx3.sendIdx["class:"]=3;
  5313. //>>excludeEnd("ctx");
  5314. $5=$recv($4)._with_("Instance");
  5315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5316. $ctx3.sendIdx["with:"]=2;
  5317. //>>excludeEnd("ctx");
  5318. $5;
  5319. $6=$recv(html)._span();
  5320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5321. $ctx3.sendIdx["span"]=3;
  5322. //>>excludeEnd("ctx");
  5323. return $recv($6)._class_("rtab");
  5324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5325. $ctx3.sendIdx["class:"]=4;
  5326. //>>excludeEnd("ctx");
  5327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5328. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  5329. //>>excludeEnd("ctx");
  5330. }));
  5331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5332. $ctx2.sendIdx["with:"]=1;
  5333. //>>excludeEnd("ctx");
  5334. $7=$recv($2)._onClick_((function(){
  5335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5336. return $core.withContext(function($ctx3) {
  5337. //>>excludeEnd("ctx");
  5338. return self._selectTab_("instance");
  5339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5340. $ctx3.sendIdx["selectTab:"]=1;
  5341. //>>excludeEnd("ctx");
  5342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5343. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  5344. //>>excludeEnd("ctx");
  5345. }));
  5346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5347. $ctx2.sendIdx["onClick:"]=1;
  5348. //>>excludeEnd("ctx");
  5349. $7;
  5350. li=$recv(html)._li();
  5351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5352. $ctx2.sendIdx["li"]=2;
  5353. //>>excludeEnd("ctx");
  5354. li;
  5355. $8=$recv(self["@selectedTab"]).__eq("class");
  5356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5357. $ctx2.sendIdx["="]=2;
  5358. //>>excludeEnd("ctx");
  5359. if($core.assert($8)){
  5360. $recv(li)._class_("selected");
  5361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5362. $ctx2.sendIdx["class:"]=5;
  5363. //>>excludeEnd("ctx");
  5364. }
  5365. $9=li;
  5366. $recv($9)._with_((function(){
  5367. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5368. return $core.withContext(function($ctx3) {
  5369. //>>excludeEnd("ctx");
  5370. $10=$recv(html)._span();
  5371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5372. $ctx3.sendIdx["span"]=4;
  5373. //>>excludeEnd("ctx");
  5374. $recv($10)._class_("ltab");
  5375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5376. $ctx3.sendIdx["class:"]=6;
  5377. //>>excludeEnd("ctx");
  5378. $11=$recv(html)._span();
  5379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5380. $ctx3.sendIdx["span"]=5;
  5381. //>>excludeEnd("ctx");
  5382. $recv($11)._class_("mtab");
  5383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5384. $ctx3.sendIdx["class:"]=7;
  5385. //>>excludeEnd("ctx");
  5386. $12=$recv($11)._with_("Class");
  5387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5388. $ctx3.sendIdx["with:"]=4;
  5389. //>>excludeEnd("ctx");
  5390. $12;
  5391. $13=$recv(html)._span();
  5392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5393. $ctx3.sendIdx["span"]=6;
  5394. //>>excludeEnd("ctx");
  5395. return $recv($13)._class_("rtab");
  5396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5397. $ctx3.sendIdx["class:"]=8;
  5398. //>>excludeEnd("ctx");
  5399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5400. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)});
  5401. //>>excludeEnd("ctx");
  5402. }));
  5403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5404. $ctx2.sendIdx["with:"]=3;
  5405. //>>excludeEnd("ctx");
  5406. $14=$recv($9)._onClick_((function(){
  5407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5408. return $core.withContext(function($ctx3) {
  5409. //>>excludeEnd("ctx");
  5410. return self._selectTab_("class");
  5411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5412. $ctx3.sendIdx["selectTab:"]=2;
  5413. //>>excludeEnd("ctx");
  5414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5415. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
  5416. //>>excludeEnd("ctx");
  5417. }));
  5418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5419. $ctx2.sendIdx["onClick:"]=2;
  5420. //>>excludeEnd("ctx");
  5421. $14;
  5422. li=$recv(html)._li();
  5423. li;
  5424. $15=$recv(self["@selectedTab"]).__eq("comment");
  5425. if($core.assert($15)){
  5426. $recv(li)._class_("selected");
  5427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5428. $ctx2.sendIdx["class:"]=9;
  5429. //>>excludeEnd("ctx");
  5430. }
  5431. $16=li;
  5432. $recv($16)._with_((function(){
  5433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5434. return $core.withContext(function($ctx3) {
  5435. //>>excludeEnd("ctx");
  5436. $17=$recv(html)._span();
  5437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5438. $ctx3.sendIdx["span"]=7;
  5439. //>>excludeEnd("ctx");
  5440. $recv($17)._class_("ltab");
  5441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5442. $ctx3.sendIdx["class:"]=10;
  5443. //>>excludeEnd("ctx");
  5444. $18=$recv(html)._span();
  5445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5446. $ctx3.sendIdx["span"]=8;
  5447. //>>excludeEnd("ctx");
  5448. $recv($18)._class_("mtab");
  5449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5450. $ctx3.sendIdx["class:"]=11;
  5451. //>>excludeEnd("ctx");
  5452. $recv($18)._with_("Comment");
  5453. return $recv($recv(html)._span())._class_("rtab");
  5454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5455. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)});
  5456. //>>excludeEnd("ctx");
  5457. }));
  5458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5459. $ctx2.sendIdx["with:"]=5;
  5460. //>>excludeEnd("ctx");
  5461. return $recv($16)._onClick_((function(){
  5462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5463. return $core.withContext(function($ctx3) {
  5464. //>>excludeEnd("ctx");
  5465. return self._selectTab_("comment");
  5466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5467. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)});
  5468. //>>excludeEnd("ctx");
  5469. }));
  5470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5471. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)});
  5472. //>>excludeEnd("ctx");
  5473. }));
  5474. return self;
  5475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5476. }, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},$globals.Browser)});
  5477. //>>excludeEnd("ctx");
  5478. },
  5479. //>>excludeStart("ide", pragmas.excludeIdeData);
  5480. args: [],
  5481. 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 ]]",
  5482. referencedClasses: [],
  5483. //>>excludeEnd("ide");
  5484. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"]
  5485. }),
  5486. $globals.Browser);
  5487. $core.addMethod(
  5488. $core.method({
  5489. selector: "open",
  5490. protocol: 'convenience',
  5491. fn: function (){
  5492. var self=this;
  5493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5494. return $core.withContext(function($ctx1) {
  5495. //>>excludeEnd("ctx");
  5496. $recv(self._new())._open();
  5497. return self;
  5498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5499. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.Browser.klass)});
  5500. //>>excludeEnd("ctx");
  5501. },
  5502. //>>excludeStart("ide", pragmas.excludeIdeData);
  5503. args: [],
  5504. source: "open\x0a\x09self new open",
  5505. referencedClasses: [],
  5506. //>>excludeEnd("ide");
  5507. messageSends: ["open", "new"]
  5508. }),
  5509. $globals.Browser.klass);
  5510. $core.addMethod(
  5511. $core.method({
  5512. selector: "openOn:",
  5513. protocol: 'convenience',
  5514. fn: function (aClass){
  5515. var self=this;
  5516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5517. return $core.withContext(function($ctx1) {
  5518. //>>excludeEnd("ctx");
  5519. var $1;
  5520. $1=self._new();
  5521. $recv($1)._open();
  5522. $recv($1)._selectCategory_($recv(aClass)._category());
  5523. return $recv($1)._selectClass_(aClass);
  5524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5525. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},$globals.Browser.klass)});
  5526. //>>excludeEnd("ctx");
  5527. },
  5528. //>>excludeStart("ide", pragmas.excludeIdeData);
  5529. args: ["aClass"],
  5530. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  5531. referencedClasses: [],
  5532. //>>excludeEnd("ide");
  5533. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"]
  5534. }),
  5535. $globals.Browser.klass);
  5536. $core.addClass('Debugger', $globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  5537. $core.addMethod(
  5538. $core.method({
  5539. selector: "allVariables",
  5540. protocol: 'accessing',
  5541. fn: function (){
  5542. var self=this;
  5543. var all;
  5544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5545. return $core.withContext(function($ctx1) {
  5546. //>>excludeEnd("ctx");
  5547. var $3,$2,$1;
  5548. all=$recv($globals.Dictionary)._new();
  5549. $3=self._receiver();
  5550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5551. $ctx1.sendIdx["receiver"]=1;
  5552. //>>excludeEnd("ctx");
  5553. $2=$recv($3)._class();
  5554. $1=$recv($2)._allInstanceVariableNames();
  5555. $recv($1)._do_((function(each){
  5556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5557. return $core.withContext(function($ctx2) {
  5558. //>>excludeEnd("ctx");
  5559. return $recv(all)._at_put_(each,$recv(self._receiver())._instVarAt_(each));
  5560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5561. $ctx2.sendIdx["at:put:"]=1;
  5562. //>>excludeEnd("ctx");
  5563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5564. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  5565. //>>excludeEnd("ctx");
  5566. }));
  5567. $recv($recv(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  5568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5569. return $core.withContext(function($ctx2) {
  5570. //>>excludeEnd("ctx");
  5571. return $recv(all)._at_put_(key,value);
  5572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5573. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)});
  5574. //>>excludeEnd("ctx");
  5575. }));
  5576. return all;
  5577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5578. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},$globals.Debugger)});
  5579. //>>excludeEnd("ctx");
  5580. },
  5581. //>>excludeStart("ide", pragmas.excludeIdeData);
  5582. args: [],
  5583. 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",
  5584. referencedClasses: ["Dictionary"],
  5585. //>>excludeEnd("ide");
  5586. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"]
  5587. }),
  5588. $globals.Debugger);
  5589. $core.addMethod(
  5590. $core.method({
  5591. selector: "canBeClosed",
  5592. protocol: 'testing',
  5593. fn: function (){
  5594. var self=this;
  5595. return true;
  5596. },
  5597. //>>excludeStart("ide", pragmas.excludeIdeData);
  5598. args: [],
  5599. source: "canBeClosed\x0a\x09^ true",
  5600. referencedClasses: [],
  5601. //>>excludeEnd("ide");
  5602. messageSends: []
  5603. }),
  5604. $globals.Debugger);
  5605. $core.addMethod(
  5606. $core.method({
  5607. selector: "error",
  5608. protocol: 'accessing',
  5609. fn: function (){
  5610. var self=this;
  5611. return self["@error"];
  5612. },
  5613. //>>excludeStart("ide", pragmas.excludeIdeData);
  5614. args: [],
  5615. source: "error\x0a\x09^ error",
  5616. referencedClasses: [],
  5617. //>>excludeEnd("ide");
  5618. messageSends: []
  5619. }),
  5620. $globals.Debugger);
  5621. $core.addMethod(
  5622. $core.method({
  5623. selector: "error:",
  5624. protocol: 'accessing',
  5625. fn: function (anError){
  5626. var self=this;
  5627. self["@error"]=anError;
  5628. return self;
  5629. },
  5630. //>>excludeStart("ide", pragmas.excludeIdeData);
  5631. args: ["anError"],
  5632. source: "error: anError\x0a\x09error := anError",
  5633. referencedClasses: [],
  5634. //>>excludeEnd("ide");
  5635. messageSends: []
  5636. }),
  5637. $globals.Debugger);
  5638. $core.addMethod(
  5639. $core.method({
  5640. selector: "initialize",
  5641. protocol: 'initialization',
  5642. fn: function (){
  5643. var self=this;
  5644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5645. return $core.withContext(function($ctx1) {
  5646. //>>excludeEnd("ctx");
  5647. (
  5648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5649. $ctx1.supercall = true,
  5650. //>>excludeEnd("ctx");
  5651. ($globals.Debugger.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  5652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5653. $ctx1.supercall = false;
  5654. //>>excludeEnd("ctx");;
  5655. $recv(self["@unsavedChanges"]).__eq(false);
  5656. return self;
  5657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5658. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Debugger)});
  5659. //>>excludeEnd("ctx");
  5660. },
  5661. //>>excludeStart("ide", pragmas.excludeIdeData);
  5662. args: [],
  5663. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  5664. referencedClasses: [],
  5665. //>>excludeEnd("ide");
  5666. messageSends: ["initialize", "="]
  5667. }),
  5668. $globals.Debugger);
  5669. $core.addMethod(
  5670. $core.method({
  5671. selector: "inspectSelectedVariable",
  5672. protocol: 'actions',
  5673. fn: function (){
  5674. var self=this;
  5675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5676. return $core.withContext(function($ctx1) {
  5677. //>>excludeEnd("ctx");
  5678. $recv(self["@selectedVariable"])._inspect();
  5679. return self;
  5680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5681. }, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},$globals.Debugger)});
  5682. //>>excludeEnd("ctx");
  5683. },
  5684. //>>excludeStart("ide", pragmas.excludeIdeData);
  5685. args: [],
  5686. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  5687. referencedClasses: [],
  5688. //>>excludeEnd("ide");
  5689. messageSends: ["inspect"]
  5690. }),
  5691. $globals.Debugger);
  5692. $core.addMethod(
  5693. $core.method({
  5694. selector: "label",
  5695. protocol: 'accessing',
  5696. fn: function (){
  5697. var self=this;
  5698. return "[ Debugger ]";
  5699. },
  5700. //>>excludeStart("ide", pragmas.excludeIdeData);
  5701. args: [],
  5702. source: "label\x0a\x09^ '[ Debugger ]'",
  5703. referencedClasses: [],
  5704. //>>excludeEnd("ide");
  5705. messageSends: []
  5706. }),
  5707. $globals.Debugger);
  5708. $core.addMethod(
  5709. $core.method({
  5710. selector: "method",
  5711. protocol: 'accessing',
  5712. fn: function (){
  5713. var self=this;
  5714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5715. return $core.withContext(function($ctx1) {
  5716. //>>excludeEnd("ctx");
  5717. return $recv(self["@selectedContext"])._method();
  5718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5719. }, function($ctx1) {$ctx1.fill(self,"method",{},$globals.Debugger)});
  5720. //>>excludeEnd("ctx");
  5721. },
  5722. //>>excludeStart("ide", pragmas.excludeIdeData);
  5723. args: [],
  5724. source: "method\x0a\x09^ selectedContext method",
  5725. referencedClasses: [],
  5726. //>>excludeEnd("ide");
  5727. messageSends: ["method"]
  5728. }),
  5729. $globals.Debugger);
  5730. $core.addMethod(
  5731. $core.method({
  5732. selector: "proceed",
  5733. protocol: 'actions',
  5734. fn: function (){
  5735. var self=this;
  5736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5737. return $core.withContext(function($ctx1) {
  5738. //>>excludeEnd("ctx");
  5739. self._close();
  5740. $recv($recv(self["@selectedContext"])._receiver())._perform_withArguments_($recv(self["@selectedContext"])._selector(),$recv(self["@selectedContext"])._locals());
  5741. return self;
  5742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5743. }, function($ctx1) {$ctx1.fill(self,"proceed",{},$globals.Debugger)});
  5744. //>>excludeEnd("ctx");
  5745. },
  5746. //>>excludeStart("ide", pragmas.excludeIdeData);
  5747. args: [],
  5748. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext locals",
  5749. referencedClasses: [],
  5750. //>>excludeEnd("ide");
  5751. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "locals"]
  5752. }),
  5753. $globals.Debugger);
  5754. $core.addMethod(
  5755. $core.method({
  5756. selector: "receiver",
  5757. protocol: 'accessing',
  5758. fn: function (){
  5759. var self=this;
  5760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5761. return $core.withContext(function($ctx1) {
  5762. //>>excludeEnd("ctx");
  5763. return $recv(self["@selectedContext"])._receiver();
  5764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5765. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.Debugger)});
  5766. //>>excludeEnd("ctx");
  5767. },
  5768. //>>excludeStart("ide", pragmas.excludeIdeData);
  5769. args: [],
  5770. source: "receiver\x0a\x09^ selectedContext receiver",
  5771. referencedClasses: [],
  5772. //>>excludeEnd("ide");
  5773. messageSends: ["receiver"]
  5774. }),
  5775. $globals.Debugger);
  5776. $core.addMethod(
  5777. $core.method({
  5778. selector: "renderBottomPanelOn:",
  5779. protocol: 'rendering',
  5780. fn: function (html){
  5781. var self=this;
  5782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5783. return $core.withContext(function($ctx1) {
  5784. //>>excludeEnd("ctx");
  5785. var $1;
  5786. $1=$recv(html)._div();
  5787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5788. $ctx1.sendIdx["div"]=1;
  5789. //>>excludeEnd("ctx");
  5790. $recv($1)._class_("amber_sourceCode debugger");
  5791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5792. $ctx1.sendIdx["class:"]=1;
  5793. //>>excludeEnd("ctx");
  5794. $recv($1)._with_((function(){
  5795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5796. return $core.withContext(function($ctx2) {
  5797. //>>excludeEnd("ctx");
  5798. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  5799. self["@sourceArea"];
  5800. return $recv(self["@sourceArea"])._renderOn_(html);
  5801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5802. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5803. //>>excludeEnd("ctx");
  5804. }));
  5805. self["@ul2"]=$recv($recv(html)._ul())._class_("amber_column debugger variables");
  5806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5807. $ctx1.sendIdx["class:"]=2;
  5808. //>>excludeEnd("ctx");
  5809. self["@inspector"]=$recv($recv(html)._div())._class_("amber_column debugger inspector");
  5810. $recv(self["@sourceArea"])._onKeyUp_((function(){
  5811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5812. return $core.withContext(function($ctx2) {
  5813. //>>excludeEnd("ctx");
  5814. return self._updateStatus();
  5815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5816. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  5817. //>>excludeEnd("ctx");
  5818. }));
  5819. return self;
  5820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5821. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.Debugger)});
  5822. //>>excludeEnd("ctx");
  5823. },
  5824. //>>excludeStart("ide", pragmas.excludeIdeData);
  5825. args: ["html"],
  5826. 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 ]",
  5827. referencedClasses: ["SourceArea"],
  5828. //>>excludeEnd("ide");
  5829. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"]
  5830. }),
  5831. $globals.Debugger);
  5832. $core.addMethod(
  5833. $core.method({
  5834. selector: "renderBoxOn:",
  5835. protocol: 'rendering',
  5836. fn: function (html){
  5837. var self=this;
  5838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5839. return $core.withContext(function($ctx1) {
  5840. //>>excludeEnd("ctx");
  5841. self._renderTopPanelOn_(html);
  5842. self._renderBottomPanelOn_(html);
  5843. return self;
  5844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5845. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Debugger)});
  5846. //>>excludeEnd("ctx");
  5847. },
  5848. //>>excludeStart("ide", pragmas.excludeIdeData);
  5849. args: ["html"],
  5850. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  5851. referencedClasses: [],
  5852. //>>excludeEnd("ide");
  5853. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]
  5854. }),
  5855. $globals.Debugger);
  5856. $core.addMethod(
  5857. $core.method({
  5858. selector: "renderButtonsOn:",
  5859. protocol: 'rendering',
  5860. fn: function (html){
  5861. var self=this;
  5862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5863. return $core.withContext(function($ctx1) {
  5864. //>>excludeEnd("ctx");
  5865. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
  5866. $1=$recv(html)._button();
  5867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5868. $ctx1.sendIdx["button"]=1;
  5869. //>>excludeEnd("ctx");
  5870. $recv($1)._with_("Save");
  5871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5872. $ctx1.sendIdx["with:"]=1;
  5873. //>>excludeEnd("ctx");
  5874. $2=$recv($1)._onClick_((function(){
  5875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5876. return $core.withContext(function($ctx2) {
  5877. //>>excludeEnd("ctx");
  5878. return self._save();
  5879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5880. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5881. //>>excludeEnd("ctx");
  5882. }));
  5883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5884. $ctx1.sendIdx["onClick:"]=1;
  5885. //>>excludeEnd("ctx");
  5886. self["@saveButton"]=$2;
  5887. $3=$recv(html)._button();
  5888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5889. $ctx1.sendIdx["button"]=2;
  5890. //>>excludeEnd("ctx");
  5891. $recv($3)._with_("DoIt");
  5892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5893. $ctx1.sendIdx["with:"]=2;
  5894. //>>excludeEnd("ctx");
  5895. $4=$recv($3)._onClick_((function(){
  5896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5897. return $core.withContext(function($ctx2) {
  5898. //>>excludeEnd("ctx");
  5899. return $recv(self["@sourceArea"])._doIt();
  5900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5901. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  5902. //>>excludeEnd("ctx");
  5903. }));
  5904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5905. $ctx1.sendIdx["onClick:"]=2;
  5906. //>>excludeEnd("ctx");
  5907. $5=$recv(html)._button();
  5908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5909. $ctx1.sendIdx["button"]=3;
  5910. //>>excludeEnd("ctx");
  5911. $recv($5)._with_("PrintIt");
  5912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5913. $ctx1.sendIdx["with:"]=3;
  5914. //>>excludeEnd("ctx");
  5915. $6=$recv($5)._onClick_((function(){
  5916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5917. return $core.withContext(function($ctx2) {
  5918. //>>excludeEnd("ctx");
  5919. return $recv(self["@sourceArea"])._printIt();
  5920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5921. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5922. //>>excludeEnd("ctx");
  5923. }));
  5924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5925. $ctx1.sendIdx["onClick:"]=3;
  5926. //>>excludeEnd("ctx");
  5927. $7=$recv(html)._button();
  5928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5929. $ctx1.sendIdx["button"]=4;
  5930. //>>excludeEnd("ctx");
  5931. $recv($7)._with_("InspectIt");
  5932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5933. $ctx1.sendIdx["with:"]=4;
  5934. //>>excludeEnd("ctx");
  5935. $8=$recv($7)._onClick_((function(){
  5936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5937. return $core.withContext(function($ctx2) {
  5938. //>>excludeEnd("ctx");
  5939. return $recv(self["@sourceArea"])._inspectIt();
  5940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5941. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  5942. //>>excludeEnd("ctx");
  5943. }));
  5944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5945. $ctx1.sendIdx["onClick:"]=4;
  5946. //>>excludeEnd("ctx");
  5947. $9=$recv(html)._button();
  5948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5949. $ctx1.sendIdx["button"]=5;
  5950. //>>excludeEnd("ctx");
  5951. $recv($9)._with_("Proceed");
  5952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5953. $ctx1.sendIdx["with:"]=5;
  5954. //>>excludeEnd("ctx");
  5955. $10=$recv($9)._onClick_((function(){
  5956. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5957. return $core.withContext(function($ctx2) {
  5958. //>>excludeEnd("ctx");
  5959. return self._proceed();
  5960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5961. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  5962. //>>excludeEnd("ctx");
  5963. }));
  5964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5965. $ctx1.sendIdx["onClick:"]=5;
  5966. //>>excludeEnd("ctx");
  5967. $11=$recv(html)._button();
  5968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5969. $ctx1.sendIdx["button"]=6;
  5970. //>>excludeEnd("ctx");
  5971. $recv($11)._with_("Abandon");
  5972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5973. $ctx1.sendIdx["with:"]=6;
  5974. //>>excludeEnd("ctx");
  5975. $12=$recv($11)._onClick_((function(){
  5976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5977. return $core.withContext(function($ctx2) {
  5978. //>>excludeEnd("ctx");
  5979. return self._close();
  5980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5981. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  5982. //>>excludeEnd("ctx");
  5983. }));
  5984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5985. $ctx1.sendIdx["onClick:"]=6;
  5986. //>>excludeEnd("ctx");
  5987. $13=$recv(html)._button();
  5988. $recv($13)._class_("amber_button debugger inspect");
  5989. $recv($13)._with_("Inspect");
  5990. self["@inspectButton"]=$recv($13)._onClick_((function(){
  5991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5992. return $core.withContext(function($ctx2) {
  5993. //>>excludeEnd("ctx");
  5994. return self._inspectSelectedVariable();
  5995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5996. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)});
  5997. //>>excludeEnd("ctx");
  5998. }));
  5999. self._updateSourceArea();
  6000. self._updateStatus();
  6001. self._updateVariablesList();
  6002. self._updateInspector();
  6003. return self;
  6004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6005. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Debugger)});
  6006. //>>excludeEnd("ctx");
  6007. },
  6008. //>>excludeStart("ide", pragmas.excludeIdeData);
  6009. args: ["html"],
  6010. 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",
  6011. referencedClasses: [],
  6012. //>>excludeEnd("ide");
  6013. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"]
  6014. }),
  6015. $globals.Debugger);
  6016. $core.addMethod(
  6017. $core.method({
  6018. selector: "renderContext:on:",
  6019. protocol: 'rendering',
  6020. fn: function (aContext,html){
  6021. var self=this;
  6022. var li;
  6023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6024. return $core.withContext(function($ctx1) {
  6025. //>>excludeEnd("ctx");
  6026. var $1,$2,$3,$receiver;
  6027. li=$recv(html)._li();
  6028. $1=$recv(self["@selectedContext"]).__eq(aContext);
  6029. if($core.assert($1)){
  6030. $recv(li)._class_("selected");
  6031. }
  6032. $2=li;
  6033. $recv($2)._with_($recv(aContext)._asString());
  6034. $recv($2)._onClick_((function(){
  6035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6036. return $core.withContext(function($ctx2) {
  6037. //>>excludeEnd("ctx");
  6038. return self._selectContext_(aContext);
  6039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6040. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6041. //>>excludeEnd("ctx");
  6042. }));
  6043. $3=$recv(aContext)._outerContext();
  6044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6045. $ctx1.sendIdx["outerContext"]=1;
  6046. //>>excludeEnd("ctx");
  6047. if(($receiver = $3) == null || $receiver.isNil){
  6048. $3;
  6049. } else {
  6050. self._renderContext_on_($recv(aContext)._outerContext(),html);
  6051. }
  6052. return self;
  6053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6054. }, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},$globals.Debugger)});
  6055. //>>excludeEnd("ctx");
  6056. },
  6057. //>>excludeStart("ide", pragmas.excludeIdeData);
  6058. args: ["aContext", "html"],
  6059. 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 ]",
  6060. referencedClasses: [],
  6061. //>>excludeEnd("ide");
  6062. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"]
  6063. }),
  6064. $globals.Debugger);
  6065. $core.addMethod(
  6066. $core.method({
  6067. selector: "renderTopPanelOn:",
  6068. protocol: 'rendering',
  6069. fn: function (html){
  6070. var self=this;
  6071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6072. return $core.withContext(function($ctx1) {
  6073. //>>excludeEnd("ctx");
  6074. var $1,$2,$4,$7,$6,$5,$8,$3;
  6075. $1=self._error();
  6076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6077. $ctx1.sendIdx["error"]=1;
  6078. //>>excludeEnd("ctx");
  6079. self["@selectedContext"]=$recv($1)._context();
  6080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6081. $ctx1.sendIdx["context"]=1;
  6082. //>>excludeEnd("ctx");
  6083. $2=$recv(html)._div();
  6084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6085. $ctx1.sendIdx["div"]=1;
  6086. //>>excludeEnd("ctx");
  6087. $recv($2)._class_("top");
  6088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6089. $ctx1.sendIdx["class:"]=1;
  6090. //>>excludeEnd("ctx");
  6091. $3=$recv($2)._with_((function(){
  6092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6093. return $core.withContext(function($ctx2) {
  6094. //>>excludeEnd("ctx");
  6095. $4=$recv(html)._div();
  6096. $recv($4)._class_("label");
  6097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6098. $ctx2.sendIdx["class:"]=2;
  6099. //>>excludeEnd("ctx");
  6100. $7=self._error();
  6101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6102. $ctx2.sendIdx["error"]=2;
  6103. //>>excludeEnd("ctx");
  6104. $6=$recv($7)._messageText();
  6105. $5=$recv($4)._with_($6);
  6106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6107. $ctx2.sendIdx["with:"]=2;
  6108. //>>excludeEnd("ctx");
  6109. $5;
  6110. $8=$recv(html)._ul();
  6111. $recv($8)._class_("amber_column debugger contexts");
  6112. self["@ul"]=$recv($8)._with_((function(){
  6113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6114. return $core.withContext(function($ctx3) {
  6115. //>>excludeEnd("ctx");
  6116. return self._renderContext_on_($recv(self._error())._context(),html);
  6117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6118. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6119. //>>excludeEnd("ctx");
  6120. }));
  6121. return self["@ul"];
  6122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6123. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6124. //>>excludeEnd("ctx");
  6125. }));
  6126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6127. $ctx1.sendIdx["with:"]=1;
  6128. //>>excludeEnd("ctx");
  6129. return self;
  6130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6131. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.Debugger)});
  6132. //>>excludeEnd("ctx");
  6133. },
  6134. //>>excludeStart("ide", pragmas.excludeIdeData);
  6135. args: ["html"],
  6136. 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 ]]",
  6137. referencedClasses: [],
  6138. //>>excludeEnd("ide");
  6139. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"]
  6140. }),
  6141. $globals.Debugger);
  6142. $core.addMethod(
  6143. $core.method({
  6144. selector: "save",
  6145. protocol: 'actions',
  6146. fn: function (){
  6147. var self=this;
  6148. var protocol;
  6149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6150. return $core.withContext(function($ctx1) {
  6151. //>>excludeEnd("ctx");
  6152. var $4,$3,$2,$1;
  6153. $4=$recv(self["@selectedContext"])._receiver();
  6154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6155. $ctx1.sendIdx["receiver"]=1;
  6156. //>>excludeEnd("ctx");
  6157. $3=$recv($4)._class();
  6158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6159. $ctx1.sendIdx["class"]=1;
  6160. //>>excludeEnd("ctx");
  6161. $2=$recv($3)._methodDictionary();
  6162. $1=$recv($2)._at_($recv(self["@selectedContext"])._selector());
  6163. protocol=$recv($1)._category();
  6164. $recv($recv($recv(self["@selectedContext"])._receiver())._class())._compile_protocol_($recv(self["@sourceArea"])._val(),protocol);
  6165. self._updateStatus();
  6166. return self;
  6167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6168. }, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},$globals.Debugger)});
  6169. //>>excludeEnd("ctx");
  6170. },
  6171. //>>excludeStart("ide", pragmas.excludeIdeData);
  6172. args: [],
  6173. source: "save\x0a\x09| protocol |\x0a\x09protocol := (selectedContext receiver class methodDictionary at: selectedContext selector) category.\x0a\x09selectedContext receiver class compile: sourceArea val protocol: protocol.\x0a\x09self updateStatus",
  6174. referencedClasses: [],
  6175. //>>excludeEnd("ide");
  6176. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:protocol:", "val", "updateStatus"]
  6177. }),
  6178. $globals.Debugger);
  6179. $core.addMethod(
  6180. $core.method({
  6181. selector: "selectContext:",
  6182. protocol: 'actions',
  6183. fn: function (aContext){
  6184. var self=this;
  6185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6186. return $core.withContext(function($ctx1) {
  6187. //>>excludeEnd("ctx");
  6188. self["@selectedContext"]=aContext;
  6189. self["@selectedVariable"]=nil;
  6190. self["@selectedVariableName"]=nil;
  6191. self._updateContextsList();
  6192. self._updateSourceArea();
  6193. self._updateInspector();
  6194. self._updateVariablesList();
  6195. self._updateStatus();
  6196. return self;
  6197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6198. }, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},$globals.Debugger)});
  6199. //>>excludeEnd("ctx");
  6200. },
  6201. //>>excludeStart("ide", pragmas.excludeIdeData);
  6202. args: ["aContext"],
  6203. 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",
  6204. referencedClasses: [],
  6205. //>>excludeEnd("ide");
  6206. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"]
  6207. }),
  6208. $globals.Debugger);
  6209. $core.addMethod(
  6210. $core.method({
  6211. selector: "selectVariable:named:",
  6212. protocol: 'actions',
  6213. fn: function (anObject,aString){
  6214. var self=this;
  6215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6216. return $core.withContext(function($ctx1) {
  6217. //>>excludeEnd("ctx");
  6218. self["@selectedVariable"]=anObject;
  6219. self["@selectedVariableName"]=aString;
  6220. $recv(self["@inspector"])._contents_((function(html){
  6221. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6222. return $core.withContext(function($ctx2) {
  6223. //>>excludeEnd("ctx");
  6224. return $recv(html)._with_($recv(anObject)._printString());
  6225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6226. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  6227. //>>excludeEnd("ctx");
  6228. }));
  6229. self._updateVariablesList();
  6230. return self;
  6231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6232. }, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},$globals.Debugger)});
  6233. //>>excludeEnd("ctx");
  6234. },
  6235. //>>excludeStart("ide", pragmas.excludeIdeData);
  6236. args: ["anObject", "aString"],
  6237. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  6238. referencedClasses: [],
  6239. //>>excludeEnd("ide");
  6240. messageSends: ["contents:", "with:", "printString", "updateVariablesList"]
  6241. }),
  6242. $globals.Debugger);
  6243. $core.addMethod(
  6244. $core.method({
  6245. selector: "source",
  6246. protocol: 'accessing',
  6247. fn: function (){
  6248. var self=this;
  6249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6250. return $core.withContext(function($ctx1) {
  6251. //>>excludeEnd("ctx");
  6252. var $1,$receiver;
  6253. $1=self._method();
  6254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6255. $ctx1.sendIdx["method"]=1;
  6256. //>>excludeEnd("ctx");
  6257. if(($receiver = $1) == null || $receiver.isNil){
  6258. return "Method doesn't exist!";
  6259. } else {
  6260. return $recv(self._method())._source();
  6261. }
  6262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6263. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Debugger)});
  6264. //>>excludeEnd("ctx");
  6265. },
  6266. //>>excludeStart("ide", pragmas.excludeIdeData);
  6267. args: [],
  6268. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  6269. referencedClasses: [],
  6270. //>>excludeEnd("ide");
  6271. messageSends: ["ifNil:ifNotNil:", "method", "source"]
  6272. }),
  6273. $globals.Debugger);
  6274. $core.addMethod(
  6275. $core.method({
  6276. selector: "updateContextsList",
  6277. protocol: 'updating',
  6278. fn: function (){
  6279. var self=this;
  6280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6281. return $core.withContext(function($ctx1) {
  6282. //>>excludeEnd("ctx");
  6283. $recv(self["@ul"])._contents_((function(html){
  6284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6285. return $core.withContext(function($ctx2) {
  6286. //>>excludeEnd("ctx");
  6287. return self._renderContext_on_($recv(self._error())._context(),html);
  6288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6289. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  6290. //>>excludeEnd("ctx");
  6291. }));
  6292. return self;
  6293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6294. }, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},$globals.Debugger)});
  6295. //>>excludeEnd("ctx");
  6296. },
  6297. //>>excludeStart("ide", pragmas.excludeIdeData);
  6298. args: [],
  6299. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  6300. referencedClasses: [],
  6301. //>>excludeEnd("ide");
  6302. messageSends: ["contents:", "renderContext:on:", "context", "error"]
  6303. }),
  6304. $globals.Debugger);
  6305. $core.addMethod(
  6306. $core.method({
  6307. selector: "updateInspector",
  6308. protocol: 'updating',
  6309. fn: function (){
  6310. var self=this;
  6311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6312. return $core.withContext(function($ctx1) {
  6313. //>>excludeEnd("ctx");
  6314. $recv(self["@inspector"])._contents_((function(html){
  6315. }));
  6316. return self;
  6317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6318. }, function($ctx1) {$ctx1.fill(self,"updateInspector",{},$globals.Debugger)});
  6319. //>>excludeEnd("ctx");
  6320. },
  6321. //>>excludeStart("ide", pragmas.excludeIdeData);
  6322. args: [],
  6323. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  6324. referencedClasses: [],
  6325. //>>excludeEnd("ide");
  6326. messageSends: ["contents:"]
  6327. }),
  6328. $globals.Debugger);
  6329. $core.addMethod(
  6330. $core.method({
  6331. selector: "updateSourceArea",
  6332. protocol: 'updating',
  6333. fn: function (){
  6334. var self=this;
  6335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6336. return $core.withContext(function($ctx1) {
  6337. //>>excludeEnd("ctx");
  6338. $recv(self["@sourceArea"])._val_(self._source());
  6339. return self;
  6340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6341. }, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},$globals.Debugger)});
  6342. //>>excludeEnd("ctx");
  6343. },
  6344. //>>excludeStart("ide", pragmas.excludeIdeData);
  6345. args: [],
  6346. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  6347. referencedClasses: [],
  6348. //>>excludeEnd("ide");
  6349. messageSends: ["val:", "source"]
  6350. }),
  6351. $globals.Debugger);
  6352. $core.addMethod(
  6353. $core.method({
  6354. selector: "updateStatus",
  6355. protocol: 'updating',
  6356. fn: function (){
  6357. var self=this;
  6358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6359. return $core.withContext(function($ctx1) {
  6360. //>>excludeEnd("ctx");
  6361. var $1,$2,$3,$receiver;
  6362. $1=$recv($recv(self["@sourceArea"])._val()).__eq(self._source());
  6363. if($core.assert($1)){
  6364. $2=self["@saveButton"];
  6365. if(($receiver = $2) == null || $receiver.isNil){
  6366. $2;
  6367. } else {
  6368. $recv(self["@saveButton"])._at_put_("disabled",true);
  6369. }
  6370. self["@unsavedChanges"]=false;
  6371. self["@unsavedChanges"];
  6372. } else {
  6373. $3=self["@saveButton"];
  6374. if(($receiver = $3) == null || $receiver.isNil){
  6375. $3;
  6376. } else {
  6377. $recv(self["@saveButton"])._removeAt_("disabled");
  6378. }
  6379. self["@unsavedChanges"]=true;
  6380. self["@unsavedChanges"];
  6381. }
  6382. return self;
  6383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6384. }, function($ctx1) {$ctx1.fill(self,"updateStatus",{},$globals.Debugger)});
  6385. //>>excludeEnd("ctx");
  6386. },
  6387. //>>excludeStart("ide", pragmas.excludeIdeData);
  6388. args: [],
  6389. 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 ]",
  6390. referencedClasses: [],
  6391. //>>excludeEnd("ide");
  6392. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"]
  6393. }),
  6394. $globals.Debugger);
  6395. $core.addMethod(
  6396. $core.method({
  6397. selector: "updateVariablesList",
  6398. protocol: 'updating',
  6399. fn: function (){
  6400. var self=this;
  6401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6402. return $core.withContext(function($ctx1) {
  6403. //>>excludeEnd("ctx");
  6404. var $1,$2,$3,$4,$5,$6,$receiver;
  6405. $recv(self["@ul2"])._contents_((function(html){
  6406. var li;
  6407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6408. return $core.withContext(function($ctx2) {
  6409. //>>excludeEnd("ctx");
  6410. $1=$recv(html)._li();
  6411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6412. $ctx2.sendIdx["li"]=1;
  6413. //>>excludeEnd("ctx");
  6414. $recv($1)._with_("self");
  6415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6416. $ctx2.sendIdx["with:"]=1;
  6417. //>>excludeEnd("ctx");
  6418. $2=$recv($1)._onClick_((function(){
  6419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6420. return $core.withContext(function($ctx3) {
  6421. //>>excludeEnd("ctx");
  6422. return self._selectVariable_named_(self._receiver(),"self");
  6423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6424. $ctx3.sendIdx["selectVariable:named:"]=1;
  6425. //>>excludeEnd("ctx");
  6426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6427. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6428. //>>excludeEnd("ctx");
  6429. }));
  6430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6431. $ctx2.sendIdx["onClick:"]=1;
  6432. //>>excludeEnd("ctx");
  6433. li=$2;
  6434. li;
  6435. $3=$recv(self["@selectedVariableName"]).__eq("self");
  6436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6437. $ctx2.sendIdx["="]=1;
  6438. //>>excludeEnd("ctx");
  6439. if($core.assert($3)){
  6440. $recv(li)._class_("selected");
  6441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6442. $ctx2.sendIdx["class:"]=1;
  6443. //>>excludeEnd("ctx");
  6444. }
  6445. return $recv(self._allVariables())._keysAndValuesDo_((function(key,value){
  6446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6447. return $core.withContext(function($ctx3) {
  6448. //>>excludeEnd("ctx");
  6449. $4=$recv(html)._li();
  6450. $recv($4)._with_(key);
  6451. li=$recv($4)._onClick_((function(){
  6452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6453. return $core.withContext(function($ctx4) {
  6454. //>>excludeEnd("ctx");
  6455. return self._selectVariable_named_(value,key);
  6456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6457. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  6458. //>>excludeEnd("ctx");
  6459. }));
  6460. li;
  6461. $5=$recv(self["@selectedVariableName"]).__eq(key);
  6462. if($core.assert($5)){
  6463. return $recv(li)._class_("selected");
  6464. }
  6465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6466. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)});
  6467. //>>excludeEnd("ctx");
  6468. }));
  6469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6470. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)});
  6471. //>>excludeEnd("ctx");
  6472. }));
  6473. $6=self["@selectedVariable"];
  6474. if(($receiver = $6) == null || $receiver.isNil){
  6475. $recv(self["@inspectButton"])._at_put_("disabled",true);
  6476. } else {
  6477. $recv(self["@inspectButton"])._removeAt_("disabled");
  6478. }
  6479. return self;
  6480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6481. }, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},$globals.Debugger)});
  6482. //>>excludeEnd("ctx");
  6483. },
  6484. //>>excludeStart("ide", pragmas.excludeIdeData);
  6485. args: [],
  6486. 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' ]",
  6487. referencedClasses: [],
  6488. //>>excludeEnd("ide");
  6489. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"]
  6490. }),
  6491. $globals.Debugger);
  6492. $core.addClass('IDEInspector', $globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  6493. $core.addMethod(
  6494. $core.method({
  6495. selector: "canBeClosed",
  6496. protocol: 'testing',
  6497. fn: function (){
  6498. var self=this;
  6499. return true;
  6500. },
  6501. //>>excludeStart("ide", pragmas.excludeIdeData);
  6502. args: [],
  6503. source: "canBeClosed\x0a\x09^ true",
  6504. referencedClasses: [],
  6505. //>>excludeEnd("ide");
  6506. messageSends: []
  6507. }),
  6508. $globals.IDEInspector);
  6509. $core.addMethod(
  6510. $core.method({
  6511. selector: "dive",
  6512. protocol: 'actions',
  6513. fn: function (){
  6514. var self=this;
  6515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6516. return $core.withContext(function($ctx1) {
  6517. //>>excludeEnd("ctx");
  6518. $recv($recv(self._variables())._at_(self._selectedVariable()))._inspect();
  6519. return self;
  6520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6521. }, function($ctx1) {$ctx1.fill(self,"dive",{},$globals.IDEInspector)});
  6522. //>>excludeEnd("ctx");
  6523. },
  6524. //>>excludeStart("ide", pragmas.excludeIdeData);
  6525. args: [],
  6526. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  6527. referencedClasses: [],
  6528. //>>excludeEnd("ide");
  6529. messageSends: ["inspect", "at:", "variables", "selectedVariable"]
  6530. }),
  6531. $globals.IDEInspector);
  6532. $core.addMethod(
  6533. $core.method({
  6534. selector: "inspect:",
  6535. protocol: 'actions',
  6536. fn: function (anObject){
  6537. var self=this;
  6538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6539. return $core.withContext(function($ctx1) {
  6540. //>>excludeEnd("ctx");
  6541. self["@object"]=anObject;
  6542. self["@variables"]=[];
  6543. $recv(self["@object"])._inspectOn_(self);
  6544. return self;
  6545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6546. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.IDEInspector)});
  6547. //>>excludeEnd("ctx");
  6548. },
  6549. //>>excludeStart("ide", pragmas.excludeIdeData);
  6550. args: ["anObject"],
  6551. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  6552. referencedClasses: [],
  6553. //>>excludeEnd("ide");
  6554. messageSends: ["inspectOn:"]
  6555. }),
  6556. $globals.IDEInspector);
  6557. $core.addMethod(
  6558. $core.method({
  6559. selector: "label",
  6560. protocol: 'accessing',
  6561. fn: function (){
  6562. var self=this;
  6563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6564. return $core.withContext(function($ctx1) {
  6565. //>>excludeEnd("ctx");
  6566. var $1,$receiver;
  6567. $1=self["@label"];
  6568. if(($receiver = $1) == null || $receiver.isNil){
  6569. return "Inspector (nil)";
  6570. } else {
  6571. return $1;
  6572. }
  6573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6574. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.IDEInspector)});
  6575. //>>excludeEnd("ctx");
  6576. },
  6577. //>>excludeStart("ide", pragmas.excludeIdeData);
  6578. args: [],
  6579. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  6580. referencedClasses: [],
  6581. //>>excludeEnd("ide");
  6582. messageSends: ["ifNil:"]
  6583. }),
  6584. $globals.IDEInspector);
  6585. $core.addMethod(
  6586. $core.method({
  6587. selector: "refresh",
  6588. protocol: 'actions',
  6589. fn: function (){
  6590. var self=this;
  6591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6592. return $core.withContext(function($ctx1) {
  6593. //>>excludeEnd("ctx");
  6594. self._inspect_(self["@object"]);
  6595. self._updateVariablesList();
  6596. self._updateValueTextarea();
  6597. return self;
  6598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6599. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.IDEInspector)});
  6600. //>>excludeEnd("ctx");
  6601. },
  6602. //>>excludeStart("ide", pragmas.excludeIdeData);
  6603. args: [],
  6604. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  6605. referencedClasses: [],
  6606. //>>excludeEnd("ide");
  6607. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"]
  6608. }),
  6609. $globals.IDEInspector);
  6610. $core.addMethod(
  6611. $core.method({
  6612. selector: "renderBottomPanelOn:",
  6613. protocol: 'rendering',
  6614. fn: function (html){
  6615. var self=this;
  6616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6617. return $core.withContext(function($ctx1) {
  6618. //>>excludeEnd("ctx");
  6619. var $1,$2;
  6620. $1=$recv(html)._div();
  6621. $recv($1)._class_("amber_sourceCode");
  6622. $recv($1)._with_((function(){
  6623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6624. return $core.withContext(function($ctx2) {
  6625. //>>excludeEnd("ctx");
  6626. $2=$recv($globals.SourceArea)._new();
  6627. $recv($2)._receiver_(self["@object"]);
  6628. $recv($2)._onDoIt_((function(){
  6629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6630. return $core.withContext(function($ctx3) {
  6631. //>>excludeEnd("ctx");
  6632. return self._refresh();
  6633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6634. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6635. //>>excludeEnd("ctx");
  6636. }));
  6637. self["@sourceArea"]=$recv($2)._yourself();
  6638. self["@sourceArea"];
  6639. return $recv(self["@sourceArea"])._renderOn_(html);
  6640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6641. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6642. //>>excludeEnd("ctx");
  6643. }));
  6644. return self;
  6645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6646. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.IDEInspector)});
  6647. //>>excludeEnd("ctx");
  6648. },
  6649. //>>excludeStart("ide", pragmas.excludeIdeData);
  6650. args: ["html"],
  6651. 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 ]",
  6652. referencedClasses: ["SourceArea"],
  6653. //>>excludeEnd("ide");
  6654. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"]
  6655. }),
  6656. $globals.IDEInspector);
  6657. $core.addMethod(
  6658. $core.method({
  6659. selector: "renderBoxOn:",
  6660. protocol: 'rendering',
  6661. fn: function (html){
  6662. var self=this;
  6663. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6664. return $core.withContext(function($ctx1) {
  6665. //>>excludeEnd("ctx");
  6666. self._renderTopPanelOn_(html);
  6667. self._renderBottomPanelOn_(html);
  6668. return self;
  6669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6670. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.IDEInspector)});
  6671. //>>excludeEnd("ctx");
  6672. },
  6673. //>>excludeStart("ide", pragmas.excludeIdeData);
  6674. args: ["html"],
  6675. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  6676. referencedClasses: [],
  6677. //>>excludeEnd("ide");
  6678. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]
  6679. }),
  6680. $globals.IDEInspector);
  6681. $core.addMethod(
  6682. $core.method({
  6683. selector: "renderButtonsOn:",
  6684. protocol: 'rendering',
  6685. fn: function (html){
  6686. var self=this;
  6687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6688. return $core.withContext(function($ctx1) {
  6689. //>>excludeEnd("ctx");
  6690. var $1,$3,$2,$4,$6,$5,$7;
  6691. $1=$recv(html)._button();
  6692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6693. $ctx1.sendIdx["button"]=1;
  6694. //>>excludeEnd("ctx");
  6695. $recv($1)._with_("DoIt");
  6696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6697. $ctx1.sendIdx["with:"]=1;
  6698. //>>excludeEnd("ctx");
  6699. $2=$recv($1)._onClick_((function(){
  6700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6701. return $core.withContext(function($ctx2) {
  6702. //>>excludeEnd("ctx");
  6703. $3=self._sourceArea();
  6704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6705. $ctx2.sendIdx["sourceArea"]=1;
  6706. //>>excludeEnd("ctx");
  6707. return $recv($3)._doIt();
  6708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6709. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6710. //>>excludeEnd("ctx");
  6711. }));
  6712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6713. $ctx1.sendIdx["onClick:"]=1;
  6714. //>>excludeEnd("ctx");
  6715. $4=$recv(html)._button();
  6716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6717. $ctx1.sendIdx["button"]=2;
  6718. //>>excludeEnd("ctx");
  6719. $recv($4)._with_("PrintIt");
  6720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6721. $ctx1.sendIdx["with:"]=2;
  6722. //>>excludeEnd("ctx");
  6723. $5=$recv($4)._onClick_((function(){
  6724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6725. return $core.withContext(function($ctx2) {
  6726. //>>excludeEnd("ctx");
  6727. $6=self._sourceArea();
  6728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6729. $ctx2.sendIdx["sourceArea"]=2;
  6730. //>>excludeEnd("ctx");
  6731. return $recv($6)._printIt();
  6732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6733. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6734. //>>excludeEnd("ctx");
  6735. }));
  6736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6737. $ctx1.sendIdx["onClick:"]=2;
  6738. //>>excludeEnd("ctx");
  6739. $7=$recv(html)._button();
  6740. $recv($7)._with_("InspectIt");
  6741. $recv($7)._onClick_((function(){
  6742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6743. return $core.withContext(function($ctx2) {
  6744. //>>excludeEnd("ctx");
  6745. return $recv(self._sourceArea())._inspectIt();
  6746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6747. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  6748. //>>excludeEnd("ctx");
  6749. }));
  6750. self._updateButtons();
  6751. return self;
  6752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6753. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.IDEInspector)});
  6754. //>>excludeEnd("ctx");
  6755. },
  6756. //>>excludeStart("ide", pragmas.excludeIdeData);
  6757. args: ["html"],
  6758. 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",
  6759. referencedClasses: [],
  6760. //>>excludeEnd("ide");
  6761. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"]
  6762. }),
  6763. $globals.IDEInspector);
  6764. $core.addMethod(
  6765. $core.method({
  6766. selector: "renderTopPanelOn:",
  6767. protocol: 'rendering',
  6768. fn: function (html){
  6769. var self=this;
  6770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6771. return $core.withContext(function($ctx1) {
  6772. //>>excludeEnd("ctx");
  6773. var $1,$3,$4,$6,$7,$8,$5,$2;
  6774. $1=$recv(html)._div();
  6775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6776. $ctx1.sendIdx["div"]=1;
  6777. //>>excludeEnd("ctx");
  6778. $recv($1)._class_("top");
  6779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6780. $ctx1.sendIdx["class:"]=1;
  6781. //>>excludeEnd("ctx");
  6782. $2=$recv($1)._with_((function(){
  6783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6784. return $core.withContext(function($ctx2) {
  6785. //>>excludeEnd("ctx");
  6786. self["@variablesList"]=$recv($recv(html)._ul())._class_("amber_column variables");
  6787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6788. $ctx2.sendIdx["class:"]=2;
  6789. //>>excludeEnd("ctx");
  6790. self["@variablesList"];
  6791. $3=$recv(html)._textarea();
  6792. $recv($3)._class_("amber_column value");
  6793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6794. $ctx2.sendIdx["class:"]=3;
  6795. //>>excludeEnd("ctx");
  6796. $recv($3)._at_put_("readonly","readonly");
  6797. self["@valueTextarea"]=$recv($3)._yourself();
  6798. self["@valueTextarea"];
  6799. $4=$recv(html)._div();
  6800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6801. $ctx2.sendIdx["div"]=2;
  6802. //>>excludeEnd("ctx");
  6803. $recv($4)._class_("amber_tabs inspector");
  6804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6805. $ctx2.sendIdx["class:"]=4;
  6806. //>>excludeEnd("ctx");
  6807. $5=$recv($4)._with_((function(){
  6808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6809. return $core.withContext(function($ctx3) {
  6810. //>>excludeEnd("ctx");
  6811. $6=$recv(html)._button();
  6812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6813. $ctx3.sendIdx["button"]=1;
  6814. //>>excludeEnd("ctx");
  6815. $recv($6)._class_("amber_button inspector refresh");
  6816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6817. $ctx3.sendIdx["class:"]=5;
  6818. //>>excludeEnd("ctx");
  6819. $recv($6)._with_("Refresh");
  6820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6821. $ctx3.sendIdx["with:"]=3;
  6822. //>>excludeEnd("ctx");
  6823. $7=$recv($6)._onClick_((function(){
  6824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6825. return $core.withContext(function($ctx4) {
  6826. //>>excludeEnd("ctx");
  6827. return self._refresh();
  6828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6829. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  6830. //>>excludeEnd("ctx");
  6831. }));
  6832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6833. $ctx3.sendIdx["onClick:"]=1;
  6834. //>>excludeEnd("ctx");
  6835. $7;
  6836. $8=$recv(html)._button();
  6837. $recv($8)._class_("amber_button inspector dive");
  6838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6839. $ctx3.sendIdx["class:"]=6;
  6840. //>>excludeEnd("ctx");
  6841. $recv($8)._with_("Dive");
  6842. self["@diveButton"]=$recv($8)._onClick_((function(){
  6843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6844. return $core.withContext(function($ctx4) {
  6845. //>>excludeEnd("ctx");
  6846. return self._dive();
  6847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6848. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  6849. //>>excludeEnd("ctx");
  6850. }));
  6851. return self["@diveButton"];
  6852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6853. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6854. //>>excludeEnd("ctx");
  6855. }));
  6856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6857. $ctx2.sendIdx["with:"]=2;
  6858. //>>excludeEnd("ctx");
  6859. $5;
  6860. return $recv($recv(html)._div())._class_("amber_clear");
  6861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6862. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6863. //>>excludeEnd("ctx");
  6864. }));
  6865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6866. $ctx1.sendIdx["with:"]=1;
  6867. //>>excludeEnd("ctx");
  6868. self._updateVariablesList();
  6869. self._updateValueTextarea();
  6870. return self;
  6871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6872. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.IDEInspector)});
  6873. //>>excludeEnd("ctx");
  6874. },
  6875. //>>excludeStart("ide", pragmas.excludeIdeData);
  6876. args: ["html"],
  6877. 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.",
  6878. referencedClasses: [],
  6879. //>>excludeEnd("ide");
  6880. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"]
  6881. }),
  6882. $globals.IDEInspector);
  6883. $core.addMethod(
  6884. $core.method({
  6885. selector: "selectVariable:",
  6886. protocol: 'updating',
  6887. fn: function (aString){
  6888. var self=this;
  6889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6890. return $core.withContext(function($ctx1) {
  6891. //>>excludeEnd("ctx");
  6892. self._selectedVariable_(aString);
  6893. self._updateVariablesList();
  6894. self._updateValueTextarea();
  6895. self._updateButtons();
  6896. return self;
  6897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6898. }, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},$globals.IDEInspector)});
  6899. //>>excludeEnd("ctx");
  6900. },
  6901. //>>excludeStart("ide", pragmas.excludeIdeData);
  6902. args: ["aString"],
  6903. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  6904. referencedClasses: [],
  6905. //>>excludeEnd("ide");
  6906. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"]
  6907. }),
  6908. $globals.IDEInspector);
  6909. $core.addMethod(
  6910. $core.method({
  6911. selector: "selectedVariable",
  6912. protocol: 'accessing',
  6913. fn: function (){
  6914. var self=this;
  6915. return self["@selectedVariable"];
  6916. },
  6917. //>>excludeStart("ide", pragmas.excludeIdeData);
  6918. args: [],
  6919. source: "selectedVariable\x0a\x09^ selectedVariable",
  6920. referencedClasses: [],
  6921. //>>excludeEnd("ide");
  6922. messageSends: []
  6923. }),
  6924. $globals.IDEInspector);
  6925. $core.addMethod(
  6926. $core.method({
  6927. selector: "selectedVariable:",
  6928. protocol: 'accessing',
  6929. fn: function (aString){
  6930. var self=this;
  6931. self["@selectedVariable"]=aString;
  6932. return self;
  6933. },
  6934. //>>excludeStart("ide", pragmas.excludeIdeData);
  6935. args: ["aString"],
  6936. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  6937. referencedClasses: [],
  6938. //>>excludeEnd("ide");
  6939. messageSends: []
  6940. }),
  6941. $globals.IDEInspector);
  6942. $core.addMethod(
  6943. $core.method({
  6944. selector: "setLabel:",
  6945. protocol: 'accessing',
  6946. fn: function (aString){
  6947. var self=this;
  6948. self["@label"]=aString;
  6949. return self;
  6950. },
  6951. //>>excludeStart("ide", pragmas.excludeIdeData);
  6952. args: ["aString"],
  6953. source: "setLabel: aString\x0a\x09label := aString",
  6954. referencedClasses: [],
  6955. //>>excludeEnd("ide");
  6956. messageSends: []
  6957. }),
  6958. $globals.IDEInspector);
  6959. $core.addMethod(
  6960. $core.method({
  6961. selector: "setVariables:",
  6962. protocol: 'accessing',
  6963. fn: function (aCollection){
  6964. var self=this;
  6965. self["@variables"]=aCollection;
  6966. return self;
  6967. },
  6968. //>>excludeStart("ide", pragmas.excludeIdeData);
  6969. args: ["aCollection"],
  6970. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  6971. referencedClasses: [],
  6972. //>>excludeEnd("ide");
  6973. messageSends: []
  6974. }),
  6975. $globals.IDEInspector);
  6976. $core.addMethod(
  6977. $core.method({
  6978. selector: "sourceArea",
  6979. protocol: 'accessing',
  6980. fn: function (){
  6981. var self=this;
  6982. return self["@sourceArea"];
  6983. },
  6984. //>>excludeStart("ide", pragmas.excludeIdeData);
  6985. args: [],
  6986. source: "sourceArea\x0a\x09^ sourceArea",
  6987. referencedClasses: [],
  6988. //>>excludeEnd("ide");
  6989. messageSends: []
  6990. }),
  6991. $globals.IDEInspector);
  6992. $core.addMethod(
  6993. $core.method({
  6994. selector: "updateButtons",
  6995. protocol: 'updating',
  6996. fn: function (){
  6997. var self=this;
  6998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6999. return $core.withContext(function($ctx1) {
  7000. //>>excludeEnd("ctx");
  7001. var $3,$2,$1;
  7002. $3=self._selectedVariable();
  7003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7004. $ctx1.sendIdx["selectedVariable"]=1;
  7005. //>>excludeEnd("ctx");
  7006. $2=$recv($3)._notNil();
  7007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7008. $ctx1.sendIdx["notNil"]=1;
  7009. //>>excludeEnd("ctx");
  7010. $1=$recv($2)._and_((function(){
  7011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7012. return $core.withContext(function($ctx2) {
  7013. //>>excludeEnd("ctx");
  7014. return $recv($recv(self._variables())._at_(self._selectedVariable()))._notNil();
  7015. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7016. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7017. //>>excludeEnd("ctx");
  7018. }));
  7019. if($core.assert($1)){
  7020. $recv(self["@diveButton"])._removeAt_("disabled");
  7021. } else {
  7022. $recv(self["@diveButton"])._at_put_("disabled",true);
  7023. }
  7024. return self;
  7025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7026. }, function($ctx1) {$ctx1.fill(self,"updateButtons",{},$globals.IDEInspector)});
  7027. //>>excludeEnd("ctx");
  7028. },
  7029. //>>excludeStart("ide", pragmas.excludeIdeData);
  7030. args: [],
  7031. 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' ]",
  7032. referencedClasses: [],
  7033. //>>excludeEnd("ide");
  7034. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"]
  7035. }),
  7036. $globals.IDEInspector);
  7037. $core.addMethod(
  7038. $core.method({
  7039. selector: "updateValueTextarea",
  7040. protocol: 'updating',
  7041. fn: function (){
  7042. var self=this;
  7043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7044. return $core.withContext(function($ctx1) {
  7045. //>>excludeEnd("ctx");
  7046. var $1,$4,$3,$2;
  7047. $1=$recv(self["@valueTextarea"])._asJQuery();
  7048. $4=self._selectedVariable();
  7049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7050. $ctx1.sendIdx["selectedVariable"]=1;
  7051. //>>excludeEnd("ctx");
  7052. $3=$recv($4)._isNil();
  7053. if($core.assert($3)){
  7054. $2="";
  7055. } else {
  7056. $2=$recv($recv(self._variables())._at_(self._selectedVariable()))._printString();
  7057. }
  7058. $recv($1)._val_($2);
  7059. return self;
  7060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7061. }, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},$globals.IDEInspector)});
  7062. //>>excludeEnd("ctx");
  7063. },
  7064. //>>excludeStart("ide", pragmas.excludeIdeData);
  7065. args: [],
  7066. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  7067. referencedClasses: [],
  7068. //>>excludeEnd("ide");
  7069. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"]
  7070. }),
  7071. $globals.IDEInspector);
  7072. $core.addMethod(
  7073. $core.method({
  7074. selector: "updateVariablesList",
  7075. protocol: 'updating',
  7076. fn: function (){
  7077. var self=this;
  7078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7079. return $core.withContext(function($ctx1) {
  7080. //>>excludeEnd("ctx");
  7081. var $1,$2;
  7082. $recv(self["@variablesList"])._contents_((function(html){
  7083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7084. return $core.withContext(function($ctx2) {
  7085. //>>excludeEnd("ctx");
  7086. return $recv(self._variables())._keysDo_((function(each){
  7087. var li;
  7088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7089. return $core.withContext(function($ctx3) {
  7090. //>>excludeEnd("ctx");
  7091. li=$recv(html)._li();
  7092. li;
  7093. $1=li;
  7094. $recv($1)._with_(each);
  7095. $recv($1)._onClick_((function(){
  7096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7097. return $core.withContext(function($ctx4) {
  7098. //>>excludeEnd("ctx");
  7099. return self._selectVariable_(each);
  7100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7101. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7102. //>>excludeEnd("ctx");
  7103. }));
  7104. $2=$recv(self._selectedVariable()).__eq(each);
  7105. if($core.assert($2)){
  7106. return $recv(li)._class_("selected");
  7107. }
  7108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7109. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  7110. //>>excludeEnd("ctx");
  7111. }));
  7112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7113. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  7114. //>>excludeEnd("ctx");
  7115. }));
  7116. return self;
  7117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7118. }, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},$globals.IDEInspector)});
  7119. //>>excludeEnd("ctx");
  7120. },
  7121. //>>excludeStart("ide", pragmas.excludeIdeData);
  7122. args: [],
  7123. 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' ]] ]",
  7124. referencedClasses: [],
  7125. //>>excludeEnd("ide");
  7126. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"]
  7127. }),
  7128. $globals.IDEInspector);
  7129. $core.addMethod(
  7130. $core.method({
  7131. selector: "variables",
  7132. protocol: 'accessing',
  7133. fn: function (){
  7134. var self=this;
  7135. return self["@variables"];
  7136. },
  7137. //>>excludeStart("ide", pragmas.excludeIdeData);
  7138. args: [],
  7139. source: "variables\x0a\x09^ variables",
  7140. referencedClasses: [],
  7141. //>>excludeEnd("ide");
  7142. messageSends: []
  7143. }),
  7144. $globals.IDEInspector);
  7145. $core.addMethod(
  7146. $core.method({
  7147. selector: "inspect:",
  7148. protocol: 'instance creation',
  7149. fn: function (anObject){
  7150. var self=this;
  7151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7152. return $core.withContext(function($ctx1) {
  7153. //>>excludeEnd("ctx");
  7154. var $1;
  7155. $1=self._new();
  7156. $recv($1)._inspect_(anObject);
  7157. $recv($1)._open();
  7158. return $recv($1)._yourself();
  7159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7160. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.IDEInspector.klass)});
  7161. //>>excludeEnd("ctx");
  7162. },
  7163. //>>excludeStart("ide", pragmas.excludeIdeData);
  7164. args: ["anObject"],
  7165. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  7166. referencedClasses: [],
  7167. //>>excludeEnd("ide");
  7168. messageSends: ["inspect:", "new", "open", "yourself"]
  7169. }),
  7170. $globals.IDEInspector.klass);
  7171. $core.addMethod(
  7172. $core.method({
  7173. selector: "on:",
  7174. protocol: 'instance creation',
  7175. fn: function (anObject){
  7176. var self=this;
  7177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7178. return $core.withContext(function($ctx1) {
  7179. //>>excludeEnd("ctx");
  7180. var $1;
  7181. $1=self._new();
  7182. $recv($1)._inspect_(anObject);
  7183. return $recv($1)._yourself();
  7184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7185. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.IDEInspector.klass)});
  7186. //>>excludeEnd("ctx");
  7187. },
  7188. //>>excludeStart("ide", pragmas.excludeIdeData);
  7189. args: ["anObject"],
  7190. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  7191. referencedClasses: [],
  7192. //>>excludeEnd("ide");
  7193. messageSends: ["inspect:", "new", "yourself"]
  7194. }),
  7195. $globals.IDEInspector.klass);
  7196. $core.addClass('IDETranscript', $globals.TabWidget, ['textarea'], 'IDE');
  7197. $core.addMethod(
  7198. $core.method({
  7199. selector: "clear",
  7200. protocol: 'actions',
  7201. fn: function (){
  7202. var self=this;
  7203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7204. return $core.withContext(function($ctx1) {
  7205. //>>excludeEnd("ctx");
  7206. $recv($recv(self["@textarea"])._asJQuery())._val_("");
  7207. return self;
  7208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7209. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.IDETranscript)});
  7210. //>>excludeEnd("ctx");
  7211. },
  7212. //>>excludeStart("ide", pragmas.excludeIdeData);
  7213. args: [],
  7214. source: "clear\x0a\x09textarea asJQuery val: ''",
  7215. referencedClasses: [],
  7216. //>>excludeEnd("ide");
  7217. messageSends: ["val:", "asJQuery"]
  7218. }),
  7219. $globals.IDETranscript);
  7220. $core.addMethod(
  7221. $core.method({
  7222. selector: "cr",
  7223. protocol: 'actions',
  7224. fn: function (){
  7225. var self=this;
  7226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7227. return $core.withContext(function($ctx1) {
  7228. //>>excludeEnd("ctx");
  7229. var $1;
  7230. $1=$recv(self["@textarea"])._asJQuery();
  7231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7232. $ctx1.sendIdx["asJQuery"]=1;
  7233. //>>excludeEnd("ctx");
  7234. $recv($1)._val_($recv($recv($recv(self["@textarea"])._asJQuery())._val()).__comma($recv($globals.String)._cr()));
  7235. return self;
  7236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7237. }, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.IDETranscript)});
  7238. //>>excludeEnd("ctx");
  7239. },
  7240. //>>excludeStart("ide", pragmas.excludeIdeData);
  7241. args: [],
  7242. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  7243. referencedClasses: ["String"],
  7244. //>>excludeEnd("ide");
  7245. messageSends: ["val:", "asJQuery", ",", "val", "cr"]
  7246. }),
  7247. $globals.IDETranscript);
  7248. $core.addMethod(
  7249. $core.method({
  7250. selector: "label",
  7251. protocol: 'accessing',
  7252. fn: function (){
  7253. var self=this;
  7254. return "Transcript";
  7255. },
  7256. //>>excludeStart("ide", pragmas.excludeIdeData);
  7257. args: [],
  7258. source: "label\x0a\x09^ 'Transcript'",
  7259. referencedClasses: [],
  7260. //>>excludeEnd("ide");
  7261. messageSends: []
  7262. }),
  7263. $globals.IDETranscript);
  7264. $core.addMethod(
  7265. $core.method({
  7266. selector: "open",
  7267. protocol: 'actions',
  7268. fn: function (){
  7269. var self=this;
  7270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7271. return $core.withContext(function($ctx1) {
  7272. //>>excludeEnd("ctx");
  7273. var $1;
  7274. $1=$recv($globals.TabManager)._current();
  7275. $recv($1)._open();
  7276. $recv($1)._selectTab_(self);
  7277. return self;
  7278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7279. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.IDETranscript)});
  7280. //>>excludeEnd("ctx");
  7281. },
  7282. //>>excludeStart("ide", pragmas.excludeIdeData);
  7283. args: [],
  7284. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  7285. referencedClasses: ["TabManager"],
  7286. //>>excludeEnd("ide");
  7287. messageSends: ["open", "current", "selectTab:"]
  7288. }),
  7289. $globals.IDETranscript);
  7290. $core.addMethod(
  7291. $core.method({
  7292. selector: "renderBoxOn:",
  7293. protocol: 'rendering',
  7294. fn: function (html){
  7295. var self=this;
  7296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7297. return $core.withContext(function($ctx1) {
  7298. //>>excludeEnd("ctx");
  7299. var $1;
  7300. self["@textarea"]=$recv(html)._textarea();
  7301. $1=self["@textarea"];
  7302. $recv($1)._class_("amber_transcript");
  7303. $recv($1)._at_put_("spellcheck","false");
  7304. return self;
  7305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7306. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.IDETranscript)});
  7307. //>>excludeEnd("ctx");
  7308. },
  7309. //>>excludeStart("ide", pragmas.excludeIdeData);
  7310. args: ["html"],
  7311. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  7312. referencedClasses: [],
  7313. //>>excludeEnd("ide");
  7314. messageSends: ["textarea", "class:", "at:put:"]
  7315. }),
  7316. $globals.IDETranscript);
  7317. $core.addMethod(
  7318. $core.method({
  7319. selector: "renderButtonsOn:",
  7320. protocol: 'rendering',
  7321. fn: function (html){
  7322. var self=this;
  7323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7324. return $core.withContext(function($ctx1) {
  7325. //>>excludeEnd("ctx");
  7326. var $1;
  7327. $1=$recv(html)._button();
  7328. $recv($1)._with_("Clear transcript");
  7329. $recv($1)._onClick_((function(){
  7330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7331. return $core.withContext(function($ctx2) {
  7332. //>>excludeEnd("ctx");
  7333. return self._clear();
  7334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7335. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7336. //>>excludeEnd("ctx");
  7337. }));
  7338. return self;
  7339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7340. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.IDETranscript)});
  7341. //>>excludeEnd("ctx");
  7342. },
  7343. //>>excludeStart("ide", pragmas.excludeIdeData);
  7344. args: ["html"],
  7345. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  7346. referencedClasses: [],
  7347. //>>excludeEnd("ide");
  7348. messageSends: ["with:", "button", "onClick:", "clear"]
  7349. }),
  7350. $globals.IDETranscript);
  7351. $core.addMethod(
  7352. $core.method({
  7353. selector: "show:",
  7354. protocol: 'actions',
  7355. fn: function (anObject){
  7356. var self=this;
  7357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7358. return $core.withContext(function($ctx1) {
  7359. //>>excludeEnd("ctx");
  7360. var $1,$2,$receiver;
  7361. $1=self["@textarea"];
  7362. if(($receiver = $1) == null || $receiver.isNil){
  7363. self._open();
  7364. } else {
  7365. $1;
  7366. }
  7367. $2=$recv(self["@textarea"])._asJQuery();
  7368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7369. $ctx1.sendIdx["asJQuery"]=1;
  7370. //>>excludeEnd("ctx");
  7371. $recv($2)._val_($recv($recv($recv(self["@textarea"])._asJQuery())._val()).__comma($recv(anObject)._asString()));
  7372. return self;
  7373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7374. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.IDETranscript)});
  7375. //>>excludeEnd("ctx");
  7376. },
  7377. //>>excludeStart("ide", pragmas.excludeIdeData);
  7378. args: ["anObject"],
  7379. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  7380. referencedClasses: [],
  7381. //>>excludeEnd("ide");
  7382. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"]
  7383. }),
  7384. $globals.IDETranscript);
  7385. $globals.IDETranscript.klass.iVarNames = ['current'];
  7386. $core.addMethod(
  7387. $core.method({
  7388. selector: "current",
  7389. protocol: 'instance creation',
  7390. fn: function (){
  7391. var self=this;
  7392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7393. return $core.withContext(function($ctx1) {
  7394. //>>excludeEnd("ctx");
  7395. var $1,$receiver;
  7396. $1=self["@current"];
  7397. if(($receiver = $1) == null || $receiver.isNil){
  7398. self["@current"]=(
  7399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7400. $ctx1.supercall = true,
  7401. //>>excludeEnd("ctx");
  7402. ($globals.IDETranscript.klass.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
  7403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7404. $ctx1.supercall = false;
  7405. //>>excludeEnd("ctx");;
  7406. return self["@current"];
  7407. } else {
  7408. return $1;
  7409. }
  7410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7411. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.IDETranscript.klass)});
  7412. //>>excludeEnd("ctx");
  7413. },
  7414. //>>excludeStart("ide", pragmas.excludeIdeData);
  7415. args: [],
  7416. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  7417. referencedClasses: [],
  7418. //>>excludeEnd("ide");
  7419. messageSends: ["ifNil:", "new"]
  7420. }),
  7421. $globals.IDETranscript.klass);
  7422. $core.addMethod(
  7423. $core.method({
  7424. selector: "initialize",
  7425. protocol: 'initialization',
  7426. fn: function (){
  7427. var self=this;
  7428. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7429. return $core.withContext(function($ctx1) {
  7430. //>>excludeEnd("ctx");
  7431. $recv($globals.Transcript)._register_(self._current());
  7432. return self;
  7433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7434. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.IDETranscript.klass)});
  7435. //>>excludeEnd("ctx");
  7436. },
  7437. //>>excludeStart("ide", pragmas.excludeIdeData);
  7438. args: [],
  7439. source: "initialize\x0a\x09Transcript register: self current",
  7440. referencedClasses: ["Transcript"],
  7441. //>>excludeEnd("ide");
  7442. messageSends: ["register:", "current"]
  7443. }),
  7444. $globals.IDETranscript.klass);
  7445. $core.addMethod(
  7446. $core.method({
  7447. selector: "new",
  7448. protocol: 'instance creation',
  7449. fn: function (){
  7450. var self=this;
  7451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7452. return $core.withContext(function($ctx1) {
  7453. //>>excludeEnd("ctx");
  7454. self._shouldNotImplement();
  7455. return self;
  7456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7457. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.IDETranscript.klass)});
  7458. //>>excludeEnd("ctx");
  7459. },
  7460. //>>excludeStart("ide", pragmas.excludeIdeData);
  7461. args: [],
  7462. source: "new\x0a\x09self shouldNotImplement",
  7463. referencedClasses: [],
  7464. //>>excludeEnd("ide");
  7465. messageSends: ["shouldNotImplement"]
  7466. }),
  7467. $globals.IDETranscript.klass);
  7468. $core.addMethod(
  7469. $core.method({
  7470. selector: "open",
  7471. protocol: 'instance creation',
  7472. fn: function (){
  7473. var self=this;
  7474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7475. return $core.withContext(function($ctx1) {
  7476. //>>excludeEnd("ctx");
  7477. var $1;
  7478. $1=$recv($globals.TabManager)._current();
  7479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7480. $ctx1.sendIdx["current"]=1;
  7481. //>>excludeEnd("ctx");
  7482. $recv($1)._open();
  7483. $recv($1)._selectTab_(self._current());
  7484. return self;
  7485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7486. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.IDETranscript.klass)});
  7487. //>>excludeEnd("ctx");
  7488. },
  7489. //>>excludeStart("ide", pragmas.excludeIdeData);
  7490. args: [],
  7491. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  7492. referencedClasses: ["TabManager"],
  7493. //>>excludeEnd("ide");
  7494. messageSends: ["open", "current", "selectTab:"]
  7495. }),
  7496. $globals.IDETranscript.klass);
  7497. $core.addClass('ProgressBar', $globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  7498. $core.addMethod(
  7499. $core.method({
  7500. selector: "percent",
  7501. protocol: 'accessing',
  7502. fn: function (){
  7503. var self=this;
  7504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7505. return $core.withContext(function($ctx1) {
  7506. //>>excludeEnd("ctx");
  7507. var $1,$receiver;
  7508. $1=self["@percent"];
  7509. if(($receiver = $1) == null || $receiver.isNil){
  7510. return (0);
  7511. } else {
  7512. return $1;
  7513. }
  7514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7515. }, function($ctx1) {$ctx1.fill(self,"percent",{},$globals.ProgressBar)});
  7516. //>>excludeEnd("ctx");
  7517. },
  7518. //>>excludeStart("ide", pragmas.excludeIdeData);
  7519. args: [],
  7520. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  7521. referencedClasses: [],
  7522. //>>excludeEnd("ide");
  7523. messageSends: ["ifNil:"]
  7524. }),
  7525. $globals.ProgressBar);
  7526. $core.addMethod(
  7527. $core.method({
  7528. selector: "percent:",
  7529. protocol: 'accessing',
  7530. fn: function (aNumber){
  7531. var self=this;
  7532. self["@percent"]=aNumber;
  7533. return self;
  7534. },
  7535. //>>excludeStart("ide", pragmas.excludeIdeData);
  7536. args: ["aNumber"],
  7537. source: "percent: aNumber\x0a\x09percent := aNumber",
  7538. referencedClasses: [],
  7539. //>>excludeEnd("ide");
  7540. messageSends: []
  7541. }),
  7542. $globals.ProgressBar);
  7543. $core.addMethod(
  7544. $core.method({
  7545. selector: "renderOn:",
  7546. protocol: 'rendering',
  7547. fn: function (html){
  7548. var self=this;
  7549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7550. return $core.withContext(function($ctx1) {
  7551. //>>excludeEnd("ctx");
  7552. var $1;
  7553. $1=$recv(html)._div();
  7554. $recv($1)._class_("progress_bar");
  7555. self["@div"]=$recv($1)._yourself();
  7556. self._renderProgressBar();
  7557. return self;
  7558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7559. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.ProgressBar)});
  7560. //>>excludeEnd("ctx");
  7561. },
  7562. //>>excludeStart("ide", pragmas.excludeIdeData);
  7563. args: ["html"],
  7564. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  7565. referencedClasses: [],
  7566. //>>excludeEnd("ide");
  7567. messageSends: ["class:", "div", "yourself", "renderProgressBar"]
  7568. }),
  7569. $globals.ProgressBar);
  7570. $core.addMethod(
  7571. $core.method({
  7572. selector: "renderProgressBar",
  7573. protocol: 'rendering',
  7574. fn: function (){
  7575. var self=this;
  7576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7577. return $core.withContext(function($ctx1) {
  7578. //>>excludeEnd("ctx");
  7579. var $1,$2;
  7580. $recv(self["@div"])._contents_((function(html){
  7581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7582. return $core.withContext(function($ctx2) {
  7583. //>>excludeEnd("ctx");
  7584. $1=$recv(html)._div();
  7585. $recv($1)._class_("progress");
  7586. $2=$recv("width:".__comma($recv(self._percent())._asString())).__comma("%");
  7587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7588. $ctx2.sendIdx[","]=1;
  7589. //>>excludeEnd("ctx");
  7590. return $recv($1)._style_($2);
  7591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7592. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  7593. //>>excludeEnd("ctx");
  7594. }));
  7595. return self;
  7596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7597. }, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},$globals.ProgressBar)});
  7598. //>>excludeEnd("ctx");
  7599. },
  7600. //>>excludeStart("ide", pragmas.excludeIdeData);
  7601. args: [],
  7602. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  7603. referencedClasses: [],
  7604. //>>excludeEnd("ide");
  7605. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"]
  7606. }),
  7607. $globals.ProgressBar);
  7608. $core.addMethod(
  7609. $core.method({
  7610. selector: "updatePercent:",
  7611. protocol: 'updating',
  7612. fn: function (aNumber){
  7613. var self=this;
  7614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7615. return $core.withContext(function($ctx1) {
  7616. //>>excludeEnd("ctx");
  7617. self._percent_(aNumber);
  7618. self._renderProgressBar();
  7619. return self;
  7620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7621. }, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},$globals.ProgressBar)});
  7622. //>>excludeEnd("ctx");
  7623. },
  7624. //>>excludeStart("ide", pragmas.excludeIdeData);
  7625. args: ["aNumber"],
  7626. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  7627. referencedClasses: [],
  7628. //>>excludeEnd("ide");
  7629. messageSends: ["percent:", "renderProgressBar"]
  7630. }),
  7631. $globals.ProgressBar);
  7632. $core.addClass('ReferencesBrowser', $globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  7633. $core.addMethod(
  7634. $core.method({
  7635. selector: "canBeClosed",
  7636. protocol: 'testing',
  7637. fn: function (){
  7638. var self=this;
  7639. return true;
  7640. },
  7641. //>>excludeStart("ide", pragmas.excludeIdeData);
  7642. args: [],
  7643. source: "canBeClosed\x0a\x09^ true",
  7644. referencedClasses: [],
  7645. //>>excludeEnd("ide");
  7646. messageSends: []
  7647. }),
  7648. $globals.ReferencesBrowser);
  7649. $core.addMethod(
  7650. $core.method({
  7651. selector: "classesAndMetaclasses",
  7652. protocol: 'accessing',
  7653. fn: function (){
  7654. var self=this;
  7655. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7656. return $core.withContext(function($ctx1) {
  7657. //>>excludeEnd("ctx");
  7658. var $1;
  7659. $1=$recv($globals.Smalltalk)._classes();
  7660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7661. $ctx1.sendIdx["classes"]=1;
  7662. //>>excludeEnd("ctx");
  7663. return $recv($1).__comma($recv($recv($globals.Smalltalk)._classes())._collect_((function(each){
  7664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7665. return $core.withContext(function($ctx2) {
  7666. //>>excludeEnd("ctx");
  7667. return $recv(each)._class();
  7668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7669. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7670. //>>excludeEnd("ctx");
  7671. })));
  7672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7673. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},$globals.ReferencesBrowser)});
  7674. //>>excludeEnd("ctx");
  7675. },
  7676. //>>excludeStart("ide", pragmas.excludeIdeData);
  7677. args: [],
  7678. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  7679. referencedClasses: ["Smalltalk"],
  7680. //>>excludeEnd("ide");
  7681. messageSends: [",", "classes", "collect:", "class"]
  7682. }),
  7683. $globals.ReferencesBrowser);
  7684. $core.addMethod(
  7685. $core.method({
  7686. selector: "implementors",
  7687. protocol: 'accessing',
  7688. fn: function (){
  7689. var self=this;
  7690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7691. return $core.withContext(function($ctx1) {
  7692. //>>excludeEnd("ctx");
  7693. var $1,$receiver;
  7694. $1=self["@implementors"];
  7695. if(($receiver = $1) == null || $receiver.isNil){
  7696. self["@implementors"]=$recv($globals.Array)._new();
  7697. return self["@implementors"];
  7698. } else {
  7699. return $1;
  7700. }
  7701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7702. }, function($ctx1) {$ctx1.fill(self,"implementors",{},$globals.ReferencesBrowser)});
  7703. //>>excludeEnd("ctx");
  7704. },
  7705. //>>excludeStart("ide", pragmas.excludeIdeData);
  7706. args: [],
  7707. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  7708. referencedClasses: ["Array"],
  7709. //>>excludeEnd("ide");
  7710. messageSends: ["ifNil:", "new"]
  7711. }),
  7712. $globals.ReferencesBrowser);
  7713. $core.addMethod(
  7714. $core.method({
  7715. selector: "initialize",
  7716. protocol: 'initialization',
  7717. fn: function (){
  7718. var self=this;
  7719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7720. return $core.withContext(function($ctx1) {
  7721. //>>excludeEnd("ctx");
  7722. (
  7723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7724. $ctx1.supercall = true,
  7725. //>>excludeEnd("ctx");
  7726. ($globals.ReferencesBrowser.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  7727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7728. $ctx1.supercall = false;
  7729. //>>excludeEnd("ctx");;
  7730. self["@selector"]="";
  7731. return self;
  7732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7733. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ReferencesBrowser)});
  7734. //>>excludeEnd("ctx");
  7735. },
  7736. //>>excludeStart("ide", pragmas.excludeIdeData);
  7737. args: [],
  7738. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  7739. referencedClasses: [],
  7740. //>>excludeEnd("ide");
  7741. messageSends: ["initialize"]
  7742. }),
  7743. $globals.ReferencesBrowser);
  7744. $core.addMethod(
  7745. $core.method({
  7746. selector: "label",
  7747. protocol: 'accessing',
  7748. fn: function (){
  7749. var self=this;
  7750. return "[ References ]";
  7751. },
  7752. //>>excludeStart("ide", pragmas.excludeIdeData);
  7753. args: [],
  7754. source: "label\x0a\x09^ '[ References ]'",
  7755. referencedClasses: [],
  7756. //>>excludeEnd("ide");
  7757. messageSends: []
  7758. }),
  7759. $globals.ReferencesBrowser);
  7760. $core.addMethod(
  7761. $core.method({
  7762. selector: "matches",
  7763. protocol: 'accessing',
  7764. fn: function (){
  7765. var self=this;
  7766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7767. return $core.withContext(function($ctx1) {
  7768. //>>excludeEnd("ctx");
  7769. var $1,$receiver;
  7770. $1=self["@matches"];
  7771. if(($receiver = $1) == null || $receiver.isNil){
  7772. self["@matches"]=$recv($globals.Array)._new();
  7773. return self["@matches"];
  7774. } else {
  7775. return $1;
  7776. }
  7777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7778. }, function($ctx1) {$ctx1.fill(self,"matches",{},$globals.ReferencesBrowser)});
  7779. //>>excludeEnd("ctx");
  7780. },
  7781. //>>excludeStart("ide", pragmas.excludeIdeData);
  7782. args: [],
  7783. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  7784. referencedClasses: ["Array"],
  7785. //>>excludeEnd("ide");
  7786. messageSends: ["ifNil:", "new"]
  7787. }),
  7788. $globals.ReferencesBrowser);
  7789. $core.addMethod(
  7790. $core.method({
  7791. selector: "openBrowserOn:",
  7792. protocol: 'actions',
  7793. fn: function (aMethod){
  7794. var self=this;
  7795. var browser;
  7796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7797. return $core.withContext(function($ctx1) {
  7798. //>>excludeEnd("ctx");
  7799. var $3,$2,$4,$1,$5,$6;
  7800. $3=$recv(aMethod)._methodClass();
  7801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7802. $ctx1.sendIdx["methodClass"]=1;
  7803. //>>excludeEnd("ctx");
  7804. $2=$recv($3)._isMetaclass();
  7805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7806. $ctx1.sendIdx["isMetaclass"]=1;
  7807. //>>excludeEnd("ctx");
  7808. if($core.assert($2)){
  7809. $4=$recv(aMethod)._methodClass();
  7810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7811. $ctx1.sendIdx["methodClass"]=2;
  7812. //>>excludeEnd("ctx");
  7813. $1=$recv($4)._instanceClass();
  7814. } else {
  7815. $1=$recv(aMethod)._methodClass();
  7816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7817. $ctx1.sendIdx["methodClass"]=3;
  7818. //>>excludeEnd("ctx");
  7819. }
  7820. browser=$recv($globals.Browser)._openOn_($1);
  7821. $5=$recv($recv(aMethod)._methodClass())._isMetaclass();
  7822. if($core.assert($5)){
  7823. $recv(browser)._selectTab_("class");
  7824. }
  7825. $6=browser;
  7826. $recv($6)._selectProtocol_($recv(aMethod)._category());
  7827. $recv($6)._selectMethod_(aMethod);
  7828. return self;
  7829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7830. }, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},$globals.ReferencesBrowser)});
  7831. //>>excludeEnd("ctx");
  7832. },
  7833. //>>excludeStart("ide", pragmas.excludeIdeData);
  7834. args: ["aMethod"],
  7835. 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",
  7836. referencedClasses: ["Browser"],
  7837. //>>excludeEnd("ide");
  7838. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"]
  7839. }),
  7840. $globals.ReferencesBrowser);
  7841. $core.addMethod(
  7842. $core.method({
  7843. selector: "referencedClasses",
  7844. protocol: 'accessing',
  7845. fn: function (){
  7846. var self=this;
  7847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7848. return $core.withContext(function($ctx1) {
  7849. //>>excludeEnd("ctx");
  7850. var $1,$receiver;
  7851. $1=self["@referencedClasses"];
  7852. if(($receiver = $1) == null || $receiver.isNil){
  7853. self["@referencedClasses"]=$recv($globals.Array)._new();
  7854. return self["@referencedClasses"];
  7855. } else {
  7856. return $1;
  7857. }
  7858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7859. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},$globals.ReferencesBrowser)});
  7860. //>>excludeEnd("ctx");
  7861. },
  7862. //>>excludeStart("ide", pragmas.excludeIdeData);
  7863. args: [],
  7864. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  7865. referencedClasses: ["Array"],
  7866. //>>excludeEnd("ide");
  7867. messageSends: ["ifNil:", "new"]
  7868. }),
  7869. $globals.ReferencesBrowser);
  7870. $core.addMethod(
  7871. $core.method({
  7872. selector: "renderBoxOn:",
  7873. protocol: 'rendering',
  7874. fn: function (html){
  7875. var self=this;
  7876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7877. return $core.withContext(function($ctx1) {
  7878. //>>excludeEnd("ctx");
  7879. self._renderInputOn_(html);
  7880. self._renderImplementorsOn_(html);
  7881. self._renderSendersOn_(html);
  7882. self._renderReferencedClassesOn_(html);
  7883. self._renderMatchesOn_(html);
  7884. return self;
  7885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7886. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.ReferencesBrowser)});
  7887. //>>excludeEnd("ctx");
  7888. },
  7889. //>>excludeStart("ide", pragmas.excludeIdeData);
  7890. args: ["html"],
  7891. 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",
  7892. referencedClasses: [],
  7893. //>>excludeEnd("ide");
  7894. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"]
  7895. }),
  7896. $globals.ReferencesBrowser);
  7897. $core.addMethod(
  7898. $core.method({
  7899. selector: "renderImplementorsOn:",
  7900. protocol: 'rendering',
  7901. fn: function (html){
  7902. var self=this;
  7903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7904. return $core.withContext(function($ctx1) {
  7905. //>>excludeEnd("ctx");
  7906. self["@implementorsList"]=$recv($recv(html)._ul())._class_("amber_column implementors");
  7907. self._updateImplementorsList();
  7908. return self;
  7909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7910. }, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},$globals.ReferencesBrowser)});
  7911. //>>excludeEnd("ctx");
  7912. },
  7913. //>>excludeStart("ide", pragmas.excludeIdeData);
  7914. args: ["html"],
  7915. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  7916. referencedClasses: [],
  7917. //>>excludeEnd("ide");
  7918. messageSends: ["class:", "ul", "updateImplementorsList"]
  7919. }),
  7920. $globals.ReferencesBrowser);
  7921. $core.addMethod(
  7922. $core.method({
  7923. selector: "renderInputOn:",
  7924. protocol: 'rendering',
  7925. fn: function (html){
  7926. var self=this;
  7927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7928. return $core.withContext(function($ctx1) {
  7929. //>>excludeEnd("ctx");
  7930. var $1;
  7931. $1=$recv(html)._input();
  7932. $recv($1)._class_("implementors");
  7933. self["@input"]=$recv($1)._yourself();
  7934. $recv($recv(self["@input"])._asJQuery())._val_(self["@selector"]);
  7935. self._setInputEvents();
  7936. return self;
  7937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7938. }, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},$globals.ReferencesBrowser)});
  7939. //>>excludeEnd("ctx");
  7940. },
  7941. //>>excludeStart("ide", pragmas.excludeIdeData);
  7942. args: ["html"],
  7943. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  7944. referencedClasses: [],
  7945. //>>excludeEnd("ide");
  7946. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"]
  7947. }),
  7948. $globals.ReferencesBrowser);
  7949. $core.addMethod(
  7950. $core.method({
  7951. selector: "renderMatchesOn:",
  7952. protocol: 'rendering',
  7953. fn: function (html){
  7954. var self=this;
  7955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7956. return $core.withContext(function($ctx1) {
  7957. //>>excludeEnd("ctx");
  7958. self["@matchesList"]=$recv($recv(html)._ul())._class_("amber_column matches");
  7959. self._updateMatchesList();
  7960. return self;
  7961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7962. }, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},$globals.ReferencesBrowser)});
  7963. //>>excludeEnd("ctx");
  7964. },
  7965. //>>excludeStart("ide", pragmas.excludeIdeData);
  7966. args: ["html"],
  7967. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  7968. referencedClasses: [],
  7969. //>>excludeEnd("ide");
  7970. messageSends: ["class:", "ul", "updateMatchesList"]
  7971. }),
  7972. $globals.ReferencesBrowser);
  7973. $core.addMethod(
  7974. $core.method({
  7975. selector: "renderReferencedClassesOn:",
  7976. protocol: 'rendering',
  7977. fn: function (html){
  7978. var self=this;
  7979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7980. return $core.withContext(function($ctx1) {
  7981. //>>excludeEnd("ctx");
  7982. self["@referencedClassesList"]=$recv($recv(html)._ul())._class_("amber_column referenced_classes");
  7983. self._updateReferencedClassesList();
  7984. return self;
  7985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7986. }, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},$globals.ReferencesBrowser)});
  7987. //>>excludeEnd("ctx");
  7988. },
  7989. //>>excludeStart("ide", pragmas.excludeIdeData);
  7990. args: ["html"],
  7991. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  7992. referencedClasses: [],
  7993. //>>excludeEnd("ide");
  7994. messageSends: ["class:", "ul", "updateReferencedClassesList"]
  7995. }),
  7996. $globals.ReferencesBrowser);
  7997. $core.addMethod(
  7998. $core.method({
  7999. selector: "renderSendersOn:",
  8000. protocol: 'rendering',
  8001. fn: function (html){
  8002. var self=this;
  8003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8004. return $core.withContext(function($ctx1) {
  8005. //>>excludeEnd("ctx");
  8006. self["@sendersList"]=$recv($recv(html)._ul())._class_("amber_column senders");
  8007. self._updateSendersList();
  8008. return self;
  8009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8010. }, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},$globals.ReferencesBrowser)});
  8011. //>>excludeEnd("ctx");
  8012. },
  8013. //>>excludeStart("ide", pragmas.excludeIdeData);
  8014. args: ["html"],
  8015. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  8016. referencedClasses: [],
  8017. //>>excludeEnd("ide");
  8018. messageSends: ["class:", "ul", "updateSendersList"]
  8019. }),
  8020. $globals.ReferencesBrowser);
  8021. $core.addMethod(
  8022. $core.method({
  8023. selector: "search:",
  8024. protocol: 'actions',
  8025. fn: function (aString){
  8026. var self=this;
  8027. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8028. return $core.withContext(function($ctx1) {
  8029. //>>excludeEnd("ctx");
  8030. self._searchReferencesFor_(aString);
  8031. self._updateImplementorsList();
  8032. self._updateSendersList();
  8033. self._updateReferencedClassesList();
  8034. self._updateMatchesList();
  8035. return self;
  8036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8037. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.ReferencesBrowser)});
  8038. //>>excludeEnd("ctx");
  8039. },
  8040. //>>excludeStart("ide", pragmas.excludeIdeData);
  8041. args: ["aString"],
  8042. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  8043. referencedClasses: [],
  8044. //>>excludeEnd("ide");
  8045. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"]
  8046. }),
  8047. $globals.ReferencesBrowser);
  8048. $core.addMethod(
  8049. $core.method({
  8050. selector: "searchMethodSource",
  8051. protocol: 'actions',
  8052. fn: function (){
  8053. var self=this;
  8054. var regex;
  8055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8056. return $core.withContext(function($ctx1) {
  8057. //>>excludeEnd("ctx");
  8058. var $1;
  8059. regex=$recv(self["@selector"])._allButFirst();
  8060. $recv(self._classesAndMetaclasses())._do_((function(each){
  8061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8062. return $core.withContext(function($ctx2) {
  8063. //>>excludeEnd("ctx");
  8064. return $recv($recv(each)._methodDictionary())._valuesDo_((function(value){
  8065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8066. return $core.withContext(function($ctx3) {
  8067. //>>excludeEnd("ctx");
  8068. $1=$recv($recv(value)._source())._match_(regex);
  8069. if($core.assert($1)){
  8070. return $recv(self._matches())._add_(value);
  8071. }
  8072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8073. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)});
  8074. //>>excludeEnd("ctx");
  8075. }));
  8076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8077. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8078. //>>excludeEnd("ctx");
  8079. }));
  8080. return self;
  8081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8082. }, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},$globals.ReferencesBrowser)});
  8083. //>>excludeEnd("ctx");
  8084. },
  8085. //>>excludeStart("ide", pragmas.excludeIdeData);
  8086. args: [],
  8087. 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 ]] ]",
  8088. referencedClasses: [],
  8089. //>>excludeEnd("ide");
  8090. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"]
  8091. }),
  8092. $globals.ReferencesBrowser);
  8093. $core.addMethod(
  8094. $core.method({
  8095. selector: "searchReferencedClasses",
  8096. protocol: 'actions',
  8097. fn: function (){
  8098. var self=this;
  8099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8100. return $core.withContext(function($ctx1) {
  8101. //>>excludeEnd("ctx");
  8102. var $2,$1;
  8103. $recv(self._classesAndMetaclasses())._do_((function(each){
  8104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8105. return $core.withContext(function($ctx2) {
  8106. //>>excludeEnd("ctx");
  8107. return $recv($recv(each)._methodDictionary())._valuesDo_((function(value){
  8108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8109. return $core.withContext(function($ctx3) {
  8110. //>>excludeEnd("ctx");
  8111. $2=$recv(value)._referencedClasses();
  8112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8113. $ctx3.sendIdx["referencedClasses"]=1;
  8114. //>>excludeEnd("ctx");
  8115. $1=$recv($2)._includes_(self["@selector"]);
  8116. if($core.assert($1)){
  8117. return $recv(self._referencedClasses())._add_(value);
  8118. }
  8119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8120. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)});
  8121. //>>excludeEnd("ctx");
  8122. }));
  8123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8124. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8125. //>>excludeEnd("ctx");
  8126. }));
  8127. return self;
  8128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8129. }, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},$globals.ReferencesBrowser)});
  8130. //>>excludeEnd("ctx");
  8131. },
  8132. //>>excludeStart("ide", pragmas.excludeIdeData);
  8133. args: [],
  8134. 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 ]] ]",
  8135. referencedClasses: [],
  8136. //>>excludeEnd("ide");
  8137. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"]
  8138. }),
  8139. $globals.ReferencesBrowser);
  8140. $core.addMethod(
  8141. $core.method({
  8142. selector: "searchReferencesFor:",
  8143. protocol: 'actions',
  8144. fn: function (aString){
  8145. var self=this;
  8146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8147. return $core.withContext(function($ctx1) {
  8148. //>>excludeEnd("ctx");
  8149. var $1;
  8150. self["@selector"]=aString;
  8151. self["@implementors"]=$recv($globals.Array)._new();
  8152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8153. $ctx1.sendIdx["new"]=1;
  8154. //>>excludeEnd("ctx");
  8155. self["@senders"]=$recv($globals.Array)._new();
  8156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8157. $ctx1.sendIdx["new"]=2;
  8158. //>>excludeEnd("ctx");
  8159. self["@referencedClasses"]=$recv($globals.Array)._new();
  8160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8161. $ctx1.sendIdx["new"]=3;
  8162. //>>excludeEnd("ctx");
  8163. self["@matches"]=$recv($globals.Array)._new();
  8164. self._searchMethodSource();
  8165. $1=$recv(self["@selector"])._match_("^[A-Z]");
  8166. if($core.assert($1)){
  8167. self._searchReferencedClasses();
  8168. } else {
  8169. self._searchSelectorReferences();
  8170. }
  8171. return self;
  8172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8173. }, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},$globals.ReferencesBrowser)});
  8174. //>>excludeEnd("ctx");
  8175. },
  8176. //>>excludeStart("ide", pragmas.excludeIdeData);
  8177. args: ["aString"],
  8178. 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 ]",
  8179. referencedClasses: ["Array"],
  8180. //>>excludeEnd("ide");
  8181. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"]
  8182. }),
  8183. $globals.ReferencesBrowser);
  8184. $core.addMethod(
  8185. $core.method({
  8186. selector: "searchSelectorReferences",
  8187. protocol: 'actions',
  8188. fn: function (){
  8189. var self=this;
  8190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8191. return $core.withContext(function($ctx1) {
  8192. //>>excludeEnd("ctx");
  8193. var $1,$2;
  8194. $recv(self._classesAndMetaclasses())._do_((function(each){
  8195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8196. return $core.withContext(function($ctx2) {
  8197. //>>excludeEnd("ctx");
  8198. return $recv($recv(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  8199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8200. return $core.withContext(function($ctx3) {
  8201. //>>excludeEnd("ctx");
  8202. $1=$recv(key).__eq(self["@selector"]);
  8203. if($core.assert($1)){
  8204. $recv(self._implementors())._add_(value);
  8205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8206. $ctx3.sendIdx["add:"]=1;
  8207. //>>excludeEnd("ctx");
  8208. }
  8209. $2=$recv($recv(value)._messageSends())._includes_(self["@selector"]);
  8210. if($core.assert($2)){
  8211. return $recv(self._senders())._add_(value);
  8212. }
  8213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8214. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)});
  8215. //>>excludeEnd("ctx");
  8216. }));
  8217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8218. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8219. //>>excludeEnd("ctx");
  8220. }));
  8221. return self;
  8222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8223. }, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},$globals.ReferencesBrowser)});
  8224. //>>excludeEnd("ctx");
  8225. },
  8226. //>>excludeStart("ide", pragmas.excludeIdeData);
  8227. args: [],
  8228. 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 ]] ]",
  8229. referencedClasses: [],
  8230. //>>excludeEnd("ide");
  8231. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"]
  8232. }),
  8233. $globals.ReferencesBrowser);
  8234. $core.addMethod(
  8235. $core.method({
  8236. selector: "selector",
  8237. protocol: 'accessing',
  8238. fn: function (){
  8239. var self=this;
  8240. return self["@selector"];
  8241. },
  8242. //>>excludeStart("ide", pragmas.excludeIdeData);
  8243. args: [],
  8244. source: "selector\x0a\x09^ selector",
  8245. referencedClasses: [],
  8246. //>>excludeEnd("ide");
  8247. messageSends: []
  8248. }),
  8249. $globals.ReferencesBrowser);
  8250. $core.addMethod(
  8251. $core.method({
  8252. selector: "senders",
  8253. protocol: 'accessing',
  8254. fn: function (){
  8255. var self=this;
  8256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8257. return $core.withContext(function($ctx1) {
  8258. //>>excludeEnd("ctx");
  8259. var $1,$receiver;
  8260. $1=self["@senders"];
  8261. if(($receiver = $1) == null || $receiver.isNil){
  8262. self["@senders"]=$recv($globals.Array)._new();
  8263. return self["@senders"];
  8264. } else {
  8265. return $1;
  8266. }
  8267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8268. }, function($ctx1) {$ctx1.fill(self,"senders",{},$globals.ReferencesBrowser)});
  8269. //>>excludeEnd("ctx");
  8270. },
  8271. //>>excludeStart("ide", pragmas.excludeIdeData);
  8272. args: [],
  8273. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  8274. referencedClasses: ["Array"],
  8275. //>>excludeEnd("ide");
  8276. messageSends: ["ifNil:", "new"]
  8277. }),
  8278. $globals.ReferencesBrowser);
  8279. $core.addMethod(
  8280. $core.method({
  8281. selector: "setInputEvents",
  8282. protocol: 'private',
  8283. fn: function (){
  8284. var self=this;
  8285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8286. return $core.withContext(function($ctx1) {
  8287. //>>excludeEnd("ctx");
  8288. var $1,$2,$receiver;
  8289. $1=self["@input"];
  8290. $recv($1)._onKeyUp_((function(){
  8291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8292. return $core.withContext(function($ctx2) {
  8293. //>>excludeEnd("ctx");
  8294. self["@timer"]=$recv((function(){
  8295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8296. return $core.withContext(function($ctx3) {
  8297. //>>excludeEnd("ctx");
  8298. return self._search_($recv($recv(self["@input"])._asJQuery())._val());
  8299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8300. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8301. //>>excludeEnd("ctx");
  8302. }))._valueWithTimeout_((100));
  8303. return self["@timer"];
  8304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8305. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8306. //>>excludeEnd("ctx");
  8307. }));
  8308. $recv($1)._onKeyDown_((function(){
  8309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8310. return $core.withContext(function($ctx2) {
  8311. //>>excludeEnd("ctx");
  8312. $2=self["@timer"];
  8313. if(($receiver = $2) == null || $receiver.isNil){
  8314. return $2;
  8315. } else {
  8316. return $recv(self["@timer"])._clearTimeout();
  8317. }
  8318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8319. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  8320. //>>excludeEnd("ctx");
  8321. }));
  8322. return self;
  8323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8324. }, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},$globals.ReferencesBrowser)});
  8325. //>>excludeEnd("ctx");
  8326. },
  8327. //>>excludeStart("ide", pragmas.excludeIdeData);
  8328. args: [],
  8329. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  8330. referencedClasses: [],
  8331. //>>excludeEnd("ide");
  8332. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"]
  8333. }),
  8334. $globals.ReferencesBrowser);
  8335. $core.addMethod(
  8336. $core.method({
  8337. selector: "updateImplementorsList",
  8338. protocol: 'updating',
  8339. fn: function (){
  8340. var self=this;
  8341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8342. return $core.withContext(function($ctx1) {
  8343. //>>excludeEnd("ctx");
  8344. var $1,$6,$5,$4,$3,$2,$7,$8;
  8345. $recv(self["@implementorsList"])._contents_((function(html){
  8346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8347. return $core.withContext(function($ctx2) {
  8348. //>>excludeEnd("ctx");
  8349. $1=$recv(html)._li();
  8350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8351. $ctx2.sendIdx["li"]=1;
  8352. //>>excludeEnd("ctx");
  8353. $recv($1)._class_("column_label");
  8354. $6=self._implementors();
  8355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8356. $ctx2.sendIdx["implementors"]=1;
  8357. //>>excludeEnd("ctx");
  8358. $5=$recv($6)._size();
  8359. $4=$recv($5)._asString();
  8360. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8361. $ctx2.sendIdx["asString"]=1;
  8362. //>>excludeEnd("ctx");
  8363. $3="Implementors (".__comma($4);
  8364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8365. $ctx2.sendIdx[","]=2;
  8366. //>>excludeEnd("ctx");
  8367. $2=$recv($3).__comma(")");
  8368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8369. $ctx2.sendIdx[","]=1;
  8370. //>>excludeEnd("ctx");
  8371. $recv($1)._with_($2);
  8372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8373. $ctx2.sendIdx["with:"]=1;
  8374. //>>excludeEnd("ctx");
  8375. $recv($1)._style_("font-weight: bold");
  8376. return $recv(self._implementors())._do_((function(each){
  8377. var li;
  8378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8379. return $core.withContext(function($ctx3) {
  8380. //>>excludeEnd("ctx");
  8381. li=$recv(html)._li();
  8382. li;
  8383. $7=li;
  8384. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  8385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8386. $ctx3.sendIdx[","]=3;
  8387. //>>excludeEnd("ctx");
  8388. $recv($7)._with_($8);
  8389. return $recv($7)._onClick_((function(){
  8390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8391. return $core.withContext(function($ctx4) {
  8392. //>>excludeEnd("ctx");
  8393. return self._openBrowserOn_(each);
  8394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8395. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8396. //>>excludeEnd("ctx");
  8397. }));
  8398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8399. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  8400. //>>excludeEnd("ctx");
  8401. }));
  8402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8403. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8404. //>>excludeEnd("ctx");
  8405. }));
  8406. return self;
  8407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8408. }, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},$globals.ReferencesBrowser)});
  8409. //>>excludeEnd("ctx");
  8410. },
  8411. //>>excludeStart("ide", pragmas.excludeIdeData);
  8412. args: [],
  8413. 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 ]] ]",
  8414. referencedClasses: [],
  8415. //>>excludeEnd("ide");
  8416. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8417. }),
  8418. $globals.ReferencesBrowser);
  8419. $core.addMethod(
  8420. $core.method({
  8421. selector: "updateMatchesList",
  8422. protocol: 'updating',
  8423. fn: function (){
  8424. var self=this;
  8425. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8426. return $core.withContext(function($ctx1) {
  8427. //>>excludeEnd("ctx");
  8428. var $1,$6,$5,$4,$3,$2,$7,$8;
  8429. $recv(self["@matchesList"])._contents_((function(html){
  8430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8431. return $core.withContext(function($ctx2) {
  8432. //>>excludeEnd("ctx");
  8433. $1=$recv(html)._li();
  8434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8435. $ctx2.sendIdx["li"]=1;
  8436. //>>excludeEnd("ctx");
  8437. $recv($1)._class_("column_label");
  8438. $6=self._matches();
  8439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8440. $ctx2.sendIdx["matches"]=1;
  8441. //>>excludeEnd("ctx");
  8442. $5=$recv($6)._size();
  8443. $4=$recv($5)._asString();
  8444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8445. $ctx2.sendIdx["asString"]=1;
  8446. //>>excludeEnd("ctx");
  8447. $3="Regex matches (".__comma($4);
  8448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8449. $ctx2.sendIdx[","]=2;
  8450. //>>excludeEnd("ctx");
  8451. $2=$recv($3).__comma(")");
  8452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8453. $ctx2.sendIdx[","]=1;
  8454. //>>excludeEnd("ctx");
  8455. $recv($1)._with_($2);
  8456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8457. $ctx2.sendIdx["with:"]=1;
  8458. //>>excludeEnd("ctx");
  8459. $recv($1)._style_("font-weight: bold");
  8460. return $recv(self._matches())._do_((function(each){
  8461. var li;
  8462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8463. return $core.withContext(function($ctx3) {
  8464. //>>excludeEnd("ctx");
  8465. li=$recv(html)._li();
  8466. li;
  8467. $7=li;
  8468. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8470. $ctx3.sendIdx[","]=3;
  8471. //>>excludeEnd("ctx");
  8472. $recv($7)._with_($8);
  8473. return $recv($7)._onClick_((function(){
  8474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8475. return $core.withContext(function($ctx4) {
  8476. //>>excludeEnd("ctx");
  8477. return self._openBrowserOn_(each);
  8478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8479. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8480. //>>excludeEnd("ctx");
  8481. }));
  8482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8483. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  8484. //>>excludeEnd("ctx");
  8485. }));
  8486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8487. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8488. //>>excludeEnd("ctx");
  8489. }));
  8490. return self;
  8491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8492. }, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},$globals.ReferencesBrowser)});
  8493. //>>excludeEnd("ctx");
  8494. },
  8495. //>>excludeStart("ide", pragmas.excludeIdeData);
  8496. args: [],
  8497. 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 ]] ]",
  8498. referencedClasses: [],
  8499. //>>excludeEnd("ide");
  8500. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8501. }),
  8502. $globals.ReferencesBrowser);
  8503. $core.addMethod(
  8504. $core.method({
  8505. selector: "updateReferencedClassesList",
  8506. protocol: 'updating',
  8507. fn: function (){
  8508. var self=this;
  8509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8510. return $core.withContext(function($ctx1) {
  8511. //>>excludeEnd("ctx");
  8512. var $1,$6,$5,$4,$3,$2,$7,$8;
  8513. $recv(self["@referencedClassesList"])._contents_((function(html){
  8514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8515. return $core.withContext(function($ctx2) {
  8516. //>>excludeEnd("ctx");
  8517. $1=$recv(html)._li();
  8518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8519. $ctx2.sendIdx["li"]=1;
  8520. //>>excludeEnd("ctx");
  8521. $recv($1)._class_("column_label");
  8522. $6=self._referencedClasses();
  8523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8524. $ctx2.sendIdx["referencedClasses"]=1;
  8525. //>>excludeEnd("ctx");
  8526. $5=$recv($6)._size();
  8527. $4=$recv($5)._asString();
  8528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8529. $ctx2.sendIdx["asString"]=1;
  8530. //>>excludeEnd("ctx");
  8531. $3="Class references (".__comma($4);
  8532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8533. $ctx2.sendIdx[","]=2;
  8534. //>>excludeEnd("ctx");
  8535. $2=$recv($3).__comma(")");
  8536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8537. $ctx2.sendIdx[","]=1;
  8538. //>>excludeEnd("ctx");
  8539. $recv($1)._with_($2);
  8540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8541. $ctx2.sendIdx["with:"]=1;
  8542. //>>excludeEnd("ctx");
  8543. $recv($1)._style_("font-weight: bold");
  8544. return $recv(self._referencedClasses())._do_((function(each){
  8545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8546. return $core.withContext(function($ctx3) {
  8547. //>>excludeEnd("ctx");
  8548. $7=$recv(html)._li();
  8549. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8551. $ctx3.sendIdx[","]=3;
  8552. //>>excludeEnd("ctx");
  8553. $recv($7)._with_($8);
  8554. return $recv($7)._onClick_((function(){
  8555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8556. return $core.withContext(function($ctx4) {
  8557. //>>excludeEnd("ctx");
  8558. return self._openBrowserOn_(each);
  8559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8560. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8561. //>>excludeEnd("ctx");
  8562. }));
  8563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8564. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  8565. //>>excludeEnd("ctx");
  8566. }));
  8567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8568. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8569. //>>excludeEnd("ctx");
  8570. }));
  8571. return self;
  8572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8573. }, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},$globals.ReferencesBrowser)});
  8574. //>>excludeEnd("ctx");
  8575. },
  8576. //>>excludeStart("ide", pragmas.excludeIdeData);
  8577. args: [],
  8578. 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 ]] ]",
  8579. referencedClasses: [],
  8580. //>>excludeEnd("ide");
  8581. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8582. }),
  8583. $globals.ReferencesBrowser);
  8584. $core.addMethod(
  8585. $core.method({
  8586. selector: "updateSendersList",
  8587. protocol: 'updating',
  8588. fn: function (){
  8589. var self=this;
  8590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8591. return $core.withContext(function($ctx1) {
  8592. //>>excludeEnd("ctx");
  8593. var $1,$6,$5,$4,$3,$2,$7,$8;
  8594. $recv(self["@sendersList"])._contents_((function(html){
  8595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8596. return $core.withContext(function($ctx2) {
  8597. //>>excludeEnd("ctx");
  8598. $1=$recv(html)._li();
  8599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8600. $ctx2.sendIdx["li"]=1;
  8601. //>>excludeEnd("ctx");
  8602. $recv($1)._class_("column_label");
  8603. $6=self._senders();
  8604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8605. $ctx2.sendIdx["senders"]=1;
  8606. //>>excludeEnd("ctx");
  8607. $5=$recv($6)._size();
  8608. $4=$recv($5)._asString();
  8609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8610. $ctx2.sendIdx["asString"]=1;
  8611. //>>excludeEnd("ctx");
  8612. $3="Senders (".__comma($4);
  8613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8614. $ctx2.sendIdx[","]=2;
  8615. //>>excludeEnd("ctx");
  8616. $2=$recv($3).__comma(")");
  8617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8618. $ctx2.sendIdx[","]=1;
  8619. //>>excludeEnd("ctx");
  8620. $recv($1)._with_($2);
  8621. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8622. $ctx2.sendIdx["with:"]=1;
  8623. //>>excludeEnd("ctx");
  8624. $recv($1)._style_("font-weight: bold");
  8625. return $recv(self._senders())._do_((function(each){
  8626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8627. return $core.withContext(function($ctx3) {
  8628. //>>excludeEnd("ctx");
  8629. $7=$recv(html)._li();
  8630. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8632. $ctx3.sendIdx[","]=3;
  8633. //>>excludeEnd("ctx");
  8634. $recv($7)._with_($8);
  8635. return $recv($7)._onClick_((function(){
  8636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8637. return $core.withContext(function($ctx4) {
  8638. //>>excludeEnd("ctx");
  8639. return self._openBrowserOn_(each);
  8640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8641. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8642. //>>excludeEnd("ctx");
  8643. }));
  8644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8645. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  8646. //>>excludeEnd("ctx");
  8647. }));
  8648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8649. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8650. //>>excludeEnd("ctx");
  8651. }));
  8652. return self;
  8653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8654. }, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},$globals.ReferencesBrowser)});
  8655. //>>excludeEnd("ctx");
  8656. },
  8657. //>>excludeStart("ide", pragmas.excludeIdeData);
  8658. args: [],
  8659. 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 ]] ]",
  8660. referencedClasses: [],
  8661. //>>excludeEnd("ide");
  8662. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8663. }),
  8664. $globals.ReferencesBrowser);
  8665. $core.addMethod(
  8666. $core.method({
  8667. selector: "search:",
  8668. protocol: 'instance creation',
  8669. fn: function (aString){
  8670. var self=this;
  8671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8672. return $core.withContext(function($ctx1) {
  8673. //>>excludeEnd("ctx");
  8674. var $1;
  8675. $1=self._new();
  8676. $recv($1)._searchReferencesFor_(aString);
  8677. return $recv($1)._open();
  8678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8679. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.ReferencesBrowser.klass)});
  8680. //>>excludeEnd("ctx");
  8681. },
  8682. //>>excludeStart("ide", pragmas.excludeIdeData);
  8683. args: ["aString"],
  8684. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  8685. referencedClasses: [],
  8686. //>>excludeEnd("ide");
  8687. messageSends: ["searchReferencesFor:", "new", "open"]
  8688. }),
  8689. $globals.ReferencesBrowser.klass);
  8690. $core.addClass('TestRunner', $globals.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  8691. $core.addMethod(
  8692. $core.method({
  8693. selector: "allClasses",
  8694. protocol: 'accessing',
  8695. fn: function (){
  8696. var self=this;
  8697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8698. return $core.withContext(function($ctx1) {
  8699. //>>excludeEnd("ctx");
  8700. return $recv($recv($globals.TestCase)._allSubclasses())._select_((function(each){
  8701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8702. return $core.withContext(function($ctx2) {
  8703. //>>excludeEnd("ctx");
  8704. return $recv($recv(each)._isAbstract())._not();
  8705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8706. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8707. //>>excludeEnd("ctx");
  8708. }));
  8709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8710. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},$globals.TestRunner)});
  8711. //>>excludeEnd("ctx");
  8712. },
  8713. //>>excludeStart("ide", pragmas.excludeIdeData);
  8714. args: [],
  8715. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  8716. referencedClasses: ["TestCase"],
  8717. //>>excludeEnd("ide");
  8718. messageSends: ["select:", "allSubclasses", "not", "isAbstract"]
  8719. }),
  8720. $globals.TestRunner);
  8721. $core.addMethod(
  8722. $core.method({
  8723. selector: "classes",
  8724. protocol: 'accessing',
  8725. fn: function (){
  8726. var self=this;
  8727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8728. return $core.withContext(function($ctx1) {
  8729. //>>excludeEnd("ctx");
  8730. var $1;
  8731. return $recv($recv(self._allClasses())._select_((function(each){
  8732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8733. return $core.withContext(function($ctx2) {
  8734. //>>excludeEnd("ctx");
  8735. return $recv(self._selectedCategories())._includes_($recv(each)._category());
  8736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8737. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8738. //>>excludeEnd("ctx");
  8739. })))._sort_((function(a,b){
  8740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8741. return $core.withContext(function($ctx2) {
  8742. //>>excludeEnd("ctx");
  8743. $1=$recv(a)._name();
  8744. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8745. $ctx2.sendIdx["name"]=1;
  8746. //>>excludeEnd("ctx");
  8747. return $recv($1).__gt($recv(b)._name());
  8748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8749. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)});
  8750. //>>excludeEnd("ctx");
  8751. }));
  8752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8753. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.TestRunner)});
  8754. //>>excludeEnd("ctx");
  8755. },
  8756. //>>excludeStart("ide", pragmas.excludeIdeData);
  8757. args: [],
  8758. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  8759. referencedClasses: [],
  8760. //>>excludeEnd("ide");
  8761. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"]
  8762. }),
  8763. $globals.TestRunner);
  8764. $core.addMethod(
  8765. $core.method({
  8766. selector: "initialize",
  8767. protocol: 'initialization',
  8768. fn: function (){
  8769. var self=this;
  8770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8771. return $core.withContext(function($ctx1) {
  8772. //>>excludeEnd("ctx");
  8773. (
  8774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8775. $ctx1.supercall = true,
  8776. //>>excludeEnd("ctx");
  8777. ($globals.TestRunner.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  8778. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8779. $ctx1.supercall = false;
  8780. //>>excludeEnd("ctx");;
  8781. self["@result"]=$recv($globals.TestResult)._new();
  8782. return self;
  8783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8784. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.TestRunner)});
  8785. //>>excludeEnd("ctx");
  8786. },
  8787. //>>excludeStart("ide", pragmas.excludeIdeData);
  8788. args: [],
  8789. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  8790. referencedClasses: ["TestResult"],
  8791. //>>excludeEnd("ide");
  8792. messageSends: ["initialize", "new"]
  8793. }),
  8794. $globals.TestRunner);
  8795. $core.addMethod(
  8796. $core.method({
  8797. selector: "isSelectedCategory:",
  8798. protocol: 'testing',
  8799. fn: function (aCategory){
  8800. var self=this;
  8801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8802. return $core.withContext(function($ctx1) {
  8803. //>>excludeEnd("ctx");
  8804. return $recv(self._selectedCategories())._includes_(aCategory);
  8805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8806. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},$globals.TestRunner)});
  8807. //>>excludeEnd("ctx");
  8808. },
  8809. //>>excludeStart("ide", pragmas.excludeIdeData);
  8810. args: ["aCategory"],
  8811. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  8812. referencedClasses: [],
  8813. //>>excludeEnd("ide");
  8814. messageSends: ["includes:", "selectedCategories"]
  8815. }),
  8816. $globals.TestRunner);
  8817. $core.addMethod(
  8818. $core.method({
  8819. selector: "isSelectedClass:",
  8820. protocol: 'testing',
  8821. fn: function (aClass){
  8822. var self=this;
  8823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8824. return $core.withContext(function($ctx1) {
  8825. //>>excludeEnd("ctx");
  8826. return $recv(self._selectedClasses())._includes_(aClass);
  8827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8828. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},$globals.TestRunner)});
  8829. //>>excludeEnd("ctx");
  8830. },
  8831. //>>excludeStart("ide", pragmas.excludeIdeData);
  8832. args: ["aClass"],
  8833. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  8834. referencedClasses: [],
  8835. //>>excludeEnd("ide");
  8836. messageSends: ["includes:", "selectedClasses"]
  8837. }),
  8838. $globals.TestRunner);
  8839. $core.addMethod(
  8840. $core.method({
  8841. selector: "label",
  8842. protocol: 'accessing',
  8843. fn: function (){
  8844. var self=this;
  8845. return "SUnit";
  8846. },
  8847. //>>excludeStart("ide", pragmas.excludeIdeData);
  8848. args: [],
  8849. source: "label\x0a\x09^ 'SUnit'",
  8850. referencedClasses: [],
  8851. //>>excludeEnd("ide");
  8852. messageSends: []
  8853. }),
  8854. $globals.TestRunner);
  8855. $core.addMethod(
  8856. $core.method({
  8857. selector: "packages",
  8858. protocol: 'accessing',
  8859. fn: function (){
  8860. var self=this;
  8861. var packages;
  8862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8863. return $core.withContext(function($ctx1) {
  8864. //>>excludeEnd("ctx");
  8865. var $2,$3,$1;
  8866. packages=$recv($globals.Array)._new();
  8867. $recv(self._allClasses())._do_((function(each){
  8868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8869. return $core.withContext(function($ctx2) {
  8870. //>>excludeEnd("ctx");
  8871. $2=packages;
  8872. $3=$recv(each)._category();
  8873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8874. $ctx2.sendIdx["category"]=1;
  8875. //>>excludeEnd("ctx");
  8876. $1=$recv($2)._includes_($3);
  8877. if(!$core.assert($1)){
  8878. return $recv(packages)._add_($recv(each)._category());
  8879. }
  8880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8881. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8882. //>>excludeEnd("ctx");
  8883. }));
  8884. return $recv(packages)._sort();
  8885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8886. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},$globals.TestRunner)});
  8887. //>>excludeEnd("ctx");
  8888. },
  8889. //>>excludeStart("ide", pragmas.excludeIdeData);
  8890. args: [],
  8891. 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",
  8892. referencedClasses: ["Array"],
  8893. //>>excludeEnd("ide");
  8894. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"]
  8895. }),
  8896. $globals.TestRunner);
  8897. $core.addMethod(
  8898. $core.method({
  8899. selector: "performFailure:",
  8900. protocol: 'actions',
  8901. fn: function (aTestCase){
  8902. var self=this;
  8903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8904. return $core.withContext(function($ctx1) {
  8905. //>>excludeEnd("ctx");
  8906. $recv(aTestCase)._runCase();
  8907. return self;
  8908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8909. }, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},$globals.TestRunner)});
  8910. //>>excludeEnd("ctx");
  8911. },
  8912. //>>excludeStart("ide", pragmas.excludeIdeData);
  8913. args: ["aTestCase"],
  8914. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  8915. referencedClasses: [],
  8916. //>>excludeEnd("ide");
  8917. messageSends: ["runCase"]
  8918. }),
  8919. $globals.TestRunner);
  8920. $core.addMethod(
  8921. $core.method({
  8922. selector: "printErrors",
  8923. protocol: 'printing',
  8924. fn: function (){
  8925. var self=this;
  8926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8927. return $core.withContext(function($ctx1) {
  8928. //>>excludeEnd("ctx");
  8929. return $recv($recv($recv($recv(self._result())._errors())._size())._asString()).__comma(" errors, ");
  8930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8931. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},$globals.TestRunner)});
  8932. //>>excludeEnd("ctx");
  8933. },
  8934. //>>excludeStart("ide", pragmas.excludeIdeData);
  8935. args: [],
  8936. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  8937. referencedClasses: [],
  8938. //>>excludeEnd("ide");
  8939. messageSends: [",", "asString", "size", "errors", "result"]
  8940. }),
  8941. $globals.TestRunner);
  8942. $core.addMethod(
  8943. $core.method({
  8944. selector: "printFailures",
  8945. protocol: 'printing',
  8946. fn: function (){
  8947. var self=this;
  8948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8949. return $core.withContext(function($ctx1) {
  8950. //>>excludeEnd("ctx");
  8951. return $recv($recv($recv($recv(self._result())._failures())._size())._asString()).__comma(" failures");
  8952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8953. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},$globals.TestRunner)});
  8954. //>>excludeEnd("ctx");
  8955. },
  8956. //>>excludeStart("ide", pragmas.excludeIdeData);
  8957. args: [],
  8958. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  8959. referencedClasses: [],
  8960. //>>excludeEnd("ide");
  8961. messageSends: [",", "asString", "size", "failures", "result"]
  8962. }),
  8963. $globals.TestRunner);
  8964. $core.addMethod(
  8965. $core.method({
  8966. selector: "printPasses",
  8967. protocol: 'printing',
  8968. fn: function (){
  8969. var self=this;
  8970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8971. return $core.withContext(function($ctx1) {
  8972. //>>excludeEnd("ctx");
  8973. var $5,$4,$8,$7,$6,$3,$2,$1;
  8974. $5=self._result();
  8975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8976. $ctx1.sendIdx["result"]=1;
  8977. //>>excludeEnd("ctx");
  8978. $4=$recv($5)._runs();
  8979. $8=self._result();
  8980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8981. $ctx1.sendIdx["result"]=2;
  8982. //>>excludeEnd("ctx");
  8983. $7=$recv($8)._errors();
  8984. $6=$recv($7)._size();
  8985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8986. $ctx1.sendIdx["size"]=1;
  8987. //>>excludeEnd("ctx");
  8988. $3=$recv($4).__minus($6);
  8989. $2=$recv($3).__minus($recv($recv(self._result())._failures())._size());
  8990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8991. $ctx1.sendIdx["-"]=1;
  8992. //>>excludeEnd("ctx");
  8993. $1=$recv($2)._asString();
  8994. return $recv($1).__comma(" passes, ");
  8995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8996. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},$globals.TestRunner)});
  8997. //>>excludeEnd("ctx");
  8998. },
  8999. //>>excludeStart("ide", pragmas.excludeIdeData);
  9000. args: [],
  9001. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  9002. referencedClasses: [],
  9003. //>>excludeEnd("ide");
  9004. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"]
  9005. }),
  9006. $globals.TestRunner);
  9007. $core.addMethod(
  9008. $core.method({
  9009. selector: "printTotal",
  9010. protocol: 'printing',
  9011. fn: function (){
  9012. var self=this;
  9013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9014. return $core.withContext(function($ctx1) {
  9015. //>>excludeEnd("ctx");
  9016. return $recv($recv($recv(self._result())._total())._asString()).__comma(" runs, ");
  9017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9018. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},$globals.TestRunner)});
  9019. //>>excludeEnd("ctx");
  9020. },
  9021. //>>excludeStart("ide", pragmas.excludeIdeData);
  9022. args: [],
  9023. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  9024. referencedClasses: [],
  9025. //>>excludeEnd("ide");
  9026. messageSends: [",", "asString", "total", "result"]
  9027. }),
  9028. $globals.TestRunner);
  9029. $core.addMethod(
  9030. $core.method({
  9031. selector: "progressBar",
  9032. protocol: 'accessing',
  9033. fn: function (){
  9034. var self=this;
  9035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9036. return $core.withContext(function($ctx1) {
  9037. //>>excludeEnd("ctx");
  9038. var $1,$receiver;
  9039. $1=self["@progressBar"];
  9040. if(($receiver = $1) == null || $receiver.isNil){
  9041. self["@progressBar"]=$recv($globals.ProgressBar)._new();
  9042. return self["@progressBar"];
  9043. } else {
  9044. return $1;
  9045. }
  9046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9047. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},$globals.TestRunner)});
  9048. //>>excludeEnd("ctx");
  9049. },
  9050. //>>excludeStart("ide", pragmas.excludeIdeData);
  9051. args: [],
  9052. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  9053. referencedClasses: ["ProgressBar"],
  9054. //>>excludeEnd("ide");
  9055. messageSends: ["ifNil:", "new"]
  9056. }),
  9057. $globals.TestRunner);
  9058. $core.addMethod(
  9059. $core.method({
  9060. selector: "renderBoxOn:",
  9061. protocol: 'rendering',
  9062. fn: function (html){
  9063. var self=this;
  9064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9065. return $core.withContext(function($ctx1) {
  9066. //>>excludeEnd("ctx");
  9067. self._renderCategoriesOn_(html);
  9068. self._renderClassesOn_(html);
  9069. self._renderResultsOn_(html);
  9070. return self;
  9071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9072. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.TestRunner)});
  9073. //>>excludeEnd("ctx");
  9074. },
  9075. //>>excludeStart("ide", pragmas.excludeIdeData);
  9076. args: ["html"],
  9077. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  9078. referencedClasses: [],
  9079. //>>excludeEnd("ide");
  9080. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"]
  9081. }),
  9082. $globals.TestRunner);
  9083. $core.addMethod(
  9084. $core.method({
  9085. selector: "renderButtonsOn:",
  9086. protocol: 'rendering',
  9087. fn: function (html){
  9088. var self=this;
  9089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9090. return $core.withContext(function($ctx1) {
  9091. //>>excludeEnd("ctx");
  9092. var $1;
  9093. $1=$recv(html)._button();
  9094. $recv($1)._with_("Run selected");
  9095. $recv($1)._onClick_((function(){
  9096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9097. return $core.withContext(function($ctx2) {
  9098. //>>excludeEnd("ctx");
  9099. return self._run_(self._testCases());
  9100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9101. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9102. //>>excludeEnd("ctx");
  9103. }));
  9104. return self;
  9105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9106. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.TestRunner)});
  9107. //>>excludeEnd("ctx");
  9108. },
  9109. //>>excludeStart("ide", pragmas.excludeIdeData);
  9110. args: ["html"],
  9111. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  9112. referencedClasses: [],
  9113. //>>excludeEnd("ide");
  9114. messageSends: ["with:", "button", "onClick:", "run:", "testCases"]
  9115. }),
  9116. $globals.TestRunner);
  9117. $core.addMethod(
  9118. $core.method({
  9119. selector: "renderCategoriesOn:",
  9120. protocol: 'rendering',
  9121. fn: function (html){
  9122. var self=this;
  9123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9124. return $core.withContext(function($ctx1) {
  9125. //>>excludeEnd("ctx");
  9126. self["@packagesList"]=$recv($recv(html)._ul())._class_("amber_column sunit packages");
  9127. self._updateCategoriesList();
  9128. return self;
  9129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9130. }, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},$globals.TestRunner)});
  9131. //>>excludeEnd("ctx");
  9132. },
  9133. //>>excludeStart("ide", pragmas.excludeIdeData);
  9134. args: ["html"],
  9135. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  9136. referencedClasses: [],
  9137. //>>excludeEnd("ide");
  9138. messageSends: ["class:", "ul", "updateCategoriesList"]
  9139. }),
  9140. $globals.TestRunner);
  9141. $core.addMethod(
  9142. $core.method({
  9143. selector: "renderClassesOn:",
  9144. protocol: 'rendering',
  9145. fn: function (html){
  9146. var self=this;
  9147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9148. return $core.withContext(function($ctx1) {
  9149. //>>excludeEnd("ctx");
  9150. self["@classesList"]=$recv($recv(html)._ul())._class_("amber_column sunit classes");
  9151. self._updateClassesList();
  9152. return self;
  9153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9154. }, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},$globals.TestRunner)});
  9155. //>>excludeEnd("ctx");
  9156. },
  9157. //>>excludeStart("ide", pragmas.excludeIdeData);
  9158. args: ["html"],
  9159. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  9160. referencedClasses: [],
  9161. //>>excludeEnd("ide");
  9162. messageSends: ["class:", "ul", "updateClassesList"]
  9163. }),
  9164. $globals.TestRunner);
  9165. $core.addMethod(
  9166. $core.method({
  9167. selector: "renderErrorsOn:",
  9168. protocol: 'rendering',
  9169. fn: function (html){
  9170. var self=this;
  9171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9172. return $core.withContext(function($ctx1) {
  9173. //>>excludeEnd("ctx");
  9174. var $1,$2;
  9175. $recv($recv(self._result())._errors())._do_((function(each){
  9176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9177. return $core.withContext(function($ctx2) {
  9178. //>>excludeEnd("ctx");
  9179. $1=$recv(html)._li();
  9180. $recv($1)._class_("errors");
  9181. $2=$recv($recv($recv($recv(each)._class())._name()).__comma(" >> ")).__comma($recv(each)._selector());
  9182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9183. $ctx2.sendIdx[","]=1;
  9184. //>>excludeEnd("ctx");
  9185. $recv($1)._with_($2);
  9186. return $recv($1)._onClick_((function(){
  9187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9188. return $core.withContext(function($ctx3) {
  9189. //>>excludeEnd("ctx");
  9190. return self._performFailure_(each);
  9191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9192. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9193. //>>excludeEnd("ctx");
  9194. }));
  9195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9196. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9197. //>>excludeEnd("ctx");
  9198. }));
  9199. return self;
  9200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9201. }, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},$globals.TestRunner)});
  9202. //>>excludeEnd("ctx");
  9203. },
  9204. //>>excludeStart("ide", pragmas.excludeIdeData);
  9205. args: ["html"],
  9206. 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 ]]",
  9207. referencedClasses: [],
  9208. //>>excludeEnd("ide");
  9209. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"]
  9210. }),
  9211. $globals.TestRunner);
  9212. $core.addMethod(
  9213. $core.method({
  9214. selector: "renderFailuresOn:",
  9215. protocol: 'rendering',
  9216. fn: function (html){
  9217. var self=this;
  9218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9219. return $core.withContext(function($ctx1) {
  9220. //>>excludeEnd("ctx");
  9221. var $1,$2;
  9222. $recv($recv(self._result())._failures())._do_((function(each){
  9223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9224. return $core.withContext(function($ctx2) {
  9225. //>>excludeEnd("ctx");
  9226. $1=$recv(html)._li();
  9227. $recv($1)._class_("failures");
  9228. $2=$recv($recv($recv($recv(each)._class())._name()).__comma(" >> ")).__comma($recv(each)._selector());
  9229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9230. $ctx2.sendIdx[","]=1;
  9231. //>>excludeEnd("ctx");
  9232. $recv($1)._with_($2);
  9233. return $recv($1)._onClick_((function(){
  9234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9235. return $core.withContext(function($ctx3) {
  9236. //>>excludeEnd("ctx");
  9237. return self._performFailure_(each);
  9238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9239. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9240. //>>excludeEnd("ctx");
  9241. }));
  9242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9243. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9244. //>>excludeEnd("ctx");
  9245. }));
  9246. return self;
  9247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9248. }, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},$globals.TestRunner)});
  9249. //>>excludeEnd("ctx");
  9250. },
  9251. //>>excludeStart("ide", pragmas.excludeIdeData);
  9252. args: ["html"],
  9253. 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 ]]",
  9254. referencedClasses: [],
  9255. //>>excludeEnd("ide");
  9256. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"]
  9257. }),
  9258. $globals.TestRunner);
  9259. $core.addMethod(
  9260. $core.method({
  9261. selector: "renderResultsOn:",
  9262. protocol: 'rendering',
  9263. fn: function (html){
  9264. var self=this;
  9265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9266. return $core.withContext(function($ctx1) {
  9267. //>>excludeEnd("ctx");
  9268. self["@statusDiv"]=$recv(html)._div();
  9269. $recv(html)._with_(self._progressBar());
  9270. self["@methodsList"]=$recv($recv(html)._ul())._class_("amber_column sunit results");
  9271. self._updateMethodsList();
  9272. self._updateStatusDiv();
  9273. return self;
  9274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9275. }, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},$globals.TestRunner)});
  9276. //>>excludeEnd("ctx");
  9277. },
  9278. //>>excludeStart("ide", pragmas.excludeIdeData);
  9279. args: ["html"],
  9280. 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",
  9281. referencedClasses: [],
  9282. //>>excludeEnd("ide");
  9283. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"]
  9284. }),
  9285. $globals.TestRunner);
  9286. $core.addMethod(
  9287. $core.method({
  9288. selector: "result",
  9289. protocol: 'accessing',
  9290. fn: function (){
  9291. var self=this;
  9292. return self["@result"];
  9293. },
  9294. //>>excludeStart("ide", pragmas.excludeIdeData);
  9295. args: [],
  9296. source: "result\x0a\x09^ result",
  9297. referencedClasses: [],
  9298. //>>excludeEnd("ide");
  9299. messageSends: []
  9300. }),
  9301. $globals.TestRunner);
  9302. $core.addMethod(
  9303. $core.method({
  9304. selector: "run:",
  9305. protocol: 'actions',
  9306. fn: function (aCollection){
  9307. var self=this;
  9308. var worker;
  9309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9310. return $core.withContext(function($ctx1) {
  9311. //>>excludeEnd("ctx");
  9312. var $1;
  9313. worker=$recv($globals.TestSuiteRunner)._on_(aCollection);
  9314. self["@result"]=$recv(worker)._result();
  9315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9316. $ctx1.sendIdx["result"]=1;
  9317. //>>excludeEnd("ctx");
  9318. $recv($recv(worker)._announcer())._on_do_($globals.ResultAnnouncement,(function(ann){
  9319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9320. return $core.withContext(function($ctx2) {
  9321. //>>excludeEnd("ctx");
  9322. $1=$recv($recv(ann)._result()).__eq_eq(self["@result"]);
  9323. if($core.assert($1)){
  9324. $recv(self._progressBar())._updatePercent_($recv($recv($recv(self["@result"])._runs()).__slash($recv(self["@result"])._total())).__star((100)));
  9325. self._updateStatusDiv();
  9326. return self._updateMethodsList();
  9327. }
  9328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9329. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)});
  9330. //>>excludeEnd("ctx");
  9331. }));
  9332. $recv(worker)._run();
  9333. return self;
  9334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9335. }, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},$globals.TestRunner)});
  9336. //>>excludeEnd("ctx");
  9337. },
  9338. //>>excludeStart("ide", pragmas.excludeIdeData);
  9339. args: ["aCollection"],
  9340. 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",
  9341. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"],
  9342. //>>excludeEnd("ide");
  9343. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"]
  9344. }),
  9345. $globals.TestRunner);
  9346. $core.addMethod(
  9347. $core.method({
  9348. selector: "selectAllCategories",
  9349. protocol: 'actions',
  9350. fn: function (){
  9351. var self=this;
  9352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9353. return $core.withContext(function($ctx1) {
  9354. //>>excludeEnd("ctx");
  9355. var $1;
  9356. $recv(self._packages())._do_((function(each){
  9357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9358. return $core.withContext(function($ctx2) {
  9359. //>>excludeEnd("ctx");
  9360. $1=$recv(self["@selectedCategories"])._includes_(each);
  9361. if(!$core.assert($1)){
  9362. return $recv(self._selectedCategories())._add_(each);
  9363. }
  9364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9365. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9366. //>>excludeEnd("ctx");
  9367. }));
  9368. self._updateCategoriesList();
  9369. self._updateClassesList();
  9370. return self;
  9371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9372. }, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},$globals.TestRunner)});
  9373. //>>excludeEnd("ctx");
  9374. },
  9375. //>>excludeStart("ide", pragmas.excludeIdeData);
  9376. args: [],
  9377. 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",
  9378. referencedClasses: [],
  9379. //>>excludeEnd("ide");
  9380. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"]
  9381. }),
  9382. $globals.TestRunner);
  9383. $core.addMethod(
  9384. $core.method({
  9385. selector: "selectAllClasses",
  9386. protocol: 'actions',
  9387. fn: function (){
  9388. var self=this;
  9389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9390. return $core.withContext(function($ctx1) {
  9391. //>>excludeEnd("ctx");
  9392. var $1;
  9393. $recv(self._classes())._do_((function(each){
  9394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9395. return $core.withContext(function($ctx2) {
  9396. //>>excludeEnd("ctx");
  9397. $1=$recv(self["@selectedClasses"])._includes_(each);
  9398. if(!$core.assert($1)){
  9399. return $recv(self._selectedClasses())._add_(each);
  9400. }
  9401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9402. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9403. //>>excludeEnd("ctx");
  9404. }));
  9405. self._updateCategoriesList();
  9406. self._updateClassesList();
  9407. return self;
  9408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9409. }, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},$globals.TestRunner)});
  9410. //>>excludeEnd("ctx");
  9411. },
  9412. //>>excludeStart("ide", pragmas.excludeIdeData);
  9413. args: [],
  9414. 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",
  9415. referencedClasses: [],
  9416. //>>excludeEnd("ide");
  9417. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"]
  9418. }),
  9419. $globals.TestRunner);
  9420. $core.addMethod(
  9421. $core.method({
  9422. selector: "selectedCategories",
  9423. protocol: 'accessing',
  9424. fn: function (){
  9425. var self=this;
  9426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9427. return $core.withContext(function($ctx1) {
  9428. //>>excludeEnd("ctx");
  9429. var $1,$receiver;
  9430. $1=self["@selectedCategories"];
  9431. if(($receiver = $1) == null || $receiver.isNil){
  9432. self["@selectedCategories"]=$recv($globals.Array)._new();
  9433. return self["@selectedCategories"];
  9434. } else {
  9435. return $1;
  9436. }
  9437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9438. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},$globals.TestRunner)});
  9439. //>>excludeEnd("ctx");
  9440. },
  9441. //>>excludeStart("ide", pragmas.excludeIdeData);
  9442. args: [],
  9443. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  9444. referencedClasses: ["Array"],
  9445. //>>excludeEnd("ide");
  9446. messageSends: ["ifNil:", "new"]
  9447. }),
  9448. $globals.TestRunner);
  9449. $core.addMethod(
  9450. $core.method({
  9451. selector: "selectedClasses",
  9452. protocol: 'accessing',
  9453. fn: function (){
  9454. var self=this;
  9455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9456. return $core.withContext(function($ctx1) {
  9457. //>>excludeEnd("ctx");
  9458. var $1,$receiver;
  9459. $1=self["@selectedClasses"];
  9460. if(($receiver = $1) == null || $receiver.isNil){
  9461. self["@selectedClasses"]=$recv($globals.Array)._new();
  9462. return self["@selectedClasses"];
  9463. } else {
  9464. return $1;
  9465. }
  9466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9467. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},$globals.TestRunner)});
  9468. //>>excludeEnd("ctx");
  9469. },
  9470. //>>excludeStart("ide", pragmas.excludeIdeData);
  9471. args: [],
  9472. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  9473. referencedClasses: ["Array"],
  9474. //>>excludeEnd("ide");
  9475. messageSends: ["ifNil:", "new"]
  9476. }),
  9477. $globals.TestRunner);
  9478. $core.addMethod(
  9479. $core.method({
  9480. selector: "statusInfo",
  9481. protocol: 'accessing',
  9482. fn: function (){
  9483. var self=this;
  9484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9485. return $core.withContext(function($ctx1) {
  9486. //>>excludeEnd("ctx");
  9487. var $2,$1;
  9488. $2=$recv($recv(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  9489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9490. $ctx1.sendIdx[","]=2;
  9491. //>>excludeEnd("ctx");
  9492. $1=$recv($2).__comma(self._printFailures());
  9493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9494. $ctx1.sendIdx[","]=1;
  9495. //>>excludeEnd("ctx");
  9496. return $1;
  9497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9498. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},$globals.TestRunner)});
  9499. //>>excludeEnd("ctx");
  9500. },
  9501. //>>excludeStart("ide", pragmas.excludeIdeData);
  9502. args: [],
  9503. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  9504. referencedClasses: [],
  9505. //>>excludeEnd("ide");
  9506. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"]
  9507. }),
  9508. $globals.TestRunner);
  9509. $core.addMethod(
  9510. $core.method({
  9511. selector: "testCases",
  9512. protocol: 'accessing',
  9513. fn: function (){
  9514. var self=this;
  9515. var testCases;
  9516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9517. return $core.withContext(function($ctx1) {
  9518. //>>excludeEnd("ctx");
  9519. testCases=[];
  9520. $recv($recv(self._selectedClasses())._select_((function(each){
  9521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9522. return $core.withContext(function($ctx2) {
  9523. //>>excludeEnd("ctx");
  9524. return $recv(self._selectedCategories())._includes_($recv(each)._category());
  9525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9526. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9527. //>>excludeEnd("ctx");
  9528. })))._do_((function(each){
  9529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9530. return $core.withContext(function($ctx2) {
  9531. //>>excludeEnd("ctx");
  9532. return $recv(testCases)._addAll_($recv(each)._buildSuite());
  9533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9534. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  9535. //>>excludeEnd("ctx");
  9536. }));
  9537. return testCases;
  9538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9539. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},$globals.TestRunner)});
  9540. //>>excludeEnd("ctx");
  9541. },
  9542. //>>excludeStart("ide", pragmas.excludeIdeData);
  9543. args: [],
  9544. 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",
  9545. referencedClasses: [],
  9546. //>>excludeEnd("ide");
  9547. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"]
  9548. }),
  9549. $globals.TestRunner);
  9550. $core.addMethod(
  9551. $core.method({
  9552. selector: "toggleCategory:",
  9553. protocol: 'actions',
  9554. fn: function (aCategory){
  9555. var self=this;
  9556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9557. return $core.withContext(function($ctx1) {
  9558. //>>excludeEnd("ctx");
  9559. var $1;
  9560. $1=self._isSelectedCategory_(aCategory);
  9561. if($core.assert($1)){
  9562. $recv(self["@selectedCategories"])._remove_(aCategory);
  9563. } else {
  9564. $recv(self["@selectedCategories"])._add_(aCategory);
  9565. }
  9566. self._updateCategoriesList();
  9567. self._updateClassesList();
  9568. return self;
  9569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9570. }, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},$globals.TestRunner)});
  9571. //>>excludeEnd("ctx");
  9572. },
  9573. //>>excludeStart("ide", pragmas.excludeIdeData);
  9574. args: ["aCategory"],
  9575. 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",
  9576. referencedClasses: [],
  9577. //>>excludeEnd("ide");
  9578. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"]
  9579. }),
  9580. $globals.TestRunner);
  9581. $core.addMethod(
  9582. $core.method({
  9583. selector: "toggleClass:",
  9584. protocol: 'actions',
  9585. fn: function (aClass){
  9586. var self=this;
  9587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9588. return $core.withContext(function($ctx1) {
  9589. //>>excludeEnd("ctx");
  9590. var $1;
  9591. $1=self._isSelectedClass_(aClass);
  9592. if($core.assert($1)){
  9593. $recv(self["@selectedClasses"])._remove_(aClass);
  9594. } else {
  9595. $recv(self["@selectedClasses"])._add_(aClass);
  9596. }
  9597. self._updateClassesList();
  9598. return self;
  9599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9600. }, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},$globals.TestRunner)});
  9601. //>>excludeEnd("ctx");
  9602. },
  9603. //>>excludeStart("ide", pragmas.excludeIdeData);
  9604. args: ["aClass"],
  9605. 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",
  9606. referencedClasses: [],
  9607. //>>excludeEnd("ide");
  9608. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"]
  9609. }),
  9610. $globals.TestRunner);
  9611. $core.addMethod(
  9612. $core.method({
  9613. selector: "updateCategoriesList",
  9614. protocol: 'updating',
  9615. fn: function (){
  9616. var self=this;
  9617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9618. return $core.withContext(function($ctx1) {
  9619. //>>excludeEnd("ctx");
  9620. var $1,$2,$3,$4;
  9621. $recv(self["@packagesList"])._contents_((function(html){
  9622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9623. return $core.withContext(function($ctx2) {
  9624. //>>excludeEnd("ctx");
  9625. $1=$recv(html)._li();
  9626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9627. $ctx2.sendIdx["li"]=1;
  9628. //>>excludeEnd("ctx");
  9629. $recv($1)._class_("all");
  9630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9631. $ctx2.sendIdx["class:"]=1;
  9632. //>>excludeEnd("ctx");
  9633. $recv($1)._with_("All");
  9634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9635. $ctx2.sendIdx["with:"]=1;
  9636. //>>excludeEnd("ctx");
  9637. $2=$recv($1)._onClick_((function(){
  9638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9639. return $core.withContext(function($ctx3) {
  9640. //>>excludeEnd("ctx");
  9641. return self._selectAllCategories();
  9642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9643. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9644. //>>excludeEnd("ctx");
  9645. }));
  9646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9647. $ctx2.sendIdx["onClick:"]=1;
  9648. //>>excludeEnd("ctx");
  9649. $2;
  9650. return $recv(self._packages())._do_((function(each){
  9651. var li;
  9652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9653. return $core.withContext(function($ctx3) {
  9654. //>>excludeEnd("ctx");
  9655. li=$recv(html)._li();
  9656. li;
  9657. $3=$recv(self._selectedCategories())._includes_(each);
  9658. if($core.assert($3)){
  9659. $recv(li)._class_("selected");
  9660. }
  9661. $4=li;
  9662. $recv($4)._with_(each);
  9663. return $recv($4)._onClick_((function(){
  9664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9665. return $core.withContext(function($ctx4) {
  9666. //>>excludeEnd("ctx");
  9667. return self._toggleCategory_(each);
  9668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9669. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9670. //>>excludeEnd("ctx");
  9671. }));
  9672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9673. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)});
  9674. //>>excludeEnd("ctx");
  9675. }));
  9676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9677. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9678. //>>excludeEnd("ctx");
  9679. }));
  9680. return self;
  9681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9682. }, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},$globals.TestRunner)});
  9683. //>>excludeEnd("ctx");
  9684. },
  9685. //>>excludeStart("ide", pragmas.excludeIdeData);
  9686. args: [],
  9687. 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 ]] ]",
  9688. referencedClasses: [],
  9689. //>>excludeEnd("ide");
  9690. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"]
  9691. }),
  9692. $globals.TestRunner);
  9693. $core.addMethod(
  9694. $core.method({
  9695. selector: "updateClassesList",
  9696. protocol: 'updating',
  9697. fn: function (){
  9698. var self=this;
  9699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9700. return $core.withContext(function($ctx1) {
  9701. //>>excludeEnd("ctx");
  9702. var $1,$2,$3,$4;
  9703. $recv(self["@classesList"])._contents_((function(html){
  9704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9705. return $core.withContext(function($ctx2) {
  9706. //>>excludeEnd("ctx");
  9707. $recv(self._selectedCategories())._ifNotEmpty_((function(){
  9708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9709. return $core.withContext(function($ctx3) {
  9710. //>>excludeEnd("ctx");
  9711. $1=$recv(html)._li();
  9712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9713. $ctx3.sendIdx["li"]=1;
  9714. //>>excludeEnd("ctx");
  9715. $recv($1)._class_("all");
  9716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9717. $ctx3.sendIdx["class:"]=1;
  9718. //>>excludeEnd("ctx");
  9719. $recv($1)._with_("All");
  9720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9721. $ctx3.sendIdx["with:"]=1;
  9722. //>>excludeEnd("ctx");
  9723. $2=$recv($1)._onClick_((function(){
  9724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9725. return $core.withContext(function($ctx4) {
  9726. //>>excludeEnd("ctx");
  9727. return self._selectAllClasses();
  9728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9729. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  9730. //>>excludeEnd("ctx");
  9731. }));
  9732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9733. $ctx3.sendIdx["onClick:"]=1;
  9734. //>>excludeEnd("ctx");
  9735. return $2;
  9736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9737. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9738. //>>excludeEnd("ctx");
  9739. }));
  9740. return $recv(self._classes())._do_((function(each){
  9741. var li;
  9742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9743. return $core.withContext(function($ctx3) {
  9744. //>>excludeEnd("ctx");
  9745. li=$recv(html)._li();
  9746. li;
  9747. $3=$recv(self._selectedClasses())._includes_(each);
  9748. if($core.assert($3)){
  9749. $recv(li)._class_("selected");
  9750. }
  9751. $4=li;
  9752. $recv($4)._with_($recv(each)._name());
  9753. return $recv($4)._onClick_((function(){
  9754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9755. return $core.withContext(function($ctx4) {
  9756. //>>excludeEnd("ctx");
  9757. return self._toggleClass_(each);
  9758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9759. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
  9760. //>>excludeEnd("ctx");
  9761. }));
  9762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9763. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)});
  9764. //>>excludeEnd("ctx");
  9765. }));
  9766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9767. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9768. //>>excludeEnd("ctx");
  9769. }));
  9770. return self;
  9771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9772. }, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},$globals.TestRunner)});
  9773. //>>excludeEnd("ctx");
  9774. },
  9775. //>>excludeStart("ide", pragmas.excludeIdeData);
  9776. args: [],
  9777. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09self selectedCategories ifNotEmpty: [\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 ]] ]",
  9778. referencedClasses: [],
  9779. //>>excludeEnd("ide");
  9780. messageSends: ["contents:", "ifNotEmpty:", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"]
  9781. }),
  9782. $globals.TestRunner);
  9783. $core.addMethod(
  9784. $core.method({
  9785. selector: "updateMethodsList",
  9786. protocol: 'updating',
  9787. fn: function (){
  9788. var self=this;
  9789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9790. return $core.withContext(function($ctx1) {
  9791. //>>excludeEnd("ctx");
  9792. $recv(self["@methodsList"])._contents_((function(html){
  9793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9794. return $core.withContext(function($ctx2) {
  9795. //>>excludeEnd("ctx");
  9796. self._renderErrorsOn_(html);
  9797. return self._renderFailuresOn_(html);
  9798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9799. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9800. //>>excludeEnd("ctx");
  9801. }));
  9802. return self;
  9803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9804. }, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},$globals.TestRunner)});
  9805. //>>excludeEnd("ctx");
  9806. },
  9807. //>>excludeStart("ide", pragmas.excludeIdeData);
  9808. args: [],
  9809. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  9810. referencedClasses: [],
  9811. //>>excludeEnd("ide");
  9812. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"]
  9813. }),
  9814. $globals.TestRunner);
  9815. $core.addMethod(
  9816. $core.method({
  9817. selector: "updateStatusDiv",
  9818. protocol: 'updating',
  9819. fn: function (){
  9820. var self=this;
  9821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9822. return $core.withContext(function($ctx1) {
  9823. //>>excludeEnd("ctx");
  9824. $recv(self["@statusDiv"])._class_("sunit status ".__comma($recv(self["@result"])._status()));
  9825. $recv(self["@statusDiv"])._contents_((function(html){
  9826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9827. return $core.withContext(function($ctx2) {
  9828. //>>excludeEnd("ctx");
  9829. return $recv($recv(html)._span())._with_(self._statusInfo());
  9830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9831. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9832. //>>excludeEnd("ctx");
  9833. }));
  9834. return self;
  9835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9836. }, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},$globals.TestRunner)});
  9837. //>>excludeEnd("ctx");
  9838. },
  9839. //>>excludeStart("ide", pragmas.excludeIdeData);
  9840. args: [],
  9841. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  9842. referencedClasses: [],
  9843. //>>excludeEnd("ide");
  9844. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"]
  9845. }),
  9846. $globals.TestRunner);
  9847. $core.addClass('Workspace', $globals.TabWidget, ['sourceArea'], 'IDE');
  9848. $core.addMethod(
  9849. $core.method({
  9850. selector: "clearWorkspace",
  9851. protocol: 'actions',
  9852. fn: function (){
  9853. var self=this;
  9854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9855. return $core.withContext(function($ctx1) {
  9856. //>>excludeEnd("ctx");
  9857. $recv(self["@sourceArea"])._clear();
  9858. return self;
  9859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9860. }, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},$globals.Workspace)});
  9861. //>>excludeEnd("ctx");
  9862. },
  9863. //>>excludeStart("ide", pragmas.excludeIdeData);
  9864. args: [],
  9865. source: "clearWorkspace\x0a\x09sourceArea clear",
  9866. referencedClasses: [],
  9867. //>>excludeEnd("ide");
  9868. messageSends: ["clear"]
  9869. }),
  9870. $globals.Workspace);
  9871. $core.addMethod(
  9872. $core.method({
  9873. selector: "doIt",
  9874. protocol: 'actions',
  9875. fn: function (){
  9876. var self=this;
  9877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9878. return $core.withContext(function($ctx1) {
  9879. //>>excludeEnd("ctx");
  9880. $recv(self["@sourceArea"])._doIt();
  9881. return self;
  9882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9883. }, function($ctx1) {$ctx1.fill(self,"doIt",{},$globals.Workspace)});
  9884. //>>excludeEnd("ctx");
  9885. },
  9886. //>>excludeStart("ide", pragmas.excludeIdeData);
  9887. args: [],
  9888. source: "doIt\x0a\x09sourceArea doIt",
  9889. referencedClasses: [],
  9890. //>>excludeEnd("ide");
  9891. messageSends: ["doIt"]
  9892. }),
  9893. $globals.Workspace);
  9894. $core.addMethod(
  9895. $core.method({
  9896. selector: "fileIn",
  9897. protocol: 'actions',
  9898. fn: function (){
  9899. var self=this;
  9900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9901. return $core.withContext(function($ctx1) {
  9902. //>>excludeEnd("ctx");
  9903. $recv(self["@sourceArea"])._fileIn();
  9904. return self;
  9905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9906. }, function($ctx1) {$ctx1.fill(self,"fileIn",{},$globals.Workspace)});
  9907. //>>excludeEnd("ctx");
  9908. },
  9909. //>>excludeStart("ide", pragmas.excludeIdeData);
  9910. args: [],
  9911. source: "fileIn\x0a\x09sourceArea fileIn",
  9912. referencedClasses: [],
  9913. //>>excludeEnd("ide");
  9914. messageSends: ["fileIn"]
  9915. }),
  9916. $globals.Workspace);
  9917. $core.addMethod(
  9918. $core.method({
  9919. selector: "inspectIt",
  9920. protocol: 'actions',
  9921. fn: function (){
  9922. var self=this;
  9923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9924. return $core.withContext(function($ctx1) {
  9925. //>>excludeEnd("ctx");
  9926. $recv(self["@sourceArea"])._inspectIt();
  9927. return self;
  9928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9929. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.Workspace)});
  9930. //>>excludeEnd("ctx");
  9931. },
  9932. //>>excludeStart("ide", pragmas.excludeIdeData);
  9933. args: [],
  9934. source: "inspectIt\x0a\x09sourceArea inspectIt",
  9935. referencedClasses: [],
  9936. //>>excludeEnd("ide");
  9937. messageSends: ["inspectIt"]
  9938. }),
  9939. $globals.Workspace);
  9940. $core.addMethod(
  9941. $core.method({
  9942. selector: "label",
  9943. protocol: 'accessing',
  9944. fn: function (){
  9945. var self=this;
  9946. return "Workspace";
  9947. },
  9948. //>>excludeStart("ide", pragmas.excludeIdeData);
  9949. args: [],
  9950. source: "label\x0a\x09^ 'Workspace'",
  9951. referencedClasses: [],
  9952. //>>excludeEnd("ide");
  9953. messageSends: []
  9954. }),
  9955. $globals.Workspace);
  9956. $core.addMethod(
  9957. $core.method({
  9958. selector: "printIt",
  9959. protocol: 'actions',
  9960. fn: function (){
  9961. var self=this;
  9962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9963. return $core.withContext(function($ctx1) {
  9964. //>>excludeEnd("ctx");
  9965. $recv(self["@sourceArea"])._printIt();
  9966. return self;
  9967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9968. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.Workspace)});
  9969. //>>excludeEnd("ctx");
  9970. },
  9971. //>>excludeStart("ide", pragmas.excludeIdeData);
  9972. args: [],
  9973. source: "printIt\x0a\x09sourceArea printIt",
  9974. referencedClasses: [],
  9975. //>>excludeEnd("ide");
  9976. messageSends: ["printIt"]
  9977. }),
  9978. $globals.Workspace);
  9979. $core.addMethod(
  9980. $core.method({
  9981. selector: "renderBoxOn:",
  9982. protocol: 'rendering',
  9983. fn: function (html){
  9984. var self=this;
  9985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9986. return $core.withContext(function($ctx1) {
  9987. //>>excludeEnd("ctx");
  9988. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  9989. $recv(self["@sourceArea"])._renderOn_(html);
  9990. return self;
  9991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9992. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Workspace)});
  9993. //>>excludeEnd("ctx");
  9994. },
  9995. //>>excludeStart("ide", pragmas.excludeIdeData);
  9996. args: ["html"],
  9997. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  9998. referencedClasses: ["SourceArea"],
  9999. //>>excludeEnd("ide");
  10000. messageSends: ["new", "renderOn:"]
  10001. }),
  10002. $globals.Workspace);
  10003. $core.addMethod(
  10004. $core.method({
  10005. selector: "renderButtonsOn:",
  10006. protocol: 'rendering',
  10007. fn: function (html){
  10008. var self=this;
  10009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10010. return $core.withContext(function($ctx1) {
  10011. //>>excludeEnd("ctx");
  10012. var $1,$2,$3,$4,$5,$6,$7,$8,$9;
  10013. $1=$recv(html)._button();
  10014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10015. $ctx1.sendIdx["button"]=1;
  10016. //>>excludeEnd("ctx");
  10017. $recv($1)._with_("DoIt");
  10018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10019. $ctx1.sendIdx["with:"]=1;
  10020. //>>excludeEnd("ctx");
  10021. $recv($1)._title_("ctrl+d");
  10022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10023. $ctx1.sendIdx["title:"]=1;
  10024. //>>excludeEnd("ctx");
  10025. $2=$recv($1)._onClick_((function(){
  10026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10027. return $core.withContext(function($ctx2) {
  10028. //>>excludeEnd("ctx");
  10029. return self._doIt();
  10030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10031. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10032. //>>excludeEnd("ctx");
  10033. }));
  10034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10035. $ctx1.sendIdx["onClick:"]=1;
  10036. //>>excludeEnd("ctx");
  10037. $3=$recv(html)._button();
  10038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10039. $ctx1.sendIdx["button"]=2;
  10040. //>>excludeEnd("ctx");
  10041. $recv($3)._with_("PrintIt");
  10042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10043. $ctx1.sendIdx["with:"]=2;
  10044. //>>excludeEnd("ctx");
  10045. $recv($3)._title_("ctrl+p");
  10046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10047. $ctx1.sendIdx["title:"]=2;
  10048. //>>excludeEnd("ctx");
  10049. $4=$recv($3)._onClick_((function(){
  10050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10051. return $core.withContext(function($ctx2) {
  10052. //>>excludeEnd("ctx");
  10053. return self._printIt();
  10054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10055. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10056. //>>excludeEnd("ctx");
  10057. }));
  10058. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10059. $ctx1.sendIdx["onClick:"]=2;
  10060. //>>excludeEnd("ctx");
  10061. $5=$recv(html)._button();
  10062. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10063. $ctx1.sendIdx["button"]=3;
  10064. //>>excludeEnd("ctx");
  10065. $recv($5)._with_("InspectIt");
  10066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10067. $ctx1.sendIdx["with:"]=3;
  10068. //>>excludeEnd("ctx");
  10069. $recv($5)._title_("ctrl+i");
  10070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10071. $ctx1.sendIdx["title:"]=3;
  10072. //>>excludeEnd("ctx");
  10073. $6=$recv($5)._onClick_((function(){
  10074. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10075. return $core.withContext(function($ctx2) {
  10076. //>>excludeEnd("ctx");
  10077. return self._inspectIt();
  10078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10079. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10080. //>>excludeEnd("ctx");
  10081. }));
  10082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10083. $ctx1.sendIdx["onClick:"]=3;
  10084. //>>excludeEnd("ctx");
  10085. $7=$recv(html)._button();
  10086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10087. $ctx1.sendIdx["button"]=4;
  10088. //>>excludeEnd("ctx");
  10089. $recv($7)._with_("FileIn");
  10090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10091. $ctx1.sendIdx["with:"]=4;
  10092. //>>excludeEnd("ctx");
  10093. $recv($7)._title_("ctrl+f");
  10094. $8=$recv($7)._onClick_((function(){
  10095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10096. return $core.withContext(function($ctx2) {
  10097. //>>excludeEnd("ctx");
  10098. return self._fileIn();
  10099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10100. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  10101. //>>excludeEnd("ctx");
  10102. }));
  10103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10104. $ctx1.sendIdx["onClick:"]=4;
  10105. //>>excludeEnd("ctx");
  10106. $9=$recv(html)._button();
  10107. $recv($9)._with_("Clear workspace");
  10108. $recv($9)._onClick_((function(){
  10109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10110. return $core.withContext(function($ctx2) {
  10111. //>>excludeEnd("ctx");
  10112. return self._clearWorkspace();
  10113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10114. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  10115. //>>excludeEnd("ctx");
  10116. }));
  10117. return self;
  10118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10119. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Workspace)});
  10120. //>>excludeEnd("ctx");
  10121. },
  10122. //>>excludeStart("ide", pragmas.excludeIdeData);
  10123. args: ["html"],
  10124. 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 ]",
  10125. referencedClasses: [],
  10126. //>>excludeEnd("ide");
  10127. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"]
  10128. }),
  10129. $globals.Workspace);
  10130. $core.addMethod(
  10131. $core.method({
  10132. selector: "show",
  10133. protocol: 'actions',
  10134. fn: function (){
  10135. var self=this;
  10136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10137. return $core.withContext(function($ctx1) {
  10138. //>>excludeEnd("ctx");
  10139. (
  10140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10141. $ctx1.supercall = true,
  10142. //>>excludeEnd("ctx");
  10143. ($globals.Workspace.superclass||$boot.nilAsClass).fn.prototype._show.apply($recv(self), []));
  10144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10145. $ctx1.supercall = false;
  10146. //>>excludeEnd("ctx");;
  10147. $recv(self["@sourceArea"])._focus();
  10148. return self;
  10149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10150. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.Workspace)});
  10151. //>>excludeEnd("ctx");
  10152. },
  10153. //>>excludeStart("ide", pragmas.excludeIdeData);
  10154. args: [],
  10155. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  10156. referencedClasses: [],
  10157. //>>excludeEnd("ide");
  10158. messageSends: ["show", "focus"]
  10159. }),
  10160. $globals.Workspace);
  10161. });