IDE.js 365 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673
  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. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  10. $core.addPackage('IDE');
  11. $core.packages["IDE"].innerEval = function (expr) { return eval(expr); };
  12. $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"];
  13. $core.packages["IDE"].transport = {"type":"amd","amdNamespace":"amber/legacy"};
  14. $core.addClass('ClassesList', $globals.Widget, ['browser', 'ul', 'nodes'], 'IDE');
  15. $core.addMethod(
  16. $core.method({
  17. selector: "browser",
  18. protocol: 'accessing',
  19. fn: function (){
  20. var self=this;
  21. return self["@browser"];
  22. },
  23. //>>excludeStart("ide", pragmas.excludeIdeData);
  24. args: [],
  25. source: "browser\x0a\x09^ browser",
  26. referencedClasses: [],
  27. //>>excludeEnd("ide");
  28. messageSends: []
  29. }),
  30. $globals.ClassesList);
  31. $core.addMethod(
  32. $core.method({
  33. selector: "browser:",
  34. protocol: 'accessing',
  35. fn: function (aBrowser){
  36. var self=this;
  37. self["@browser"]=aBrowser;
  38. return self;
  39. },
  40. //>>excludeStart("ide", pragmas.excludeIdeData);
  41. args: ["aBrowser"],
  42. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  43. referencedClasses: [],
  44. //>>excludeEnd("ide");
  45. messageSends: []
  46. }),
  47. $globals.ClassesList);
  48. $core.addMethod(
  49. $core.method({
  50. selector: "category",
  51. protocol: 'accessing',
  52. fn: function (){
  53. var self=this;
  54. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  55. return $core.withContext(function($ctx1) {
  56. //>>excludeEnd("ctx");
  57. return $recv(self._browser())._selectedPackage();
  58. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  59. }, function($ctx1) {$ctx1.fill(self,"category",{},$globals.ClassesList)});
  60. //>>excludeEnd("ctx");
  61. },
  62. //>>excludeStart("ide", pragmas.excludeIdeData);
  63. args: [],
  64. source: "category\x0a\x09^ self browser selectedPackage",
  65. referencedClasses: [],
  66. //>>excludeEnd("ide");
  67. messageSends: ["selectedPackage", "browser"]
  68. }),
  69. $globals.ClassesList);
  70. $core.addMethod(
  71. $core.method({
  72. selector: "getNodes",
  73. protocol: 'accessing',
  74. fn: function (){
  75. var self=this;
  76. var classes,children,others;
  77. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  78. return $core.withContext(function($ctx1) {
  79. //>>excludeEnd("ctx");
  80. var $1,$2;
  81. $1=self._browser();
  82. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  83. $ctx1.sendIdx["browser"]=1;
  84. //>>excludeEnd("ctx");
  85. classes=$recv($1)._classes();
  86. children=[];
  87. others=[];
  88. $recv(classes)._do_((function(each){
  89. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  90. return $core.withContext(function($ctx2) {
  91. //>>excludeEnd("ctx");
  92. $2=$recv(classes)._includes_($recv(each)._superclass());
  93. if($core.assert($2)){
  94. return $recv(others)._add_(each);
  95. } else {
  96. return $recv(children)._add_(each);
  97. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  98. $ctx2.sendIdx["add:"]=1;
  99. //>>excludeEnd("ctx");
  100. };
  101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  102. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  103. //>>excludeEnd("ctx");
  104. }));
  105. return $recv(children)._collect_((function(each){
  106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  107. return $core.withContext(function($ctx2) {
  108. //>>excludeEnd("ctx");
  109. return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,self._browser(),others,(0));
  110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  111. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  112. //>>excludeEnd("ctx");
  113. }));
  114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  115. }, function($ctx1) {$ctx1.fill(self,"getNodes",{classes:classes,children:children,others:others},$globals.ClassesList)});
  116. //>>excludeEnd("ctx");
  117. },
  118. //>>excludeStart("ide", pragmas.excludeIdeData);
  119. args: [],
  120. 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 ]",
  121. referencedClasses: ["ClassesListNode"],
  122. //>>excludeEnd("ide");
  123. messageSends: ["classes", "browser", "do:", "ifFalse:ifTrue:", "includes:", "superclass", "add:", "collect:", "on:browser:classes:level:"]
  124. }),
  125. $globals.ClassesList);
  126. $core.addMethod(
  127. $core.method({
  128. selector: "nodes",
  129. protocol: 'accessing',
  130. fn: function (){
  131. var self=this;
  132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  133. return $core.withContext(function($ctx1) {
  134. //>>excludeEnd("ctx");
  135. var $1,$receiver;
  136. $1=self["@nodes"];
  137. if(($receiver = $1) == null || $receiver.isNil){
  138. self["@nodes"]=self._getNodes();
  139. self["@nodes"];
  140. } else {
  141. $1;
  142. };
  143. return self["@nodes"];
  144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  145. }, function($ctx1) {$ctx1.fill(self,"nodes",{},$globals.ClassesList)});
  146. //>>excludeEnd("ctx");
  147. },
  148. //>>excludeStart("ide", pragmas.excludeIdeData);
  149. args: [],
  150. source: "nodes\x0a\x09nodes ifNil: [ nodes := self getNodes ].\x0a\x09^ nodes",
  151. referencedClasses: [],
  152. //>>excludeEnd("ide");
  153. messageSends: ["ifNil:", "getNodes"]
  154. }),
  155. $globals.ClassesList);
  156. $core.addMethod(
  157. $core.method({
  158. selector: "renderOn:",
  159. protocol: 'rendering',
  160. fn: function (html){
  161. var self=this;
  162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  163. return $core.withContext(function($ctx1) {
  164. //>>excludeEnd("ctx");
  165. var $1;
  166. $1=$recv(html)._ul();
  167. $recv($1)._class_("amber_column browser classes");
  168. self["@ul"]=$recv($1)._yourself();
  169. self._updateNodes();
  170. return self;
  171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  172. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.ClassesList)});
  173. //>>excludeEnd("ctx");
  174. },
  175. //>>excludeStart("ide", pragmas.excludeIdeData);
  176. args: ["html"],
  177. source: "renderOn: html\x0a\x09ul := html ul\x0a\x09\x09class: 'amber_column browser classes';\x0a\x09\x09yourself.\x0a\x09self updateNodes",
  178. referencedClasses: [],
  179. //>>excludeEnd("ide");
  180. messageSends: ["class:", "ul", "yourself", "updateNodes"]
  181. }),
  182. $globals.ClassesList);
  183. $core.addMethod(
  184. $core.method({
  185. selector: "resetNodes",
  186. protocol: 'accessing',
  187. fn: function (){
  188. var self=this;
  189. self["@nodes"]=nil;
  190. return self;
  191. },
  192. //>>excludeStart("ide", pragmas.excludeIdeData);
  193. args: [],
  194. source: "resetNodes\x0a\x09nodes := nil",
  195. referencedClasses: [],
  196. //>>excludeEnd("ide");
  197. messageSends: []
  198. }),
  199. $globals.ClassesList);
  200. $core.addMethod(
  201. $core.method({
  202. selector: "updateNodes",
  203. protocol: 'rendering',
  204. fn: function (){
  205. var self=this;
  206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  207. return $core.withContext(function($ctx1) {
  208. //>>excludeEnd("ctx");
  209. $recv(self["@ul"])._contents_((function(html){
  210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  211. return $core.withContext(function($ctx2) {
  212. //>>excludeEnd("ctx");
  213. return $recv(self._nodes())._do_((function(each){
  214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  215. return $core.withContext(function($ctx3) {
  216. //>>excludeEnd("ctx");
  217. return $recv(each)._renderOn_(html);
  218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  219. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  220. //>>excludeEnd("ctx");
  221. }));
  222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  223. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  224. //>>excludeEnd("ctx");
  225. }));
  226. return self;
  227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  228. }, function($ctx1) {$ctx1.fill(self,"updateNodes",{},$globals.ClassesList)});
  229. //>>excludeEnd("ctx");
  230. },
  231. //>>excludeStart("ide", pragmas.excludeIdeData);
  232. args: [],
  233. source: "updateNodes\x0a\x09ul contents: [ :html |\x0a\x09\x09self nodes do: [ :each |\x0a\x09\x09\x09each renderOn: html ]]",
  234. referencedClasses: [],
  235. //>>excludeEnd("ide");
  236. messageSends: ["contents:", "do:", "nodes", "renderOn:"]
  237. }),
  238. $globals.ClassesList);
  239. $core.addMethod(
  240. $core.method({
  241. selector: "on:",
  242. protocol: 'instance creation',
  243. fn: function (aBrowser){
  244. var self=this;
  245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  246. return $core.withContext(function($ctx1) {
  247. //>>excludeEnd("ctx");
  248. var $1;
  249. $1=self._new();
  250. $recv($1)._browser_(aBrowser);
  251. return $recv($1)._yourself();
  252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  253. }, function($ctx1) {$ctx1.fill(self,"on:",{aBrowser:aBrowser},$globals.ClassesList.klass)});
  254. //>>excludeEnd("ctx");
  255. },
  256. //>>excludeStart("ide", pragmas.excludeIdeData);
  257. args: ["aBrowser"],
  258. source: "on: aBrowser\x0a\x09^ self new\x0a\x09\x09browser: aBrowser;\x0a\x09\x09yourself",
  259. referencedClasses: [],
  260. //>>excludeEnd("ide");
  261. messageSends: ["browser:", "new", "yourself"]
  262. }),
  263. $globals.ClassesList.klass);
  264. $core.addClass('ClassesListNode', $globals.Widget, ['browser', 'theClass', 'level', 'nodes'], 'IDE');
  265. $core.addMethod(
  266. $core.method({
  267. selector: "browser",
  268. protocol: 'accessing',
  269. fn: function (){
  270. var self=this;
  271. return self["@browser"];
  272. },
  273. //>>excludeStart("ide", pragmas.excludeIdeData);
  274. args: [],
  275. source: "browser\x0a\x09^ browser",
  276. referencedClasses: [],
  277. //>>excludeEnd("ide");
  278. messageSends: []
  279. }),
  280. $globals.ClassesListNode);
  281. $core.addMethod(
  282. $core.method({
  283. selector: "browser:",
  284. protocol: 'accessing',
  285. fn: function (aBrowser){
  286. var self=this;
  287. self["@browser"]=aBrowser;
  288. return self;
  289. },
  290. //>>excludeStart("ide", pragmas.excludeIdeData);
  291. args: ["aBrowser"],
  292. source: "browser: aBrowser\x0a\x09browser := aBrowser",
  293. referencedClasses: [],
  294. //>>excludeEnd("ide");
  295. messageSends: []
  296. }),
  297. $globals.ClassesListNode);
  298. $core.addMethod(
  299. $core.method({
  300. selector: "getNodesFrom:",
  301. protocol: 'accessing',
  302. fn: function (aCollection){
  303. var self=this;
  304. var children,others;
  305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  306. return $core.withContext(function($ctx1) {
  307. //>>excludeEnd("ctx");
  308. var $1;
  309. children=[];
  310. others=[];
  311. $recv(aCollection)._do_((function(each){
  312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  313. return $core.withContext(function($ctx2) {
  314. //>>excludeEnd("ctx");
  315. $1=$recv($recv(each)._superclass()).__eq(self._theClass());
  316. if($core.assert($1)){
  317. return $recv(children)._add_(each);
  318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  319. $ctx2.sendIdx["add:"]=1;
  320. //>>excludeEnd("ctx");
  321. } else {
  322. return $recv(others)._add_(each);
  323. };
  324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  325. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  326. //>>excludeEnd("ctx");
  327. }));
  328. self["@nodes"]=$recv(children)._collect_((function(each){
  329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  330. return $core.withContext(function($ctx2) {
  331. //>>excludeEnd("ctx");
  332. return $recv($globals.ClassesListNode)._on_browser_classes_level_(each,self._browser(),others,$recv(self._level()).__plus((1)));
  333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  334. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  335. //>>excludeEnd("ctx");
  336. }));
  337. return self;
  338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  339. }, function($ctx1) {$ctx1.fill(self,"getNodesFrom:",{aCollection:aCollection,children:children,others:others},$globals.ClassesListNode)});
  340. //>>excludeEnd("ctx");
  341. },
  342. //>>excludeStart("ide", pragmas.excludeIdeData);
  343. args: ["aCollection"],
  344. 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 ]",
  345. referencedClasses: ["ClassesListNode"],
  346. //>>excludeEnd("ide");
  347. messageSends: ["do:", "ifTrue:ifFalse:", "=", "superclass", "theClass", "add:", "collect:", "on:browser:classes:level:", "browser", "+", "level"]
  348. }),
  349. $globals.ClassesListNode);
  350. $core.addMethod(
  351. $core.method({
  352. selector: "label",
  353. protocol: 'accessing',
  354. fn: function (){
  355. var self=this;
  356. var str;
  357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  358. return $core.withContext(function($ctx1) {
  359. //>>excludeEnd("ctx");
  360. str=$recv($recv($globals.String)._new())._writeStream();
  361. $recv(self._level())._timesRepeat_((function(){
  362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  363. return $core.withContext(function($ctx2) {
  364. //>>excludeEnd("ctx");
  365. return $recv(str)._nextPutAll_("    ");
  366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  367. $ctx2.sendIdx["nextPutAll:"]=1;
  368. //>>excludeEnd("ctx");
  369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  370. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  371. //>>excludeEnd("ctx");
  372. }));
  373. $recv(str)._nextPutAll_($recv(self._theClass())._name());
  374. return $recv(str)._contents();
  375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  376. }, function($ctx1) {$ctx1.fill(self,"label",{str:str},$globals.ClassesListNode)});
  377. //>>excludeEnd("ctx");
  378. },
  379. //>>excludeStart("ide", pragmas.excludeIdeData);
  380. args: [],
  381. 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",
  382. referencedClasses: ["String"],
  383. //>>excludeEnd("ide");
  384. messageSends: ["writeStream", "new", "timesRepeat:", "level", "nextPutAll:", "name", "theClass", "contents"]
  385. }),
  386. $globals.ClassesListNode);
  387. $core.addMethod(
  388. $core.method({
  389. selector: "level",
  390. protocol: 'accessing',
  391. fn: function (){
  392. var self=this;
  393. return self["@level"];
  394. },
  395. //>>excludeStart("ide", pragmas.excludeIdeData);
  396. args: [],
  397. source: "level\x0a\x09^ level",
  398. referencedClasses: [],
  399. //>>excludeEnd("ide");
  400. messageSends: []
  401. }),
  402. $globals.ClassesListNode);
  403. $core.addMethod(
  404. $core.method({
  405. selector: "level:",
  406. protocol: 'accessing',
  407. fn: function (anInteger){
  408. var self=this;
  409. self["@level"]=anInteger;
  410. return self;
  411. },
  412. //>>excludeStart("ide", pragmas.excludeIdeData);
  413. args: ["anInteger"],
  414. source: "level: anInteger\x0a\x09level := anInteger",
  415. referencedClasses: [],
  416. //>>excludeEnd("ide");
  417. messageSends: []
  418. }),
  419. $globals.ClassesListNode);
  420. $core.addMethod(
  421. $core.method({
  422. selector: "nodes",
  423. protocol: 'accessing',
  424. fn: function (){
  425. var self=this;
  426. return self["@nodes"];
  427. },
  428. //>>excludeStart("ide", pragmas.excludeIdeData);
  429. args: [],
  430. source: "nodes\x0a\x09^ nodes",
  431. referencedClasses: [],
  432. //>>excludeEnd("ide");
  433. messageSends: []
  434. }),
  435. $globals.ClassesListNode);
  436. $core.addMethod(
  437. $core.method({
  438. selector: "renderOn:",
  439. protocol: 'rendering',
  440. fn: function (html){
  441. var self=this;
  442. var li,cssClass;
  443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  444. return $core.withContext(function($ctx1) {
  445. //>>excludeEnd("ctx");
  446. var $1,$2,$4,$5,$3,$6;
  447. cssClass="";
  448. li=$recv($recv(html)._li())._onClick_((function(){
  449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  450. return $core.withContext(function($ctx2) {
  451. //>>excludeEnd("ctx");
  452. $1=self._browser();
  453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  454. $ctx2.sendIdx["browser"]=1;
  455. //>>excludeEnd("ctx");
  456. $2=self._theClass();
  457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  458. $ctx2.sendIdx["theClass"]=1;
  459. //>>excludeEnd("ctx");
  460. return $recv($1)._selectClass_($2);
  461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  462. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  463. //>>excludeEnd("ctx");
  464. }));
  465. $recv($recv(li)._asJQuery())._html_(self._label());
  466. $4=$recv(self._browser())._selectedClass();
  467. $5=self._theClass();
  468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  469. $ctx1.sendIdx["theClass"]=2;
  470. //>>excludeEnd("ctx");
  471. $3=$recv($4).__eq($5);
  472. if($core.assert($3)){
  473. cssClass=$recv(cssClass).__comma(" selected");
  474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  475. $ctx1.sendIdx[","]=1;
  476. //>>excludeEnd("ctx");
  477. cssClass;
  478. };
  479. $6=$recv($recv(self._theClass())._comment())._isEmpty();
  480. if(!$core.assert($6)){
  481. cssClass=$recv(cssClass).__comma(" commented");
  482. cssClass;
  483. };
  484. $recv(li)._class_(cssClass);
  485. $recv(self._nodes())._do_((function(each){
  486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  487. return $core.withContext(function($ctx2) {
  488. //>>excludeEnd("ctx");
  489. return $recv(each)._renderOn_(html);
  490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  491. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,4)});
  492. //>>excludeEnd("ctx");
  493. }));
  494. return self;
  495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  496. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,li:li,cssClass:cssClass},$globals.ClassesListNode)});
  497. //>>excludeEnd("ctx");
  498. },
  499. //>>excludeStart("ide", pragmas.excludeIdeData);
  500. args: ["html"],
  501. source: "renderOn: html\x0a\x09| li cssClass |\x0a\x09cssClass := ''.\x0a\x09li := html li\x0a\x09\x09onClick: [ self browser selectClass: self theClass ].\x0a\x09li asJQuery html: self label.\x0a\x0a\x09self browser selectedClass = self theClass ifTrue: [\x0a\x09\x09cssClass := cssClass, ' selected' ].\x0a\x0a\x09self theClass comment isEmpty ifFalse: [\x0a\x09\x09cssClass := cssClass, ' commented' ].\x0a\x0a\x09li class: cssClass.\x0a\x0a\x09self nodes do: [ :each |\x0a\x09\x09each renderOn: html ]",
  502. referencedClasses: [],
  503. //>>excludeEnd("ide");
  504. messageSends: ["onClick:", "li", "selectClass:", "browser", "theClass", "html:", "asJQuery", "label", "ifTrue:", "=", "selectedClass", ",", "ifFalse:", "isEmpty", "comment", "class:", "do:", "nodes", "renderOn:"]
  505. }),
  506. $globals.ClassesListNode);
  507. $core.addMethod(
  508. $core.method({
  509. selector: "theClass",
  510. protocol: 'accessing',
  511. fn: function (){
  512. var self=this;
  513. return self["@theClass"];
  514. },
  515. //>>excludeStart("ide", pragmas.excludeIdeData);
  516. args: [],
  517. source: "theClass\x0a\x09^ theClass",
  518. referencedClasses: [],
  519. //>>excludeEnd("ide");
  520. messageSends: []
  521. }),
  522. $globals.ClassesListNode);
  523. $core.addMethod(
  524. $core.method({
  525. selector: "theClass:",
  526. protocol: 'accessing',
  527. fn: function (aClass){
  528. var self=this;
  529. self["@theClass"]=aClass;
  530. return self;
  531. },
  532. //>>excludeStart("ide", pragmas.excludeIdeData);
  533. args: ["aClass"],
  534. source: "theClass: aClass\x0a\x09theClass := aClass",
  535. referencedClasses: [],
  536. //>>excludeEnd("ide");
  537. messageSends: []
  538. }),
  539. $globals.ClassesListNode);
  540. $core.addMethod(
  541. $core.method({
  542. selector: "on:browser:classes:level:",
  543. protocol: 'instance creation',
  544. fn: function (aClass,aBrowser,aCollection,anInteger){
  545. var self=this;
  546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  547. return $core.withContext(function($ctx1) {
  548. //>>excludeEnd("ctx");
  549. var $1;
  550. $1=self._new();
  551. $recv($1)._theClass_(aClass);
  552. $recv($1)._browser_(aBrowser);
  553. $recv($1)._level_(anInteger);
  554. $recv($1)._getNodesFrom_(aCollection);
  555. return $recv($1)._yourself();
  556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  557. }, function($ctx1) {$ctx1.fill(self,"on:browser:classes:level:",{aClass:aClass,aBrowser:aBrowser,aCollection:aCollection,anInteger:anInteger},$globals.ClassesListNode.klass)});
  558. //>>excludeEnd("ctx");
  559. },
  560. //>>excludeStart("ide", pragmas.excludeIdeData);
  561. args: ["aClass", "aBrowser", "aCollection", "anInteger"],
  562. 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",
  563. referencedClasses: [],
  564. //>>excludeEnd("ide");
  565. messageSends: ["theClass:", "new", "browser:", "level:", "getNodesFrom:", "yourself"]
  566. }),
  567. $globals.ClassesListNode.klass);
  568. $core.addClass('DebugErrorHandler', $globals.Object, [], 'IDE');
  569. $core.addMethod(
  570. $core.method({
  571. selector: "handleError:",
  572. protocol: 'error handling',
  573. fn: function (anError){
  574. var self=this;
  575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  576. return $core.withContext(function($ctx1) {
  577. //>>excludeEnd("ctx");
  578. var $1;
  579. $recv((function(){
  580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  581. return $core.withContext(function($ctx2) {
  582. //>>excludeEnd("ctx");
  583. $1=$recv($globals.Debugger)._new();
  584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  585. $ctx2.sendIdx["new"]=1;
  586. //>>excludeEnd("ctx");
  587. $recv($1)._error_(anError);
  588. return $recv($1)._open();
  589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  590. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  591. //>>excludeEnd("ctx");
  592. }))._on_do_($globals.Error,(function(error){
  593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  594. return $core.withContext(function($ctx2) {
  595. //>>excludeEnd("ctx");
  596. return $recv($recv($globals.ConsoleErrorHandler)._new())._handleError_(error);
  597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  598. }, function($ctx2) {$ctx2.fillBlock({error:error},$ctx1,2)});
  599. //>>excludeEnd("ctx");
  600. }));
  601. return self;
  602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  603. }, function($ctx1) {$ctx1.fill(self,"handleError:",{anError:anError},$globals.DebugErrorHandler)});
  604. //>>excludeEnd("ctx");
  605. },
  606. //>>excludeStart("ide", pragmas.excludeIdeData);
  607. args: ["anError"],
  608. 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 ]",
  609. referencedClasses: ["Debugger", "Error", "ConsoleErrorHandler"],
  610. //>>excludeEnd("ide");
  611. messageSends: ["on:do:", "error:", "new", "open", "handleError:"]
  612. }),
  613. $globals.DebugErrorHandler);
  614. $core.addMethod(
  615. $core.method({
  616. selector: "initialize",
  617. protocol: 'initialization',
  618. fn: function (){
  619. var self=this;
  620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  621. return $core.withContext(function($ctx1) {
  622. //>>excludeEnd("ctx");
  623. $recv($globals.ErrorHandler)._register_(self._new());
  624. return self;
  625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  626. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.DebugErrorHandler.klass)});
  627. //>>excludeEnd("ctx");
  628. },
  629. //>>excludeStart("ide", pragmas.excludeIdeData);
  630. args: [],
  631. source: "initialize\x0a\x09ErrorHandler register: self new",
  632. referencedClasses: ["ErrorHandler"],
  633. //>>excludeEnd("ide");
  634. messageSends: ["register:", "new"]
  635. }),
  636. $globals.DebugErrorHandler.klass);
  637. $core.addClass('SourceArea', $globals.Widget, ['editor', 'div', 'receiver', 'onDoIt'], 'IDE');
  638. $core.addMethod(
  639. $core.method({
  640. selector: "clear",
  641. protocol: 'actions',
  642. fn: function (){
  643. var self=this;
  644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  645. return $core.withContext(function($ctx1) {
  646. //>>excludeEnd("ctx");
  647. self._val_("");
  648. return self;
  649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  650. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.SourceArea)});
  651. //>>excludeEnd("ctx");
  652. },
  653. //>>excludeStart("ide", pragmas.excludeIdeData);
  654. args: [],
  655. source: "clear\x0a\x09self val: ''",
  656. referencedClasses: [],
  657. //>>excludeEnd("ide");
  658. messageSends: ["val:"]
  659. }),
  660. $globals.SourceArea);
  661. $core.addMethod(
  662. $core.method({
  663. selector: "currentLine",
  664. protocol: 'accessing',
  665. fn: function (){
  666. var self=this;
  667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  668. return $core.withContext(function($ctx1) {
  669. //>>excludeEnd("ctx");
  670. return $recv(self["@editor"])._getLine_($recv($recv(self["@editor"])._getCursor())._line());
  671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  672. }, function($ctx1) {$ctx1.fill(self,"currentLine",{},$globals.SourceArea)});
  673. //>>excludeEnd("ctx");
  674. },
  675. //>>excludeStart("ide", pragmas.excludeIdeData);
  676. args: [],
  677. source: "currentLine\x0a\x09^ editor getLine: (editor getCursor line)",
  678. referencedClasses: [],
  679. //>>excludeEnd("ide");
  680. messageSends: ["getLine:", "line", "getCursor"]
  681. }),
  682. $globals.SourceArea);
  683. $core.addMethod(
  684. $core.method({
  685. selector: "currentLineOrSelection",
  686. protocol: 'accessing',
  687. fn: function (){
  688. var self=this;
  689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  690. return $core.withContext(function($ctx1) {
  691. //>>excludeEnd("ctx");
  692. var $1;
  693. $1=$recv(self["@editor"])._somethingSelected();
  694. if($core.assert($1)){
  695. return self._selection();
  696. } else {
  697. return self._currentLine();
  698. };
  699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  700. }, function($ctx1) {$ctx1.fill(self,"currentLineOrSelection",{},$globals.SourceArea)});
  701. //>>excludeEnd("ctx");
  702. },
  703. //>>excludeStart("ide", pragmas.excludeIdeData);
  704. args: [],
  705. source: "currentLineOrSelection\x0a\x09^ editor somethingSelected\x0a\x09ifFalse: [ self currentLine ]\x0a\x09ifTrue: [ self selection ]",
  706. referencedClasses: [],
  707. //>>excludeEnd("ide");
  708. messageSends: ["ifFalse:ifTrue:", "somethingSelected", "currentLine", "selection"]
  709. }),
  710. $globals.SourceArea);
  711. $core.addMethod(
  712. $core.method({
  713. selector: "doIt",
  714. protocol: 'actions',
  715. fn: function (){
  716. var self=this;
  717. var result;
  718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  719. return $core.withContext(function($ctx1) {
  720. //>>excludeEnd("ctx");
  721. var $1,$receiver;
  722. result=self._eval_(self._currentLineOrSelection());
  723. $1=self._onDoIt();
  724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  725. $ctx1.sendIdx["onDoIt"]=1;
  726. //>>excludeEnd("ctx");
  727. if(($receiver = $1) == null || $receiver.isNil){
  728. $1;
  729. } else {
  730. $recv(self._onDoIt())._value();
  731. };
  732. return result;
  733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  734. }, function($ctx1) {$ctx1.fill(self,"doIt",{result:result},$globals.SourceArea)});
  735. //>>excludeEnd("ctx");
  736. },
  737. //>>excludeStart("ide", pragmas.excludeIdeData);
  738. args: [],
  739. source: "doIt\x0a\x09| result |\x0a\x09result := self eval: self currentLineOrSelection.\x0a\x09self onDoIt ifNotNil: [ self onDoIt value ].\x0a\x09^ result",
  740. referencedClasses: [],
  741. //>>excludeEnd("ide");
  742. messageSends: ["eval:", "currentLineOrSelection", "ifNotNil:", "onDoIt", "value"]
  743. }),
  744. $globals.SourceArea);
  745. $core.addMethod(
  746. $core.method({
  747. selector: "editor",
  748. protocol: 'accessing',
  749. fn: function (){
  750. var self=this;
  751. return self["@editor"];
  752. },
  753. //>>excludeStart("ide", pragmas.excludeIdeData);
  754. args: [],
  755. source: "editor\x0a\x09^ editor",
  756. referencedClasses: [],
  757. //>>excludeEnd("ide");
  758. messageSends: []
  759. }),
  760. $globals.SourceArea);
  761. $core.addMethod(
  762. $core.method({
  763. selector: "eval:",
  764. protocol: 'actions',
  765. fn: function (aString){
  766. var self=this;
  767. var compiler;
  768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  769. return $core.withContext(function($ctx1) {
  770. //>>excludeEnd("ctx");
  771. var $early={};
  772. try {
  773. compiler=$recv($globals.Compiler)._new();
  774. $recv((function(){
  775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  776. return $core.withContext(function($ctx2) {
  777. //>>excludeEnd("ctx");
  778. return $recv(compiler)._parseExpression_(aString);
  779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  780. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  781. //>>excludeEnd("ctx");
  782. }))._on_do_($globals.Error,(function(ex){
  783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  784. return $core.withContext(function($ctx2) {
  785. //>>excludeEnd("ctx");
  786. throw $early=[$recv($globals.Terminal)._alert_($recv(ex)._messageText())];
  787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  788. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,2)});
  789. //>>excludeEnd("ctx");
  790. }));
  791. return $recv(compiler)._evaluateExpression_on_(aString,self._receiver());
  792. }
  793. catch(e) {if(e===$early)return e[0]; throw e}
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. }, function($ctx1) {$ctx1.fill(self,"eval:",{aString:aString,compiler:compiler},$globals.SourceArea)});
  796. //>>excludeEnd("ctx");
  797. },
  798. //>>excludeStart("ide", pragmas.excludeIdeData);
  799. args: ["aString"],
  800. 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",
  801. referencedClasses: ["Compiler", "Error", "Terminal"],
  802. //>>excludeEnd("ide");
  803. messageSends: ["new", "on:do:", "parseExpression:", "alert:", "messageText", "evaluateExpression:on:", "receiver"]
  804. }),
  805. $globals.SourceArea);
  806. $core.addMethod(
  807. $core.method({
  808. selector: "fileIn",
  809. protocol: 'actions',
  810. fn: function (){
  811. var self=this;
  812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  813. return $core.withContext(function($ctx1) {
  814. //>>excludeEnd("ctx");
  815. $recv($recv($globals.Importer)._new())._import_($recv(self._currentLineOrSelection())._readStream());
  816. return self;
  817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  818. }, function($ctx1) {$ctx1.fill(self,"fileIn",{},$globals.SourceArea)});
  819. //>>excludeEnd("ctx");
  820. },
  821. //>>excludeStart("ide", pragmas.excludeIdeData);
  822. args: [],
  823. source: "fileIn\x0a\x09Importer new import: self currentLineOrSelection readStream",
  824. referencedClasses: ["Importer"],
  825. //>>excludeEnd("ide");
  826. messageSends: ["import:", "new", "readStream", "currentLineOrSelection"]
  827. }),
  828. $globals.SourceArea);
  829. $core.addMethod(
  830. $core.method({
  831. selector: "focus",
  832. protocol: 'actions',
  833. fn: function (){
  834. var self=this;
  835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  836. return $core.withContext(function($ctx1) {
  837. //>>excludeEnd("ctx");
  838. $recv(self._editor())._focus();
  839. return self;
  840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  841. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.SourceArea)});
  842. //>>excludeEnd("ctx");
  843. },
  844. //>>excludeStart("ide", pragmas.excludeIdeData);
  845. args: [],
  846. source: "focus\x0a\x09self editor focus.",
  847. referencedClasses: [],
  848. //>>excludeEnd("ide");
  849. messageSends: ["focus", "editor"]
  850. }),
  851. $globals.SourceArea);
  852. $core.addMethod(
  853. $core.method({
  854. selector: "handleKeyDown:",
  855. protocol: 'actions',
  856. fn: function (anEvent){
  857. var self=this;
  858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  859. return $core.withContext(function($ctx1) {
  860. //>>excludeEnd("ctx");
  861. if(anEvent.ctrlKey) {
  862. if(anEvent.keyCode === 80) { //ctrl+p
  863. self._printIt();
  864. anEvent.preventDefault();
  865. return false;
  866. }
  867. if(anEvent.keyCode === 68) { //ctrl+d
  868. self._doIt();
  869. anEvent.preventDefault();
  870. return false;
  871. }
  872. if(anEvent.keyCode === 73) { //ctrl+i
  873. self._inspectIt();
  874. anEvent.preventDefault();
  875. return false;
  876. }
  877. };
  878. return self;
  879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  880. }, function($ctx1) {$ctx1.fill(self,"handleKeyDown:",{anEvent:anEvent},$globals.SourceArea)});
  881. //>>excludeEnd("ctx");
  882. },
  883. //>>excludeStart("ide", pragmas.excludeIdeData);
  884. args: ["anEvent"],
  885. 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}>",
  886. referencedClasses: [],
  887. //>>excludeEnd("ide");
  888. messageSends: []
  889. }),
  890. $globals.SourceArea);
  891. $core.addMethod(
  892. $core.method({
  893. selector: "inspectIt",
  894. protocol: 'actions',
  895. fn: function (){
  896. var self=this;
  897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  898. return $core.withContext(function($ctx1) {
  899. //>>excludeEnd("ctx");
  900. $recv(self._doIt())._inspect();
  901. return self;
  902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  903. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.SourceArea)});
  904. //>>excludeEnd("ctx");
  905. },
  906. //>>excludeStart("ide", pragmas.excludeIdeData);
  907. args: [],
  908. source: "inspectIt\x0a\x09self doIt inspect",
  909. referencedClasses: [],
  910. //>>excludeEnd("ide");
  911. messageSends: ["inspect", "doIt"]
  912. }),
  913. $globals.SourceArea);
  914. $core.addMethod(
  915. $core.method({
  916. selector: "onDoIt",
  917. protocol: 'accessing',
  918. fn: function (){
  919. var self=this;
  920. return self["@onDoIt"];
  921. },
  922. //>>excludeStart("ide", pragmas.excludeIdeData);
  923. args: [],
  924. source: "onDoIt\x0a\x09^ onDoIt",
  925. referencedClasses: [],
  926. //>>excludeEnd("ide");
  927. messageSends: []
  928. }),
  929. $globals.SourceArea);
  930. $core.addMethod(
  931. $core.method({
  932. selector: "onDoIt:",
  933. protocol: 'accessing',
  934. fn: function (aBlock){
  935. var self=this;
  936. self["@onDoIt"]=aBlock;
  937. return self;
  938. },
  939. //>>excludeStart("ide", pragmas.excludeIdeData);
  940. args: ["aBlock"],
  941. source: "onDoIt: aBlock\x0a\x09onDoIt := aBlock",
  942. referencedClasses: [],
  943. //>>excludeEnd("ide");
  944. messageSends: []
  945. }),
  946. $globals.SourceArea);
  947. $core.addMethod(
  948. $core.method({
  949. selector: "onKeyDown:",
  950. protocol: 'events',
  951. fn: function (aBlock){
  952. var self=this;
  953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  954. return $core.withContext(function($ctx1) {
  955. //>>excludeEnd("ctx");
  956. $recv(self["@div"])._onKeyDown_(aBlock);
  957. return self;
  958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  959. }, function($ctx1) {$ctx1.fill(self,"onKeyDown:",{aBlock:aBlock},$globals.SourceArea)});
  960. //>>excludeEnd("ctx");
  961. },
  962. //>>excludeStart("ide", pragmas.excludeIdeData);
  963. args: ["aBlock"],
  964. source: "onKeyDown: aBlock\x0a\x09div onKeyDown: aBlock",
  965. referencedClasses: [],
  966. //>>excludeEnd("ide");
  967. messageSends: ["onKeyDown:"]
  968. }),
  969. $globals.SourceArea);
  970. $core.addMethod(
  971. $core.method({
  972. selector: "onKeyUp:",
  973. protocol: 'events',
  974. fn: function (aBlock){
  975. var self=this;
  976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  977. return $core.withContext(function($ctx1) {
  978. //>>excludeEnd("ctx");
  979. $recv(self["@div"])._onKeyUp_(aBlock);
  980. return self;
  981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  982. }, function($ctx1) {$ctx1.fill(self,"onKeyUp:",{aBlock:aBlock},$globals.SourceArea)});
  983. //>>excludeEnd("ctx");
  984. },
  985. //>>excludeStart("ide", pragmas.excludeIdeData);
  986. args: ["aBlock"],
  987. source: "onKeyUp: aBlock\x0a\x09div onKeyUp: aBlock",
  988. referencedClasses: [],
  989. //>>excludeEnd("ide");
  990. messageSends: ["onKeyUp:"]
  991. }),
  992. $globals.SourceArea);
  993. $core.addMethod(
  994. $core.method({
  995. selector: "print:",
  996. protocol: 'actions',
  997. fn: function (aString){
  998. var self=this;
  999. var start,stop,currentLine;
  1000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1001. return $core.withContext(function($ctx1) {
  1002. //>>excludeEnd("ctx");
  1003. var $1,$2,$4,$3,$5,$6,$7,$8,$9,$10,$12,$11;
  1004. $1=$recv(self["@editor"])._getCursor_(false);
  1005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1006. $ctx1.sendIdx["getCursor:"]=1;
  1007. //>>excludeEnd("ctx");
  1008. currentLine=$recv($1)._line();
  1009. start=$recv($globals.HashedCollection)._new();
  1010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1011. $ctx1.sendIdx["new"]=1;
  1012. //>>excludeEnd("ctx");
  1013. $recv(start)._at_put_("line",currentLine);
  1014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1015. $ctx1.sendIdx["at:put:"]=1;
  1016. //>>excludeEnd("ctx");
  1017. $2=start;
  1018. $4=$recv(self["@editor"])._getCursor_(false);
  1019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1020. $ctx1.sendIdx["getCursor:"]=2;
  1021. //>>excludeEnd("ctx");
  1022. $3=$recv($4)._ch();
  1023. $recv($2)._at_put_("ch",$3);
  1024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1025. $ctx1.sendIdx["at:put:"]=2;
  1026. //>>excludeEnd("ctx");
  1027. $5=$recv(self["@editor"])._getSelection();
  1028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1029. $ctx1.sendIdx["getSelection"]=1;
  1030. //>>excludeEnd("ctx");
  1031. $recv($5)._ifEmpty_((function(){
  1032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1033. return $core.withContext(function($ctx2) {
  1034. //>>excludeEnd("ctx");
  1035. $6=start;
  1036. $7=$recv($recv(self["@editor"])._getLine_(currentLine))._size();
  1037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1038. $ctx2.sendIdx["size"]=1;
  1039. //>>excludeEnd("ctx");
  1040. $recv($6)._at_put_("ch",$7);
  1041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1042. $ctx2.sendIdx["at:put:"]=3;
  1043. //>>excludeEnd("ctx");
  1044. return $recv(self["@editor"])._setSelection_end_($globals.HashedCollection._newFromPairs_(["line",currentLine,"ch",(0)]),start);
  1045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1046. $ctx2.sendIdx["setSelection:end:"]=1;
  1047. //>>excludeEnd("ctx");
  1048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1049. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1050. //>>excludeEnd("ctx");
  1051. }));
  1052. stop=$recv($globals.HashedCollection)._new();
  1053. $recv(stop)._at_put_("line",currentLine);
  1054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1055. $ctx1.sendIdx["at:put:"]=4;
  1056. //>>excludeEnd("ctx");
  1057. $8=stop;
  1058. $9=$recv($recv($recv(start)._at_("ch")).__plus($recv(aString)._size())).__plus((2));
  1059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1060. $ctx1.sendIdx["+"]=1;
  1061. //>>excludeEnd("ctx");
  1062. $recv($8)._at_put_("ch",$9);
  1063. $10=self["@editor"];
  1064. $12=$recv($recv($recv(self["@editor"])._getSelection()).__comma(" ")).__comma(aString);
  1065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1066. $ctx1.sendIdx[","]=2;
  1067. //>>excludeEnd("ctx");
  1068. $11=$recv($12).__comma(" ");
  1069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1070. $ctx1.sendIdx[","]=1;
  1071. //>>excludeEnd("ctx");
  1072. $recv($10)._replaceSelection_($11);
  1073. $recv(self["@editor"])._setCursor_($recv(self["@editor"])._getCursor_(true));
  1074. $recv(self["@editor"])._setSelection_end_(stop,start);
  1075. return self;
  1076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1077. }, function($ctx1) {$ctx1.fill(self,"print:",{aString:aString,start:start,stop:stop,currentLine:currentLine},$globals.SourceArea)});
  1078. //>>excludeEnd("ctx");
  1079. },
  1080. //>>excludeStart("ide", pragmas.excludeIdeData);
  1081. args: ["aString"],
  1082. 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",
  1083. referencedClasses: ["HashedCollection"],
  1084. //>>excludeEnd("ide");
  1085. messageSends: ["line", "getCursor:", "new", "at:put:", "ch", "ifEmpty:", "getSelection", "size", "getLine:", "setSelection:end:", "+", "at:", "replaceSelection:", ",", "setCursor:"]
  1086. }),
  1087. $globals.SourceArea);
  1088. $core.addMethod(
  1089. $core.method({
  1090. selector: "printIt",
  1091. protocol: 'actions',
  1092. fn: function (){
  1093. var self=this;
  1094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1095. return $core.withContext(function($ctx1) {
  1096. //>>excludeEnd("ctx");
  1097. self._print_($recv(self._doIt())._printString());
  1098. self._focus();
  1099. return self;
  1100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1101. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.SourceArea)});
  1102. //>>excludeEnd("ctx");
  1103. },
  1104. //>>excludeStart("ide", pragmas.excludeIdeData);
  1105. args: [],
  1106. source: "printIt\x0a\x09self print: self doIt printString.\x0a\x09self focus.",
  1107. referencedClasses: [],
  1108. //>>excludeEnd("ide");
  1109. messageSends: ["print:", "printString", "doIt", "focus"]
  1110. }),
  1111. $globals.SourceArea);
  1112. $core.addMethod(
  1113. $core.method({
  1114. selector: "receiver",
  1115. protocol: 'accessing',
  1116. fn: function (){
  1117. var self=this;
  1118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1119. return $core.withContext(function($ctx1) {
  1120. //>>excludeEnd("ctx");
  1121. var $1,$receiver;
  1122. $1=self["@receiver"];
  1123. if(($receiver = $1) == null || $receiver.isNil){
  1124. return $recv($globals.DoIt)._new();
  1125. } else {
  1126. return $1;
  1127. };
  1128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1129. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.SourceArea)});
  1130. //>>excludeEnd("ctx");
  1131. },
  1132. //>>excludeStart("ide", pragmas.excludeIdeData);
  1133. args: [],
  1134. source: "receiver\x0a\x09^ receiver ifNil: [ DoIt new ]",
  1135. referencedClasses: ["DoIt"],
  1136. //>>excludeEnd("ide");
  1137. messageSends: ["ifNil:", "new"]
  1138. }),
  1139. $globals.SourceArea);
  1140. $core.addMethod(
  1141. $core.method({
  1142. selector: "receiver:",
  1143. protocol: 'accessing',
  1144. fn: function (anObject){
  1145. var self=this;
  1146. self["@receiver"]=anObject;
  1147. return self;
  1148. },
  1149. //>>excludeStart("ide", pragmas.excludeIdeData);
  1150. args: ["anObject"],
  1151. source: "receiver: anObject\x0a\x09receiver := anObject",
  1152. referencedClasses: [],
  1153. //>>excludeEnd("ide");
  1154. messageSends: []
  1155. }),
  1156. $globals.SourceArea);
  1157. $core.addMethod(
  1158. $core.method({
  1159. selector: "renderOn:",
  1160. protocol: 'rendering',
  1161. fn: function (html){
  1162. var self=this;
  1163. var textarea;
  1164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1165. return $core.withContext(function($ctx1) {
  1166. //>>excludeEnd("ctx");
  1167. self["@div"]=$recv($recv(html)._div())._class_("source");
  1168. $recv(self["@div"])._with_((function(){
  1169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1170. return $core.withContext(function($ctx2) {
  1171. //>>excludeEnd("ctx");
  1172. textarea=$recv(html)._textarea();
  1173. return textarea;
  1174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1175. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1176. //>>excludeEnd("ctx");
  1177. }));
  1178. self._setEditorOn_($recv(textarea)._element());
  1179. $recv(self["@div"])._onKeyDown_((function(e){
  1180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1181. return $core.withContext(function($ctx2) {
  1182. //>>excludeEnd("ctx");
  1183. return self._handleKeyDown_(e);
  1184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1185. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  1186. //>>excludeEnd("ctx");
  1187. }));
  1188. return self;
  1189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1190. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html,textarea:textarea},$globals.SourceArea)});
  1191. //>>excludeEnd("ctx");
  1192. },
  1193. //>>excludeStart("ide", pragmas.excludeIdeData);
  1194. args: ["html"],
  1195. source: "renderOn: html\x0a\x09| textarea |\x0a\x09div := html div class: 'source'.\x0a\x09div with: [ textarea := html textarea ].\x0a\x09self setEditorOn: textarea element.\x0a\x09div onKeyDown: [ :e | self handleKeyDown: e ]",
  1196. referencedClasses: [],
  1197. //>>excludeEnd("ide");
  1198. messageSends: ["class:", "div", "with:", "textarea", "setEditorOn:", "element", "onKeyDown:", "handleKeyDown:"]
  1199. }),
  1200. $globals.SourceArea);
  1201. $core.addMethod(
  1202. $core.method({
  1203. selector: "selection",
  1204. protocol: 'accessing',
  1205. fn: function (){
  1206. var self=this;
  1207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1208. return $core.withContext(function($ctx1) {
  1209. //>>excludeEnd("ctx");
  1210. return $recv(self["@editor"])._getSelection();
  1211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1212. }, function($ctx1) {$ctx1.fill(self,"selection",{},$globals.SourceArea)});
  1213. //>>excludeEnd("ctx");
  1214. },
  1215. //>>excludeStart("ide", pragmas.excludeIdeData);
  1216. args: [],
  1217. source: "selection\x0a\x09^ editor getSelection",
  1218. referencedClasses: [],
  1219. //>>excludeEnd("ide");
  1220. messageSends: ["getSelection"]
  1221. }),
  1222. $globals.SourceArea);
  1223. $core.addMethod(
  1224. $core.method({
  1225. selector: "setEditorOn:",
  1226. protocol: 'accessing',
  1227. fn: function (aTextarea){
  1228. var self=this;
  1229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1230. return $core.withContext(function($ctx1) {
  1231. //>>excludeEnd("ctx");
  1232. self['@editor'] = self._class()._codeMirror().fromTextArea(aTextarea, {
  1233. theme: 'ide.codeMirrorTheme'._settingValueIfAbsent_('default'),
  1234. mode: 'text/x-stsrc',
  1235. lineNumbers: true,
  1236. enterMode: 'flat',
  1237. indentWithTabs: true,
  1238. indentUnit: 4,
  1239. matchBrackets: true,
  1240. electricChars: false
  1241. });
  1242. return self;
  1243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1244. }, function($ctx1) {$ctx1.fill(self,"setEditorOn:",{aTextarea:aTextarea},$globals.SourceArea)});
  1245. //>>excludeEnd("ctx");
  1246. },
  1247. //>>excludeStart("ide", pragmas.excludeIdeData);
  1248. args: ["aTextarea"],
  1249. 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})>",
  1250. referencedClasses: [],
  1251. //>>excludeEnd("ide");
  1252. messageSends: []
  1253. }),
  1254. $globals.SourceArea);
  1255. $core.addMethod(
  1256. $core.method({
  1257. selector: "val",
  1258. protocol: 'accessing',
  1259. fn: function (){
  1260. var self=this;
  1261. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1262. return $core.withContext(function($ctx1) {
  1263. //>>excludeEnd("ctx");
  1264. return $recv(self["@editor"])._getValue();
  1265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1266. }, function($ctx1) {$ctx1.fill(self,"val",{},$globals.SourceArea)});
  1267. //>>excludeEnd("ctx");
  1268. },
  1269. //>>excludeStart("ide", pragmas.excludeIdeData);
  1270. args: [],
  1271. source: "val\x0a\x09^ editor getValue",
  1272. referencedClasses: [],
  1273. //>>excludeEnd("ide");
  1274. messageSends: ["getValue"]
  1275. }),
  1276. $globals.SourceArea);
  1277. $core.addMethod(
  1278. $core.method({
  1279. selector: "val:",
  1280. protocol: 'accessing',
  1281. fn: function (aString){
  1282. var self=this;
  1283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1284. return $core.withContext(function($ctx1) {
  1285. //>>excludeEnd("ctx");
  1286. $recv(self["@editor"])._setValue_(aString);
  1287. return self;
  1288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1289. }, function($ctx1) {$ctx1.fill(self,"val:",{aString:aString},$globals.SourceArea)});
  1290. //>>excludeEnd("ctx");
  1291. },
  1292. //>>excludeStart("ide", pragmas.excludeIdeData);
  1293. args: ["aString"],
  1294. source: "val: aString\x0a\x09editor setValue: aString",
  1295. referencedClasses: [],
  1296. //>>excludeEnd("ide");
  1297. messageSends: ["setValue:"]
  1298. }),
  1299. $globals.SourceArea);
  1300. $core.addMethod(
  1301. $core.method({
  1302. selector: "codeMirror",
  1303. protocol: 'accessing',
  1304. fn: function (){
  1305. var self=this;
  1306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1307. return $core.withContext(function($ctx1) {
  1308. //>>excludeEnd("ctx");
  1309. return $recv(require)._value_("codemirror/lib/codemirror");
  1310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1311. }, function($ctx1) {$ctx1.fill(self,"codeMirror",{},$globals.SourceArea.klass)});
  1312. //>>excludeEnd("ctx");
  1313. },
  1314. //>>excludeStart("ide", pragmas.excludeIdeData);
  1315. args: [],
  1316. source: "codeMirror\x0a\x09^ require value: 'codemirror/lib/codemirror'",
  1317. referencedClasses: [],
  1318. //>>excludeEnd("ide");
  1319. messageSends: ["value:"]
  1320. }),
  1321. $globals.SourceArea.klass);
  1322. $core.addMethod(
  1323. $core.method({
  1324. selector: "initialize",
  1325. protocol: 'initialization',
  1326. fn: function (){
  1327. var self=this;
  1328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1329. return $core.withContext(function($ctx1) {
  1330. //>>excludeEnd("ctx");
  1331. (
  1332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1333. $ctx1.supercall = true,
  1334. //>>excludeEnd("ctx");
  1335. ($globals.SourceArea.klass.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  1336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1337. $ctx1.supercall = false;
  1338. //>>excludeEnd("ctx");;
  1339. self._setupCodeMirror();
  1340. return self;
  1341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1342. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.SourceArea.klass)});
  1343. //>>excludeEnd("ctx");
  1344. },
  1345. //>>excludeStart("ide", pragmas.excludeIdeData);
  1346. args: [],
  1347. source: "initialize\x0a\x09super initialize.\x0a\x09self setupCodeMirror",
  1348. referencedClasses: [],
  1349. //>>excludeEnd("ide");
  1350. messageSends: ["initialize", "setupCodeMirror"]
  1351. }),
  1352. $globals.SourceArea.klass);
  1353. $core.addMethod(
  1354. $core.method({
  1355. selector: "setupCodeMirror",
  1356. protocol: 'initialization',
  1357. fn: function (){
  1358. var self=this;
  1359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1360. return $core.withContext(function($ctx1) {
  1361. //>>excludeEnd("ctx");
  1362. self._codeMirror().keyMap["default"].fallthrough = ["basic"] ;
  1363. return self;
  1364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1365. }, function($ctx1) {$ctx1.fill(self,"setupCodeMirror",{},$globals.SourceArea.klass)});
  1366. //>>excludeEnd("ctx");
  1367. },
  1368. //>>excludeStart("ide", pragmas.excludeIdeData);
  1369. args: [],
  1370. source: "setupCodeMirror\x0a\x09< self._codeMirror().keyMap[\x22default\x22].fallthrough = [\x22basic\x22] >",
  1371. referencedClasses: [],
  1372. //>>excludeEnd("ide");
  1373. messageSends: []
  1374. }),
  1375. $globals.SourceArea.klass);
  1376. $core.addClass('TabManager', $globals.Widget, ['selectedTab', 'tabs', 'opened', 'ul', 'input'], 'IDE');
  1377. $core.addMethod(
  1378. $core.method({
  1379. selector: "addTab:",
  1380. protocol: 'adding/Removing',
  1381. fn: function (aWidget){
  1382. var self=this;
  1383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1384. return $core.withContext(function($ctx1) {
  1385. //>>excludeEnd("ctx");
  1386. $recv(self._tabs())._add_(aWidget);
  1387. $recv(aWidget)._appendToJQuery_("#amber"._asJQuery());
  1388. $recv(aWidget)._hide();
  1389. return self;
  1390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1391. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aWidget:aWidget},$globals.TabManager)});
  1392. //>>excludeEnd("ctx");
  1393. },
  1394. //>>excludeStart("ide", pragmas.excludeIdeData);
  1395. args: ["aWidget"],
  1396. source: "addTab: aWidget\x0a\x09self tabs add: aWidget.\x0a\x09aWidget appendToJQuery: '#amber' asJQuery.\x0a\x09aWidget hide",
  1397. referencedClasses: [],
  1398. //>>excludeEnd("ide");
  1399. messageSends: ["add:", "tabs", "appendToJQuery:", "asJQuery", "hide"]
  1400. }),
  1401. $globals.TabManager);
  1402. $core.addMethod(
  1403. $core.method({
  1404. selector: "close",
  1405. protocol: 'actions',
  1406. fn: function (){
  1407. var self=this;
  1408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1409. return $core.withContext(function($ctx1) {
  1410. //>>excludeEnd("ctx");
  1411. var $1,$2,$3;
  1412. $1=self["@opened"];
  1413. if($core.assert($1)){
  1414. $2="#amber"._asJQuery();
  1415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1416. $ctx1.sendIdx["asJQuery"]=1;
  1417. //>>excludeEnd("ctx");
  1418. $recv($2)._hide();
  1419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1420. $ctx1.sendIdx["hide"]=1;
  1421. //>>excludeEnd("ctx");
  1422. $3=$recv(self["@ul"])._asJQuery();
  1423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1424. $ctx1.sendIdx["asJQuery"]=2;
  1425. //>>excludeEnd("ctx");
  1426. $recv($3)._hide();
  1427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1428. $ctx1.sendIdx["hide"]=2;
  1429. //>>excludeEnd("ctx");
  1430. $recv(self["@selectedTab"])._hide();
  1431. self._removeBodyMargin();
  1432. $recv("body"._asJQuery())._removeClass_("amberBody");
  1433. self["@opened"]=false;
  1434. self["@opened"];
  1435. };
  1436. return self;
  1437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1438. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.TabManager)});
  1439. //>>excludeEnd("ctx");
  1440. },
  1441. //>>excludeStart("ide", pragmas.excludeIdeData);
  1442. args: [],
  1443. 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 ]",
  1444. referencedClasses: [],
  1445. //>>excludeEnd("ide");
  1446. messageSends: ["ifTrue:", "hide", "asJQuery", "removeBodyMargin", "removeClass:"]
  1447. }),
  1448. $globals.TabManager);
  1449. $core.addMethod(
  1450. $core.method({
  1451. selector: "closeTab:",
  1452. protocol: 'actions',
  1453. fn: function (aWidget){
  1454. var self=this;
  1455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1456. return $core.withContext(function($ctx1) {
  1457. //>>excludeEnd("ctx");
  1458. self._removeTab_(aWidget);
  1459. self._selectTab_($recv(self._tabs())._last());
  1460. $recv(aWidget)._remove();
  1461. self._update();
  1462. return self;
  1463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1464. }, function($ctx1) {$ctx1.fill(self,"closeTab:",{aWidget:aWidget},$globals.TabManager)});
  1465. //>>excludeEnd("ctx");
  1466. },
  1467. //>>excludeStart("ide", pragmas.excludeIdeData);
  1468. args: ["aWidget"],
  1469. source: "closeTab: aWidget\x0a\x09self removeTab: aWidget.\x0a\x09self selectTab: self tabs last.\x0a\x09aWidget remove.\x0a\x09self update",
  1470. referencedClasses: [],
  1471. //>>excludeEnd("ide");
  1472. messageSends: ["removeTab:", "selectTab:", "last", "tabs", "remove", "update"]
  1473. }),
  1474. $globals.TabManager);
  1475. $core.addMethod(
  1476. $core.method({
  1477. selector: "initialize",
  1478. protocol: 'initialization',
  1479. fn: function (){
  1480. var self=this;
  1481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1482. return $core.withContext(function($ctx1) {
  1483. //>>excludeEnd("ctx");
  1484. var $1,$2,$3,$4,$5;
  1485. (
  1486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1487. $ctx1.supercall = true,
  1488. //>>excludeEnd("ctx");
  1489. ($globals.TabManager.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  1490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1491. $ctx1.supercall = false;
  1492. //>>excludeEnd("ctx");;
  1493. $recv($globals.Inspector)._register_($globals.IDEInspector);
  1494. self["@opened"]=true;
  1495. $1=(function(html){
  1496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1497. return $core.withContext(function($ctx2) {
  1498. //>>excludeEnd("ctx");
  1499. return $recv($recv(html)._div())._id_("amber");
  1500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1501. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1502. //>>excludeEnd("ctx");
  1503. });
  1504. $2="body"._asJQuery();
  1505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1506. $ctx1.sendIdx["asJQuery"]=1;
  1507. //>>excludeEnd("ctx");
  1508. $recv($1)._appendToJQuery_($2);
  1509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1510. $ctx1.sendIdx["appendToJQuery:"]=1;
  1511. //>>excludeEnd("ctx");
  1512. $3="body"._asJQuery();
  1513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1514. $ctx1.sendIdx["asJQuery"]=2;
  1515. //>>excludeEnd("ctx");
  1516. $recv($3)._addClass_("amberBody");
  1517. self._appendToJQuery_("#amber"._asJQuery());
  1518. self._addTab_($recv($globals.IDETranscript)._current());
  1519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1520. $ctx1.sendIdx["addTab:"]=1;
  1521. //>>excludeEnd("ctx");
  1522. $4=$recv($globals.Workspace)._new();
  1523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1524. $ctx1.sendIdx["new"]=1;
  1525. //>>excludeEnd("ctx");
  1526. self._addTab_($4);
  1527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1528. $ctx1.sendIdx["addTab:"]=2;
  1529. //>>excludeEnd("ctx");
  1530. self._addTab_($recv($globals.TestRunner)._new());
  1531. self._selectTab_($recv(self._tabs())._last());
  1532. self._onResize_((function(){
  1533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1534. return $core.withContext(function($ctx2) {
  1535. //>>excludeEnd("ctx");
  1536. self._updateBodyMargin();
  1537. $5=self._updatePosition();
  1538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1539. $ctx2.sendIdx["updatePosition"]=1;
  1540. //>>excludeEnd("ctx");
  1541. return $5;
  1542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1543. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1544. //>>excludeEnd("ctx");
  1545. }));
  1546. self._onWindowResize_((function(){
  1547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1548. return $core.withContext(function($ctx2) {
  1549. //>>excludeEnd("ctx");
  1550. return self._updatePosition();
  1551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1552. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1553. //>>excludeEnd("ctx");
  1554. }));
  1555. return self;
  1556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1557. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.TabManager)});
  1558. //>>excludeEnd("ctx");
  1559. },
  1560. //>>excludeStart("ide", pragmas.excludeIdeData);
  1561. args: [],
  1562. 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 ]",
  1563. referencedClasses: ["Inspector", "IDEInspector", "IDETranscript", "Workspace", "TestRunner"],
  1564. //>>excludeEnd("ide");
  1565. messageSends: ["initialize", "register:", "appendToJQuery:", "id:", "div", "asJQuery", "addClass:", "addTab:", "current", "new", "selectTab:", "last", "tabs", "onResize:", "updateBodyMargin", "updatePosition", "onWindowResize:"]
  1566. }),
  1567. $globals.TabManager);
  1568. $core.addMethod(
  1569. $core.method({
  1570. selector: "labelFor:",
  1571. protocol: 'accessing',
  1572. fn: function (aWidget){
  1573. var self=this;
  1574. var label,maxSize;
  1575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1576. return $core.withContext(function($ctx1) {
  1577. //>>excludeEnd("ctx");
  1578. var $1,$4,$3,$2,$5;
  1579. maxSize=(15);
  1580. $1=$recv(aWidget)._label();
  1581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1582. $ctx1.sendIdx["label"]=1;
  1583. //>>excludeEnd("ctx");
  1584. $4=$recv(aWidget)._label();
  1585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1586. $ctx1.sendIdx["label"]=2;
  1587. //>>excludeEnd("ctx");
  1588. $3=$recv($4)._size();
  1589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1590. $ctx1.sendIdx["size"]=1;
  1591. //>>excludeEnd("ctx");
  1592. $2=$recv($3)._min_(maxSize);
  1593. label=$recv($1)._copyFrom_to_((0),$2);
  1594. $5=$recv($recv($recv(aWidget)._label())._size()).__gt(maxSize);
  1595. if($core.assert($5)){
  1596. label=$recv(label).__comma("...");
  1597. label;
  1598. };
  1599. return label;
  1600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1601. }, function($ctx1) {$ctx1.fill(self,"labelFor:",{aWidget:aWidget,label:label,maxSize:maxSize},$globals.TabManager)});
  1602. //>>excludeEnd("ctx");
  1603. },
  1604. //>>excludeStart("ide", pragmas.excludeIdeData);
  1605. args: ["aWidget"],
  1606. 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",
  1607. referencedClasses: [],
  1608. //>>excludeEnd("ide");
  1609. messageSends: ["copyFrom:to:", "label", "min:", "size", "ifTrue:", ">", ","]
  1610. }),
  1611. $globals.TabManager);
  1612. $core.addMethod(
  1613. $core.method({
  1614. selector: "newBrowserTab",
  1615. protocol: 'actions',
  1616. fn: function (){
  1617. var self=this;
  1618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1619. return $core.withContext(function($ctx1) {
  1620. //>>excludeEnd("ctx");
  1621. $recv($globals.Browser)._open();
  1622. return self;
  1623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1624. }, function($ctx1) {$ctx1.fill(self,"newBrowserTab",{},$globals.TabManager)});
  1625. //>>excludeEnd("ctx");
  1626. },
  1627. //>>excludeStart("ide", pragmas.excludeIdeData);
  1628. args: [],
  1629. source: "newBrowserTab\x0a\x09Browser open",
  1630. referencedClasses: ["Browser"],
  1631. //>>excludeEnd("ide");
  1632. messageSends: ["open"]
  1633. }),
  1634. $globals.TabManager);
  1635. $core.addMethod(
  1636. $core.method({
  1637. selector: "onResize:",
  1638. protocol: 'actions',
  1639. fn: function (aBlock){
  1640. var self=this;
  1641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1642. return $core.withContext(function($ctx1) {
  1643. //>>excludeEnd("ctx");
  1644. $recv("#amber"._asJQuery())._resizable_($globals.HashedCollection._newFromPairs_(["handles","n","resize",aBlock,"minHeight",(230)]));
  1645. return self;
  1646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1647. }, function($ctx1) {$ctx1.fill(self,"onResize:",{aBlock:aBlock},$globals.TabManager)});
  1648. //>>excludeEnd("ctx");
  1649. },
  1650. //>>excludeStart("ide", pragmas.excludeIdeData);
  1651. args: ["aBlock"],
  1652. 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}",
  1653. referencedClasses: [],
  1654. //>>excludeEnd("ide");
  1655. messageSends: ["resizable:", "asJQuery"]
  1656. }),
  1657. $globals.TabManager);
  1658. $core.addMethod(
  1659. $core.method({
  1660. selector: "onWindowResize:",
  1661. protocol: 'actions',
  1662. fn: function (aBlock){
  1663. var self=this;
  1664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1665. return $core.withContext(function($ctx1) {
  1666. //>>excludeEnd("ctx");
  1667. $recv($recv(window)._asJQuery())._resize_(aBlock);
  1668. return self;
  1669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1670. }, function($ctx1) {$ctx1.fill(self,"onWindowResize:",{aBlock:aBlock},$globals.TabManager)});
  1671. //>>excludeEnd("ctx");
  1672. },
  1673. //>>excludeStart("ide", pragmas.excludeIdeData);
  1674. args: ["aBlock"],
  1675. source: "onWindowResize: aBlock\x0a\x09window asJQuery resize: aBlock",
  1676. referencedClasses: [],
  1677. //>>excludeEnd("ide");
  1678. messageSends: ["resize:", "asJQuery"]
  1679. }),
  1680. $globals.TabManager);
  1681. $core.addMethod(
  1682. $core.method({
  1683. selector: "open",
  1684. protocol: 'actions',
  1685. fn: function (){
  1686. var self=this;
  1687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1688. return $core.withContext(function($ctx1) {
  1689. //>>excludeEnd("ctx");
  1690. var $1,$2,$3;
  1691. $1=self["@opened"];
  1692. if(!$core.assert($1)){
  1693. $2="body"._asJQuery();
  1694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1695. $ctx1.sendIdx["asJQuery"]=1;
  1696. //>>excludeEnd("ctx");
  1697. $recv($2)._addClass_("amberBody");
  1698. $3="#amber"._asJQuery();
  1699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1700. $ctx1.sendIdx["asJQuery"]=2;
  1701. //>>excludeEnd("ctx");
  1702. $recv($3)._show();
  1703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1704. $ctx1.sendIdx["show"]=1;
  1705. //>>excludeEnd("ctx");
  1706. $recv($recv(self["@ul"])._asJQuery())._show();
  1707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1708. $ctx1.sendIdx["show"]=2;
  1709. //>>excludeEnd("ctx");
  1710. self._updateBodyMargin();
  1711. $recv(self["@selectedTab"])._show();
  1712. self["@opened"]=true;
  1713. self["@opened"];
  1714. };
  1715. return self;
  1716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1717. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabManager)});
  1718. //>>excludeEnd("ctx");
  1719. },
  1720. //>>excludeStart("ide", pragmas.excludeIdeData);
  1721. args: [],
  1722. 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 ]",
  1723. referencedClasses: [],
  1724. //>>excludeEnd("ide");
  1725. messageSends: ["ifFalse:", "addClass:", "asJQuery", "show", "updateBodyMargin"]
  1726. }),
  1727. $globals.TabManager);
  1728. $core.addMethod(
  1729. $core.method({
  1730. selector: "removeBodyMargin",
  1731. protocol: 'actions',
  1732. fn: function (){
  1733. var self=this;
  1734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1735. return $core.withContext(function($ctx1) {
  1736. //>>excludeEnd("ctx");
  1737. self._setBodyMargin_((0));
  1738. return self;
  1739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1740. }, function($ctx1) {$ctx1.fill(self,"removeBodyMargin",{},$globals.TabManager)});
  1741. //>>excludeEnd("ctx");
  1742. },
  1743. //>>excludeStart("ide", pragmas.excludeIdeData);
  1744. args: [],
  1745. source: "removeBodyMargin\x0a\x09self setBodyMargin: 0",
  1746. referencedClasses: [],
  1747. //>>excludeEnd("ide");
  1748. messageSends: ["setBodyMargin:"]
  1749. }),
  1750. $globals.TabManager);
  1751. $core.addMethod(
  1752. $core.method({
  1753. selector: "removeTab:",
  1754. protocol: 'adding/Removing',
  1755. fn: function (aWidget){
  1756. var self=this;
  1757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1758. return $core.withContext(function($ctx1) {
  1759. //>>excludeEnd("ctx");
  1760. $recv(self._tabs())._remove_(aWidget);
  1761. self._update();
  1762. return self;
  1763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1764. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aWidget:aWidget},$globals.TabManager)});
  1765. //>>excludeEnd("ctx");
  1766. },
  1767. //>>excludeStart("ide", pragmas.excludeIdeData);
  1768. args: ["aWidget"],
  1769. source: "removeTab: aWidget\x0a\x09self tabs remove: aWidget.\x0a\x09self update",
  1770. referencedClasses: [],
  1771. //>>excludeEnd("ide");
  1772. messageSends: ["remove:", "tabs", "update"]
  1773. }),
  1774. $globals.TabManager);
  1775. $core.addMethod(
  1776. $core.method({
  1777. selector: "renderOn:",
  1778. protocol: 'rendering',
  1779. fn: function (html){
  1780. var self=this;
  1781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1782. return $core.withContext(function($ctx1) {
  1783. //>>excludeEnd("ctx");
  1784. var $1;
  1785. $recv($recv(html)._div())._id_("logo");
  1786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1787. $ctx1.sendIdx["id:"]=1;
  1788. //>>excludeEnd("ctx");
  1789. self._renderToolbarOn_(html);
  1790. $1=$recv(html)._ul();
  1791. $recv($1)._id_("amberTabs");
  1792. self["@ul"]=$recv($1)._yourself();
  1793. self._renderTabs();
  1794. return self;
  1795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1796. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.TabManager)});
  1797. //>>excludeEnd("ctx");
  1798. },
  1799. //>>excludeStart("ide", pragmas.excludeIdeData);
  1800. args: ["html"],
  1801. 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",
  1802. referencedClasses: [],
  1803. //>>excludeEnd("ide");
  1804. messageSends: ["id:", "div", "renderToolbarOn:", "ul", "yourself", "renderTabs"]
  1805. }),
  1806. $globals.TabManager);
  1807. $core.addMethod(
  1808. $core.method({
  1809. selector: "renderTabFor:on:",
  1810. protocol: 'rendering',
  1811. fn: function (aWidget,html){
  1812. var self=this;
  1813. var li;
  1814. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1815. return $core.withContext(function($ctx1) {
  1816. //>>excludeEnd("ctx");
  1817. var $1,$2,$3,$4,$6,$7,$8,$9,$5;
  1818. li=$recv(html)._li();
  1819. $1=$recv(self["@selectedTab"]).__eq(aWidget);
  1820. if($core.assert($1)){
  1821. $recv(li)._class_("selected");
  1822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1823. $ctx1.sendIdx["class:"]=1;
  1824. //>>excludeEnd("ctx");
  1825. };
  1826. $2=li;
  1827. $recv($2)._with_((function(){
  1828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1829. return $core.withContext(function($ctx2) {
  1830. //>>excludeEnd("ctx");
  1831. $3=$recv(html)._span();
  1832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1833. $ctx2.sendIdx["span"]=1;
  1834. //>>excludeEnd("ctx");
  1835. $recv($3)._class_("ltab");
  1836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1837. $ctx2.sendIdx["class:"]=2;
  1838. //>>excludeEnd("ctx");
  1839. $4=$recv(html)._span();
  1840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1841. $ctx2.sendIdx["span"]=2;
  1842. //>>excludeEnd("ctx");
  1843. $recv($4)._class_("mtab");
  1844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1845. $ctx2.sendIdx["class:"]=3;
  1846. //>>excludeEnd("ctx");
  1847. $5=$recv($4)._with_((function(){
  1848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1849. return $core.withContext(function($ctx3) {
  1850. //>>excludeEnd("ctx");
  1851. $6=$recv(aWidget)._canBeClosed();
  1852. if($core.assert($6)){
  1853. $7=$recv(html)._span();
  1854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1855. $ctx3.sendIdx["span"]=3;
  1856. //>>excludeEnd("ctx");
  1857. $recv($7)._class_("close");
  1858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1859. $ctx3.sendIdx["class:"]=4;
  1860. //>>excludeEnd("ctx");
  1861. $recv($7)._with_("x");
  1862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1863. $ctx3.sendIdx["with:"]=3;
  1864. //>>excludeEnd("ctx");
  1865. $8=$recv($7)._onClick_((function(){
  1866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1867. return $core.withContext(function($ctx4) {
  1868. //>>excludeEnd("ctx");
  1869. return self._closeTab_(aWidget);
  1870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1871. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  1872. //>>excludeEnd("ctx");
  1873. }));
  1874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1875. $ctx3.sendIdx["onClick:"]=1;
  1876. //>>excludeEnd("ctx");
  1877. $8;
  1878. };
  1879. $9=$recv(html)._span();
  1880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1881. $ctx3.sendIdx["span"]=4;
  1882. //>>excludeEnd("ctx");
  1883. return $recv($9)._with_(self._labelFor_(aWidget));
  1884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1885. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1886. //>>excludeEnd("ctx");
  1887. }));
  1888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1889. $ctx2.sendIdx["with:"]=2;
  1890. //>>excludeEnd("ctx");
  1891. $5;
  1892. return $recv($recv(html)._span())._class_("rtab");
  1893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1894. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1895. //>>excludeEnd("ctx");
  1896. }));
  1897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1898. $ctx1.sendIdx["with:"]=1;
  1899. //>>excludeEnd("ctx");
  1900. $recv($2)._onClick_((function(){
  1901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1902. return $core.withContext(function($ctx2) {
  1903. //>>excludeEnd("ctx");
  1904. return self._selectTab_(aWidget);
  1905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1906. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  1907. //>>excludeEnd("ctx");
  1908. }));
  1909. return self;
  1910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1911. }, function($ctx1) {$ctx1.fill(self,"renderTabFor:on:",{aWidget:aWidget,html:html,li:li},$globals.TabManager)});
  1912. //>>excludeEnd("ctx");
  1913. },
  1914. //>>excludeStart("ide", pragmas.excludeIdeData);
  1915. args: ["aWidget", "html"],
  1916. 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 ]",
  1917. referencedClasses: [],
  1918. //>>excludeEnd("ide");
  1919. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "span", "canBeClosed", "onClick:", "closeTab:", "labelFor:", "selectTab:"]
  1920. }),
  1921. $globals.TabManager);
  1922. $core.addMethod(
  1923. $core.method({
  1924. selector: "renderTabs",
  1925. protocol: 'rendering',
  1926. fn: function (){
  1927. var self=this;
  1928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1929. return $core.withContext(function($ctx1) {
  1930. //>>excludeEnd("ctx");
  1931. var $1,$2,$3;
  1932. $recv(self["@ul"])._contents_((function(html){
  1933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1934. return $core.withContext(function($ctx2) {
  1935. //>>excludeEnd("ctx");
  1936. $recv(self._tabs())._do_((function(each){
  1937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1938. return $core.withContext(function($ctx3) {
  1939. //>>excludeEnd("ctx");
  1940. return self._renderTabFor_on_(each,html);
  1941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1942. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  1943. //>>excludeEnd("ctx");
  1944. }));
  1945. $1=$recv(html)._li();
  1946. $recv($1)._class_("newtab");
  1947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1948. $ctx2.sendIdx["class:"]=1;
  1949. //>>excludeEnd("ctx");
  1950. $recv($1)._with_((function(){
  1951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1952. return $core.withContext(function($ctx3) {
  1953. //>>excludeEnd("ctx");
  1954. $2=$recv(html)._span();
  1955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1956. $ctx3.sendIdx["span"]=1;
  1957. //>>excludeEnd("ctx");
  1958. $recv($2)._class_("ltab");
  1959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1960. $ctx3.sendIdx["class:"]=2;
  1961. //>>excludeEnd("ctx");
  1962. $3=$recv(html)._span();
  1963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1964. $ctx3.sendIdx["span"]=2;
  1965. //>>excludeEnd("ctx");
  1966. $recv($3)._class_("mtab");
  1967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1968. $ctx3.sendIdx["class:"]=3;
  1969. //>>excludeEnd("ctx");
  1970. $recv($3)._with_(" + ");
  1971. return $recv($recv(html)._span())._class_("rtab");
  1972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1973. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  1974. //>>excludeEnd("ctx");
  1975. }));
  1976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1977. $ctx2.sendIdx["with:"]=1;
  1978. //>>excludeEnd("ctx");
  1979. return $recv($1)._onClick_((function(){
  1980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1981. return $core.withContext(function($ctx3) {
  1982. //>>excludeEnd("ctx");
  1983. return self._newBrowserTab();
  1984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1985. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  1986. //>>excludeEnd("ctx");
  1987. }));
  1988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1989. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1990. //>>excludeEnd("ctx");
  1991. }));
  1992. return self;
  1993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1994. }, function($ctx1) {$ctx1.fill(self,"renderTabs",{},$globals.TabManager)});
  1995. //>>excludeEnd("ctx");
  1996. },
  1997. //>>excludeStart("ide", pragmas.excludeIdeData);
  1998. args: [],
  1999. 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 ]]",
  2000. referencedClasses: [],
  2001. //>>excludeEnd("ide");
  2002. messageSends: ["contents:", "do:", "tabs", "renderTabFor:on:", "class:", "li", "with:", "span", "onClick:", "newBrowserTab"]
  2003. }),
  2004. $globals.TabManager);
  2005. $core.addMethod(
  2006. $core.method({
  2007. selector: "renderToolbarOn:",
  2008. protocol: 'rendering',
  2009. fn: function (html){
  2010. var self=this;
  2011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2012. return $core.withContext(function($ctx1) {
  2013. //>>excludeEnd("ctx");
  2014. var $1,$2,$3,$4;
  2015. $1=$recv(html)._div();
  2016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2017. $ctx1.sendIdx["div"]=1;
  2018. //>>excludeEnd("ctx");
  2019. $recv($1)._id_("amber_toolbar");
  2020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2021. $ctx1.sendIdx["id:"]=1;
  2022. //>>excludeEnd("ctx");
  2023. $recv($1)._with_((function(){
  2024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2025. return $core.withContext(function($ctx2) {
  2026. //>>excludeEnd("ctx");
  2027. $2=$recv(html)._input();
  2028. $recv($2)._class_("implementors");
  2029. self["@input"]=$recv($2)._yourself();
  2030. self["@input"];
  2031. $recv(self["@input"])._onKeyPress_((function(event){
  2032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2033. return $core.withContext(function($ctx3) {
  2034. //>>excludeEnd("ctx");
  2035. $3=$recv($recv(event)._keyCode()).__eq((13));
  2036. if($core.assert($3)){
  2037. return self._search_($recv($recv(self["@input"])._asJQuery())._val());
  2038. };
  2039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2040. }, function($ctx3) {$ctx3.fillBlock({event:event},$ctx2,2)});
  2041. //>>excludeEnd("ctx");
  2042. }));
  2043. $4=$recv(html)._div();
  2044. $recv($4)._id_("amber_close");
  2045. return $recv($4)._onClick_((function(){
  2046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2047. return $core.withContext(function($ctx3) {
  2048. //>>excludeEnd("ctx");
  2049. return self._close();
  2050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2051. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  2052. //>>excludeEnd("ctx");
  2053. }));
  2054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2055. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2056. //>>excludeEnd("ctx");
  2057. }));
  2058. return self;
  2059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2060. }, function($ctx1) {$ctx1.fill(self,"renderToolbarOn:",{html:html},$globals.TabManager)});
  2061. //>>excludeEnd("ctx");
  2062. },
  2063. //>>excludeStart("ide", pragmas.excludeIdeData);
  2064. args: ["html"],
  2065. 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 ]]",
  2066. referencedClasses: [],
  2067. //>>excludeEnd("ide");
  2068. messageSends: ["id:", "div", "with:", "class:", "input", "yourself", "onKeyPress:", "ifTrue:", "=", "keyCode", "search:", "val", "asJQuery", "onClick:", "close"]
  2069. }),
  2070. $globals.TabManager);
  2071. $core.addMethod(
  2072. $core.method({
  2073. selector: "search:",
  2074. protocol: 'actions',
  2075. fn: function (aString){
  2076. var self=this;
  2077. var searchedClass;
  2078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2079. return $core.withContext(function($ctx1) {
  2080. //>>excludeEnd("ctx");
  2081. var $1;
  2082. searchedClass=$recv($recv($globals.Smalltalk)._globals())._at_(aString);
  2083. $1=$recv(searchedClass)._isClass();
  2084. if($core.assert($1)){
  2085. $recv($globals.Browser)._openOn_(searchedClass);
  2086. } else {
  2087. $recv($globals.ReferencesBrowser)._search_(aString);
  2088. };
  2089. return self;
  2090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2091. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString,searchedClass:searchedClass},$globals.TabManager)});
  2092. //>>excludeEnd("ctx");
  2093. },
  2094. //>>excludeStart("ide", pragmas.excludeIdeData);
  2095. args: ["aString"],
  2096. 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 ]",
  2097. referencedClasses: ["Smalltalk", "Browser", "ReferencesBrowser"],
  2098. //>>excludeEnd("ide");
  2099. messageSends: ["at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "search:"]
  2100. }),
  2101. $globals.TabManager);
  2102. $core.addMethod(
  2103. $core.method({
  2104. selector: "selectTab:",
  2105. protocol: 'actions',
  2106. fn: function (aWidget){
  2107. var self=this;
  2108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2109. return $core.withContext(function($ctx1) {
  2110. //>>excludeEnd("ctx");
  2111. self._open();
  2112. self["@selectedTab"]=aWidget;
  2113. $recv(self._tabs())._do_((function(each){
  2114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2115. return $core.withContext(function($ctx2) {
  2116. //>>excludeEnd("ctx");
  2117. return $recv(each)._hide();
  2118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2119. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  2120. //>>excludeEnd("ctx");
  2121. }));
  2122. $recv(aWidget)._show();
  2123. self._update();
  2124. return self;
  2125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2126. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aWidget:aWidget},$globals.TabManager)});
  2127. //>>excludeEnd("ctx");
  2128. },
  2129. //>>excludeStart("ide", pragmas.excludeIdeData);
  2130. args: ["aWidget"],
  2131. 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",
  2132. referencedClasses: [],
  2133. //>>excludeEnd("ide");
  2134. messageSends: ["open", "do:", "tabs", "hide", "show", "update"]
  2135. }),
  2136. $globals.TabManager);
  2137. $core.addMethod(
  2138. $core.method({
  2139. selector: "setBodyMargin:",
  2140. protocol: 'actions',
  2141. fn: function (anInteger){
  2142. var self=this;
  2143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2144. return $core.withContext(function($ctx1) {
  2145. //>>excludeEnd("ctx");
  2146. $recv(".amberBody"._asJQuery())._css_put_("margin-bottom",$recv($recv(anInteger)._asString()).__comma("px"));
  2147. return self;
  2148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2149. }, function($ctx1) {$ctx1.fill(self,"setBodyMargin:",{anInteger:anInteger},$globals.TabManager)});
  2150. //>>excludeEnd("ctx");
  2151. },
  2152. //>>excludeStart("ide", pragmas.excludeIdeData);
  2153. args: ["anInteger"],
  2154. source: "setBodyMargin: anInteger\x0a\x09'.amberBody' asJQuery css: 'margin-bottom' put: anInteger asString, 'px'",
  2155. referencedClasses: [],
  2156. //>>excludeEnd("ide");
  2157. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  2158. }),
  2159. $globals.TabManager);
  2160. $core.addMethod(
  2161. $core.method({
  2162. selector: "tabs",
  2163. protocol: 'accessing',
  2164. fn: function (){
  2165. var self=this;
  2166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2167. return $core.withContext(function($ctx1) {
  2168. //>>excludeEnd("ctx");
  2169. var $1,$receiver;
  2170. $1=self["@tabs"];
  2171. if(($receiver = $1) == null || $receiver.isNil){
  2172. self["@tabs"]=$recv($globals.Array)._new();
  2173. return self["@tabs"];
  2174. } else {
  2175. return $1;
  2176. };
  2177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2178. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.TabManager)});
  2179. //>>excludeEnd("ctx");
  2180. },
  2181. //>>excludeStart("ide", pragmas.excludeIdeData);
  2182. args: [],
  2183. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := Array new ]",
  2184. referencedClasses: ["Array"],
  2185. //>>excludeEnd("ide");
  2186. messageSends: ["ifNil:", "new"]
  2187. }),
  2188. $globals.TabManager);
  2189. $core.addMethod(
  2190. $core.method({
  2191. selector: "update",
  2192. protocol: 'updating',
  2193. fn: function (){
  2194. var self=this;
  2195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2196. return $core.withContext(function($ctx1) {
  2197. //>>excludeEnd("ctx");
  2198. self._renderTabs();
  2199. return self;
  2200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2201. }, function($ctx1) {$ctx1.fill(self,"update",{},$globals.TabManager)});
  2202. //>>excludeEnd("ctx");
  2203. },
  2204. //>>excludeStart("ide", pragmas.excludeIdeData);
  2205. args: [],
  2206. source: "update\x0a\x09self renderTabs",
  2207. referencedClasses: [],
  2208. //>>excludeEnd("ide");
  2209. messageSends: ["renderTabs"]
  2210. }),
  2211. $globals.TabManager);
  2212. $core.addMethod(
  2213. $core.method({
  2214. selector: "updateBodyMargin",
  2215. protocol: 'actions',
  2216. fn: function (){
  2217. var self=this;
  2218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2219. return $core.withContext(function($ctx1) {
  2220. //>>excludeEnd("ctx");
  2221. self._setBodyMargin_($recv("#amber"._asJQuery())._height());
  2222. return self;
  2223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2224. }, function($ctx1) {$ctx1.fill(self,"updateBodyMargin",{},$globals.TabManager)});
  2225. //>>excludeEnd("ctx");
  2226. },
  2227. //>>excludeStart("ide", pragmas.excludeIdeData);
  2228. args: [],
  2229. source: "updateBodyMargin\x0a\x09self setBodyMargin: '#amber' asJQuery height",
  2230. referencedClasses: [],
  2231. //>>excludeEnd("ide");
  2232. messageSends: ["setBodyMargin:", "height", "asJQuery"]
  2233. }),
  2234. $globals.TabManager);
  2235. $core.addMethod(
  2236. $core.method({
  2237. selector: "updatePosition",
  2238. protocol: 'actions',
  2239. fn: function (){
  2240. var self=this;
  2241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2242. return $core.withContext(function($ctx1) {
  2243. //>>excludeEnd("ctx");
  2244. var $1;
  2245. $1="#amber"._asJQuery();
  2246. $recv($1)._css_put_("top","");
  2247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2248. $ctx1.sendIdx["css:put:"]=1;
  2249. //>>excludeEnd("ctx");
  2250. $recv($1)._css_put_("bottom","0px");
  2251. return self;
  2252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2253. }, function($ctx1) {$ctx1.fill(self,"updatePosition",{},$globals.TabManager)});
  2254. //>>excludeEnd("ctx");
  2255. },
  2256. //>>excludeStart("ide", pragmas.excludeIdeData);
  2257. args: [],
  2258. source: "updatePosition\x0a\x09'#amber' asJQuery\x0a\x09\x09css: 'top' put: '';\x0a\x09\x09css: 'bottom' put: '0px'",
  2259. referencedClasses: [],
  2260. //>>excludeEnd("ide");
  2261. messageSends: ["css:put:", "asJQuery"]
  2262. }),
  2263. $globals.TabManager);
  2264. $globals.TabManager.klass.iVarNames = ['current'];
  2265. $core.addMethod(
  2266. $core.method({
  2267. selector: "current",
  2268. protocol: 'instance creation',
  2269. fn: function (){
  2270. var self=this;
  2271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2272. return $core.withContext(function($ctx1) {
  2273. //>>excludeEnd("ctx");
  2274. var $1,$receiver;
  2275. $1=self["@current"];
  2276. if(($receiver = $1) == null || $receiver.isNil){
  2277. self["@current"]=(
  2278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2279. $ctx1.supercall = true,
  2280. //>>excludeEnd("ctx");
  2281. ($globals.TabManager.klass.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
  2282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2283. $ctx1.supercall = false;
  2284. //>>excludeEnd("ctx");;
  2285. return self["@current"];
  2286. } else {
  2287. return $1;
  2288. };
  2289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2290. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.TabManager.klass)});
  2291. //>>excludeEnd("ctx");
  2292. },
  2293. //>>excludeStart("ide", pragmas.excludeIdeData);
  2294. args: [],
  2295. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  2296. referencedClasses: [],
  2297. //>>excludeEnd("ide");
  2298. messageSends: ["ifNil:", "new"]
  2299. }),
  2300. $globals.TabManager.klass);
  2301. $core.addMethod(
  2302. $core.method({
  2303. selector: "new",
  2304. protocol: 'instance creation',
  2305. fn: function (){
  2306. var self=this;
  2307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2308. return $core.withContext(function($ctx1) {
  2309. //>>excludeEnd("ctx");
  2310. self._shouldNotImplement();
  2311. return self;
  2312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2313. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.TabManager.klass)});
  2314. //>>excludeEnd("ctx");
  2315. },
  2316. //>>excludeStart("ide", pragmas.excludeIdeData);
  2317. args: [],
  2318. source: "new\x0a\x09self shouldNotImplement",
  2319. referencedClasses: [],
  2320. //>>excludeEnd("ide");
  2321. messageSends: ["shouldNotImplement"]
  2322. }),
  2323. $globals.TabManager.klass);
  2324. $core.addMethod(
  2325. $core.method({
  2326. selector: "toggleAmberIDE",
  2327. protocol: 'actions',
  2328. fn: function (){
  2329. var self=this;
  2330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2331. return $core.withContext(function($ctx1) {
  2332. //>>excludeEnd("ctx");
  2333. var $3,$2,$1,$4,$5;
  2334. $3="#amber"._asJQuery();
  2335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2336. $ctx1.sendIdx["asJQuery"]=1;
  2337. //>>excludeEnd("ctx");
  2338. $2=$recv($3)._length();
  2339. $1=$recv($2).__eq((0));
  2340. if($core.assert($1)){
  2341. $recv($globals.Browser)._open();
  2342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2343. $ctx1.sendIdx["open"]=1;
  2344. //>>excludeEnd("ctx");
  2345. } else {
  2346. $4=$recv("#amber"._asJQuery())._is_(":visible");
  2347. if($core.assert($4)){
  2348. $5=$recv($globals.TabManager)._current();
  2349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2350. $ctx1.sendIdx["current"]=1;
  2351. //>>excludeEnd("ctx");
  2352. $recv($5)._close();
  2353. } else {
  2354. $recv($recv($globals.TabManager)._current())._open();
  2355. };
  2356. };
  2357. return self;
  2358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2359. }, function($ctx1) {$ctx1.fill(self,"toggleAmberIDE",{},$globals.TabManager.klass)});
  2360. //>>excludeEnd("ctx");
  2361. },
  2362. //>>excludeStart("ide", pragmas.excludeIdeData);
  2363. args: [],
  2364. 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 ] ]",
  2365. referencedClasses: ["Browser", "TabManager"],
  2366. //>>excludeEnd("ide");
  2367. messageSends: ["ifTrue:ifFalse:", "=", "length", "asJQuery", "open", "is:", "close", "current"]
  2368. }),
  2369. $globals.TabManager.klass);
  2370. $core.addClass('TabWidget', $globals.Widget, ['div'], 'IDE');
  2371. $core.addMethod(
  2372. $core.method({
  2373. selector: "canBeClosed",
  2374. protocol: 'testing',
  2375. fn: function (){
  2376. var self=this;
  2377. return false;
  2378. },
  2379. //>>excludeStart("ide", pragmas.excludeIdeData);
  2380. args: [],
  2381. source: "canBeClosed\x0a\x09^ false",
  2382. referencedClasses: [],
  2383. //>>excludeEnd("ide");
  2384. messageSends: []
  2385. }),
  2386. $globals.TabWidget);
  2387. $core.addMethod(
  2388. $core.method({
  2389. selector: "close",
  2390. protocol: 'actions',
  2391. fn: function (){
  2392. var self=this;
  2393. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2394. return $core.withContext(function($ctx1) {
  2395. //>>excludeEnd("ctx");
  2396. $recv($recv($globals.TabManager)._current())._closeTab_(self);
  2397. return self;
  2398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2399. }, function($ctx1) {$ctx1.fill(self,"close",{},$globals.TabWidget)});
  2400. //>>excludeEnd("ctx");
  2401. },
  2402. //>>excludeStart("ide", pragmas.excludeIdeData);
  2403. args: [],
  2404. source: "close\x0a\x09TabManager current closeTab: self",
  2405. referencedClasses: ["TabManager"],
  2406. //>>excludeEnd("ide");
  2407. messageSends: ["closeTab:", "current"]
  2408. }),
  2409. $globals.TabWidget);
  2410. $core.addMethod(
  2411. $core.method({
  2412. selector: "hide",
  2413. protocol: 'actions',
  2414. fn: function (){
  2415. var self=this;
  2416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2417. return $core.withContext(function($ctx1) {
  2418. //>>excludeEnd("ctx");
  2419. $recv($recv(self["@div"])._asJQuery())._hide();
  2420. return self;
  2421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2422. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.TabWidget)});
  2423. //>>excludeEnd("ctx");
  2424. },
  2425. //>>excludeStart("ide", pragmas.excludeIdeData);
  2426. args: [],
  2427. source: "hide\x0a\x09div asJQuery hide",
  2428. referencedClasses: [],
  2429. //>>excludeEnd("ide");
  2430. messageSends: ["hide", "asJQuery"]
  2431. }),
  2432. $globals.TabWidget);
  2433. $core.addMethod(
  2434. $core.method({
  2435. selector: "label",
  2436. protocol: 'accessing',
  2437. fn: function (){
  2438. var self=this;
  2439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2440. return $core.withContext(function($ctx1) {
  2441. //>>excludeEnd("ctx");
  2442. self._subclassResponsibility();
  2443. return self;
  2444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2445. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.TabWidget)});
  2446. //>>excludeEnd("ctx");
  2447. },
  2448. //>>excludeStart("ide", pragmas.excludeIdeData);
  2449. args: [],
  2450. source: "label\x0a\x09self subclassResponsibility",
  2451. referencedClasses: [],
  2452. //>>excludeEnd("ide");
  2453. messageSends: ["subclassResponsibility"]
  2454. }),
  2455. $globals.TabWidget);
  2456. $core.addMethod(
  2457. $core.method({
  2458. selector: "open",
  2459. protocol: 'actions',
  2460. fn: function (){
  2461. var self=this;
  2462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2463. return $core.withContext(function($ctx1) {
  2464. //>>excludeEnd("ctx");
  2465. var $1;
  2466. $1=$recv($globals.TabManager)._current();
  2467. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2468. $ctx1.sendIdx["current"]=1;
  2469. //>>excludeEnd("ctx");
  2470. $recv($1)._addTab_(self);
  2471. $recv($recv($globals.TabManager)._current())._selectTab_(self);
  2472. return self;
  2473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2474. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabWidget)});
  2475. //>>excludeEnd("ctx");
  2476. },
  2477. //>>excludeStart("ide", pragmas.excludeIdeData);
  2478. args: [],
  2479. source: "open\x0a\x09TabManager current addTab: self.\x0a\x09TabManager current selectTab: self",
  2480. referencedClasses: ["TabManager"],
  2481. //>>excludeEnd("ide");
  2482. messageSends: ["addTab:", "current", "selectTab:"]
  2483. }),
  2484. $globals.TabWidget);
  2485. $core.addMethod(
  2486. $core.method({
  2487. selector: "remove",
  2488. protocol: 'actions',
  2489. fn: function (){
  2490. var self=this;
  2491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2492. return $core.withContext(function($ctx1) {
  2493. //>>excludeEnd("ctx");
  2494. $recv($recv(self["@div"])._asJQuery())._remove();
  2495. return self;
  2496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2497. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.TabWidget)});
  2498. //>>excludeEnd("ctx");
  2499. },
  2500. //>>excludeStart("ide", pragmas.excludeIdeData);
  2501. args: [],
  2502. source: "remove\x0a\x09div asJQuery remove",
  2503. referencedClasses: [],
  2504. //>>excludeEnd("ide");
  2505. messageSends: ["remove", "asJQuery"]
  2506. }),
  2507. $globals.TabWidget);
  2508. $core.addMethod(
  2509. $core.method({
  2510. selector: "renderBoxOn:",
  2511. protocol: 'rendering',
  2512. fn: function (html){
  2513. var self=this;
  2514. return self;
  2515. },
  2516. //>>excludeStart("ide", pragmas.excludeIdeData);
  2517. args: ["html"],
  2518. source: "renderBoxOn: html",
  2519. referencedClasses: [],
  2520. //>>excludeEnd("ide");
  2521. messageSends: []
  2522. }),
  2523. $globals.TabWidget);
  2524. $core.addMethod(
  2525. $core.method({
  2526. selector: "renderButtonsOn:",
  2527. protocol: 'rendering',
  2528. fn: function (html){
  2529. var self=this;
  2530. return self;
  2531. },
  2532. //>>excludeStart("ide", pragmas.excludeIdeData);
  2533. args: ["html"],
  2534. source: "renderButtonsOn: html",
  2535. referencedClasses: [],
  2536. //>>excludeEnd("ide");
  2537. messageSends: []
  2538. }),
  2539. $globals.TabWidget);
  2540. $core.addMethod(
  2541. $core.method({
  2542. selector: "renderOn:",
  2543. protocol: 'rendering',
  2544. fn: function (html){
  2545. var self=this;
  2546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2547. return $core.withContext(function($ctx1) {
  2548. //>>excludeEnd("ctx");
  2549. var $1;
  2550. $1=$recv(html)._div();
  2551. $recv($1)._class_("amberTool");
  2552. self["@div"]=$recv($1)._yourself();
  2553. self._renderTab();
  2554. return self;
  2555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2556. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.TabWidget)});
  2557. //>>excludeEnd("ctx");
  2558. },
  2559. //>>excludeStart("ide", pragmas.excludeIdeData);
  2560. args: ["html"],
  2561. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'amberTool';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  2562. referencedClasses: [],
  2563. //>>excludeEnd("ide");
  2564. messageSends: ["class:", "div", "yourself", "renderTab"]
  2565. }),
  2566. $globals.TabWidget);
  2567. $core.addMethod(
  2568. $core.method({
  2569. selector: "renderTab",
  2570. protocol: 'rendering',
  2571. fn: function (){
  2572. var self=this;
  2573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2574. return $core.withContext(function($ctx1) {
  2575. //>>excludeEnd("ctx");
  2576. var $1,$2,$3;
  2577. $recv(self["@div"])._contents_((function(html){
  2578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2579. return $core.withContext(function($ctx2) {
  2580. //>>excludeEnd("ctx");
  2581. $1=$recv(html)._div();
  2582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2583. $ctx2.sendIdx["div"]=1;
  2584. //>>excludeEnd("ctx");
  2585. $recv($1)._class_("amber_box");
  2586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2587. $ctx2.sendIdx["class:"]=1;
  2588. //>>excludeEnd("ctx");
  2589. $2=$recv($1)._with_((function(){
  2590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2591. return $core.withContext(function($ctx3) {
  2592. //>>excludeEnd("ctx");
  2593. return self._renderBoxOn_(html);
  2594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2595. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  2596. //>>excludeEnd("ctx");
  2597. }));
  2598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2599. $ctx2.sendIdx["with:"]=1;
  2600. //>>excludeEnd("ctx");
  2601. $2;
  2602. $3=$recv(html)._div();
  2603. $recv($3)._class_("amber_buttons");
  2604. return $recv($3)._with_((function(){
  2605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2606. return $core.withContext(function($ctx3) {
  2607. //>>excludeEnd("ctx");
  2608. return self._renderButtonsOn_(html);
  2609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2610. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  2611. //>>excludeEnd("ctx");
  2612. }));
  2613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2614. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  2615. //>>excludeEnd("ctx");
  2616. }));
  2617. return self;
  2618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2619. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.TabWidget)});
  2620. //>>excludeEnd("ctx");
  2621. },
  2622. //>>excludeStart("ide", pragmas.excludeIdeData);
  2623. args: [],
  2624. 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 ]]",
  2625. referencedClasses: [],
  2626. //>>excludeEnd("ide");
  2627. messageSends: ["contents:", "class:", "div", "with:", "renderBoxOn:", "renderButtonsOn:"]
  2628. }),
  2629. $globals.TabWidget);
  2630. $core.addMethod(
  2631. $core.method({
  2632. selector: "show",
  2633. protocol: 'actions',
  2634. fn: function (){
  2635. var self=this;
  2636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2637. return $core.withContext(function($ctx1) {
  2638. //>>excludeEnd("ctx");
  2639. $recv($recv(self["@div"])._asJQuery())._show();
  2640. return self;
  2641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2642. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.TabWidget)});
  2643. //>>excludeEnd("ctx");
  2644. },
  2645. //>>excludeStart("ide", pragmas.excludeIdeData);
  2646. args: [],
  2647. source: "show\x0a\x09div asJQuery show",
  2648. referencedClasses: [],
  2649. //>>excludeEnd("ide");
  2650. messageSends: ["show", "asJQuery"]
  2651. }),
  2652. $globals.TabWidget);
  2653. $core.addMethod(
  2654. $core.method({
  2655. selector: "update",
  2656. protocol: 'rendering',
  2657. fn: function (){
  2658. var self=this;
  2659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2660. return $core.withContext(function($ctx1) {
  2661. //>>excludeEnd("ctx");
  2662. self._renderTab();
  2663. return self;
  2664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2665. }, function($ctx1) {$ctx1.fill(self,"update",{},$globals.TabWidget)});
  2666. //>>excludeEnd("ctx");
  2667. },
  2668. //>>excludeStart("ide", pragmas.excludeIdeData);
  2669. args: [],
  2670. source: "update\x0a\x09self renderTab",
  2671. referencedClasses: [],
  2672. //>>excludeEnd("ide");
  2673. messageSends: ["renderTab"]
  2674. }),
  2675. $globals.TabWidget);
  2676. $core.addMethod(
  2677. $core.method({
  2678. selector: "open",
  2679. protocol: 'instance creation',
  2680. fn: function (){
  2681. var self=this;
  2682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2683. return $core.withContext(function($ctx1) {
  2684. //>>excludeEnd("ctx");
  2685. return $recv(self._new())._open();
  2686. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2687. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.TabWidget.klass)});
  2688. //>>excludeEnd("ctx");
  2689. },
  2690. //>>excludeStart("ide", pragmas.excludeIdeData);
  2691. args: [],
  2692. source: "open\x0a\x09^ self new open",
  2693. referencedClasses: [],
  2694. //>>excludeEnd("ide");
  2695. messageSends: ["open", "new"]
  2696. }),
  2697. $globals.TabWidget.klass);
  2698. $core.addClass('Browser', $globals.TabWidget, ['selectedPackage', 'selectedClass', 'selectedProtocol', 'selectedMethod', 'packagesList', 'classesList', 'protocolsList', 'methodsList', 'sourceArea', 'tabsList', 'selectedTab', 'saveButton', 'classButtons', 'methodButtons', 'unsavedChanges'], 'IDE');
  2699. $core.addMethod(
  2700. $core.method({
  2701. selector: "addInstanceVariableNamed:toClass:",
  2702. protocol: 'actions',
  2703. fn: function (aString,aClass){
  2704. var self=this;
  2705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2706. return $core.withContext(function($ctx1) {
  2707. //>>excludeEnd("ctx");
  2708. var $1,$2,$3,$5,$4;
  2709. $1=$recv($globals.ClassBuilder)._new();
  2710. $2=$recv(aClass)._superclass();
  2711. $3=$recv(aClass)._name();
  2712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2713. $ctx1.sendIdx["name"]=1;
  2714. //>>excludeEnd("ctx");
  2715. $5=$recv($recv(aClass)._instanceVariableNames())._copy();
  2716. $recv($5)._add_(aString);
  2717. $4=$recv($5)._yourself();
  2718. $recv($1)._addSubclassOf_named_instanceVariableNames_package_($2,$3,$4,$recv($recv(aClass)._package())._name());
  2719. return self;
  2720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2721. }, function($ctx1) {$ctx1.fill(self,"addInstanceVariableNamed:toClass:",{aString:aString,aClass:aClass},$globals.Browser)});
  2722. //>>excludeEnd("ctx");
  2723. },
  2724. //>>excludeStart("ide", pragmas.excludeIdeData);
  2725. args: ["aString", "aClass"],
  2726. 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",
  2727. referencedClasses: ["ClassBuilder"],
  2728. //>>excludeEnd("ide");
  2729. messageSends: ["addSubclassOf:named:instanceVariableNames:package:", "new", "superclass", "name", "add:", "copy", "instanceVariableNames", "yourself", "package"]
  2730. }),
  2731. $globals.Browser);
  2732. $core.addMethod(
  2733. $core.method({
  2734. selector: "addNewClass",
  2735. protocol: 'actions',
  2736. fn: function (){
  2737. var self=this;
  2738. var className;
  2739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2740. return $core.withContext(function($ctx1) {
  2741. //>>excludeEnd("ctx");
  2742. var $1;
  2743. className=$recv($globals.Terminal)._prompt_("New class");
  2744. $1=$recv($recv(className)._notNil())._and_((function(){
  2745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2746. return $core.withContext(function($ctx2) {
  2747. //>>excludeEnd("ctx");
  2748. return $recv(className)._notEmpty();
  2749. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2750. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2751. //>>excludeEnd("ctx");
  2752. }));
  2753. if($core.assert($1)){
  2754. $recv($globals.Object)._subclass_instanceVariableNames_package_(className,"",self._selectedPackage());
  2755. self._resetClassesList();
  2756. self._updateClassesList();
  2757. self._selectClass_($recv($recv($globals.Smalltalk)._globals())._at_(className));
  2758. };
  2759. return self;
  2760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2761. }, function($ctx1) {$ctx1.fill(self,"addNewClass",{className:className},$globals.Browser)});
  2762. //>>excludeEnd("ctx");
  2763. },
  2764. //>>excludeStart("ide", pragmas.excludeIdeData);
  2765. args: [],
  2766. 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) ]",
  2767. referencedClasses: ["Terminal", "Object", "Smalltalk"],
  2768. //>>excludeEnd("ide");
  2769. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "subclass:instanceVariableNames:package:", "selectedPackage", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"]
  2770. }),
  2771. $globals.Browser);
  2772. $core.addMethod(
  2773. $core.method({
  2774. selector: "addNewProtocol",
  2775. protocol: 'actions',
  2776. fn: function (){
  2777. var self=this;
  2778. var newProtocol;
  2779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2780. return $core.withContext(function($ctx1) {
  2781. //>>excludeEnd("ctx");
  2782. var $1;
  2783. newProtocol=$recv($globals.Terminal)._prompt_("New method protocol");
  2784. $1=$recv($recv(newProtocol)._notNil())._and_((function(){
  2785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2786. return $core.withContext(function($ctx2) {
  2787. //>>excludeEnd("ctx");
  2788. return $recv(newProtocol)._notEmpty();
  2789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2790. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2791. //>>excludeEnd("ctx");
  2792. }));
  2793. if($core.assert($1)){
  2794. $recv(self["@selectedMethod"])._protocol_(newProtocol);
  2795. self._setMethodProtocol_(newProtocol);
  2796. };
  2797. return self;
  2798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2799. }, function($ctx1) {$ctx1.fill(self,"addNewProtocol",{newProtocol:newProtocol},$globals.Browser)});
  2800. //>>excludeEnd("ctx");
  2801. },
  2802. //>>excludeStart("ide", pragmas.excludeIdeData);
  2803. args: [],
  2804. 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 ]",
  2805. referencedClasses: ["Terminal"],
  2806. //>>excludeEnd("ide");
  2807. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "protocol:", "setMethodProtocol:"]
  2808. }),
  2809. $globals.Browser);
  2810. $core.addMethod(
  2811. $core.method({
  2812. selector: "canBeClosed",
  2813. protocol: 'testing',
  2814. fn: function (){
  2815. var self=this;
  2816. return true;
  2817. },
  2818. //>>excludeStart("ide", pragmas.excludeIdeData);
  2819. args: [],
  2820. source: "canBeClosed\x0a\x09^ true",
  2821. referencedClasses: [],
  2822. //>>excludeEnd("ide");
  2823. messageSends: []
  2824. }),
  2825. $globals.Browser);
  2826. $core.addMethod(
  2827. $core.method({
  2828. selector: "cancelChanges",
  2829. protocol: 'actions',
  2830. fn: function (){
  2831. var self=this;
  2832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2833. return $core.withContext(function($ctx1) {
  2834. //>>excludeEnd("ctx");
  2835. var $1;
  2836. $1=self["@unsavedChanges"];
  2837. if($core.assert($1)){
  2838. return $recv($globals.Terminal)._confirm_("Cancel changes?");
  2839. } else {
  2840. return true;
  2841. };
  2842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2843. }, function($ctx1) {$ctx1.fill(self,"cancelChanges",{},$globals.Browser)});
  2844. //>>excludeEnd("ctx");
  2845. },
  2846. //>>excludeStart("ide", pragmas.excludeIdeData);
  2847. args: [],
  2848. source: "cancelChanges\x0a\x09^ unsavedChanges\x0a\x09ifTrue: [ Terminal confirm: 'Cancel changes?' ]\x0a\x09ifFalse: [ true ]",
  2849. referencedClasses: ["Terminal"],
  2850. //>>excludeEnd("ide");
  2851. messageSends: ["ifTrue:ifFalse:", "confirm:"]
  2852. }),
  2853. $globals.Browser);
  2854. $core.addMethod(
  2855. $core.method({
  2856. selector: "classCommentSource",
  2857. protocol: 'accessing',
  2858. fn: function (){
  2859. var self=this;
  2860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2861. return $core.withContext(function($ctx1) {
  2862. //>>excludeEnd("ctx");
  2863. return $recv(self["@selectedClass"])._comment();
  2864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2865. }, function($ctx1) {$ctx1.fill(self,"classCommentSource",{},$globals.Browser)});
  2866. //>>excludeEnd("ctx");
  2867. },
  2868. //>>excludeStart("ide", pragmas.excludeIdeData);
  2869. args: [],
  2870. source: "classCommentSource\x0a\x09^ selectedClass comment",
  2871. referencedClasses: [],
  2872. //>>excludeEnd("ide");
  2873. messageSends: ["comment"]
  2874. }),
  2875. $globals.Browser);
  2876. $core.addMethod(
  2877. $core.method({
  2878. selector: "classDeclarationSource",
  2879. protocol: 'accessing',
  2880. fn: function (){
  2881. var self=this;
  2882. var stream;
  2883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2884. return $core.withContext(function($ctx1) {
  2885. //>>excludeEnd("ctx");
  2886. var $1,$2,$4,$5,$3,$6,$7,$8,$receiver;
  2887. stream=""._writeStream();
  2888. $1=self["@selectedClass"];
  2889. if(($receiver = $1) == null || $receiver.isNil){
  2890. return self._classDeclarationTemplate();
  2891. } else {
  2892. $1;
  2893. };
  2894. $2=stream;
  2895. $recv($2)._nextPutAll_($recv($recv(self["@selectedClass"])._superclass())._asString());
  2896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2897. $ctx1.sendIdx["nextPutAll:"]=1;
  2898. //>>excludeEnd("ctx");
  2899. $recv($2)._nextPutAll_(" subclass: #");
  2900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2901. $ctx1.sendIdx["nextPutAll:"]=2;
  2902. //>>excludeEnd("ctx");
  2903. $recv($2)._nextPutAll_($recv(self["@selectedClass"])._name());
  2904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2905. $ctx1.sendIdx["nextPutAll:"]=3;
  2906. //>>excludeEnd("ctx");
  2907. $4=$recv($globals.String)._lf();
  2908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2909. $ctx1.sendIdx["lf"]=1;
  2910. //>>excludeEnd("ctx");
  2911. $5=$recv($globals.String)._tab();
  2912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2913. $ctx1.sendIdx["tab"]=1;
  2914. //>>excludeEnd("ctx");
  2915. $3=$recv($4).__comma($5);
  2916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2917. $ctx1.sendIdx[","]=1;
  2918. //>>excludeEnd("ctx");
  2919. $recv($2)._nextPutAll_($3);
  2920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2921. $ctx1.sendIdx["nextPutAll:"]=4;
  2922. //>>excludeEnd("ctx");
  2923. $6=$recv($2)._nextPutAll_("instanceVariableNames: '");
  2924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2925. $ctx1.sendIdx["nextPutAll:"]=5;
  2926. //>>excludeEnd("ctx");
  2927. $recv($recv(self["@selectedClass"])._instanceVariableNames())._do_separatedBy_((function(each){
  2928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2929. return $core.withContext(function($ctx2) {
  2930. //>>excludeEnd("ctx");
  2931. return $recv(stream)._nextPutAll_(each);
  2932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2933. $ctx2.sendIdx["nextPutAll:"]=6;
  2934. //>>excludeEnd("ctx");
  2935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2936. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  2937. //>>excludeEnd("ctx");
  2938. }),(function(){
  2939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2940. return $core.withContext(function($ctx2) {
  2941. //>>excludeEnd("ctx");
  2942. return $recv(stream)._nextPutAll_(" ");
  2943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2944. $ctx2.sendIdx["nextPutAll:"]=7;
  2945. //>>excludeEnd("ctx");
  2946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2947. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  2948. //>>excludeEnd("ctx");
  2949. }));
  2950. $7=stream;
  2951. $8=$recv("'".__comma($recv($globals.String)._lf())).__comma($recv($globals.String)._tab());
  2952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2953. $ctx1.sendIdx[","]=2;
  2954. //>>excludeEnd("ctx");
  2955. $recv($7)._nextPutAll_($8);
  2956. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2957. $ctx1.sendIdx["nextPutAll:"]=8;
  2958. //>>excludeEnd("ctx");
  2959. $recv($7)._nextPutAll_("package: '");
  2960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2961. $ctx1.sendIdx["nextPutAll:"]=9;
  2962. //>>excludeEnd("ctx");
  2963. $recv($7)._nextPutAll_($recv(self["@selectedClass"])._category());
  2964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2965. $ctx1.sendIdx["nextPutAll:"]=10;
  2966. //>>excludeEnd("ctx");
  2967. $recv($7)._nextPutAll_("'");
  2968. return $recv(stream)._contents();
  2969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2970. }, function($ctx1) {$ctx1.fill(self,"classDeclarationSource",{stream:stream},$globals.Browser)});
  2971. //>>excludeEnd("ctx");
  2972. },
  2973. //>>excludeStart("ide", pragmas.excludeIdeData);
  2974. args: [],
  2975. source: "classDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNil: [ ^ self classDeclarationTemplate ].\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass superclass asString;\x0a\x09\x09nextPutAll: ' subclass: #';\x0a\x09\x09nextPutAll: selectedClass name;\x0a\x09\x09nextPutAll: String lf, String tab;\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream\x0a\x09\x09nextPutAll: '''', String lf, String tab;\x0a\x09\x09nextPutAll: 'package: ''';\x0a\x09\x09nextPutAll: selectedClass category;\x0a\x09\x09nextPutAll: ''''.\x0a\x09^ stream contents",
  2976. referencedClasses: ["String"],
  2977. //>>excludeEnd("ide");
  2978. messageSends: ["writeStream", "ifNil:", "classDeclarationTemplate", "nextPutAll:", "asString", "superclass", "name", ",", "lf", "tab", "do:separatedBy:", "instanceVariableNames", "category", "contents"]
  2979. }),
  2980. $globals.Browser);
  2981. $core.addMethod(
  2982. $core.method({
  2983. selector: "classDeclarationTemplate",
  2984. protocol: 'accessing',
  2985. fn: function (){
  2986. var self=this;
  2987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2988. return $core.withContext(function($ctx1) {
  2989. //>>excludeEnd("ctx");
  2990. var $1;
  2991. $1=$recv("Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''\x0a\x09package: '".__comma(self._selectedPackage())).__comma("'");
  2992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2993. $ctx1.sendIdx[","]=1;
  2994. //>>excludeEnd("ctx");
  2995. return $1;
  2996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2997. }, function($ctx1) {$ctx1.fill(self,"classDeclarationTemplate",{},$globals.Browser)});
  2998. //>>excludeEnd("ctx");
  2999. },
  3000. //>>excludeStart("ide", pragmas.excludeIdeData);
  3001. args: [],
  3002. source: "classDeclarationTemplate\x0a\x09^ 'Object subclass: #NameOfSubclass\x0a\x09instanceVariableNames: ''''\x0a\x09package: ''', self selectedPackage, ''''",
  3003. referencedClasses: [],
  3004. //>>excludeEnd("ide");
  3005. messageSends: [",", "selectedPackage"]
  3006. }),
  3007. $globals.Browser);
  3008. $core.addMethod(
  3009. $core.method({
  3010. selector: "classes",
  3011. protocol: 'accessing',
  3012. fn: function (){
  3013. var self=this;
  3014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3015. return $core.withContext(function($ctx1) {
  3016. //>>excludeEnd("ctx");
  3017. var $1;
  3018. return $recv($recv($recv($recv($globals.Smalltalk)._classes())._select_((function(each){
  3019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3020. return $core.withContext(function($ctx2) {
  3021. //>>excludeEnd("ctx");
  3022. return $recv($recv(each)._category()).__eq(self["@selectedPackage"]);
  3023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3024. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3025. //>>excludeEnd("ctx");
  3026. })))._sort_((function(a,b){
  3027. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3028. return $core.withContext(function($ctx2) {
  3029. //>>excludeEnd("ctx");
  3030. $1=$recv(a)._name();
  3031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3032. $ctx2.sendIdx["name"]=1;
  3033. //>>excludeEnd("ctx");
  3034. return $recv($1).__lt($recv(b)._name());
  3035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3036. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)});
  3037. //>>excludeEnd("ctx");
  3038. })))._asSet();
  3039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3040. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.Browser)});
  3041. //>>excludeEnd("ctx");
  3042. },
  3043. //>>excludeStart("ide", pragmas.excludeIdeData);
  3044. args: [],
  3045. source: "classes\x0a\x09^ ((Smalltalk classes\x0a\x09select: [ :each | each category = selectedPackage ])\x0a\x09sort: [ :a :b | a name < b name ]) asSet",
  3046. referencedClasses: ["Smalltalk"],
  3047. //>>excludeEnd("ide");
  3048. messageSends: ["asSet", "sort:", "select:", "classes", "=", "category", "<", "name"]
  3049. }),
  3050. $globals.Browser);
  3051. $core.addMethod(
  3052. $core.method({
  3053. selector: "commitPackage",
  3054. protocol: 'actions',
  3055. fn: function (){
  3056. var self=this;
  3057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3058. return $core.withContext(function($ctx1) {
  3059. //>>excludeEnd("ctx");
  3060. var $1,$receiver;
  3061. $1=self["@selectedPackage"];
  3062. if(($receiver = $1) == null || $receiver.isNil){
  3063. $1;
  3064. } else {
  3065. $recv($recv($globals.Package)._named_(self["@selectedPackage"]))._commit();
  3066. };
  3067. return self;
  3068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3069. }, function($ctx1) {$ctx1.fill(self,"commitPackage",{},$globals.Browser)});
  3070. //>>excludeEnd("ctx");
  3071. },
  3072. //>>excludeStart("ide", pragmas.excludeIdeData);
  3073. args: [],
  3074. source: "commitPackage\x0a\x09selectedPackage ifNotNil: [\x0a\x09\x09(Package named: selectedPackage) commit ]",
  3075. referencedClasses: ["Package"],
  3076. //>>excludeEnd("ide");
  3077. messageSends: ["ifNotNil:", "commit", "named:"]
  3078. }),
  3079. $globals.Browser);
  3080. $core.addMethod(
  3081. $core.method({
  3082. selector: "compile",
  3083. protocol: 'actions',
  3084. fn: function (){
  3085. var self=this;
  3086. var currentEditLine;
  3087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3088. return $core.withContext(function($ctx1) {
  3089. //>>excludeEnd("ctx");
  3090. var $1,$2,$3,$5,$4,$receiver;
  3091. self._disableSaveButton();
  3092. $1=$recv(self["@sourceArea"])._editor();
  3093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3094. $ctx1.sendIdx["editor"]=1;
  3095. //>>excludeEnd("ctx");
  3096. currentEditLine=$recv($1)._getCursor();
  3097. $2=$recv(self["@selectedTab"]).__eq("comment");
  3098. if($core.assert($2)){
  3099. $3=self["@selectedClass"];
  3100. if(($receiver = $3) == null || $receiver.isNil){
  3101. $3;
  3102. } else {
  3103. self._compileClassComment();
  3104. };
  3105. } else {
  3106. $5=$recv(self["@selectedProtocol"])._notNil();
  3107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3108. $ctx1.sendIdx["notNil"]=1;
  3109. //>>excludeEnd("ctx");
  3110. $4=$recv($5)._or_((function(){
  3111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3112. return $core.withContext(function($ctx2) {
  3113. //>>excludeEnd("ctx");
  3114. return $recv(self["@selectedMethod"])._notNil();
  3115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  3117. //>>excludeEnd("ctx");
  3118. }));
  3119. if($core.assert($4)){
  3120. self._compileMethodDefinition();
  3121. } else {
  3122. self._compileDefinition();
  3123. };
  3124. };
  3125. $recv($recv(self["@sourceArea"])._editor())._setCursor_(currentEditLine);
  3126. return self;
  3127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3128. }, function($ctx1) {$ctx1.fill(self,"compile",{currentEditLine:currentEditLine},$globals.Browser)});
  3129. //>>excludeEnd("ctx");
  3130. },
  3131. //>>excludeStart("ide", pragmas.excludeIdeData);
  3132. args: [],
  3133. 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.",
  3134. referencedClasses: [],
  3135. //>>excludeEnd("ide");
  3136. messageSends: ["disableSaveButton", "getCursor", "editor", "ifTrue:ifFalse:", "=", "ifNotNil:", "compileClassComment", "ifFalse:ifTrue:", "or:", "notNil", "compileDefinition", "compileMethodDefinition", "setCursor:"]
  3137. }),
  3138. $globals.Browser);
  3139. $core.addMethod(
  3140. $core.method({
  3141. selector: "compileClassComment",
  3142. protocol: 'actions',
  3143. fn: function (){
  3144. var self=this;
  3145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3146. return $core.withContext(function($ctx1) {
  3147. //>>excludeEnd("ctx");
  3148. $recv(self["@selectedClass"])._comment_($recv(self["@sourceArea"])._val());
  3149. return self;
  3150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3151. }, function($ctx1) {$ctx1.fill(self,"compileClassComment",{},$globals.Browser)});
  3152. //>>excludeEnd("ctx");
  3153. },
  3154. //>>excludeStart("ide", pragmas.excludeIdeData);
  3155. args: [],
  3156. source: "compileClassComment\x0a\x09selectedClass comment: sourceArea val",
  3157. referencedClasses: [],
  3158. //>>excludeEnd("ide");
  3159. messageSends: ["comment:", "val"]
  3160. }),
  3161. $globals.Browser);
  3162. $core.addMethod(
  3163. $core.method({
  3164. selector: "compileDefinition",
  3165. protocol: 'actions',
  3166. fn: function (){
  3167. var self=this;
  3168. var newClass;
  3169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3170. return $core.withContext(function($ctx1) {
  3171. //>>excludeEnd("ctx");
  3172. newClass=$recv($recv($globals.Compiler)._new())._evaluateExpression_($recv(self["@sourceArea"])._val());
  3173. self._resetClassesList();
  3174. self._updateCategoriesList();
  3175. self._updateClassesList();
  3176. self._selectClass_(newClass);
  3177. return self;
  3178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3179. }, function($ctx1) {$ctx1.fill(self,"compileDefinition",{newClass:newClass},$globals.Browser)});
  3180. //>>excludeEnd("ctx");
  3181. },
  3182. //>>excludeStart("ide", pragmas.excludeIdeData);
  3183. args: [],
  3184. source: "compileDefinition\x0a\x09| newClass |\x0a\x09newClass := Compiler new evaluateExpression: sourceArea val.\x0a\x09self\x0a\x09resetClassesList;\x0a\x09updateCategoriesList;\x0a\x09updateClassesList.\x0a\x09self selectClass: newClass",
  3185. referencedClasses: ["Compiler"],
  3186. //>>excludeEnd("ide");
  3187. messageSends: ["evaluateExpression:", "new", "val", "resetClassesList", "updateCategoriesList", "updateClassesList", "selectClass:"]
  3188. }),
  3189. $globals.Browser);
  3190. $core.addMethod(
  3191. $core.method({
  3192. selector: "compileMethodDefinition",
  3193. protocol: 'actions',
  3194. fn: function (){
  3195. var self=this;
  3196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3197. return $core.withContext(function($ctx1) {
  3198. //>>excludeEnd("ctx");
  3199. var $1;
  3200. $1=$recv(self["@selectedTab"]).__eq("instance");
  3201. if($core.assert($1)){
  3202. self._compileMethodDefinitionFor_(self["@selectedClass"]);
  3203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3204. $ctx1.sendIdx["compileMethodDefinitionFor:"]=1;
  3205. //>>excludeEnd("ctx");
  3206. } else {
  3207. self._compileMethodDefinitionFor_($recv(self["@selectedClass"])._class());
  3208. };
  3209. return self;
  3210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3211. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinition",{},$globals.Browser)});
  3212. //>>excludeEnd("ctx");
  3213. },
  3214. //>>excludeStart("ide", pragmas.excludeIdeData);
  3215. args: [],
  3216. source: "compileMethodDefinition\x0a\x09selectedTab = #instance\x0a\x09ifTrue: [ self compileMethodDefinitionFor: selectedClass ]\x0a\x09ifFalse: [ self compileMethodDefinitionFor: selectedClass class ]",
  3217. referencedClasses: [],
  3218. //>>excludeEnd("ide");
  3219. messageSends: ["ifTrue:ifFalse:", "=", "compileMethodDefinitionFor:", "class"]
  3220. }),
  3221. $globals.Browser);
  3222. $core.addMethod(
  3223. $core.method({
  3224. selector: "compileMethodDefinitionFor:",
  3225. protocol: 'actions',
  3226. fn: function (aClass){
  3227. var self=this;
  3228. var compiler,package_,method,compiledSource,source,node;
  3229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3230. return $core.withContext(function($ctx1) {
  3231. //>>excludeEnd("ctx");
  3232. var $1,$2,$5,$4,$3,$6,$8,$7,$receiver;
  3233. var $early={};
  3234. try {
  3235. source=$recv(self["@sourceArea"])._val();
  3236. $1=self["@selectedProtocol"];
  3237. if(($receiver = $1) == null || $receiver.isNil){
  3238. self["@selectedProtocol"]=$recv(self["@selectedMethod"])._protocol();
  3239. self["@selectedProtocol"];
  3240. } else {
  3241. $1;
  3242. };
  3243. compiler=$recv($globals.Compiler)._new();
  3244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3245. $ctx1.sendIdx["new"]=1;
  3246. //>>excludeEnd("ctx");
  3247. $recv(compiler)._source_(source);
  3248. node=$recv(compiler)._parse_(source);
  3249. $2=$recv(node)._isParseFailure();
  3250. if($core.assert($2)){
  3251. $5="PARSE ERROR: ".__comma($recv(node)._reason());
  3252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3253. $ctx1.sendIdx[","]=3;
  3254. //>>excludeEnd("ctx");
  3255. $4=$recv($5).__comma(", position: ");
  3256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3257. $ctx1.sendIdx[","]=2;
  3258. //>>excludeEnd("ctx");
  3259. $3=$recv($4).__comma($recv($recv(node)._position())._asString());
  3260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3261. $ctx1.sendIdx[","]=1;
  3262. //>>excludeEnd("ctx");
  3263. return $recv($globals.Terminal)._alert_($3);
  3264. };
  3265. package_=$recv(aClass)._packageOfProtocol_(self["@selectedProtocol"]);
  3266. compiledSource=$recv(compiler)._compileNode_forClass_package_(node,aClass,package_);
  3267. method=$recv(compiler)._eval_forPackage_(compiledSource,package_);
  3268. $recv($recv(compiler)._unknownVariables())._do_((function(each){
  3269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3270. return $core.withContext(function($ctx2) {
  3271. //>>excludeEnd("ctx");
  3272. $6=$recv($globals.Smalltalk)._existsJsGlobal_(each);
  3273. if(!$core.assert($6)){
  3274. $8=$recv("Declare '".__comma(each)).__comma("' as instance variable?");
  3275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3276. $ctx2.sendIdx[","]=4;
  3277. //>>excludeEnd("ctx");
  3278. $7=$recv($globals.Terminal)._confirm_($8);
  3279. if($core.assert($7)){
  3280. self._addInstanceVariableNamed_toClass_(each,aClass);
  3281. throw $early=[self._compileMethodDefinitionFor_(aClass)];
  3282. };
  3283. };
  3284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3285. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  3286. //>>excludeEnd("ctx");
  3287. }));
  3288. $recv($recv($globals.ClassBuilder)._new())._installMethod_forClass_protocol_(method,aClass,self["@selectedProtocol"]);
  3289. self._updateMethodsList();
  3290. self._selectMethod_(method);
  3291. return self;
  3292. }
  3293. catch(e) {if(e===$early)return e[0]; throw e}
  3294. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3295. }, function($ctx1) {$ctx1.fill(self,"compileMethodDefinitionFor:",{aClass:aClass,compiler:compiler,package_:package_,method:method,compiledSource:compiledSource,source:source,node:node},$globals.Browser)});
  3296. //>>excludeEnd("ctx");
  3297. },
  3298. //>>excludeStart("ide", pragmas.excludeIdeData);
  3299. args: ["aClass"],
  3300. 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",
  3301. referencedClasses: ["Compiler", "Terminal", "Smalltalk", "ClassBuilder"],
  3302. //>>excludeEnd("ide");
  3303. 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:"]
  3304. }),
  3305. $globals.Browser);
  3306. $core.addMethod(
  3307. $core.method({
  3308. selector: "copyClass",
  3309. protocol: 'actions',
  3310. fn: function (){
  3311. var self=this;
  3312. var className;
  3313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3314. return $core.withContext(function($ctx1) {
  3315. //>>excludeEnd("ctx");
  3316. var $1;
  3317. className=$recv($globals.Terminal)._prompt_("Copy class");
  3318. $1=$recv($recv(className)._notNil())._and_((function(){
  3319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3320. return $core.withContext(function($ctx2) {
  3321. //>>excludeEnd("ctx");
  3322. return $recv(className)._notEmpty();
  3323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3324. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3325. //>>excludeEnd("ctx");
  3326. }));
  3327. if($core.assert($1)){
  3328. $recv($recv($globals.ClassBuilder)._new())._copyClass_named_(self._selectedClass(),className);
  3329. self._resetClassesList();
  3330. self._updateClassesList();
  3331. self._selectClass_($recv($recv($globals.Smalltalk)._globals())._at_(className));
  3332. };
  3333. return self;
  3334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3335. }, function($ctx1) {$ctx1.fill(self,"copyClass",{className:className},$globals.Browser)});
  3336. //>>excludeEnd("ctx");
  3337. },
  3338. //>>excludeStart("ide", pragmas.excludeIdeData);
  3339. args: [],
  3340. 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) ]",
  3341. referencedClasses: ["Terminal", "ClassBuilder", "Smalltalk"],
  3342. //>>excludeEnd("ide");
  3343. messageSends: ["prompt:", "ifTrue:", "and:", "notNil", "notEmpty", "copyClass:named:", "new", "selectedClass", "resetClassesList", "updateClassesList", "selectClass:", "at:", "globals"]
  3344. }),
  3345. $globals.Browser);
  3346. $core.addMethod(
  3347. $core.method({
  3348. selector: "declarationSource",
  3349. protocol: 'accessing',
  3350. fn: function (){
  3351. var self=this;
  3352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3353. return $core.withContext(function($ctx1) {
  3354. //>>excludeEnd("ctx");
  3355. var $1;
  3356. $1=$recv(self["@selectedTab"]).__eq("instance");
  3357. if($core.assert($1)){
  3358. return self._classDeclarationSource();
  3359. } else {
  3360. return self._metaclassDeclarationSource();
  3361. };
  3362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3363. }, function($ctx1) {$ctx1.fill(self,"declarationSource",{},$globals.Browser)});
  3364. //>>excludeEnd("ctx");
  3365. },
  3366. //>>excludeStart("ide", pragmas.excludeIdeData);
  3367. args: [],
  3368. source: "declarationSource\x0a\x09^ selectedTab = #instance\x0a\x09ifTrue: [ self classDeclarationSource ]\x0a\x09ifFalse: [ self metaclassDeclarationSource ]",
  3369. referencedClasses: [],
  3370. //>>excludeEnd("ide");
  3371. messageSends: ["ifTrue:ifFalse:", "=", "classDeclarationSource", "metaclassDeclarationSource"]
  3372. }),
  3373. $globals.Browser);
  3374. $core.addMethod(
  3375. $core.method({
  3376. selector: "disableSaveButton",
  3377. protocol: 'actions',
  3378. fn: function (){
  3379. var self=this;
  3380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3381. return $core.withContext(function($ctx1) {
  3382. //>>excludeEnd("ctx");
  3383. var $1,$receiver;
  3384. $1=self["@saveButton"];
  3385. if(($receiver = $1) == null || $receiver.isNil){
  3386. $1;
  3387. } else {
  3388. $recv(self["@saveButton"])._at_put_("disabled",true);
  3389. };
  3390. self["@unsavedChanges"]=false;
  3391. return self;
  3392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3393. }, function($ctx1) {$ctx1.fill(self,"disableSaveButton",{},$globals.Browser)});
  3394. //>>excludeEnd("ctx");
  3395. },
  3396. //>>excludeStart("ide", pragmas.excludeIdeData);
  3397. args: [],
  3398. source: "disableSaveButton\x0a\x09saveButton ifNotNil: [\x0a\x09saveButton at: 'disabled' put: true ].\x0a\x09unsavedChanges := false",
  3399. referencedClasses: [],
  3400. //>>excludeEnd("ide");
  3401. messageSends: ["ifNotNil:", "at:put:"]
  3402. }),
  3403. $globals.Browser);
  3404. $core.addMethod(
  3405. $core.method({
  3406. selector: "dummyMethodSource",
  3407. protocol: 'accessing',
  3408. fn: function (){
  3409. var self=this;
  3410. return "messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements";
  3411. },
  3412. //>>excludeStart("ide", pragmas.excludeIdeData);
  3413. args: [],
  3414. source: "dummyMethodSource\x0a\x09^ 'messageSelectorAndArgumentNames\x0a\x09\x22comment stating purpose of message\x22\x0a\x0a\x09| temporary variable names |\x0a\x09statements'",
  3415. referencedClasses: [],
  3416. //>>excludeEnd("ide");
  3417. messageSends: []
  3418. }),
  3419. $globals.Browser);
  3420. $core.addMethod(
  3421. $core.method({
  3422. selector: "handleSourceAreaKeyDown:",
  3423. protocol: 'actions',
  3424. fn: function (anEvent){
  3425. var self=this;
  3426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3427. return $core.withContext(function($ctx1) {
  3428. //>>excludeEnd("ctx");
  3429. if(anEvent.ctrlKey) {
  3430. if(anEvent.keyCode === 83) { //ctrl+s
  3431. self._compile();
  3432. anEvent.preventDefault();
  3433. return false;
  3434. }
  3435. }
  3436. ;
  3437. return self;
  3438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3439. }, function($ctx1) {$ctx1.fill(self,"handleSourceAreaKeyDown:",{anEvent:anEvent},$globals.Browser)});
  3440. //>>excludeEnd("ctx");
  3441. },
  3442. //>>excludeStart("ide", pragmas.excludeIdeData);
  3443. args: ["anEvent"],
  3444. 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>",
  3445. referencedClasses: [],
  3446. //>>excludeEnd("ide");
  3447. messageSends: []
  3448. }),
  3449. $globals.Browser);
  3450. $core.addMethod(
  3451. $core.method({
  3452. selector: "hideClassButtons",
  3453. protocol: 'actions',
  3454. fn: function (){
  3455. var self=this;
  3456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3457. return $core.withContext(function($ctx1) {
  3458. //>>excludeEnd("ctx");
  3459. $recv($recv(self["@classButtons"])._asJQuery())._hide();
  3460. return self;
  3461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3462. }, function($ctx1) {$ctx1.fill(self,"hideClassButtons",{},$globals.Browser)});
  3463. //>>excludeEnd("ctx");
  3464. },
  3465. //>>excludeStart("ide", pragmas.excludeIdeData);
  3466. args: [],
  3467. source: "hideClassButtons\x0a\x09classButtons asJQuery hide",
  3468. referencedClasses: [],
  3469. //>>excludeEnd("ide");
  3470. messageSends: ["hide", "asJQuery"]
  3471. }),
  3472. $globals.Browser);
  3473. $core.addMethod(
  3474. $core.method({
  3475. selector: "hideMethodButtons",
  3476. protocol: 'actions',
  3477. fn: function (){
  3478. var self=this;
  3479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3480. return $core.withContext(function($ctx1) {
  3481. //>>excludeEnd("ctx");
  3482. $recv($recv(self["@methodButtons"])._asJQuery())._hide();
  3483. return self;
  3484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3485. }, function($ctx1) {$ctx1.fill(self,"hideMethodButtons",{},$globals.Browser)});
  3486. //>>excludeEnd("ctx");
  3487. },
  3488. //>>excludeStart("ide", pragmas.excludeIdeData);
  3489. args: [],
  3490. source: "hideMethodButtons\x0a\x09methodButtons asJQuery hide",
  3491. referencedClasses: [],
  3492. //>>excludeEnd("ide");
  3493. messageSends: ["hide", "asJQuery"]
  3494. }),
  3495. $globals.Browser);
  3496. $core.addMethod(
  3497. $core.method({
  3498. selector: "initialize",
  3499. protocol: 'initialization',
  3500. fn: function (){
  3501. var self=this;
  3502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3503. return $core.withContext(function($ctx1) {
  3504. //>>excludeEnd("ctx");
  3505. (
  3506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3507. $ctx1.supercall = true,
  3508. //>>excludeEnd("ctx");
  3509. ($globals.Browser.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  3510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3511. $ctx1.supercall = false;
  3512. //>>excludeEnd("ctx");;
  3513. self["@selectedTab"]="instance";
  3514. self["@selectedPackage"]=$recv(self._packages())._first();
  3515. self["@unsavedChanges"]=false;
  3516. return self;
  3517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3518. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Browser)});
  3519. //>>excludeEnd("ctx");
  3520. },
  3521. //>>excludeStart("ide", pragmas.excludeIdeData);
  3522. args: [],
  3523. source: "initialize\x0a\x09super initialize.\x0a\x09selectedTab := #instance.\x0a\x09selectedPackage := self packages first.\x0a\x09unsavedChanges := false",
  3524. referencedClasses: [],
  3525. //>>excludeEnd("ide");
  3526. messageSends: ["initialize", "first", "packages"]
  3527. }),
  3528. $globals.Browser);
  3529. $core.addMethod(
  3530. $core.method({
  3531. selector: "label",
  3532. protocol: 'accessing',
  3533. fn: function (){
  3534. var self=this;
  3535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3536. return $core.withContext(function($ctx1) {
  3537. //>>excludeEnd("ctx");
  3538. var $1,$receiver;
  3539. $1=self["@selectedClass"];
  3540. if(($receiver = $1) == null || $receiver.isNil){
  3541. return "Browser (nil)";
  3542. } else {
  3543. return "Browser: ".__comma($recv(self["@selectedClass"])._name());
  3544. };
  3545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3546. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.Browser)});
  3547. //>>excludeEnd("ctx");
  3548. },
  3549. //>>excludeStart("ide", pragmas.excludeIdeData);
  3550. args: [],
  3551. source: "label\x0a\x09^ selectedClass\x0a\x09ifNil: [ 'Browser (nil)' ]\x0a\x09ifNotNil: [ 'Browser: ', selectedClass name ]",
  3552. referencedClasses: [],
  3553. //>>excludeEnd("ide");
  3554. messageSends: ["ifNil:ifNotNil:", ",", "name"]
  3555. }),
  3556. $globals.Browser);
  3557. $core.addMethod(
  3558. $core.method({
  3559. selector: "metaclassDeclarationSource",
  3560. protocol: 'accessing',
  3561. fn: function (){
  3562. var self=this;
  3563. var stream;
  3564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3565. return $core.withContext(function($ctx1) {
  3566. //>>excludeEnd("ctx");
  3567. var $1,$2,$3,$receiver;
  3568. stream=""._writeStream();
  3569. $1=self["@selectedClass"];
  3570. if(($receiver = $1) == null || $receiver.isNil){
  3571. $1;
  3572. } else {
  3573. $2=stream;
  3574. $recv($2)._nextPutAll_($recv(self["@selectedClass"])._asString());
  3575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3576. $ctx1.sendIdx["nextPutAll:"]=1;
  3577. //>>excludeEnd("ctx");
  3578. $recv($2)._nextPutAll_(" class ");
  3579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3580. $ctx1.sendIdx["nextPutAll:"]=2;
  3581. //>>excludeEnd("ctx");
  3582. $3=$recv($2)._nextPutAll_("instanceVariableNames: '");
  3583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3584. $ctx1.sendIdx["nextPutAll:"]=3;
  3585. //>>excludeEnd("ctx");
  3586. $3;
  3587. $recv($recv($recv(self["@selectedClass"])._class())._instanceVariableNames())._do_separatedBy_((function(each){
  3588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3589. return $core.withContext(function($ctx2) {
  3590. //>>excludeEnd("ctx");
  3591. return $recv(stream)._nextPutAll_(each);
  3592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3593. $ctx2.sendIdx["nextPutAll:"]=4;
  3594. //>>excludeEnd("ctx");
  3595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3596. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  3597. //>>excludeEnd("ctx");
  3598. }),(function(){
  3599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3600. return $core.withContext(function($ctx2) {
  3601. //>>excludeEnd("ctx");
  3602. return $recv(stream)._nextPutAll_(" ");
  3603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3604. $ctx2.sendIdx["nextPutAll:"]=5;
  3605. //>>excludeEnd("ctx");
  3606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3607. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3608. //>>excludeEnd("ctx");
  3609. }));
  3610. $recv(stream)._nextPutAll_("'");
  3611. };
  3612. return $recv(stream)._contents();
  3613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3614. }, function($ctx1) {$ctx1.fill(self,"metaclassDeclarationSource",{stream:stream},$globals.Browser)});
  3615. //>>excludeEnd("ctx");
  3616. },
  3617. //>>excludeStart("ide", pragmas.excludeIdeData);
  3618. args: [],
  3619. source: "metaclassDeclarationSource\x0a\x09| stream |\x0a\x09stream := '' writeStream.\x0a\x09selectedClass ifNotNil: [\x0a\x09stream\x0a\x09\x09nextPutAll: selectedClass asString;\x0a\x09\x09nextPutAll: ' class ';\x0a\x09\x09nextPutAll: 'instanceVariableNames: '''.\x0a\x09selectedClass class instanceVariableNames\x0a\x09\x09do: [ :each | stream nextPutAll: each ]\x0a\x09\x09separatedBy: [ stream nextPutAll: ' ' ].\x0a\x09stream nextPutAll: '''' ].\x0a\x09^ stream contents",
  3620. referencedClasses: [],
  3621. //>>excludeEnd("ide");
  3622. messageSends: ["writeStream", "ifNotNil:", "nextPutAll:", "asString", "do:separatedBy:", "instanceVariableNames", "class", "contents"]
  3623. }),
  3624. $globals.Browser);
  3625. $core.addMethod(
  3626. $core.method({
  3627. selector: "methodSource",
  3628. protocol: 'accessing',
  3629. fn: function (){
  3630. var self=this;
  3631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3632. return $core.withContext(function($ctx1) {
  3633. //>>excludeEnd("ctx");
  3634. var $1,$receiver;
  3635. $1=self["@selectedMethod"];
  3636. if(($receiver = $1) == null || $receiver.isNil){
  3637. return self._dummyMethodSource();
  3638. } else {
  3639. return $recv(self["@selectedMethod"])._source();
  3640. };
  3641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3642. }, function($ctx1) {$ctx1.fill(self,"methodSource",{},$globals.Browser)});
  3643. //>>excludeEnd("ctx");
  3644. },
  3645. //>>excludeStart("ide", pragmas.excludeIdeData);
  3646. args: [],
  3647. source: "methodSource\x0a\x09^ selectedMethod\x0a\x09ifNil: [ self dummyMethodSource ]\x0a\x09ifNotNil: [ selectedMethod source ]",
  3648. referencedClasses: [],
  3649. //>>excludeEnd("ide");
  3650. messageSends: ["ifNil:ifNotNil:", "dummyMethodSource", "source"]
  3651. }),
  3652. $globals.Browser);
  3653. $core.addMethod(
  3654. $core.method({
  3655. selector: "methods",
  3656. protocol: 'accessing',
  3657. fn: function (){
  3658. var self=this;
  3659. var klass;
  3660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3661. return $core.withContext(function($ctx1) {
  3662. //>>excludeEnd("ctx");
  3663. var $1,$2,$3,$5,$6,$4,$7,$receiver;
  3664. $1=$recv(self["@selectedTab"]).__eq("comment");
  3665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3666. $ctx1.sendIdx["="]=1;
  3667. //>>excludeEnd("ctx");
  3668. if($core.assert($1)){
  3669. return [];
  3670. };
  3671. $2=self["@selectedClass"];
  3672. if(($receiver = $2) == null || $receiver.isNil){
  3673. $2;
  3674. } else {
  3675. $3=$recv(self["@selectedTab"]).__eq("instance");
  3676. if($core.assert($3)){
  3677. klass=self["@selectedClass"];
  3678. } else {
  3679. klass=$recv(self["@selectedClass"])._class();
  3680. };
  3681. klass;
  3682. };
  3683. $5=self["@selectedProtocol"];
  3684. if(($receiver = $5) == null || $receiver.isNil){
  3685. $6=klass;
  3686. if(($receiver = $6) == null || $receiver.isNil){
  3687. $4=[];
  3688. } else {
  3689. $4=$recv($recv(klass)._methodDictionary())._values();
  3690. };
  3691. } else {
  3692. $4=$recv(klass)._methodsInProtocol_(self["@selectedProtocol"]);
  3693. };
  3694. return $recv($4)._sort_((function(a,b){
  3695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3696. return $core.withContext(function($ctx2) {
  3697. //>>excludeEnd("ctx");
  3698. $7=$recv(a)._selector();
  3699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3700. $ctx2.sendIdx["selector"]=1;
  3701. //>>excludeEnd("ctx");
  3702. return $recv($7).__lt($recv(b)._selector());
  3703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3704. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,9)});
  3705. //>>excludeEnd("ctx");
  3706. }));
  3707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3708. }, function($ctx1) {$ctx1.fill(self,"methods",{klass:klass},$globals.Browser)});
  3709. //>>excludeEnd("ctx");
  3710. },
  3711. //>>excludeStart("ide", pragmas.excludeIdeData);
  3712. args: [],
  3713. source: "methods\x0a\x09| klass |\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09selectedClass ifNotNil: [\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ]].\x0a\x09^ (selectedProtocol\x0a\x09ifNil: [\x0a\x09\x09klass\x0a\x09\x09ifNil: [ #() ]\x0a\x09\x09ifNotNil: [ klass methodDictionary values ]]\x0a\x09ifNotNil: [\x0a\x09\x09klass methodsInProtocol: selectedProtocol ]) \x0a\x09\x09\x09\x09sort: [ :a :b | a selector < b selector ]",
  3714. referencedClasses: [],
  3715. //>>excludeEnd("ide");
  3716. messageSends: ["ifTrue:", "=", "ifNotNil:", "ifTrue:ifFalse:", "class", "sort:", "ifNil:ifNotNil:", "values", "methodDictionary", "methodsInProtocol:", "<", "selector"]
  3717. }),
  3718. $globals.Browser);
  3719. $core.addMethod(
  3720. $core.method({
  3721. selector: "packages",
  3722. protocol: 'accessing',
  3723. fn: function (){
  3724. var self=this;
  3725. var packages;
  3726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3727. return $core.withContext(function($ctx1) {
  3728. //>>excludeEnd("ctx");
  3729. var $2,$3,$1;
  3730. packages=$recv($globals.Array)._new();
  3731. $recv($recv($globals.Smalltalk)._classes())._do_((function(each){
  3732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3733. return $core.withContext(function($ctx2) {
  3734. //>>excludeEnd("ctx");
  3735. $2=packages;
  3736. $3=$recv(each)._category();
  3737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3738. $ctx2.sendIdx["category"]=1;
  3739. //>>excludeEnd("ctx");
  3740. $1=$recv($2)._includes_($3);
  3741. if(!$core.assert($1)){
  3742. return $recv(packages)._add_($recv(each)._category());
  3743. };
  3744. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3745. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3746. //>>excludeEnd("ctx");
  3747. }));
  3748. return $recv(packages)._sort();
  3749. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3750. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},$globals.Browser)});
  3751. //>>excludeEnd("ctx");
  3752. },
  3753. //>>excludeStart("ide", pragmas.excludeIdeData);
  3754. args: [],
  3755. 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",
  3756. referencedClasses: ["Array", "Smalltalk"],
  3757. //>>excludeEnd("ide");
  3758. messageSends: ["new", "do:", "classes", "ifFalse:", "includes:", "category", "add:", "sort"]
  3759. }),
  3760. $globals.Browser);
  3761. $core.addMethod(
  3762. $core.method({
  3763. selector: "protocols",
  3764. protocol: 'accessing',
  3765. fn: function (){
  3766. var self=this;
  3767. var klass;
  3768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3769. return $core.withContext(function($ctx1) {
  3770. //>>excludeEnd("ctx");
  3771. var $1,$2,$3,$4,$receiver;
  3772. $1=self["@selectedClass"];
  3773. if(($receiver = $1) == null || $receiver.isNil){
  3774. $1;
  3775. } else {
  3776. $2=$recv(self["@selectedTab"]).__eq("comment");
  3777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3778. $ctx1.sendIdx["="]=1;
  3779. //>>excludeEnd("ctx");
  3780. if($core.assert($2)){
  3781. return [];
  3782. };
  3783. $3=$recv(self["@selectedTab"]).__eq("instance");
  3784. if($core.assert($3)){
  3785. klass=self["@selectedClass"];
  3786. } else {
  3787. klass=$recv(self["@selectedClass"])._class();
  3788. };
  3789. klass;
  3790. $4=$recv($recv(klass)._methodDictionary())._isEmpty();
  3791. if($core.assert($4)){
  3792. return $recv($globals.Array)._with_("not yet classified");
  3793. };
  3794. return $recv(klass)._protocols();
  3795. };
  3796. return $recv($globals.Array)._new();
  3797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3798. }, function($ctx1) {$ctx1.fill(self,"protocols",{klass:klass},$globals.Browser)});
  3799. //>>excludeEnd("ctx");
  3800. },
  3801. //>>excludeStart("ide", pragmas.excludeIdeData);
  3802. args: [],
  3803. source: "protocols\x0a\x09| klass |\x0a\x09selectedClass ifNotNil: [\x0a\x09selectedTab = #comment ifTrue: [ ^ #() ].\x0a\x09klass := selectedTab = #instance\x0a\x09\x09ifTrue: [ selectedClass ]\x0a\x09\x09ifFalse: [ selectedClass class ].\x0a\x09klass methodDictionary isEmpty ifTrue: [\x0a\x09\x09^ Array with: 'not yet classified' ].\x0a\x09^ klass protocols ].\x0a\x09^ Array new",
  3804. referencedClasses: ["Array"],
  3805. //>>excludeEnd("ide");
  3806. messageSends: ["ifNotNil:", "ifTrue:", "=", "ifTrue:ifFalse:", "class", "isEmpty", "methodDictionary", "with:", "protocols", "new"]
  3807. }),
  3808. $globals.Browser);
  3809. $core.addMethod(
  3810. $core.method({
  3811. selector: "removeClass",
  3812. protocol: 'actions',
  3813. fn: function (){
  3814. var self=this;
  3815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3816. return $core.withContext(function($ctx1) {
  3817. //>>excludeEnd("ctx");
  3818. var $2,$1;
  3819. $2=$recv("Do you really want to remove ".__comma($recv(self["@selectedClass"])._name())).__comma("?");
  3820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3821. $ctx1.sendIdx[","]=1;
  3822. //>>excludeEnd("ctx");
  3823. $1=$recv($globals.Terminal)._confirm_($2);
  3824. if($core.assert($1)){
  3825. $recv($globals.Smalltalk)._removeClass_(self["@selectedClass"]);
  3826. self._resetClassesList();
  3827. self._selectClass_(nil);
  3828. };
  3829. return self;
  3830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3831. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.Browser)});
  3832. //>>excludeEnd("ctx");
  3833. },
  3834. //>>excludeStart("ide", pragmas.excludeIdeData);
  3835. args: [],
  3836. 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 ]",
  3837. referencedClasses: ["Terminal", "Smalltalk"],
  3838. //>>excludeEnd("ide");
  3839. messageSends: ["ifTrue:", "confirm:", ",", "name", "removeClass:", "resetClassesList", "selectClass:"]
  3840. }),
  3841. $globals.Browser);
  3842. $core.addMethod(
  3843. $core.method({
  3844. selector: "removeMethod",
  3845. protocol: 'actions',
  3846. fn: function (){
  3847. var self=this;
  3848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3849. return $core.withContext(function($ctx1) {
  3850. //>>excludeEnd("ctx");
  3851. var $1,$3,$2,$4;
  3852. $1=self._cancelChanges();
  3853. if($core.assert($1)){
  3854. $3=$recv("Do you really want to remove #".__comma($recv(self["@selectedMethod"])._selector())).__comma("?");
  3855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3856. $ctx1.sendIdx[","]=1;
  3857. //>>excludeEnd("ctx");
  3858. $2=$recv($globals.Terminal)._confirm_($3);
  3859. if($core.assert($2)){
  3860. $4=$recv(self["@selectedTab"]).__eq("instance");
  3861. if($core.assert($4)){
  3862. $recv(self["@selectedClass"])._removeCompiledMethod_(self["@selectedMethod"]);
  3863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3864. $ctx1.sendIdx["removeCompiledMethod:"]=1;
  3865. //>>excludeEnd("ctx");
  3866. } else {
  3867. $recv($recv(self["@selectedClass"])._class())._removeCompiledMethod_(self["@selectedMethod"]);
  3868. };
  3869. self._selectMethod_(nil);
  3870. };
  3871. };
  3872. return self;
  3873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3874. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.Browser)});
  3875. //>>excludeEnd("ctx");
  3876. },
  3877. //>>excludeStart("ide", pragmas.excludeIdeData);
  3878. args: [],
  3879. source: "removeMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09(Terminal confirm: 'Do you really want to remove #', selectedMethod selector, '?')\x0a\x09\x09ifTrue: [\x0a\x09\x09selectedTab = #instance\x0a\x09\x09\x09ifTrue: [ selectedClass removeCompiledMethod: selectedMethod ]\x0a\x09\x09\x09ifFalse: [ selectedClass class removeCompiledMethod: selectedMethod ].\x0a\x09\x09self selectMethod: nil ]]",
  3880. referencedClasses: ["Terminal"],
  3881. //>>excludeEnd("ide");
  3882. messageSends: ["ifTrue:", "cancelChanges", "confirm:", ",", "selector", "ifTrue:ifFalse:", "=", "removeCompiledMethod:", "class", "selectMethod:"]
  3883. }),
  3884. $globals.Browser);
  3885. $core.addMethod(
  3886. $core.method({
  3887. selector: "removePackage",
  3888. protocol: 'actions',
  3889. fn: function (){
  3890. var self=this;
  3891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3892. return $core.withContext(function($ctx1) {
  3893. //>>excludeEnd("ctx");
  3894. var $2,$1;
  3895. $2=$recv("Do you really want to remove the whole package ".__comma(self["@selectedPackage"])).__comma(" with all its classes?");
  3896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3897. $ctx1.sendIdx[","]=1;
  3898. //>>excludeEnd("ctx");
  3899. $1=$recv($globals.Terminal)._confirm_($2);
  3900. if($core.assert($1)){
  3901. $recv($globals.Smalltalk)._removePackage_(self["@selectedPackage"]);
  3902. self._updateCategoriesList();
  3903. };
  3904. return self;
  3905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3906. }, function($ctx1) {$ctx1.fill(self,"removePackage",{},$globals.Browser)});
  3907. //>>excludeEnd("ctx");
  3908. },
  3909. //>>excludeStart("ide", pragmas.excludeIdeData);
  3910. args: [],
  3911. 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 ]",
  3912. referencedClasses: ["Terminal", "Smalltalk"],
  3913. //>>excludeEnd("ide");
  3914. messageSends: ["ifTrue:", "confirm:", ",", "removePackage:", "updateCategoriesList"]
  3915. }),
  3916. $globals.Browser);
  3917. $core.addMethod(
  3918. $core.method({
  3919. selector: "renameClass",
  3920. protocol: 'actions',
  3921. fn: function (){
  3922. var self=this;
  3923. var newName;
  3924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3925. return $core.withContext(function($ctx1) {
  3926. //>>excludeEnd("ctx");
  3927. var $1;
  3928. newName=$recv($globals.Terminal)._prompt_("Rename class ".__comma($recv(self["@selectedClass"])._name()));
  3929. $1=$recv($recv(newName)._notNil())._and_((function(){
  3930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3931. return $core.withContext(function($ctx2) {
  3932. //>>excludeEnd("ctx");
  3933. return $recv(newName)._notEmpty();
  3934. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3935. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3936. //>>excludeEnd("ctx");
  3937. }));
  3938. if($core.assert($1)){
  3939. $recv(self["@selectedClass"])._rename_(newName);
  3940. self._updateClassesList();
  3941. self._updateSourceAndButtons();
  3942. };
  3943. return self;
  3944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3945. }, function($ctx1) {$ctx1.fill(self,"renameClass",{newName:newName},$globals.Browser)});
  3946. //>>excludeEnd("ctx");
  3947. },
  3948. //>>excludeStart("ide", pragmas.excludeIdeData);
  3949. args: [],
  3950. 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 ]",
  3951. referencedClasses: ["Terminal"],
  3952. //>>excludeEnd("ide");
  3953. messageSends: ["prompt:", ",", "name", "ifTrue:", "and:", "notNil", "notEmpty", "rename:", "updateClassesList", "updateSourceAndButtons"]
  3954. }),
  3955. $globals.Browser);
  3956. $core.addMethod(
  3957. $core.method({
  3958. selector: "renamePackage",
  3959. protocol: 'actions',
  3960. fn: function (){
  3961. var self=this;
  3962. var newName;
  3963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3964. return $core.withContext(function($ctx1) {
  3965. //>>excludeEnd("ctx");
  3966. var $1,$2,$receiver;
  3967. newName=$recv($globals.Terminal)._prompt_("Rename package ".__comma(self["@selectedPackage"]));
  3968. $1=newName;
  3969. if(($receiver = $1) == null || $receiver.isNil){
  3970. $1;
  3971. } else {
  3972. $2=$recv(newName)._notEmpty();
  3973. if($core.assert($2)){
  3974. $recv($globals.Smalltalk)._renamePackage_to_(self["@selectedPackage"],newName);
  3975. self._updateCategoriesList();
  3976. };
  3977. };
  3978. return self;
  3979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3980. }, function($ctx1) {$ctx1.fill(self,"renamePackage",{newName:newName},$globals.Browser)});
  3981. //>>excludeEnd("ctx");
  3982. },
  3983. //>>excludeStart("ide", pragmas.excludeIdeData);
  3984. args: [],
  3985. source: "renamePackage\x0a\x0a\x09| newName |\x0a\x09newName := Terminal prompt: 'Rename package ', selectedPackage.\x0a\x09newName ifNotNil: [\x0a\x09newName notEmpty ifTrue: [\x0a\x09Smalltalk renamePackage: selectedPackage to: newName.\x0a\x09self updateCategoriesList ]]",
  3986. referencedClasses: ["Terminal", "Smalltalk"],
  3987. //>>excludeEnd("ide");
  3988. messageSends: ["prompt:", ",", "ifNotNil:", "ifTrue:", "notEmpty", "renamePackage:to:", "updateCategoriesList"]
  3989. }),
  3990. $globals.Browser);
  3991. $core.addMethod(
  3992. $core.method({
  3993. selector: "renderBottomPanelOn:",
  3994. protocol: 'rendering',
  3995. fn: function (html){
  3996. var self=this;
  3997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3998. return $core.withContext(function($ctx1) {
  3999. //>>excludeEnd("ctx");
  4000. var $1;
  4001. $1=$recv(html)._div();
  4002. $recv($1)._class_("amber_sourceCode");
  4003. $recv($1)._with_((function(){
  4004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4005. return $core.withContext(function($ctx2) {
  4006. //>>excludeEnd("ctx");
  4007. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  4008. self["@sourceArea"];
  4009. $recv(self["@sourceArea"])._renderOn_(html);
  4010. $recv(self["@sourceArea"])._onKeyDown_((function(e){
  4011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4012. return $core.withContext(function($ctx3) {
  4013. //>>excludeEnd("ctx");
  4014. return self._handleSourceAreaKeyDown_(e);
  4015. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4016. }, function($ctx3) {$ctx3.fillBlock({e:e},$ctx2,2)});
  4017. //>>excludeEnd("ctx");
  4018. }));
  4019. return $recv(self["@sourceArea"])._onKeyUp_((function(){
  4020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4021. return $core.withContext(function($ctx3) {
  4022. //>>excludeEnd("ctx");
  4023. return self._updateStatus();
  4024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4025. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4026. //>>excludeEnd("ctx");
  4027. }));
  4028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4029. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4030. //>>excludeEnd("ctx");
  4031. }));
  4032. return self;
  4033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4034. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.Browser)});
  4035. //>>excludeEnd("ctx");
  4036. },
  4037. //>>excludeStart("ide", pragmas.excludeIdeData);
  4038. args: ["html"],
  4039. 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 ]]",
  4040. referencedClasses: ["SourceArea"],
  4041. //>>excludeEnd("ide");
  4042. messageSends: ["class:", "div", "with:", "new", "renderOn:", "onKeyDown:", "handleSourceAreaKeyDown:", "onKeyUp:", "updateStatus"]
  4043. }),
  4044. $globals.Browser);
  4045. $core.addMethod(
  4046. $core.method({
  4047. selector: "renderBoxOn:",
  4048. protocol: 'rendering',
  4049. fn: function (html){
  4050. var self=this;
  4051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4052. return $core.withContext(function($ctx1) {
  4053. //>>excludeEnd("ctx");
  4054. self._renderTopPanelOn_(html);
  4055. self._renderTabsOn_(html);
  4056. self._renderBottomPanelOn_(html);
  4057. return self;
  4058. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4059. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Browser)});
  4060. //>>excludeEnd("ctx");
  4061. },
  4062. //>>excludeStart("ide", pragmas.excludeIdeData);
  4063. args: ["html"],
  4064. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderTopPanelOn: html;\x0a\x09renderTabsOn: html;\x0a\x09renderBottomPanelOn: html",
  4065. referencedClasses: [],
  4066. //>>excludeEnd("ide");
  4067. messageSends: ["renderTopPanelOn:", "renderTabsOn:", "renderBottomPanelOn:"]
  4068. }),
  4069. $globals.Browser);
  4070. $core.addMethod(
  4071. $core.method({
  4072. selector: "renderButtonsOn:",
  4073. protocol: 'rendering',
  4074. fn: function (html){
  4075. var self=this;
  4076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4077. return $core.withContext(function($ctx1) {
  4078. //>>excludeEnd("ctx");
  4079. var $1,$2,$3,$5,$6,$7,$8,$9,$4;
  4080. self["@saveButton"]=$recv(html)._button();
  4081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4082. $ctx1.sendIdx["button"]=1;
  4083. //>>excludeEnd("ctx");
  4084. $1=self["@saveButton"];
  4085. $recv($1)._with_("Save");
  4086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4087. $ctx1.sendIdx["with:"]=1;
  4088. //>>excludeEnd("ctx");
  4089. $2=$recv($1)._onClick_((function(){
  4090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4091. return $core.withContext(function($ctx2) {
  4092. //>>excludeEnd("ctx");
  4093. return self._compile();
  4094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4095. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4096. //>>excludeEnd("ctx");
  4097. }));
  4098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4099. $ctx1.sendIdx["onClick:"]=1;
  4100. //>>excludeEnd("ctx");
  4101. self["@methodButtons"]=$recv(html)._span();
  4102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4103. $ctx1.sendIdx["span"]=1;
  4104. //>>excludeEnd("ctx");
  4105. self["@classButtons"]=$recv(html)._span();
  4106. $3=$recv(html)._div();
  4107. $recv($3)._class_("right");
  4108. $4=$recv($3)._with_((function(){
  4109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4110. return $core.withContext(function($ctx2) {
  4111. //>>excludeEnd("ctx");
  4112. $5=$recv(html)._button();
  4113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4114. $ctx2.sendIdx["button"]=2;
  4115. //>>excludeEnd("ctx");
  4116. $recv($5)._with_("DoIt");
  4117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4118. $ctx2.sendIdx["with:"]=3;
  4119. //>>excludeEnd("ctx");
  4120. $6=$recv($5)._onClick_((function(){
  4121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4122. return $core.withContext(function($ctx3) {
  4123. //>>excludeEnd("ctx");
  4124. return $recv(self["@sourceArea"])._doIt();
  4125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4126. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4127. //>>excludeEnd("ctx");
  4128. }));
  4129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4130. $ctx2.sendIdx["onClick:"]=2;
  4131. //>>excludeEnd("ctx");
  4132. $6;
  4133. $7=$recv(html)._button();
  4134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4135. $ctx2.sendIdx["button"]=3;
  4136. //>>excludeEnd("ctx");
  4137. $recv($7)._with_("PrintIt");
  4138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4139. $ctx2.sendIdx["with:"]=4;
  4140. //>>excludeEnd("ctx");
  4141. $8=$recv($7)._onClick_((function(){
  4142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4143. return $core.withContext(function($ctx3) {
  4144. //>>excludeEnd("ctx");
  4145. return $recv(self["@sourceArea"])._printIt();
  4146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4147. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4148. //>>excludeEnd("ctx");
  4149. }));
  4150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4151. $ctx2.sendIdx["onClick:"]=3;
  4152. //>>excludeEnd("ctx");
  4153. $8;
  4154. $9=$recv(html)._button();
  4155. $recv($9)._with_("InspectIt");
  4156. return $recv($9)._onClick_((function(){
  4157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4158. return $core.withContext(function($ctx3) {
  4159. //>>excludeEnd("ctx");
  4160. return $recv(self["@sourceArea"])._inspectIt();
  4161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4162. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  4163. //>>excludeEnd("ctx");
  4164. }));
  4165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4166. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4167. //>>excludeEnd("ctx");
  4168. }));
  4169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4170. $ctx1.sendIdx["with:"]=2;
  4171. //>>excludeEnd("ctx");
  4172. self._updateSourceAndButtons();
  4173. return self;
  4174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4175. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Browser)});
  4176. //>>excludeEnd("ctx");
  4177. },
  4178. //>>excludeStart("ide", pragmas.excludeIdeData);
  4179. args: ["html"],
  4180. 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",
  4181. referencedClasses: [],
  4182. //>>excludeEnd("ide");
  4183. messageSends: ["button", "with:", "onClick:", "compile", "span", "class:", "div", "doIt", "printIt", "inspectIt", "updateSourceAndButtons"]
  4184. }),
  4185. $globals.Browser);
  4186. $core.addMethod(
  4187. $core.method({
  4188. selector: "renderTabsOn:",
  4189. protocol: 'rendering',
  4190. fn: function (html){
  4191. var self=this;
  4192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4193. return $core.withContext(function($ctx1) {
  4194. //>>excludeEnd("ctx");
  4195. self["@tabsList"]=$recv($recv(html)._ul())._class_("amber_tabs amber_browser");
  4196. self._updateTabsList();
  4197. return self;
  4198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4199. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.Browser)});
  4200. //>>excludeEnd("ctx");
  4201. },
  4202. //>>excludeStart("ide", pragmas.excludeIdeData);
  4203. args: ["html"],
  4204. source: "renderTabsOn: html\x0a\x09tabsList := html ul class: 'amber_tabs amber_browser'.\x0a\x09self updateTabsList.",
  4205. referencedClasses: [],
  4206. //>>excludeEnd("ide");
  4207. messageSends: ["class:", "ul", "updateTabsList"]
  4208. }),
  4209. $globals.Browser);
  4210. $core.addMethod(
  4211. $core.method({
  4212. selector: "renderTopPanelOn:",
  4213. protocol: 'rendering',
  4214. fn: function (html){
  4215. var self=this;
  4216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4217. return $core.withContext(function($ctx1) {
  4218. //>>excludeEnd("ctx");
  4219. var $1,$3,$4,$6,$7,$8,$9,$10,$5,$11,$2;
  4220. $1=$recv(html)._div();
  4221. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4222. $ctx1.sendIdx["div"]=1;
  4223. //>>excludeEnd("ctx");
  4224. $recv($1)._class_("top");
  4225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4226. $ctx1.sendIdx["class:"]=1;
  4227. //>>excludeEnd("ctx");
  4228. $2=$recv($1)._with_((function(){
  4229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4230. return $core.withContext(function($ctx2) {
  4231. //>>excludeEnd("ctx");
  4232. $3=$recv(html)._ul();
  4233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4234. $ctx2.sendIdx["ul"]=1;
  4235. //>>excludeEnd("ctx");
  4236. self["@packagesList"]=$recv($3)._class_("amber_column browser packages");
  4237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4238. $ctx2.sendIdx["class:"]=2;
  4239. //>>excludeEnd("ctx");
  4240. self["@packagesList"];
  4241. $4=$recv(html)._div();
  4242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4243. $ctx2.sendIdx["div"]=2;
  4244. //>>excludeEnd("ctx");
  4245. $recv($4)._class_("amber_packagesButtons");
  4246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4247. $ctx2.sendIdx["class:"]=3;
  4248. //>>excludeEnd("ctx");
  4249. $5=$recv($4)._with_((function(){
  4250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4251. return $core.withContext(function($ctx3) {
  4252. //>>excludeEnd("ctx");
  4253. $6=$recv(html)._button();
  4254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4255. $ctx3.sendIdx["button"]=1;
  4256. //>>excludeEnd("ctx");
  4257. $recv($6)._title_("Commit classes in this package to disk");
  4258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4259. $ctx3.sendIdx["title:"]=1;
  4260. //>>excludeEnd("ctx");
  4261. $recv($6)._onClick_((function(){
  4262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4263. return $core.withContext(function($ctx4) {
  4264. //>>excludeEnd("ctx");
  4265. return self._commitPackage();
  4266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4267. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  4268. //>>excludeEnd("ctx");
  4269. }));
  4270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4271. $ctx3.sendIdx["onClick:"]=1;
  4272. //>>excludeEnd("ctx");
  4273. $7=$recv($6)._with_("Commit");
  4274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4275. $ctx3.sendIdx["with:"]=3;
  4276. //>>excludeEnd("ctx");
  4277. $7;
  4278. $8=$recv(html)._button();
  4279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4280. $ctx3.sendIdx["button"]=2;
  4281. //>>excludeEnd("ctx");
  4282. $recv($8)._title_("Rename package");
  4283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4284. $ctx3.sendIdx["title:"]=2;
  4285. //>>excludeEnd("ctx");
  4286. $recv($8)._onClick_((function(){
  4287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4288. return $core.withContext(function($ctx4) {
  4289. //>>excludeEnd("ctx");
  4290. return self._renamePackage();
  4291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4292. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4293. //>>excludeEnd("ctx");
  4294. }));
  4295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4296. $ctx3.sendIdx["onClick:"]=2;
  4297. //>>excludeEnd("ctx");
  4298. $9=$recv($8)._with_("Rename");
  4299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4300. $ctx3.sendIdx["with:"]=4;
  4301. //>>excludeEnd("ctx");
  4302. $9;
  4303. $10=$recv(html)._button();
  4304. $recv($10)._title_("Remove this package from the system");
  4305. $recv($10)._onClick_((function(){
  4306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4307. return $core.withContext(function($ctx4) {
  4308. //>>excludeEnd("ctx");
  4309. return self._removePackage();
  4310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4311. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4312. //>>excludeEnd("ctx");
  4313. }));
  4314. return $recv($10)._with_("Remove");
  4315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4316. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4317. //>>excludeEnd("ctx");
  4318. }));
  4319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4320. $ctx2.sendIdx["with:"]=2;
  4321. //>>excludeEnd("ctx");
  4322. $5;
  4323. self["@classesList"]=$recv($globals.ClassesList)._on_(self);
  4324. self["@classesList"];
  4325. $recv(self["@classesList"])._renderOn_(html);
  4326. $11=$recv(html)._ul();
  4327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4328. $ctx2.sendIdx["ul"]=2;
  4329. //>>excludeEnd("ctx");
  4330. self["@protocolsList"]=$recv($11)._class_("amber_column browser protocols");
  4331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4332. $ctx2.sendIdx["class:"]=4;
  4333. //>>excludeEnd("ctx");
  4334. self["@protocolsList"];
  4335. self["@methodsList"]=$recv($recv(html)._ul())._class_("amber_column browser methods");
  4336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4337. $ctx2.sendIdx["class:"]=5;
  4338. //>>excludeEnd("ctx");
  4339. self["@methodsList"];
  4340. self._updateCategoriesList();
  4341. self._updateClassesList();
  4342. self._updateProtocolsList();
  4343. self._updateMethodsList();
  4344. return $recv($recv(html)._div())._class_("amber_clear");
  4345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4346. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4347. //>>excludeEnd("ctx");
  4348. }));
  4349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4350. $ctx1.sendIdx["with:"]=1;
  4351. //>>excludeEnd("ctx");
  4352. return self;
  4353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4354. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.Browser)});
  4355. //>>excludeEnd("ctx");
  4356. },
  4357. //>>excludeStart("ide", pragmas.excludeIdeData);
  4358. args: ["html"],
  4359. 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' ]",
  4360. referencedClasses: ["ClassesList"],
  4361. //>>excludeEnd("ide");
  4362. messageSends: ["class:", "div", "with:", "ul", "title:", "button", "onClick:", "commitPackage", "renamePackage", "removePackage", "on:", "renderOn:", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList"]
  4363. }),
  4364. $globals.Browser);
  4365. $core.addMethod(
  4366. $core.method({
  4367. selector: "resetClassesList",
  4368. protocol: 'updating',
  4369. fn: function (){
  4370. var self=this;
  4371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4372. return $core.withContext(function($ctx1) {
  4373. //>>excludeEnd("ctx");
  4374. $recv(self["@classesList"])._resetNodes();
  4375. return self;
  4376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4377. }, function($ctx1) {$ctx1.fill(self,"resetClassesList",{},$globals.Browser)});
  4378. //>>excludeEnd("ctx");
  4379. },
  4380. //>>excludeStart("ide", pragmas.excludeIdeData);
  4381. args: [],
  4382. source: "resetClassesList\x0a\x09classesList resetNodes",
  4383. referencedClasses: [],
  4384. //>>excludeEnd("ide");
  4385. messageSends: ["resetNodes"]
  4386. }),
  4387. $globals.Browser);
  4388. $core.addMethod(
  4389. $core.method({
  4390. selector: "search:",
  4391. protocol: 'actions',
  4392. fn: function (aString){
  4393. var self=this;
  4394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4395. return $core.withContext(function($ctx1) {
  4396. //>>excludeEnd("ctx");
  4397. var $1,$2;
  4398. $1=self._cancelChanges();
  4399. if($core.assert($1)){
  4400. var searchedClass;
  4401. searchedClass=$recv($recv($globals.Smalltalk)._globals())._at_(aString);
  4402. searchedClass;
  4403. $2=$recv(searchedClass)._isClass();
  4404. if($core.assert($2)){
  4405. $recv(self._class())._openOn_(searchedClass);
  4406. } else {
  4407. self._searchReferencesOf_(aString);
  4408. };
  4409. };
  4410. return self;
  4411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4412. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.Browser)});
  4413. //>>excludeEnd("ctx");
  4414. },
  4415. //>>excludeStart("ide", pragmas.excludeIdeData);
  4416. args: ["aString"],
  4417. 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 ]]",
  4418. referencedClasses: ["Smalltalk"],
  4419. //>>excludeEnd("ide");
  4420. messageSends: ["ifTrue:", "cancelChanges", "at:", "globals", "ifTrue:ifFalse:", "isClass", "openOn:", "class", "searchReferencesOf:"]
  4421. }),
  4422. $globals.Browser);
  4423. $core.addMethod(
  4424. $core.method({
  4425. selector: "searchClassReferences",
  4426. protocol: 'actions',
  4427. fn: function (){
  4428. var self=this;
  4429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4430. return $core.withContext(function($ctx1) {
  4431. //>>excludeEnd("ctx");
  4432. $recv($globals.ReferencesBrowser)._search_($recv(self["@selectedClass"])._name());
  4433. return self;
  4434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4435. }, function($ctx1) {$ctx1.fill(self,"searchClassReferences",{},$globals.Browser)});
  4436. //>>excludeEnd("ctx");
  4437. },
  4438. //>>excludeStart("ide", pragmas.excludeIdeData);
  4439. args: [],
  4440. source: "searchClassReferences\x0a\x09ReferencesBrowser search: selectedClass name",
  4441. referencedClasses: ["ReferencesBrowser"],
  4442. //>>excludeEnd("ide");
  4443. messageSends: ["search:", "name"]
  4444. }),
  4445. $globals.Browser);
  4446. $core.addMethod(
  4447. $core.method({
  4448. selector: "searchReferencesOf:",
  4449. protocol: 'actions',
  4450. fn: function (aString){
  4451. var self=this;
  4452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4453. return $core.withContext(function($ctx1) {
  4454. //>>excludeEnd("ctx");
  4455. $recv($globals.ReferencesBrowser)._search_(aString);
  4456. return self;
  4457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4458. }, function($ctx1) {$ctx1.fill(self,"searchReferencesOf:",{aString:aString},$globals.Browser)});
  4459. //>>excludeEnd("ctx");
  4460. },
  4461. //>>excludeStart("ide", pragmas.excludeIdeData);
  4462. args: ["aString"],
  4463. source: "searchReferencesOf: aString\x0a\x09ReferencesBrowser search: aString",
  4464. referencedClasses: ["ReferencesBrowser"],
  4465. //>>excludeEnd("ide");
  4466. messageSends: ["search:"]
  4467. }),
  4468. $globals.Browser);
  4469. $core.addMethod(
  4470. $core.method({
  4471. selector: "selectCategory:",
  4472. protocol: 'actions',
  4473. fn: function (aCategory){
  4474. var self=this;
  4475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4476. return $core.withContext(function($ctx1) {
  4477. //>>excludeEnd("ctx");
  4478. var $1;
  4479. $1=self._cancelChanges();
  4480. if($core.assert($1)){
  4481. self["@selectedPackage"]=aCategory;
  4482. self["@selectedPackage"];
  4483. self["@selectedMethod"]=nil;
  4484. self["@selectedProtocol"]=self["@selectedMethod"];
  4485. self["@selectedClass"]=self["@selectedProtocol"];
  4486. self["@selectedClass"];
  4487. self._resetClassesList();
  4488. self._updateCategoriesList();
  4489. self._updateClassesList();
  4490. self._updateProtocolsList();
  4491. self._updateMethodsList();
  4492. self._updateSourceAndButtons();
  4493. };
  4494. return self;
  4495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4496. }, function($ctx1) {$ctx1.fill(self,"selectCategory:",{aCategory:aCategory},$globals.Browser)});
  4497. //>>excludeEnd("ctx");
  4498. },
  4499. //>>excludeStart("ide", pragmas.excludeIdeData);
  4500. args: ["aCategory"],
  4501. 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 ]",
  4502. referencedClasses: [],
  4503. //>>excludeEnd("ide");
  4504. messageSends: ["ifTrue:", "cancelChanges", "resetClassesList", "updateCategoriesList", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4505. }),
  4506. $globals.Browser);
  4507. $core.addMethod(
  4508. $core.method({
  4509. selector: "selectClass:",
  4510. protocol: 'actions',
  4511. fn: function (aClass){
  4512. var self=this;
  4513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4514. return $core.withContext(function($ctx1) {
  4515. //>>excludeEnd("ctx");
  4516. var $1;
  4517. $1=self._cancelChanges();
  4518. if($core.assert($1)){
  4519. self["@selectedClass"]=aClass;
  4520. self["@selectedClass"];
  4521. self["@selectedMethod"]=nil;
  4522. self["@selectedProtocol"]=self["@selectedMethod"];
  4523. self["@selectedProtocol"];
  4524. self._updateClassesList();
  4525. self._updateProtocolsList();
  4526. self._updateMethodsList();
  4527. self._updateSourceAndButtons();
  4528. };
  4529. return self;
  4530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4531. }, function($ctx1) {$ctx1.fill(self,"selectClass:",{aClass:aClass},$globals.Browser)});
  4532. //>>excludeEnd("ctx");
  4533. },
  4534. //>>excludeStart("ide", pragmas.excludeIdeData);
  4535. args: ["aClass"],
  4536. 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 ]",
  4537. referencedClasses: [],
  4538. //>>excludeEnd("ide");
  4539. messageSends: ["ifTrue:", "cancelChanges", "updateClassesList", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4540. }),
  4541. $globals.Browser);
  4542. $core.addMethod(
  4543. $core.method({
  4544. selector: "selectMethod:",
  4545. protocol: 'actions',
  4546. fn: function (aMethod){
  4547. var self=this;
  4548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4549. return $core.withContext(function($ctx1) {
  4550. //>>excludeEnd("ctx");
  4551. var $1;
  4552. $1=self._cancelChanges();
  4553. if($core.assert($1)){
  4554. self["@selectedMethod"]=aMethod;
  4555. self["@selectedMethod"];
  4556. self._updateProtocolsList();
  4557. self._updateMethodsList();
  4558. self._updateSourceAndButtons();
  4559. };
  4560. return self;
  4561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4562. }, function($ctx1) {$ctx1.fill(self,"selectMethod:",{aMethod:aMethod},$globals.Browser)});
  4563. //>>excludeEnd("ctx");
  4564. },
  4565. //>>excludeStart("ide", pragmas.excludeIdeData);
  4566. args: ["aMethod"],
  4567. source: "selectMethod: aMethod\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedMethod := aMethod.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4568. referencedClasses: [],
  4569. //>>excludeEnd("ide");
  4570. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4571. }),
  4572. $globals.Browser);
  4573. $core.addMethod(
  4574. $core.method({
  4575. selector: "selectProtocol:",
  4576. protocol: 'actions',
  4577. fn: function (aString){
  4578. var self=this;
  4579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4580. return $core.withContext(function($ctx1) {
  4581. //>>excludeEnd("ctx");
  4582. var $1;
  4583. $1=self._cancelChanges();
  4584. if($core.assert($1)){
  4585. self["@selectedProtocol"]=aString;
  4586. self["@selectedProtocol"];
  4587. self["@selectedMethod"]=nil;
  4588. self["@selectedMethod"];
  4589. self._updateProtocolsList();
  4590. self._updateMethodsList();
  4591. self._updateSourceAndButtons();
  4592. };
  4593. return self;
  4594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4595. }, function($ctx1) {$ctx1.fill(self,"selectProtocol:",{aString:aString},$globals.Browser)});
  4596. //>>excludeEnd("ctx");
  4597. },
  4598. //>>excludeStart("ide", pragmas.excludeIdeData);
  4599. args: ["aString"],
  4600. source: "selectProtocol: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedProtocol := aString.\x0a\x09selectedMethod := nil.\x0a\x09self\x0a\x09\x09updateProtocolsList;\x0a\x09\x09updateMethodsList;\x0a\x09\x09updateSourceAndButtons ]",
  4601. referencedClasses: [],
  4602. //>>excludeEnd("ide");
  4603. messageSends: ["ifTrue:", "cancelChanges", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4604. }),
  4605. $globals.Browser);
  4606. $core.addMethod(
  4607. $core.method({
  4608. selector: "selectTab:",
  4609. protocol: 'actions',
  4610. fn: function (aString){
  4611. var self=this;
  4612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4613. return $core.withContext(function($ctx1) {
  4614. //>>excludeEnd("ctx");
  4615. var $1;
  4616. $1=self._cancelChanges();
  4617. if($core.assert($1)){
  4618. self["@selectedTab"]=aString;
  4619. self["@selectedTab"];
  4620. self._selectProtocol_(nil);
  4621. self._updateTabsList();
  4622. };
  4623. return self;
  4624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4625. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aString:aString},$globals.Browser)});
  4626. //>>excludeEnd("ctx");
  4627. },
  4628. //>>excludeStart("ide", pragmas.excludeIdeData);
  4629. args: ["aString"],
  4630. source: "selectTab: aString\x0a\x09self cancelChanges ifTrue: [\x0a\x09selectedTab := aString.\x0a\x09self selectProtocol: nil.\x0a\x09self updateTabsList ]",
  4631. referencedClasses: [],
  4632. //>>excludeEnd("ide");
  4633. messageSends: ["ifTrue:", "cancelChanges", "selectProtocol:", "updateTabsList"]
  4634. }),
  4635. $globals.Browser);
  4636. $core.addMethod(
  4637. $core.method({
  4638. selector: "selectedClass",
  4639. protocol: 'accessing',
  4640. fn: function (){
  4641. var self=this;
  4642. return self["@selectedClass"];
  4643. },
  4644. //>>excludeStart("ide", pragmas.excludeIdeData);
  4645. args: [],
  4646. source: "selectedClass\x0a\x09^ selectedClass",
  4647. referencedClasses: [],
  4648. //>>excludeEnd("ide");
  4649. messageSends: []
  4650. }),
  4651. $globals.Browser);
  4652. $core.addMethod(
  4653. $core.method({
  4654. selector: "selectedPackage",
  4655. protocol: 'accessing',
  4656. fn: function (){
  4657. var self=this;
  4658. return self["@selectedPackage"];
  4659. },
  4660. //>>excludeStart("ide", pragmas.excludeIdeData);
  4661. args: [],
  4662. source: "selectedPackage\x0a\x09^ selectedPackage",
  4663. referencedClasses: [],
  4664. //>>excludeEnd("ide");
  4665. messageSends: []
  4666. }),
  4667. $globals.Browser);
  4668. $core.addMethod(
  4669. $core.method({
  4670. selector: "setMethodProtocol:",
  4671. protocol: 'actions',
  4672. fn: function (aString){
  4673. var self=this;
  4674. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4675. return $core.withContext(function($ctx1) {
  4676. //>>excludeEnd("ctx");
  4677. var $1,$2;
  4678. $1=self._cancelChanges();
  4679. if($core.assert($1)){
  4680. $2=$recv(self._protocols())._includes_(aString);
  4681. if($core.assert($2)){
  4682. $recv(self["@selectedMethod"])._protocol_(aString);
  4683. self["@selectedProtocol"]=aString;
  4684. self["@selectedProtocol"];
  4685. self["@selectedMethod"]=self["@selectedMethod"];
  4686. self["@selectedMethod"];
  4687. self._updateProtocolsList();
  4688. self._updateMethodsList();
  4689. self._updateSourceAndButtons();
  4690. } else {
  4691. self._addNewProtocol();
  4692. };
  4693. };
  4694. return self;
  4695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4696. }, function($ctx1) {$ctx1.fill(self,"setMethodProtocol:",{aString:aString},$globals.Browser)});
  4697. //>>excludeEnd("ctx");
  4698. },
  4699. //>>excludeStart("ide", pragmas.excludeIdeData);
  4700. args: ["aString"],
  4701. 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 ]]",
  4702. referencedClasses: [],
  4703. //>>excludeEnd("ide");
  4704. messageSends: ["ifTrue:", "cancelChanges", "ifFalse:ifTrue:", "includes:", "protocols", "addNewProtocol", "protocol:", "updateProtocolsList", "updateMethodsList", "updateSourceAndButtons"]
  4705. }),
  4706. $globals.Browser);
  4707. $core.addMethod(
  4708. $core.method({
  4709. selector: "showClassButtons",
  4710. protocol: 'actions',
  4711. fn: function (){
  4712. var self=this;
  4713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4714. return $core.withContext(function($ctx1) {
  4715. //>>excludeEnd("ctx");
  4716. $recv($recv(self["@classButtons"])._asJQuery())._show();
  4717. return self;
  4718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4719. }, function($ctx1) {$ctx1.fill(self,"showClassButtons",{},$globals.Browser)});
  4720. //>>excludeEnd("ctx");
  4721. },
  4722. //>>excludeStart("ide", pragmas.excludeIdeData);
  4723. args: [],
  4724. source: "showClassButtons\x0a\x09classButtons asJQuery show",
  4725. referencedClasses: [],
  4726. //>>excludeEnd("ide");
  4727. messageSends: ["show", "asJQuery"]
  4728. }),
  4729. $globals.Browser);
  4730. $core.addMethod(
  4731. $core.method({
  4732. selector: "showMethodButtons",
  4733. protocol: 'actions',
  4734. fn: function (){
  4735. var self=this;
  4736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4737. return $core.withContext(function($ctx1) {
  4738. //>>excludeEnd("ctx");
  4739. $recv($recv(self["@methodButtons"])._asJQuery())._show();
  4740. return self;
  4741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4742. }, function($ctx1) {$ctx1.fill(self,"showMethodButtons",{},$globals.Browser)});
  4743. //>>excludeEnd("ctx");
  4744. },
  4745. //>>excludeStart("ide", pragmas.excludeIdeData);
  4746. args: [],
  4747. source: "showMethodButtons\x0a\x09methodButtons asJQuery show",
  4748. referencedClasses: [],
  4749. //>>excludeEnd("ide");
  4750. messageSends: ["show", "asJQuery"]
  4751. }),
  4752. $globals.Browser);
  4753. $core.addMethod(
  4754. $core.method({
  4755. selector: "source",
  4756. protocol: 'accessing',
  4757. fn: function (){
  4758. var self=this;
  4759. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4760. return $core.withContext(function($ctx1) {
  4761. //>>excludeEnd("ctx");
  4762. var $1,$3,$2,$4,$receiver;
  4763. $1=$recv(self["@selectedTab"]).__eq("comment");
  4764. if(!$core.assert($1)){
  4765. $3=$recv(self["@selectedProtocol"])._notNil();
  4766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4767. $ctx1.sendIdx["notNil"]=1;
  4768. //>>excludeEnd("ctx");
  4769. $2=$recv($3)._or_((function(){
  4770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4771. return $core.withContext(function($ctx2) {
  4772. //>>excludeEnd("ctx");
  4773. return $recv(self["@selectedMethod"])._notNil();
  4774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4775. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4776. //>>excludeEnd("ctx");
  4777. }));
  4778. return $recv($2)._ifFalse_ifTrue_((function(){
  4779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4780. return $core.withContext(function($ctx2) {
  4781. //>>excludeEnd("ctx");
  4782. return self._declarationSource();
  4783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4784. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  4785. //>>excludeEnd("ctx");
  4786. }),(function(){
  4787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4788. return $core.withContext(function($ctx2) {
  4789. //>>excludeEnd("ctx");
  4790. return self._methodSource();
  4791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4792. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  4793. //>>excludeEnd("ctx");
  4794. }));
  4795. };
  4796. $4=self["@selectedClass"];
  4797. if(($receiver = $4) == null || $receiver.isNil){
  4798. return "";
  4799. } else {
  4800. return self._classCommentSource();
  4801. };
  4802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4803. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Browser)});
  4804. //>>excludeEnd("ctx");
  4805. },
  4806. //>>excludeStart("ide", pragmas.excludeIdeData);
  4807. args: [],
  4808. 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 ]",
  4809. referencedClasses: [],
  4810. //>>excludeEnd("ide");
  4811. messageSends: ["ifFalse:", "=", "ifFalse:ifTrue:", "or:", "notNil", "declarationSource", "methodSource", "ifNil:ifNotNil:", "classCommentSource"]
  4812. }),
  4813. $globals.Browser);
  4814. $core.addMethod(
  4815. $core.method({
  4816. selector: "updateCategoriesList",
  4817. protocol: 'updating',
  4818. fn: function (){
  4819. var self=this;
  4820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4821. return $core.withContext(function($ctx1) {
  4822. //>>excludeEnd("ctx");
  4823. var $1,$2,$3;
  4824. $recv(self["@packagesList"])._contents_((function(html){
  4825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4826. return $core.withContext(function($ctx2) {
  4827. //>>excludeEnd("ctx");
  4828. return $recv(self._packages())._do_((function(each){
  4829. var li,label;
  4830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4831. return $core.withContext(function($ctx3) {
  4832. //>>excludeEnd("ctx");
  4833. $1=$recv(each)._isEmpty();
  4834. if($core.assert($1)){
  4835. label="Unclassified";
  4836. label;
  4837. } else {
  4838. label=each;
  4839. label;
  4840. };
  4841. li=$recv(html)._li();
  4842. li;
  4843. $2=$recv(self["@selectedPackage"]).__eq(each);
  4844. if($core.assert($2)){
  4845. $recv(li)._class_("selected");
  4846. };
  4847. $3=li;
  4848. $recv($3)._with_(label);
  4849. return $recv($3)._onClick_((function(){
  4850. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4851. return $core.withContext(function($ctx4) {
  4852. //>>excludeEnd("ctx");
  4853. return self._selectCategory_(each);
  4854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4855. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
  4856. //>>excludeEnd("ctx");
  4857. }));
  4858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4859. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li,label:label},$ctx2,2)});
  4860. //>>excludeEnd("ctx");
  4861. }));
  4862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4863. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4864. //>>excludeEnd("ctx");
  4865. }));
  4866. return self;
  4867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4868. }, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},$globals.Browser)});
  4869. //>>excludeEnd("ctx");
  4870. },
  4871. //>>excludeStart("ide", pragmas.excludeIdeData);
  4872. args: [],
  4873. source: "updateCategoriesList\x0a\x09packagesList contents: [ :html |\x0a\x09self packages do: [ :each || li label |\x0a\x09\x09each isEmpty\x0a\x09\x09ifTrue: [ label := 'Unclassified' ]\x0a\x09\x09ifFalse: [ label := each ].\x0a\x09\x09li := html li.\x0a\x09\x09selectedPackage = each ifTrue: [\x0a\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09with: label;\x0a\x09\x09onClick: [ self selectCategory: each ]] ]",
  4874. referencedClasses: [],
  4875. //>>excludeEnd("ide");
  4876. messageSends: ["contents:", "do:", "packages", "ifTrue:ifFalse:", "isEmpty", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectCategory:"]
  4877. }),
  4878. $globals.Browser);
  4879. $core.addMethod(
  4880. $core.method({
  4881. selector: "updateClassesList",
  4882. protocol: 'updating',
  4883. fn: function (){
  4884. var self=this;
  4885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4886. return $core.withContext(function($ctx1) {
  4887. //>>excludeEnd("ctx");
  4888. $recv($recv($globals.TabManager)._current())._update();
  4889. $recv(self["@classesList"])._updateNodes();
  4890. return self;
  4891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4892. }, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},$globals.Browser)});
  4893. //>>excludeEnd("ctx");
  4894. },
  4895. //>>excludeStart("ide", pragmas.excludeIdeData);
  4896. args: [],
  4897. source: "updateClassesList\x0a\x09TabManager current update.\x0a\x09classesList updateNodes",
  4898. referencedClasses: ["TabManager"],
  4899. //>>excludeEnd("ide");
  4900. messageSends: ["update", "current", "updateNodes"]
  4901. }),
  4902. $globals.Browser);
  4903. $core.addMethod(
  4904. $core.method({
  4905. selector: "updateMethodsList",
  4906. protocol: 'updating',
  4907. fn: function (){
  4908. var self=this;
  4909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4910. return $core.withContext(function($ctx1) {
  4911. //>>excludeEnd("ctx");
  4912. var $1,$2;
  4913. $recv(self["@methodsList"])._contents_((function(html){
  4914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4915. return $core.withContext(function($ctx2) {
  4916. //>>excludeEnd("ctx");
  4917. return $recv(self._methods())._do_((function(each){
  4918. var li;
  4919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4920. return $core.withContext(function($ctx3) {
  4921. //>>excludeEnd("ctx");
  4922. li=$recv(html)._li();
  4923. li;
  4924. $1=$recv(self["@selectedMethod"]).__eq(each);
  4925. if($core.assert($1)){
  4926. $recv(li)._class_("selected");
  4927. };
  4928. $2=li;
  4929. $recv($2)._with_($recv(each)._selector());
  4930. return $recv($2)._onClick_((function(){
  4931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4932. return $core.withContext(function($ctx4) {
  4933. //>>excludeEnd("ctx");
  4934. return self._selectMethod_(each);
  4935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4936. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4937. //>>excludeEnd("ctx");
  4938. }));
  4939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4940. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  4941. //>>excludeEnd("ctx");
  4942. }));
  4943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4944. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4945. //>>excludeEnd("ctx");
  4946. }));
  4947. return self;
  4948. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4949. }, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},$globals.Browser)});
  4950. //>>excludeEnd("ctx");
  4951. },
  4952. //>>excludeStart("ide", pragmas.excludeIdeData);
  4953. args: [],
  4954. 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 ]] ]",
  4955. referencedClasses: [],
  4956. //>>excludeEnd("ide");
  4957. messageSends: ["contents:", "do:", "methods", "li", "ifTrue:", "=", "class:", "with:", "selector", "onClick:", "selectMethod:"]
  4958. }),
  4959. $globals.Browser);
  4960. $core.addMethod(
  4961. $core.method({
  4962. selector: "updateProtocolsList",
  4963. protocol: 'updating',
  4964. fn: function (){
  4965. var self=this;
  4966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4967. return $core.withContext(function($ctx1) {
  4968. //>>excludeEnd("ctx");
  4969. var $1,$2;
  4970. $recv(self["@protocolsList"])._contents_((function(html){
  4971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4972. return $core.withContext(function($ctx2) {
  4973. //>>excludeEnd("ctx");
  4974. return $recv(self._protocols())._do_((function(each){
  4975. var li;
  4976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4977. return $core.withContext(function($ctx3) {
  4978. //>>excludeEnd("ctx");
  4979. li=$recv(html)._li();
  4980. li;
  4981. $1=$recv(self["@selectedProtocol"]).__eq(each);
  4982. if($core.assert($1)){
  4983. $recv(li)._class_("selected");
  4984. };
  4985. $2=li;
  4986. $recv($2)._with_(each);
  4987. return $recv($2)._onClick_((function(){
  4988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4989. return $core.withContext(function($ctx4) {
  4990. //>>excludeEnd("ctx");
  4991. return self._selectProtocol_(each);
  4992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4993. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  4994. //>>excludeEnd("ctx");
  4995. }));
  4996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4997. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  4998. //>>excludeEnd("ctx");
  4999. }));
  5000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5001. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  5002. //>>excludeEnd("ctx");
  5003. }));
  5004. return self;
  5005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5006. }, function($ctx1) {$ctx1.fill(self,"updateProtocolsList",{},$globals.Browser)});
  5007. //>>excludeEnd("ctx");
  5008. },
  5009. //>>excludeStart("ide", pragmas.excludeIdeData);
  5010. args: [],
  5011. 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 ]] ]",
  5012. referencedClasses: [],
  5013. //>>excludeEnd("ide");
  5014. messageSends: ["contents:", "do:", "protocols", "li", "ifTrue:", "=", "class:", "with:", "onClick:", "selectProtocol:"]
  5015. }),
  5016. $globals.Browser);
  5017. $core.addMethod(
  5018. $core.method({
  5019. selector: "updateSourceAndButtons",
  5020. protocol: 'updating',
  5021. fn: function (){
  5022. var self=this;
  5023. var currentProtocol;
  5024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5025. return $core.withContext(function($ctx1) {
  5026. //>>excludeEnd("ctx");
  5027. 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;
  5028. self._disableSaveButton();
  5029. $recv(self["@classButtons"])._contents_((function(html){
  5030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5031. return $core.withContext(function($ctx2) {
  5032. //>>excludeEnd("ctx");
  5033. $1=$recv(html)._button();
  5034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5035. $ctx2.sendIdx["button"]=1;
  5036. //>>excludeEnd("ctx");
  5037. $recv($1)._title_("Create a new class");
  5038. $recv($1)._onClick_((function(){
  5039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5040. return $core.withContext(function($ctx3) {
  5041. //>>excludeEnd("ctx");
  5042. return self._addNewClass();
  5043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5044. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  5045. //>>excludeEnd("ctx");
  5046. }));
  5047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5048. $ctx2.sendIdx["onClick:"]=1;
  5049. //>>excludeEnd("ctx");
  5050. $2=$recv($1)._with_("New class");
  5051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5052. $ctx2.sendIdx["with:"]=1;
  5053. //>>excludeEnd("ctx");
  5054. $2;
  5055. $3=$recv(html)._button();
  5056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5057. $ctx2.sendIdx["button"]=2;
  5058. //>>excludeEnd("ctx");
  5059. $recv($3)._with_("Rename class");
  5060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5061. $ctx2.sendIdx["with:"]=2;
  5062. //>>excludeEnd("ctx");
  5063. $4=$recv($3)._onClick_((function(){
  5064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5065. return $core.withContext(function($ctx3) {
  5066. //>>excludeEnd("ctx");
  5067. return self._renameClass();
  5068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5069. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  5070. //>>excludeEnd("ctx");
  5071. }));
  5072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5073. $ctx2.sendIdx["onClick:"]=2;
  5074. //>>excludeEnd("ctx");
  5075. $4;
  5076. $5=$recv(html)._button();
  5077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5078. $ctx2.sendIdx["button"]=3;
  5079. //>>excludeEnd("ctx");
  5080. $recv($5)._with_("Copy class");
  5081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5082. $ctx2.sendIdx["with:"]=3;
  5083. //>>excludeEnd("ctx");
  5084. $6=$recv($5)._onClick_((function(){
  5085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5086. return $core.withContext(function($ctx3) {
  5087. //>>excludeEnd("ctx");
  5088. return self._copyClass();
  5089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5090. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  5091. //>>excludeEnd("ctx");
  5092. }));
  5093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5094. $ctx2.sendIdx["onClick:"]=3;
  5095. //>>excludeEnd("ctx");
  5096. $6;
  5097. $7=$recv(html)._button();
  5098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5099. $ctx2.sendIdx["button"]=4;
  5100. //>>excludeEnd("ctx");
  5101. $recv($7)._with_("Remove class");
  5102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5103. $ctx2.sendIdx["with:"]=4;
  5104. //>>excludeEnd("ctx");
  5105. $8=$recv($7)._onClick_((function(){
  5106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5107. return $core.withContext(function($ctx3) {
  5108. //>>excludeEnd("ctx");
  5109. return self._removeClass();
  5110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5111. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  5112. //>>excludeEnd("ctx");
  5113. }));
  5114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5115. $ctx2.sendIdx["onClick:"]=4;
  5116. //>>excludeEnd("ctx");
  5117. $8;
  5118. $9=$recv(html)._button();
  5119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5120. $ctx2.sendIdx["button"]=5;
  5121. //>>excludeEnd("ctx");
  5122. $recv($9)._with_("References");
  5123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5124. $ctx2.sendIdx["with:"]=5;
  5125. //>>excludeEnd("ctx");
  5126. $10=$recv($9)._onClick_((function(){
  5127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5128. return $core.withContext(function($ctx3) {
  5129. //>>excludeEnd("ctx");
  5130. return self._searchClassReferences();
  5131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5132. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)});
  5133. //>>excludeEnd("ctx");
  5134. }));
  5135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5136. $ctx2.sendIdx["onClick:"]=5;
  5137. //>>excludeEnd("ctx");
  5138. return $10;
  5139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5140. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  5141. //>>excludeEnd("ctx");
  5142. }));
  5143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5144. $ctx1.sendIdx["contents:"]=1;
  5145. //>>excludeEnd("ctx");
  5146. $recv(self["@methodButtons"])._contents_((function(html){
  5147. var protocolSelect,referencesSelect;
  5148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5149. return $core.withContext(function($ctx2) {
  5150. //>>excludeEnd("ctx");
  5151. $11=$recv(html)._button();
  5152. $recv($11)._with_("Remove method");
  5153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5154. $ctx2.sendIdx["with:"]=6;
  5155. //>>excludeEnd("ctx");
  5156. $recv($11)._onClick_((function(){
  5157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5158. return $core.withContext(function($ctx3) {
  5159. //>>excludeEnd("ctx");
  5160. return self._removeMethod();
  5161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5162. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,8)});
  5163. //>>excludeEnd("ctx");
  5164. }));
  5165. protocolSelect=$recv(html)._select();
  5166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5167. $ctx2.sendIdx["select"]=1;
  5168. //>>excludeEnd("ctx");
  5169. protocolSelect;
  5170. $12=protocolSelect;
  5171. $recv($12)._onChange_((function(){
  5172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5173. return $core.withContext(function($ctx3) {
  5174. //>>excludeEnd("ctx");
  5175. $14=$recv(protocolSelect)._asJQuery();
  5176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5177. $ctx3.sendIdx["asJQuery"]=1;
  5178. //>>excludeEnd("ctx");
  5179. $13=$recv($14)._val();
  5180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5181. $ctx3.sendIdx["val"]=1;
  5182. //>>excludeEnd("ctx");
  5183. return self._setMethodProtocol_($13);
  5184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5185. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)});
  5186. //>>excludeEnd("ctx");
  5187. }));
  5188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5189. $ctx2.sendIdx["onChange:"]=1;
  5190. //>>excludeEnd("ctx");
  5191. $15=$recv($12)._with_((function(){
  5192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5193. return $core.withContext(function($ctx3) {
  5194. //>>excludeEnd("ctx");
  5195. $16=$recv(html)._option();
  5196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5197. $ctx3.sendIdx["option"]=1;
  5198. //>>excludeEnd("ctx");
  5199. $recv($16)._with_("Method protocol");
  5200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5201. $ctx3.sendIdx["with:"]=8;
  5202. //>>excludeEnd("ctx");
  5203. $17=$recv($16)._at_put_("disabled","disabled");
  5204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5205. $ctx3.sendIdx["at:put:"]=1;
  5206. //>>excludeEnd("ctx");
  5207. $17;
  5208. $18=$recv(html)._option();
  5209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5210. $ctx3.sendIdx["option"]=2;
  5211. //>>excludeEnd("ctx");
  5212. $recv($18)._class_("important");
  5213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5214. $ctx3.sendIdx["class:"]=1;
  5215. //>>excludeEnd("ctx");
  5216. $19=$recv($18)._with_("New...");
  5217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5218. $ctx3.sendIdx["with:"]=9;
  5219. //>>excludeEnd("ctx");
  5220. $19;
  5221. currentProtocol=self["@selectedProtocol"];
  5222. currentProtocol;
  5223. $21=$recv(currentProtocol)._isNil();
  5224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5225. $ctx3.sendIdx["isNil"]=1;
  5226. //>>excludeEnd("ctx");
  5227. $20=$recv($21)._and_((function(){
  5228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5229. return $core.withContext(function($ctx4) {
  5230. //>>excludeEnd("ctx");
  5231. return $recv(self["@selectedMethod"])._notNil();
  5232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5233. $ctx4.sendIdx["notNil"]=1;
  5234. //>>excludeEnd("ctx");
  5235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5236. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,11)});
  5237. //>>excludeEnd("ctx");
  5238. }));
  5239. if($core.assert($20)){
  5240. currentProtocol=$recv(self["@selectedMethod"])._category();
  5241. currentProtocol;
  5242. };
  5243. return $recv(self._protocols())._do_((function(each){
  5244. var option;
  5245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5246. return $core.withContext(function($ctx4) {
  5247. //>>excludeEnd("ctx");
  5248. $22=$recv(html)._option();
  5249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5250. $ctx4.sendIdx["option"]=3;
  5251. //>>excludeEnd("ctx");
  5252. option=$recv($22)._with_(each);
  5253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5254. $ctx4.sendIdx["with:"]=10;
  5255. //>>excludeEnd("ctx");
  5256. option;
  5257. $23=$recv(currentProtocol).__eq(each);
  5258. if($core.assert($23)){
  5259. return $recv(option)._at_put_("selected","selected");
  5260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5261. $ctx4.sendIdx["at:put:"]=2;
  5262. //>>excludeEnd("ctx");
  5263. };
  5264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5265. }, function($ctx4) {$ctx4.fillBlock({each:each,option:option},$ctx3,13)});
  5266. //>>excludeEnd("ctx");
  5267. }));
  5268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5269. $ctx3.sendIdx["do:"]=1;
  5270. //>>excludeEnd("ctx");
  5271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5272. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)});
  5273. //>>excludeEnd("ctx");
  5274. }));
  5275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5276. $ctx2.sendIdx["with:"]=7;
  5277. //>>excludeEnd("ctx");
  5278. $15;
  5279. $24=$recv(self["@selectedMethod"])._isNil();
  5280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5281. $ctx2.sendIdx["isNil"]=2;
  5282. //>>excludeEnd("ctx");
  5283. if(!$core.assert($24)){
  5284. referencesSelect=$recv(html)._select();
  5285. referencesSelect;
  5286. $25=referencesSelect;
  5287. $recv($25)._onChange_((function(){
  5288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5289. return $core.withContext(function($ctx3) {
  5290. //>>excludeEnd("ctx");
  5291. return self._searchReferencesOf_($recv($recv(referencesSelect)._asJQuery())._val());
  5292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5293. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,16)});
  5294. //>>excludeEnd("ctx");
  5295. }));
  5296. $26=$recv($25)._with_((function(){
  5297. var option;
  5298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5299. return $core.withContext(function($ctx3) {
  5300. //>>excludeEnd("ctx");
  5301. $27=$recv(html)._option();
  5302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5303. $ctx3.sendIdx["option"]=4;
  5304. //>>excludeEnd("ctx");
  5305. $recv($27)._with_("References");
  5306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5307. $ctx3.sendIdx["with:"]=12;
  5308. //>>excludeEnd("ctx");
  5309. $recv($27)._at_put_("disabled","disabled");
  5310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5311. $ctx3.sendIdx["at:put:"]=3;
  5312. //>>excludeEnd("ctx");
  5313. $recv($27)._at_put_("selected","selected");
  5314. $28=$recv(html)._option();
  5315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5316. $ctx3.sendIdx["option"]=5;
  5317. //>>excludeEnd("ctx");
  5318. $recv($28)._class_("important");
  5319. $29=$recv($28)._with_($recv(self["@selectedMethod"])._selector());
  5320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5321. $ctx3.sendIdx["with:"]=13;
  5322. //>>excludeEnd("ctx");
  5323. $29;
  5324. return $recv($recv($recv(self["@selectedMethod"])._messageSends())._sorted())._do_((function(each){
  5325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5326. return $core.withContext(function($ctx4) {
  5327. //>>excludeEnd("ctx");
  5328. return $recv($recv(html)._option())._with_(each);
  5329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5330. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,18)});
  5331. //>>excludeEnd("ctx");
  5332. }));
  5333. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5334. }, function($ctx3) {$ctx3.fillBlock({option:option},$ctx2,17)});
  5335. //>>excludeEnd("ctx");
  5336. }));
  5337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5338. $ctx2.sendIdx["with:"]=11;
  5339. //>>excludeEnd("ctx");
  5340. return $26;
  5341. };
  5342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5343. }, function($ctx2) {$ctx2.fillBlock({html:html,protocolSelect:protocolSelect,referencesSelect:referencesSelect},$ctx1,7)});
  5344. //>>excludeEnd("ctx");
  5345. }));
  5346. $30=$recv(self["@selectedMethod"])._isNil();
  5347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5348. $ctx1.sendIdx["isNil"]=3;
  5349. //>>excludeEnd("ctx");
  5350. if($core.assert($30)){
  5351. self._hideMethodButtons();
  5352. $31=$recv($recv(self["@selectedClass"])._isNil())._or_((function(){
  5353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5354. return $core.withContext(function($ctx2) {
  5355. //>>excludeEnd("ctx");
  5356. return $recv(self["@selectedProtocol"])._notNil();
  5357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5358. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,20)});
  5359. //>>excludeEnd("ctx");
  5360. }));
  5361. if($core.assert($31)){
  5362. self._hideClassButtons();
  5363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5364. $ctx1.sendIdx["hideClassButtons"]=1;
  5365. //>>excludeEnd("ctx");
  5366. } else {
  5367. self._showClassButtons();
  5368. };
  5369. } else {
  5370. self._hideClassButtons();
  5371. self._showMethodButtons();
  5372. };
  5373. $recv(self["@sourceArea"])._val_(self._source());
  5374. return self;
  5375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5376. }, function($ctx1) {$ctx1.fill(self,"updateSourceAndButtons",{currentProtocol:currentProtocol},$globals.Browser)});
  5377. //>>excludeEnd("ctx");
  5378. },
  5379. //>>excludeStart("ide", pragmas.excludeIdeData);
  5380. args: [],
  5381. 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",
  5382. referencedClasses: [],
  5383. //>>excludeEnd("ide");
  5384. 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"]
  5385. }),
  5386. $globals.Browser);
  5387. $core.addMethod(
  5388. $core.method({
  5389. selector: "updateStatus",
  5390. protocol: 'updating',
  5391. fn: function (){
  5392. var self=this;
  5393. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5394. return $core.withContext(function($ctx1) {
  5395. //>>excludeEnd("ctx");
  5396. var $1,$2,$3,$receiver;
  5397. $1=$recv($recv(self["@sourceArea"])._val()).__eq(self._source());
  5398. if($core.assert($1)){
  5399. $2=self["@saveButton"];
  5400. if(($receiver = $2) == null || $receiver.isNil){
  5401. $2;
  5402. } else {
  5403. $recv(self["@saveButton"])._at_put_("disabled",true);
  5404. };
  5405. self["@unsavedChanges"]=false;
  5406. self["@unsavedChanges"];
  5407. } else {
  5408. $3=self["@saveButton"];
  5409. if(($receiver = $3) == null || $receiver.isNil){
  5410. $3;
  5411. } else {
  5412. $recv(self["@saveButton"])._removeAt_("disabled");
  5413. };
  5414. self["@unsavedChanges"]=true;
  5415. self["@unsavedChanges"];
  5416. };
  5417. return self;
  5418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5419. }, function($ctx1) {$ctx1.fill(self,"updateStatus",{},$globals.Browser)});
  5420. //>>excludeEnd("ctx");
  5421. },
  5422. //>>excludeStart("ide", pragmas.excludeIdeData);
  5423. args: [],
  5424. 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 ]",
  5425. referencedClasses: [],
  5426. //>>excludeEnd("ide");
  5427. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"]
  5428. }),
  5429. $globals.Browser);
  5430. $core.addMethod(
  5431. $core.method({
  5432. selector: "updateTabsList",
  5433. protocol: 'updating',
  5434. fn: function (){
  5435. var self=this;
  5436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5437. return $core.withContext(function($ctx1) {
  5438. //>>excludeEnd("ctx");
  5439. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18;
  5440. $recv(self["@tabsList"])._contents_((function(html){
  5441. var li;
  5442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5443. return $core.withContext(function($ctx2) {
  5444. //>>excludeEnd("ctx");
  5445. li=$recv(html)._li();
  5446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5447. $ctx2.sendIdx["li"]=1;
  5448. //>>excludeEnd("ctx");
  5449. li;
  5450. $1=$recv(self["@selectedTab"]).__eq("instance");
  5451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5452. $ctx2.sendIdx["="]=1;
  5453. //>>excludeEnd("ctx");
  5454. if($core.assert($1)){
  5455. $recv(li)._class_("selected");
  5456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5457. $ctx2.sendIdx["class:"]=1;
  5458. //>>excludeEnd("ctx");
  5459. };
  5460. $2=li;
  5461. $recv($2)._with_((function(){
  5462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5463. return $core.withContext(function($ctx3) {
  5464. //>>excludeEnd("ctx");
  5465. $3=$recv(html)._span();
  5466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5467. $ctx3.sendIdx["span"]=1;
  5468. //>>excludeEnd("ctx");
  5469. $recv($3)._class_("ltab");
  5470. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5471. $ctx3.sendIdx["class:"]=2;
  5472. //>>excludeEnd("ctx");
  5473. $4=$recv(html)._span();
  5474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5475. $ctx3.sendIdx["span"]=2;
  5476. //>>excludeEnd("ctx");
  5477. $recv($4)._class_("mtab");
  5478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5479. $ctx3.sendIdx["class:"]=3;
  5480. //>>excludeEnd("ctx");
  5481. $5=$recv($4)._with_("Instance");
  5482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5483. $ctx3.sendIdx["with:"]=2;
  5484. //>>excludeEnd("ctx");
  5485. $5;
  5486. $6=$recv(html)._span();
  5487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5488. $ctx3.sendIdx["span"]=3;
  5489. //>>excludeEnd("ctx");
  5490. return $recv($6)._class_("rtab");
  5491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5492. $ctx3.sendIdx["class:"]=4;
  5493. //>>excludeEnd("ctx");
  5494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5495. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  5496. //>>excludeEnd("ctx");
  5497. }));
  5498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5499. $ctx2.sendIdx["with:"]=1;
  5500. //>>excludeEnd("ctx");
  5501. $7=$recv($2)._onClick_((function(){
  5502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5503. return $core.withContext(function($ctx3) {
  5504. //>>excludeEnd("ctx");
  5505. return self._selectTab_("instance");
  5506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5507. $ctx3.sendIdx["selectTab:"]=1;
  5508. //>>excludeEnd("ctx");
  5509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5510. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  5511. //>>excludeEnd("ctx");
  5512. }));
  5513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5514. $ctx2.sendIdx["onClick:"]=1;
  5515. //>>excludeEnd("ctx");
  5516. $7;
  5517. li=$recv(html)._li();
  5518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5519. $ctx2.sendIdx["li"]=2;
  5520. //>>excludeEnd("ctx");
  5521. li;
  5522. $8=$recv(self["@selectedTab"]).__eq("class");
  5523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5524. $ctx2.sendIdx["="]=2;
  5525. //>>excludeEnd("ctx");
  5526. if($core.assert($8)){
  5527. $recv(li)._class_("selected");
  5528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5529. $ctx2.sendIdx["class:"]=5;
  5530. //>>excludeEnd("ctx");
  5531. };
  5532. $9=li;
  5533. $recv($9)._with_((function(){
  5534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5535. return $core.withContext(function($ctx3) {
  5536. //>>excludeEnd("ctx");
  5537. $10=$recv(html)._span();
  5538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5539. $ctx3.sendIdx["span"]=4;
  5540. //>>excludeEnd("ctx");
  5541. $recv($10)._class_("ltab");
  5542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5543. $ctx3.sendIdx["class:"]=6;
  5544. //>>excludeEnd("ctx");
  5545. $11=$recv(html)._span();
  5546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5547. $ctx3.sendIdx["span"]=5;
  5548. //>>excludeEnd("ctx");
  5549. $recv($11)._class_("mtab");
  5550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5551. $ctx3.sendIdx["class:"]=7;
  5552. //>>excludeEnd("ctx");
  5553. $12=$recv($11)._with_("Class");
  5554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5555. $ctx3.sendIdx["with:"]=4;
  5556. //>>excludeEnd("ctx");
  5557. $12;
  5558. $13=$recv(html)._span();
  5559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5560. $ctx3.sendIdx["span"]=6;
  5561. //>>excludeEnd("ctx");
  5562. return $recv($13)._class_("rtab");
  5563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5564. $ctx3.sendIdx["class:"]=8;
  5565. //>>excludeEnd("ctx");
  5566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5567. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,6)});
  5568. //>>excludeEnd("ctx");
  5569. }));
  5570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5571. $ctx2.sendIdx["with:"]=3;
  5572. //>>excludeEnd("ctx");
  5573. $14=$recv($9)._onClick_((function(){
  5574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5575. return $core.withContext(function($ctx3) {
  5576. //>>excludeEnd("ctx");
  5577. return self._selectTab_("class");
  5578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5579. $ctx3.sendIdx["selectTab:"]=2;
  5580. //>>excludeEnd("ctx");
  5581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5582. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,7)});
  5583. //>>excludeEnd("ctx");
  5584. }));
  5585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5586. $ctx2.sendIdx["onClick:"]=2;
  5587. //>>excludeEnd("ctx");
  5588. $14;
  5589. li=$recv(html)._li();
  5590. li;
  5591. $15=$recv(self["@selectedTab"]).__eq("comment");
  5592. if($core.assert($15)){
  5593. $recv(li)._class_("selected");
  5594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5595. $ctx2.sendIdx["class:"]=9;
  5596. //>>excludeEnd("ctx");
  5597. };
  5598. $16=li;
  5599. $recv($16)._with_((function(){
  5600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5601. return $core.withContext(function($ctx3) {
  5602. //>>excludeEnd("ctx");
  5603. $17=$recv(html)._span();
  5604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5605. $ctx3.sendIdx["span"]=7;
  5606. //>>excludeEnd("ctx");
  5607. $recv($17)._class_("ltab");
  5608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5609. $ctx3.sendIdx["class:"]=10;
  5610. //>>excludeEnd("ctx");
  5611. $18=$recv(html)._span();
  5612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5613. $ctx3.sendIdx["span"]=8;
  5614. //>>excludeEnd("ctx");
  5615. $recv($18)._class_("mtab");
  5616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5617. $ctx3.sendIdx["class:"]=11;
  5618. //>>excludeEnd("ctx");
  5619. $recv($18)._with_("Comment");
  5620. return $recv($recv(html)._span())._class_("rtab");
  5621. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5622. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,9)});
  5623. //>>excludeEnd("ctx");
  5624. }));
  5625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5626. $ctx2.sendIdx["with:"]=5;
  5627. //>>excludeEnd("ctx");
  5628. return $recv($16)._onClick_((function(){
  5629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5630. return $core.withContext(function($ctx3) {
  5631. //>>excludeEnd("ctx");
  5632. return self._selectTab_("comment");
  5633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5634. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,10)});
  5635. //>>excludeEnd("ctx");
  5636. }));
  5637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5638. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)});
  5639. //>>excludeEnd("ctx");
  5640. }));
  5641. return self;
  5642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5643. }, function($ctx1) {$ctx1.fill(self,"updateTabsList",{},$globals.Browser)});
  5644. //>>excludeEnd("ctx");
  5645. },
  5646. //>>excludeStart("ide", pragmas.excludeIdeData);
  5647. args: [],
  5648. 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 ]]",
  5649. referencedClasses: [],
  5650. //>>excludeEnd("ide");
  5651. messageSends: ["contents:", "li", "ifTrue:", "=", "class:", "with:", "span", "onClick:", "selectTab:"]
  5652. }),
  5653. $globals.Browser);
  5654. $core.addMethod(
  5655. $core.method({
  5656. selector: "open",
  5657. protocol: 'convenience',
  5658. fn: function (){
  5659. var self=this;
  5660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5661. return $core.withContext(function($ctx1) {
  5662. //>>excludeEnd("ctx");
  5663. $recv(self._new())._open();
  5664. return self;
  5665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5666. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.Browser.klass)});
  5667. //>>excludeEnd("ctx");
  5668. },
  5669. //>>excludeStart("ide", pragmas.excludeIdeData);
  5670. args: [],
  5671. source: "open\x0a\x09self new open",
  5672. referencedClasses: [],
  5673. //>>excludeEnd("ide");
  5674. messageSends: ["open", "new"]
  5675. }),
  5676. $globals.Browser.klass);
  5677. $core.addMethod(
  5678. $core.method({
  5679. selector: "openOn:",
  5680. protocol: 'convenience',
  5681. fn: function (aClass){
  5682. var self=this;
  5683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5684. return $core.withContext(function($ctx1) {
  5685. //>>excludeEnd("ctx");
  5686. var $1;
  5687. $1=self._new();
  5688. $recv($1)._open();
  5689. $recv($1)._selectCategory_($recv(aClass)._category());
  5690. return $recv($1)._selectClass_(aClass);
  5691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5692. }, function($ctx1) {$ctx1.fill(self,"openOn:",{aClass:aClass},$globals.Browser.klass)});
  5693. //>>excludeEnd("ctx");
  5694. },
  5695. //>>excludeStart("ide", pragmas.excludeIdeData);
  5696. args: ["aClass"],
  5697. source: "openOn: aClass\x0a\x09^ self new\x0a\x09open;\x0a\x09selectCategory: aClass category;\x0a\x09selectClass: aClass",
  5698. referencedClasses: [],
  5699. //>>excludeEnd("ide");
  5700. messageSends: ["open", "new", "selectCategory:", "category", "selectClass:"]
  5701. }),
  5702. $globals.Browser.klass);
  5703. $core.addClass('Debugger', $globals.TabWidget, ['error', 'selectedContext', 'sourceArea', 'ul', 'ul2', 'inspector', 'saveButton', 'unsavedChanges', 'selectedVariable', 'selectedVariableName', 'inspectButton'], 'IDE');
  5704. $core.addMethod(
  5705. $core.method({
  5706. selector: "allVariables",
  5707. protocol: 'accessing',
  5708. fn: function (){
  5709. var self=this;
  5710. var all;
  5711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5712. return $core.withContext(function($ctx1) {
  5713. //>>excludeEnd("ctx");
  5714. var $3,$2,$1;
  5715. all=$recv($globals.Dictionary)._new();
  5716. $3=self._receiver();
  5717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5718. $ctx1.sendIdx["receiver"]=1;
  5719. //>>excludeEnd("ctx");
  5720. $2=$recv($3)._class();
  5721. $1=$recv($2)._allInstanceVariableNames();
  5722. $recv($1)._do_((function(each){
  5723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5724. return $core.withContext(function($ctx2) {
  5725. //>>excludeEnd("ctx");
  5726. return $recv(all)._at_put_(each,$recv(self._receiver())._instVarAt_(each));
  5727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5728. $ctx2.sendIdx["at:put:"]=1;
  5729. //>>excludeEnd("ctx");
  5730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5731. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  5732. //>>excludeEnd("ctx");
  5733. }));
  5734. $recv($recv(self["@selectedContext"])._locals())._keysAndValuesDo_((function(key,value){
  5735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5736. return $core.withContext(function($ctx2) {
  5737. //>>excludeEnd("ctx");
  5738. return $recv(all)._at_put_(key,value);
  5739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5740. }, function($ctx2) {$ctx2.fillBlock({key:key,value:value},$ctx1,2)});
  5741. //>>excludeEnd("ctx");
  5742. }));
  5743. return all;
  5744. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5745. }, function($ctx1) {$ctx1.fill(self,"allVariables",{all:all},$globals.Debugger)});
  5746. //>>excludeEnd("ctx");
  5747. },
  5748. //>>excludeStart("ide", pragmas.excludeIdeData);
  5749. args: [],
  5750. 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",
  5751. referencedClasses: ["Dictionary"],
  5752. //>>excludeEnd("ide");
  5753. messageSends: ["new", "do:", "allInstanceVariableNames", "class", "receiver", "at:put:", "instVarAt:", "keysAndValuesDo:", "locals"]
  5754. }),
  5755. $globals.Debugger);
  5756. $core.addMethod(
  5757. $core.method({
  5758. selector: "canBeClosed",
  5759. protocol: 'testing',
  5760. fn: function (){
  5761. var self=this;
  5762. return true;
  5763. },
  5764. //>>excludeStart("ide", pragmas.excludeIdeData);
  5765. args: [],
  5766. source: "canBeClosed\x0a\x09^ true",
  5767. referencedClasses: [],
  5768. //>>excludeEnd("ide");
  5769. messageSends: []
  5770. }),
  5771. $globals.Debugger);
  5772. $core.addMethod(
  5773. $core.method({
  5774. selector: "error",
  5775. protocol: 'accessing',
  5776. fn: function (){
  5777. var self=this;
  5778. return self["@error"];
  5779. },
  5780. //>>excludeStart("ide", pragmas.excludeIdeData);
  5781. args: [],
  5782. source: "error\x0a\x09^ error",
  5783. referencedClasses: [],
  5784. //>>excludeEnd("ide");
  5785. messageSends: []
  5786. }),
  5787. $globals.Debugger);
  5788. $core.addMethod(
  5789. $core.method({
  5790. selector: "error:",
  5791. protocol: 'accessing',
  5792. fn: function (anError){
  5793. var self=this;
  5794. self["@error"]=anError;
  5795. return self;
  5796. },
  5797. //>>excludeStart("ide", pragmas.excludeIdeData);
  5798. args: ["anError"],
  5799. source: "error: anError\x0a\x09error := anError",
  5800. referencedClasses: [],
  5801. //>>excludeEnd("ide");
  5802. messageSends: []
  5803. }),
  5804. $globals.Debugger);
  5805. $core.addMethod(
  5806. $core.method({
  5807. selector: "initialize",
  5808. protocol: 'initialization',
  5809. fn: function (){
  5810. var self=this;
  5811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5812. return $core.withContext(function($ctx1) {
  5813. //>>excludeEnd("ctx");
  5814. (
  5815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5816. $ctx1.supercall = true,
  5817. //>>excludeEnd("ctx");
  5818. ($globals.Debugger.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  5819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5820. $ctx1.supercall = false;
  5821. //>>excludeEnd("ctx");;
  5822. $recv(self["@unsavedChanges"]).__eq(false);
  5823. return self;
  5824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5825. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.Debugger)});
  5826. //>>excludeEnd("ctx");
  5827. },
  5828. //>>excludeStart("ide", pragmas.excludeIdeData);
  5829. args: [],
  5830. source: "initialize\x0a\x09super initialize.\x0a\x09unsavedChanges = false",
  5831. referencedClasses: [],
  5832. //>>excludeEnd("ide");
  5833. messageSends: ["initialize", "="]
  5834. }),
  5835. $globals.Debugger);
  5836. $core.addMethod(
  5837. $core.method({
  5838. selector: "inspectSelectedVariable",
  5839. protocol: 'actions',
  5840. fn: function (){
  5841. var self=this;
  5842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5843. return $core.withContext(function($ctx1) {
  5844. //>>excludeEnd("ctx");
  5845. $recv(self["@selectedVariable"])._inspect();
  5846. return self;
  5847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5848. }, function($ctx1) {$ctx1.fill(self,"inspectSelectedVariable",{},$globals.Debugger)});
  5849. //>>excludeEnd("ctx");
  5850. },
  5851. //>>excludeStart("ide", pragmas.excludeIdeData);
  5852. args: [],
  5853. source: "inspectSelectedVariable\x0a\x09selectedVariable inspect",
  5854. referencedClasses: [],
  5855. //>>excludeEnd("ide");
  5856. messageSends: ["inspect"]
  5857. }),
  5858. $globals.Debugger);
  5859. $core.addMethod(
  5860. $core.method({
  5861. selector: "label",
  5862. protocol: 'accessing',
  5863. fn: function (){
  5864. var self=this;
  5865. return "[ Debugger ]";
  5866. },
  5867. //>>excludeStart("ide", pragmas.excludeIdeData);
  5868. args: [],
  5869. source: "label\x0a\x09^ '[ Debugger ]'",
  5870. referencedClasses: [],
  5871. //>>excludeEnd("ide");
  5872. messageSends: []
  5873. }),
  5874. $globals.Debugger);
  5875. $core.addMethod(
  5876. $core.method({
  5877. selector: "method",
  5878. protocol: 'accessing',
  5879. fn: function (){
  5880. var self=this;
  5881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5882. return $core.withContext(function($ctx1) {
  5883. //>>excludeEnd("ctx");
  5884. return $recv(self["@selectedContext"])._method();
  5885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5886. }, function($ctx1) {$ctx1.fill(self,"method",{},$globals.Debugger)});
  5887. //>>excludeEnd("ctx");
  5888. },
  5889. //>>excludeStart("ide", pragmas.excludeIdeData);
  5890. args: [],
  5891. source: "method\x0a\x09^ selectedContext method",
  5892. referencedClasses: [],
  5893. //>>excludeEnd("ide");
  5894. messageSends: ["method"]
  5895. }),
  5896. $globals.Debugger);
  5897. $core.addMethod(
  5898. $core.method({
  5899. selector: "proceed",
  5900. protocol: 'actions',
  5901. fn: function (){
  5902. var self=this;
  5903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5904. return $core.withContext(function($ctx1) {
  5905. //>>excludeEnd("ctx");
  5906. self._close();
  5907. $recv($recv(self["@selectedContext"])._receiver())._perform_withArguments_($recv(self["@selectedContext"])._selector(),$recv(self["@selectedContext"])._locals());
  5908. return self;
  5909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5910. }, function($ctx1) {$ctx1.fill(self,"proceed",{},$globals.Debugger)});
  5911. //>>excludeEnd("ctx");
  5912. },
  5913. //>>excludeStart("ide", pragmas.excludeIdeData);
  5914. args: [],
  5915. source: "proceed\x0a\x09self close.\x0a\x09selectedContext receiver perform: selectedContext selector withArguments: selectedContext locals",
  5916. referencedClasses: [],
  5917. //>>excludeEnd("ide");
  5918. messageSends: ["close", "perform:withArguments:", "receiver", "selector", "locals"]
  5919. }),
  5920. $globals.Debugger);
  5921. $core.addMethod(
  5922. $core.method({
  5923. selector: "receiver",
  5924. protocol: 'accessing',
  5925. fn: function (){
  5926. var self=this;
  5927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5928. return $core.withContext(function($ctx1) {
  5929. //>>excludeEnd("ctx");
  5930. return $recv(self["@selectedContext"])._receiver();
  5931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5932. }, function($ctx1) {$ctx1.fill(self,"receiver",{},$globals.Debugger)});
  5933. //>>excludeEnd("ctx");
  5934. },
  5935. //>>excludeStart("ide", pragmas.excludeIdeData);
  5936. args: [],
  5937. source: "receiver\x0a\x09^ selectedContext receiver",
  5938. referencedClasses: [],
  5939. //>>excludeEnd("ide");
  5940. messageSends: ["receiver"]
  5941. }),
  5942. $globals.Debugger);
  5943. $core.addMethod(
  5944. $core.method({
  5945. selector: "renderBottomPanelOn:",
  5946. protocol: 'rendering',
  5947. fn: function (html){
  5948. var self=this;
  5949. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5950. return $core.withContext(function($ctx1) {
  5951. //>>excludeEnd("ctx");
  5952. var $1;
  5953. $1=$recv(html)._div();
  5954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5955. $ctx1.sendIdx["div"]=1;
  5956. //>>excludeEnd("ctx");
  5957. $recv($1)._class_("amber_sourceCode debugger");
  5958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5959. $ctx1.sendIdx["class:"]=1;
  5960. //>>excludeEnd("ctx");
  5961. $recv($1)._with_((function(){
  5962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5963. return $core.withContext(function($ctx2) {
  5964. //>>excludeEnd("ctx");
  5965. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  5966. self["@sourceArea"];
  5967. return $recv(self["@sourceArea"])._renderOn_(html);
  5968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5969. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5970. //>>excludeEnd("ctx");
  5971. }));
  5972. self["@ul2"]=$recv($recv(html)._ul())._class_("amber_column debugger variables");
  5973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5974. $ctx1.sendIdx["class:"]=2;
  5975. //>>excludeEnd("ctx");
  5976. self["@inspector"]=$recv($recv(html)._div())._class_("amber_column debugger inspector");
  5977. $recv(self["@sourceArea"])._onKeyUp_((function(){
  5978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5979. return $core.withContext(function($ctx2) {
  5980. //>>excludeEnd("ctx");
  5981. return self._updateStatus();
  5982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5983. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  5984. //>>excludeEnd("ctx");
  5985. }));
  5986. return self;
  5987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5988. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.Debugger)});
  5989. //>>excludeEnd("ctx");
  5990. },
  5991. //>>excludeStart("ide", pragmas.excludeIdeData);
  5992. args: ["html"],
  5993. 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 ]",
  5994. referencedClasses: ["SourceArea"],
  5995. //>>excludeEnd("ide");
  5996. messageSends: ["class:", "div", "with:", "new", "renderOn:", "ul", "onKeyUp:", "updateStatus"]
  5997. }),
  5998. $globals.Debugger);
  5999. $core.addMethod(
  6000. $core.method({
  6001. selector: "renderBoxOn:",
  6002. protocol: 'rendering',
  6003. fn: function (html){
  6004. var self=this;
  6005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6006. return $core.withContext(function($ctx1) {
  6007. //>>excludeEnd("ctx");
  6008. self._renderTopPanelOn_(html);
  6009. self._renderBottomPanelOn_(html);
  6010. return self;
  6011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6012. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Debugger)});
  6013. //>>excludeEnd("ctx");
  6014. },
  6015. //>>excludeStart("ide", pragmas.excludeIdeData);
  6016. args: ["html"],
  6017. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  6018. referencedClasses: [],
  6019. //>>excludeEnd("ide");
  6020. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]
  6021. }),
  6022. $globals.Debugger);
  6023. $core.addMethod(
  6024. $core.method({
  6025. selector: "renderButtonsOn:",
  6026. protocol: 'rendering',
  6027. fn: function (html){
  6028. var self=this;
  6029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6030. return $core.withContext(function($ctx1) {
  6031. //>>excludeEnd("ctx");
  6032. var $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13;
  6033. $1=$recv(html)._button();
  6034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6035. $ctx1.sendIdx["button"]=1;
  6036. //>>excludeEnd("ctx");
  6037. $recv($1)._with_("Save");
  6038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6039. $ctx1.sendIdx["with:"]=1;
  6040. //>>excludeEnd("ctx");
  6041. $2=$recv($1)._onClick_((function(){
  6042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6043. return $core.withContext(function($ctx2) {
  6044. //>>excludeEnd("ctx");
  6045. return self._save();
  6046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6047. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6048. //>>excludeEnd("ctx");
  6049. }));
  6050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6051. $ctx1.sendIdx["onClick:"]=1;
  6052. //>>excludeEnd("ctx");
  6053. self["@saveButton"]=$2;
  6054. $3=$recv(html)._button();
  6055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6056. $ctx1.sendIdx["button"]=2;
  6057. //>>excludeEnd("ctx");
  6058. $recv($3)._with_("DoIt");
  6059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6060. $ctx1.sendIdx["with:"]=2;
  6061. //>>excludeEnd("ctx");
  6062. $4=$recv($3)._onClick_((function(){
  6063. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6064. return $core.withContext(function($ctx2) {
  6065. //>>excludeEnd("ctx");
  6066. return $recv(self["@sourceArea"])._doIt();
  6067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6068. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6069. //>>excludeEnd("ctx");
  6070. }));
  6071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6072. $ctx1.sendIdx["onClick:"]=2;
  6073. //>>excludeEnd("ctx");
  6074. $5=$recv(html)._button();
  6075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6076. $ctx1.sendIdx["button"]=3;
  6077. //>>excludeEnd("ctx");
  6078. $recv($5)._with_("PrintIt");
  6079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6080. $ctx1.sendIdx["with:"]=3;
  6081. //>>excludeEnd("ctx");
  6082. $6=$recv($5)._onClick_((function(){
  6083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6084. return $core.withContext(function($ctx2) {
  6085. //>>excludeEnd("ctx");
  6086. return $recv(self["@sourceArea"])._printIt();
  6087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6088. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  6089. //>>excludeEnd("ctx");
  6090. }));
  6091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6092. $ctx1.sendIdx["onClick:"]=3;
  6093. //>>excludeEnd("ctx");
  6094. $7=$recv(html)._button();
  6095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6096. $ctx1.sendIdx["button"]=4;
  6097. //>>excludeEnd("ctx");
  6098. $recv($7)._with_("InspectIt");
  6099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6100. $ctx1.sendIdx["with:"]=4;
  6101. //>>excludeEnd("ctx");
  6102. $8=$recv($7)._onClick_((function(){
  6103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6104. return $core.withContext(function($ctx2) {
  6105. //>>excludeEnd("ctx");
  6106. return $recv(self["@sourceArea"])._inspectIt();
  6107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6108. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  6109. //>>excludeEnd("ctx");
  6110. }));
  6111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6112. $ctx1.sendIdx["onClick:"]=4;
  6113. //>>excludeEnd("ctx");
  6114. $9=$recv(html)._button();
  6115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6116. $ctx1.sendIdx["button"]=5;
  6117. //>>excludeEnd("ctx");
  6118. $recv($9)._with_("Proceed");
  6119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6120. $ctx1.sendIdx["with:"]=5;
  6121. //>>excludeEnd("ctx");
  6122. $10=$recv($9)._onClick_((function(){
  6123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6124. return $core.withContext(function($ctx2) {
  6125. //>>excludeEnd("ctx");
  6126. return self._proceed();
  6127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6128. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  6129. //>>excludeEnd("ctx");
  6130. }));
  6131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6132. $ctx1.sendIdx["onClick:"]=5;
  6133. //>>excludeEnd("ctx");
  6134. $11=$recv(html)._button();
  6135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6136. $ctx1.sendIdx["button"]=6;
  6137. //>>excludeEnd("ctx");
  6138. $recv($11)._with_("Abandon");
  6139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6140. $ctx1.sendIdx["with:"]=6;
  6141. //>>excludeEnd("ctx");
  6142. $12=$recv($11)._onClick_((function(){
  6143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6144. return $core.withContext(function($ctx2) {
  6145. //>>excludeEnd("ctx");
  6146. return self._close();
  6147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6148. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  6149. //>>excludeEnd("ctx");
  6150. }));
  6151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6152. $ctx1.sendIdx["onClick:"]=6;
  6153. //>>excludeEnd("ctx");
  6154. $13=$recv(html)._button();
  6155. $recv($13)._class_("amber_button debugger inspect");
  6156. $recv($13)._with_("Inspect");
  6157. self["@inspectButton"]=$recv($13)._onClick_((function(){
  6158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6159. return $core.withContext(function($ctx2) {
  6160. //>>excludeEnd("ctx");
  6161. return self._inspectSelectedVariable();
  6162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6163. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,7)});
  6164. //>>excludeEnd("ctx");
  6165. }));
  6166. self._updateSourceArea();
  6167. self._updateStatus();
  6168. self._updateVariablesList();
  6169. self._updateInspector();
  6170. return self;
  6171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6172. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Debugger)});
  6173. //>>excludeEnd("ctx");
  6174. },
  6175. //>>excludeStart("ide", pragmas.excludeIdeData);
  6176. args: ["html"],
  6177. 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",
  6178. referencedClasses: [],
  6179. //>>excludeEnd("ide");
  6180. messageSends: ["with:", "button", "onClick:", "save", "doIt", "printIt", "inspectIt", "proceed", "close", "class:", "inspectSelectedVariable", "updateSourceArea", "updateStatus", "updateVariablesList", "updateInspector"]
  6181. }),
  6182. $globals.Debugger);
  6183. $core.addMethod(
  6184. $core.method({
  6185. selector: "renderContext:on:",
  6186. protocol: 'rendering',
  6187. fn: function (aContext,html){
  6188. var self=this;
  6189. var li;
  6190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6191. return $core.withContext(function($ctx1) {
  6192. //>>excludeEnd("ctx");
  6193. var $1,$2,$3,$receiver;
  6194. li=$recv(html)._li();
  6195. $1=$recv(self["@selectedContext"]).__eq(aContext);
  6196. if($core.assert($1)){
  6197. $recv(li)._class_("selected");
  6198. };
  6199. $2=li;
  6200. $recv($2)._with_($recv(aContext)._asString());
  6201. $recv($2)._onClick_((function(){
  6202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6203. return $core.withContext(function($ctx2) {
  6204. //>>excludeEnd("ctx");
  6205. return self._selectContext_(aContext);
  6206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6207. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6208. //>>excludeEnd("ctx");
  6209. }));
  6210. $3=$recv(aContext)._outerContext();
  6211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6212. $ctx1.sendIdx["outerContext"]=1;
  6213. //>>excludeEnd("ctx");
  6214. if(($receiver = $3) == null || $receiver.isNil){
  6215. $3;
  6216. } else {
  6217. self._renderContext_on_($recv(aContext)._outerContext(),html);
  6218. };
  6219. return self;
  6220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6221. }, function($ctx1) {$ctx1.fill(self,"renderContext:on:",{aContext:aContext,html:html,li:li},$globals.Debugger)});
  6222. //>>excludeEnd("ctx");
  6223. },
  6224. //>>excludeStart("ide", pragmas.excludeIdeData);
  6225. args: ["aContext", "html"],
  6226. 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 ]",
  6227. referencedClasses: [],
  6228. //>>excludeEnd("ide");
  6229. messageSends: ["li", "ifTrue:", "=", "class:", "with:", "asString", "onClick:", "selectContext:", "ifNotNil:", "outerContext", "renderContext:on:"]
  6230. }),
  6231. $globals.Debugger);
  6232. $core.addMethod(
  6233. $core.method({
  6234. selector: "renderTopPanelOn:",
  6235. protocol: 'rendering',
  6236. fn: function (html){
  6237. var self=this;
  6238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6239. return $core.withContext(function($ctx1) {
  6240. //>>excludeEnd("ctx");
  6241. var $1,$2,$4,$7,$6,$5,$8,$3;
  6242. $1=self._error();
  6243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6244. $ctx1.sendIdx["error"]=1;
  6245. //>>excludeEnd("ctx");
  6246. self["@selectedContext"]=$recv($1)._context();
  6247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6248. $ctx1.sendIdx["context"]=1;
  6249. //>>excludeEnd("ctx");
  6250. $2=$recv(html)._div();
  6251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6252. $ctx1.sendIdx["div"]=1;
  6253. //>>excludeEnd("ctx");
  6254. $recv($2)._class_("top");
  6255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6256. $ctx1.sendIdx["class:"]=1;
  6257. //>>excludeEnd("ctx");
  6258. $3=$recv($2)._with_((function(){
  6259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6260. return $core.withContext(function($ctx2) {
  6261. //>>excludeEnd("ctx");
  6262. $4=$recv(html)._div();
  6263. $recv($4)._class_("label");
  6264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6265. $ctx2.sendIdx["class:"]=2;
  6266. //>>excludeEnd("ctx");
  6267. $7=self._error();
  6268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6269. $ctx2.sendIdx["error"]=2;
  6270. //>>excludeEnd("ctx");
  6271. $6=$recv($7)._messageText();
  6272. $5=$recv($4)._with_($6);
  6273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6274. $ctx2.sendIdx["with:"]=2;
  6275. //>>excludeEnd("ctx");
  6276. $5;
  6277. $8=$recv(html)._ul();
  6278. $recv($8)._class_("amber_column debugger contexts");
  6279. self["@ul"]=$recv($8)._with_((function(){
  6280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6281. return $core.withContext(function($ctx3) {
  6282. //>>excludeEnd("ctx");
  6283. return self._renderContext_on_($recv(self._error())._context(),html);
  6284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6285. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6286. //>>excludeEnd("ctx");
  6287. }));
  6288. return self["@ul"];
  6289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6290. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6291. //>>excludeEnd("ctx");
  6292. }));
  6293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6294. $ctx1.sendIdx["with:"]=1;
  6295. //>>excludeEnd("ctx");
  6296. return self;
  6297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6298. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.Debugger)});
  6299. //>>excludeEnd("ctx");
  6300. },
  6301. //>>excludeStart("ide", pragmas.excludeIdeData);
  6302. args: ["html"],
  6303. 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 ]]",
  6304. referencedClasses: [],
  6305. //>>excludeEnd("ide");
  6306. messageSends: ["context", "error", "class:", "div", "with:", "messageText", "ul", "renderContext:on:"]
  6307. }),
  6308. $globals.Debugger);
  6309. $core.addMethod(
  6310. $core.method({
  6311. selector: "save",
  6312. protocol: 'actions',
  6313. fn: function (){
  6314. var self=this;
  6315. var protocol;
  6316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6317. return $core.withContext(function($ctx1) {
  6318. //>>excludeEnd("ctx");
  6319. var $4,$3,$2,$1;
  6320. $4=$recv(self["@selectedContext"])._receiver();
  6321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6322. $ctx1.sendIdx["receiver"]=1;
  6323. //>>excludeEnd("ctx");
  6324. $3=$recv($4)._class();
  6325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6326. $ctx1.sendIdx["class"]=1;
  6327. //>>excludeEnd("ctx");
  6328. $2=$recv($3)._methodDictionary();
  6329. $1=$recv($2)._at_($recv(self["@selectedContext"])._selector());
  6330. protocol=$recv($1)._category();
  6331. $recv($recv($recv(self["@selectedContext"])._receiver())._class())._compile_protocol_($recv(self["@sourceArea"])._val(),protocol);
  6332. self._updateStatus();
  6333. return self;
  6334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6335. }, function($ctx1) {$ctx1.fill(self,"save",{protocol:protocol},$globals.Debugger)});
  6336. //>>excludeEnd("ctx");
  6337. },
  6338. //>>excludeStart("ide", pragmas.excludeIdeData);
  6339. args: [],
  6340. 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",
  6341. referencedClasses: [],
  6342. //>>excludeEnd("ide");
  6343. messageSends: ["category", "at:", "methodDictionary", "class", "receiver", "selector", "compile:protocol:", "val", "updateStatus"]
  6344. }),
  6345. $globals.Debugger);
  6346. $core.addMethod(
  6347. $core.method({
  6348. selector: "selectContext:",
  6349. protocol: 'actions',
  6350. fn: function (aContext){
  6351. var self=this;
  6352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6353. return $core.withContext(function($ctx1) {
  6354. //>>excludeEnd("ctx");
  6355. self["@selectedContext"]=aContext;
  6356. self["@selectedVariable"]=nil;
  6357. self["@selectedVariableName"]=nil;
  6358. self._updateContextsList();
  6359. self._updateSourceArea();
  6360. self._updateInspector();
  6361. self._updateVariablesList();
  6362. self._updateStatus();
  6363. return self;
  6364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6365. }, function($ctx1) {$ctx1.fill(self,"selectContext:",{aContext:aContext},$globals.Debugger)});
  6366. //>>excludeEnd("ctx");
  6367. },
  6368. //>>excludeStart("ide", pragmas.excludeIdeData);
  6369. args: ["aContext"],
  6370. 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",
  6371. referencedClasses: [],
  6372. //>>excludeEnd("ide");
  6373. messageSends: ["updateContextsList", "updateSourceArea", "updateInspector", "updateVariablesList", "updateStatus"]
  6374. }),
  6375. $globals.Debugger);
  6376. $core.addMethod(
  6377. $core.method({
  6378. selector: "selectVariable:named:",
  6379. protocol: 'actions',
  6380. fn: function (anObject,aString){
  6381. var self=this;
  6382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6383. return $core.withContext(function($ctx1) {
  6384. //>>excludeEnd("ctx");
  6385. self["@selectedVariable"]=anObject;
  6386. self["@selectedVariableName"]=aString;
  6387. $recv(self["@inspector"])._contents_((function(html){
  6388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6389. return $core.withContext(function($ctx2) {
  6390. //>>excludeEnd("ctx");
  6391. return $recv(html)._with_($recv(anObject)._printString());
  6392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6393. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  6394. //>>excludeEnd("ctx");
  6395. }));
  6396. self._updateVariablesList();
  6397. return self;
  6398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6399. }, function($ctx1) {$ctx1.fill(self,"selectVariable:named:",{anObject:anObject,aString:aString},$globals.Debugger)});
  6400. //>>excludeEnd("ctx");
  6401. },
  6402. //>>excludeStart("ide", pragmas.excludeIdeData);
  6403. args: ["anObject", "aString"],
  6404. source: "selectVariable: anObject named: aString\x0a\x09\x0a\x09selectedVariable := anObject.\x0a\x09selectedVariableName := aString.\x0a\x09inspector contents: [ :html | html with: anObject printString ].\x0a\x09self updateVariablesList",
  6405. referencedClasses: [],
  6406. //>>excludeEnd("ide");
  6407. messageSends: ["contents:", "with:", "printString", "updateVariablesList"]
  6408. }),
  6409. $globals.Debugger);
  6410. $core.addMethod(
  6411. $core.method({
  6412. selector: "source",
  6413. protocol: 'accessing',
  6414. fn: function (){
  6415. var self=this;
  6416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6417. return $core.withContext(function($ctx1) {
  6418. //>>excludeEnd("ctx");
  6419. var $1,$receiver;
  6420. $1=self._method();
  6421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6422. $ctx1.sendIdx["method"]=1;
  6423. //>>excludeEnd("ctx");
  6424. if(($receiver = $1) == null || $receiver.isNil){
  6425. return "Method doesn't exist!";
  6426. } else {
  6427. return $recv(self._method())._source();
  6428. };
  6429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6430. }, function($ctx1) {$ctx1.fill(self,"source",{},$globals.Debugger)});
  6431. //>>excludeEnd("ctx");
  6432. },
  6433. //>>excludeStart("ide", pragmas.excludeIdeData);
  6434. args: [],
  6435. source: "source\x0a\x09^ self method\x0a\x09\x09ifNil: [ 'Method doesn''t exist!' ]\x0a\x09\x09ifNotNil: [ self method source ]",
  6436. referencedClasses: [],
  6437. //>>excludeEnd("ide");
  6438. messageSends: ["ifNil:ifNotNil:", "method", "source"]
  6439. }),
  6440. $globals.Debugger);
  6441. $core.addMethod(
  6442. $core.method({
  6443. selector: "updateContextsList",
  6444. protocol: 'updating',
  6445. fn: function (){
  6446. var self=this;
  6447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6448. return $core.withContext(function($ctx1) {
  6449. //>>excludeEnd("ctx");
  6450. $recv(self["@ul"])._contents_((function(html){
  6451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6452. return $core.withContext(function($ctx2) {
  6453. //>>excludeEnd("ctx");
  6454. return self._renderContext_on_($recv(self._error())._context(),html);
  6455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6456. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  6457. //>>excludeEnd("ctx");
  6458. }));
  6459. return self;
  6460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6461. }, function($ctx1) {$ctx1.fill(self,"updateContextsList",{},$globals.Debugger)});
  6462. //>>excludeEnd("ctx");
  6463. },
  6464. //>>excludeStart("ide", pragmas.excludeIdeData);
  6465. args: [],
  6466. source: "updateContextsList\x0a\x09ul contents: [ :html |\x0a\x09\x09self renderContext: self error context on: html ]",
  6467. referencedClasses: [],
  6468. //>>excludeEnd("ide");
  6469. messageSends: ["contents:", "renderContext:on:", "context", "error"]
  6470. }),
  6471. $globals.Debugger);
  6472. $core.addMethod(
  6473. $core.method({
  6474. selector: "updateInspector",
  6475. protocol: 'updating',
  6476. fn: function (){
  6477. var self=this;
  6478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6479. return $core.withContext(function($ctx1) {
  6480. //>>excludeEnd("ctx");
  6481. $recv(self["@inspector"])._contents_((function(html){
  6482. }));
  6483. return self;
  6484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6485. }, function($ctx1) {$ctx1.fill(self,"updateInspector",{},$globals.Debugger)});
  6486. //>>excludeEnd("ctx");
  6487. },
  6488. //>>excludeStart("ide", pragmas.excludeIdeData);
  6489. args: [],
  6490. source: "updateInspector\x0a\x09inspector contents: [ :html | ]",
  6491. referencedClasses: [],
  6492. //>>excludeEnd("ide");
  6493. messageSends: ["contents:"]
  6494. }),
  6495. $globals.Debugger);
  6496. $core.addMethod(
  6497. $core.method({
  6498. selector: "updateSourceArea",
  6499. protocol: 'updating',
  6500. fn: function (){
  6501. var self=this;
  6502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6503. return $core.withContext(function($ctx1) {
  6504. //>>excludeEnd("ctx");
  6505. $recv(self["@sourceArea"])._val_(self._source());
  6506. return self;
  6507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6508. }, function($ctx1) {$ctx1.fill(self,"updateSourceArea",{},$globals.Debugger)});
  6509. //>>excludeEnd("ctx");
  6510. },
  6511. //>>excludeStart("ide", pragmas.excludeIdeData);
  6512. args: [],
  6513. source: "updateSourceArea\x0a\x09sourceArea val: self source",
  6514. referencedClasses: [],
  6515. //>>excludeEnd("ide");
  6516. messageSends: ["val:", "source"]
  6517. }),
  6518. $globals.Debugger);
  6519. $core.addMethod(
  6520. $core.method({
  6521. selector: "updateStatus",
  6522. protocol: 'updating',
  6523. fn: function (){
  6524. var self=this;
  6525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6526. return $core.withContext(function($ctx1) {
  6527. //>>excludeEnd("ctx");
  6528. var $1,$2,$3,$receiver;
  6529. $1=$recv($recv(self["@sourceArea"])._val()).__eq(self._source());
  6530. if($core.assert($1)){
  6531. $2=self["@saveButton"];
  6532. if(($receiver = $2) == null || $receiver.isNil){
  6533. $2;
  6534. } else {
  6535. $recv(self["@saveButton"])._at_put_("disabled",true);
  6536. };
  6537. self["@unsavedChanges"]=false;
  6538. self["@unsavedChanges"];
  6539. } else {
  6540. $3=self["@saveButton"];
  6541. if(($receiver = $3) == null || $receiver.isNil){
  6542. $3;
  6543. } else {
  6544. $recv(self["@saveButton"])._removeAt_("disabled");
  6545. };
  6546. self["@unsavedChanges"]=true;
  6547. self["@unsavedChanges"];
  6548. };
  6549. return self;
  6550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6551. }, function($ctx1) {$ctx1.fill(self,"updateStatus",{},$globals.Debugger)});
  6552. //>>excludeEnd("ctx");
  6553. },
  6554. //>>excludeStart("ide", pragmas.excludeIdeData);
  6555. args: [],
  6556. 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 ]",
  6557. referencedClasses: [],
  6558. //>>excludeEnd("ide");
  6559. messageSends: ["ifTrue:ifFalse:", "=", "val", "source", "ifNotNil:", "at:put:", "removeAt:"]
  6560. }),
  6561. $globals.Debugger);
  6562. $core.addMethod(
  6563. $core.method({
  6564. selector: "updateVariablesList",
  6565. protocol: 'updating',
  6566. fn: function (){
  6567. var self=this;
  6568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6569. return $core.withContext(function($ctx1) {
  6570. //>>excludeEnd("ctx");
  6571. var $1,$2,$3,$4,$5,$6,$receiver;
  6572. $recv(self["@ul2"])._contents_((function(html){
  6573. var li;
  6574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6575. return $core.withContext(function($ctx2) {
  6576. //>>excludeEnd("ctx");
  6577. $1=$recv(html)._li();
  6578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6579. $ctx2.sendIdx["li"]=1;
  6580. //>>excludeEnd("ctx");
  6581. $recv($1)._with_("self");
  6582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6583. $ctx2.sendIdx["with:"]=1;
  6584. //>>excludeEnd("ctx");
  6585. $2=$recv($1)._onClick_((function(){
  6586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6587. return $core.withContext(function($ctx3) {
  6588. //>>excludeEnd("ctx");
  6589. return self._selectVariable_named_(self._receiver(),"self");
  6590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6591. $ctx3.sendIdx["selectVariable:named:"]=1;
  6592. //>>excludeEnd("ctx");
  6593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6594. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6595. //>>excludeEnd("ctx");
  6596. }));
  6597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6598. $ctx2.sendIdx["onClick:"]=1;
  6599. //>>excludeEnd("ctx");
  6600. li=$2;
  6601. li;
  6602. $3=$recv(self["@selectedVariableName"]).__eq("self");
  6603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6604. $ctx2.sendIdx["="]=1;
  6605. //>>excludeEnd("ctx");
  6606. if($core.assert($3)){
  6607. $recv(li)._class_("selected");
  6608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6609. $ctx2.sendIdx["class:"]=1;
  6610. //>>excludeEnd("ctx");
  6611. };
  6612. return $recv(self._allVariables())._keysAndValuesDo_((function(key,value){
  6613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6614. return $core.withContext(function($ctx3) {
  6615. //>>excludeEnd("ctx");
  6616. $4=$recv(html)._li();
  6617. $recv($4)._with_(key);
  6618. li=$recv($4)._onClick_((function(){
  6619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6620. return $core.withContext(function($ctx4) {
  6621. //>>excludeEnd("ctx");
  6622. return self._selectVariable_named_(value,key);
  6623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6624. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  6625. //>>excludeEnd("ctx");
  6626. }));
  6627. li;
  6628. $5=$recv(self["@selectedVariableName"]).__eq(key);
  6629. if($core.assert($5)){
  6630. return $recv(li)._class_("selected");
  6631. };
  6632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6633. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,4)});
  6634. //>>excludeEnd("ctx");
  6635. }));
  6636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6637. }, function($ctx2) {$ctx2.fillBlock({html:html,li:li},$ctx1,1)});
  6638. //>>excludeEnd("ctx");
  6639. }));
  6640. $6=self["@selectedVariable"];
  6641. if(($receiver = $6) == null || $receiver.isNil){
  6642. $recv(self["@inspectButton"])._at_put_("disabled",true);
  6643. } else {
  6644. $recv(self["@inspectButton"])._removeAt_("disabled");
  6645. };
  6646. return self;
  6647. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6648. }, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},$globals.Debugger)});
  6649. //>>excludeEnd("ctx");
  6650. },
  6651. //>>excludeStart("ide", pragmas.excludeIdeData);
  6652. args: [],
  6653. 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' ]",
  6654. referencedClasses: [],
  6655. //>>excludeEnd("ide");
  6656. messageSends: ["contents:", "with:", "li", "onClick:", "selectVariable:named:", "receiver", "ifTrue:", "=", "class:", "keysAndValuesDo:", "allVariables", "ifNil:ifNotNil:", "at:put:", "removeAt:"]
  6657. }),
  6658. $globals.Debugger);
  6659. $core.addClass('IDEInspector', $globals.TabWidget, ['label', 'variables', 'object', 'selectedVariable', 'variablesList', 'valueTextarea', 'diveButton', 'sourceArea'], 'IDE');
  6660. $core.addMethod(
  6661. $core.method({
  6662. selector: "canBeClosed",
  6663. protocol: 'testing',
  6664. fn: function (){
  6665. var self=this;
  6666. return true;
  6667. },
  6668. //>>excludeStart("ide", pragmas.excludeIdeData);
  6669. args: [],
  6670. source: "canBeClosed\x0a\x09^ true",
  6671. referencedClasses: [],
  6672. //>>excludeEnd("ide");
  6673. messageSends: []
  6674. }),
  6675. $globals.IDEInspector);
  6676. $core.addMethod(
  6677. $core.method({
  6678. selector: "dive",
  6679. protocol: 'actions',
  6680. fn: function (){
  6681. var self=this;
  6682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6683. return $core.withContext(function($ctx1) {
  6684. //>>excludeEnd("ctx");
  6685. $recv($recv(self._variables())._at_(self._selectedVariable()))._inspect();
  6686. return self;
  6687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6688. }, function($ctx1) {$ctx1.fill(self,"dive",{},$globals.IDEInspector)});
  6689. //>>excludeEnd("ctx");
  6690. },
  6691. //>>excludeStart("ide", pragmas.excludeIdeData);
  6692. args: [],
  6693. source: "dive\x0a\x09(self variables at: self selectedVariable) inspect",
  6694. referencedClasses: [],
  6695. //>>excludeEnd("ide");
  6696. messageSends: ["inspect", "at:", "variables", "selectedVariable"]
  6697. }),
  6698. $globals.IDEInspector);
  6699. $core.addMethod(
  6700. $core.method({
  6701. selector: "inspect:",
  6702. protocol: 'actions',
  6703. fn: function (anObject){
  6704. var self=this;
  6705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6706. return $core.withContext(function($ctx1) {
  6707. //>>excludeEnd("ctx");
  6708. self["@object"]=anObject;
  6709. self["@variables"]=[];
  6710. $recv(self["@object"])._inspectOn_(self);
  6711. return self;
  6712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6713. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.IDEInspector)});
  6714. //>>excludeEnd("ctx");
  6715. },
  6716. //>>excludeStart("ide", pragmas.excludeIdeData);
  6717. args: ["anObject"],
  6718. source: "inspect: anObject\x0a\x09object := anObject.\x0a\x09variables := #().\x0a\x09object inspectOn: self",
  6719. referencedClasses: [],
  6720. //>>excludeEnd("ide");
  6721. messageSends: ["inspectOn:"]
  6722. }),
  6723. $globals.IDEInspector);
  6724. $core.addMethod(
  6725. $core.method({
  6726. selector: "label",
  6727. protocol: 'accessing',
  6728. fn: function (){
  6729. var self=this;
  6730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6731. return $core.withContext(function($ctx1) {
  6732. //>>excludeEnd("ctx");
  6733. var $1,$receiver;
  6734. $1=self["@label"];
  6735. if(($receiver = $1) == null || $receiver.isNil){
  6736. return "Inspector (nil)";
  6737. } else {
  6738. return $1;
  6739. };
  6740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6741. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.IDEInspector)});
  6742. //>>excludeEnd("ctx");
  6743. },
  6744. //>>excludeStart("ide", pragmas.excludeIdeData);
  6745. args: [],
  6746. source: "label\x0a\x09^ label ifNil: [ 'Inspector (nil)' ]",
  6747. referencedClasses: [],
  6748. //>>excludeEnd("ide");
  6749. messageSends: ["ifNil:"]
  6750. }),
  6751. $globals.IDEInspector);
  6752. $core.addMethod(
  6753. $core.method({
  6754. selector: "refresh",
  6755. protocol: 'actions',
  6756. fn: function (){
  6757. var self=this;
  6758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6759. return $core.withContext(function($ctx1) {
  6760. //>>excludeEnd("ctx");
  6761. self._inspect_(self["@object"]);
  6762. self._updateVariablesList();
  6763. self._updateValueTextarea();
  6764. return self;
  6765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6766. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.IDEInspector)});
  6767. //>>excludeEnd("ctx");
  6768. },
  6769. //>>excludeStart("ide", pragmas.excludeIdeData);
  6770. args: [],
  6771. source: "refresh\x0a\x09self\x0a\x09\x09inspect: object;\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea",
  6772. referencedClasses: [],
  6773. //>>excludeEnd("ide");
  6774. messageSends: ["inspect:", "updateVariablesList", "updateValueTextarea"]
  6775. }),
  6776. $globals.IDEInspector);
  6777. $core.addMethod(
  6778. $core.method({
  6779. selector: "renderBottomPanelOn:",
  6780. protocol: 'rendering',
  6781. fn: function (html){
  6782. var self=this;
  6783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6784. return $core.withContext(function($ctx1) {
  6785. //>>excludeEnd("ctx");
  6786. var $1,$2;
  6787. $1=$recv(html)._div();
  6788. $recv($1)._class_("amber_sourceCode");
  6789. $recv($1)._with_((function(){
  6790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6791. return $core.withContext(function($ctx2) {
  6792. //>>excludeEnd("ctx");
  6793. $2=$recv($globals.SourceArea)._new();
  6794. $recv($2)._receiver_(self["@object"]);
  6795. $recv($2)._onDoIt_((function(){
  6796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6797. return $core.withContext(function($ctx3) {
  6798. //>>excludeEnd("ctx");
  6799. return self._refresh();
  6800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6801. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6802. //>>excludeEnd("ctx");
  6803. }));
  6804. self["@sourceArea"]=$recv($2)._yourself();
  6805. self["@sourceArea"];
  6806. return $recv(self["@sourceArea"])._renderOn_(html);
  6807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6808. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6809. //>>excludeEnd("ctx");
  6810. }));
  6811. return self;
  6812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6813. }, function($ctx1) {$ctx1.fill(self,"renderBottomPanelOn:",{html:html},$globals.IDEInspector)});
  6814. //>>excludeEnd("ctx");
  6815. },
  6816. //>>excludeStart("ide", pragmas.excludeIdeData);
  6817. args: ["html"],
  6818. 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 ]",
  6819. referencedClasses: ["SourceArea"],
  6820. //>>excludeEnd("ide");
  6821. messageSends: ["class:", "div", "with:", "receiver:", "new", "onDoIt:", "refresh", "yourself", "renderOn:"]
  6822. }),
  6823. $globals.IDEInspector);
  6824. $core.addMethod(
  6825. $core.method({
  6826. selector: "renderBoxOn:",
  6827. protocol: 'rendering',
  6828. fn: function (html){
  6829. var self=this;
  6830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6831. return $core.withContext(function($ctx1) {
  6832. //>>excludeEnd("ctx");
  6833. self._renderTopPanelOn_(html);
  6834. self._renderBottomPanelOn_(html);
  6835. return self;
  6836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6837. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.IDEInspector)});
  6838. //>>excludeEnd("ctx");
  6839. },
  6840. //>>excludeStart("ide", pragmas.excludeIdeData);
  6841. args: ["html"],
  6842. source: "renderBoxOn: html\x0a\x09self\x0a\x09\x09renderTopPanelOn: html;\x0a\x09\x09renderBottomPanelOn: html",
  6843. referencedClasses: [],
  6844. //>>excludeEnd("ide");
  6845. messageSends: ["renderTopPanelOn:", "renderBottomPanelOn:"]
  6846. }),
  6847. $globals.IDEInspector);
  6848. $core.addMethod(
  6849. $core.method({
  6850. selector: "renderButtonsOn:",
  6851. protocol: 'rendering',
  6852. fn: function (html){
  6853. var self=this;
  6854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6855. return $core.withContext(function($ctx1) {
  6856. //>>excludeEnd("ctx");
  6857. var $1,$3,$2,$4,$6,$5,$7;
  6858. $1=$recv(html)._button();
  6859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6860. $ctx1.sendIdx["button"]=1;
  6861. //>>excludeEnd("ctx");
  6862. $recv($1)._with_("DoIt");
  6863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6864. $ctx1.sendIdx["with:"]=1;
  6865. //>>excludeEnd("ctx");
  6866. $2=$recv($1)._onClick_((function(){
  6867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6868. return $core.withContext(function($ctx2) {
  6869. //>>excludeEnd("ctx");
  6870. $3=self._sourceArea();
  6871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6872. $ctx2.sendIdx["sourceArea"]=1;
  6873. //>>excludeEnd("ctx");
  6874. return $recv($3)._doIt();
  6875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6876. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6877. //>>excludeEnd("ctx");
  6878. }));
  6879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6880. $ctx1.sendIdx["onClick:"]=1;
  6881. //>>excludeEnd("ctx");
  6882. $4=$recv(html)._button();
  6883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6884. $ctx1.sendIdx["button"]=2;
  6885. //>>excludeEnd("ctx");
  6886. $recv($4)._with_("PrintIt");
  6887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6888. $ctx1.sendIdx["with:"]=2;
  6889. //>>excludeEnd("ctx");
  6890. $5=$recv($4)._onClick_((function(){
  6891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6892. return $core.withContext(function($ctx2) {
  6893. //>>excludeEnd("ctx");
  6894. $6=self._sourceArea();
  6895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6896. $ctx2.sendIdx["sourceArea"]=2;
  6897. //>>excludeEnd("ctx");
  6898. return $recv($6)._printIt();
  6899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6900. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  6901. //>>excludeEnd("ctx");
  6902. }));
  6903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6904. $ctx1.sendIdx["onClick:"]=2;
  6905. //>>excludeEnd("ctx");
  6906. $7=$recv(html)._button();
  6907. $recv($7)._with_("InspectIt");
  6908. $recv($7)._onClick_((function(){
  6909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6910. return $core.withContext(function($ctx2) {
  6911. //>>excludeEnd("ctx");
  6912. return $recv(self._sourceArea())._inspectIt();
  6913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6914. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  6915. //>>excludeEnd("ctx");
  6916. }));
  6917. self._updateButtons();
  6918. return self;
  6919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6920. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.IDEInspector)});
  6921. //>>excludeEnd("ctx");
  6922. },
  6923. //>>excludeStart("ide", pragmas.excludeIdeData);
  6924. args: ["html"],
  6925. 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",
  6926. referencedClasses: [],
  6927. //>>excludeEnd("ide");
  6928. messageSends: ["with:", "button", "onClick:", "doIt", "sourceArea", "printIt", "inspectIt", "updateButtons"]
  6929. }),
  6930. $globals.IDEInspector);
  6931. $core.addMethod(
  6932. $core.method({
  6933. selector: "renderTopPanelOn:",
  6934. protocol: 'rendering',
  6935. fn: function (html){
  6936. var self=this;
  6937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6938. return $core.withContext(function($ctx1) {
  6939. //>>excludeEnd("ctx");
  6940. var $1,$3,$4,$6,$7,$8,$5,$2;
  6941. $1=$recv(html)._div();
  6942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6943. $ctx1.sendIdx["div"]=1;
  6944. //>>excludeEnd("ctx");
  6945. $recv($1)._class_("top");
  6946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6947. $ctx1.sendIdx["class:"]=1;
  6948. //>>excludeEnd("ctx");
  6949. $2=$recv($1)._with_((function(){
  6950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6951. return $core.withContext(function($ctx2) {
  6952. //>>excludeEnd("ctx");
  6953. self["@variablesList"]=$recv($recv(html)._ul())._class_("amber_column variables");
  6954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6955. $ctx2.sendIdx["class:"]=2;
  6956. //>>excludeEnd("ctx");
  6957. self["@variablesList"];
  6958. $3=$recv(html)._textarea();
  6959. $recv($3)._class_("amber_column value");
  6960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6961. $ctx2.sendIdx["class:"]=3;
  6962. //>>excludeEnd("ctx");
  6963. $recv($3)._at_put_("readonly","readonly");
  6964. self["@valueTextarea"]=$recv($3)._yourself();
  6965. self["@valueTextarea"];
  6966. $4=$recv(html)._div();
  6967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6968. $ctx2.sendIdx["div"]=2;
  6969. //>>excludeEnd("ctx");
  6970. $recv($4)._class_("amber_tabs inspector");
  6971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6972. $ctx2.sendIdx["class:"]=4;
  6973. //>>excludeEnd("ctx");
  6974. $5=$recv($4)._with_((function(){
  6975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6976. return $core.withContext(function($ctx3) {
  6977. //>>excludeEnd("ctx");
  6978. $6=$recv(html)._button();
  6979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6980. $ctx3.sendIdx["button"]=1;
  6981. //>>excludeEnd("ctx");
  6982. $recv($6)._class_("amber_button inspector refresh");
  6983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6984. $ctx3.sendIdx["class:"]=5;
  6985. //>>excludeEnd("ctx");
  6986. $recv($6)._with_("Refresh");
  6987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6988. $ctx3.sendIdx["with:"]=3;
  6989. //>>excludeEnd("ctx");
  6990. $7=$recv($6)._onClick_((function(){
  6991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6992. return $core.withContext(function($ctx4) {
  6993. //>>excludeEnd("ctx");
  6994. return self._refresh();
  6995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6996. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  6997. //>>excludeEnd("ctx");
  6998. }));
  6999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7000. $ctx3.sendIdx["onClick:"]=1;
  7001. //>>excludeEnd("ctx");
  7002. $7;
  7003. $8=$recv(html)._button();
  7004. $recv($8)._class_("amber_button inspector dive");
  7005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7006. $ctx3.sendIdx["class:"]=6;
  7007. //>>excludeEnd("ctx");
  7008. $recv($8)._with_("Dive");
  7009. self["@diveButton"]=$recv($8)._onClick_((function(){
  7010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7011. return $core.withContext(function($ctx4) {
  7012. //>>excludeEnd("ctx");
  7013. return self._dive();
  7014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7015. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7016. //>>excludeEnd("ctx");
  7017. }));
  7018. return self["@diveButton"];
  7019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7020. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7021. //>>excludeEnd("ctx");
  7022. }));
  7023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7024. $ctx2.sendIdx["with:"]=2;
  7025. //>>excludeEnd("ctx");
  7026. $5;
  7027. return $recv($recv(html)._div())._class_("amber_clear");
  7028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7029. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7030. //>>excludeEnd("ctx");
  7031. }));
  7032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7033. $ctx1.sendIdx["with:"]=1;
  7034. //>>excludeEnd("ctx");
  7035. self._updateVariablesList();
  7036. self._updateValueTextarea();
  7037. return self;
  7038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7039. }, function($ctx1) {$ctx1.fill(self,"renderTopPanelOn:",{html:html},$globals.IDEInspector)});
  7040. //>>excludeEnd("ctx");
  7041. },
  7042. //>>excludeStart("ide", pragmas.excludeIdeData);
  7043. args: ["html"],
  7044. 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.",
  7045. referencedClasses: [],
  7046. //>>excludeEnd("ide");
  7047. messageSends: ["class:", "div", "with:", "ul", "textarea", "at:put:", "yourself", "button", "onClick:", "refresh", "dive", "updateVariablesList", "updateValueTextarea"]
  7048. }),
  7049. $globals.IDEInspector);
  7050. $core.addMethod(
  7051. $core.method({
  7052. selector: "selectVariable:",
  7053. protocol: 'updating',
  7054. fn: function (aString){
  7055. var self=this;
  7056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7057. return $core.withContext(function($ctx1) {
  7058. //>>excludeEnd("ctx");
  7059. self._selectedVariable_(aString);
  7060. self._updateVariablesList();
  7061. self._updateValueTextarea();
  7062. self._updateButtons();
  7063. return self;
  7064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7065. }, function($ctx1) {$ctx1.fill(self,"selectVariable:",{aString:aString},$globals.IDEInspector)});
  7066. //>>excludeEnd("ctx");
  7067. },
  7068. //>>excludeStart("ide", pragmas.excludeIdeData);
  7069. args: ["aString"],
  7070. source: "selectVariable: aString\x0a\x09self selectedVariable: aString.\x0a\x09self\x0a\x09\x09updateVariablesList;\x0a\x09\x09updateValueTextarea;\x0a\x09\x09updateButtons",
  7071. referencedClasses: [],
  7072. //>>excludeEnd("ide");
  7073. messageSends: ["selectedVariable:", "updateVariablesList", "updateValueTextarea", "updateButtons"]
  7074. }),
  7075. $globals.IDEInspector);
  7076. $core.addMethod(
  7077. $core.method({
  7078. selector: "selectedVariable",
  7079. protocol: 'accessing',
  7080. fn: function (){
  7081. var self=this;
  7082. return self["@selectedVariable"];
  7083. },
  7084. //>>excludeStart("ide", pragmas.excludeIdeData);
  7085. args: [],
  7086. source: "selectedVariable\x0a\x09^ selectedVariable",
  7087. referencedClasses: [],
  7088. //>>excludeEnd("ide");
  7089. messageSends: []
  7090. }),
  7091. $globals.IDEInspector);
  7092. $core.addMethod(
  7093. $core.method({
  7094. selector: "selectedVariable:",
  7095. protocol: 'accessing',
  7096. fn: function (aString){
  7097. var self=this;
  7098. self["@selectedVariable"]=aString;
  7099. return self;
  7100. },
  7101. //>>excludeStart("ide", pragmas.excludeIdeData);
  7102. args: ["aString"],
  7103. source: "selectedVariable: aString\x0a\x09selectedVariable := aString",
  7104. referencedClasses: [],
  7105. //>>excludeEnd("ide");
  7106. messageSends: []
  7107. }),
  7108. $globals.IDEInspector);
  7109. $core.addMethod(
  7110. $core.method({
  7111. selector: "setLabel:",
  7112. protocol: 'accessing',
  7113. fn: function (aString){
  7114. var self=this;
  7115. self["@label"]=aString;
  7116. return self;
  7117. },
  7118. //>>excludeStart("ide", pragmas.excludeIdeData);
  7119. args: ["aString"],
  7120. source: "setLabel: aString\x0a\x09label := aString",
  7121. referencedClasses: [],
  7122. //>>excludeEnd("ide");
  7123. messageSends: []
  7124. }),
  7125. $globals.IDEInspector);
  7126. $core.addMethod(
  7127. $core.method({
  7128. selector: "setVariables:",
  7129. protocol: 'accessing',
  7130. fn: function (aCollection){
  7131. var self=this;
  7132. self["@variables"]=aCollection;
  7133. return self;
  7134. },
  7135. //>>excludeStart("ide", pragmas.excludeIdeData);
  7136. args: ["aCollection"],
  7137. source: "setVariables: aCollection\x0a\x09variables := aCollection",
  7138. referencedClasses: [],
  7139. //>>excludeEnd("ide");
  7140. messageSends: []
  7141. }),
  7142. $globals.IDEInspector);
  7143. $core.addMethod(
  7144. $core.method({
  7145. selector: "sourceArea",
  7146. protocol: 'accessing',
  7147. fn: function (){
  7148. var self=this;
  7149. return self["@sourceArea"];
  7150. },
  7151. //>>excludeStart("ide", pragmas.excludeIdeData);
  7152. args: [],
  7153. source: "sourceArea\x0a\x09^ sourceArea",
  7154. referencedClasses: [],
  7155. //>>excludeEnd("ide");
  7156. messageSends: []
  7157. }),
  7158. $globals.IDEInspector);
  7159. $core.addMethod(
  7160. $core.method({
  7161. selector: "updateButtons",
  7162. protocol: 'updating',
  7163. fn: function (){
  7164. var self=this;
  7165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7166. return $core.withContext(function($ctx1) {
  7167. //>>excludeEnd("ctx");
  7168. var $3,$2,$1;
  7169. $3=self._selectedVariable();
  7170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7171. $ctx1.sendIdx["selectedVariable"]=1;
  7172. //>>excludeEnd("ctx");
  7173. $2=$recv($3)._notNil();
  7174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7175. $ctx1.sendIdx["notNil"]=1;
  7176. //>>excludeEnd("ctx");
  7177. $1=$recv($2)._and_((function(){
  7178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7179. return $core.withContext(function($ctx2) {
  7180. //>>excludeEnd("ctx");
  7181. return $recv($recv(self._variables())._at_(self._selectedVariable()))._notNil();
  7182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7183. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7184. //>>excludeEnd("ctx");
  7185. }));
  7186. if($core.assert($1)){
  7187. $recv(self["@diveButton"])._removeAt_("disabled");
  7188. } else {
  7189. $recv(self["@diveButton"])._at_put_("disabled",true);
  7190. };
  7191. return self;
  7192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7193. }, function($ctx1) {$ctx1.fill(self,"updateButtons",{},$globals.IDEInspector)});
  7194. //>>excludeEnd("ctx");
  7195. },
  7196. //>>excludeStart("ide", pragmas.excludeIdeData);
  7197. args: [],
  7198. 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' ]",
  7199. referencedClasses: [],
  7200. //>>excludeEnd("ide");
  7201. messageSends: ["ifFalse:ifTrue:", "and:", "notNil", "selectedVariable", "at:", "variables", "at:put:", "removeAt:"]
  7202. }),
  7203. $globals.IDEInspector);
  7204. $core.addMethod(
  7205. $core.method({
  7206. selector: "updateValueTextarea",
  7207. protocol: 'updating',
  7208. fn: function (){
  7209. var self=this;
  7210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7211. return $core.withContext(function($ctx1) {
  7212. //>>excludeEnd("ctx");
  7213. var $1,$4,$3,$2;
  7214. $1=$recv(self["@valueTextarea"])._asJQuery();
  7215. $4=self._selectedVariable();
  7216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7217. $ctx1.sendIdx["selectedVariable"]=1;
  7218. //>>excludeEnd("ctx");
  7219. $3=$recv($4)._isNil();
  7220. if($core.assert($3)){
  7221. $2="";
  7222. } else {
  7223. $2=$recv($recv(self._variables())._at_(self._selectedVariable()))._printString();
  7224. };
  7225. $recv($1)._val_($2);
  7226. return self;
  7227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7228. }, function($ctx1) {$ctx1.fill(self,"updateValueTextarea",{},$globals.IDEInspector)});
  7229. //>>excludeEnd("ctx");
  7230. },
  7231. //>>excludeStart("ide", pragmas.excludeIdeData);
  7232. args: [],
  7233. source: "updateValueTextarea\x0a\x09valueTextarea asJQuery val: (self selectedVariable isNil\x0a\x09\x09ifTrue: [ '' ]\x0a\x09\x09ifFalse: [ (self variables at: self selectedVariable) printString ])",
  7234. referencedClasses: [],
  7235. //>>excludeEnd("ide");
  7236. messageSends: ["val:", "asJQuery", "ifTrue:ifFalse:", "isNil", "selectedVariable", "printString", "at:", "variables"]
  7237. }),
  7238. $globals.IDEInspector);
  7239. $core.addMethod(
  7240. $core.method({
  7241. selector: "updateVariablesList",
  7242. protocol: 'updating',
  7243. fn: function (){
  7244. var self=this;
  7245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7246. return $core.withContext(function($ctx1) {
  7247. //>>excludeEnd("ctx");
  7248. var $1,$2;
  7249. $recv(self["@variablesList"])._contents_((function(html){
  7250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7251. return $core.withContext(function($ctx2) {
  7252. //>>excludeEnd("ctx");
  7253. return $recv(self._variables())._keysDo_((function(each){
  7254. var li;
  7255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7256. return $core.withContext(function($ctx3) {
  7257. //>>excludeEnd("ctx");
  7258. li=$recv(html)._li();
  7259. li;
  7260. $1=li;
  7261. $recv($1)._with_(each);
  7262. $recv($1)._onClick_((function(){
  7263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7264. return $core.withContext(function($ctx4) {
  7265. //>>excludeEnd("ctx");
  7266. return self._selectVariable_(each);
  7267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7268. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7269. //>>excludeEnd("ctx");
  7270. }));
  7271. $2=$recv(self._selectedVariable()).__eq(each);
  7272. if($core.assert($2)){
  7273. return $recv(li)._class_("selected");
  7274. };
  7275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7276. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  7277. //>>excludeEnd("ctx");
  7278. }));
  7279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7280. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  7281. //>>excludeEnd("ctx");
  7282. }));
  7283. return self;
  7284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7285. }, function($ctx1) {$ctx1.fill(self,"updateVariablesList",{},$globals.IDEInspector)});
  7286. //>>excludeEnd("ctx");
  7287. },
  7288. //>>excludeStart("ide", pragmas.excludeIdeData);
  7289. args: [],
  7290. 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' ]] ]",
  7291. referencedClasses: [],
  7292. //>>excludeEnd("ide");
  7293. messageSends: ["contents:", "keysDo:", "variables", "li", "with:", "onClick:", "selectVariable:", "ifTrue:", "=", "selectedVariable", "class:"]
  7294. }),
  7295. $globals.IDEInspector);
  7296. $core.addMethod(
  7297. $core.method({
  7298. selector: "variables",
  7299. protocol: 'accessing',
  7300. fn: function (){
  7301. var self=this;
  7302. return self["@variables"];
  7303. },
  7304. //>>excludeStart("ide", pragmas.excludeIdeData);
  7305. args: [],
  7306. source: "variables\x0a\x09^ variables",
  7307. referencedClasses: [],
  7308. //>>excludeEnd("ide");
  7309. messageSends: []
  7310. }),
  7311. $globals.IDEInspector);
  7312. $core.addMethod(
  7313. $core.method({
  7314. selector: "inspect:",
  7315. protocol: 'instance creation',
  7316. fn: function (anObject){
  7317. var self=this;
  7318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7319. return $core.withContext(function($ctx1) {
  7320. //>>excludeEnd("ctx");
  7321. var $1;
  7322. $1=self._new();
  7323. $recv($1)._inspect_(anObject);
  7324. $recv($1)._open();
  7325. return $recv($1)._yourself();
  7326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7327. }, function($ctx1) {$ctx1.fill(self,"inspect:",{anObject:anObject},$globals.IDEInspector.klass)});
  7328. //>>excludeEnd("ctx");
  7329. },
  7330. //>>excludeStart("ide", pragmas.excludeIdeData);
  7331. args: ["anObject"],
  7332. source: "inspect: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09open;\x0a\x09\x09yourself",
  7333. referencedClasses: [],
  7334. //>>excludeEnd("ide");
  7335. messageSends: ["inspect:", "new", "open", "yourself"]
  7336. }),
  7337. $globals.IDEInspector.klass);
  7338. $core.addMethod(
  7339. $core.method({
  7340. selector: "on:",
  7341. protocol: 'instance creation',
  7342. fn: function (anObject){
  7343. var self=this;
  7344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7345. return $core.withContext(function($ctx1) {
  7346. //>>excludeEnd("ctx");
  7347. var $1;
  7348. $1=self._new();
  7349. $recv($1)._inspect_(anObject);
  7350. return $recv($1)._yourself();
  7351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7352. }, function($ctx1) {$ctx1.fill(self,"on:",{anObject:anObject},$globals.IDEInspector.klass)});
  7353. //>>excludeEnd("ctx");
  7354. },
  7355. //>>excludeStart("ide", pragmas.excludeIdeData);
  7356. args: ["anObject"],
  7357. source: "on: anObject\x0a\x09^ self new\x0a\x09\x09inspect: anObject;\x0a\x09\x09yourself",
  7358. referencedClasses: [],
  7359. //>>excludeEnd("ide");
  7360. messageSends: ["inspect:", "new", "yourself"]
  7361. }),
  7362. $globals.IDEInspector.klass);
  7363. $core.addClass('IDETranscript', $globals.TabWidget, ['textarea'], 'IDE');
  7364. $core.addMethod(
  7365. $core.method({
  7366. selector: "clear",
  7367. protocol: 'actions',
  7368. fn: function (){
  7369. var self=this;
  7370. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7371. return $core.withContext(function($ctx1) {
  7372. //>>excludeEnd("ctx");
  7373. $recv($recv(self["@textarea"])._asJQuery())._val_("");
  7374. return self;
  7375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7376. }, function($ctx1) {$ctx1.fill(self,"clear",{},$globals.IDETranscript)});
  7377. //>>excludeEnd("ctx");
  7378. },
  7379. //>>excludeStart("ide", pragmas.excludeIdeData);
  7380. args: [],
  7381. source: "clear\x0a\x09textarea asJQuery val: ''",
  7382. referencedClasses: [],
  7383. //>>excludeEnd("ide");
  7384. messageSends: ["val:", "asJQuery"]
  7385. }),
  7386. $globals.IDETranscript);
  7387. $core.addMethod(
  7388. $core.method({
  7389. selector: "cr",
  7390. protocol: 'actions',
  7391. fn: function (){
  7392. var self=this;
  7393. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7394. return $core.withContext(function($ctx1) {
  7395. //>>excludeEnd("ctx");
  7396. var $1;
  7397. $1=$recv(self["@textarea"])._asJQuery();
  7398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7399. $ctx1.sendIdx["asJQuery"]=1;
  7400. //>>excludeEnd("ctx");
  7401. $recv($1)._val_($recv($recv($recv(self["@textarea"])._asJQuery())._val()).__comma($recv($globals.String)._cr()));
  7402. return self;
  7403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7404. }, function($ctx1) {$ctx1.fill(self,"cr",{},$globals.IDETranscript)});
  7405. //>>excludeEnd("ctx");
  7406. },
  7407. //>>excludeStart("ide", pragmas.excludeIdeData);
  7408. args: [],
  7409. source: "cr\x0a\x09textarea asJQuery val: textarea asJQuery val, String cr.",
  7410. referencedClasses: ["String"],
  7411. //>>excludeEnd("ide");
  7412. messageSends: ["val:", "asJQuery", ",", "val", "cr"]
  7413. }),
  7414. $globals.IDETranscript);
  7415. $core.addMethod(
  7416. $core.method({
  7417. selector: "label",
  7418. protocol: 'accessing',
  7419. fn: function (){
  7420. var self=this;
  7421. return "Transcript";
  7422. },
  7423. //>>excludeStart("ide", pragmas.excludeIdeData);
  7424. args: [],
  7425. source: "label\x0a\x09^ 'Transcript'",
  7426. referencedClasses: [],
  7427. //>>excludeEnd("ide");
  7428. messageSends: []
  7429. }),
  7430. $globals.IDETranscript);
  7431. $core.addMethod(
  7432. $core.method({
  7433. selector: "open",
  7434. protocol: 'actions',
  7435. fn: function (){
  7436. var self=this;
  7437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7438. return $core.withContext(function($ctx1) {
  7439. //>>excludeEnd("ctx");
  7440. var $1;
  7441. $1=$recv($globals.TabManager)._current();
  7442. $recv($1)._open();
  7443. $recv($1)._selectTab_(self);
  7444. return self;
  7445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7446. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.IDETranscript)});
  7447. //>>excludeEnd("ctx");
  7448. },
  7449. //>>excludeStart("ide", pragmas.excludeIdeData);
  7450. args: [],
  7451. source: "open\x0a\x09TabManager current\x0a\x09open;\x0a\x09selectTab: self",
  7452. referencedClasses: ["TabManager"],
  7453. //>>excludeEnd("ide");
  7454. messageSends: ["open", "current", "selectTab:"]
  7455. }),
  7456. $globals.IDETranscript);
  7457. $core.addMethod(
  7458. $core.method({
  7459. selector: "renderBoxOn:",
  7460. protocol: 'rendering',
  7461. fn: function (html){
  7462. var self=this;
  7463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7464. return $core.withContext(function($ctx1) {
  7465. //>>excludeEnd("ctx");
  7466. var $1;
  7467. self["@textarea"]=$recv(html)._textarea();
  7468. $1=self["@textarea"];
  7469. $recv($1)._class_("amber_transcript");
  7470. $recv($1)._at_put_("spellcheck","false");
  7471. return self;
  7472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7473. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.IDETranscript)});
  7474. //>>excludeEnd("ctx");
  7475. },
  7476. //>>excludeStart("ide", pragmas.excludeIdeData);
  7477. args: ["html"],
  7478. source: "renderBoxOn: html\x0a\x09textarea := html textarea.\x0a\x09textarea\x0a\x09class: 'amber_transcript';\x0a\x09at: 'spellcheck' put: 'false'",
  7479. referencedClasses: [],
  7480. //>>excludeEnd("ide");
  7481. messageSends: ["textarea", "class:", "at:put:"]
  7482. }),
  7483. $globals.IDETranscript);
  7484. $core.addMethod(
  7485. $core.method({
  7486. selector: "renderButtonsOn:",
  7487. protocol: 'rendering',
  7488. fn: function (html){
  7489. var self=this;
  7490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7491. return $core.withContext(function($ctx1) {
  7492. //>>excludeEnd("ctx");
  7493. var $1;
  7494. $1=$recv(html)._button();
  7495. $recv($1)._with_("Clear transcript");
  7496. $recv($1)._onClick_((function(){
  7497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7498. return $core.withContext(function($ctx2) {
  7499. //>>excludeEnd("ctx");
  7500. return self._clear();
  7501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7502. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7503. //>>excludeEnd("ctx");
  7504. }));
  7505. return self;
  7506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7507. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.IDETranscript)});
  7508. //>>excludeEnd("ctx");
  7509. },
  7510. //>>excludeStart("ide", pragmas.excludeIdeData);
  7511. args: ["html"],
  7512. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Clear transcript';\x0a\x09onClick: [ self clear ]",
  7513. referencedClasses: [],
  7514. //>>excludeEnd("ide");
  7515. messageSends: ["with:", "button", "onClick:", "clear"]
  7516. }),
  7517. $globals.IDETranscript);
  7518. $core.addMethod(
  7519. $core.method({
  7520. selector: "show:",
  7521. protocol: 'actions',
  7522. fn: function (anObject){
  7523. var self=this;
  7524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7525. return $core.withContext(function($ctx1) {
  7526. //>>excludeEnd("ctx");
  7527. var $1,$2,$receiver;
  7528. $1=self["@textarea"];
  7529. if(($receiver = $1) == null || $receiver.isNil){
  7530. self._open();
  7531. } else {
  7532. $1;
  7533. };
  7534. $2=$recv(self["@textarea"])._asJQuery();
  7535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7536. $ctx1.sendIdx["asJQuery"]=1;
  7537. //>>excludeEnd("ctx");
  7538. $recv($2)._val_($recv($recv($recv(self["@textarea"])._asJQuery())._val()).__comma($recv(anObject)._asString()));
  7539. return self;
  7540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7541. }, function($ctx1) {$ctx1.fill(self,"show:",{anObject:anObject},$globals.IDETranscript)});
  7542. //>>excludeEnd("ctx");
  7543. },
  7544. //>>excludeStart("ide", pragmas.excludeIdeData);
  7545. args: ["anObject"],
  7546. source: "show: anObject\x0a\x09textarea ifNil: [ self open ].\x0a\x09textarea asJQuery val: textarea asJQuery val, anObject asString.",
  7547. referencedClasses: [],
  7548. //>>excludeEnd("ide");
  7549. messageSends: ["ifNil:", "open", "val:", "asJQuery", ",", "val", "asString"]
  7550. }),
  7551. $globals.IDETranscript);
  7552. $globals.IDETranscript.klass.iVarNames = ['current'];
  7553. $core.addMethod(
  7554. $core.method({
  7555. selector: "current",
  7556. protocol: 'instance creation',
  7557. fn: function (){
  7558. var self=this;
  7559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7560. return $core.withContext(function($ctx1) {
  7561. //>>excludeEnd("ctx");
  7562. var $1,$receiver;
  7563. $1=self["@current"];
  7564. if(($receiver = $1) == null || $receiver.isNil){
  7565. self["@current"]=(
  7566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7567. $ctx1.supercall = true,
  7568. //>>excludeEnd("ctx");
  7569. ($globals.IDETranscript.klass.superclass||$boot.nilAsClass).fn.prototype._new.apply($recv(self), []));
  7570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7571. $ctx1.supercall = false;
  7572. //>>excludeEnd("ctx");;
  7573. return self["@current"];
  7574. } else {
  7575. return $1;
  7576. };
  7577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7578. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.IDETranscript.klass)});
  7579. //>>excludeEnd("ctx");
  7580. },
  7581. //>>excludeStart("ide", pragmas.excludeIdeData);
  7582. args: [],
  7583. source: "current\x0a\x09^ current ifNil: [ current := super new ]",
  7584. referencedClasses: [],
  7585. //>>excludeEnd("ide");
  7586. messageSends: ["ifNil:", "new"]
  7587. }),
  7588. $globals.IDETranscript.klass);
  7589. $core.addMethod(
  7590. $core.method({
  7591. selector: "initialize",
  7592. protocol: 'initialization',
  7593. fn: function (){
  7594. var self=this;
  7595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7596. return $core.withContext(function($ctx1) {
  7597. //>>excludeEnd("ctx");
  7598. $recv($globals.Transcript)._register_(self._current());
  7599. return self;
  7600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7601. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.IDETranscript.klass)});
  7602. //>>excludeEnd("ctx");
  7603. },
  7604. //>>excludeStart("ide", pragmas.excludeIdeData);
  7605. args: [],
  7606. source: "initialize\x0a\x09Transcript register: self current",
  7607. referencedClasses: ["Transcript"],
  7608. //>>excludeEnd("ide");
  7609. messageSends: ["register:", "current"]
  7610. }),
  7611. $globals.IDETranscript.klass);
  7612. $core.addMethod(
  7613. $core.method({
  7614. selector: "new",
  7615. protocol: 'instance creation',
  7616. fn: function (){
  7617. var self=this;
  7618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7619. return $core.withContext(function($ctx1) {
  7620. //>>excludeEnd("ctx");
  7621. self._shouldNotImplement();
  7622. return self;
  7623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7624. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.IDETranscript.klass)});
  7625. //>>excludeEnd("ctx");
  7626. },
  7627. //>>excludeStart("ide", pragmas.excludeIdeData);
  7628. args: [],
  7629. source: "new\x0a\x09self shouldNotImplement",
  7630. referencedClasses: [],
  7631. //>>excludeEnd("ide");
  7632. messageSends: ["shouldNotImplement"]
  7633. }),
  7634. $globals.IDETranscript.klass);
  7635. $core.addMethod(
  7636. $core.method({
  7637. selector: "open",
  7638. protocol: 'instance creation',
  7639. fn: function (){
  7640. var self=this;
  7641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7642. return $core.withContext(function($ctx1) {
  7643. //>>excludeEnd("ctx");
  7644. var $1;
  7645. $1=$recv($globals.TabManager)._current();
  7646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7647. $ctx1.sendIdx["current"]=1;
  7648. //>>excludeEnd("ctx");
  7649. $recv($1)._open();
  7650. $recv($1)._selectTab_(self._current());
  7651. return self;
  7652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7653. }, function($ctx1) {$ctx1.fill(self,"open",{},$globals.IDETranscript.klass)});
  7654. //>>excludeEnd("ctx");
  7655. },
  7656. //>>excludeStart("ide", pragmas.excludeIdeData);
  7657. args: [],
  7658. source: "open\x0a\x09TabManager current\x0a\x09\x09open;\x0a\x09\x09selectTab: self current",
  7659. referencedClasses: ["TabManager"],
  7660. //>>excludeEnd("ide");
  7661. messageSends: ["open", "current", "selectTab:"]
  7662. }),
  7663. $globals.IDETranscript.klass);
  7664. $core.addClass('ProgressBar', $globals.TabWidget, ['percent', 'progressDiv', 'div'], 'IDE');
  7665. $core.addMethod(
  7666. $core.method({
  7667. selector: "percent",
  7668. protocol: 'accessing',
  7669. fn: function (){
  7670. var self=this;
  7671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7672. return $core.withContext(function($ctx1) {
  7673. //>>excludeEnd("ctx");
  7674. var $1,$receiver;
  7675. $1=self["@percent"];
  7676. if(($receiver = $1) == null || $receiver.isNil){
  7677. return (0);
  7678. } else {
  7679. return $1;
  7680. };
  7681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7682. }, function($ctx1) {$ctx1.fill(self,"percent",{},$globals.ProgressBar)});
  7683. //>>excludeEnd("ctx");
  7684. },
  7685. //>>excludeStart("ide", pragmas.excludeIdeData);
  7686. args: [],
  7687. source: "percent\x0a\x09^ percent ifNil: [ 0 ]",
  7688. referencedClasses: [],
  7689. //>>excludeEnd("ide");
  7690. messageSends: ["ifNil:"]
  7691. }),
  7692. $globals.ProgressBar);
  7693. $core.addMethod(
  7694. $core.method({
  7695. selector: "percent:",
  7696. protocol: 'accessing',
  7697. fn: function (aNumber){
  7698. var self=this;
  7699. self["@percent"]=aNumber;
  7700. return self;
  7701. },
  7702. //>>excludeStart("ide", pragmas.excludeIdeData);
  7703. args: ["aNumber"],
  7704. source: "percent: aNumber\x0a\x09percent := aNumber",
  7705. referencedClasses: [],
  7706. //>>excludeEnd("ide");
  7707. messageSends: []
  7708. }),
  7709. $globals.ProgressBar);
  7710. $core.addMethod(
  7711. $core.method({
  7712. selector: "renderOn:",
  7713. protocol: 'rendering',
  7714. fn: function (html){
  7715. var self=this;
  7716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7717. return $core.withContext(function($ctx1) {
  7718. //>>excludeEnd("ctx");
  7719. var $1;
  7720. $1=$recv(html)._div();
  7721. $recv($1)._class_("progress_bar");
  7722. self["@div"]=$recv($1)._yourself();
  7723. self._renderProgressBar();
  7724. return self;
  7725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7726. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.ProgressBar)});
  7727. //>>excludeEnd("ctx");
  7728. },
  7729. //>>excludeStart("ide", pragmas.excludeIdeData);
  7730. args: ["html"],
  7731. source: "renderOn: html\x0a\x09div := html div\x0a\x09\x09class: 'progress_bar';\x0a\x09\x09yourself.\x0a\x09self renderProgressBar",
  7732. referencedClasses: [],
  7733. //>>excludeEnd("ide");
  7734. messageSends: ["class:", "div", "yourself", "renderProgressBar"]
  7735. }),
  7736. $globals.ProgressBar);
  7737. $core.addMethod(
  7738. $core.method({
  7739. selector: "renderProgressBar",
  7740. protocol: 'rendering',
  7741. fn: function (){
  7742. var self=this;
  7743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7744. return $core.withContext(function($ctx1) {
  7745. //>>excludeEnd("ctx");
  7746. var $1,$2;
  7747. $recv(self["@div"])._contents_((function(html){
  7748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7749. return $core.withContext(function($ctx2) {
  7750. //>>excludeEnd("ctx");
  7751. $1=$recv(html)._div();
  7752. $recv($1)._class_("progress");
  7753. $2=$recv("width:".__comma($recv(self._percent())._asString())).__comma("%");
  7754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7755. $ctx2.sendIdx[","]=1;
  7756. //>>excludeEnd("ctx");
  7757. return $recv($1)._style_($2);
  7758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7759. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  7760. //>>excludeEnd("ctx");
  7761. }));
  7762. return self;
  7763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7764. }, function($ctx1) {$ctx1.fill(self,"renderProgressBar",{},$globals.ProgressBar)});
  7765. //>>excludeEnd("ctx");
  7766. },
  7767. //>>excludeStart("ide", pragmas.excludeIdeData);
  7768. args: [],
  7769. source: "renderProgressBar\x0a\x09div contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'progress';\x0a\x09\x09\x09style: 'width:', self percent asString, '%' ]",
  7770. referencedClasses: [],
  7771. //>>excludeEnd("ide");
  7772. messageSends: ["contents:", "class:", "div", "style:", ",", "asString", "percent"]
  7773. }),
  7774. $globals.ProgressBar);
  7775. $core.addMethod(
  7776. $core.method({
  7777. selector: "updatePercent:",
  7778. protocol: 'updating',
  7779. fn: function (aNumber){
  7780. var self=this;
  7781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7782. return $core.withContext(function($ctx1) {
  7783. //>>excludeEnd("ctx");
  7784. self._percent_(aNumber);
  7785. self._renderProgressBar();
  7786. return self;
  7787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7788. }, function($ctx1) {$ctx1.fill(self,"updatePercent:",{aNumber:aNumber},$globals.ProgressBar)});
  7789. //>>excludeEnd("ctx");
  7790. },
  7791. //>>excludeStart("ide", pragmas.excludeIdeData);
  7792. args: ["aNumber"],
  7793. source: "updatePercent: aNumber\x0a\x09self percent: aNumber.\x0a\x09self renderProgressBar",
  7794. referencedClasses: [],
  7795. //>>excludeEnd("ide");
  7796. messageSends: ["percent:", "renderProgressBar"]
  7797. }),
  7798. $globals.ProgressBar);
  7799. $core.addClass('ReferencesBrowser', $globals.TabWidget, ['implementors', 'senders', 'implementorsList', 'input', 'timer', 'selector', 'sendersList', 'referencedClasses', 'referencedClassesList', 'matches', 'matchesList'], 'IDE');
  7800. $core.addMethod(
  7801. $core.method({
  7802. selector: "canBeClosed",
  7803. protocol: 'testing',
  7804. fn: function (){
  7805. var self=this;
  7806. return true;
  7807. },
  7808. //>>excludeStart("ide", pragmas.excludeIdeData);
  7809. args: [],
  7810. source: "canBeClosed\x0a\x09^ true",
  7811. referencedClasses: [],
  7812. //>>excludeEnd("ide");
  7813. messageSends: []
  7814. }),
  7815. $globals.ReferencesBrowser);
  7816. $core.addMethod(
  7817. $core.method({
  7818. selector: "classesAndMetaclasses",
  7819. protocol: 'accessing',
  7820. fn: function (){
  7821. var self=this;
  7822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7823. return $core.withContext(function($ctx1) {
  7824. //>>excludeEnd("ctx");
  7825. var $1;
  7826. $1=$recv($globals.Smalltalk)._classes();
  7827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7828. $ctx1.sendIdx["classes"]=1;
  7829. //>>excludeEnd("ctx");
  7830. return $recv($1).__comma($recv($recv($globals.Smalltalk)._classes())._collect_((function(each){
  7831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7832. return $core.withContext(function($ctx2) {
  7833. //>>excludeEnd("ctx");
  7834. return $recv(each)._class();
  7835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7836. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7837. //>>excludeEnd("ctx");
  7838. })));
  7839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7840. }, function($ctx1) {$ctx1.fill(self,"classesAndMetaclasses",{},$globals.ReferencesBrowser)});
  7841. //>>excludeEnd("ctx");
  7842. },
  7843. //>>excludeStart("ide", pragmas.excludeIdeData);
  7844. args: [],
  7845. source: "classesAndMetaclasses\x0a\x09^ Smalltalk classes, (Smalltalk classes collect: [ :each | each class ])",
  7846. referencedClasses: ["Smalltalk"],
  7847. //>>excludeEnd("ide");
  7848. messageSends: [",", "classes", "collect:", "class"]
  7849. }),
  7850. $globals.ReferencesBrowser);
  7851. $core.addMethod(
  7852. $core.method({
  7853. selector: "implementors",
  7854. protocol: 'accessing',
  7855. fn: function (){
  7856. var self=this;
  7857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7858. return $core.withContext(function($ctx1) {
  7859. //>>excludeEnd("ctx");
  7860. var $1,$receiver;
  7861. $1=self["@implementors"];
  7862. if(($receiver = $1) == null || $receiver.isNil){
  7863. self["@implementors"]=$recv($globals.Array)._new();
  7864. return self["@implementors"];
  7865. } else {
  7866. return $1;
  7867. };
  7868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7869. }, function($ctx1) {$ctx1.fill(self,"implementors",{},$globals.ReferencesBrowser)});
  7870. //>>excludeEnd("ctx");
  7871. },
  7872. //>>excludeStart("ide", pragmas.excludeIdeData);
  7873. args: [],
  7874. source: "implementors\x0a\x09^ implementors ifNil: [ implementors := Array new ]",
  7875. referencedClasses: ["Array"],
  7876. //>>excludeEnd("ide");
  7877. messageSends: ["ifNil:", "new"]
  7878. }),
  7879. $globals.ReferencesBrowser);
  7880. $core.addMethod(
  7881. $core.method({
  7882. selector: "initialize",
  7883. protocol: 'initialization',
  7884. fn: function (){
  7885. var self=this;
  7886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7887. return $core.withContext(function($ctx1) {
  7888. //>>excludeEnd("ctx");
  7889. (
  7890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7891. $ctx1.supercall = true,
  7892. //>>excludeEnd("ctx");
  7893. ($globals.ReferencesBrowser.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  7894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7895. $ctx1.supercall = false;
  7896. //>>excludeEnd("ctx");;
  7897. self["@selector"]="";
  7898. return self;
  7899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7900. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.ReferencesBrowser)});
  7901. //>>excludeEnd("ctx");
  7902. },
  7903. //>>excludeStart("ide", pragmas.excludeIdeData);
  7904. args: [],
  7905. source: "initialize\x0a\x09super initialize.\x0a\x09selector := ''",
  7906. referencedClasses: [],
  7907. //>>excludeEnd("ide");
  7908. messageSends: ["initialize"]
  7909. }),
  7910. $globals.ReferencesBrowser);
  7911. $core.addMethod(
  7912. $core.method({
  7913. selector: "label",
  7914. protocol: 'accessing',
  7915. fn: function (){
  7916. var self=this;
  7917. return "[ References ]";
  7918. },
  7919. //>>excludeStart("ide", pragmas.excludeIdeData);
  7920. args: [],
  7921. source: "label\x0a\x09^ '[ References ]'",
  7922. referencedClasses: [],
  7923. //>>excludeEnd("ide");
  7924. messageSends: []
  7925. }),
  7926. $globals.ReferencesBrowser);
  7927. $core.addMethod(
  7928. $core.method({
  7929. selector: "matches",
  7930. protocol: 'accessing',
  7931. fn: function (){
  7932. var self=this;
  7933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7934. return $core.withContext(function($ctx1) {
  7935. //>>excludeEnd("ctx");
  7936. var $1,$receiver;
  7937. $1=self["@matches"];
  7938. if(($receiver = $1) == null || $receiver.isNil){
  7939. self["@matches"]=$recv($globals.Array)._new();
  7940. return self["@matches"];
  7941. } else {
  7942. return $1;
  7943. };
  7944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7945. }, function($ctx1) {$ctx1.fill(self,"matches",{},$globals.ReferencesBrowser)});
  7946. //>>excludeEnd("ctx");
  7947. },
  7948. //>>excludeStart("ide", pragmas.excludeIdeData);
  7949. args: [],
  7950. source: "matches\x0a\x09^ matches ifNil: [ matches := Array new ]",
  7951. referencedClasses: ["Array"],
  7952. //>>excludeEnd("ide");
  7953. messageSends: ["ifNil:", "new"]
  7954. }),
  7955. $globals.ReferencesBrowser);
  7956. $core.addMethod(
  7957. $core.method({
  7958. selector: "openBrowserOn:",
  7959. protocol: 'actions',
  7960. fn: function (aMethod){
  7961. var self=this;
  7962. var browser;
  7963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7964. return $core.withContext(function($ctx1) {
  7965. //>>excludeEnd("ctx");
  7966. var $3,$2,$4,$1,$5,$6;
  7967. $3=$recv(aMethod)._methodClass();
  7968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7969. $ctx1.sendIdx["methodClass"]=1;
  7970. //>>excludeEnd("ctx");
  7971. $2=$recv($3)._isMetaclass();
  7972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7973. $ctx1.sendIdx["isMetaclass"]=1;
  7974. //>>excludeEnd("ctx");
  7975. if($core.assert($2)){
  7976. $4=$recv(aMethod)._methodClass();
  7977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7978. $ctx1.sendIdx["methodClass"]=2;
  7979. //>>excludeEnd("ctx");
  7980. $1=$recv($4)._instanceClass();
  7981. } else {
  7982. $1=$recv(aMethod)._methodClass();
  7983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7984. $ctx1.sendIdx["methodClass"]=3;
  7985. //>>excludeEnd("ctx");
  7986. };
  7987. browser=$recv($globals.Browser)._openOn_($1);
  7988. $5=$recv($recv(aMethod)._methodClass())._isMetaclass();
  7989. if($core.assert($5)){
  7990. $recv(browser)._selectTab_("class");
  7991. };
  7992. $6=browser;
  7993. $recv($6)._selectProtocol_($recv(aMethod)._category());
  7994. $recv($6)._selectMethod_(aMethod);
  7995. return self;
  7996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7997. }, function($ctx1) {$ctx1.fill(self,"openBrowserOn:",{aMethod:aMethod,browser:browser},$globals.ReferencesBrowser)});
  7998. //>>excludeEnd("ctx");
  7999. },
  8000. //>>excludeStart("ide", pragmas.excludeIdeData);
  8001. args: ["aMethod"],
  8002. 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",
  8003. referencedClasses: ["Browser"],
  8004. //>>excludeEnd("ide");
  8005. messageSends: ["openOn:", "ifTrue:ifFalse:", "isMetaclass", "methodClass", "instanceClass", "ifTrue:", "selectTab:", "selectProtocol:", "category", "selectMethod:"]
  8006. }),
  8007. $globals.ReferencesBrowser);
  8008. $core.addMethod(
  8009. $core.method({
  8010. selector: "referencedClasses",
  8011. protocol: 'accessing',
  8012. fn: function (){
  8013. var self=this;
  8014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8015. return $core.withContext(function($ctx1) {
  8016. //>>excludeEnd("ctx");
  8017. var $1,$receiver;
  8018. $1=self["@referencedClasses"];
  8019. if(($receiver = $1) == null || $receiver.isNil){
  8020. self["@referencedClasses"]=$recv($globals.Array)._new();
  8021. return self["@referencedClasses"];
  8022. } else {
  8023. return $1;
  8024. };
  8025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8026. }, function($ctx1) {$ctx1.fill(self,"referencedClasses",{},$globals.ReferencesBrowser)});
  8027. //>>excludeEnd("ctx");
  8028. },
  8029. //>>excludeStart("ide", pragmas.excludeIdeData);
  8030. args: [],
  8031. source: "referencedClasses\x0a\x09^ referencedClasses ifNil: [ referencedClasses := Array new ]",
  8032. referencedClasses: ["Array"],
  8033. //>>excludeEnd("ide");
  8034. messageSends: ["ifNil:", "new"]
  8035. }),
  8036. $globals.ReferencesBrowser);
  8037. $core.addMethod(
  8038. $core.method({
  8039. selector: "renderBoxOn:",
  8040. protocol: 'rendering',
  8041. fn: function (html){
  8042. var self=this;
  8043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8044. return $core.withContext(function($ctx1) {
  8045. //>>excludeEnd("ctx");
  8046. self._renderInputOn_(html);
  8047. self._renderImplementorsOn_(html);
  8048. self._renderSendersOn_(html);
  8049. self._renderReferencedClassesOn_(html);
  8050. self._renderMatchesOn_(html);
  8051. return self;
  8052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8053. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.ReferencesBrowser)});
  8054. //>>excludeEnd("ctx");
  8055. },
  8056. //>>excludeStart("ide", pragmas.excludeIdeData);
  8057. args: ["html"],
  8058. 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",
  8059. referencedClasses: [],
  8060. //>>excludeEnd("ide");
  8061. messageSends: ["renderInputOn:", "renderImplementorsOn:", "renderSendersOn:", "renderReferencedClassesOn:", "renderMatchesOn:"]
  8062. }),
  8063. $globals.ReferencesBrowser);
  8064. $core.addMethod(
  8065. $core.method({
  8066. selector: "renderImplementorsOn:",
  8067. protocol: 'rendering',
  8068. fn: function (html){
  8069. var self=this;
  8070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8071. return $core.withContext(function($ctx1) {
  8072. //>>excludeEnd("ctx");
  8073. self["@implementorsList"]=$recv($recv(html)._ul())._class_("amber_column implementors");
  8074. self._updateImplementorsList();
  8075. return self;
  8076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8077. }, function($ctx1) {$ctx1.fill(self,"renderImplementorsOn:",{html:html},$globals.ReferencesBrowser)});
  8078. //>>excludeEnd("ctx");
  8079. },
  8080. //>>excludeStart("ide", pragmas.excludeIdeData);
  8081. args: ["html"],
  8082. source: "renderImplementorsOn: html\x0a\x09implementorsList := html ul class: 'amber_column implementors'.\x0a\x09self updateImplementorsList",
  8083. referencedClasses: [],
  8084. //>>excludeEnd("ide");
  8085. messageSends: ["class:", "ul", "updateImplementorsList"]
  8086. }),
  8087. $globals.ReferencesBrowser);
  8088. $core.addMethod(
  8089. $core.method({
  8090. selector: "renderInputOn:",
  8091. protocol: 'rendering',
  8092. fn: function (html){
  8093. var self=this;
  8094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8095. return $core.withContext(function($ctx1) {
  8096. //>>excludeEnd("ctx");
  8097. var $1;
  8098. $1=$recv(html)._input();
  8099. $recv($1)._class_("implementors");
  8100. self["@input"]=$recv($1)._yourself();
  8101. $recv($recv(self["@input"])._asJQuery())._val_(self["@selector"]);
  8102. self._setInputEvents();
  8103. return self;
  8104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8105. }, function($ctx1) {$ctx1.fill(self,"renderInputOn:",{html:html},$globals.ReferencesBrowser)});
  8106. //>>excludeEnd("ctx");
  8107. },
  8108. //>>excludeStart("ide", pragmas.excludeIdeData);
  8109. args: ["html"],
  8110. source: "renderInputOn: html\x0a\x09input := html input\x0a\x09\x09class: 'implementors';\x0a\x09\x09yourself.\x0a\x09input asJQuery val: selector.\x0a\x09self setInputEvents",
  8111. referencedClasses: [],
  8112. //>>excludeEnd("ide");
  8113. messageSends: ["class:", "input", "yourself", "val:", "asJQuery", "setInputEvents"]
  8114. }),
  8115. $globals.ReferencesBrowser);
  8116. $core.addMethod(
  8117. $core.method({
  8118. selector: "renderMatchesOn:",
  8119. protocol: 'rendering',
  8120. fn: function (html){
  8121. var self=this;
  8122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8123. return $core.withContext(function($ctx1) {
  8124. //>>excludeEnd("ctx");
  8125. self["@matchesList"]=$recv($recv(html)._ul())._class_("amber_column matches");
  8126. self._updateMatchesList();
  8127. return self;
  8128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8129. }, function($ctx1) {$ctx1.fill(self,"renderMatchesOn:",{html:html},$globals.ReferencesBrowser)});
  8130. //>>excludeEnd("ctx");
  8131. },
  8132. //>>excludeStart("ide", pragmas.excludeIdeData);
  8133. args: ["html"],
  8134. source: "renderMatchesOn: html\x0a\x09matchesList := html ul class: 'amber_column matches'.\x0a\x09self updateMatchesList",
  8135. referencedClasses: [],
  8136. //>>excludeEnd("ide");
  8137. messageSends: ["class:", "ul", "updateMatchesList"]
  8138. }),
  8139. $globals.ReferencesBrowser);
  8140. $core.addMethod(
  8141. $core.method({
  8142. selector: "renderReferencedClassesOn:",
  8143. protocol: 'rendering',
  8144. fn: function (html){
  8145. var self=this;
  8146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8147. return $core.withContext(function($ctx1) {
  8148. //>>excludeEnd("ctx");
  8149. self["@referencedClassesList"]=$recv($recv(html)._ul())._class_("amber_column referenced_classes");
  8150. self._updateReferencedClassesList();
  8151. return self;
  8152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8153. }, function($ctx1) {$ctx1.fill(self,"renderReferencedClassesOn:",{html:html},$globals.ReferencesBrowser)});
  8154. //>>excludeEnd("ctx");
  8155. },
  8156. //>>excludeStart("ide", pragmas.excludeIdeData);
  8157. args: ["html"],
  8158. source: "renderReferencedClassesOn: html\x0a\x09referencedClassesList := html ul class: 'amber_column referenced_classes'.\x0a\x09self updateReferencedClassesList",
  8159. referencedClasses: [],
  8160. //>>excludeEnd("ide");
  8161. messageSends: ["class:", "ul", "updateReferencedClassesList"]
  8162. }),
  8163. $globals.ReferencesBrowser);
  8164. $core.addMethod(
  8165. $core.method({
  8166. selector: "renderSendersOn:",
  8167. protocol: 'rendering',
  8168. fn: function (html){
  8169. var self=this;
  8170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8171. return $core.withContext(function($ctx1) {
  8172. //>>excludeEnd("ctx");
  8173. self["@sendersList"]=$recv($recv(html)._ul())._class_("amber_column senders");
  8174. self._updateSendersList();
  8175. return self;
  8176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8177. }, function($ctx1) {$ctx1.fill(self,"renderSendersOn:",{html:html},$globals.ReferencesBrowser)});
  8178. //>>excludeEnd("ctx");
  8179. },
  8180. //>>excludeStart("ide", pragmas.excludeIdeData);
  8181. args: ["html"],
  8182. source: "renderSendersOn: html\x0a\x09sendersList := html ul class: 'amber_column senders'.\x0a\x09self updateSendersList",
  8183. referencedClasses: [],
  8184. //>>excludeEnd("ide");
  8185. messageSends: ["class:", "ul", "updateSendersList"]
  8186. }),
  8187. $globals.ReferencesBrowser);
  8188. $core.addMethod(
  8189. $core.method({
  8190. selector: "search:",
  8191. protocol: 'actions',
  8192. fn: function (aString){
  8193. var self=this;
  8194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8195. return $core.withContext(function($ctx1) {
  8196. //>>excludeEnd("ctx");
  8197. self._searchReferencesFor_(aString);
  8198. self._updateImplementorsList();
  8199. self._updateSendersList();
  8200. self._updateReferencedClassesList();
  8201. self._updateMatchesList();
  8202. return self;
  8203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8204. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.ReferencesBrowser)});
  8205. //>>excludeEnd("ctx");
  8206. },
  8207. //>>excludeStart("ide", pragmas.excludeIdeData);
  8208. args: ["aString"],
  8209. source: "search: aString\x0a\x09self\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09updateImplementorsList;\x0a\x09\x09updateSendersList;\x0a\x09\x09updateReferencedClassesList;\x0a\x09\x09updateMatchesList",
  8210. referencedClasses: [],
  8211. //>>excludeEnd("ide");
  8212. messageSends: ["searchReferencesFor:", "updateImplementorsList", "updateSendersList", "updateReferencedClassesList", "updateMatchesList"]
  8213. }),
  8214. $globals.ReferencesBrowser);
  8215. $core.addMethod(
  8216. $core.method({
  8217. selector: "searchMethodSource",
  8218. protocol: 'actions',
  8219. fn: function (){
  8220. var self=this;
  8221. var regex;
  8222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8223. return $core.withContext(function($ctx1) {
  8224. //>>excludeEnd("ctx");
  8225. var $1;
  8226. regex=$recv(self["@selector"])._allButFirst();
  8227. $recv(self._classesAndMetaclasses())._do_((function(each){
  8228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8229. return $core.withContext(function($ctx2) {
  8230. //>>excludeEnd("ctx");
  8231. return $recv($recv(each)._methodDictionary())._valuesDo_((function(value){
  8232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8233. return $core.withContext(function($ctx3) {
  8234. //>>excludeEnd("ctx");
  8235. $1=$recv($recv(value)._source())._match_(regex);
  8236. if($core.assert($1)){
  8237. return $recv(self._matches())._add_(value);
  8238. };
  8239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8240. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)});
  8241. //>>excludeEnd("ctx");
  8242. }));
  8243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8244. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8245. //>>excludeEnd("ctx");
  8246. }));
  8247. return self;
  8248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8249. }, function($ctx1) {$ctx1.fill(self,"searchMethodSource",{regex:regex},$globals.ReferencesBrowser)});
  8250. //>>excludeEnd("ctx");
  8251. },
  8252. //>>excludeStart("ide", pragmas.excludeIdeData);
  8253. args: [],
  8254. 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 ]] ]",
  8255. referencedClasses: [],
  8256. //>>excludeEnd("ide");
  8257. messageSends: ["allButFirst", "do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "match:", "source", "add:", "matches"]
  8258. }),
  8259. $globals.ReferencesBrowser);
  8260. $core.addMethod(
  8261. $core.method({
  8262. selector: "searchReferencedClasses",
  8263. protocol: 'actions',
  8264. fn: function (){
  8265. var self=this;
  8266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8267. return $core.withContext(function($ctx1) {
  8268. //>>excludeEnd("ctx");
  8269. var $2,$1;
  8270. $recv(self._classesAndMetaclasses())._do_((function(each){
  8271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8272. return $core.withContext(function($ctx2) {
  8273. //>>excludeEnd("ctx");
  8274. return $recv($recv(each)._methodDictionary())._valuesDo_((function(value){
  8275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8276. return $core.withContext(function($ctx3) {
  8277. //>>excludeEnd("ctx");
  8278. $2=$recv(value)._referencedClasses();
  8279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8280. $ctx3.sendIdx["referencedClasses"]=1;
  8281. //>>excludeEnd("ctx");
  8282. $1=$recv($2)._includes_(self["@selector"]);
  8283. if($core.assert($1)){
  8284. return $recv(self._referencedClasses())._add_(value);
  8285. };
  8286. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8287. }, function($ctx3) {$ctx3.fillBlock({value:value},$ctx2,2)});
  8288. //>>excludeEnd("ctx");
  8289. }));
  8290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8291. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8292. //>>excludeEnd("ctx");
  8293. }));
  8294. return self;
  8295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8296. }, function($ctx1) {$ctx1.fill(self,"searchReferencedClasses",{},$globals.ReferencesBrowser)});
  8297. //>>excludeEnd("ctx");
  8298. },
  8299. //>>excludeStart("ide", pragmas.excludeIdeData);
  8300. args: [],
  8301. 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 ]] ]",
  8302. referencedClasses: [],
  8303. //>>excludeEnd("ide");
  8304. messageSends: ["do:", "classesAndMetaclasses", "valuesDo:", "methodDictionary", "ifTrue:", "includes:", "referencedClasses", "add:"]
  8305. }),
  8306. $globals.ReferencesBrowser);
  8307. $core.addMethod(
  8308. $core.method({
  8309. selector: "searchReferencesFor:",
  8310. protocol: 'actions',
  8311. fn: function (aString){
  8312. var self=this;
  8313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8314. return $core.withContext(function($ctx1) {
  8315. //>>excludeEnd("ctx");
  8316. var $1;
  8317. self["@selector"]=aString;
  8318. self["@implementors"]=$recv($globals.Array)._new();
  8319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8320. $ctx1.sendIdx["new"]=1;
  8321. //>>excludeEnd("ctx");
  8322. self["@senders"]=$recv($globals.Array)._new();
  8323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8324. $ctx1.sendIdx["new"]=2;
  8325. //>>excludeEnd("ctx");
  8326. self["@referencedClasses"]=$recv($globals.Array)._new();
  8327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8328. $ctx1.sendIdx["new"]=3;
  8329. //>>excludeEnd("ctx");
  8330. self["@matches"]=$recv($globals.Array)._new();
  8331. self._searchMethodSource();
  8332. $1=$recv(self["@selector"])._match_("^[A-Z]");
  8333. if($core.assert($1)){
  8334. self._searchReferencedClasses();
  8335. } else {
  8336. self._searchSelectorReferences();
  8337. };
  8338. return self;
  8339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8340. }, function($ctx1) {$ctx1.fill(self,"searchReferencesFor:",{aString:aString},$globals.ReferencesBrowser)});
  8341. //>>excludeEnd("ctx");
  8342. },
  8343. //>>excludeStart("ide", pragmas.excludeIdeData);
  8344. args: ["aString"],
  8345. 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 ]",
  8346. referencedClasses: ["Array"],
  8347. //>>excludeEnd("ide");
  8348. messageSends: ["new", "searchMethodSource", "ifFalse:ifTrue:", "match:", "searchSelectorReferences", "searchReferencedClasses"]
  8349. }),
  8350. $globals.ReferencesBrowser);
  8351. $core.addMethod(
  8352. $core.method({
  8353. selector: "searchSelectorReferences",
  8354. protocol: 'actions',
  8355. fn: function (){
  8356. var self=this;
  8357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8358. return $core.withContext(function($ctx1) {
  8359. //>>excludeEnd("ctx");
  8360. var $1,$2;
  8361. $recv(self._classesAndMetaclasses())._do_((function(each){
  8362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8363. return $core.withContext(function($ctx2) {
  8364. //>>excludeEnd("ctx");
  8365. return $recv($recv(each)._methodDictionary())._keysAndValuesDo_((function(key,value){
  8366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8367. return $core.withContext(function($ctx3) {
  8368. //>>excludeEnd("ctx");
  8369. $1=$recv(key).__eq(self["@selector"]);
  8370. if($core.assert($1)){
  8371. $recv(self._implementors())._add_(value);
  8372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8373. $ctx3.sendIdx["add:"]=1;
  8374. //>>excludeEnd("ctx");
  8375. };
  8376. $2=$recv($recv(value)._messageSends())._includes_(self["@selector"]);
  8377. if($core.assert($2)){
  8378. return $recv(self._senders())._add_(value);
  8379. };
  8380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8381. }, function($ctx3) {$ctx3.fillBlock({key:key,value:value},$ctx2,2)});
  8382. //>>excludeEnd("ctx");
  8383. }));
  8384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8385. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8386. //>>excludeEnd("ctx");
  8387. }));
  8388. return self;
  8389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8390. }, function($ctx1) {$ctx1.fill(self,"searchSelectorReferences",{},$globals.ReferencesBrowser)});
  8391. //>>excludeEnd("ctx");
  8392. },
  8393. //>>excludeStart("ide", pragmas.excludeIdeData);
  8394. args: [],
  8395. 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 ]] ]",
  8396. referencedClasses: [],
  8397. //>>excludeEnd("ide");
  8398. messageSends: ["do:", "classesAndMetaclasses", "keysAndValuesDo:", "methodDictionary", "ifTrue:", "=", "add:", "implementors", "includes:", "messageSends", "senders"]
  8399. }),
  8400. $globals.ReferencesBrowser);
  8401. $core.addMethod(
  8402. $core.method({
  8403. selector: "selector",
  8404. protocol: 'accessing',
  8405. fn: function (){
  8406. var self=this;
  8407. return self["@selector"];
  8408. },
  8409. //>>excludeStart("ide", pragmas.excludeIdeData);
  8410. args: [],
  8411. source: "selector\x0a\x09^ selector",
  8412. referencedClasses: [],
  8413. //>>excludeEnd("ide");
  8414. messageSends: []
  8415. }),
  8416. $globals.ReferencesBrowser);
  8417. $core.addMethod(
  8418. $core.method({
  8419. selector: "senders",
  8420. protocol: 'accessing',
  8421. fn: function (){
  8422. var self=this;
  8423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8424. return $core.withContext(function($ctx1) {
  8425. //>>excludeEnd("ctx");
  8426. var $1,$receiver;
  8427. $1=self["@senders"];
  8428. if(($receiver = $1) == null || $receiver.isNil){
  8429. self["@senders"]=$recv($globals.Array)._new();
  8430. return self["@senders"];
  8431. } else {
  8432. return $1;
  8433. };
  8434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8435. }, function($ctx1) {$ctx1.fill(self,"senders",{},$globals.ReferencesBrowser)});
  8436. //>>excludeEnd("ctx");
  8437. },
  8438. //>>excludeStart("ide", pragmas.excludeIdeData);
  8439. args: [],
  8440. source: "senders\x0a\x09^ senders ifNil: [ senders := Array new ]",
  8441. referencedClasses: ["Array"],
  8442. //>>excludeEnd("ide");
  8443. messageSends: ["ifNil:", "new"]
  8444. }),
  8445. $globals.ReferencesBrowser);
  8446. $core.addMethod(
  8447. $core.method({
  8448. selector: "setInputEvents",
  8449. protocol: 'private',
  8450. fn: function (){
  8451. var self=this;
  8452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8453. return $core.withContext(function($ctx1) {
  8454. //>>excludeEnd("ctx");
  8455. var $1,$2,$receiver;
  8456. $1=self["@input"];
  8457. $recv($1)._onKeyUp_((function(){
  8458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8459. return $core.withContext(function($ctx2) {
  8460. //>>excludeEnd("ctx");
  8461. self["@timer"]=$recv((function(){
  8462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8463. return $core.withContext(function($ctx3) {
  8464. //>>excludeEnd("ctx");
  8465. return self._search_($recv($recv(self["@input"])._asJQuery())._val());
  8466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8467. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8468. //>>excludeEnd("ctx");
  8469. }))._valueWithTimeout_((100));
  8470. return self["@timer"];
  8471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8472. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8473. //>>excludeEnd("ctx");
  8474. }));
  8475. $recv($1)._onKeyDown_((function(){
  8476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8477. return $core.withContext(function($ctx2) {
  8478. //>>excludeEnd("ctx");
  8479. $2=self["@timer"];
  8480. if(($receiver = $2) == null || $receiver.isNil){
  8481. return $2;
  8482. } else {
  8483. return $recv(self["@timer"])._clearTimeout();
  8484. };
  8485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8486. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  8487. //>>excludeEnd("ctx");
  8488. }));
  8489. return self;
  8490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8491. }, function($ctx1) {$ctx1.fill(self,"setInputEvents",{},$globals.ReferencesBrowser)});
  8492. //>>excludeEnd("ctx");
  8493. },
  8494. //>>excludeStart("ide", pragmas.excludeIdeData);
  8495. args: [],
  8496. source: "setInputEvents\x0a\x09input\x0a\x09\x09onKeyUp: [ timer := [ self search: input asJQuery val ] valueWithTimeout: 100 ];\x0a\x09\x09onKeyDown: [ timer ifNotNil: [ timer clearTimeout ]]",
  8497. referencedClasses: [],
  8498. //>>excludeEnd("ide");
  8499. messageSends: ["onKeyUp:", "valueWithTimeout:", "search:", "val", "asJQuery", "onKeyDown:", "ifNotNil:", "clearTimeout"]
  8500. }),
  8501. $globals.ReferencesBrowser);
  8502. $core.addMethod(
  8503. $core.method({
  8504. selector: "updateImplementorsList",
  8505. protocol: 'updating',
  8506. fn: function (){
  8507. var self=this;
  8508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8509. return $core.withContext(function($ctx1) {
  8510. //>>excludeEnd("ctx");
  8511. var $1,$6,$5,$4,$3,$2,$7,$8;
  8512. $recv(self["@implementorsList"])._contents_((function(html){
  8513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8514. return $core.withContext(function($ctx2) {
  8515. //>>excludeEnd("ctx");
  8516. $1=$recv(html)._li();
  8517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8518. $ctx2.sendIdx["li"]=1;
  8519. //>>excludeEnd("ctx");
  8520. $recv($1)._class_("column_label");
  8521. $6=self._implementors();
  8522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8523. $ctx2.sendIdx["implementors"]=1;
  8524. //>>excludeEnd("ctx");
  8525. $5=$recv($6)._size();
  8526. $4=$recv($5)._asString();
  8527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8528. $ctx2.sendIdx["asString"]=1;
  8529. //>>excludeEnd("ctx");
  8530. $3="Implementors (".__comma($4);
  8531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8532. $ctx2.sendIdx[","]=2;
  8533. //>>excludeEnd("ctx");
  8534. $2=$recv($3).__comma(")");
  8535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8536. $ctx2.sendIdx[","]=1;
  8537. //>>excludeEnd("ctx");
  8538. $recv($1)._with_($2);
  8539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8540. $ctx2.sendIdx["with:"]=1;
  8541. //>>excludeEnd("ctx");
  8542. $recv($1)._style_("font-weight: bold");
  8543. return $recv(self._implementors())._do_((function(each){
  8544. var li;
  8545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8546. return $core.withContext(function($ctx3) {
  8547. //>>excludeEnd("ctx");
  8548. li=$recv(html)._li();
  8549. li;
  8550. $7=li;
  8551. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma(self._selector());
  8552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8553. $ctx3.sendIdx[","]=3;
  8554. //>>excludeEnd("ctx");
  8555. $recv($7)._with_($8);
  8556. return $recv($7)._onClick_((function(){
  8557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8558. return $core.withContext(function($ctx4) {
  8559. //>>excludeEnd("ctx");
  8560. return self._openBrowserOn_(each);
  8561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8562. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8563. //>>excludeEnd("ctx");
  8564. }));
  8565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8566. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  8567. //>>excludeEnd("ctx");
  8568. }));
  8569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8570. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8571. //>>excludeEnd("ctx");
  8572. }));
  8573. return self;
  8574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8575. }, function($ctx1) {$ctx1.fill(self,"updateImplementorsList",{},$globals.ReferencesBrowser)});
  8576. //>>excludeEnd("ctx");
  8577. },
  8578. //>>excludeStart("ide", pragmas.excludeIdeData);
  8579. args: [],
  8580. 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 ]] ]",
  8581. referencedClasses: [],
  8582. //>>excludeEnd("ide");
  8583. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "implementors", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8584. }),
  8585. $globals.ReferencesBrowser);
  8586. $core.addMethod(
  8587. $core.method({
  8588. selector: "updateMatchesList",
  8589. protocol: 'updating',
  8590. fn: function (){
  8591. var self=this;
  8592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8593. return $core.withContext(function($ctx1) {
  8594. //>>excludeEnd("ctx");
  8595. var $1,$6,$5,$4,$3,$2,$7,$8;
  8596. $recv(self["@matchesList"])._contents_((function(html){
  8597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8598. return $core.withContext(function($ctx2) {
  8599. //>>excludeEnd("ctx");
  8600. $1=$recv(html)._li();
  8601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8602. $ctx2.sendIdx["li"]=1;
  8603. //>>excludeEnd("ctx");
  8604. $recv($1)._class_("column_label");
  8605. $6=self._matches();
  8606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8607. $ctx2.sendIdx["matches"]=1;
  8608. //>>excludeEnd("ctx");
  8609. $5=$recv($6)._size();
  8610. $4=$recv($5)._asString();
  8611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8612. $ctx2.sendIdx["asString"]=1;
  8613. //>>excludeEnd("ctx");
  8614. $3="Regex matches (".__comma($4);
  8615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8616. $ctx2.sendIdx[","]=2;
  8617. //>>excludeEnd("ctx");
  8618. $2=$recv($3).__comma(")");
  8619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8620. $ctx2.sendIdx[","]=1;
  8621. //>>excludeEnd("ctx");
  8622. $recv($1)._with_($2);
  8623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8624. $ctx2.sendIdx["with:"]=1;
  8625. //>>excludeEnd("ctx");
  8626. $recv($1)._style_("font-weight: bold");
  8627. return $recv(self._matches())._do_((function(each){
  8628. var li;
  8629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8630. return $core.withContext(function($ctx3) {
  8631. //>>excludeEnd("ctx");
  8632. li=$recv(html)._li();
  8633. li;
  8634. $7=li;
  8635. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8637. $ctx3.sendIdx[","]=3;
  8638. //>>excludeEnd("ctx");
  8639. $recv($7)._with_($8);
  8640. return $recv($7)._onClick_((function(){
  8641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8642. return $core.withContext(function($ctx4) {
  8643. //>>excludeEnd("ctx");
  8644. return self._openBrowserOn_(each);
  8645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8646. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8647. //>>excludeEnd("ctx");
  8648. }));
  8649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8650. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,2)});
  8651. //>>excludeEnd("ctx");
  8652. }));
  8653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8654. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8655. //>>excludeEnd("ctx");
  8656. }));
  8657. return self;
  8658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8659. }, function($ctx1) {$ctx1.fill(self,"updateMatchesList",{},$globals.ReferencesBrowser)});
  8660. //>>excludeEnd("ctx");
  8661. },
  8662. //>>excludeStart("ide", pragmas.excludeIdeData);
  8663. args: [],
  8664. 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 ]] ]",
  8665. referencedClasses: [],
  8666. //>>excludeEnd("ide");
  8667. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "matches", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8668. }),
  8669. $globals.ReferencesBrowser);
  8670. $core.addMethod(
  8671. $core.method({
  8672. selector: "updateReferencedClassesList",
  8673. protocol: 'updating',
  8674. fn: function (){
  8675. var self=this;
  8676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8677. return $core.withContext(function($ctx1) {
  8678. //>>excludeEnd("ctx");
  8679. var $1,$6,$5,$4,$3,$2,$7,$8;
  8680. $recv(self["@referencedClassesList"])._contents_((function(html){
  8681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8682. return $core.withContext(function($ctx2) {
  8683. //>>excludeEnd("ctx");
  8684. $1=$recv(html)._li();
  8685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8686. $ctx2.sendIdx["li"]=1;
  8687. //>>excludeEnd("ctx");
  8688. $recv($1)._class_("column_label");
  8689. $6=self._referencedClasses();
  8690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8691. $ctx2.sendIdx["referencedClasses"]=1;
  8692. //>>excludeEnd("ctx");
  8693. $5=$recv($6)._size();
  8694. $4=$recv($5)._asString();
  8695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8696. $ctx2.sendIdx["asString"]=1;
  8697. //>>excludeEnd("ctx");
  8698. $3="Class references (".__comma($4);
  8699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8700. $ctx2.sendIdx[","]=2;
  8701. //>>excludeEnd("ctx");
  8702. $2=$recv($3).__comma(")");
  8703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8704. $ctx2.sendIdx[","]=1;
  8705. //>>excludeEnd("ctx");
  8706. $recv($1)._with_($2);
  8707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8708. $ctx2.sendIdx["with:"]=1;
  8709. //>>excludeEnd("ctx");
  8710. $recv($1)._style_("font-weight: bold");
  8711. return $recv(self._referencedClasses())._do_((function(each){
  8712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8713. return $core.withContext(function($ctx3) {
  8714. //>>excludeEnd("ctx");
  8715. $7=$recv(html)._li();
  8716. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8718. $ctx3.sendIdx[","]=3;
  8719. //>>excludeEnd("ctx");
  8720. $recv($7)._with_($8);
  8721. return $recv($7)._onClick_((function(){
  8722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8723. return $core.withContext(function($ctx4) {
  8724. //>>excludeEnd("ctx");
  8725. return self._openBrowserOn_(each);
  8726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8727. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8728. //>>excludeEnd("ctx");
  8729. }));
  8730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8731. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  8732. //>>excludeEnd("ctx");
  8733. }));
  8734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8735. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8736. //>>excludeEnd("ctx");
  8737. }));
  8738. return self;
  8739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8740. }, function($ctx1) {$ctx1.fill(self,"updateReferencedClassesList",{},$globals.ReferencesBrowser)});
  8741. //>>excludeEnd("ctx");
  8742. },
  8743. //>>excludeStart("ide", pragmas.excludeIdeData);
  8744. args: [],
  8745. 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 ]] ]",
  8746. referencedClasses: [],
  8747. //>>excludeEnd("ide");
  8748. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "referencedClasses", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8749. }),
  8750. $globals.ReferencesBrowser);
  8751. $core.addMethod(
  8752. $core.method({
  8753. selector: "updateSendersList",
  8754. protocol: 'updating',
  8755. fn: function (){
  8756. var self=this;
  8757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8758. return $core.withContext(function($ctx1) {
  8759. //>>excludeEnd("ctx");
  8760. var $1,$6,$5,$4,$3,$2,$7,$8;
  8761. $recv(self["@sendersList"])._contents_((function(html){
  8762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8763. return $core.withContext(function($ctx2) {
  8764. //>>excludeEnd("ctx");
  8765. $1=$recv(html)._li();
  8766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8767. $ctx2.sendIdx["li"]=1;
  8768. //>>excludeEnd("ctx");
  8769. $recv($1)._class_("column_label");
  8770. $6=self._senders();
  8771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8772. $ctx2.sendIdx["senders"]=1;
  8773. //>>excludeEnd("ctx");
  8774. $5=$recv($6)._size();
  8775. $4=$recv($5)._asString();
  8776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8777. $ctx2.sendIdx["asString"]=1;
  8778. //>>excludeEnd("ctx");
  8779. $3="Senders (".__comma($4);
  8780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8781. $ctx2.sendIdx[","]=2;
  8782. //>>excludeEnd("ctx");
  8783. $2=$recv($3).__comma(")");
  8784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8785. $ctx2.sendIdx[","]=1;
  8786. //>>excludeEnd("ctx");
  8787. $recv($1)._with_($2);
  8788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8789. $ctx2.sendIdx["with:"]=1;
  8790. //>>excludeEnd("ctx");
  8791. $recv($1)._style_("font-weight: bold");
  8792. return $recv(self._senders())._do_((function(each){
  8793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8794. return $core.withContext(function($ctx3) {
  8795. //>>excludeEnd("ctx");
  8796. $7=$recv(html)._li();
  8797. $8=$recv($recv($recv($recv(each)._methodClass())._asString()).__comma(" >> ")).__comma($recv(each)._selector());
  8798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8799. $ctx3.sendIdx[","]=3;
  8800. //>>excludeEnd("ctx");
  8801. $recv($7)._with_($8);
  8802. return $recv($7)._onClick_((function(){
  8803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8804. return $core.withContext(function($ctx4) {
  8805. //>>excludeEnd("ctx");
  8806. return self._openBrowserOn_(each);
  8807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8808. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  8809. //>>excludeEnd("ctx");
  8810. }));
  8811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8812. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  8813. //>>excludeEnd("ctx");
  8814. }));
  8815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8816. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8817. //>>excludeEnd("ctx");
  8818. }));
  8819. return self;
  8820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8821. }, function($ctx1) {$ctx1.fill(self,"updateSendersList",{},$globals.ReferencesBrowser)});
  8822. //>>excludeEnd("ctx");
  8823. },
  8824. //>>excludeStart("ide", pragmas.excludeIdeData);
  8825. args: [],
  8826. 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 ]] ]",
  8827. referencedClasses: [],
  8828. //>>excludeEnd("ide");
  8829. messageSends: ["contents:", "class:", "li", "with:", ",", "asString", "size", "senders", "style:", "do:", "methodClass", "selector", "onClick:", "openBrowserOn:"]
  8830. }),
  8831. $globals.ReferencesBrowser);
  8832. $core.addMethod(
  8833. $core.method({
  8834. selector: "search:",
  8835. protocol: 'instance creation',
  8836. fn: function (aString){
  8837. var self=this;
  8838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8839. return $core.withContext(function($ctx1) {
  8840. //>>excludeEnd("ctx");
  8841. var $1;
  8842. $1=self._new();
  8843. $recv($1)._searchReferencesFor_(aString);
  8844. return $recv($1)._open();
  8845. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8846. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.ReferencesBrowser.klass)});
  8847. //>>excludeEnd("ctx");
  8848. },
  8849. //>>excludeStart("ide", pragmas.excludeIdeData);
  8850. args: ["aString"],
  8851. source: "search: aString\x0a\x09^ self new\x0a\x09\x09searchReferencesFor: aString;\x0a\x09\x09open",
  8852. referencedClasses: [],
  8853. //>>excludeEnd("ide");
  8854. messageSends: ["searchReferencesFor:", "new", "open"]
  8855. }),
  8856. $globals.ReferencesBrowser.klass);
  8857. $core.addClass('TestRunner', $globals.TabWidget, ['selectedCategories', 'packagesList', 'selectedClasses', 'classesList', 'selectedMethods', 'progressBar', 'methodsList', 'result', 'statusDiv'], 'IDE');
  8858. $core.addMethod(
  8859. $core.method({
  8860. selector: "allClasses",
  8861. protocol: 'accessing',
  8862. fn: function (){
  8863. var self=this;
  8864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8865. return $core.withContext(function($ctx1) {
  8866. //>>excludeEnd("ctx");
  8867. return $recv($recv($globals.TestCase)._allSubclasses())._select_((function(each){
  8868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8869. return $core.withContext(function($ctx2) {
  8870. //>>excludeEnd("ctx");
  8871. return $recv($recv(each)._isAbstract())._not();
  8872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8873. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8874. //>>excludeEnd("ctx");
  8875. }));
  8876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8877. }, function($ctx1) {$ctx1.fill(self,"allClasses",{},$globals.TestRunner)});
  8878. //>>excludeEnd("ctx");
  8879. },
  8880. //>>excludeStart("ide", pragmas.excludeIdeData);
  8881. args: [],
  8882. source: "allClasses\x0a\x09^ TestCase allSubclasses select: [ :each | each isAbstract not ]",
  8883. referencedClasses: ["TestCase"],
  8884. //>>excludeEnd("ide");
  8885. messageSends: ["select:", "allSubclasses", "not", "isAbstract"]
  8886. }),
  8887. $globals.TestRunner);
  8888. $core.addMethod(
  8889. $core.method({
  8890. selector: "classes",
  8891. protocol: 'accessing',
  8892. fn: function (){
  8893. var self=this;
  8894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8895. return $core.withContext(function($ctx1) {
  8896. //>>excludeEnd("ctx");
  8897. var $1;
  8898. return $recv($recv(self._allClasses())._select_((function(each){
  8899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8900. return $core.withContext(function($ctx2) {
  8901. //>>excludeEnd("ctx");
  8902. return $recv(self._selectedCategories())._includes_($recv(each)._category());
  8903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8904. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8905. //>>excludeEnd("ctx");
  8906. })))._sort_((function(a,b){
  8907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8908. return $core.withContext(function($ctx2) {
  8909. //>>excludeEnd("ctx");
  8910. $1=$recv(a)._name();
  8911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8912. $ctx2.sendIdx["name"]=1;
  8913. //>>excludeEnd("ctx");
  8914. return $recv($1).__gt($recv(b)._name());
  8915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8916. }, function($ctx2) {$ctx2.fillBlock({a:a,b:b},$ctx1,2)});
  8917. //>>excludeEnd("ctx");
  8918. }));
  8919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8920. }, function($ctx1) {$ctx1.fill(self,"classes",{},$globals.TestRunner)});
  8921. //>>excludeEnd("ctx");
  8922. },
  8923. //>>excludeStart("ide", pragmas.excludeIdeData);
  8924. args: [],
  8925. source: "classes\x0a\x09^ (self allClasses\x0a\x09select: [ :each | self selectedCategories includes: each category ])\x0a\x09sort: [ :a :b | a name > b name ]",
  8926. referencedClasses: [],
  8927. //>>excludeEnd("ide");
  8928. messageSends: ["sort:", "select:", "allClasses", "includes:", "selectedCategories", "category", ">", "name"]
  8929. }),
  8930. $globals.TestRunner);
  8931. $core.addMethod(
  8932. $core.method({
  8933. selector: "initialize",
  8934. protocol: 'initialization',
  8935. fn: function (){
  8936. var self=this;
  8937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8938. return $core.withContext(function($ctx1) {
  8939. //>>excludeEnd("ctx");
  8940. (
  8941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8942. $ctx1.supercall = true,
  8943. //>>excludeEnd("ctx");
  8944. ($globals.TestRunner.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  8945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8946. $ctx1.supercall = false;
  8947. //>>excludeEnd("ctx");;
  8948. self["@result"]=$recv($globals.TestResult)._new();
  8949. return self;
  8950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8951. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.TestRunner)});
  8952. //>>excludeEnd("ctx");
  8953. },
  8954. //>>excludeStart("ide", pragmas.excludeIdeData);
  8955. args: [],
  8956. source: "initialize\x0a\x09super initialize.\x0a\x09result := TestResult new",
  8957. referencedClasses: ["TestResult"],
  8958. //>>excludeEnd("ide");
  8959. messageSends: ["initialize", "new"]
  8960. }),
  8961. $globals.TestRunner);
  8962. $core.addMethod(
  8963. $core.method({
  8964. selector: "isSelectedCategory:",
  8965. protocol: 'testing',
  8966. fn: function (aCategory){
  8967. var self=this;
  8968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8969. return $core.withContext(function($ctx1) {
  8970. //>>excludeEnd("ctx");
  8971. return $recv(self._selectedCategories())._includes_(aCategory);
  8972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8973. }, function($ctx1) {$ctx1.fill(self,"isSelectedCategory:",{aCategory:aCategory},$globals.TestRunner)});
  8974. //>>excludeEnd("ctx");
  8975. },
  8976. //>>excludeStart("ide", pragmas.excludeIdeData);
  8977. args: ["aCategory"],
  8978. source: "isSelectedCategory: aCategory\x0a\x09^ (self selectedCategories includes: aCategory)",
  8979. referencedClasses: [],
  8980. //>>excludeEnd("ide");
  8981. messageSends: ["includes:", "selectedCategories"]
  8982. }),
  8983. $globals.TestRunner);
  8984. $core.addMethod(
  8985. $core.method({
  8986. selector: "isSelectedClass:",
  8987. protocol: 'testing',
  8988. fn: function (aClass){
  8989. var self=this;
  8990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8991. return $core.withContext(function($ctx1) {
  8992. //>>excludeEnd("ctx");
  8993. return $recv(self._selectedClasses())._includes_(aClass);
  8994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8995. }, function($ctx1) {$ctx1.fill(self,"isSelectedClass:",{aClass:aClass},$globals.TestRunner)});
  8996. //>>excludeEnd("ctx");
  8997. },
  8998. //>>excludeStart("ide", pragmas.excludeIdeData);
  8999. args: ["aClass"],
  9000. source: "isSelectedClass: aClass\x0a\x09^ (self selectedClasses includes: aClass)",
  9001. referencedClasses: [],
  9002. //>>excludeEnd("ide");
  9003. messageSends: ["includes:", "selectedClasses"]
  9004. }),
  9005. $globals.TestRunner);
  9006. $core.addMethod(
  9007. $core.method({
  9008. selector: "label",
  9009. protocol: 'accessing',
  9010. fn: function (){
  9011. var self=this;
  9012. return "SUnit";
  9013. },
  9014. //>>excludeStart("ide", pragmas.excludeIdeData);
  9015. args: [],
  9016. source: "label\x0a\x09^ 'SUnit'",
  9017. referencedClasses: [],
  9018. //>>excludeEnd("ide");
  9019. messageSends: []
  9020. }),
  9021. $globals.TestRunner);
  9022. $core.addMethod(
  9023. $core.method({
  9024. selector: "packages",
  9025. protocol: 'accessing',
  9026. fn: function (){
  9027. var self=this;
  9028. var packages;
  9029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9030. return $core.withContext(function($ctx1) {
  9031. //>>excludeEnd("ctx");
  9032. var $2,$3,$1;
  9033. packages=$recv($globals.Array)._new();
  9034. $recv(self._allClasses())._do_((function(each){
  9035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9036. return $core.withContext(function($ctx2) {
  9037. //>>excludeEnd("ctx");
  9038. $2=packages;
  9039. $3=$recv(each)._category();
  9040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9041. $ctx2.sendIdx["category"]=1;
  9042. //>>excludeEnd("ctx");
  9043. $1=$recv($2)._includes_($3);
  9044. if(!$core.assert($1)){
  9045. return $recv(packages)._add_($recv(each)._category());
  9046. };
  9047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9048. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9049. //>>excludeEnd("ctx");
  9050. }));
  9051. return $recv(packages)._sort();
  9052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9053. }, function($ctx1) {$ctx1.fill(self,"packages",{packages:packages},$globals.TestRunner)});
  9054. //>>excludeEnd("ctx");
  9055. },
  9056. //>>excludeStart("ide", pragmas.excludeIdeData);
  9057. args: [],
  9058. 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",
  9059. referencedClasses: ["Array"],
  9060. //>>excludeEnd("ide");
  9061. messageSends: ["new", "do:", "allClasses", "ifFalse:", "includes:", "category", "add:", "sort"]
  9062. }),
  9063. $globals.TestRunner);
  9064. $core.addMethod(
  9065. $core.method({
  9066. selector: "performFailure:",
  9067. protocol: 'actions',
  9068. fn: function (aTestCase){
  9069. var self=this;
  9070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9071. return $core.withContext(function($ctx1) {
  9072. //>>excludeEnd("ctx");
  9073. $recv(aTestCase)._runCase();
  9074. return self;
  9075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9076. }, function($ctx1) {$ctx1.fill(self,"performFailure:",{aTestCase:aTestCase},$globals.TestRunner)});
  9077. //>>excludeEnd("ctx");
  9078. },
  9079. //>>excludeStart("ide", pragmas.excludeIdeData);
  9080. args: ["aTestCase"],
  9081. source: "performFailure: aTestCase\x0a\x09aTestCase runCase",
  9082. referencedClasses: [],
  9083. //>>excludeEnd("ide");
  9084. messageSends: ["runCase"]
  9085. }),
  9086. $globals.TestRunner);
  9087. $core.addMethod(
  9088. $core.method({
  9089. selector: "printErrors",
  9090. protocol: 'printing',
  9091. fn: function (){
  9092. var self=this;
  9093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9094. return $core.withContext(function($ctx1) {
  9095. //>>excludeEnd("ctx");
  9096. return $recv($recv($recv($recv(self._result())._errors())._size())._asString()).__comma(" errors, ");
  9097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9098. }, function($ctx1) {$ctx1.fill(self,"printErrors",{},$globals.TestRunner)});
  9099. //>>excludeEnd("ctx");
  9100. },
  9101. //>>excludeStart("ide", pragmas.excludeIdeData);
  9102. args: [],
  9103. source: "printErrors\x0a\x09^ self result errors size asString , ' errors, '",
  9104. referencedClasses: [],
  9105. //>>excludeEnd("ide");
  9106. messageSends: [",", "asString", "size", "errors", "result"]
  9107. }),
  9108. $globals.TestRunner);
  9109. $core.addMethod(
  9110. $core.method({
  9111. selector: "printFailures",
  9112. protocol: 'printing',
  9113. fn: function (){
  9114. var self=this;
  9115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9116. return $core.withContext(function($ctx1) {
  9117. //>>excludeEnd("ctx");
  9118. return $recv($recv($recv($recv(self._result())._failures())._size())._asString()).__comma(" failures");
  9119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9120. }, function($ctx1) {$ctx1.fill(self,"printFailures",{},$globals.TestRunner)});
  9121. //>>excludeEnd("ctx");
  9122. },
  9123. //>>excludeStart("ide", pragmas.excludeIdeData);
  9124. args: [],
  9125. source: "printFailures\x0a\x09^ self result failures size asString, ' failures'",
  9126. referencedClasses: [],
  9127. //>>excludeEnd("ide");
  9128. messageSends: [",", "asString", "size", "failures", "result"]
  9129. }),
  9130. $globals.TestRunner);
  9131. $core.addMethod(
  9132. $core.method({
  9133. selector: "printPasses",
  9134. protocol: 'printing',
  9135. fn: function (){
  9136. var self=this;
  9137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9138. return $core.withContext(function($ctx1) {
  9139. //>>excludeEnd("ctx");
  9140. var $5,$4,$8,$7,$6,$3,$2,$1;
  9141. $5=self._result();
  9142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9143. $ctx1.sendIdx["result"]=1;
  9144. //>>excludeEnd("ctx");
  9145. $4=$recv($5)._runs();
  9146. $8=self._result();
  9147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9148. $ctx1.sendIdx["result"]=2;
  9149. //>>excludeEnd("ctx");
  9150. $7=$recv($8)._errors();
  9151. $6=$recv($7)._size();
  9152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9153. $ctx1.sendIdx["size"]=1;
  9154. //>>excludeEnd("ctx");
  9155. $3=$recv($4).__minus($6);
  9156. $2=$recv($3).__minus($recv($recv(self._result())._failures())._size());
  9157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9158. $ctx1.sendIdx["-"]=1;
  9159. //>>excludeEnd("ctx");
  9160. $1=$recv($2)._asString();
  9161. return $recv($1).__comma(" passes, ");
  9162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9163. }, function($ctx1) {$ctx1.fill(self,"printPasses",{},$globals.TestRunner)});
  9164. //>>excludeEnd("ctx");
  9165. },
  9166. //>>excludeStart("ide", pragmas.excludeIdeData);
  9167. args: [],
  9168. source: "printPasses\x0a\x09^ (self result runs - self result errors size - self result failures size) asString , ' passes, '",
  9169. referencedClasses: [],
  9170. //>>excludeEnd("ide");
  9171. messageSends: [",", "asString", "-", "runs", "result", "size", "errors", "failures"]
  9172. }),
  9173. $globals.TestRunner);
  9174. $core.addMethod(
  9175. $core.method({
  9176. selector: "printTotal",
  9177. protocol: 'printing',
  9178. fn: function (){
  9179. var self=this;
  9180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9181. return $core.withContext(function($ctx1) {
  9182. //>>excludeEnd("ctx");
  9183. return $recv($recv($recv(self._result())._total())._asString()).__comma(" runs, ");
  9184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9185. }, function($ctx1) {$ctx1.fill(self,"printTotal",{},$globals.TestRunner)});
  9186. //>>excludeEnd("ctx");
  9187. },
  9188. //>>excludeStart("ide", pragmas.excludeIdeData);
  9189. args: [],
  9190. source: "printTotal\x0a\x09^ self result total asString, ' runs, '",
  9191. referencedClasses: [],
  9192. //>>excludeEnd("ide");
  9193. messageSends: [",", "asString", "total", "result"]
  9194. }),
  9195. $globals.TestRunner);
  9196. $core.addMethod(
  9197. $core.method({
  9198. selector: "progressBar",
  9199. protocol: 'accessing',
  9200. fn: function (){
  9201. var self=this;
  9202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9203. return $core.withContext(function($ctx1) {
  9204. //>>excludeEnd("ctx");
  9205. var $1,$receiver;
  9206. $1=self["@progressBar"];
  9207. if(($receiver = $1) == null || $receiver.isNil){
  9208. self["@progressBar"]=$recv($globals.ProgressBar)._new();
  9209. return self["@progressBar"];
  9210. } else {
  9211. return $1;
  9212. };
  9213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9214. }, function($ctx1) {$ctx1.fill(self,"progressBar",{},$globals.TestRunner)});
  9215. //>>excludeEnd("ctx");
  9216. },
  9217. //>>excludeStart("ide", pragmas.excludeIdeData);
  9218. args: [],
  9219. source: "progressBar\x0a\x09^ progressBar ifNil: [ progressBar := ProgressBar new ]",
  9220. referencedClasses: ["ProgressBar"],
  9221. //>>excludeEnd("ide");
  9222. messageSends: ["ifNil:", "new"]
  9223. }),
  9224. $globals.TestRunner);
  9225. $core.addMethod(
  9226. $core.method({
  9227. selector: "renderBoxOn:",
  9228. protocol: 'rendering',
  9229. fn: function (html){
  9230. var self=this;
  9231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9232. return $core.withContext(function($ctx1) {
  9233. //>>excludeEnd("ctx");
  9234. self._renderCategoriesOn_(html);
  9235. self._renderClassesOn_(html);
  9236. self._renderResultsOn_(html);
  9237. return self;
  9238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9239. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.TestRunner)});
  9240. //>>excludeEnd("ctx");
  9241. },
  9242. //>>excludeStart("ide", pragmas.excludeIdeData);
  9243. args: ["html"],
  9244. source: "renderBoxOn: html\x0a\x09self\x0a\x09renderCategoriesOn: html;\x0a\x09renderClassesOn: html;\x0a\x09renderResultsOn: html",
  9245. referencedClasses: [],
  9246. //>>excludeEnd("ide");
  9247. messageSends: ["renderCategoriesOn:", "renderClassesOn:", "renderResultsOn:"]
  9248. }),
  9249. $globals.TestRunner);
  9250. $core.addMethod(
  9251. $core.method({
  9252. selector: "renderButtonsOn:",
  9253. protocol: 'rendering',
  9254. fn: function (html){
  9255. var self=this;
  9256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9257. return $core.withContext(function($ctx1) {
  9258. //>>excludeEnd("ctx");
  9259. var $1;
  9260. $1=$recv(html)._button();
  9261. $recv($1)._with_("Run selected");
  9262. $recv($1)._onClick_((function(){
  9263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9264. return $core.withContext(function($ctx2) {
  9265. //>>excludeEnd("ctx");
  9266. return self._run_(self._testCases());
  9267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9268. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9269. //>>excludeEnd("ctx");
  9270. }));
  9271. return self;
  9272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9273. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.TestRunner)});
  9274. //>>excludeEnd("ctx");
  9275. },
  9276. //>>excludeStart("ide", pragmas.excludeIdeData);
  9277. args: ["html"],
  9278. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09with: 'Run selected';\x0a\x09onClick: [ self run: self testCases ]",
  9279. referencedClasses: [],
  9280. //>>excludeEnd("ide");
  9281. messageSends: ["with:", "button", "onClick:", "run:", "testCases"]
  9282. }),
  9283. $globals.TestRunner);
  9284. $core.addMethod(
  9285. $core.method({
  9286. selector: "renderCategoriesOn:",
  9287. protocol: 'rendering',
  9288. fn: function (html){
  9289. var self=this;
  9290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9291. return $core.withContext(function($ctx1) {
  9292. //>>excludeEnd("ctx");
  9293. self["@packagesList"]=$recv($recv(html)._ul())._class_("amber_column sunit packages");
  9294. self._updateCategoriesList();
  9295. return self;
  9296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9297. }, function($ctx1) {$ctx1.fill(self,"renderCategoriesOn:",{html:html},$globals.TestRunner)});
  9298. //>>excludeEnd("ctx");
  9299. },
  9300. //>>excludeStart("ide", pragmas.excludeIdeData);
  9301. args: ["html"],
  9302. source: "renderCategoriesOn: html\x0a\x09packagesList := html ul class: 'amber_column sunit packages'.\x0a\x09self updateCategoriesList",
  9303. referencedClasses: [],
  9304. //>>excludeEnd("ide");
  9305. messageSends: ["class:", "ul", "updateCategoriesList"]
  9306. }),
  9307. $globals.TestRunner);
  9308. $core.addMethod(
  9309. $core.method({
  9310. selector: "renderClassesOn:",
  9311. protocol: 'rendering',
  9312. fn: function (html){
  9313. var self=this;
  9314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9315. return $core.withContext(function($ctx1) {
  9316. //>>excludeEnd("ctx");
  9317. self["@classesList"]=$recv($recv(html)._ul())._class_("amber_column sunit classes");
  9318. self._updateClassesList();
  9319. return self;
  9320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9321. }, function($ctx1) {$ctx1.fill(self,"renderClassesOn:",{html:html},$globals.TestRunner)});
  9322. //>>excludeEnd("ctx");
  9323. },
  9324. //>>excludeStart("ide", pragmas.excludeIdeData);
  9325. args: ["html"],
  9326. source: "renderClassesOn: html\x0a\x09classesList := html ul class: 'amber_column sunit classes'.\x0a\x09self updateClassesList",
  9327. referencedClasses: [],
  9328. //>>excludeEnd("ide");
  9329. messageSends: ["class:", "ul", "updateClassesList"]
  9330. }),
  9331. $globals.TestRunner);
  9332. $core.addMethod(
  9333. $core.method({
  9334. selector: "renderErrorsOn:",
  9335. protocol: 'rendering',
  9336. fn: function (html){
  9337. var self=this;
  9338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9339. return $core.withContext(function($ctx1) {
  9340. //>>excludeEnd("ctx");
  9341. var $1,$2;
  9342. $recv($recv(self._result())._errors())._do_((function(each){
  9343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9344. return $core.withContext(function($ctx2) {
  9345. //>>excludeEnd("ctx");
  9346. $1=$recv(html)._li();
  9347. $recv($1)._class_("errors");
  9348. $2=$recv($recv($recv($recv(each)._class())._name()).__comma(" >> ")).__comma($recv(each)._selector());
  9349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9350. $ctx2.sendIdx[","]=1;
  9351. //>>excludeEnd("ctx");
  9352. $recv($1)._with_($2);
  9353. return $recv($1)._onClick_((function(){
  9354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9355. return $core.withContext(function($ctx3) {
  9356. //>>excludeEnd("ctx");
  9357. return self._performFailure_(each);
  9358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9359. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9360. //>>excludeEnd("ctx");
  9361. }));
  9362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9363. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9364. //>>excludeEnd("ctx");
  9365. }));
  9366. return self;
  9367. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9368. }, function($ctx1) {$ctx1.fill(self,"renderErrorsOn:",{html:html},$globals.TestRunner)});
  9369. //>>excludeEnd("ctx");
  9370. },
  9371. //>>excludeStart("ide", pragmas.excludeIdeData);
  9372. args: ["html"],
  9373. 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 ]]",
  9374. referencedClasses: [],
  9375. //>>excludeEnd("ide");
  9376. messageSends: ["do:", "errors", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"]
  9377. }),
  9378. $globals.TestRunner);
  9379. $core.addMethod(
  9380. $core.method({
  9381. selector: "renderFailuresOn:",
  9382. protocol: 'rendering',
  9383. fn: function (html){
  9384. var self=this;
  9385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9386. return $core.withContext(function($ctx1) {
  9387. //>>excludeEnd("ctx");
  9388. var $1,$2;
  9389. $recv($recv(self._result())._failures())._do_((function(each){
  9390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9391. return $core.withContext(function($ctx2) {
  9392. //>>excludeEnd("ctx");
  9393. $1=$recv(html)._li();
  9394. $recv($1)._class_("failures");
  9395. $2=$recv($recv($recv($recv(each)._class())._name()).__comma(" >> ")).__comma($recv(each)._selector());
  9396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9397. $ctx2.sendIdx[","]=1;
  9398. //>>excludeEnd("ctx");
  9399. $recv($1)._with_($2);
  9400. return $recv($1)._onClick_((function(){
  9401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9402. return $core.withContext(function($ctx3) {
  9403. //>>excludeEnd("ctx");
  9404. return self._performFailure_(each);
  9405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9406. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9407. //>>excludeEnd("ctx");
  9408. }));
  9409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9410. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9411. //>>excludeEnd("ctx");
  9412. }));
  9413. return self;
  9414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9415. }, function($ctx1) {$ctx1.fill(self,"renderFailuresOn:",{html:html},$globals.TestRunner)});
  9416. //>>excludeEnd("ctx");
  9417. },
  9418. //>>excludeStart("ide", pragmas.excludeIdeData);
  9419. args: ["html"],
  9420. 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 ]]",
  9421. referencedClasses: [],
  9422. //>>excludeEnd("ide");
  9423. messageSends: ["do:", "failures", "result", "class:", "li", "with:", ",", "name", "class", "selector", "onClick:", "performFailure:"]
  9424. }),
  9425. $globals.TestRunner);
  9426. $core.addMethod(
  9427. $core.method({
  9428. selector: "renderResultsOn:",
  9429. protocol: 'rendering',
  9430. fn: function (html){
  9431. var self=this;
  9432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9433. return $core.withContext(function($ctx1) {
  9434. //>>excludeEnd("ctx");
  9435. self["@statusDiv"]=$recv(html)._div();
  9436. $recv(html)._with_(self._progressBar());
  9437. self["@methodsList"]=$recv($recv(html)._ul())._class_("amber_column sunit results");
  9438. self._updateMethodsList();
  9439. self._updateStatusDiv();
  9440. return self;
  9441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9442. }, function($ctx1) {$ctx1.fill(self,"renderResultsOn:",{html:html},$globals.TestRunner)});
  9443. //>>excludeEnd("ctx");
  9444. },
  9445. //>>excludeStart("ide", pragmas.excludeIdeData);
  9446. args: ["html"],
  9447. 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",
  9448. referencedClasses: [],
  9449. //>>excludeEnd("ide");
  9450. messageSends: ["div", "with:", "progressBar", "class:", "ul", "updateMethodsList", "updateStatusDiv"]
  9451. }),
  9452. $globals.TestRunner);
  9453. $core.addMethod(
  9454. $core.method({
  9455. selector: "result",
  9456. protocol: 'accessing',
  9457. fn: function (){
  9458. var self=this;
  9459. return self["@result"];
  9460. },
  9461. //>>excludeStart("ide", pragmas.excludeIdeData);
  9462. args: [],
  9463. source: "result\x0a\x09^ result",
  9464. referencedClasses: [],
  9465. //>>excludeEnd("ide");
  9466. messageSends: []
  9467. }),
  9468. $globals.TestRunner);
  9469. $core.addMethod(
  9470. $core.method({
  9471. selector: "run:",
  9472. protocol: 'actions',
  9473. fn: function (aCollection){
  9474. var self=this;
  9475. var worker;
  9476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9477. return $core.withContext(function($ctx1) {
  9478. //>>excludeEnd("ctx");
  9479. var $1;
  9480. worker=$recv($globals.TestSuiteRunner)._on_(aCollection);
  9481. self["@result"]=$recv(worker)._result();
  9482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9483. $ctx1.sendIdx["result"]=1;
  9484. //>>excludeEnd("ctx");
  9485. $recv($recv(worker)._announcer())._on_do_($globals.ResultAnnouncement,(function(ann){
  9486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9487. return $core.withContext(function($ctx2) {
  9488. //>>excludeEnd("ctx");
  9489. $1=$recv($recv(ann)._result()).__eq_eq(self["@result"]);
  9490. if($core.assert($1)){
  9491. $recv(self._progressBar())._updatePercent_($recv($recv($recv(self["@result"])._runs()).__slash($recv(self["@result"])._total())).__star((100)));
  9492. self._updateStatusDiv();
  9493. return self._updateMethodsList();
  9494. };
  9495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9496. }, function($ctx2) {$ctx2.fillBlock({ann:ann},$ctx1,1)});
  9497. //>>excludeEnd("ctx");
  9498. }));
  9499. $recv(worker)._run();
  9500. return self;
  9501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9502. }, function($ctx1) {$ctx1.fill(self,"run:",{aCollection:aCollection,worker:worker},$globals.TestRunner)});
  9503. //>>excludeEnd("ctx");
  9504. },
  9505. //>>excludeStart("ide", pragmas.excludeIdeData);
  9506. args: ["aCollection"],
  9507. 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",
  9508. referencedClasses: ["TestSuiteRunner", "ResultAnnouncement"],
  9509. //>>excludeEnd("ide");
  9510. messageSends: ["on:", "result", "on:do:", "announcer", "ifTrue:", "==", "updatePercent:", "progressBar", "*", "/", "runs", "total", "updateStatusDiv", "updateMethodsList", "run"]
  9511. }),
  9512. $globals.TestRunner);
  9513. $core.addMethod(
  9514. $core.method({
  9515. selector: "selectAllCategories",
  9516. protocol: 'actions',
  9517. fn: function (){
  9518. var self=this;
  9519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9520. return $core.withContext(function($ctx1) {
  9521. //>>excludeEnd("ctx");
  9522. var $1;
  9523. $recv(self._packages())._do_((function(each){
  9524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9525. return $core.withContext(function($ctx2) {
  9526. //>>excludeEnd("ctx");
  9527. $1=$recv(self["@selectedCategories"])._includes_(each);
  9528. if(!$core.assert($1)){
  9529. return $recv(self._selectedCategories())._add_(each);
  9530. };
  9531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9532. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9533. //>>excludeEnd("ctx");
  9534. }));
  9535. self._updateCategoriesList();
  9536. self._updateClassesList();
  9537. return self;
  9538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9539. }, function($ctx1) {$ctx1.fill(self,"selectAllCategories",{},$globals.TestRunner)});
  9540. //>>excludeEnd("ctx");
  9541. },
  9542. //>>excludeStart("ide", pragmas.excludeIdeData);
  9543. args: [],
  9544. 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",
  9545. referencedClasses: [],
  9546. //>>excludeEnd("ide");
  9547. messageSends: ["do:", "packages", "ifFalse:", "includes:", "add:", "selectedCategories", "updateCategoriesList", "updateClassesList"]
  9548. }),
  9549. $globals.TestRunner);
  9550. $core.addMethod(
  9551. $core.method({
  9552. selector: "selectAllClasses",
  9553. protocol: 'actions',
  9554. fn: function (){
  9555. var self=this;
  9556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9557. return $core.withContext(function($ctx1) {
  9558. //>>excludeEnd("ctx");
  9559. var $1;
  9560. $recv(self._classes())._do_((function(each){
  9561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9562. return $core.withContext(function($ctx2) {
  9563. //>>excludeEnd("ctx");
  9564. $1=$recv(self["@selectedClasses"])._includes_(each);
  9565. if(!$core.assert($1)){
  9566. return $recv(self._selectedClasses())._add_(each);
  9567. };
  9568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9569. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9570. //>>excludeEnd("ctx");
  9571. }));
  9572. self._updateCategoriesList();
  9573. self._updateClassesList();
  9574. return self;
  9575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9576. }, function($ctx1) {$ctx1.fill(self,"selectAllClasses",{},$globals.TestRunner)});
  9577. //>>excludeEnd("ctx");
  9578. },
  9579. //>>excludeStart("ide", pragmas.excludeIdeData);
  9580. args: [],
  9581. 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",
  9582. referencedClasses: [],
  9583. //>>excludeEnd("ide");
  9584. messageSends: ["do:", "classes", "ifFalse:", "includes:", "add:", "selectedClasses", "updateCategoriesList", "updateClassesList"]
  9585. }),
  9586. $globals.TestRunner);
  9587. $core.addMethod(
  9588. $core.method({
  9589. selector: "selectedCategories",
  9590. protocol: 'accessing',
  9591. fn: function (){
  9592. var self=this;
  9593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9594. return $core.withContext(function($ctx1) {
  9595. //>>excludeEnd("ctx");
  9596. var $1,$receiver;
  9597. $1=self["@selectedCategories"];
  9598. if(($receiver = $1) == null || $receiver.isNil){
  9599. self["@selectedCategories"]=$recv($globals.Array)._new();
  9600. return self["@selectedCategories"];
  9601. } else {
  9602. return $1;
  9603. };
  9604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9605. }, function($ctx1) {$ctx1.fill(self,"selectedCategories",{},$globals.TestRunner)});
  9606. //>>excludeEnd("ctx");
  9607. },
  9608. //>>excludeStart("ide", pragmas.excludeIdeData);
  9609. args: [],
  9610. source: "selectedCategories\x0a\x09^ selectedCategories ifNil: [ selectedCategories := Array new ]",
  9611. referencedClasses: ["Array"],
  9612. //>>excludeEnd("ide");
  9613. messageSends: ["ifNil:", "new"]
  9614. }),
  9615. $globals.TestRunner);
  9616. $core.addMethod(
  9617. $core.method({
  9618. selector: "selectedClasses",
  9619. protocol: 'accessing',
  9620. fn: function (){
  9621. var self=this;
  9622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9623. return $core.withContext(function($ctx1) {
  9624. //>>excludeEnd("ctx");
  9625. var $1,$receiver;
  9626. $1=self["@selectedClasses"];
  9627. if(($receiver = $1) == null || $receiver.isNil){
  9628. self["@selectedClasses"]=$recv($globals.Array)._new();
  9629. return self["@selectedClasses"];
  9630. } else {
  9631. return $1;
  9632. };
  9633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9634. }, function($ctx1) {$ctx1.fill(self,"selectedClasses",{},$globals.TestRunner)});
  9635. //>>excludeEnd("ctx");
  9636. },
  9637. //>>excludeStart("ide", pragmas.excludeIdeData);
  9638. args: [],
  9639. source: "selectedClasses\x0a\x09^ selectedClasses ifNil: [ selectedClasses := Array new ]",
  9640. referencedClasses: ["Array"],
  9641. //>>excludeEnd("ide");
  9642. messageSends: ["ifNil:", "new"]
  9643. }),
  9644. $globals.TestRunner);
  9645. $core.addMethod(
  9646. $core.method({
  9647. selector: "statusInfo",
  9648. protocol: 'accessing',
  9649. fn: function (){
  9650. var self=this;
  9651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9652. return $core.withContext(function($ctx1) {
  9653. //>>excludeEnd("ctx");
  9654. var $2,$1;
  9655. $2=$recv($recv(self._printTotal()).__comma(self._printPasses())).__comma(self._printErrors());
  9656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9657. $ctx1.sendIdx[","]=2;
  9658. //>>excludeEnd("ctx");
  9659. $1=$recv($2).__comma(self._printFailures());
  9660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9661. $ctx1.sendIdx[","]=1;
  9662. //>>excludeEnd("ctx");
  9663. return $1;
  9664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9665. }, function($ctx1) {$ctx1.fill(self,"statusInfo",{},$globals.TestRunner)});
  9666. //>>excludeEnd("ctx");
  9667. },
  9668. //>>excludeStart("ide", pragmas.excludeIdeData);
  9669. args: [],
  9670. source: "statusInfo\x0a\x09^ self printTotal, self printPasses, self printErrors, self printFailures",
  9671. referencedClasses: [],
  9672. //>>excludeEnd("ide");
  9673. messageSends: [",", "printTotal", "printPasses", "printErrors", "printFailures"]
  9674. }),
  9675. $globals.TestRunner);
  9676. $core.addMethod(
  9677. $core.method({
  9678. selector: "testCases",
  9679. protocol: 'accessing',
  9680. fn: function (){
  9681. var self=this;
  9682. var testCases;
  9683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9684. return $core.withContext(function($ctx1) {
  9685. //>>excludeEnd("ctx");
  9686. testCases=[];
  9687. $recv($recv(self._selectedClasses())._select_((function(each){
  9688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9689. return $core.withContext(function($ctx2) {
  9690. //>>excludeEnd("ctx");
  9691. return $recv(self._selectedCategories())._includes_($recv(each)._category());
  9692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9693. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9694. //>>excludeEnd("ctx");
  9695. })))._do_((function(each){
  9696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9697. return $core.withContext(function($ctx2) {
  9698. //>>excludeEnd("ctx");
  9699. return $recv(testCases)._addAll_($recv(each)._buildSuite());
  9700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9701. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  9702. //>>excludeEnd("ctx");
  9703. }));
  9704. return testCases;
  9705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9706. }, function($ctx1) {$ctx1.fill(self,"testCases",{testCases:testCases},$globals.TestRunner)});
  9707. //>>excludeEnd("ctx");
  9708. },
  9709. //>>excludeStart("ide", pragmas.excludeIdeData);
  9710. args: [],
  9711. 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",
  9712. referencedClasses: [],
  9713. //>>excludeEnd("ide");
  9714. messageSends: ["do:", "select:", "selectedClasses", "includes:", "selectedCategories", "category", "addAll:", "buildSuite"]
  9715. }),
  9716. $globals.TestRunner);
  9717. $core.addMethod(
  9718. $core.method({
  9719. selector: "toggleCategory:",
  9720. protocol: 'actions',
  9721. fn: function (aCategory){
  9722. var self=this;
  9723. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9724. return $core.withContext(function($ctx1) {
  9725. //>>excludeEnd("ctx");
  9726. var $1;
  9727. $1=self._isSelectedCategory_(aCategory);
  9728. if($core.assert($1)){
  9729. $recv(self["@selectedCategories"])._remove_(aCategory);
  9730. } else {
  9731. $recv(self["@selectedCategories"])._add_(aCategory);
  9732. };
  9733. self._updateCategoriesList();
  9734. self._updateClassesList();
  9735. return self;
  9736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9737. }, function($ctx1) {$ctx1.fill(self,"toggleCategory:",{aCategory:aCategory},$globals.TestRunner)});
  9738. //>>excludeEnd("ctx");
  9739. },
  9740. //>>excludeStart("ide", pragmas.excludeIdeData);
  9741. args: ["aCategory"],
  9742. 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",
  9743. referencedClasses: [],
  9744. //>>excludeEnd("ide");
  9745. messageSends: ["ifFalse:ifTrue:", "isSelectedCategory:", "add:", "remove:", "updateCategoriesList", "updateClassesList"]
  9746. }),
  9747. $globals.TestRunner);
  9748. $core.addMethod(
  9749. $core.method({
  9750. selector: "toggleClass:",
  9751. protocol: 'actions',
  9752. fn: function (aClass){
  9753. var self=this;
  9754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9755. return $core.withContext(function($ctx1) {
  9756. //>>excludeEnd("ctx");
  9757. var $1;
  9758. $1=self._isSelectedClass_(aClass);
  9759. if($core.assert($1)){
  9760. $recv(self["@selectedClasses"])._remove_(aClass);
  9761. } else {
  9762. $recv(self["@selectedClasses"])._add_(aClass);
  9763. };
  9764. self._updateClassesList();
  9765. return self;
  9766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9767. }, function($ctx1) {$ctx1.fill(self,"toggleClass:",{aClass:aClass},$globals.TestRunner)});
  9768. //>>excludeEnd("ctx");
  9769. },
  9770. //>>excludeStart("ide", pragmas.excludeIdeData);
  9771. args: ["aClass"],
  9772. 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",
  9773. referencedClasses: [],
  9774. //>>excludeEnd("ide");
  9775. messageSends: ["ifFalse:ifTrue:", "isSelectedClass:", "add:", "remove:", "updateClassesList"]
  9776. }),
  9777. $globals.TestRunner);
  9778. $core.addMethod(
  9779. $core.method({
  9780. selector: "updateCategoriesList",
  9781. protocol: 'updating',
  9782. fn: function (){
  9783. var self=this;
  9784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9785. return $core.withContext(function($ctx1) {
  9786. //>>excludeEnd("ctx");
  9787. var $1,$2,$3,$4;
  9788. $recv(self["@packagesList"])._contents_((function(html){
  9789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9790. return $core.withContext(function($ctx2) {
  9791. //>>excludeEnd("ctx");
  9792. $1=$recv(html)._li();
  9793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9794. $ctx2.sendIdx["li"]=1;
  9795. //>>excludeEnd("ctx");
  9796. $recv($1)._class_("all");
  9797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9798. $ctx2.sendIdx["class:"]=1;
  9799. //>>excludeEnd("ctx");
  9800. $recv($1)._with_("All");
  9801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9802. $ctx2.sendIdx["with:"]=1;
  9803. //>>excludeEnd("ctx");
  9804. $2=$recv($1)._onClick_((function(){
  9805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9806. return $core.withContext(function($ctx3) {
  9807. //>>excludeEnd("ctx");
  9808. return self._selectAllCategories();
  9809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9810. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9811. //>>excludeEnd("ctx");
  9812. }));
  9813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9814. $ctx2.sendIdx["onClick:"]=1;
  9815. //>>excludeEnd("ctx");
  9816. $2;
  9817. return $recv(self._packages())._do_((function(each){
  9818. var li;
  9819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9820. return $core.withContext(function($ctx3) {
  9821. //>>excludeEnd("ctx");
  9822. li=$recv(html)._li();
  9823. li;
  9824. $3=$recv(self._selectedCategories())._includes_(each);
  9825. if($core.assert($3)){
  9826. $recv(li)._class_("selected");
  9827. };
  9828. $4=li;
  9829. $recv($4)._with_(each);
  9830. return $recv($4)._onClick_((function(){
  9831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9832. return $core.withContext(function($ctx4) {
  9833. //>>excludeEnd("ctx");
  9834. return self._toggleCategory_(each);
  9835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9836. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9837. //>>excludeEnd("ctx");
  9838. }));
  9839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9840. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,3)});
  9841. //>>excludeEnd("ctx");
  9842. }));
  9843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9844. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9845. //>>excludeEnd("ctx");
  9846. }));
  9847. return self;
  9848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9849. }, function($ctx1) {$ctx1.fill(self,"updateCategoriesList",{},$globals.TestRunner)});
  9850. //>>excludeEnd("ctx");
  9851. },
  9852. //>>excludeStart("ide", pragmas.excludeIdeData);
  9853. args: [],
  9854. 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 ]] ]",
  9855. referencedClasses: [],
  9856. //>>excludeEnd("ide");
  9857. messageSends: ["contents:", "class:", "li", "with:", "onClick:", "selectAllCategories", "do:", "packages", "ifTrue:", "includes:", "selectedCategories", "toggleCategory:"]
  9858. }),
  9859. $globals.TestRunner);
  9860. $core.addMethod(
  9861. $core.method({
  9862. selector: "updateClassesList",
  9863. protocol: 'updating',
  9864. fn: function (){
  9865. var self=this;
  9866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9867. return $core.withContext(function($ctx1) {
  9868. //>>excludeEnd("ctx");
  9869. var $1,$2,$3,$4,$5;
  9870. $recv(self["@classesList"])._contents_((function(html){
  9871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9872. return $core.withContext(function($ctx2) {
  9873. //>>excludeEnd("ctx");
  9874. $1=$recv(self._selectedCategories())._isEmpty();
  9875. if(!$core.assert($1)){
  9876. $2=$recv(html)._li();
  9877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9878. $ctx2.sendIdx["li"]=1;
  9879. //>>excludeEnd("ctx");
  9880. $recv($2)._class_("all");
  9881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9882. $ctx2.sendIdx["class:"]=1;
  9883. //>>excludeEnd("ctx");
  9884. $recv($2)._with_("All");
  9885. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9886. $ctx2.sendIdx["with:"]=1;
  9887. //>>excludeEnd("ctx");
  9888. $3=$recv($2)._onClick_((function(){
  9889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9890. return $core.withContext(function($ctx3) {
  9891. //>>excludeEnd("ctx");
  9892. return self._selectAllClasses();
  9893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9894. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  9895. //>>excludeEnd("ctx");
  9896. }));
  9897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9898. $ctx2.sendIdx["onClick:"]=1;
  9899. //>>excludeEnd("ctx");
  9900. $3;
  9901. };
  9902. return $recv(self._classes())._do_((function(each){
  9903. var li;
  9904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9905. return $core.withContext(function($ctx3) {
  9906. //>>excludeEnd("ctx");
  9907. li=$recv(html)._li();
  9908. li;
  9909. $4=$recv(self._selectedClasses())._includes_(each);
  9910. if($core.assert($4)){
  9911. $recv(li)._class_("selected");
  9912. };
  9913. $5=li;
  9914. $recv($5)._with_($recv(each)._name());
  9915. return $recv($5)._onClick_((function(){
  9916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9917. return $core.withContext(function($ctx4) {
  9918. //>>excludeEnd("ctx");
  9919. return self._toggleClass_(each);
  9920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9921. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,6)});
  9922. //>>excludeEnd("ctx");
  9923. }));
  9924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9925. }, function($ctx3) {$ctx3.fillBlock({each:each,li:li},$ctx2,4)});
  9926. //>>excludeEnd("ctx");
  9927. }));
  9928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9929. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9930. //>>excludeEnd("ctx");
  9931. }));
  9932. return self;
  9933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9934. }, function($ctx1) {$ctx1.fill(self,"updateClassesList",{},$globals.TestRunner)});
  9935. //>>excludeEnd("ctx");
  9936. },
  9937. //>>excludeStart("ide", pragmas.excludeIdeData);
  9938. args: [],
  9939. source: "updateClassesList\x0a\x09classesList contents: [ :html |\x0a\x09(self selectedCategories isEmpty) ifFalse: [\x0a\x09\x09html li\x0a\x09\x09\x09class: 'all';\x0a\x09\x09\x09with: 'All';\x0a\x09\x09\x09onClick: [ self selectAllClasses ]].\x0a\x09self classes do: [ :each || li |\x0a\x09\x09li := html li.\x0a\x09\x09(self selectedClasses includes: each) ifTrue: [\x0a\x09\x09\x09li class: 'selected' ].\x0a\x09\x09li\x0a\x09\x09\x09with: each name;\x0a\x09\x09\x09onClick: [ self toggleClass: each ]] ]",
  9940. referencedClasses: [],
  9941. //>>excludeEnd("ide");
  9942. messageSends: ["contents:", "ifFalse:", "isEmpty", "selectedCategories", "class:", "li", "with:", "onClick:", "selectAllClasses", "do:", "classes", "ifTrue:", "includes:", "selectedClasses", "name", "toggleClass:"]
  9943. }),
  9944. $globals.TestRunner);
  9945. $core.addMethod(
  9946. $core.method({
  9947. selector: "updateMethodsList",
  9948. protocol: 'updating',
  9949. fn: function (){
  9950. var self=this;
  9951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9952. return $core.withContext(function($ctx1) {
  9953. //>>excludeEnd("ctx");
  9954. $recv(self["@methodsList"])._contents_((function(html){
  9955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9956. return $core.withContext(function($ctx2) {
  9957. //>>excludeEnd("ctx");
  9958. self._renderErrorsOn_(html);
  9959. return self._renderFailuresOn_(html);
  9960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9961. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9962. //>>excludeEnd("ctx");
  9963. }));
  9964. return self;
  9965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9966. }, function($ctx1) {$ctx1.fill(self,"updateMethodsList",{},$globals.TestRunner)});
  9967. //>>excludeEnd("ctx");
  9968. },
  9969. //>>excludeStart("ide", pragmas.excludeIdeData);
  9970. args: [],
  9971. source: "updateMethodsList\x0a\x09methodsList contents: [ :html |\x0a\x09\x09self renderErrorsOn: html.\x0a\x09\x09\x09\x09self renderFailuresOn: html ]",
  9972. referencedClasses: [],
  9973. //>>excludeEnd("ide");
  9974. messageSends: ["contents:", "renderErrorsOn:", "renderFailuresOn:"]
  9975. }),
  9976. $globals.TestRunner);
  9977. $core.addMethod(
  9978. $core.method({
  9979. selector: "updateStatusDiv",
  9980. protocol: 'updating',
  9981. fn: function (){
  9982. var self=this;
  9983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9984. return $core.withContext(function($ctx1) {
  9985. //>>excludeEnd("ctx");
  9986. $recv(self["@statusDiv"])._class_("sunit status ".__comma($recv(self["@result"])._status()));
  9987. $recv(self["@statusDiv"])._contents_((function(html){
  9988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9989. return $core.withContext(function($ctx2) {
  9990. //>>excludeEnd("ctx");
  9991. return $recv($recv(html)._span())._with_(self._statusInfo());
  9992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9993. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9994. //>>excludeEnd("ctx");
  9995. }));
  9996. return self;
  9997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9998. }, function($ctx1) {$ctx1.fill(self,"updateStatusDiv",{},$globals.TestRunner)});
  9999. //>>excludeEnd("ctx");
  10000. },
  10001. //>>excludeStart("ide", pragmas.excludeIdeData);
  10002. args: [],
  10003. source: "updateStatusDiv\x0a\x09statusDiv class: 'sunit status ', result status.\x0a\x09statusDiv contents: [ :html |\x0a\x09\x09html span with: self statusInfo ]",
  10004. referencedClasses: [],
  10005. //>>excludeEnd("ide");
  10006. messageSends: ["class:", ",", "status", "contents:", "with:", "span", "statusInfo"]
  10007. }),
  10008. $globals.TestRunner);
  10009. $core.addClass('Workspace', $globals.TabWidget, ['sourceArea'], 'IDE');
  10010. $core.addMethod(
  10011. $core.method({
  10012. selector: "clearWorkspace",
  10013. protocol: 'actions',
  10014. fn: function (){
  10015. var self=this;
  10016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10017. return $core.withContext(function($ctx1) {
  10018. //>>excludeEnd("ctx");
  10019. $recv(self["@sourceArea"])._clear();
  10020. return self;
  10021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10022. }, function($ctx1) {$ctx1.fill(self,"clearWorkspace",{},$globals.Workspace)});
  10023. //>>excludeEnd("ctx");
  10024. },
  10025. //>>excludeStart("ide", pragmas.excludeIdeData);
  10026. args: [],
  10027. source: "clearWorkspace\x0a\x09sourceArea clear",
  10028. referencedClasses: [],
  10029. //>>excludeEnd("ide");
  10030. messageSends: ["clear"]
  10031. }),
  10032. $globals.Workspace);
  10033. $core.addMethod(
  10034. $core.method({
  10035. selector: "doIt",
  10036. protocol: 'actions',
  10037. fn: function (){
  10038. var self=this;
  10039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10040. return $core.withContext(function($ctx1) {
  10041. //>>excludeEnd("ctx");
  10042. $recv(self["@sourceArea"])._doIt();
  10043. return self;
  10044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10045. }, function($ctx1) {$ctx1.fill(self,"doIt",{},$globals.Workspace)});
  10046. //>>excludeEnd("ctx");
  10047. },
  10048. //>>excludeStart("ide", pragmas.excludeIdeData);
  10049. args: [],
  10050. source: "doIt\x0a\x09sourceArea doIt",
  10051. referencedClasses: [],
  10052. //>>excludeEnd("ide");
  10053. messageSends: ["doIt"]
  10054. }),
  10055. $globals.Workspace);
  10056. $core.addMethod(
  10057. $core.method({
  10058. selector: "fileIn",
  10059. protocol: 'actions',
  10060. fn: function (){
  10061. var self=this;
  10062. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10063. return $core.withContext(function($ctx1) {
  10064. //>>excludeEnd("ctx");
  10065. $recv(self["@sourceArea"])._fileIn();
  10066. return self;
  10067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10068. }, function($ctx1) {$ctx1.fill(self,"fileIn",{},$globals.Workspace)});
  10069. //>>excludeEnd("ctx");
  10070. },
  10071. //>>excludeStart("ide", pragmas.excludeIdeData);
  10072. args: [],
  10073. source: "fileIn\x0a\x09sourceArea fileIn",
  10074. referencedClasses: [],
  10075. //>>excludeEnd("ide");
  10076. messageSends: ["fileIn"]
  10077. }),
  10078. $globals.Workspace);
  10079. $core.addMethod(
  10080. $core.method({
  10081. selector: "inspectIt",
  10082. protocol: 'actions',
  10083. fn: function (){
  10084. var self=this;
  10085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10086. return $core.withContext(function($ctx1) {
  10087. //>>excludeEnd("ctx");
  10088. $recv(self["@sourceArea"])._inspectIt();
  10089. return self;
  10090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10091. }, function($ctx1) {$ctx1.fill(self,"inspectIt",{},$globals.Workspace)});
  10092. //>>excludeEnd("ctx");
  10093. },
  10094. //>>excludeStart("ide", pragmas.excludeIdeData);
  10095. args: [],
  10096. source: "inspectIt\x0a\x09sourceArea inspectIt",
  10097. referencedClasses: [],
  10098. //>>excludeEnd("ide");
  10099. messageSends: ["inspectIt"]
  10100. }),
  10101. $globals.Workspace);
  10102. $core.addMethod(
  10103. $core.method({
  10104. selector: "label",
  10105. protocol: 'accessing',
  10106. fn: function (){
  10107. var self=this;
  10108. return "Workspace";
  10109. },
  10110. //>>excludeStart("ide", pragmas.excludeIdeData);
  10111. args: [],
  10112. source: "label\x0a\x09^ 'Workspace'",
  10113. referencedClasses: [],
  10114. //>>excludeEnd("ide");
  10115. messageSends: []
  10116. }),
  10117. $globals.Workspace);
  10118. $core.addMethod(
  10119. $core.method({
  10120. selector: "printIt",
  10121. protocol: 'actions',
  10122. fn: function (){
  10123. var self=this;
  10124. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10125. return $core.withContext(function($ctx1) {
  10126. //>>excludeEnd("ctx");
  10127. $recv(self["@sourceArea"])._printIt();
  10128. return self;
  10129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10130. }, function($ctx1) {$ctx1.fill(self,"printIt",{},$globals.Workspace)});
  10131. //>>excludeEnd("ctx");
  10132. },
  10133. //>>excludeStart("ide", pragmas.excludeIdeData);
  10134. args: [],
  10135. source: "printIt\x0a\x09sourceArea printIt",
  10136. referencedClasses: [],
  10137. //>>excludeEnd("ide");
  10138. messageSends: ["printIt"]
  10139. }),
  10140. $globals.Workspace);
  10141. $core.addMethod(
  10142. $core.method({
  10143. selector: "renderBoxOn:",
  10144. protocol: 'rendering',
  10145. fn: function (html){
  10146. var self=this;
  10147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10148. return $core.withContext(function($ctx1) {
  10149. //>>excludeEnd("ctx");
  10150. self["@sourceArea"]=$recv($globals.SourceArea)._new();
  10151. $recv(self["@sourceArea"])._renderOn_(html);
  10152. return self;
  10153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10154. }, function($ctx1) {$ctx1.fill(self,"renderBoxOn:",{html:html},$globals.Workspace)});
  10155. //>>excludeEnd("ctx");
  10156. },
  10157. //>>excludeStart("ide", pragmas.excludeIdeData);
  10158. args: ["html"],
  10159. source: "renderBoxOn: html\x0a\x09sourceArea := SourceArea new.\x0a\x09sourceArea renderOn: html",
  10160. referencedClasses: ["SourceArea"],
  10161. //>>excludeEnd("ide");
  10162. messageSends: ["new", "renderOn:"]
  10163. }),
  10164. $globals.Workspace);
  10165. $core.addMethod(
  10166. $core.method({
  10167. selector: "renderButtonsOn:",
  10168. protocol: 'rendering',
  10169. fn: function (html){
  10170. var self=this;
  10171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10172. return $core.withContext(function($ctx1) {
  10173. //>>excludeEnd("ctx");
  10174. var $1,$2,$3,$4,$5,$6,$7,$8,$9;
  10175. $1=$recv(html)._button();
  10176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10177. $ctx1.sendIdx["button"]=1;
  10178. //>>excludeEnd("ctx");
  10179. $recv($1)._with_("DoIt");
  10180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10181. $ctx1.sendIdx["with:"]=1;
  10182. //>>excludeEnd("ctx");
  10183. $recv($1)._title_("ctrl+d");
  10184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10185. $ctx1.sendIdx["title:"]=1;
  10186. //>>excludeEnd("ctx");
  10187. $2=$recv($1)._onClick_((function(){
  10188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10189. return $core.withContext(function($ctx2) {
  10190. //>>excludeEnd("ctx");
  10191. return self._doIt();
  10192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10193. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10194. //>>excludeEnd("ctx");
  10195. }));
  10196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10197. $ctx1.sendIdx["onClick:"]=1;
  10198. //>>excludeEnd("ctx");
  10199. $3=$recv(html)._button();
  10200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10201. $ctx1.sendIdx["button"]=2;
  10202. //>>excludeEnd("ctx");
  10203. $recv($3)._with_("PrintIt");
  10204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10205. $ctx1.sendIdx["with:"]=2;
  10206. //>>excludeEnd("ctx");
  10207. $recv($3)._title_("ctrl+p");
  10208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10209. $ctx1.sendIdx["title:"]=2;
  10210. //>>excludeEnd("ctx");
  10211. $4=$recv($3)._onClick_((function(){
  10212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10213. return $core.withContext(function($ctx2) {
  10214. //>>excludeEnd("ctx");
  10215. return self._printIt();
  10216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10217. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10218. //>>excludeEnd("ctx");
  10219. }));
  10220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10221. $ctx1.sendIdx["onClick:"]=2;
  10222. //>>excludeEnd("ctx");
  10223. $5=$recv(html)._button();
  10224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10225. $ctx1.sendIdx["button"]=3;
  10226. //>>excludeEnd("ctx");
  10227. $recv($5)._with_("InspectIt");
  10228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10229. $ctx1.sendIdx["with:"]=3;
  10230. //>>excludeEnd("ctx");
  10231. $recv($5)._title_("ctrl+i");
  10232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10233. $ctx1.sendIdx["title:"]=3;
  10234. //>>excludeEnd("ctx");
  10235. $6=$recv($5)._onClick_((function(){
  10236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10237. return $core.withContext(function($ctx2) {
  10238. //>>excludeEnd("ctx");
  10239. return self._inspectIt();
  10240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10241. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10242. //>>excludeEnd("ctx");
  10243. }));
  10244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10245. $ctx1.sendIdx["onClick:"]=3;
  10246. //>>excludeEnd("ctx");
  10247. $7=$recv(html)._button();
  10248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10249. $ctx1.sendIdx["button"]=4;
  10250. //>>excludeEnd("ctx");
  10251. $recv($7)._with_("FileIn");
  10252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10253. $ctx1.sendIdx["with:"]=4;
  10254. //>>excludeEnd("ctx");
  10255. $recv($7)._title_("ctrl+f");
  10256. $8=$recv($7)._onClick_((function(){
  10257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10258. return $core.withContext(function($ctx2) {
  10259. //>>excludeEnd("ctx");
  10260. return self._fileIn();
  10261. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10262. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  10263. //>>excludeEnd("ctx");
  10264. }));
  10265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10266. $ctx1.sendIdx["onClick:"]=4;
  10267. //>>excludeEnd("ctx");
  10268. $9=$recv(html)._button();
  10269. $recv($9)._with_("Clear workspace");
  10270. $recv($9)._onClick_((function(){
  10271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10272. return $core.withContext(function($ctx2) {
  10273. //>>excludeEnd("ctx");
  10274. return self._clearWorkspace();
  10275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10276. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,5)});
  10277. //>>excludeEnd("ctx");
  10278. }));
  10279. return self;
  10280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10281. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.Workspace)});
  10282. //>>excludeEnd("ctx");
  10283. },
  10284. //>>excludeStart("ide", pragmas.excludeIdeData);
  10285. args: ["html"],
  10286. 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 ]",
  10287. referencedClasses: [],
  10288. //>>excludeEnd("ide");
  10289. messageSends: ["with:", "button", "title:", "onClick:", "doIt", "printIt", "inspectIt", "fileIn", "clearWorkspace"]
  10290. }),
  10291. $globals.Workspace);
  10292. $core.addMethod(
  10293. $core.method({
  10294. selector: "show",
  10295. protocol: 'actions',
  10296. fn: function (){
  10297. var self=this;
  10298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10299. return $core.withContext(function($ctx1) {
  10300. //>>excludeEnd("ctx");
  10301. (
  10302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10303. $ctx1.supercall = true,
  10304. //>>excludeEnd("ctx");
  10305. ($globals.Workspace.superclass||$boot.nilAsClass).fn.prototype._show.apply($recv(self), []));
  10306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10307. $ctx1.supercall = false;
  10308. //>>excludeEnd("ctx");;
  10309. $recv(self["@sourceArea"])._focus();
  10310. return self;
  10311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10312. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.Workspace)});
  10313. //>>excludeEnd("ctx");
  10314. },
  10315. //>>excludeStart("ide", pragmas.excludeIdeData);
  10316. args: [],
  10317. source: "show\x0a\x09super show.\x0a\x09sourceArea focus.",
  10318. referencedClasses: [],
  10319. //>>excludeEnd("ide");
  10320. messageSends: ["show", "focus"]
  10321. }),
  10322. $globals.Workspace);
  10323. });