Helios-Core.js 344 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601
  1. define(["amber/boot", "amber/web/Web", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  3. var $core=$boot.api,nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  4. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  5. $core.addPackage("Helios-Core");
  6. $core.packages["Helios-Core"].innerEval = function (expr) { return eval(expr); };
  7. $core.packages["Helios-Core"].transport = {"type":"amd","amdNamespace":"helios"};
  8. $core.addClass("HLModel", $globals.Object, ["announcer", "environment"], "Helios-Core");
  9. //>>excludeStart("ide", pragmas.excludeIdeData);
  10. $globals.HLModel.comment="I am the abstract superclass of all models of Helios.\x0aI am the \x22Model\x22 part of the MVC pattern implementation in Helios.\x0a\x0aI provide access to an `Environment` object and both a local (model-specific) and global (system-specific) announcer.\x0a\x0aThe `#withChangesDo:` method is handy for performing model changes ensuring that all widgets are aware of the change and can prevent it from happening.\x0a\x0aModifications of the system should be done via commands (see `HLCommand` and subclasses).";
  11. //>>excludeEnd("ide");
  12. $core.addMethod(
  13. $core.method({
  14. selector: "announcer",
  15. protocol: "accessing",
  16. fn: function (){
  17. var self=this;
  18. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  19. return $core.withContext(function($ctx1) {
  20. //>>excludeEnd("ctx");
  21. var $1,$receiver;
  22. $1=self["@announcer"];
  23. if(($receiver = $1) == null || $receiver.isNil){
  24. self["@announcer"]=$recv($globals.Announcer)._new();
  25. return self["@announcer"];
  26. } else {
  27. return $1;
  28. }
  29. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  30. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLModel)});
  31. //>>excludeEnd("ctx");
  32. },
  33. //>>excludeStart("ide", pragmas.excludeIdeData);
  34. args: [],
  35. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  36. referencedClasses: ["Announcer"],
  37. //>>excludeEnd("ide");
  38. messageSends: ["ifNil:", "new"]
  39. }),
  40. $globals.HLModel);
  41. $core.addMethod(
  42. $core.method({
  43. selector: "environment",
  44. protocol: "accessing",
  45. fn: function (){
  46. var self=this;
  47. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  48. return $core.withContext(function($ctx1) {
  49. //>>excludeEnd("ctx");
  50. var $1,$receiver;
  51. $1=self["@environment"];
  52. if(($receiver = $1) == null || $receiver.isNil){
  53. return $recv(self._manager())._environment();
  54. } else {
  55. return $1;
  56. }
  57. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  58. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLModel)});
  59. //>>excludeEnd("ctx");
  60. },
  61. //>>excludeStart("ide", pragmas.excludeIdeData);
  62. args: [],
  63. source: "environment\x0a\x09^ environment ifNil: [ self manager environment ]",
  64. referencedClasses: [],
  65. //>>excludeEnd("ide");
  66. messageSends: ["ifNil:", "environment", "manager"]
  67. }),
  68. $globals.HLModel);
  69. $core.addMethod(
  70. $core.method({
  71. selector: "environment:",
  72. protocol: "accessing",
  73. fn: function (anEnvironment){
  74. var self=this;
  75. self["@environment"]=anEnvironment;
  76. return self;
  77. },
  78. //>>excludeStart("ide", pragmas.excludeIdeData);
  79. args: ["anEnvironment"],
  80. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  81. referencedClasses: [],
  82. //>>excludeEnd("ide");
  83. messageSends: []
  84. }),
  85. $globals.HLModel);
  86. $core.addMethod(
  87. $core.method({
  88. selector: "isBrowserModel",
  89. protocol: "testing",
  90. fn: function (){
  91. var self=this;
  92. return false;
  93. },
  94. //>>excludeStart("ide", pragmas.excludeIdeData);
  95. args: [],
  96. source: "isBrowserModel\x0a\x09^ false",
  97. referencedClasses: [],
  98. //>>excludeEnd("ide");
  99. messageSends: []
  100. }),
  101. $globals.HLModel);
  102. $core.addMethod(
  103. $core.method({
  104. selector: "isReferencesModel",
  105. protocol: "testing",
  106. fn: function (){
  107. var self=this;
  108. return false;
  109. },
  110. //>>excludeStart("ide", pragmas.excludeIdeData);
  111. args: [],
  112. source: "isReferencesModel\x0a\x09^ false",
  113. referencedClasses: [],
  114. //>>excludeEnd("ide");
  115. messageSends: []
  116. }),
  117. $globals.HLModel);
  118. $core.addMethod(
  119. $core.method({
  120. selector: "isToolModel",
  121. protocol: "testing",
  122. fn: function (){
  123. var self=this;
  124. return false;
  125. },
  126. //>>excludeStart("ide", pragmas.excludeIdeData);
  127. args: [],
  128. source: "isToolModel\x0a\x09^ false",
  129. referencedClasses: [],
  130. //>>excludeEnd("ide");
  131. messageSends: []
  132. }),
  133. $globals.HLModel);
  134. $core.addMethod(
  135. $core.method({
  136. selector: "manager",
  137. protocol: "accessing",
  138. fn: function (){
  139. var self=this;
  140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  141. return $core.withContext(function($ctx1) {
  142. //>>excludeEnd("ctx");
  143. return $recv($globals.HLManager)._current();
  144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  145. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLModel)});
  146. //>>excludeEnd("ctx");
  147. },
  148. //>>excludeStart("ide", pragmas.excludeIdeData);
  149. args: [],
  150. source: "manager\x0a\x09^ HLManager current",
  151. referencedClasses: ["HLManager"],
  152. //>>excludeEnd("ide");
  153. messageSends: ["current"]
  154. }),
  155. $globals.HLModel);
  156. $core.addMethod(
  157. $core.method({
  158. selector: "systemAnnouncer",
  159. protocol: "accessing",
  160. fn: function (){
  161. var self=this;
  162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  163. return $core.withContext(function($ctx1) {
  164. //>>excludeEnd("ctx");
  165. return $recv(self._environment())._systemAnnouncer();
  166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  167. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},$globals.HLModel)});
  168. //>>excludeEnd("ctx");
  169. },
  170. //>>excludeStart("ide", pragmas.excludeIdeData);
  171. args: [],
  172. source: "systemAnnouncer\x0a\x09^ self environment systemAnnouncer",
  173. referencedClasses: [],
  174. //>>excludeEnd("ide");
  175. messageSends: ["systemAnnouncer", "environment"]
  176. }),
  177. $globals.HLModel);
  178. $core.addMethod(
  179. $core.method({
  180. selector: "withChangesDo:",
  181. protocol: "error handling",
  182. fn: function (aBlock){
  183. var self=this;
  184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  185. return $core.withContext(function($ctx1) {
  186. //>>excludeEnd("ctx");
  187. var $1,$3,$2;
  188. $recv((function(){
  189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  190. return $core.withContext(function($ctx2) {
  191. //>>excludeEnd("ctx");
  192. $1=self._announcer();
  193. $3=$recv($globals.HLAboutToChange)._new();
  194. $recv($3)._actionBlock_(aBlock);
  195. $2=$recv($3)._yourself();
  196. $recv($1)._announce_($2);
  197. return $recv(aBlock)._value();
  198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  199. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  200. //>>excludeEnd("ctx");
  201. }))._on_do_($globals.HLChangeForbidden,(function(ex){
  202. }));
  203. return self;
  204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  205. }, function($ctx1) {$ctx1.fill(self,"withChangesDo:",{aBlock:aBlock},$globals.HLModel)});
  206. //>>excludeEnd("ctx");
  207. },
  208. //>>excludeStart("ide", pragmas.excludeIdeData);
  209. args: ["aBlock"],
  210. source: "withChangesDo: aBlock\x0a\x09[ \x0a\x09\x09self announcer announce: (HLAboutToChange new\x0a\x09\x09\x09actionBlock: aBlock;\x0a\x09\x09\x09yourself).\x0a\x09\x09aBlock value.\x0a\x09]\x0a\x09\x09on: HLChangeForbidden \x0a\x09\x09do: [ :ex | ]",
  211. referencedClasses: ["HLAboutToChange", "HLChangeForbidden"],
  212. //>>excludeEnd("ide");
  213. messageSends: ["on:do:", "announce:", "announcer", "actionBlock:", "new", "yourself", "value"]
  214. }),
  215. $globals.HLModel);
  216. $core.addClass("HLFinder", $globals.HLModel, [], "Helios-Core");
  217. //>>excludeStart("ide", pragmas.excludeIdeData);
  218. $globals.HLFinder.comment="I am the `Finder` service handler of Helios.\x0a\x0aFinding a class will open a new class browser, while finding a method will open a references browser.";
  219. //>>excludeEnd("ide");
  220. $core.addMethod(
  221. $core.method({
  222. selector: "findClass:",
  223. protocol: "finding",
  224. fn: function (aClass){
  225. var self=this;
  226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  227. return $core.withContext(function($ctx1) {
  228. //>>excludeEnd("ctx");
  229. $recv($recv($globals.HLBrowser)._openAsTab())._openClassNamed_($recv(aClass)._name());
  230. return self;
  231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  232. }, function($ctx1) {$ctx1.fill(self,"findClass:",{aClass:aClass},$globals.HLFinder)});
  233. //>>excludeEnd("ctx");
  234. },
  235. //>>excludeStart("ide", pragmas.excludeIdeData);
  236. args: ["aClass"],
  237. source: "findClass: aClass\x0a\x09HLBrowser openAsTab openClassNamed: aClass name",
  238. referencedClasses: ["HLBrowser"],
  239. //>>excludeEnd("ide");
  240. messageSends: ["openClassNamed:", "openAsTab", "name"]
  241. }),
  242. $globals.HLFinder);
  243. $core.addMethod(
  244. $core.method({
  245. selector: "findMethod:",
  246. protocol: "finding",
  247. fn: function (aCompiledMethod){
  248. var self=this;
  249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  250. return $core.withContext(function($ctx1) {
  251. //>>excludeEnd("ctx");
  252. $recv($recv($globals.HLBrowser)._openAsTab())._openMethod_(aCompiledMethod);
  253. return self;
  254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  255. }, function($ctx1) {$ctx1.fill(self,"findMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLFinder)});
  256. //>>excludeEnd("ctx");
  257. },
  258. //>>excludeStart("ide", pragmas.excludeIdeData);
  259. args: ["aCompiledMethod"],
  260. source: "findMethod: aCompiledMethod\x0a\x09HLBrowser openAsTab openMethod: aCompiledMethod",
  261. referencedClasses: ["HLBrowser"],
  262. //>>excludeEnd("ide");
  263. messageSends: ["openMethod:", "openAsTab"]
  264. }),
  265. $globals.HLFinder);
  266. $core.addMethod(
  267. $core.method({
  268. selector: "findString:",
  269. protocol: "finding",
  270. fn: function (aString){
  271. var self=this;
  272. var foundClass;
  273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  274. return $core.withContext(function($ctx1) {
  275. //>>excludeEnd("ctx");
  276. var $1,$receiver;
  277. foundClass=$recv($recv(self._environment())._classes())._detect_ifNone_((function(each){
  278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  279. return $core.withContext(function($ctx2) {
  280. //>>excludeEnd("ctx");
  281. return $recv($recv(each)._name()).__eq(aString);
  282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  283. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  284. //>>excludeEnd("ctx");
  285. }),(function(){
  286. return nil;
  287. }));
  288. $1=foundClass;
  289. if(($receiver = $1) == null || $receiver.isNil){
  290. $recv($recv($globals.HLReferences)._openAsTab())._search_(aString);
  291. } else {
  292. self._findClass_(foundClass);
  293. }
  294. return self;
  295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  296. }, function($ctx1) {$ctx1.fill(self,"findString:",{aString:aString,foundClass:foundClass},$globals.HLFinder)});
  297. //>>excludeEnd("ctx");
  298. },
  299. //>>excludeStart("ide", pragmas.excludeIdeData);
  300. args: ["aString"],
  301. source: "findString: aString\x0a\x09| foundClass |\x0a\x09\x0a\x09foundClass := self environment classes \x0a\x09\x09detect: [ :each | each name = aString ]\x0a\x09\x09ifNone: [ nil ].\x0a\x09\x0a\x09foundClass \x0a\x09\x09ifNil: [ HLReferences openAsTab search: aString ]\x0a\x09\x09ifNotNil: [ self findClass: foundClass ]",
  302. referencedClasses: ["HLReferences"],
  303. //>>excludeEnd("ide");
  304. messageSends: ["detect:ifNone:", "classes", "environment", "=", "name", "ifNil:ifNotNil:", "search:", "openAsTab", "findClass:"]
  305. }),
  306. $globals.HLFinder);
  307. $core.addClass("HLToolModel", $globals.HLModel, ["selectedClass", "selectedPackage", "selectedProtocol", "selectedSelector"], "Helios-Core");
  308. //>>excludeStart("ide", pragmas.excludeIdeData);
  309. $globals.HLToolModel.comment="I am a model specific to package and class manipulation. All browsers should either use me or a subclass as their model.\x0a\x0aI provide methods for package, class, protocol and method manipulation and access, forwarding to my environment.\x0a\x0aI also handle compilation of classes and methods as well as compilation and parsing errors.";
  310. //>>excludeEnd("ide");
  311. $core.addMethod(
  312. $core.method({
  313. selector: "addInstVarNamed:",
  314. protocol: "actions",
  315. fn: function (aString){
  316. var self=this;
  317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  318. return $core.withContext(function($ctx1) {
  319. //>>excludeEnd("ctx");
  320. var $1,$2,$3,$5,$4;
  321. $1=self._environment();
  322. $2=self._selectedClass();
  323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  324. $ctx1.sendIdx["selectedClass"]=1;
  325. //>>excludeEnd("ctx");
  326. $recv($1)._addInstVarNamed_to_(aString,$2);
  327. $3=self._announcer();
  328. $5=$recv($globals.HLInstVarAdded)._new();
  329. $recv($5)._theClass_(self._selectedClass());
  330. $recv($5)._variableName_(aString);
  331. $4=$recv($5)._yourself();
  332. $recv($3)._announce_($4);
  333. return self;
  334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  335. }, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},$globals.HLToolModel)});
  336. //>>excludeEnd("ctx");
  337. },
  338. //>>excludeStart("ide", pragmas.excludeIdeData);
  339. args: ["aString"],
  340. source: "addInstVarNamed: aString\x0a\x09self environment addInstVarNamed: aString to: self selectedClass.\x0a\x09self announcer announce: (HLInstVarAdded new\x0a\x09\x09theClass: self selectedClass;\x0a\x09\x09variableName: aString;\x0a\x09\x09yourself)",
  341. referencedClasses: ["HLInstVarAdded"],
  342. //>>excludeEnd("ide");
  343. messageSends: ["addInstVarNamed:to:", "environment", "selectedClass", "announce:", "announcer", "theClass:", "new", "variableName:", "yourself"]
  344. }),
  345. $globals.HLToolModel);
  346. $core.addMethod(
  347. $core.method({
  348. selector: "allProtocol",
  349. protocol: "defaults",
  350. fn: function (){
  351. var self=this;
  352. return "-- all --";
  353. },
  354. //>>excludeStart("ide", pragmas.excludeIdeData);
  355. args: [],
  356. source: "allProtocol\x0a\x09^ '-- all --'",
  357. referencedClasses: [],
  358. //>>excludeEnd("ide");
  359. messageSends: []
  360. }),
  361. $globals.HLToolModel);
  362. $core.addMethod(
  363. $core.method({
  364. selector: "allSelectors",
  365. protocol: "accessing",
  366. fn: function (){
  367. var self=this;
  368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  369. return $core.withContext(function($ctx1) {
  370. //>>excludeEnd("ctx");
  371. return $recv(self._environment())._allSelectors();
  372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  373. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},$globals.HLToolModel)});
  374. //>>excludeEnd("ctx");
  375. },
  376. //>>excludeStart("ide", pragmas.excludeIdeData);
  377. args: [],
  378. source: "allSelectors\x0a\x09^ self environment allSelectors",
  379. referencedClasses: [],
  380. //>>excludeEnd("ide");
  381. messageSends: ["allSelectors", "environment"]
  382. }),
  383. $globals.HLToolModel);
  384. $core.addMethod(
  385. $core.method({
  386. selector: "availableClassNames",
  387. protocol: "accessing",
  388. fn: function (){
  389. var self=this;
  390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  391. return $core.withContext(function($ctx1) {
  392. //>>excludeEnd("ctx");
  393. return $recv(self._environment())._availableClassNames();
  394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  395. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},$globals.HLToolModel)});
  396. //>>excludeEnd("ctx");
  397. },
  398. //>>excludeStart("ide", pragmas.excludeIdeData);
  399. args: [],
  400. source: "availableClassNames\x0a\x09^ self environment availableClassNames",
  401. referencedClasses: [],
  402. //>>excludeEnd("ide");
  403. messageSends: ["availableClassNames", "environment"]
  404. }),
  405. $globals.HLToolModel);
  406. $core.addMethod(
  407. $core.method({
  408. selector: "availablePackageNames",
  409. protocol: "accessing",
  410. fn: function (){
  411. var self=this;
  412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  413. return $core.withContext(function($ctx1) {
  414. //>>excludeEnd("ctx");
  415. return $recv(self._environment())._availablePackageNames();
  416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  417. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},$globals.HLToolModel)});
  418. //>>excludeEnd("ctx");
  419. },
  420. //>>excludeStart("ide", pragmas.excludeIdeData);
  421. args: [],
  422. source: "availablePackageNames\x0a\x09^ self environment availablePackageNames",
  423. referencedClasses: [],
  424. //>>excludeEnd("ide");
  425. messageSends: ["availablePackageNames", "environment"]
  426. }),
  427. $globals.HLToolModel);
  428. $core.addMethod(
  429. $core.method({
  430. selector: "availablePackages",
  431. protocol: "accessing",
  432. fn: function (){
  433. var self=this;
  434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  435. return $core.withContext(function($ctx1) {
  436. //>>excludeEnd("ctx");
  437. return $recv(self._environment())._availablePackageNames();
  438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  439. }, function($ctx1) {$ctx1.fill(self,"availablePackages",{},$globals.HLToolModel)});
  440. //>>excludeEnd("ctx");
  441. },
  442. //>>excludeStart("ide", pragmas.excludeIdeData);
  443. args: [],
  444. source: "availablePackages\x0a\x09^ self environment availablePackageNames",
  445. referencedClasses: [],
  446. //>>excludeEnd("ide");
  447. messageSends: ["availablePackageNames", "environment"]
  448. }),
  449. $globals.HLToolModel);
  450. $core.addMethod(
  451. $core.method({
  452. selector: "availableProtocols",
  453. protocol: "accessing",
  454. fn: function (){
  455. var self=this;
  456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  457. return $core.withContext(function($ctx1) {
  458. //>>excludeEnd("ctx");
  459. return $recv(self._environment())._availableProtocolsFor_(self._selectedClass());
  460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  461. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},$globals.HLToolModel)});
  462. //>>excludeEnd("ctx");
  463. },
  464. //>>excludeStart("ide", pragmas.excludeIdeData);
  465. args: [],
  466. source: "availableProtocols\x0a\x09^ self environment availableProtocolsFor: self selectedClass",
  467. referencedClasses: [],
  468. //>>excludeEnd("ide");
  469. messageSends: ["availableProtocolsFor:", "environment", "selectedClass"]
  470. }),
  471. $globals.HLToolModel);
  472. $core.addMethod(
  473. $core.method({
  474. selector: "commitPackageOnSuccess:onError:",
  475. protocol: "commands actions",
  476. fn: function (aBlock,anotherBlock){
  477. var self=this;
  478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  479. return $core.withContext(function($ctx1) {
  480. //>>excludeEnd("ctx");
  481. $recv(self._environment())._commitPackage_onSuccess_onError_(self._packageToCommit(),aBlock,anotherBlock);
  482. return self;
  483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  484. }, function($ctx1) {$ctx1.fill(self,"commitPackageOnSuccess:onError:",{aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLToolModel)});
  485. //>>excludeEnd("ctx");
  486. },
  487. //>>excludeStart("ide", pragmas.excludeIdeData);
  488. args: ["aBlock", "anotherBlock"],
  489. source: "commitPackageOnSuccess: aBlock onError: anotherBlock\x0a\x09self environment \x0a\x09\x09commitPackage: self packageToCommit\x0a\x09\x09onSuccess: aBlock\x0a\x09\x09onError: anotherBlock",
  490. referencedClasses: [],
  491. //>>excludeEnd("ide");
  492. messageSends: ["commitPackage:onSuccess:onError:", "environment", "packageToCommit"]
  493. }),
  494. $globals.HLToolModel);
  495. $core.addMethod(
  496. $core.method({
  497. selector: "compilationProtocol",
  498. protocol: "private",
  499. fn: function (){
  500. var self=this;
  501. var currentProtocol;
  502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  503. return $core.withContext(function($ctx1) {
  504. //>>excludeEnd("ctx");
  505. var $1,$2,$3,$receiver;
  506. currentProtocol=self._selectedProtocol();
  507. $1=currentProtocol;
  508. if(($receiver = $1) == null || $receiver.isNil){
  509. currentProtocol=self._unclassifiedProtocol();
  510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  511. $ctx1.sendIdx["unclassifiedProtocol"]=1;
  512. //>>excludeEnd("ctx");
  513. currentProtocol;
  514. } else {
  515. $1;
  516. }
  517. $2=self._selectedMethod();
  518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  519. $ctx1.sendIdx["selectedMethod"]=1;
  520. //>>excludeEnd("ctx");
  521. if(($receiver = $2) == null || $receiver.isNil){
  522. $2;
  523. } else {
  524. currentProtocol=$recv(self._selectedMethod())._protocol();
  525. currentProtocol;
  526. }
  527. $3=$recv(currentProtocol).__eq(self._allProtocol());
  528. if($core.assert($3)){
  529. return self._unclassifiedProtocol();
  530. } else {
  531. return currentProtocol;
  532. }
  533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  534. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},$globals.HLToolModel)});
  535. //>>excludeEnd("ctx");
  536. },
  537. //>>excludeStart("ide", pragmas.excludeIdeData);
  538. args: [],
  539. source: "compilationProtocol\x0a\x09| currentProtocol |\x0a\x09\x0a\x09currentProtocol := self selectedProtocol.\x0a\x09currentProtocol ifNil: [ currentProtocol := self unclassifiedProtocol ].\x0a\x09self selectedMethod ifNotNil: [ currentProtocol := self selectedMethod protocol ].\x0a\x0a\x09^ currentProtocol = self allProtocol\x0a\x09\x09ifTrue: [ self unclassifiedProtocol ]\x0a\x09\x09ifFalse: [ currentProtocol ]",
  540. referencedClasses: [],
  541. //>>excludeEnd("ide");
  542. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "selectedMethod", "protocol", "ifTrue:ifFalse:", "=", "allProtocol"]
  543. }),
  544. $globals.HLToolModel);
  545. $core.addMethod(
  546. $core.method({
  547. selector: "compileClassComment:",
  548. protocol: "compiling",
  549. fn: function (aString){
  550. var self=this;
  551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  552. return $core.withContext(function($ctx1) {
  553. //>>excludeEnd("ctx");
  554. $recv(self._environment())._compileClassComment_for_(aString,self._selectedClass());
  555. return self;
  556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  557. }, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},$globals.HLToolModel)});
  558. //>>excludeEnd("ctx");
  559. },
  560. //>>excludeStart("ide", pragmas.excludeIdeData);
  561. args: ["aString"],
  562. source: "compileClassComment: aString\x0a\x09self environment \x0a\x09\x09compileClassComment: aString \x0a\x09\x09for: self selectedClass",
  563. referencedClasses: [],
  564. //>>excludeEnd("ide");
  565. messageSends: ["compileClassComment:for:", "environment", "selectedClass"]
  566. }),
  567. $globals.HLToolModel);
  568. $core.addMethod(
  569. $core.method({
  570. selector: "compileClassDefinition:",
  571. protocol: "compiling",
  572. fn: function (aString){
  573. var self=this;
  574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  575. return $core.withContext(function($ctx1) {
  576. //>>excludeEnd("ctx");
  577. $recv(self._environment())._compileClassDefinition_(aString);
  578. return self;
  579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  580. }, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},$globals.HLToolModel)});
  581. //>>excludeEnd("ctx");
  582. },
  583. //>>excludeStart("ide", pragmas.excludeIdeData);
  584. args: ["aString"],
  585. source: "compileClassDefinition: aString\x0a\x09self environment compileClassDefinition: aString",
  586. referencedClasses: [],
  587. //>>excludeEnd("ide");
  588. messageSends: ["compileClassDefinition:", "environment"]
  589. }),
  590. $globals.HLToolModel);
  591. $core.addMethod(
  592. $core.method({
  593. selector: "compileMethod:",
  594. protocol: "compiling",
  595. fn: function (aString){
  596. var self=this;
  597. var method;
  598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  599. return $core.withContext(function($ctx1) {
  600. //>>excludeEnd("ctx");
  601. self._withCompileErrorHandling_((function(){
  602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  603. return $core.withContext(function($ctx2) {
  604. //>>excludeEnd("ctx");
  605. method=$recv(self._environment())._compileMethod_for_protocol_(aString,self._selectedClass(),self._compilationProtocol());
  606. method;
  607. return self._selectedMethod_(method);
  608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  609. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  610. //>>excludeEnd("ctx");
  611. }));
  612. return self;
  613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  614. }, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString,method:method},$globals.HLToolModel)});
  615. //>>excludeEnd("ctx");
  616. },
  617. //>>excludeStart("ide", pragmas.excludeIdeData);
  618. args: ["aString"],
  619. source: "compileMethod: aString\x0a\x09| method |\x0a\x09\x0a\x09self withCompileErrorHandling: [ \x0a\x09\x09method := self environment \x0a\x09\x09\x09compileMethod: aString \x0a\x09\x09\x09for: self selectedClass\x0a\x09\x09\x09protocol: self compilationProtocol.\x0a\x0a\x09\x09self selectedMethod: method ]",
  620. referencedClasses: [],
  621. //>>excludeEnd("ide");
  622. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "environment", "selectedClass", "compilationProtocol", "selectedMethod:"]
  623. }),
  624. $globals.HLToolModel);
  625. $core.addMethod(
  626. $core.method({
  627. selector: "copyClassTo:",
  628. protocol: "commands actions",
  629. fn: function (aClassName){
  630. var self=this;
  631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  632. return $core.withContext(function($ctx1) {
  633. //>>excludeEnd("ctx");
  634. var $1;
  635. self._withChangesDo_((function(){
  636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  637. return $core.withContext(function($ctx2) {
  638. //>>excludeEnd("ctx");
  639. $1=self._environment();
  640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  641. $ctx2.sendIdx["environment"]=1;
  642. //>>excludeEnd("ctx");
  643. $recv($1)._copyClass_to_($recv(self._selectedClass())._theNonMetaClass(),aClassName);
  644. return self._selectedClass_($recv(self._environment())._classNamed_(aClassName));
  645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  646. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  647. //>>excludeEnd("ctx");
  648. }));
  649. return self;
  650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  651. }, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  652. //>>excludeEnd("ctx");
  653. },
  654. //>>excludeStart("ide", pragmas.excludeIdeData);
  655. args: ["aClassName"],
  656. source: "copyClassTo: aClassName\x0a\x09self withChangesDo: [ \x0a\x09\x09self environment \x0a\x09\x09\x09copyClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName.\x0a\x09\x09self selectedClass: (self environment classNamed: aClassName) ]",
  657. referencedClasses: [],
  658. //>>excludeEnd("ide");
  659. messageSends: ["withChangesDo:", "copyClass:to:", "environment", "theNonMetaClass", "selectedClass", "selectedClass:", "classNamed:"]
  660. }),
  661. $globals.HLToolModel);
  662. $core.addMethod(
  663. $core.method({
  664. selector: "forceSelectedClass:",
  665. protocol: "accessing",
  666. fn: function (aClass){
  667. var self=this;
  668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  669. return $core.withContext(function($ctx1) {
  670. //>>excludeEnd("ctx");
  671. self._withChangesDo_((function(){
  672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  673. return $core.withContext(function($ctx2) {
  674. //>>excludeEnd("ctx");
  675. self._selectedClass_(nil);
  676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  677. $ctx2.sendIdx["selectedClass:"]=1;
  678. //>>excludeEnd("ctx");
  679. return self._selectedClass_(aClass);
  680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  681. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  682. //>>excludeEnd("ctx");
  683. }));
  684. return self;
  685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  686. }, function($ctx1) {$ctx1.fill(self,"forceSelectedClass:",{aClass:aClass},$globals.HLToolModel)});
  687. //>>excludeEnd("ctx");
  688. },
  689. //>>excludeStart("ide", pragmas.excludeIdeData);
  690. args: ["aClass"],
  691. source: "forceSelectedClass: aClass\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedClass: nil;\x0a\x09\x09\x09selectedClass: aClass ]",
  692. referencedClasses: [],
  693. //>>excludeEnd("ide");
  694. messageSends: ["withChangesDo:", "selectedClass:"]
  695. }),
  696. $globals.HLToolModel);
  697. $core.addMethod(
  698. $core.method({
  699. selector: "forceSelectedMethod:",
  700. protocol: "accessing",
  701. fn: function (aMethod){
  702. var self=this;
  703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  704. return $core.withContext(function($ctx1) {
  705. //>>excludeEnd("ctx");
  706. self._withChangesDo_((function(){
  707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  708. return $core.withContext(function($ctx2) {
  709. //>>excludeEnd("ctx");
  710. self._selectedMethod_(nil);
  711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  712. $ctx2.sendIdx["selectedMethod:"]=1;
  713. //>>excludeEnd("ctx");
  714. return self._selectedMethod_(aMethod);
  715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  716. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  717. //>>excludeEnd("ctx");
  718. }));
  719. return self;
  720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  721. }, function($ctx1) {$ctx1.fill(self,"forceSelectedMethod:",{aMethod:aMethod},$globals.HLToolModel)});
  722. //>>excludeEnd("ctx");
  723. },
  724. //>>excludeStart("ide", pragmas.excludeIdeData);
  725. args: ["aMethod"],
  726. source: "forceSelectedMethod: aMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedMethod: nil;\x0a\x09\x09\x09selectedMethod: aMethod ]",
  727. referencedClasses: [],
  728. //>>excludeEnd("ide");
  729. messageSends: ["withChangesDo:", "selectedMethod:"]
  730. }),
  731. $globals.HLToolModel);
  732. $core.addMethod(
  733. $core.method({
  734. selector: "forceSelectedPackage:",
  735. protocol: "accessing",
  736. fn: function (aPackage){
  737. var self=this;
  738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  739. return $core.withContext(function($ctx1) {
  740. //>>excludeEnd("ctx");
  741. self._withChangesDo_((function(){
  742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  743. return $core.withContext(function($ctx2) {
  744. //>>excludeEnd("ctx");
  745. self._selectedPackage_(nil);
  746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  747. $ctx2.sendIdx["selectedPackage:"]=1;
  748. //>>excludeEnd("ctx");
  749. return self._selectedPackage_(aPackage);
  750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  751. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  752. //>>excludeEnd("ctx");
  753. }));
  754. return self;
  755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  756. }, function($ctx1) {$ctx1.fill(self,"forceSelectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  757. //>>excludeEnd("ctx");
  758. },
  759. //>>excludeStart("ide", pragmas.excludeIdeData);
  760. args: ["aPackage"],
  761. source: "forceSelectedPackage: aPackage\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedPackage: nil;\x0a\x09\x09\x09selectedPackage: aPackage ]",
  762. referencedClasses: [],
  763. //>>excludeEnd("ide");
  764. messageSends: ["withChangesDo:", "selectedPackage:"]
  765. }),
  766. $globals.HLToolModel);
  767. $core.addMethod(
  768. $core.method({
  769. selector: "forceSelectedProtocol:",
  770. protocol: "accessing",
  771. fn: function (aProtocol){
  772. var self=this;
  773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  774. return $core.withContext(function($ctx1) {
  775. //>>excludeEnd("ctx");
  776. self._withChangesDo_((function(){
  777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  778. return $core.withContext(function($ctx2) {
  779. //>>excludeEnd("ctx");
  780. self._selectedProtocol_(nil);
  781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  782. $ctx2.sendIdx["selectedProtocol:"]=1;
  783. //>>excludeEnd("ctx");
  784. return self._selectedProtocol_(aProtocol);
  785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  786. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  787. //>>excludeEnd("ctx");
  788. }));
  789. return self;
  790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  791. }, function($ctx1) {$ctx1.fill(self,"forceSelectedProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  792. //>>excludeEnd("ctx");
  793. },
  794. //>>excludeStart("ide", pragmas.excludeIdeData);
  795. args: ["aProtocol"],
  796. source: "forceSelectedProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedProtocol: nil;\x0a\x09\x09\x09selectedProtocol: aProtocol ]",
  797. referencedClasses: [],
  798. //>>excludeEnd("ide");
  799. messageSends: ["withChangesDo:", "selectedProtocol:"]
  800. }),
  801. $globals.HLToolModel);
  802. $core.addMethod(
  803. $core.method({
  804. selector: "handleCompileError:",
  805. protocol: "error handling",
  806. fn: function (anError){
  807. var self=this;
  808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  809. return $core.withContext(function($ctx1) {
  810. //>>excludeEnd("ctx");
  811. var $1,$3,$2;
  812. $1=self._announcer();
  813. $3=$recv($globals.HLCompileErrorRaised)._new();
  814. $recv($3)._error_(anError);
  815. $2=$recv($3)._yourself();
  816. $recv($1)._announce_($2);
  817. return self;
  818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  819. }, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},$globals.HLToolModel)});
  820. //>>excludeEnd("ctx");
  821. },
  822. //>>excludeStart("ide", pragmas.excludeIdeData);
  823. args: ["anError"],
  824. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  825. referencedClasses: ["HLCompileErrorRaised"],
  826. //>>excludeEnd("ide");
  827. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  828. }),
  829. $globals.HLToolModel);
  830. $core.addMethod(
  831. $core.method({
  832. selector: "handleParseError:",
  833. protocol: "error handling",
  834. fn: function (anError){
  835. var self=this;
  836. var split,line,column,messageToInsert;
  837. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  838. return $core.withContext(function($ctx1) {
  839. //>>excludeEnd("ctx");
  840. var $1,$3,$2,$4,$6,$7,$5;
  841. split=$recv($recv(anError)._messageText())._tokenize_(" : ");
  842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  843. $ctx1.sendIdx["tokenize:"]=1;
  844. //>>excludeEnd("ctx");
  845. messageToInsert=$recv(split)._second();
  846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  847. $ctx1.sendIdx["second"]=1;
  848. //>>excludeEnd("ctx");
  849. $1=$recv(split)._first();
  850. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  851. $ctx1.sendIdx["first"]=1;
  852. //>>excludeEnd("ctx");
  853. $3=$recv(split)._first();
  854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  855. $ctx1.sendIdx["first"]=2;
  856. //>>excludeEnd("ctx");
  857. $2=$recv($3)._size();
  858. split=$recv($1)._copyFrom_to_((21),$2);
  859. split=$recv(split)._tokenize_(" column ");
  860. line=$recv(split)._first();
  861. column=$recv(split)._second();
  862. $4=self._announcer();
  863. $6=$recv($globals.HLParseErrorRaised)._new();
  864. $7=$recv(line)._asNumber();
  865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  866. $ctx1.sendIdx["asNumber"]=1;
  867. //>>excludeEnd("ctx");
  868. $recv($6)._line_($7);
  869. $recv($6)._column_($recv(column)._asNumber());
  870. $recv($6)._message_(messageToInsert);
  871. $recv($6)._error_(anError);
  872. $5=$recv($6)._yourself();
  873. $recv($4)._announce_($5);
  874. return self;
  875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  876. }, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},$globals.HLToolModel)});
  877. //>>excludeEnd("ctx");
  878. },
  879. //>>excludeStart("ide", pragmas.excludeIdeData);
  880. args: ["anError"],
  881. source: "handleParseError: anError\x0a\x09| split line column messageToInsert |\x0a\x09\x0a\x09split := anError messageText tokenize: ' : '.\x0a\x09messageToInsert := split second.\x0a\x0a\x09\x2221 = 'Parse error on line ' size + 1\x22\x0a\x09split := split first copyFrom: 21 to: split first size.\x0a\x09\x0a\x09split := split tokenize: ' column '.\x0a\x09line := split first.\x0a\x09column := split second.\x0a\x09\x0a\x09self announcer announce: (HLParseErrorRaised new\x0a\x09\x09line: line asNumber;\x0a\x09\x09column: column asNumber;\x0a\x09\x09message: messageToInsert;\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  882. referencedClasses: ["HLParseErrorRaised"],
  883. //>>excludeEnd("ide");
  884. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "first", "size", "announce:", "announcer", "line:", "new", "asNumber", "column:", "message:", "error:", "yourself"]
  885. }),
  886. $globals.HLToolModel);
  887. $core.addMethod(
  888. $core.method({
  889. selector: "handleUnkownVariableError:",
  890. protocol: "error handling",
  891. fn: function (anError){
  892. var self=this;
  893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  894. return $core.withContext(function($ctx1) {
  895. //>>excludeEnd("ctx");
  896. var $1,$3,$2;
  897. $1=self._announcer();
  898. $3=$recv($globals.HLUnknownVariableErrorRaised)._new();
  899. $recv($3)._error_(anError);
  900. $2=$recv($3)._yourself();
  901. $recv($1)._announce_($2);
  902. return self;
  903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  904. }, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},$globals.HLToolModel)});
  905. //>>excludeEnd("ctx");
  906. },
  907. //>>excludeStart("ide", pragmas.excludeIdeData);
  908. args: ["anError"],
  909. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  910. referencedClasses: ["HLUnknownVariableErrorRaised"],
  911. //>>excludeEnd("ide");
  912. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  913. }),
  914. $globals.HLToolModel);
  915. $core.addMethod(
  916. $core.method({
  917. selector: "isToolModel",
  918. protocol: "testing",
  919. fn: function (){
  920. var self=this;
  921. return true;
  922. },
  923. //>>excludeStart("ide", pragmas.excludeIdeData);
  924. args: [],
  925. source: "isToolModel\x0a\x09^ true",
  926. referencedClasses: [],
  927. //>>excludeEnd("ide");
  928. messageSends: []
  929. }),
  930. $globals.HLToolModel);
  931. $core.addMethod(
  932. $core.method({
  933. selector: "moveClassToPackage:",
  934. protocol: "commands actions",
  935. fn: function (aPackageName){
  936. var self=this;
  937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  938. return $core.withContext(function($ctx1) {
  939. //>>excludeEnd("ctx");
  940. self._withChangesDo_((function(){
  941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  942. return $core.withContext(function($ctx2) {
  943. //>>excludeEnd("ctx");
  944. return $recv(self._environment())._moveClass_toPackage_($recv(self._selectedClass())._theNonMetaClass(),aPackageName);
  945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  946. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  947. //>>excludeEnd("ctx");
  948. }));
  949. return self;
  950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  951. }, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},$globals.HLToolModel)});
  952. //>>excludeEnd("ctx");
  953. },
  954. //>>excludeStart("ide", pragmas.excludeIdeData);
  955. args: ["aPackageName"],
  956. source: "moveClassToPackage: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09toPackage: aPackageName ]",
  957. referencedClasses: [],
  958. //>>excludeEnd("ide");
  959. messageSends: ["withChangesDo:", "moveClass:toPackage:", "environment", "theNonMetaClass", "selectedClass"]
  960. }),
  961. $globals.HLToolModel);
  962. $core.addMethod(
  963. $core.method({
  964. selector: "moveMethodToClass:",
  965. protocol: "commands actions",
  966. fn: function (aClassName){
  967. var self=this;
  968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  969. return $core.withContext(function($ctx1) {
  970. //>>excludeEnd("ctx");
  971. self._withChangesDo_((function(){
  972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  973. return $core.withContext(function($ctx2) {
  974. //>>excludeEnd("ctx");
  975. return $recv(self._environment())._moveMethod_toClass_(self._selectedMethod(),aClassName);
  976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  977. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  978. //>>excludeEnd("ctx");
  979. }));
  980. return self;
  981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  982. }, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},$globals.HLToolModel)});
  983. //>>excludeEnd("ctx");
  984. },
  985. //>>excludeStart("ide", pragmas.excludeIdeData);
  986. args: ["aClassName"],
  987. source: "moveMethodToClass: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toClass: aClassName ]",
  988. referencedClasses: [],
  989. //>>excludeEnd("ide");
  990. messageSends: ["withChangesDo:", "moveMethod:toClass:", "environment", "selectedMethod"]
  991. }),
  992. $globals.HLToolModel);
  993. $core.addMethod(
  994. $core.method({
  995. selector: "moveMethodToProtocol:",
  996. protocol: "commands actions",
  997. fn: function (aProtocol){
  998. var self=this;
  999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1000. return $core.withContext(function($ctx1) {
  1001. //>>excludeEnd("ctx");
  1002. self._withChangesDo_((function(){
  1003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1004. return $core.withContext(function($ctx2) {
  1005. //>>excludeEnd("ctx");
  1006. return $recv(self._environment())._moveMethod_toProtocol_(self._selectedMethod(),aProtocol);
  1007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1008. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1009. //>>excludeEnd("ctx");
  1010. }));
  1011. return self;
  1012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1013. }, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  1014. //>>excludeEnd("ctx");
  1015. },
  1016. //>>excludeStart("ide", pragmas.excludeIdeData);
  1017. args: ["aProtocol"],
  1018. source: "moveMethodToProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toProtocol: aProtocol ]",
  1019. referencedClasses: [],
  1020. //>>excludeEnd("ide");
  1021. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "environment", "selectedMethod"]
  1022. }),
  1023. $globals.HLToolModel);
  1024. $core.addMethod(
  1025. $core.method({
  1026. selector: "openClassNamed:",
  1027. protocol: "commands actions",
  1028. fn: function (aString){
  1029. var self=this;
  1030. var class_;
  1031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1032. return $core.withContext(function($ctx1) {
  1033. //>>excludeEnd("ctx");
  1034. self._withChangesDo_((function(){
  1035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1036. return $core.withContext(function($ctx2) {
  1037. //>>excludeEnd("ctx");
  1038. class_=$recv(self._environment())._classNamed_(aString);
  1039. class_;
  1040. self._selectedPackage_($recv(class_)._package());
  1041. return self._selectedClass_(class_);
  1042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1043. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1044. //>>excludeEnd("ctx");
  1045. }));
  1046. return self;
  1047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1048. }, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},$globals.HLToolModel)});
  1049. //>>excludeEnd("ctx");
  1050. },
  1051. //>>excludeStart("ide", pragmas.excludeIdeData);
  1052. args: ["aString"],
  1053. source: "openClassNamed: aString\x0a\x09| class |\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09class := self environment classNamed: aString.\x0a\x09\x09self selectedPackage: class package.\x0a\x09\x09self selectedClass: class ]",
  1054. referencedClasses: [],
  1055. //>>excludeEnd("ide");
  1056. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"]
  1057. }),
  1058. $globals.HLToolModel);
  1059. $core.addMethod(
  1060. $core.method({
  1061. selector: "packageToCommit",
  1062. protocol: "accessing",
  1063. fn: function (){
  1064. var self=this;
  1065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1066. return $core.withContext(function($ctx1) {
  1067. //>>excludeEnd("ctx");
  1068. var $1,$receiver;
  1069. $1=self._selectedMethod();
  1070. if(($receiver = $1) == null || $receiver.isNil){
  1071. return self._selectedPackage();
  1072. } else {
  1073. var method;
  1074. method=$receiver;
  1075. return $recv(method)._package();
  1076. }
  1077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1078. }, function($ctx1) {$ctx1.fill(self,"packageToCommit",{},$globals.HLToolModel)});
  1079. //>>excludeEnd("ctx");
  1080. },
  1081. //>>excludeStart("ide", pragmas.excludeIdeData);
  1082. args: [],
  1083. source: "packageToCommit\x0a\x09\x22Answer the package to commit depending on the context:\x0a\x09- if a Method is selected, answer its package\x0a\x09- else answer the `selectedPackage`\x22\x0a\x09\x0a\x09^ self selectedMethod \x0a\x09\x09ifNil: [ self selectedPackage ]\x0a\x09\x09ifNotNil: [ :method | method package ]",
  1084. referencedClasses: [],
  1085. //>>excludeEnd("ide");
  1086. messageSends: ["ifNil:ifNotNil:", "selectedMethod", "selectedPackage", "package"]
  1087. }),
  1088. $globals.HLToolModel);
  1089. $core.addMethod(
  1090. $core.method({
  1091. selector: "packages",
  1092. protocol: "accessing",
  1093. fn: function (){
  1094. var self=this;
  1095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1096. return $core.withContext(function($ctx1) {
  1097. //>>excludeEnd("ctx");
  1098. return $recv(self._environment())._packages();
  1099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1100. }, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.HLToolModel)});
  1101. //>>excludeEnd("ctx");
  1102. },
  1103. //>>excludeStart("ide", pragmas.excludeIdeData);
  1104. args: [],
  1105. source: "packages\x0a\x09^ self environment packages",
  1106. referencedClasses: [],
  1107. //>>excludeEnd("ide");
  1108. messageSends: ["packages", "environment"]
  1109. }),
  1110. $globals.HLToolModel);
  1111. $core.addMethod(
  1112. $core.method({
  1113. selector: "removeClass",
  1114. protocol: "commands actions",
  1115. fn: function (){
  1116. var self=this;
  1117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1118. return $core.withContext(function($ctx1) {
  1119. //>>excludeEnd("ctx");
  1120. var $1,$5,$4,$3,$2;
  1121. self._withChangesDo_((function(){
  1122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1123. return $core.withContext(function($ctx2) {
  1124. //>>excludeEnd("ctx");
  1125. $1=self._manager();
  1126. $5=self._selectedClass();
  1127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1128. $ctx2.sendIdx["selectedClass"]=1;
  1129. //>>excludeEnd("ctx");
  1130. $4=$recv($5)._theNonMetaClass();
  1131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1132. $ctx2.sendIdx["theNonMetaClass"]=1;
  1133. //>>excludeEnd("ctx");
  1134. $3=$recv($4)._name();
  1135. $2="Do you REALLY want to remove class ".__comma($3);
  1136. return $recv($1)._confirm_ifTrue_($2,(function(){
  1137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1138. return $core.withContext(function($ctx3) {
  1139. //>>excludeEnd("ctx");
  1140. return $recv(self._environment())._removeClass_($recv(self._selectedClass())._theNonMetaClass());
  1141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1142. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1143. //>>excludeEnd("ctx");
  1144. }));
  1145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1146. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1147. //>>excludeEnd("ctx");
  1148. }));
  1149. return self;
  1150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1151. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.HLToolModel)});
  1152. //>>excludeEnd("ctx");
  1153. },
  1154. //>>excludeStart("ide", pragmas.excludeIdeData);
  1155. args: [],
  1156. source: "removeClass\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove class ', self selectedClass theNonMetaClass name\x0a\x09\x09\x09ifTrue: [ self environment removeClass: self selectedClass theNonMetaClass ] ]",
  1157. referencedClasses: [],
  1158. //>>excludeEnd("ide");
  1159. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "theNonMetaClass", "selectedClass", "removeClass:", "environment"]
  1160. }),
  1161. $globals.HLToolModel);
  1162. $core.addMethod(
  1163. $core.method({
  1164. selector: "removeMethod",
  1165. protocol: "commands actions",
  1166. fn: function (){
  1167. var self=this;
  1168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1169. return $core.withContext(function($ctx1) {
  1170. //>>excludeEnd("ctx");
  1171. var $1,$7,$6,$5,$4,$3,$9,$8,$2;
  1172. self._withChangesDo_((function(){
  1173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1174. return $core.withContext(function($ctx2) {
  1175. //>>excludeEnd("ctx");
  1176. $1=self._manager();
  1177. $7=self._selectedMethod();
  1178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1179. $ctx2.sendIdx["selectedMethod"]=1;
  1180. //>>excludeEnd("ctx");
  1181. $6=$recv($7)._methodClass();
  1182. $5=$recv($6)._name();
  1183. $4="Do you REALLY want to remove method ".__comma($5);
  1184. $3=$recv($4).__comma(" >> #");
  1185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1186. $ctx2.sendIdx[","]=2;
  1187. //>>excludeEnd("ctx");
  1188. $9=self._selectedMethod();
  1189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1190. $ctx2.sendIdx["selectedMethod"]=2;
  1191. //>>excludeEnd("ctx");
  1192. $8=$recv($9)._selector();
  1193. $2=$recv($3).__comma($8);
  1194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1195. $ctx2.sendIdx[","]=1;
  1196. //>>excludeEnd("ctx");
  1197. return $recv($1)._confirm_ifTrue_($2,(function(){
  1198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1199. return $core.withContext(function($ctx3) {
  1200. //>>excludeEnd("ctx");
  1201. return $recv(self._environment())._removeMethod_(self._selectedMethod());
  1202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1203. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1204. //>>excludeEnd("ctx");
  1205. }));
  1206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1207. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1208. //>>excludeEnd("ctx");
  1209. }));
  1210. return self;
  1211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1212. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.HLToolModel)});
  1213. //>>excludeEnd("ctx");
  1214. },
  1215. //>>excludeStart("ide", pragmas.excludeIdeData);
  1216. args: [],
  1217. source: "removeMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove method ', self selectedMethod methodClass name,' >> #', self selectedMethod selector\x0a\x09\x09\x09ifTrue: [ self environment removeMethod: self selectedMethod ] ]",
  1218. referencedClasses: [],
  1219. //>>excludeEnd("ide");
  1220. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "methodClass", "selectedMethod", "selector", "removeMethod:", "environment"]
  1221. }),
  1222. $globals.HLToolModel);
  1223. $core.addMethod(
  1224. $core.method({
  1225. selector: "removeProtocol",
  1226. protocol: "commands actions",
  1227. fn: function (){
  1228. var self=this;
  1229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1230. return $core.withContext(function($ctx1) {
  1231. //>>excludeEnd("ctx");
  1232. var $1,$3,$2;
  1233. self._withChangesDo_((function(){
  1234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1235. return $core.withContext(function($ctx2) {
  1236. //>>excludeEnd("ctx");
  1237. $1=self._manager();
  1238. $3=self._selectedProtocol();
  1239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1240. $ctx2.sendIdx["selectedProtocol"]=1;
  1241. //>>excludeEnd("ctx");
  1242. $2="Do you REALLY want to remove protocol ".__comma($3);
  1243. return $recv($1)._confirm_ifTrue_($2,(function(){
  1244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1245. return $core.withContext(function($ctx3) {
  1246. //>>excludeEnd("ctx");
  1247. return $recv(self._environment())._removeProtocol_from_(self._selectedProtocol(),self._selectedClass());
  1248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1249. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1250. //>>excludeEnd("ctx");
  1251. }));
  1252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1253. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1254. //>>excludeEnd("ctx");
  1255. }));
  1256. return self;
  1257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1258. }, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},$globals.HLToolModel)});
  1259. //>>excludeEnd("ctx");
  1260. },
  1261. //>>excludeStart("ide", pragmas.excludeIdeData);
  1262. args: [],
  1263. source: "removeProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self manager \x0a\x09\x09\x09confirm: 'Do you REALLY want to remove protocol ', self selectedProtocol\x0a\x09\x09\x09ifTrue: [ self environment \x0a\x09\x09\x09\x09removeProtocol: self selectedProtocol \x0a\x09\x09\x09\x09from: self selectedClass ] ]",
  1264. referencedClasses: [],
  1265. //>>excludeEnd("ide");
  1266. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "selectedProtocol", "removeProtocol:from:", "environment", "selectedClass"]
  1267. }),
  1268. $globals.HLToolModel);
  1269. $core.addMethod(
  1270. $core.method({
  1271. selector: "renameClassTo:",
  1272. protocol: "commands actions",
  1273. fn: function (aClassName){
  1274. var self=this;
  1275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1276. return $core.withContext(function($ctx1) {
  1277. //>>excludeEnd("ctx");
  1278. self._withChangesDo_((function(){
  1279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1280. return $core.withContext(function($ctx2) {
  1281. //>>excludeEnd("ctx");
  1282. return $recv(self._environment())._renameClass_to_($recv(self._selectedClass())._theNonMetaClass(),aClassName);
  1283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1284. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1285. //>>excludeEnd("ctx");
  1286. }));
  1287. return self;
  1288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1289. }, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  1290. //>>excludeEnd("ctx");
  1291. },
  1292. //>>excludeStart("ide", pragmas.excludeIdeData);
  1293. args: ["aClassName"],
  1294. source: "renameClassTo: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  1295. referencedClasses: [],
  1296. //>>excludeEnd("ide");
  1297. messageSends: ["withChangesDo:", "renameClass:to:", "environment", "theNonMetaClass", "selectedClass"]
  1298. }),
  1299. $globals.HLToolModel);
  1300. $core.addMethod(
  1301. $core.method({
  1302. selector: "renamePackageTo:",
  1303. protocol: "commands actions",
  1304. fn: function (aPackageName){
  1305. var self=this;
  1306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1307. return $core.withContext(function($ctx1) {
  1308. //>>excludeEnd("ctx");
  1309. self._withChangesDo_((function(){
  1310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1311. return $core.withContext(function($ctx2) {
  1312. //>>excludeEnd("ctx");
  1313. return $recv(self._environment())._renamePackage_to_($recv(self._selectedPackage())._name(),aPackageName);
  1314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1315. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1316. //>>excludeEnd("ctx");
  1317. }));
  1318. return self;
  1319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1320. }, function($ctx1) {$ctx1.fill(self,"renamePackageTo:",{aPackageName:aPackageName},$globals.HLToolModel)});
  1321. //>>excludeEnd("ctx");
  1322. },
  1323. //>>excludeStart("ide", pragmas.excludeIdeData);
  1324. args: ["aPackageName"],
  1325. source: "renamePackageTo: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment\x0a\x09\x09\x09renamePackage: self selectedPackage name\x0a\x09\x09\x09to: aPackageName ]",
  1326. referencedClasses: [],
  1327. //>>excludeEnd("ide");
  1328. messageSends: ["withChangesDo:", "renamePackage:to:", "environment", "name", "selectedPackage"]
  1329. }),
  1330. $globals.HLToolModel);
  1331. $core.addMethod(
  1332. $core.method({
  1333. selector: "renameProtocolTo:",
  1334. protocol: "commands actions",
  1335. fn: function (aString){
  1336. var self=this;
  1337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1338. return $core.withContext(function($ctx1) {
  1339. //>>excludeEnd("ctx");
  1340. self._withChangesDo_((function(){
  1341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1342. return $core.withContext(function($ctx2) {
  1343. //>>excludeEnd("ctx");
  1344. return $recv(self._environment())._renameProtocol_to_in_(self._selectedProtocol(),aString,self._selectedClass());
  1345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1346. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1347. //>>excludeEnd("ctx");
  1348. }));
  1349. return self;
  1350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1351. }, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},$globals.HLToolModel)});
  1352. //>>excludeEnd("ctx");
  1353. },
  1354. //>>excludeStart("ide", pragmas.excludeIdeData);
  1355. args: ["aString"],
  1356. source: "renameProtocolTo: aString\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameProtocol: self selectedProtocol\x0a\x09\x09\x09to: aString\x0a\x09\x09\x09in: self selectedClass ]",
  1357. referencedClasses: [],
  1358. //>>excludeEnd("ide");
  1359. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "environment", "selectedProtocol", "selectedClass"]
  1360. }),
  1361. $globals.HLToolModel);
  1362. $core.addMethod(
  1363. $core.method({
  1364. selector: "save:",
  1365. protocol: "actions",
  1366. fn: function (aString){
  1367. var self=this;
  1368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1369. return $core.withContext(function($ctx1) {
  1370. //>>excludeEnd("ctx");
  1371. var $1;
  1372. $recv(self._announcer())._announce_($recv($globals.HLSourceCodeSaved)._new());
  1373. $1=self._shouldCompileDefinition_(aString);
  1374. if($core.assert($1)){
  1375. self._compileClassDefinition_(aString);
  1376. } else {
  1377. self._compileMethod_(aString);
  1378. }
  1379. return self;
  1380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1381. }, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},$globals.HLToolModel)});
  1382. //>>excludeEnd("ctx");
  1383. },
  1384. //>>excludeStart("ide", pragmas.excludeIdeData);
  1385. args: ["aString"],
  1386. source: "save: aString\x0a\x09self announcer announce: HLSourceCodeSaved new.\x0a\x09\x0a\x09(self shouldCompileDefinition: aString)\x0a\x09\x09ifTrue: [ self compileClassDefinition: aString ]\x0a\x09\x09ifFalse: [ self compileMethod: aString ]",
  1387. referencedClasses: ["HLSourceCodeSaved"],
  1388. //>>excludeEnd("ide");
  1389. messageSends: ["announce:", "announcer", "new", "ifTrue:ifFalse:", "shouldCompileDefinition:", "compileClassDefinition:", "compileMethod:"]
  1390. }),
  1391. $globals.HLToolModel);
  1392. $core.addMethod(
  1393. $core.method({
  1394. selector: "saveSourceCode",
  1395. protocol: "actions",
  1396. fn: function (){
  1397. var self=this;
  1398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1399. return $core.withContext(function($ctx1) {
  1400. //>>excludeEnd("ctx");
  1401. $recv(self._announcer())._announce_($recv($globals.HLSaveSourceCode)._new());
  1402. return self;
  1403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1404. }, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},$globals.HLToolModel)});
  1405. //>>excludeEnd("ctx");
  1406. },
  1407. //>>excludeStart("ide", pragmas.excludeIdeData);
  1408. args: [],
  1409. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  1410. referencedClasses: ["HLSaveSourceCode"],
  1411. //>>excludeEnd("ide");
  1412. messageSends: ["announce:", "announcer", "new"]
  1413. }),
  1414. $globals.HLToolModel);
  1415. $core.addMethod(
  1416. $core.method({
  1417. selector: "selectedClass",
  1418. protocol: "accessing",
  1419. fn: function (){
  1420. var self=this;
  1421. return self["@selectedClass"];
  1422. },
  1423. //>>excludeStart("ide", pragmas.excludeIdeData);
  1424. args: [],
  1425. source: "selectedClass\x0a\x09^ selectedClass",
  1426. referencedClasses: [],
  1427. //>>excludeEnd("ide");
  1428. messageSends: []
  1429. }),
  1430. $globals.HLToolModel);
  1431. $core.addMethod(
  1432. $core.method({
  1433. selector: "selectedClass:",
  1434. protocol: "accessing",
  1435. fn: function (aClass){
  1436. var self=this;
  1437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1438. return $core.withContext(function($ctx1) {
  1439. //>>excludeEnd("ctx");
  1440. var $3,$2,$1,$5,$4,$6,$receiver;
  1441. $3=self._selectedClass();
  1442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1443. $ctx1.sendIdx["selectedClass"]=1;
  1444. //>>excludeEnd("ctx");
  1445. $2=$recv($3).__eq(aClass);
  1446. $1=$recv($2)._and_((function(){
  1447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1448. return $core.withContext(function($ctx2) {
  1449. //>>excludeEnd("ctx");
  1450. return $recv(aClass)._isNil();
  1451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1452. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1453. //>>excludeEnd("ctx");
  1454. }));
  1455. if($core.assert($1)){
  1456. return self;
  1457. }
  1458. self._withChangesDo_((function(){
  1459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1460. return $core.withContext(function($ctx2) {
  1461. //>>excludeEnd("ctx");
  1462. if(($receiver = aClass) == null || $receiver.isNil){
  1463. self["@selectedClass"]=nil;
  1464. self["@selectedClass"];
  1465. } else {
  1466. $5=$recv(aClass)._theNonMetaClass();
  1467. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1468. $ctx2.sendIdx["theNonMetaClass"]=1;
  1469. //>>excludeEnd("ctx");
  1470. $4=$recv($5)._package();
  1471. self._selectedPackage_($4);
  1472. $6=self._showInstance();
  1473. if($core.assert($6)){
  1474. self["@selectedClass"]=$recv(aClass)._theNonMetaClass();
  1475. self["@selectedClass"];
  1476. } else {
  1477. self["@selectedClass"]=$recv(aClass)._theMetaClass();
  1478. self["@selectedClass"];
  1479. }
  1480. }
  1481. self["@selectedProtocol"]=nil;
  1482. self["@selectedProtocol"];
  1483. self._selectedProtocol_(self._allProtocol());
  1484. return $recv(self._announcer())._announce_($recv($globals.HLClassSelected)._on_(self._selectedClass()));
  1485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1486. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1487. //>>excludeEnd("ctx");
  1488. }));
  1489. return self;
  1490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1491. }, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},$globals.HLToolModel)});
  1492. //>>excludeEnd("ctx");
  1493. },
  1494. //>>excludeStart("ide", pragmas.excludeIdeData);
  1495. args: ["aClass"],
  1496. source: "selectedClass: aClass\x0a\x09(self selectedClass = aClass and: [ aClass isNil ]) \x0a\x09\x09ifTrue: [ ^ self ].\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09aClass \x0a \x09\x09\x09ifNil: [ selectedClass := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09self selectedPackage: aClass theNonMetaClass package.\x0a\x09\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a\x09\x09selectedProtocol := nil.\x0a\x09\x09self selectedProtocol: self allProtocol.\x0a\x09\x09self announcer announce: (HLClassSelected on: self selectedClass) ]",
  1497. referencedClasses: ["HLClassSelected"],
  1498. //>>excludeEnd("ide");
  1499. messageSends: ["ifTrue:", "and:", "=", "selectedClass", "isNil", "withChangesDo:", "ifNil:ifNotNil:", "selectedPackage:", "package", "theNonMetaClass", "ifTrue:ifFalse:", "showInstance", "theMetaClass", "selectedProtocol:", "allProtocol", "announce:", "announcer", "on:"]
  1500. }),
  1501. $globals.HLToolModel);
  1502. $core.addMethod(
  1503. $core.method({
  1504. selector: "selectedMethod",
  1505. protocol: "accessing",
  1506. fn: function (){
  1507. var self=this;
  1508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1509. return $core.withContext(function($ctx1) {
  1510. //>>excludeEnd("ctx");
  1511. var $1,$receiver;
  1512. $1=self._selectedClass();
  1513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1514. $ctx1.sendIdx["selectedClass"]=1;
  1515. //>>excludeEnd("ctx");
  1516. if(($receiver = $1) == null || $receiver.isNil){
  1517. return $1;
  1518. } else {
  1519. return $recv($recv(self._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  1520. return nil;
  1521. }));
  1522. }
  1523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1524. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},$globals.HLToolModel)});
  1525. //>>excludeEnd("ctx");
  1526. },
  1527. //>>excludeStart("ide", pragmas.excludeIdeData);
  1528. args: [],
  1529. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09ifAbsent: [ nil ] ]",
  1530. referencedClasses: [],
  1531. //>>excludeEnd("ide");
  1532. messageSends: ["ifNotNil:", "selectedClass", "at:ifAbsent:", "methodDictionary"]
  1533. }),
  1534. $globals.HLToolModel);
  1535. $core.addMethod(
  1536. $core.method({
  1537. selector: "selectedMethod:",
  1538. protocol: "accessing",
  1539. fn: function (aCompiledMethod){
  1540. var self=this;
  1541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1542. return $core.withContext(function($ctx1) {
  1543. //>>excludeEnd("ctx");
  1544. var $1,$2,$receiver;
  1545. $1=$recv(self["@selectedSelector"]).__eq(aCompiledMethod);
  1546. if($core.assert($1)){
  1547. return self;
  1548. }
  1549. self._withChangesDo_((function(){
  1550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1551. return $core.withContext(function($ctx2) {
  1552. //>>excludeEnd("ctx");
  1553. if(($receiver = aCompiledMethod) == null || $receiver.isNil){
  1554. self["@selectedSelector"]=nil;
  1555. self["@selectedSelector"];
  1556. } else {
  1557. self["@selectedSelector"]=$recv(aCompiledMethod)._selector();
  1558. self["@selectedSelector"];
  1559. $2=$recv($recv(self["@selectedClass"])._notNil())._and_((function(){
  1560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1561. return $core.withContext(function($ctx3) {
  1562. //>>excludeEnd("ctx");
  1563. return $recv($recv(self["@selectedClass"])._methodDictionary())._includesKey_(self["@selectedSelector"]);
  1564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1565. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  1566. //>>excludeEnd("ctx");
  1567. }));
  1568. if(!$core.assert($2)){
  1569. self["@selectedClass"]=$recv(aCompiledMethod)._methodClass();
  1570. self["@selectedClass"];
  1571. self["@selectedPackage"]=$recv($recv(self["@selectedClass"])._theNonMetaClass())._package();
  1572. self["@selectedPackage"];
  1573. }
  1574. }
  1575. return $recv(self._announcer())._announce_($recv($globals.HLMethodSelected)._on_(aCompiledMethod));
  1576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1577. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1578. //>>excludeEnd("ctx");
  1579. }));
  1580. return self;
  1581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1582. }, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLToolModel)});
  1583. //>>excludeEnd("ctx");
  1584. },
  1585. //>>excludeStart("ide", pragmas.excludeIdeData);
  1586. args: ["aCompiledMethod"],
  1587. source: "selectedMethod: aCompiledMethod\x0a\x09selectedSelector = aCompiledMethod ifTrue: [ ^ self ].\x0a \x0a self withChangesDo: [\x0a\x09\x09aCompiledMethod\x0a \x09\x09ifNil: [ selectedSelector := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09selectedSelector := aCompiledMethod selector.\x0a\x09\x09\x09\x09(selectedClass notNil and: [ selectedClass methodDictionary includesKey: selectedSelector ]) ifFalse: [\x0a\x09\x09\x09\x09\x09selectedClass := aCompiledMethod methodClass.\x0a\x09\x09\x09\x09\x09selectedPackage := selectedClass theNonMetaClass package ] ].\x0a\x0a\x09\x09self announcer announce: (HLMethodSelected on: aCompiledMethod) ]",
  1588. referencedClasses: ["HLMethodSelected"],
  1589. //>>excludeEnd("ide");
  1590. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "selector", "ifFalse:", "and:", "notNil", "includesKey:", "methodDictionary", "methodClass", "package", "theNonMetaClass", "announce:", "announcer", "on:"]
  1591. }),
  1592. $globals.HLToolModel);
  1593. $core.addMethod(
  1594. $core.method({
  1595. selector: "selectedPackage",
  1596. protocol: "accessing",
  1597. fn: function (){
  1598. var self=this;
  1599. return self["@selectedPackage"];
  1600. },
  1601. //>>excludeStart("ide", pragmas.excludeIdeData);
  1602. args: [],
  1603. source: "selectedPackage\x0a\x09^ selectedPackage",
  1604. referencedClasses: [],
  1605. //>>excludeEnd("ide");
  1606. messageSends: []
  1607. }),
  1608. $globals.HLToolModel);
  1609. $core.addMethod(
  1610. $core.method({
  1611. selector: "selectedPackage:",
  1612. protocol: "accessing",
  1613. fn: function (aPackage){
  1614. var self=this;
  1615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1616. return $core.withContext(function($ctx1) {
  1617. //>>excludeEnd("ctx");
  1618. var $1;
  1619. $1=$recv(self["@selectedPackage"]).__eq(aPackage);
  1620. if($core.assert($1)){
  1621. return self;
  1622. }
  1623. self._withChangesDo_((function(){
  1624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1625. return $core.withContext(function($ctx2) {
  1626. //>>excludeEnd("ctx");
  1627. self["@selectedPackage"]=aPackage;
  1628. self["@selectedPackage"];
  1629. self._selectedClass_(nil);
  1630. return $recv(self._announcer())._announce_($recv($globals.HLPackageSelected)._on_(aPackage));
  1631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1632. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1633. //>>excludeEnd("ctx");
  1634. }));
  1635. return self;
  1636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1637. }, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  1638. //>>excludeEnd("ctx");
  1639. },
  1640. //>>excludeStart("ide", pragmas.excludeIdeData);
  1641. args: ["aPackage"],
  1642. source: "selectedPackage: aPackage\x0a\x09selectedPackage = aPackage ifTrue: [ ^ self ].\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09selectedPackage := aPackage.\x0a\x09\x09self selectedClass: nil.\x0a\x09\x09self announcer announce: (HLPackageSelected on: aPackage) ]",
  1643. referencedClasses: ["HLPackageSelected"],
  1644. //>>excludeEnd("ide");
  1645. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "announcer", "on:"]
  1646. }),
  1647. $globals.HLToolModel);
  1648. $core.addMethod(
  1649. $core.method({
  1650. selector: "selectedProtocol",
  1651. protocol: "accessing",
  1652. fn: function (){
  1653. var self=this;
  1654. return self["@selectedProtocol"];
  1655. },
  1656. //>>excludeStart("ide", pragmas.excludeIdeData);
  1657. args: [],
  1658. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1659. referencedClasses: [],
  1660. //>>excludeEnd("ide");
  1661. messageSends: []
  1662. }),
  1663. $globals.HLToolModel);
  1664. $core.addMethod(
  1665. $core.method({
  1666. selector: "selectedProtocol:",
  1667. protocol: "accessing",
  1668. fn: function (aString){
  1669. var self=this;
  1670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1671. return $core.withContext(function($ctx1) {
  1672. //>>excludeEnd("ctx");
  1673. var $1;
  1674. $1=$recv(self["@selectedProtocol"]).__eq(aString);
  1675. if($core.assert($1)){
  1676. return self;
  1677. }
  1678. self._withChangesDo_((function(){
  1679. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1680. return $core.withContext(function($ctx2) {
  1681. //>>excludeEnd("ctx");
  1682. self["@selectedProtocol"]=aString;
  1683. self["@selectedProtocol"];
  1684. self._selectedMethod_(nil);
  1685. return $recv(self._announcer())._announce_($recv($globals.HLProtocolSelected)._on_(aString));
  1686. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1687. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1688. //>>excludeEnd("ctx");
  1689. }));
  1690. return self;
  1691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1692. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},$globals.HLToolModel)});
  1693. //>>excludeEnd("ctx");
  1694. },
  1695. //>>excludeStart("ide", pragmas.excludeIdeData);
  1696. args: ["aString"],
  1697. source: "selectedProtocol: aString\x0a\x09selectedProtocol = aString ifTrue: [ ^ self ].\x0a\x0a\x09self withChangesDo: [\x0a\x09\x09selectedProtocol := aString.\x0a\x09\x09self selectedMethod: nil.\x0a\x09\x09self announcer announce: (HLProtocolSelected on: aString) ]",
  1698. referencedClasses: ["HLProtocolSelected"],
  1699. //>>excludeEnd("ide");
  1700. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "announcer", "on:"]
  1701. }),
  1702. $globals.HLToolModel);
  1703. $core.addMethod(
  1704. $core.method({
  1705. selector: "shouldCompileDefinition:",
  1706. protocol: "testing",
  1707. fn: function (aString){
  1708. var self=this;
  1709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1710. return $core.withContext(function($ctx1) {
  1711. //>>excludeEnd("ctx");
  1712. return $recv($recv(self._selectedClass())._isNil())._or_((function(){
  1713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1714. return $core.withContext(function($ctx2) {
  1715. //>>excludeEnd("ctx");
  1716. return $recv(aString)._match_("^\x5cs*[A-Z]");
  1717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1718. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1719. //>>excludeEnd("ctx");
  1720. }));
  1721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1722. }, function($ctx1) {$ctx1.fill(self,"shouldCompileDefinition:",{aString:aString},$globals.HLToolModel)});
  1723. //>>excludeEnd("ctx");
  1724. },
  1725. //>>excludeStart("ide", pragmas.excludeIdeData);
  1726. args: ["aString"],
  1727. source: "shouldCompileDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^\x5cs*[A-Z]' ]",
  1728. referencedClasses: [],
  1729. //>>excludeEnd("ide");
  1730. messageSends: ["or:", "isNil", "selectedClass", "match:"]
  1731. }),
  1732. $globals.HLToolModel);
  1733. $core.addMethod(
  1734. $core.method({
  1735. selector: "unclassifiedProtocol",
  1736. protocol: "defaults",
  1737. fn: function (){
  1738. var self=this;
  1739. return "as yet unclassified";
  1740. },
  1741. //>>excludeStart("ide", pragmas.excludeIdeData);
  1742. args: [],
  1743. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  1744. referencedClasses: [],
  1745. //>>excludeEnd("ide");
  1746. messageSends: []
  1747. }),
  1748. $globals.HLToolModel);
  1749. $core.addMethod(
  1750. $core.method({
  1751. selector: "withCompileErrorHandling:",
  1752. protocol: "error handling",
  1753. fn: function (aBlock){
  1754. var self=this;
  1755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1756. return $core.withContext(function($ctx1) {
  1757. //>>excludeEnd("ctx");
  1758. var $1,$2;
  1759. $1=self._environment();
  1760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1761. $ctx1.sendIdx["environment"]=1;
  1762. //>>excludeEnd("ctx");
  1763. $recv($1)._evaluate_on_do_((function(){
  1764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1765. return $core.withContext(function($ctx2) {
  1766. //>>excludeEnd("ctx");
  1767. $2=self._environment();
  1768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1769. $ctx2.sendIdx["environment"]=2;
  1770. //>>excludeEnd("ctx");
  1771. return $recv($2)._evaluate_on_do_((function(){
  1772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1773. return $core.withContext(function($ctx3) {
  1774. //>>excludeEnd("ctx");
  1775. return $recv(self._environment())._evaluate_on_do_(aBlock,$globals.ParseError,(function(ex){
  1776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1777. return $core.withContext(function($ctx4) {
  1778. //>>excludeEnd("ctx");
  1779. return self._handleParseError_(ex);
  1780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1781. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx3,3)});
  1782. //>>excludeEnd("ctx");
  1783. }));
  1784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1785. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1786. //>>excludeEnd("ctx");
  1787. }),$globals.UnknownVariableError,(function(ex){
  1788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1789. return $core.withContext(function($ctx3) {
  1790. //>>excludeEnd("ctx");
  1791. return self._handleUnkownVariableError_(ex);
  1792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1793. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx2,4)});
  1794. //>>excludeEnd("ctx");
  1795. }));
  1796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1797. $ctx2.sendIdx["evaluate:on:do:"]=2;
  1798. //>>excludeEnd("ctx");
  1799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1800. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1801. //>>excludeEnd("ctx");
  1802. }),$globals.CompilerError,(function(ex){
  1803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1804. return $core.withContext(function($ctx2) {
  1805. //>>excludeEnd("ctx");
  1806. return self._handleCompileError_(ex);
  1807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1808. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,5)});
  1809. //>>excludeEnd("ctx");
  1810. }));
  1811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1812. $ctx1.sendIdx["evaluate:on:do:"]=1;
  1813. //>>excludeEnd("ctx");
  1814. return self;
  1815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1816. }, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},$globals.HLToolModel)});
  1817. //>>excludeEnd("ctx");
  1818. },
  1819. //>>excludeStart("ide", pragmas.excludeIdeData);
  1820. args: ["aBlock"],
  1821. source: "withCompileErrorHandling: aBlock\x0a\x09self environment\x0a\x09\x09evaluate: [\x0a\x09\x09\x09self environment \x0a\x09\x09\x09evaluate: [\x0a\x09\x09\x09\x09self environment \x0a\x09\x09\x09\x09\x09evaluate: aBlock\x0a\x09\x09\x09\x09\x09on: ParseError\x0a\x09\x09\x09\x09\x09do: [ :ex | self handleParseError: ex ] ]\x0a\x09\x09\x09on: UnknownVariableError\x0a\x09\x09\x09do: [ :ex | self handleUnkownVariableError: ex ] ]\x0a\x09\x09on: CompilerError\x0a\x09\x09do: [ :ex | self handleCompileError: ex ]",
  1822. referencedClasses: ["ParseError", "UnknownVariableError", "CompilerError"],
  1823. //>>excludeEnd("ide");
  1824. messageSends: ["evaluate:on:do:", "environment", "handleParseError:", "handleUnkownVariableError:", "handleCompileError:"]
  1825. }),
  1826. $globals.HLToolModel);
  1827. $core.addMethod(
  1828. $core.method({
  1829. selector: "withHelperLabelled:do:",
  1830. protocol: "private",
  1831. fn: function (aString,aBlock){
  1832. var self=this;
  1833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1834. return $core.withContext(function($ctx1) {
  1835. //>>excludeEnd("ctx");
  1836. var $1,$3,$2,$4;
  1837. $1="#helper"._asJQuery();
  1838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1839. $ctx1.sendIdx["asJQuery"]=1;
  1840. //>>excludeEnd("ctx");
  1841. $recv($1)._remove();
  1842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1843. $ctx1.sendIdx["remove"]=1;
  1844. //>>excludeEnd("ctx");
  1845. $2=(function(html){
  1846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1847. return $core.withContext(function($ctx2) {
  1848. //>>excludeEnd("ctx");
  1849. $3=$recv(html)._div();
  1850. $recv($3)._id_("helper");
  1851. return $recv($3)._with_(aString);
  1852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1853. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1854. //>>excludeEnd("ctx");
  1855. });
  1856. $4="body"._asJQuery();
  1857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1858. $ctx1.sendIdx["asJQuery"]=2;
  1859. //>>excludeEnd("ctx");
  1860. $recv($2)._appendToJQuery_($4);
  1861. $recv((function(){
  1862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1863. return $core.withContext(function($ctx2) {
  1864. //>>excludeEnd("ctx");
  1865. $recv(aBlock)._value();
  1866. return $recv("#helper"._asJQuery())._remove();
  1867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1868. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1869. //>>excludeEnd("ctx");
  1870. }))._fork();
  1871. return self;
  1872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1873. }, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},$globals.HLToolModel)});
  1874. //>>excludeEnd("ctx");
  1875. },
  1876. //>>excludeStart("ide", pragmas.excludeIdeData);
  1877. args: ["aString", "aBlock"],
  1878. source: "withHelperLabelled: aString do: aBlock\x0a\x09\x22TODO: doesn't belong here\x22\x0a\x0a\x09'#helper' asJQuery remove.\x0a\x0a\x09[ :html |\x0a\x09\x09html div \x0a\x09\x09\x09id: 'helper';\x0a\x09\x09\x09with: aString ] appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09[\x0a\x09\x09aBlock value.\x0a\x09\x09'#helper' asJQuery remove ] fork",
  1879. referencedClasses: [],
  1880. //>>excludeEnd("ide");
  1881. messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", "fork", "value"]
  1882. }),
  1883. $globals.HLToolModel);
  1884. $core.addMethod(
  1885. $core.method({
  1886. selector: "on:",
  1887. protocol: "actions",
  1888. fn: function (anEnvironment){
  1889. var self=this;
  1890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1891. return $core.withContext(function($ctx1) {
  1892. //>>excludeEnd("ctx");
  1893. var $1;
  1894. $1=self._new();
  1895. $recv($1)._environment_(anEnvironment);
  1896. return $recv($1)._yourself();
  1897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1898. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},$globals.HLToolModel.klass)});
  1899. //>>excludeEnd("ctx");
  1900. },
  1901. //>>excludeStart("ide", pragmas.excludeIdeData);
  1902. args: ["anEnvironment"],
  1903. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1904. referencedClasses: [],
  1905. //>>excludeEnd("ide");
  1906. messageSends: ["environment:", "new", "yourself"]
  1907. }),
  1908. $globals.HLToolModel.klass);
  1909. $core.addClass("HLProgressHandler", $globals.Object, [], "Helios-Core");
  1910. //>>excludeStart("ide", pragmas.excludeIdeData);
  1911. $globals.HLProgressHandler.comment="I am a specific progress handler for Helios, displaying progresses in a modal window.";
  1912. //>>excludeEnd("ide");
  1913. $core.addMethod(
  1914. $core.method({
  1915. selector: "do:on:displaying:",
  1916. protocol: "progress handling",
  1917. fn: function (aBlock,aCollection,aString){
  1918. var self=this;
  1919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1920. return $core.withContext(function($ctx1) {
  1921. //>>excludeEnd("ctx");
  1922. $recv($recv($globals.HLProgressWidget)._default())._do_on_displaying_(aBlock,aCollection,aString);
  1923. return self;
  1924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1925. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.HLProgressHandler)});
  1926. //>>excludeEnd("ctx");
  1927. },
  1928. //>>excludeStart("ide", pragmas.excludeIdeData);
  1929. args: ["aBlock", "aCollection", "aString"],
  1930. source: "do: aBlock on: aCollection displaying: aString\x0a\x09HLProgressWidget default\x0a\x09\x09do: aBlock \x0a\x09\x09on: aCollection \x0a\x09\x09displaying: aString",
  1931. referencedClasses: ["HLProgressWidget"],
  1932. //>>excludeEnd("ide");
  1933. messageSends: ["do:on:displaying:", "default"]
  1934. }),
  1935. $globals.HLProgressHandler);
  1936. $core.addClass("HLWidget", $globals.Widget, ["wrapper"], "Helios-Core");
  1937. //>>excludeStart("ide", pragmas.excludeIdeData);
  1938. $globals.HLWidget.comment="I am the abstract superclass of all Helios widgets.\x0a\x0aI provide common methods, additional behavior to widgets useful for Helios, like dialog creation, command execution and tab creation.\x0a\x0a## API\x0a\x0a1. Rendering\x0a\x0a Instead of overriding `#renderOn:` as with other Widget subclasses, my subclasses should override `#renderContentOn:`.\x0a\x0a2. Refreshing\x0a\x0a To re-render a widget, use `#refresh`.\x0a\x0a3. Key bindings registration and tabs\x0a\x0a When displayed as a tab, the widget has a chance to register keybindings with the `#registerBindingsOn:` hook method.\x0a \x0a4. Unregistration\x0a\x0a When a widget has subscribed to announcements or other actions that need to be cleared when closing the tab, the hook method `#unregister` will be called by helios.\x0a\x0a5. Tabs\x0a\x0a To enable a widget class to be open as a tab, override the class-side `#canBeOpenAsTab` method to answer `true`. `#tabClass` and `#tabPriority` can be overridden too to respectively change the css class of the tab and the order of tabs in the main menu.\x0a\x0a6. Command execution\x0a\x0a An helios command (instance of `HLCommand` or one of its subclass) can be executed with `#execute:`.";
  1939. //>>excludeEnd("ide");
  1940. $core.addMethod(
  1941. $core.method({
  1942. selector: "bindKeyDown:keyUp:",
  1943. protocol: "keybindings",
  1944. fn: function (keyDownBlock,keyUpBlock){
  1945. var self=this;
  1946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1947. return $core.withContext(function($ctx1) {
  1948. //>>excludeEnd("ctx");
  1949. var $1,$2,$receiver;
  1950. $1=self._wrapper();
  1951. if(($receiver = $1) == null || $receiver.isNil){
  1952. $1;
  1953. } else {
  1954. $2=self["@wrapper"];
  1955. $recv($2)._onKeyDown_(keyDownBlock);
  1956. $recv($2)._onKeyUp_(keyUpBlock);
  1957. }
  1958. return self;
  1959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1960. }, function($ctx1) {$ctx1.fill(self,"bindKeyDown:keyUp:",{keyDownBlock:keyDownBlock,keyUpBlock:keyUpBlock},$globals.HLWidget)});
  1961. //>>excludeEnd("ctx");
  1962. },
  1963. //>>excludeStart("ide", pragmas.excludeIdeData);
  1964. args: ["keyDownBlock", "keyUpBlock"],
  1965. source: "bindKeyDown: keyDownBlock keyUp: keyUpBlock\x0a\x09self wrapper ifNotNil: [ wrapper\x0a\x09\x09onKeyDown: keyDownBlock;\x0a\x09\x09onKeyUp: keyUpBlock ]",
  1966. referencedClasses: [],
  1967. //>>excludeEnd("ide");
  1968. messageSends: ["ifNotNil:", "wrapper", "onKeyDown:", "onKeyUp:"]
  1969. }),
  1970. $globals.HLWidget);
  1971. $core.addMethod(
  1972. $core.method({
  1973. selector: "canHaveFocus",
  1974. protocol: "testing",
  1975. fn: function (){
  1976. var self=this;
  1977. return false;
  1978. },
  1979. //>>excludeStart("ide", pragmas.excludeIdeData);
  1980. args: [],
  1981. source: "canHaveFocus\x0a\x09^ false",
  1982. referencedClasses: [],
  1983. //>>excludeEnd("ide");
  1984. messageSends: []
  1985. }),
  1986. $globals.HLWidget);
  1987. $core.addMethod(
  1988. $core.method({
  1989. selector: "confirm:ifTrue:",
  1990. protocol: "actions",
  1991. fn: function (aString,aBlock){
  1992. var self=this;
  1993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1994. return $core.withContext(function($ctx1) {
  1995. //>>excludeEnd("ctx");
  1996. $recv(self._manager())._confirm_ifTrue_(aString,aBlock);
  1997. return self;
  1998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1999. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2000. //>>excludeEnd("ctx");
  2001. },
  2002. //>>excludeStart("ide", pragmas.excludeIdeData);
  2003. args: ["aString", "aBlock"],
  2004. source: "confirm: aString ifTrue: aBlock\x0a\x09self manager confirm: aString ifTrue: aBlock",
  2005. referencedClasses: [],
  2006. //>>excludeEnd("ide");
  2007. messageSends: ["confirm:ifTrue:", "manager"]
  2008. }),
  2009. $globals.HLWidget);
  2010. $core.addMethod(
  2011. $core.method({
  2012. selector: "confirm:ifTrue:ifFalse:",
  2013. protocol: "actions",
  2014. fn: function (aString,aBlock,anotherBlock){
  2015. var self=this;
  2016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2017. return $core.withContext(function($ctx1) {
  2018. //>>excludeEnd("ctx");
  2019. $recv(self._manager())._confirm_ifTrue_ifFalse_(aString,aBlock,anotherBlock);
  2020. return self;
  2021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2022. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLWidget)});
  2023. //>>excludeEnd("ctx");
  2024. },
  2025. //>>excludeStart("ide", pragmas.excludeIdeData);
  2026. args: ["aString", "aBlock", "anotherBlock"],
  2027. source: "confirm: aString ifTrue: aBlock ifFalse: anotherBlock\x0a\x09self manager \x0a\x09\x09confirm: aString \x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: anotherBlock",
  2028. referencedClasses: [],
  2029. //>>excludeEnd("ide");
  2030. messageSends: ["confirm:ifTrue:ifFalse:", "manager"]
  2031. }),
  2032. $globals.HLWidget);
  2033. $core.addMethod(
  2034. $core.method({
  2035. selector: "cssClass",
  2036. protocol: "accessing",
  2037. fn: function (){
  2038. var self=this;
  2039. return "hl_widget";
  2040. },
  2041. //>>excludeStart("ide", pragmas.excludeIdeData);
  2042. args: [],
  2043. source: "cssClass\x0a\x09^ 'hl_widget'",
  2044. referencedClasses: [],
  2045. //>>excludeEnd("ide");
  2046. messageSends: []
  2047. }),
  2048. $globals.HLWidget);
  2049. $core.addMethod(
  2050. $core.method({
  2051. selector: "defaultTabLabel",
  2052. protocol: "defaults",
  2053. fn: function (){
  2054. var self=this;
  2055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2056. return $core.withContext(function($ctx1) {
  2057. //>>excludeEnd("ctx");
  2058. return $recv(self._class())._tabLabel();
  2059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2060. }, function($ctx1) {$ctx1.fill(self,"defaultTabLabel",{},$globals.HLWidget)});
  2061. //>>excludeEnd("ctx");
  2062. },
  2063. //>>excludeStart("ide", pragmas.excludeIdeData);
  2064. args: [],
  2065. source: "defaultTabLabel\x0a\x09^ self class tabLabel",
  2066. referencedClasses: [],
  2067. //>>excludeEnd("ide");
  2068. messageSends: ["tabLabel", "class"]
  2069. }),
  2070. $globals.HLWidget);
  2071. $core.addMethod(
  2072. $core.method({
  2073. selector: "execute:",
  2074. protocol: "actions",
  2075. fn: function (aCommand){
  2076. var self=this;
  2077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2078. return $core.withContext(function($ctx1) {
  2079. //>>excludeEnd("ctx");
  2080. var $1;
  2081. $1=$recv($recv($globals.HLManager)._current())._keyBinder();
  2082. $recv($1)._activate();
  2083. $recv($1)._applyBinding_($recv(aCommand)._asBinding());
  2084. return self;
  2085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2086. }, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},$globals.HLWidget)});
  2087. //>>excludeEnd("ctx");
  2088. },
  2089. //>>excludeStart("ide", pragmas.excludeIdeData);
  2090. args: ["aCommand"],
  2091. source: "execute: aCommand\x0a\x09HLManager current keyBinder\x0a\x09\x09activate;\x0a\x09\x09applyBinding: aCommand asBinding",
  2092. referencedClasses: ["HLManager"],
  2093. //>>excludeEnd("ide");
  2094. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"]
  2095. }),
  2096. $globals.HLWidget);
  2097. $core.addMethod(
  2098. $core.method({
  2099. selector: "inform:",
  2100. protocol: "actions",
  2101. fn: function (aString){
  2102. var self=this;
  2103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2104. return $core.withContext(function($ctx1) {
  2105. //>>excludeEnd("ctx");
  2106. $recv(self._manager())._inform_(aString);
  2107. return self;
  2108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2109. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLWidget)});
  2110. //>>excludeEnd("ctx");
  2111. },
  2112. //>>excludeStart("ide", pragmas.excludeIdeData);
  2113. args: ["aString"],
  2114. source: "inform: aString\x0a\x09self manager inform: aString",
  2115. referencedClasses: [],
  2116. //>>excludeEnd("ide");
  2117. messageSends: ["inform:", "manager"]
  2118. }),
  2119. $globals.HLWidget);
  2120. $core.addMethod(
  2121. $core.method({
  2122. selector: "manager",
  2123. protocol: "accessing",
  2124. fn: function (){
  2125. var self=this;
  2126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2127. return $core.withContext(function($ctx1) {
  2128. //>>excludeEnd("ctx");
  2129. return $recv($globals.HLManager)._current();
  2130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2131. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLWidget)});
  2132. //>>excludeEnd("ctx");
  2133. },
  2134. //>>excludeStart("ide", pragmas.excludeIdeData);
  2135. args: [],
  2136. source: "manager\x0a\x09^ HLManager current",
  2137. referencedClasses: ["HLManager"],
  2138. //>>excludeEnd("ide");
  2139. messageSends: ["current"]
  2140. }),
  2141. $globals.HLWidget);
  2142. $core.addMethod(
  2143. $core.method({
  2144. selector: "openAsTab",
  2145. protocol: "actions",
  2146. fn: function (){
  2147. var self=this;
  2148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2149. return $core.withContext(function($ctx1) {
  2150. //>>excludeEnd("ctx");
  2151. $recv($recv($globals.HLTabWidget)._on_labelled_(self,self._defaultTabLabel()))._add();
  2152. return self;
  2153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2154. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{},$globals.HLWidget)});
  2155. //>>excludeEnd("ctx");
  2156. },
  2157. //>>excludeStart("ide", pragmas.excludeIdeData);
  2158. args: [],
  2159. source: "openAsTab\x0a\x09(HLTabWidget on: self labelled: self defaultTabLabel)\x0a\x09\x09add",
  2160. referencedClasses: ["HLTabWidget"],
  2161. //>>excludeEnd("ide");
  2162. messageSends: ["add", "on:labelled:", "defaultTabLabel"]
  2163. }),
  2164. $globals.HLWidget);
  2165. $core.addMethod(
  2166. $core.method({
  2167. selector: "refresh",
  2168. protocol: "updating",
  2169. fn: function (){
  2170. var self=this;
  2171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2172. return $core.withContext(function($ctx1) {
  2173. //>>excludeEnd("ctx");
  2174. var $1,$receiver;
  2175. $1=self._wrapper();
  2176. if(($receiver = $1) == null || $receiver.isNil){
  2177. $1;
  2178. } else {
  2179. var wrap;
  2180. wrap=$receiver;
  2181. $recv(wrap)._contents_((function(html){
  2182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2183. return $core.withContext(function($ctx2) {
  2184. //>>excludeEnd("ctx");
  2185. return self._renderContentOn_(html);
  2186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2187. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)});
  2188. //>>excludeEnd("ctx");
  2189. }));
  2190. }
  2191. return self;
  2192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2193. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLWidget)});
  2194. //>>excludeEnd("ctx");
  2195. },
  2196. //>>excludeStart("ide", pragmas.excludeIdeData);
  2197. args: [],
  2198. source: "refresh\x0a\x09self wrapper\x0a\x09\x09ifNotNil: [ :wrap | wrap contents: [ :html | self renderContentOn: html ] ]",
  2199. referencedClasses: [],
  2200. //>>excludeEnd("ide");
  2201. messageSends: ["ifNotNil:", "wrapper", "contents:", "renderContentOn:"]
  2202. }),
  2203. $globals.HLWidget);
  2204. $core.addMethod(
  2205. $core.method({
  2206. selector: "registerBindings",
  2207. protocol: "keybindings",
  2208. fn: function (){
  2209. var self=this;
  2210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2211. return $core.withContext(function($ctx1) {
  2212. //>>excludeEnd("ctx");
  2213. self._registerBindingsOn_($recv($recv(self._manager())._keyBinder())._bindings());
  2214. return self;
  2215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2216. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLWidget)});
  2217. //>>excludeEnd("ctx");
  2218. },
  2219. //>>excludeStart("ide", pragmas.excludeIdeData);
  2220. args: [],
  2221. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  2222. referencedClasses: [],
  2223. //>>excludeEnd("ide");
  2224. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]
  2225. }),
  2226. $globals.HLWidget);
  2227. $core.addMethod(
  2228. $core.method({
  2229. selector: "registerBindingsOn:",
  2230. protocol: "keybindings",
  2231. fn: function (aBindingGroup){
  2232. var self=this;
  2233. return self;
  2234. },
  2235. //>>excludeStart("ide", pragmas.excludeIdeData);
  2236. args: ["aBindingGroup"],
  2237. source: "registerBindingsOn: aBindingGroup",
  2238. referencedClasses: [],
  2239. //>>excludeEnd("ide");
  2240. messageSends: []
  2241. }),
  2242. $globals.HLWidget);
  2243. $core.addMethod(
  2244. $core.method({
  2245. selector: "removeTab",
  2246. protocol: "accessing",
  2247. fn: function (){
  2248. var self=this;
  2249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2250. return $core.withContext(function($ctx1) {
  2251. //>>excludeEnd("ctx");
  2252. $recv(self._manager())._removeTabForWidget_(self);
  2253. return self;
  2254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2255. }, function($ctx1) {$ctx1.fill(self,"removeTab",{},$globals.HLWidget)});
  2256. //>>excludeEnd("ctx");
  2257. },
  2258. //>>excludeStart("ide", pragmas.excludeIdeData);
  2259. args: [],
  2260. source: "removeTab\x0a\x09self manager removeTabForWidget: self",
  2261. referencedClasses: [],
  2262. //>>excludeEnd("ide");
  2263. messageSends: ["removeTabForWidget:", "manager"]
  2264. }),
  2265. $globals.HLWidget);
  2266. $core.addMethod(
  2267. $core.method({
  2268. selector: "renderContentOn:",
  2269. protocol: "rendering",
  2270. fn: function (html){
  2271. var self=this;
  2272. return self;
  2273. },
  2274. //>>excludeStart("ide", pragmas.excludeIdeData);
  2275. args: ["html"],
  2276. source: "renderContentOn: html",
  2277. referencedClasses: [],
  2278. //>>excludeEnd("ide");
  2279. messageSends: []
  2280. }),
  2281. $globals.HLWidget);
  2282. $core.addMethod(
  2283. $core.method({
  2284. selector: "renderOn:",
  2285. protocol: "rendering",
  2286. fn: function (html){
  2287. var self=this;
  2288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2289. return $core.withContext(function($ctx1) {
  2290. //>>excludeEnd("ctx");
  2291. var $1;
  2292. $1=$recv(html)._div();
  2293. $recv($1)._class_(self._cssClass());
  2294. self["@wrapper"]=$recv($1)._yourself();
  2295. $recv(self["@wrapper"])._with_((function(){
  2296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2297. return $core.withContext(function($ctx2) {
  2298. //>>excludeEnd("ctx");
  2299. return self._renderContentOn_(html);
  2300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2301. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2302. //>>excludeEnd("ctx");
  2303. }));
  2304. return self;
  2305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2306. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLWidget)});
  2307. //>>excludeEnd("ctx");
  2308. },
  2309. //>>excludeStart("ide", pragmas.excludeIdeData);
  2310. args: ["html"],
  2311. source: "renderOn: html\x0a\x09wrapper := html div\x0a\x09\x09class: self cssClass;\x0a\x09\x09yourself.\x0a\x09\x22must do this later, as renderContentOn may want to use self wrapper\x22\x0a\x09wrapper with: [ self renderContentOn: html ]",
  2312. referencedClasses: [],
  2313. //>>excludeEnd("ide");
  2314. messageSends: ["class:", "div", "cssClass", "yourself", "with:", "renderContentOn:"]
  2315. }),
  2316. $globals.HLWidget);
  2317. $core.addMethod(
  2318. $core.method({
  2319. selector: "request:do:",
  2320. protocol: "actions",
  2321. fn: function (aString,aBlock){
  2322. var self=this;
  2323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2324. return $core.withContext(function($ctx1) {
  2325. //>>excludeEnd("ctx");
  2326. $recv(self._manager())._request_do_(aString,aBlock);
  2327. return self;
  2328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2329. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2330. //>>excludeEnd("ctx");
  2331. },
  2332. //>>excludeStart("ide", pragmas.excludeIdeData);
  2333. args: ["aString", "aBlock"],
  2334. source: "request: aString do: aBlock\x0a\x09self manager request: aString do: aBlock",
  2335. referencedClasses: [],
  2336. //>>excludeEnd("ide");
  2337. messageSends: ["request:do:", "manager"]
  2338. }),
  2339. $globals.HLWidget);
  2340. $core.addMethod(
  2341. $core.method({
  2342. selector: "request:value:do:",
  2343. protocol: "actions",
  2344. fn: function (aString,valueString,aBlock){
  2345. var self=this;
  2346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2347. return $core.withContext(function($ctx1) {
  2348. //>>excludeEnd("ctx");
  2349. $recv(self._manager())._request_value_do_(aString,valueString,aBlock);
  2350. return self;
  2351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2352. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLWidget)});
  2353. //>>excludeEnd("ctx");
  2354. },
  2355. //>>excludeStart("ide", pragmas.excludeIdeData);
  2356. args: ["aString", "valueString", "aBlock"],
  2357. source: "request: aString value: valueString do: aBlock\x0a\x09self manager \x0a\x09\x09request: aString \x0a\x09\x09value: valueString\x0a\x09\x09do: aBlock",
  2358. referencedClasses: [],
  2359. //>>excludeEnd("ide");
  2360. messageSends: ["request:value:do:", "manager"]
  2361. }),
  2362. $globals.HLWidget);
  2363. $core.addMethod(
  2364. $core.method({
  2365. selector: "setTabLabel:",
  2366. protocol: "accessing",
  2367. fn: function (aString){
  2368. var self=this;
  2369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2370. return $core.withContext(function($ctx1) {
  2371. //>>excludeEnd("ctx");
  2372. var $1,$3,$2;
  2373. $1=$recv(self._manager())._announcer();
  2374. $3=$recv($globals.HLTabLabelChanged)._new();
  2375. $recv($3)._widget_(self);
  2376. $recv($3)._label_(aString);
  2377. $2=$recv($3)._yourself();
  2378. $recv($1)._announce_($2);
  2379. return self;
  2380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2381. }, function($ctx1) {$ctx1.fill(self,"setTabLabel:",{aString:aString},$globals.HLWidget)});
  2382. //>>excludeEnd("ctx");
  2383. },
  2384. //>>excludeStart("ide", pragmas.excludeIdeData);
  2385. args: ["aString"],
  2386. source: "setTabLabel: aString\x0a\x09self manager announcer announce: (HLTabLabelChanged new\x0a\x09\x09widget: self;\x0a\x09\x09label: aString;\x0a\x09\x09yourself)",
  2387. referencedClasses: ["HLTabLabelChanged"],
  2388. //>>excludeEnd("ide");
  2389. messageSends: ["announce:", "announcer", "manager", "widget:", "new", "label:", "yourself"]
  2390. }),
  2391. $globals.HLWidget);
  2392. $core.addMethod(
  2393. $core.method({
  2394. selector: "tabClass",
  2395. protocol: "accessing",
  2396. fn: function (){
  2397. var self=this;
  2398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2399. return $core.withContext(function($ctx1) {
  2400. //>>excludeEnd("ctx");
  2401. return $recv(self._class())._tabClass();
  2402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2403. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},$globals.HLWidget)});
  2404. //>>excludeEnd("ctx");
  2405. },
  2406. //>>excludeStart("ide", pragmas.excludeIdeData);
  2407. args: [],
  2408. source: "tabClass\x0a\x09^ self class tabClass",
  2409. referencedClasses: [],
  2410. //>>excludeEnd("ide");
  2411. messageSends: ["tabClass", "class"]
  2412. }),
  2413. $globals.HLWidget);
  2414. $core.addMethod(
  2415. $core.method({
  2416. selector: "unbindKeyDownKeyUp",
  2417. protocol: "keybindings",
  2418. fn: function (){
  2419. var self=this;
  2420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2421. return $core.withContext(function($ctx1) {
  2422. //>>excludeEnd("ctx");
  2423. var $1;
  2424. $1=$recv(self._wrapper())._asJQuery();
  2425. $recv($1)._unbind_("keydown");
  2426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2427. $ctx1.sendIdx["unbind:"]=1;
  2428. //>>excludeEnd("ctx");
  2429. $recv($1)._unbind_("keyup");
  2430. return self;
  2431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2432. }, function($ctx1) {$ctx1.fill(self,"unbindKeyDownKeyUp",{},$globals.HLWidget)});
  2433. //>>excludeEnd("ctx");
  2434. },
  2435. //>>excludeStart("ide", pragmas.excludeIdeData);
  2436. args: [],
  2437. source: "unbindKeyDownKeyUp\x0a\x09self wrapper asJQuery\x0a\x09\x09unbind: 'keydown';\x0a\x09\x09unbind: 'keyup'",
  2438. referencedClasses: [],
  2439. //>>excludeEnd("ide");
  2440. messageSends: ["unbind:", "asJQuery", "wrapper"]
  2441. }),
  2442. $globals.HLWidget);
  2443. $core.addMethod(
  2444. $core.method({
  2445. selector: "unregister",
  2446. protocol: "actions",
  2447. fn: function (){
  2448. var self=this;
  2449. return self;
  2450. },
  2451. //>>excludeStart("ide", pragmas.excludeIdeData);
  2452. args: [],
  2453. source: "unregister\x0a\x09\x22This method is called whenever the receiver is closed (as a tab).\x0a\x09Widgets subscribing to announcements should unregister there\x22",
  2454. referencedClasses: [],
  2455. //>>excludeEnd("ide");
  2456. messageSends: []
  2457. }),
  2458. $globals.HLWidget);
  2459. $core.addMethod(
  2460. $core.method({
  2461. selector: "wrapper",
  2462. protocol: "accessing",
  2463. fn: function (){
  2464. var self=this;
  2465. return self["@wrapper"];
  2466. },
  2467. //>>excludeStart("ide", pragmas.excludeIdeData);
  2468. args: [],
  2469. source: "wrapper\x0a\x09^ wrapper",
  2470. referencedClasses: [],
  2471. //>>excludeEnd("ide");
  2472. messageSends: []
  2473. }),
  2474. $globals.HLWidget);
  2475. $core.addMethod(
  2476. $core.method({
  2477. selector: "canBeOpenAsTab",
  2478. protocol: "testing",
  2479. fn: function (){
  2480. var self=this;
  2481. return false;
  2482. },
  2483. //>>excludeStart("ide", pragmas.excludeIdeData);
  2484. args: [],
  2485. source: "canBeOpenAsTab\x0a\x09^ false",
  2486. referencedClasses: [],
  2487. //>>excludeEnd("ide");
  2488. messageSends: []
  2489. }),
  2490. $globals.HLWidget.klass);
  2491. $core.addMethod(
  2492. $core.method({
  2493. selector: "openAsTab",
  2494. protocol: "accessing",
  2495. fn: function (){
  2496. var self=this;
  2497. var instance;
  2498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2499. return $core.withContext(function($ctx1) {
  2500. //>>excludeEnd("ctx");
  2501. instance=self._new();
  2502. $recv($recv($globals.HLTabWidget)._on_labelled_(instance,$recv(instance)._defaultTabLabel()))._add();
  2503. return instance;
  2504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2505. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{instance:instance},$globals.HLWidget.klass)});
  2506. //>>excludeEnd("ctx");
  2507. },
  2508. //>>excludeStart("ide", pragmas.excludeIdeData);
  2509. args: [],
  2510. source: "openAsTab\x0a\x09| instance |\x0a\x09\x0a\x09instance := self new.\x0a\x09(HLTabWidget \x0a\x09\x09on: instance \x0a\x09\x09labelled: instance defaultTabLabel) add.\x0a\x09^ instance",
  2511. referencedClasses: ["HLTabWidget"],
  2512. //>>excludeEnd("ide");
  2513. messageSends: ["new", "add", "on:labelled:", "defaultTabLabel"]
  2514. }),
  2515. $globals.HLWidget.klass);
  2516. $core.addMethod(
  2517. $core.method({
  2518. selector: "tabClass",
  2519. protocol: "accessing",
  2520. fn: function (){
  2521. var self=this;
  2522. return "";
  2523. },
  2524. //>>excludeStart("ide", pragmas.excludeIdeData);
  2525. args: [],
  2526. source: "tabClass\x0a\x09^ ''",
  2527. referencedClasses: [],
  2528. //>>excludeEnd("ide");
  2529. messageSends: []
  2530. }),
  2531. $globals.HLWidget.klass);
  2532. $core.addMethod(
  2533. $core.method({
  2534. selector: "tabLabel",
  2535. protocol: "accessing",
  2536. fn: function (){
  2537. var self=this;
  2538. return "Tab";
  2539. },
  2540. //>>excludeStart("ide", pragmas.excludeIdeData);
  2541. args: [],
  2542. source: "tabLabel\x0a\x09^ 'Tab'",
  2543. referencedClasses: [],
  2544. //>>excludeEnd("ide");
  2545. messageSends: []
  2546. }),
  2547. $globals.HLWidget.klass);
  2548. $core.addMethod(
  2549. $core.method({
  2550. selector: "tabPriority",
  2551. protocol: "accessing",
  2552. fn: function (){
  2553. var self=this;
  2554. return (500);
  2555. },
  2556. //>>excludeStart("ide", pragmas.excludeIdeData);
  2557. args: [],
  2558. source: "tabPriority\x0a\x09^ 500",
  2559. referencedClasses: [],
  2560. //>>excludeEnd("ide");
  2561. messageSends: []
  2562. }),
  2563. $globals.HLWidget.klass);
  2564. $core.addClass("HLFocusableWidget", $globals.HLWidget, [], "Helios-Core");
  2565. //>>excludeStart("ide", pragmas.excludeIdeData);
  2566. $globals.HLFocusableWidget.comment="I am a widget that can be focused.\x0a\x0a## API \x0a\x0aInstead of overriding `#renderOn:` as with other `Widget` subclasses, my subclasses should override `#renderContentOn:`.\x0a\x0aTo bring the focus to the widget, use the `#focus` method.";
  2567. //>>excludeEnd("ide");
  2568. $core.addMethod(
  2569. $core.method({
  2570. selector: "blur",
  2571. protocol: "events",
  2572. fn: function (){
  2573. var self=this;
  2574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2575. return $core.withContext(function($ctx1) {
  2576. //>>excludeEnd("ctx");
  2577. $recv($recv(self._wrapper())._asJQuery())._blur();
  2578. return self;
  2579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2580. }, function($ctx1) {$ctx1.fill(self,"blur",{},$globals.HLFocusableWidget)});
  2581. //>>excludeEnd("ctx");
  2582. },
  2583. //>>excludeStart("ide", pragmas.excludeIdeData);
  2584. args: [],
  2585. source: "blur\x0a\x09self wrapper asJQuery blur",
  2586. referencedClasses: [],
  2587. //>>excludeEnd("ide");
  2588. messageSends: ["blur", "asJQuery", "wrapper"]
  2589. }),
  2590. $globals.HLFocusableWidget);
  2591. $core.addMethod(
  2592. $core.method({
  2593. selector: "canHaveFocus",
  2594. protocol: "testing",
  2595. fn: function (){
  2596. var self=this;
  2597. return true;
  2598. },
  2599. //>>excludeStart("ide", pragmas.excludeIdeData);
  2600. args: [],
  2601. source: "canHaveFocus\x0a\x09^ true",
  2602. referencedClasses: [],
  2603. //>>excludeEnd("ide");
  2604. messageSends: []
  2605. }),
  2606. $globals.HLFocusableWidget);
  2607. $core.addMethod(
  2608. $core.method({
  2609. selector: "focus",
  2610. protocol: "events",
  2611. fn: function (){
  2612. var self=this;
  2613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2614. return $core.withContext(function($ctx1) {
  2615. //>>excludeEnd("ctx");
  2616. $recv($recv(self._wrapper())._asJQuery())._focus();
  2617. return self;
  2618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2619. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLFocusableWidget)});
  2620. //>>excludeEnd("ctx");
  2621. },
  2622. //>>excludeStart("ide", pragmas.excludeIdeData);
  2623. args: [],
  2624. source: "focus\x0a\x09self wrapper asJQuery focus",
  2625. referencedClasses: [],
  2626. //>>excludeEnd("ide");
  2627. messageSends: ["focus", "asJQuery", "wrapper"]
  2628. }),
  2629. $globals.HLFocusableWidget);
  2630. $core.addMethod(
  2631. $core.method({
  2632. selector: "focusClass",
  2633. protocol: "accessing",
  2634. fn: function (){
  2635. var self=this;
  2636. return "focused";
  2637. },
  2638. //>>excludeStart("ide", pragmas.excludeIdeData);
  2639. args: [],
  2640. source: "focusClass\x0a\x09^ 'focused'",
  2641. referencedClasses: [],
  2642. //>>excludeEnd("ide");
  2643. messageSends: []
  2644. }),
  2645. $globals.HLFocusableWidget);
  2646. $core.addMethod(
  2647. $core.method({
  2648. selector: "hasFocus",
  2649. protocol: "testing",
  2650. fn: function (){
  2651. var self=this;
  2652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2653. return $core.withContext(function($ctx1) {
  2654. //>>excludeEnd("ctx");
  2655. var $2,$1;
  2656. $2=self._wrapper();
  2657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2658. $ctx1.sendIdx["wrapper"]=1;
  2659. //>>excludeEnd("ctx");
  2660. $1=$recv($2)._notNil();
  2661. return $recv($1)._and_((function(){
  2662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2663. return $core.withContext(function($ctx2) {
  2664. //>>excludeEnd("ctx");
  2665. return $recv($recv(self._wrapper())._asJQuery())._hasClass_(self._focusClass());
  2666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2667. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2668. //>>excludeEnd("ctx");
  2669. }));
  2670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2671. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},$globals.HLFocusableWidget)});
  2672. //>>excludeEnd("ctx");
  2673. },
  2674. //>>excludeStart("ide", pragmas.excludeIdeData);
  2675. args: [],
  2676. source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]",
  2677. referencedClasses: [],
  2678. //>>excludeEnd("ide");
  2679. messageSends: ["and:", "notNil", "wrapper", "hasClass:", "asJQuery", "focusClass"]
  2680. }),
  2681. $globals.HLFocusableWidget);
  2682. $core.addMethod(
  2683. $core.method({
  2684. selector: "renderContentOn:",
  2685. protocol: "rendering",
  2686. fn: function (html){
  2687. var self=this;
  2688. return self;
  2689. },
  2690. //>>excludeStart("ide", pragmas.excludeIdeData);
  2691. args: ["html"],
  2692. source: "renderContentOn: html",
  2693. referencedClasses: [],
  2694. //>>excludeEnd("ide");
  2695. messageSends: []
  2696. }),
  2697. $globals.HLFocusableWidget);
  2698. $core.addMethod(
  2699. $core.method({
  2700. selector: "renderOn:",
  2701. protocol: "rendering",
  2702. fn: function (html){
  2703. var self=this;
  2704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2705. return $core.withContext(function($ctx1) {
  2706. //>>excludeEnd("ctx");
  2707. var $1,$3,$2,$4;
  2708. $1=$recv(html)._div();
  2709. $recv($1)._class_(self._cssClass());
  2710. $recv($1)._at_put_("tabindex","0");
  2711. $recv($1)._onBlur_((function(){
  2712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2713. return $core.withContext(function($ctx2) {
  2714. //>>excludeEnd("ctx");
  2715. $3=self._wrapper();
  2716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2717. $ctx2.sendIdx["wrapper"]=1;
  2718. //>>excludeEnd("ctx");
  2719. $2=$recv($3)._asJQuery();
  2720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2721. $ctx2.sendIdx["asJQuery"]=1;
  2722. //>>excludeEnd("ctx");
  2723. $4=self._focusClass();
  2724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2725. $ctx2.sendIdx["focusClass"]=1;
  2726. //>>excludeEnd("ctx");
  2727. return $recv($2)._removeClass_($4);
  2728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2729. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2730. //>>excludeEnd("ctx");
  2731. }));
  2732. $recv($1)._onFocus_((function(){
  2733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2734. return $core.withContext(function($ctx2) {
  2735. //>>excludeEnd("ctx");
  2736. return $recv($recv(self._wrapper())._asJQuery())._addClass_(self._focusClass());
  2737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2738. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  2739. //>>excludeEnd("ctx");
  2740. }));
  2741. self["@wrapper"]=$recv($1)._yourself();
  2742. $recv(self["@wrapper"])._with_((function(){
  2743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2744. return $core.withContext(function($ctx2) {
  2745. //>>excludeEnd("ctx");
  2746. return self._renderContentOn_(html);
  2747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2748. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  2749. //>>excludeEnd("ctx");
  2750. }));
  2751. return self;
  2752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2753. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLFocusableWidget)});
  2754. //>>excludeEnd("ctx");
  2755. },
  2756. //>>excludeStart("ide", pragmas.excludeIdeData);
  2757. args: ["html"],
  2758. source: "renderOn: html\x0a wrapper := html div\x0a \x09class: self cssClass;\x0a\x09\x09at: 'tabindex' put: '0';\x0a\x09\x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a onFocus: [ self wrapper asJQuery addClass: self focusClass ];\x0a\x09\x09yourself.\x0a\x09\x22must do this later, as renderContentOn may want to use self wrapper\x22\x09\x0a\x09wrapper with: [ self renderContentOn: html ]",
  2759. referencedClasses: [],
  2760. //>>excludeEnd("ide");
  2761. messageSends: ["class:", "div", "cssClass", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:", "yourself", "with:", "renderContentOn:"]
  2762. }),
  2763. $globals.HLFocusableWidget);
  2764. $core.addClass("HLListWidget", $globals.HLFocusableWidget, ["items", "selectedItem"], "Helios-Core");
  2765. $core.addMethod(
  2766. $core.method({
  2767. selector: "activateFirstListItem",
  2768. protocol: "actions",
  2769. fn: function (){
  2770. var self=this;
  2771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2772. return $core.withContext(function($ctx1) {
  2773. //>>excludeEnd("ctx");
  2774. self._activateListItem_($recv($recv($recv(self["@wrapper"])._asJQuery())._find_("li.inactive"))._eq_((0)));
  2775. return self;
  2776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2777. }, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},$globals.HLListWidget)});
  2778. //>>excludeEnd("ctx");
  2779. },
  2780. //>>excludeStart("ide", pragmas.excludeIdeData);
  2781. args: [],
  2782. source: "activateFirstListItem\x0a\x09self activateListItem: ((wrapper asJQuery find: 'li.inactive') eq: 0)",
  2783. referencedClasses: [],
  2784. //>>excludeEnd("ide");
  2785. messageSends: ["activateListItem:", "eq:", "find:", "asJQuery"]
  2786. }),
  2787. $globals.HLListWidget);
  2788. $core.addMethod(
  2789. $core.method({
  2790. selector: "activateItem:",
  2791. protocol: "actions",
  2792. fn: function (anObject){
  2793. var self=this;
  2794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2795. return $core.withContext(function($ctx1) {
  2796. //>>excludeEnd("ctx");
  2797. self._activateListItem_(self._findListItemFor_(anObject));
  2798. return self;
  2799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2800. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},$globals.HLListWidget)});
  2801. //>>excludeEnd("ctx");
  2802. },
  2803. //>>excludeStart("ide", pragmas.excludeIdeData);
  2804. args: ["anObject"],
  2805. source: "activateItem: anObject\x0a\x09self activateListItem: (self findListItemFor: anObject)",
  2806. referencedClasses: [],
  2807. //>>excludeEnd("ide");
  2808. messageSends: ["activateListItem:", "findListItemFor:"]
  2809. }),
  2810. $globals.HLListWidget);
  2811. $core.addMethod(
  2812. $core.method({
  2813. selector: "activateListItem:",
  2814. protocol: "actions",
  2815. fn: function (aListItem){
  2816. var self=this;
  2817. var item;
  2818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2819. return $core.withContext(function($ctx1) {
  2820. //>>excludeEnd("ctx");
  2821. var $1,$2,$3,$4,$receiver;
  2822. $1=$recv(aListItem)._get_((0));
  2823. if(($receiver = $1) == null || $receiver.isNil){
  2824. return self;
  2825. } else {
  2826. $1;
  2827. }
  2828. $2=$recv($recv(aListItem)._parent())._children();
  2829. $3=self._activeItemCssClass();
  2830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2831. $ctx1.sendIdx["activeItemCssClass"]=1;
  2832. //>>excludeEnd("ctx");
  2833. $recv($2)._removeClass_($3);
  2834. $recv(aListItem)._addClass_(self._activeItemCssClass());
  2835. self._ensureVisible_(aListItem);
  2836. item=$recv(aListItem)._data_("item");
  2837. $4=$recv(self._selectedItem()).__eq_eq(item);
  2838. if(!$core.assert($4)){
  2839. self._selectItem_(item);
  2840. }
  2841. return self;
  2842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2843. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},$globals.HLListWidget)});
  2844. //>>excludeEnd("ctx");
  2845. },
  2846. //>>excludeStart("ide", pragmas.excludeIdeData);
  2847. args: ["aListItem"],
  2848. source: "activateListItem: aListItem\x0a\x09| item |\x0a\x09\x0a\x09(aListItem get: 0) ifNil: [ ^ self ].\x0a\x09aListItem parent children removeClass: self activeItemCssClass.\x0a\x09aListItem addClass: self activeItemCssClass.\x0a \x0a\x09self ensureVisible: aListItem.\x0a \x0a \x22Activate the corresponding item\x22\x0a item := aListItem data: 'item'.\x0a self selectedItem == item ifFalse: [\x0a\x09 self selectItem: item ]",
  2849. referencedClasses: [],
  2850. //>>excludeEnd("ide");
  2851. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "activeItemCssClass", "addClass:", "ensureVisible:", "data:", "ifFalse:", "==", "selectedItem", "selectItem:"]
  2852. }),
  2853. $globals.HLListWidget);
  2854. $core.addMethod(
  2855. $core.method({
  2856. selector: "activateNextListItem",
  2857. protocol: "actions",
  2858. fn: function (){
  2859. var self=this;
  2860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2861. return $core.withContext(function($ctx1) {
  2862. //>>excludeEnd("ctx");
  2863. var $4,$3,$6,$5,$2,$1;
  2864. $4=self._wrapper();
  2865. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2866. $ctx1.sendIdx["wrapper"]=1;
  2867. //>>excludeEnd("ctx");
  2868. $3=$recv($4)._asJQuery();
  2869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2870. $ctx1.sendIdx["asJQuery"]=1;
  2871. //>>excludeEnd("ctx");
  2872. $6=self._activeItemCssClass();
  2873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2874. $ctx1.sendIdx["activeItemCssClass"]=1;
  2875. //>>excludeEnd("ctx");
  2876. $5="li.".__comma($6);
  2877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2878. $ctx1.sendIdx[","]=1;
  2879. //>>excludeEnd("ctx");
  2880. $2=$recv($3)._find_($5);
  2881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2882. $ctx1.sendIdx["find:"]=1;
  2883. //>>excludeEnd("ctx");
  2884. $1=$recv($2)._next();
  2885. self._activateListItem_($1);
  2886. $recv($recv($recv($recv(self._wrapper())._asJQuery())._find_(" .".__comma(self._activeItemCssClass())))._get())._ifEmpty_((function(){
  2887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2888. return $core.withContext(function($ctx2) {
  2889. //>>excludeEnd("ctx");
  2890. return self._activateFirstListItem();
  2891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2892. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2893. //>>excludeEnd("ctx");
  2894. }));
  2895. return self;
  2896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2897. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLListWidget)});
  2898. //>>excludeEnd("ctx");
  2899. },
  2900. //>>excludeStart("ide", pragmas.excludeIdeData);
  2901. args: [],
  2902. source: "activateNextListItem\x0a\x09self activateListItem: (self wrapper asJQuery find: ('li.', self activeItemCssClass)) next.\x0a\x09\x0a\x09\x22select the first item if none is selected\x22\x0a\x09(self wrapper asJQuery find: (' .', self activeItemCssClass)) get ifEmpty: [\x0a\x09\x09self activateFirstListItem ]",
  2903. referencedClasses: [],
  2904. //>>excludeEnd("ide");
  2905. messageSends: ["activateListItem:", "next", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass", "ifEmpty:", "get", "activateFirstListItem"]
  2906. }),
  2907. $globals.HLListWidget);
  2908. $core.addMethod(
  2909. $core.method({
  2910. selector: "activatePreviousListItem",
  2911. protocol: "actions",
  2912. fn: function (){
  2913. var self=this;
  2914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2915. return $core.withContext(function($ctx1) {
  2916. //>>excludeEnd("ctx");
  2917. self._activateListItem_($recv($recv($recv(self._wrapper())._asJQuery())._find_("li.".__comma(self._activeItemCssClass())))._prev());
  2918. return self;
  2919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2920. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLListWidget)});
  2921. //>>excludeEnd("ctx");
  2922. },
  2923. //>>excludeStart("ide", pragmas.excludeIdeData);
  2924. args: [],
  2925. source: "activatePreviousListItem\x0a\x09self activateListItem: (self wrapper asJQuery find: ('li.', self activeItemCssClass)) prev",
  2926. referencedClasses: [],
  2927. //>>excludeEnd("ide");
  2928. messageSends: ["activateListItem:", "prev", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass"]
  2929. }),
  2930. $globals.HLListWidget);
  2931. $core.addMethod(
  2932. $core.method({
  2933. selector: "activeItemCssClass",
  2934. protocol: "accessing",
  2935. fn: function (){
  2936. var self=this;
  2937. return "active";
  2938. },
  2939. //>>excludeStart("ide", pragmas.excludeIdeData);
  2940. args: [],
  2941. source: "activeItemCssClass\x0a\x09^'active'",
  2942. referencedClasses: [],
  2943. //>>excludeEnd("ide");
  2944. messageSends: []
  2945. }),
  2946. $globals.HLListWidget);
  2947. $core.addMethod(
  2948. $core.method({
  2949. selector: "buttonsDivCssClass",
  2950. protocol: "accessing",
  2951. fn: function (){
  2952. var self=this;
  2953. return "pane_actions form-group";
  2954. },
  2955. //>>excludeStart("ide", pragmas.excludeIdeData);
  2956. args: [],
  2957. source: "buttonsDivCssClass\x0a\x09^ 'pane_actions form-group'",
  2958. referencedClasses: [],
  2959. //>>excludeEnd("ide");
  2960. messageSends: []
  2961. }),
  2962. $globals.HLListWidget);
  2963. $core.addMethod(
  2964. $core.method({
  2965. selector: "cssClassForItem:",
  2966. protocol: "accessing",
  2967. fn: function (anObject){
  2968. var self=this;
  2969. return "";
  2970. },
  2971. //>>excludeStart("ide", pragmas.excludeIdeData);
  2972. args: ["anObject"],
  2973. source: "cssClassForItem: anObject\x0a\x09^ ''",
  2974. referencedClasses: [],
  2975. //>>excludeEnd("ide");
  2976. messageSends: []
  2977. }),
  2978. $globals.HLListWidget);
  2979. $core.addMethod(
  2980. $core.method({
  2981. selector: "defaultItems",
  2982. protocol: "defaults",
  2983. fn: function (){
  2984. var self=this;
  2985. return [];
  2986. },
  2987. //>>excludeStart("ide", pragmas.excludeIdeData);
  2988. args: [],
  2989. source: "defaultItems\x0a\x09^ #()",
  2990. referencedClasses: [],
  2991. //>>excludeEnd("ide");
  2992. messageSends: []
  2993. }),
  2994. $globals.HLListWidget);
  2995. $core.addMethod(
  2996. $core.method({
  2997. selector: "ensureVisible:",
  2998. protocol: "actions",
  2999. fn: function (aListItem){
  3000. var self=this;
  3001. var parent,position;
  3002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3003. return $core.withContext(function($ctx1) {
  3004. //>>excludeEnd("ctx");
  3005. var $1,$4,$3,$2,$5,$9,$8,$11,$10,$7,$6,$15,$14,$16,$13,$17,$12,$18,$22,$23,$21,$20,$19,$receiver;
  3006. $1=$recv(aListItem)._get_((0));
  3007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3008. $ctx1.sendIdx["get:"]=1;
  3009. //>>excludeEnd("ctx");
  3010. if(($receiver = $1) == null || $receiver.isNil){
  3011. return self;
  3012. } else {
  3013. $1;
  3014. }
  3015. position=self._positionOf_(aListItem);
  3016. parent=$recv(aListItem)._parent();
  3017. $4=$recv(aListItem)._position();
  3018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3019. $ctx1.sendIdx["position"]=1;
  3020. //>>excludeEnd("ctx");
  3021. $3=$recv($4)._top();
  3022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3023. $ctx1.sendIdx["top"]=1;
  3024. //>>excludeEnd("ctx");
  3025. $2=$recv($3).__lt((0));
  3026. if($core.assert($2)){
  3027. $5=$recv(parent)._get_((0));
  3028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3029. $ctx1.sendIdx["get:"]=2;
  3030. //>>excludeEnd("ctx");
  3031. $9=$recv(parent)._get_((0));
  3032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3033. $ctx1.sendIdx["get:"]=3;
  3034. //>>excludeEnd("ctx");
  3035. $8=$recv($9)._scrollTop();
  3036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3037. $ctx1.sendIdx["scrollTop"]=1;
  3038. //>>excludeEnd("ctx");
  3039. $11=$recv(aListItem)._position();
  3040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3041. $ctx1.sendIdx["position"]=2;
  3042. //>>excludeEnd("ctx");
  3043. $10=$recv($11)._top();
  3044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3045. $ctx1.sendIdx["top"]=2;
  3046. //>>excludeEnd("ctx");
  3047. $7=$recv($8).__plus($10);
  3048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3049. $ctx1.sendIdx["+"]=1;
  3050. //>>excludeEnd("ctx");
  3051. $6=$recv($7).__minus((10));
  3052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3053. $ctx1.sendIdx["-"]=1;
  3054. //>>excludeEnd("ctx");
  3055. $recv($5)._scrollTop_($6);
  3056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3057. $ctx1.sendIdx["scrollTop:"]=1;
  3058. //>>excludeEnd("ctx");
  3059. }
  3060. $15=$recv(aListItem)._position();
  3061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3062. $ctx1.sendIdx["position"]=3;
  3063. //>>excludeEnd("ctx");
  3064. $14=$recv($15)._top();
  3065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3066. $ctx1.sendIdx["top"]=3;
  3067. //>>excludeEnd("ctx");
  3068. $16=$recv(aListItem)._height();
  3069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3070. $ctx1.sendIdx["height"]=1;
  3071. //>>excludeEnd("ctx");
  3072. $13=$recv($14).__plus($16);
  3073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3074. $ctx1.sendIdx["+"]=2;
  3075. //>>excludeEnd("ctx");
  3076. $17=$recv(parent)._height();
  3077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3078. $ctx1.sendIdx["height"]=2;
  3079. //>>excludeEnd("ctx");
  3080. $12=$recv($13).__gt($17);
  3081. if($core.assert($12)){
  3082. $18=$recv(parent)._get_((0));
  3083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3084. $ctx1.sendIdx["get:"]=4;
  3085. //>>excludeEnd("ctx");
  3086. $22=$recv($recv(parent)._get_((0)))._scrollTop();
  3087. $23=$recv(aListItem)._height();
  3088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3089. $ctx1.sendIdx["height"]=3;
  3090. //>>excludeEnd("ctx");
  3091. $21=$recv($22).__plus($23);
  3092. $20=$recv($21).__minus($recv($recv(parent)._height()).__minus($recv($recv(aListItem)._position())._top()));
  3093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3094. $ctx1.sendIdx["-"]=2;
  3095. //>>excludeEnd("ctx");
  3096. $19=$recv($20).__plus((10));
  3097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3098. $ctx1.sendIdx["+"]=3;
  3099. //>>excludeEnd("ctx");
  3100. $recv($18)._scrollTop_($19);
  3101. }
  3102. return self;
  3103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3104. }, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},$globals.HLListWidget)});
  3105. //>>excludeEnd("ctx");
  3106. },
  3107. //>>excludeStart("ide", pragmas.excludeIdeData);
  3108. args: ["aListItem"],
  3109. source: "ensureVisible: aListItem\x09\x0a\x09\x22Move the scrollbar to show the active element\x22\x0a\x09\x0a\x09| parent position |\x0a\x09(aListItem get: 0) ifNil: [ ^ self ].\x0a\x09position := self positionOf: aListItem.\x0a\x09parent := aListItem parent.\x0a\x09\x0a aListItem position top < 0 ifTrue: [\x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem position top - 10) ].\x0a aListItem position top + aListItem height > parent height ifTrue: [ \x0a\x09\x09(parent get: 0) scrollTop: ((parent get: 0) scrollTop + aListItem height - (parent height - aListItem position top)) +10 ]",
  3110. referencedClasses: [],
  3111. //>>excludeEnd("ide");
  3112. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "-", "+", "scrollTop", ">", "height"]
  3113. }),
  3114. $globals.HLListWidget);
  3115. $core.addMethod(
  3116. $core.method({
  3117. selector: "findListItemFor:",
  3118. protocol: "accessing",
  3119. fn: function (anObject){
  3120. var self=this;
  3121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3122. return $core.withContext(function($ctx1) {
  3123. //>>excludeEnd("ctx");
  3124. var $3,$2,$1;
  3125. $3=$recv(self["@wrapper"])._asJQuery();
  3126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3127. $ctx1.sendIdx["asJQuery"]=1;
  3128. //>>excludeEnd("ctx");
  3129. $2=$recv($3)._find_("li");
  3130. $1=$recv($2)._filter_($recv((function(thisArg,otherArg){
  3131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3132. return $core.withContext(function($ctx2) {
  3133. //>>excludeEnd("ctx");
  3134. return $recv($recv($recv(thisArg)._asJQuery())._data_("item")).__eq(anObject);
  3135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3136. }, function($ctx2) {$ctx2.fillBlock({thisArg:thisArg,otherArg:otherArg},$ctx1,1)});
  3137. //>>excludeEnd("ctx");
  3138. }))._currySelf());
  3139. return $recv($1)._eq_((0));
  3140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3141. }, function($ctx1) {$ctx1.fill(self,"findListItemFor:",{anObject:anObject},$globals.HLListWidget)});
  3142. //>>excludeEnd("ctx");
  3143. },
  3144. //>>excludeStart("ide", pragmas.excludeIdeData);
  3145. args: ["anObject"],
  3146. source: "findListItemFor: anObject\x0a\x09^ (((wrapper asJQuery find: 'li') \x0a\x09\x09filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)",
  3147. referencedClasses: [],
  3148. //>>excludeEnd("ide");
  3149. messageSends: ["eq:", "filter:", "find:", "asJQuery", "currySelf", "=", "data:"]
  3150. }),
  3151. $globals.HLListWidget);
  3152. $core.addMethod(
  3153. $core.method({
  3154. selector: "focus",
  3155. protocol: "actions",
  3156. fn: function (){
  3157. var self=this;
  3158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3159. return $core.withContext(function($ctx1) {
  3160. //>>excludeEnd("ctx");
  3161. var $1,$receiver;
  3162. (
  3163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3164. $ctx1.supercall = true,
  3165. //>>excludeEnd("ctx");
  3166. ($globals.HLListWidget.superclass||$boot.nilAsClass).fn.prototype._focus.apply($recv(self), []));
  3167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3168. $ctx1.supercall = false;
  3169. //>>excludeEnd("ctx");;
  3170. $recv(self._items())._ifNotEmpty_((function(){
  3171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3172. return $core.withContext(function($ctx2) {
  3173. //>>excludeEnd("ctx");
  3174. $1=self._selectedItem();
  3175. if(($receiver = $1) == null || $receiver.isNil){
  3176. return self._activateFirstListItem();
  3177. } else {
  3178. return $1;
  3179. }
  3180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3181. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3182. //>>excludeEnd("ctx");
  3183. }));
  3184. return self;
  3185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3186. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLListWidget)});
  3187. //>>excludeEnd("ctx");
  3188. },
  3189. //>>excludeStart("ide", pragmas.excludeIdeData);
  3190. args: [],
  3191. source: "focus\x0a\x09super focus.\x0a self items ifNotEmpty: [ \x0a\x09\x09self selectedItem ifNil: [ self activateFirstListItem ] ]",
  3192. referencedClasses: [],
  3193. //>>excludeEnd("ide");
  3194. messageSends: ["focus", "ifNotEmpty:", "items", "ifNil:", "selectedItem", "activateFirstListItem"]
  3195. }),
  3196. $globals.HLListWidget);
  3197. $core.addMethod(
  3198. $core.method({
  3199. selector: "items",
  3200. protocol: "accessing",
  3201. fn: function (){
  3202. var self=this;
  3203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3204. return $core.withContext(function($ctx1) {
  3205. //>>excludeEnd("ctx");
  3206. var $1,$receiver;
  3207. $1=self["@items"];
  3208. if(($receiver = $1) == null || $receiver.isNil){
  3209. self["@items"]=self._defaultItems();
  3210. return self["@items"];
  3211. } else {
  3212. return $1;
  3213. }
  3214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3215. }, function($ctx1) {$ctx1.fill(self,"items",{},$globals.HLListWidget)});
  3216. //>>excludeEnd("ctx");
  3217. },
  3218. //>>excludeStart("ide", pragmas.excludeIdeData);
  3219. args: [],
  3220. source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
  3221. referencedClasses: [],
  3222. //>>excludeEnd("ide");
  3223. messageSends: ["ifNil:", "defaultItems"]
  3224. }),
  3225. $globals.HLListWidget);
  3226. $core.addMethod(
  3227. $core.method({
  3228. selector: "items:",
  3229. protocol: "accessing",
  3230. fn: function (aCollection){
  3231. var self=this;
  3232. self["@items"]=aCollection;
  3233. return self;
  3234. },
  3235. //>>excludeStart("ide", pragmas.excludeIdeData);
  3236. args: ["aCollection"],
  3237. source: "items: aCollection\x0a\x09items := aCollection",
  3238. referencedClasses: [],
  3239. //>>excludeEnd("ide");
  3240. messageSends: []
  3241. }),
  3242. $globals.HLListWidget);
  3243. $core.addMethod(
  3244. $core.method({
  3245. selector: "listCssClass",
  3246. protocol: "accessing",
  3247. fn: function (){
  3248. var self=this;
  3249. return "nav nav-pills nav-stacked";
  3250. },
  3251. //>>excludeStart("ide", pragmas.excludeIdeData);
  3252. args: [],
  3253. source: "listCssClass \x0a\x09^'nav nav-pills nav-stacked'",
  3254. referencedClasses: [],
  3255. //>>excludeEnd("ide");
  3256. messageSends: []
  3257. }),
  3258. $globals.HLListWidget);
  3259. $core.addMethod(
  3260. $core.method({
  3261. selector: "listCssClassForItem:",
  3262. protocol: "accessing",
  3263. fn: function (anObject){
  3264. var self=this;
  3265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3266. return $core.withContext(function($ctx1) {
  3267. //>>excludeEnd("ctx");
  3268. var $1;
  3269. $1=$recv(self._selectedItem()).__eq(anObject);
  3270. if($core.assert($1)){
  3271. return self._activeItemCssClass();
  3272. } else {
  3273. return "inactive";
  3274. }
  3275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3276. }, function($ctx1) {$ctx1.fill(self,"listCssClassForItem:",{anObject:anObject},$globals.HLListWidget)});
  3277. //>>excludeEnd("ctx");
  3278. },
  3279. //>>excludeStart("ide", pragmas.excludeIdeData);
  3280. args: ["anObject"],
  3281. source: "listCssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09ifTrue: [ self activeItemCssClass ]\x0a\x09\x09ifFalse: [ 'inactive' ]",
  3282. referencedClasses: [],
  3283. //>>excludeEnd("ide");
  3284. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem", "activeItemCssClass"]
  3285. }),
  3286. $globals.HLListWidget);
  3287. $core.addMethod(
  3288. $core.method({
  3289. selector: "positionOf:",
  3290. protocol: "accessing",
  3291. fn: function (aListItem){
  3292. var self=this;
  3293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3294. return $core.withContext(function($ctx1) {
  3295. //>>excludeEnd("ctx");
  3296. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  3297. ;
  3298. return self;
  3299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3300. }, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},$globals.HLListWidget)});
  3301. //>>excludeEnd("ctx");
  3302. },
  3303. //>>excludeStart("ide", pragmas.excludeIdeData);
  3304. args: ["aListItem"],
  3305. source: "positionOf: aListItem\x0a\x09<inlineJS: '\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09'>",
  3306. referencedClasses: [],
  3307. //>>excludeEnd("ide");
  3308. messageSends: []
  3309. }),
  3310. $globals.HLListWidget);
  3311. $core.addMethod(
  3312. $core.method({
  3313. selector: "reactivateListItem:",
  3314. protocol: "actions",
  3315. fn: function (aListItem){
  3316. var self=this;
  3317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3318. return $core.withContext(function($ctx1) {
  3319. //>>excludeEnd("ctx");
  3320. self._activateListItem_(aListItem);
  3321. self._reselectItem_(self._selectedItem());
  3322. return self;
  3323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3324. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{aListItem:aListItem},$globals.HLListWidget)});
  3325. //>>excludeEnd("ctx");
  3326. },
  3327. //>>excludeStart("ide", pragmas.excludeIdeData);
  3328. args: ["aListItem"],
  3329. source: "reactivateListItem: aListItem\x0a\x09self activateListItem: aListItem.\x0a\x09self reselectItem: self selectedItem",
  3330. referencedClasses: [],
  3331. //>>excludeEnd("ide");
  3332. messageSends: ["activateListItem:", "reselectItem:", "selectedItem"]
  3333. }),
  3334. $globals.HLListWidget);
  3335. $core.addMethod(
  3336. $core.method({
  3337. selector: "refresh",
  3338. protocol: "actions",
  3339. fn: function (){
  3340. var self=this;
  3341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3342. return $core.withContext(function($ctx1) {
  3343. //>>excludeEnd("ctx");
  3344. var $1,$receiver;
  3345. (
  3346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3347. $ctx1.supercall = true,
  3348. //>>excludeEnd("ctx");
  3349. ($globals.HLListWidget.superclass||$boot.nilAsClass).fn.prototype._refresh.apply($recv(self), []));
  3350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3351. $ctx1.supercall = false;
  3352. //>>excludeEnd("ctx");;
  3353. $1=self._selectedItem();
  3354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3355. $ctx1.sendIdx["selectedItem"]=1;
  3356. //>>excludeEnd("ctx");
  3357. if(($receiver = $1) == null || $receiver.isNil){
  3358. $1;
  3359. } else {
  3360. self._ensureVisible_(self._findListItemFor_(self._selectedItem()));
  3361. }
  3362. return self;
  3363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3364. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLListWidget)});
  3365. //>>excludeEnd("ctx");
  3366. },
  3367. //>>excludeStart("ide", pragmas.excludeIdeData);
  3368. args: [],
  3369. source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
  3370. referencedClasses: [],
  3371. //>>excludeEnd("ide");
  3372. messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"]
  3373. }),
  3374. $globals.HLListWidget);
  3375. $core.addMethod(
  3376. $core.method({
  3377. selector: "renderButtonsOn:",
  3378. protocol: "rendering",
  3379. fn: function (html){
  3380. var self=this;
  3381. return self;
  3382. },
  3383. //>>excludeStart("ide", pragmas.excludeIdeData);
  3384. args: ["html"],
  3385. source: "renderButtonsOn: html",
  3386. referencedClasses: [],
  3387. //>>excludeEnd("ide");
  3388. messageSends: []
  3389. }),
  3390. $globals.HLListWidget);
  3391. $core.addMethod(
  3392. $core.method({
  3393. selector: "renderContentOn:",
  3394. protocol: "rendering",
  3395. fn: function (html){
  3396. var self=this;
  3397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3398. return $core.withContext(function($ctx1) {
  3399. //>>excludeEnd("ctx");
  3400. var $1,$2;
  3401. $1=$recv(html)._ul();
  3402. $recv($1)._class_(self._listCssClass());
  3403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3404. $ctx1.sendIdx["class:"]=1;
  3405. //>>excludeEnd("ctx");
  3406. $recv($1)._with_((function(){
  3407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3408. return $core.withContext(function($ctx2) {
  3409. //>>excludeEnd("ctx");
  3410. return self._renderListOn_(html);
  3411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3412. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3413. //>>excludeEnd("ctx");
  3414. }));
  3415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3416. $ctx1.sendIdx["with:"]=1;
  3417. //>>excludeEnd("ctx");
  3418. $recv($1)._onClick_((function(){
  3419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3420. return $core.withContext(function($ctx2) {
  3421. //>>excludeEnd("ctx");
  3422. return self._focus();
  3423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3424. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3425. //>>excludeEnd("ctx");
  3426. }));
  3427. $2=$recv(html)._div();
  3428. $recv($2)._class_(self._buttonsDivCssClass());
  3429. $recv($2)._with_((function(){
  3430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3431. return $core.withContext(function($ctx2) {
  3432. //>>excludeEnd("ctx");
  3433. return self._renderButtonsOn_(html);
  3434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3435. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3436. //>>excludeEnd("ctx");
  3437. }));
  3438. self._setupKeyBindings();
  3439. return self;
  3440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3441. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLListWidget)});
  3442. //>>excludeEnd("ctx");
  3443. },
  3444. //>>excludeStart("ide", pragmas.excludeIdeData);
  3445. args: ["html"],
  3446. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: self listCssClass;\x0a with: [ self renderListOn: html ];\x0a\x09\x09onClick: [ self focus ].\x0a html div class: self buttonsDivCssClass; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
  3447. referencedClasses: [],
  3448. //>>excludeEnd("ide");
  3449. messageSends: ["class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "focus", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
  3450. }),
  3451. $globals.HLListWidget);
  3452. $core.addMethod(
  3453. $core.method({
  3454. selector: "renderItem:on:",
  3455. protocol: "rendering",
  3456. fn: function (anObject,html){
  3457. var self=this;
  3458. var li;
  3459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3460. return $core.withContext(function($ctx1) {
  3461. //>>excludeEnd("ctx");
  3462. var $1,$2,$4,$3;
  3463. li=$recv(html)._li();
  3464. $1=$recv(li)._asJQuery();
  3465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3466. $ctx1.sendIdx["asJQuery"]=1;
  3467. //>>excludeEnd("ctx");
  3468. $recv($1)._data_put_("item",anObject);
  3469. $2=li;
  3470. $recv($2)._class_(self._listCssClassForItem_(anObject));
  3471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3472. $ctx1.sendIdx["class:"]=1;
  3473. //>>excludeEnd("ctx");
  3474. $3=$recv($2)._with_((function(){
  3475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3476. return $core.withContext(function($ctx2) {
  3477. //>>excludeEnd("ctx");
  3478. $4=$recv(html)._a();
  3479. $recv($4)._with_((function(){
  3480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3481. return $core.withContext(function($ctx3) {
  3482. //>>excludeEnd("ctx");
  3483. $recv($recv(html)._tag_("i"))._class_(self._cssClassForItem_(anObject));
  3484. return self._renderItemLabel_on_(anObject,html);
  3485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3486. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3487. //>>excludeEnd("ctx");
  3488. }));
  3489. return $recv($4)._onClick_((function(){
  3490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3491. return $core.withContext(function($ctx3) {
  3492. //>>excludeEnd("ctx");
  3493. return self._reactivateListItem_($recv(li)._asJQuery());
  3494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3495. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3496. //>>excludeEnd("ctx");
  3497. }));
  3498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3499. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3500. //>>excludeEnd("ctx");
  3501. }));
  3502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3503. $ctx1.sendIdx["with:"]=1;
  3504. //>>excludeEnd("ctx");
  3505. return self;
  3506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3507. }, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},$globals.HLListWidget)});
  3508. //>>excludeEnd("ctx");
  3509. },
  3510. //>>excludeStart("ide", pragmas.excludeIdeData);
  3511. args: ["anObject", "html"],
  3512. source: "renderItem: anObject on: html\x0a\x09| li |\x0a \x0a\x09li := html li.\x0a\x09li asJQuery data: 'item' put: anObject.\x0a li\x0a\x09\x09class: (self listCssClassForItem: anObject);\x0a with: [ \x0a \x09html a\x0a \x09with: [ \x0a \x09\x09(html tag: 'i') class: (self cssClassForItem: anObject).\x0a \x09\x09\x09\x09\x09self renderItemLabel: anObject on: html ];\x0a\x09\x09\x09\x09onClick: [\x0a \x09self reactivateListItem: li asJQuery ] ]",
  3513. referencedClasses: [],
  3514. //>>excludeEnd("ide");
  3515. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:on:", "onClick:", "reactivateListItem:"]
  3516. }),
  3517. $globals.HLListWidget);
  3518. $core.addMethod(
  3519. $core.method({
  3520. selector: "renderItemLabel:on:",
  3521. protocol: "rendering",
  3522. fn: function (anObject,html){
  3523. var self=this;
  3524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3525. return $core.withContext(function($ctx1) {
  3526. //>>excludeEnd("ctx");
  3527. $recv(html)._with_($recv(anObject)._asString());
  3528. return self;
  3529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3530. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},$globals.HLListWidget)});
  3531. //>>excludeEnd("ctx");
  3532. },
  3533. //>>excludeStart("ide", pragmas.excludeIdeData);
  3534. args: ["anObject", "html"],
  3535. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  3536. referencedClasses: [],
  3537. //>>excludeEnd("ide");
  3538. messageSends: ["with:", "asString"]
  3539. }),
  3540. $globals.HLListWidget);
  3541. $core.addMethod(
  3542. $core.method({
  3543. selector: "renderListOn:",
  3544. protocol: "rendering",
  3545. fn: function (html){
  3546. var self=this;
  3547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3548. return $core.withContext(function($ctx1) {
  3549. //>>excludeEnd("ctx");
  3550. $recv(self._items())._do_((function(each){
  3551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3552. return $core.withContext(function($ctx2) {
  3553. //>>excludeEnd("ctx");
  3554. return self._renderItem_on_(each,html);
  3555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3556. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3557. //>>excludeEnd("ctx");
  3558. }));
  3559. return self;
  3560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3561. }, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},$globals.HLListWidget)});
  3562. //>>excludeEnd("ctx");
  3563. },
  3564. //>>excludeStart("ide", pragmas.excludeIdeData);
  3565. args: ["html"],
  3566. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  3567. referencedClasses: [],
  3568. //>>excludeEnd("ide");
  3569. messageSends: ["do:", "items", "renderItem:on:"]
  3570. }),
  3571. $globals.HLListWidget);
  3572. $core.addMethod(
  3573. $core.method({
  3574. selector: "reselectItem:",
  3575. protocol: "actions",
  3576. fn: function (anObject){
  3577. var self=this;
  3578. return self;
  3579. },
  3580. //>>excludeStart("ide", pragmas.excludeIdeData);
  3581. args: ["anObject"],
  3582. source: "reselectItem: anObject",
  3583. referencedClasses: [],
  3584. //>>excludeEnd("ide");
  3585. messageSends: []
  3586. }),
  3587. $globals.HLListWidget);
  3588. $core.addMethod(
  3589. $core.method({
  3590. selector: "selectItem:",
  3591. protocol: "actions",
  3592. fn: function (anObject){
  3593. var self=this;
  3594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3595. return $core.withContext(function($ctx1) {
  3596. //>>excludeEnd("ctx");
  3597. self._selectedItem_(anObject);
  3598. return self;
  3599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3600. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},$globals.HLListWidget)});
  3601. //>>excludeEnd("ctx");
  3602. },
  3603. //>>excludeStart("ide", pragmas.excludeIdeData);
  3604. args: ["anObject"],
  3605. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  3606. referencedClasses: [],
  3607. //>>excludeEnd("ide");
  3608. messageSends: ["selectedItem:"]
  3609. }),
  3610. $globals.HLListWidget);
  3611. $core.addMethod(
  3612. $core.method({
  3613. selector: "selectedItem",
  3614. protocol: "accessing",
  3615. fn: function (){
  3616. var self=this;
  3617. return self["@selectedItem"];
  3618. },
  3619. //>>excludeStart("ide", pragmas.excludeIdeData);
  3620. args: [],
  3621. source: "selectedItem\x0a\x09^ selectedItem",
  3622. referencedClasses: [],
  3623. //>>excludeEnd("ide");
  3624. messageSends: []
  3625. }),
  3626. $globals.HLListWidget);
  3627. $core.addMethod(
  3628. $core.method({
  3629. selector: "selectedItem:",
  3630. protocol: "accessing",
  3631. fn: function (anObject){
  3632. var self=this;
  3633. self["@selectedItem"]=anObject;
  3634. return self;
  3635. },
  3636. //>>excludeStart("ide", pragmas.excludeIdeData);
  3637. args: ["anObject"],
  3638. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  3639. referencedClasses: [],
  3640. //>>excludeEnd("ide");
  3641. messageSends: []
  3642. }),
  3643. $globals.HLListWidget);
  3644. $core.addMethod(
  3645. $core.method({
  3646. selector: "setupKeyBindings",
  3647. protocol: "events",
  3648. fn: function (){
  3649. var self=this;
  3650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3651. return $core.withContext(function($ctx1) {
  3652. //>>excludeEnd("ctx");
  3653. var $1,$2;
  3654. $1=$recv($globals.HLRepeatedKeyDownHandler)._on_(self);
  3655. $recv($1)._whileKeyDown_do_((38),(function(){
  3656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3657. return $core.withContext(function($ctx2) {
  3658. //>>excludeEnd("ctx");
  3659. return self._activatePreviousListItem();
  3660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3661. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3662. //>>excludeEnd("ctx");
  3663. }));
  3664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3665. $ctx1.sendIdx["whileKeyDown:do:"]=1;
  3666. //>>excludeEnd("ctx");
  3667. $recv($1)._whileKeyDown_do_((40),(function(){
  3668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3669. return $core.withContext(function($ctx2) {
  3670. //>>excludeEnd("ctx");
  3671. return self._activateNextListItem();
  3672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3673. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3674. //>>excludeEnd("ctx");
  3675. }));
  3676. $recv($1)._rebindKeys();
  3677. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3679. return $core.withContext(function($ctx2) {
  3680. //>>excludeEnd("ctx");
  3681. $2=$recv($recv(e)._which()).__eq((13));
  3682. if($core.assert($2)){
  3683. return self._reselectItem_(self._selectedItem());
  3684. }
  3685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3686. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,3)});
  3687. //>>excludeEnd("ctx");
  3688. }));
  3689. return self;
  3690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3691. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLListWidget)});
  3692. //>>excludeEnd("ctx");
  3693. },
  3694. //>>excludeStart("ide", pragmas.excludeIdeData);
  3695. args: [],
  3696. source: "setupKeyBindings \x0a\x09(HLRepeatedKeyDownHandler on: self)\x0a\x09\x09whileKeyDown: 38 do: [ self activatePreviousListItem ];\x0a\x09\x09whileKeyDown: 40 do: [ self activateNextListItem ];\x0a\x09\x09rebindKeys.\x0a\x09\x09\x0a\x09self wrapper asJQuery keydown: [ :e |\x0a e which = 13 ifTrue: [ \x0a \x09self reselectItem: self selectedItem ] ]",
  3697. referencedClasses: ["HLRepeatedKeyDownHandler"],
  3698. //>>excludeEnd("ide");
  3699. messageSends: ["whileKeyDown:do:", "on:", "activatePreviousListItem", "activateNextListItem", "rebindKeys", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "reselectItem:", "selectedItem"]
  3700. }),
  3701. $globals.HLListWidget);
  3702. $core.addClass("HLNavigationListWidget", $globals.HLListWidget, ["previous", "next"], "Helios-Core");
  3703. $core.addMethod(
  3704. $core.method({
  3705. selector: "next",
  3706. protocol: "accessing",
  3707. fn: function (){
  3708. var self=this;
  3709. return self["@next"];
  3710. },
  3711. //>>excludeStart("ide", pragmas.excludeIdeData);
  3712. args: [],
  3713. source: "next\x0a\x09^ next",
  3714. referencedClasses: [],
  3715. //>>excludeEnd("ide");
  3716. messageSends: []
  3717. }),
  3718. $globals.HLNavigationListWidget);
  3719. $core.addMethod(
  3720. $core.method({
  3721. selector: "next:",
  3722. protocol: "accessing",
  3723. fn: function (aWidget){
  3724. var self=this;
  3725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3726. return $core.withContext(function($ctx1) {
  3727. //>>excludeEnd("ctx");
  3728. var $1;
  3729. self["@next"]=aWidget;
  3730. $1=$recv($recv(aWidget)._previous()).__eq(self);
  3731. if(!$core.assert($1)){
  3732. $recv(aWidget)._previous_(self);
  3733. }
  3734. return self;
  3735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3736. }, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3737. //>>excludeEnd("ctx");
  3738. },
  3739. //>>excludeStart("ide", pragmas.excludeIdeData);
  3740. args: ["aWidget"],
  3741. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  3742. referencedClasses: [],
  3743. //>>excludeEnd("ide");
  3744. messageSends: ["ifFalse:", "=", "previous", "previous:"]
  3745. }),
  3746. $globals.HLNavigationListWidget);
  3747. $core.addMethod(
  3748. $core.method({
  3749. selector: "nextFocus",
  3750. protocol: "actions",
  3751. fn: function (){
  3752. var self=this;
  3753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3754. return $core.withContext(function($ctx1) {
  3755. //>>excludeEnd("ctx");
  3756. var $1,$receiver;
  3757. $1=self._next();
  3758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3759. $ctx1.sendIdx["next"]=1;
  3760. //>>excludeEnd("ctx");
  3761. if(($receiver = $1) == null || $receiver.isNil){
  3762. $1;
  3763. } else {
  3764. $recv(self._next())._focus();
  3765. }
  3766. return self;
  3767. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3768. }, function($ctx1) {$ctx1.fill(self,"nextFocus",{},$globals.HLNavigationListWidget)});
  3769. //>>excludeEnd("ctx");
  3770. },
  3771. //>>excludeStart("ide", pragmas.excludeIdeData);
  3772. args: [],
  3773. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  3774. referencedClasses: [],
  3775. //>>excludeEnd("ide");
  3776. messageSends: ["ifNotNil:", "next", "focus"]
  3777. }),
  3778. $globals.HLNavigationListWidget);
  3779. $core.addMethod(
  3780. $core.method({
  3781. selector: "previous",
  3782. protocol: "accessing",
  3783. fn: function (){
  3784. var self=this;
  3785. return self["@previous"];
  3786. },
  3787. //>>excludeStart("ide", pragmas.excludeIdeData);
  3788. args: [],
  3789. source: "previous\x0a\x09^ previous",
  3790. referencedClasses: [],
  3791. //>>excludeEnd("ide");
  3792. messageSends: []
  3793. }),
  3794. $globals.HLNavigationListWidget);
  3795. $core.addMethod(
  3796. $core.method({
  3797. selector: "previous:",
  3798. protocol: "accessing",
  3799. fn: function (aWidget){
  3800. var self=this;
  3801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3802. return $core.withContext(function($ctx1) {
  3803. //>>excludeEnd("ctx");
  3804. var $1;
  3805. self["@previous"]=aWidget;
  3806. $1=$recv($recv(aWidget)._next()).__eq(self);
  3807. if(!$core.assert($1)){
  3808. $recv(aWidget)._next_(self);
  3809. }
  3810. return self;
  3811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3812. }, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3813. //>>excludeEnd("ctx");
  3814. },
  3815. //>>excludeStart("ide", pragmas.excludeIdeData);
  3816. args: ["aWidget"],
  3817. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  3818. referencedClasses: [],
  3819. //>>excludeEnd("ide");
  3820. messageSends: ["ifFalse:", "=", "next", "next:"]
  3821. }),
  3822. $globals.HLNavigationListWidget);
  3823. $core.addMethod(
  3824. $core.method({
  3825. selector: "previousFocus",
  3826. protocol: "actions",
  3827. fn: function (){
  3828. var self=this;
  3829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3830. return $core.withContext(function($ctx1) {
  3831. //>>excludeEnd("ctx");
  3832. var $1,$receiver;
  3833. $1=self._previous();
  3834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3835. $ctx1.sendIdx["previous"]=1;
  3836. //>>excludeEnd("ctx");
  3837. if(($receiver = $1) == null || $receiver.isNil){
  3838. $1;
  3839. } else {
  3840. $recv(self._previous())._focus();
  3841. }
  3842. return self;
  3843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3844. }, function($ctx1) {$ctx1.fill(self,"previousFocus",{},$globals.HLNavigationListWidget)});
  3845. //>>excludeEnd("ctx");
  3846. },
  3847. //>>excludeStart("ide", pragmas.excludeIdeData);
  3848. args: [],
  3849. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  3850. referencedClasses: [],
  3851. //>>excludeEnd("ide");
  3852. messageSends: ["ifNotNil:", "previous", "focus"]
  3853. }),
  3854. $globals.HLNavigationListWidget);
  3855. $core.addMethod(
  3856. $core.method({
  3857. selector: "setupKeyBindings",
  3858. protocol: "events",
  3859. fn: function (){
  3860. var self=this;
  3861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3862. return $core.withContext(function($ctx1) {
  3863. //>>excludeEnd("ctx");
  3864. var $1,$3,$2,$4,$receiver;
  3865. (
  3866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3867. $ctx1.supercall = true,
  3868. //>>excludeEnd("ctx");
  3869. ($globals.HLNavigationListWidget.superclass||$boot.nilAsClass).fn.prototype._setupKeyBindings.apply($recv(self), []));
  3870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3871. $ctx1.supercall = false;
  3872. //>>excludeEnd("ctx");;
  3873. $1=self._wrapper();
  3874. if(($receiver = $1) == null || $receiver.isNil){
  3875. $1;
  3876. } else {
  3877. $recv(self["@wrapper"])._onKeyDown_((function(e){
  3878. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3879. return $core.withContext(function($ctx2) {
  3880. //>>excludeEnd("ctx");
  3881. $3=$recv(e)._which();
  3882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3883. $ctx2.sendIdx["which"]=1;
  3884. //>>excludeEnd("ctx");
  3885. $2=$recv($3).__eq((39));
  3886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3887. $ctx2.sendIdx["="]=1;
  3888. //>>excludeEnd("ctx");
  3889. if($core.assert($2)){
  3890. self._nextFocus();
  3891. }
  3892. $4=$recv($recv(e)._which()).__eq((37));
  3893. if($core.assert($4)){
  3894. return self._previousFocus();
  3895. }
  3896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3897. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  3898. //>>excludeEnd("ctx");
  3899. }));
  3900. }
  3901. return self;
  3902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3903. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLNavigationListWidget)});
  3904. //>>excludeEnd("ctx");
  3905. },
  3906. //>>excludeStart("ide", pragmas.excludeIdeData);
  3907. args: [],
  3908. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x0a\x09self wrapper ifNotNil: [ wrapper onKeyDown: [ :e |\x0a e which = 39 ifTrue: [ \x0a \x09self nextFocus ].\x0a\x09\x09e which = 37 ifTrue: [ \x0a \x09self previousFocus ] ] ]",
  3909. referencedClasses: [],
  3910. //>>excludeEnd("ide");
  3911. messageSends: ["setupKeyBindings", "ifNotNil:", "wrapper", "onKeyDown:", "ifTrue:", "=", "which", "nextFocus", "previousFocus"]
  3912. }),
  3913. $globals.HLNavigationListWidget);
  3914. $core.addClass("HLToolListWidget", $globals.HLNavigationListWidget, ["model"], "Helios-Core");
  3915. $core.addMethod(
  3916. $core.method({
  3917. selector: "activateListItem:",
  3918. protocol: "actions",
  3919. fn: function (anItem){
  3920. var self=this;
  3921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3922. return $core.withContext(function($ctx1) {
  3923. //>>excludeEnd("ctx");
  3924. $recv(self._model())._withChangesDo_((function(){
  3925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3926. return $core.withContext(function($ctx2) {
  3927. //>>excludeEnd("ctx");
  3928. return (
  3929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3930. $ctx2.supercall = true,
  3931. //>>excludeEnd("ctx");
  3932. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._activateListItem_.apply($recv(self), [anItem]));
  3933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3934. $ctx2.supercall = false;
  3935. //>>excludeEnd("ctx");;
  3936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3937. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3938. //>>excludeEnd("ctx");
  3939. }));
  3940. return self;
  3941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3942. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  3943. //>>excludeEnd("ctx");
  3944. },
  3945. //>>excludeStart("ide", pragmas.excludeIdeData);
  3946. args: ["anItem"],
  3947. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  3948. referencedClasses: [],
  3949. //>>excludeEnd("ide");
  3950. messageSends: ["withChangesDo:", "model", "activateListItem:"]
  3951. }),
  3952. $globals.HLToolListWidget);
  3953. $core.addMethod(
  3954. $core.method({
  3955. selector: "activateNextListItem",
  3956. protocol: "actions",
  3957. fn: function (){
  3958. var self=this;
  3959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3960. return $core.withContext(function($ctx1) {
  3961. //>>excludeEnd("ctx");
  3962. $recv(self._model())._withChangesDo_((function(){
  3963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3964. return $core.withContext(function($ctx2) {
  3965. //>>excludeEnd("ctx");
  3966. return (
  3967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3968. $ctx2.supercall = true,
  3969. //>>excludeEnd("ctx");
  3970. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._activateNextListItem.apply($recv(self), []));
  3971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3972. $ctx2.supercall = false;
  3973. //>>excludeEnd("ctx");;
  3974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3975. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3976. //>>excludeEnd("ctx");
  3977. }));
  3978. return self;
  3979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3980. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLToolListWidget)});
  3981. //>>excludeEnd("ctx");
  3982. },
  3983. //>>excludeStart("ide", pragmas.excludeIdeData);
  3984. args: [],
  3985. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  3986. referencedClasses: [],
  3987. //>>excludeEnd("ide");
  3988. messageSends: ["withChangesDo:", "model", "activateNextListItem"]
  3989. }),
  3990. $globals.HLToolListWidget);
  3991. $core.addMethod(
  3992. $core.method({
  3993. selector: "activatePreviousListItem",
  3994. protocol: "actions",
  3995. fn: function (){
  3996. var self=this;
  3997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3998. return $core.withContext(function($ctx1) {
  3999. //>>excludeEnd("ctx");
  4000. $recv(self._model())._withChangesDo_((function(){
  4001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4002. return $core.withContext(function($ctx2) {
  4003. //>>excludeEnd("ctx");
  4004. return (
  4005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4006. $ctx2.supercall = true,
  4007. //>>excludeEnd("ctx");
  4008. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._activatePreviousListItem.apply($recv(self), []));
  4009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4010. $ctx2.supercall = false;
  4011. //>>excludeEnd("ctx");;
  4012. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4013. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4014. //>>excludeEnd("ctx");
  4015. }));
  4016. return self;
  4017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4018. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLToolListWidget)});
  4019. //>>excludeEnd("ctx");
  4020. },
  4021. //>>excludeStart("ide", pragmas.excludeIdeData);
  4022. args: [],
  4023. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  4024. referencedClasses: [],
  4025. //>>excludeEnd("ide");
  4026. messageSends: ["withChangesDo:", "model", "activatePreviousListItem"]
  4027. }),
  4028. $globals.HLToolListWidget);
  4029. $core.addMethod(
  4030. $core.method({
  4031. selector: "commandCategory",
  4032. protocol: "accessing",
  4033. fn: function (){
  4034. var self=this;
  4035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4036. return $core.withContext(function($ctx1) {
  4037. //>>excludeEnd("ctx");
  4038. return self._label();
  4039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4040. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},$globals.HLToolListWidget)});
  4041. //>>excludeEnd("ctx");
  4042. },
  4043. //>>excludeStart("ide", pragmas.excludeIdeData);
  4044. args: [],
  4045. source: "commandCategory\x0a\x09^ self label",
  4046. referencedClasses: [],
  4047. //>>excludeEnd("ide");
  4048. messageSends: ["label"]
  4049. }),
  4050. $globals.HLToolListWidget);
  4051. $core.addMethod(
  4052. $core.method({
  4053. selector: "label",
  4054. protocol: "accessing",
  4055. fn: function (){
  4056. var self=this;
  4057. return "List";
  4058. },
  4059. //>>excludeStart("ide", pragmas.excludeIdeData);
  4060. args: [],
  4061. source: "label\x0a\x09^ 'List'",
  4062. referencedClasses: [],
  4063. //>>excludeEnd("ide");
  4064. messageSends: []
  4065. }),
  4066. $globals.HLToolListWidget);
  4067. $core.addMethod(
  4068. $core.method({
  4069. selector: "menuCommands",
  4070. protocol: "accessing",
  4071. fn: function (){
  4072. var self=this;
  4073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4074. return $core.withContext(function($ctx1) {
  4075. //>>excludeEnd("ctx");
  4076. var $2,$1;
  4077. $1=$recv($recv($recv($recv($globals.HLToolCommand)._concreteClasses())._select_((function(each){
  4078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4079. return $core.withContext(function($ctx2) {
  4080. //>>excludeEnd("ctx");
  4081. $2=self._model();
  4082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4083. $ctx2.sendIdx["model"]=1;
  4084. //>>excludeEnd("ctx");
  4085. return $recv(each)._isValidFor_($2);
  4086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4087. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4088. //>>excludeEnd("ctx");
  4089. })))._collect_((function(each){
  4090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4091. return $core.withContext(function($ctx2) {
  4092. //>>excludeEnd("ctx");
  4093. return $recv(each)._for_(self._model());
  4094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4095. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4096. //>>excludeEnd("ctx");
  4097. })))._select_((function(each){
  4098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4099. return $core.withContext(function($ctx2) {
  4100. //>>excludeEnd("ctx");
  4101. return $recv($recv($recv(each)._category()).__eq(self._commandCategory()))._and_((function(){
  4102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4103. return $core.withContext(function($ctx3) {
  4104. //>>excludeEnd("ctx");
  4105. return $recv($recv(each)._isAction())._and_((function(){
  4106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4107. return $core.withContext(function($ctx4) {
  4108. //>>excludeEnd("ctx");
  4109. return $recv(each)._isActive();
  4110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4111. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4112. //>>excludeEnd("ctx");
  4113. }));
  4114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4115. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4116. //>>excludeEnd("ctx");
  4117. }));
  4118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4119. $ctx2.sendIdx["and:"]=1;
  4120. //>>excludeEnd("ctx");
  4121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4122. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  4123. //>>excludeEnd("ctx");
  4124. }));
  4125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4126. $ctx1.sendIdx["select:"]=1;
  4127. //>>excludeEnd("ctx");
  4128. return $1;
  4129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4130. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},$globals.HLToolListWidget)});
  4131. //>>excludeEnd("ctx");
  4132. },
  4133. //>>excludeStart("ide", pragmas.excludeIdeData);
  4134. args: [],
  4135. source: "menuCommands\x0a\x09\x22Answer a collection of commands to be put in the cog menu\x22\x0a\x09\x0a\x09^ ((HLToolCommand concreteClasses\x0a\x09\x09select: [ :each | each isValidFor: self model ])\x0a\x09\x09\x09collect: [ :each | each for: self model ])\x0a\x09\x09\x09select: [ :each | \x0a\x09\x09\x09\x09each category = self commandCategory and: [ \x0a\x09\x09\x09\x09\x09each isAction and: [ each isActive ] ] ]",
  4136. referencedClasses: ["HLToolCommand"],
  4137. //>>excludeEnd("ide");
  4138. messageSends: ["select:", "collect:", "concreteClasses", "isValidFor:", "model", "for:", "and:", "=", "category", "commandCategory", "isAction", "isActive"]
  4139. }),
  4140. $globals.HLToolListWidget);
  4141. $core.addMethod(
  4142. $core.method({
  4143. selector: "model",
  4144. protocol: "accessing",
  4145. fn: function (){
  4146. var self=this;
  4147. return self["@model"];
  4148. },
  4149. //>>excludeStart("ide", pragmas.excludeIdeData);
  4150. args: [],
  4151. source: "model\x0a\x09^ model",
  4152. referencedClasses: [],
  4153. //>>excludeEnd("ide");
  4154. messageSends: []
  4155. }),
  4156. $globals.HLToolListWidget);
  4157. $core.addMethod(
  4158. $core.method({
  4159. selector: "model:",
  4160. protocol: "accessing",
  4161. fn: function (aBrowserModel){
  4162. var self=this;
  4163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4164. return $core.withContext(function($ctx1) {
  4165. //>>excludeEnd("ctx");
  4166. self["@model"]=aBrowserModel;
  4167. self._observeSystem();
  4168. self._observeModel();
  4169. return self;
  4170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4171. }, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},$globals.HLToolListWidget)});
  4172. //>>excludeEnd("ctx");
  4173. },
  4174. //>>excludeStart("ide", pragmas.excludeIdeData);
  4175. args: ["aBrowserModel"],
  4176. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  4177. referencedClasses: [],
  4178. //>>excludeEnd("ide");
  4179. messageSends: ["observeSystem", "observeModel"]
  4180. }),
  4181. $globals.HLToolListWidget);
  4182. $core.addMethod(
  4183. $core.method({
  4184. selector: "observeModel",
  4185. protocol: "actions",
  4186. fn: function (){
  4187. var self=this;
  4188. return self;
  4189. },
  4190. //>>excludeStart("ide", pragmas.excludeIdeData);
  4191. args: [],
  4192. source: "observeModel",
  4193. referencedClasses: [],
  4194. //>>excludeEnd("ide");
  4195. messageSends: []
  4196. }),
  4197. $globals.HLToolListWidget);
  4198. $core.addMethod(
  4199. $core.method({
  4200. selector: "observeSystem",
  4201. protocol: "actions",
  4202. fn: function (){
  4203. var self=this;
  4204. return self;
  4205. },
  4206. //>>excludeStart("ide", pragmas.excludeIdeData);
  4207. args: [],
  4208. source: "observeSystem",
  4209. referencedClasses: [],
  4210. //>>excludeEnd("ide");
  4211. messageSends: []
  4212. }),
  4213. $globals.HLToolListWidget);
  4214. $core.addMethod(
  4215. $core.method({
  4216. selector: "reactivateListItem:",
  4217. protocol: "actions",
  4218. fn: function (anItem){
  4219. var self=this;
  4220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4221. return $core.withContext(function($ctx1) {
  4222. //>>excludeEnd("ctx");
  4223. $recv(self._model())._withChangesDo_((function(){
  4224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4225. return $core.withContext(function($ctx2) {
  4226. //>>excludeEnd("ctx");
  4227. return (
  4228. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4229. $ctx2.supercall = true,
  4230. //>>excludeEnd("ctx");
  4231. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._reactivateListItem_.apply($recv(self), [anItem]));
  4232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4233. $ctx2.supercall = false;
  4234. //>>excludeEnd("ctx");;
  4235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4236. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4237. //>>excludeEnd("ctx");
  4238. }));
  4239. return self;
  4240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4241. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4242. //>>excludeEnd("ctx");
  4243. },
  4244. //>>excludeStart("ide", pragmas.excludeIdeData);
  4245. args: ["anItem"],
  4246. source: "reactivateListItem: anItem\x0a\x09self model withChangesDo: [ super reactivateListItem: anItem ]",
  4247. referencedClasses: [],
  4248. //>>excludeEnd("ide");
  4249. messageSends: ["withChangesDo:", "model", "reactivateListItem:"]
  4250. }),
  4251. $globals.HLToolListWidget);
  4252. $core.addMethod(
  4253. $core.method({
  4254. selector: "renderContentOn:",
  4255. protocol: "rendering",
  4256. fn: function (html){
  4257. var self=this;
  4258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4259. return $core.withContext(function($ctx1) {
  4260. //>>excludeEnd("ctx");
  4261. self._renderHeadOn_(html);
  4262. (
  4263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4264. $ctx1.supercall = true,
  4265. //>>excludeEnd("ctx");
  4266. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._renderContentOn_.apply($recv(self), [html]));
  4267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4268. $ctx1.supercall = false;
  4269. //>>excludeEnd("ctx");;
  4270. return self;
  4271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4272. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLToolListWidget)});
  4273. //>>excludeEnd("ctx");
  4274. },
  4275. //>>excludeStart("ide", pragmas.excludeIdeData);
  4276. args: ["html"],
  4277. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  4278. referencedClasses: [],
  4279. //>>excludeEnd("ide");
  4280. messageSends: ["renderHeadOn:", "renderContentOn:"]
  4281. }),
  4282. $globals.HLToolListWidget);
  4283. $core.addMethod(
  4284. $core.method({
  4285. selector: "renderHeadOn:",
  4286. protocol: "rendering",
  4287. fn: function (html){
  4288. var self=this;
  4289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4290. return $core.withContext(function($ctx1) {
  4291. //>>excludeEnd("ctx");
  4292. var $1,$2;
  4293. $1=$recv(html)._div();
  4294. $recv($1)._class_("list-label");
  4295. $2=$recv($1)._with_((function(){
  4296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4297. return $core.withContext(function($ctx2) {
  4298. //>>excludeEnd("ctx");
  4299. $recv(html)._with_(self._label());
  4300. return self._renderMenuOn_(html);
  4301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4302. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4303. //>>excludeEnd("ctx");
  4304. }));
  4305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4306. $ctx1.sendIdx["with:"]=1;
  4307. //>>excludeEnd("ctx");
  4308. return self;
  4309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4310. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},$globals.HLToolListWidget)});
  4311. //>>excludeEnd("ctx");
  4312. },
  4313. //>>excludeStart("ide", pragmas.excludeIdeData);
  4314. args: ["html"],
  4315. source: "renderHeadOn: html\x0a\x09html div \x0a\x09\x09class: 'list-label';\x0a\x09\x09with: [\x0a\x09\x09\x09html with: self label.\x0a\x09\x09\x09self renderMenuOn: html ]",
  4316. referencedClasses: [],
  4317. //>>excludeEnd("ide");
  4318. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]
  4319. }),
  4320. $globals.HLToolListWidget);
  4321. $core.addMethod(
  4322. $core.method({
  4323. selector: "renderMenuOn:",
  4324. protocol: "rendering",
  4325. fn: function (html){
  4326. var self=this;
  4327. var commands;
  4328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4329. return $core.withContext(function($ctx1) {
  4330. //>>excludeEnd("ctx");
  4331. var $1,$3,$4,$5,$7,$6,$2;
  4332. var $early={};
  4333. try {
  4334. commands=self._menuCommands();
  4335. $recv(commands)._ifEmpty_((function(){
  4336. throw $early=[self];
  4337. }));
  4338. $1=$recv(html)._div();
  4339. $recv($1)._class_("btn-group cog");
  4340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4341. $ctx1.sendIdx["class:"]=1;
  4342. //>>excludeEnd("ctx");
  4343. $2=$recv($1)._with_((function(){
  4344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4345. return $core.withContext(function($ctx2) {
  4346. //>>excludeEnd("ctx");
  4347. $3=$recv(html)._a();
  4348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4349. $ctx2.sendIdx["a"]=1;
  4350. //>>excludeEnd("ctx");
  4351. $recv($3)._class_("btn btn-default dropdown-toggle");
  4352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4353. $ctx2.sendIdx["class:"]=2;
  4354. //>>excludeEnd("ctx");
  4355. $recv($3)._at_put_("data-toggle","dropdown");
  4356. $4=$recv($3)._with_((function(){
  4357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4358. return $core.withContext(function($ctx3) {
  4359. //>>excludeEnd("ctx");
  4360. return $recv($recv(html)._tag_("i"))._class_("glyphicon glyphicon-chevron-down");
  4361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4362. $ctx3.sendIdx["class:"]=3;
  4363. //>>excludeEnd("ctx");
  4364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4365. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4366. //>>excludeEnd("ctx");
  4367. }));
  4368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4369. $ctx2.sendIdx["with:"]=2;
  4370. //>>excludeEnd("ctx");
  4371. $4;
  4372. $5=$recv(html)._ul();
  4373. $recv($5)._class_("dropdown-menu pull-right");
  4374. $6=$recv($5)._with_((function(){
  4375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4376. return $core.withContext(function($ctx3) {
  4377. //>>excludeEnd("ctx");
  4378. return $recv(commands)._do_((function(each){
  4379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4380. return $core.withContext(function($ctx4) {
  4381. //>>excludeEnd("ctx");
  4382. return $recv($recv(html)._li())._with_((function(){
  4383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4384. return $core.withContext(function($ctx5) {
  4385. //>>excludeEnd("ctx");
  4386. $7=$recv(html)._a();
  4387. $recv($7)._with_($recv(each)._menuLabel());
  4388. return $recv($7)._onClick_((function(){
  4389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4390. return $core.withContext(function($ctx6) {
  4391. //>>excludeEnd("ctx");
  4392. return self._execute_(each);
  4393. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4394. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)});
  4395. //>>excludeEnd("ctx");
  4396. }));
  4397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4398. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  4399. //>>excludeEnd("ctx");
  4400. }));
  4401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4402. $ctx4.sendIdx["with:"]=4;
  4403. //>>excludeEnd("ctx");
  4404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4405. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)});
  4406. //>>excludeEnd("ctx");
  4407. }));
  4408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4409. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4410. //>>excludeEnd("ctx");
  4411. }));
  4412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4413. $ctx2.sendIdx["with:"]=3;
  4414. //>>excludeEnd("ctx");
  4415. return $6;
  4416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4417. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4418. //>>excludeEnd("ctx");
  4419. }));
  4420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4421. $ctx1.sendIdx["with:"]=1;
  4422. //>>excludeEnd("ctx");
  4423. return self;
  4424. }
  4425. catch(e) {if(e===$early)return e[0]; throw e}
  4426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4427. }, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},$globals.HLToolListWidget)});
  4428. //>>excludeEnd("ctx");
  4429. },
  4430. //>>excludeStart("ide", pragmas.excludeIdeData);
  4431. args: ["html"],
  4432. source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands ifEmpty: [ ^ self ].\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'btn-group cog';\x0a\x09\x09with: [\x0a\x09\x09\x09html a\x0a\x09\x09\x09\x09class: 'btn btn-default dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'glyphicon glyphicon-chevron-down' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09commands do: [ :each | \x0a\x09\x09\x09\x09\x09html li with: [ html a \x0a\x09\x09\x09\x09\x09\x09with: each menuLabel;\x0a\x09\x09\x09\x09\x09\x09onClick: [ self execute: each ] ] ] ] ]",
  4433. referencedClasses: [],
  4434. //>>excludeEnd("ide");
  4435. messageSends: ["menuCommands", "ifEmpty:", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "li", "menuLabel", "onClick:", "execute:"]
  4436. }),
  4437. $globals.HLToolListWidget);
  4438. $core.addMethod(
  4439. $core.method({
  4440. selector: "selectedItem:",
  4441. protocol: "accessing",
  4442. fn: function (anItem){
  4443. var self=this;
  4444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4445. return $core.withContext(function($ctx1) {
  4446. //>>excludeEnd("ctx");
  4447. (
  4448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4449. $ctx1.supercall = true,
  4450. //>>excludeEnd("ctx");
  4451. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._selectedItem_.apply($recv(self), [anItem]));
  4452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4453. $ctx1.supercall = false;
  4454. //>>excludeEnd("ctx");;
  4455. self._updateMenu();
  4456. return self;
  4457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4458. }, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4459. //>>excludeEnd("ctx");
  4460. },
  4461. //>>excludeStart("ide", pragmas.excludeIdeData);
  4462. args: ["anItem"],
  4463. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  4464. referencedClasses: [],
  4465. //>>excludeEnd("ide");
  4466. messageSends: ["selectedItem:", "updateMenu"]
  4467. }),
  4468. $globals.HLToolListWidget);
  4469. $core.addMethod(
  4470. $core.method({
  4471. selector: "unregister",
  4472. protocol: "actions",
  4473. fn: function (){
  4474. var self=this;
  4475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4476. return $core.withContext(function($ctx1) {
  4477. //>>excludeEnd("ctx");
  4478. var $2,$1;
  4479. (
  4480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4481. $ctx1.supercall = true,
  4482. //>>excludeEnd("ctx");
  4483. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._unregister.apply($recv(self), []));
  4484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4485. $ctx1.supercall = false;
  4486. //>>excludeEnd("ctx");;
  4487. $2=self._model();
  4488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4489. $ctx1.sendIdx["model"]=1;
  4490. //>>excludeEnd("ctx");
  4491. $1=$recv($2)._announcer();
  4492. $recv($1)._unsubscribe_(self);
  4493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4494. $ctx1.sendIdx["unsubscribe:"]=1;
  4495. //>>excludeEnd("ctx");
  4496. $recv($recv(self._model())._systemAnnouncer())._unsubscribe_(self);
  4497. return self;
  4498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4499. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLToolListWidget)});
  4500. //>>excludeEnd("ctx");
  4501. },
  4502. //>>excludeStart("ide", pragmas.excludeIdeData);
  4503. args: [],
  4504. source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
  4505. referencedClasses: [],
  4506. //>>excludeEnd("ide");
  4507. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]
  4508. }),
  4509. $globals.HLToolListWidget);
  4510. $core.addMethod(
  4511. $core.method({
  4512. selector: "updateMenu",
  4513. protocol: "updating",
  4514. fn: function (){
  4515. var self=this;
  4516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4517. return $core.withContext(function($ctx1) {
  4518. //>>excludeEnd("ctx");
  4519. var $3,$2,$1;
  4520. $3=self._wrapper();
  4521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4522. $ctx1.sendIdx["wrapper"]=1;
  4523. //>>excludeEnd("ctx");
  4524. $2=$recv($3)._asJQuery();
  4525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4526. $ctx1.sendIdx["asJQuery"]=1;
  4527. //>>excludeEnd("ctx");
  4528. $1=$recv($2)._find_(".cog");
  4529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4530. $ctx1.sendIdx["find:"]=1;
  4531. //>>excludeEnd("ctx");
  4532. $recv($1)._remove();
  4533. $recv((function(html){
  4534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4535. return $core.withContext(function($ctx2) {
  4536. //>>excludeEnd("ctx");
  4537. return self._renderMenuOn_(html);
  4538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4539. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4540. //>>excludeEnd("ctx");
  4541. }))._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".list-label"));
  4542. return self;
  4543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4544. }, function($ctx1) {$ctx1.fill(self,"updateMenu",{},$globals.HLToolListWidget)});
  4545. //>>excludeEnd("ctx");
  4546. },
  4547. //>>excludeStart("ide", pragmas.excludeIdeData);
  4548. args: [],
  4549. source: "updateMenu\x0a\x09(self wrapper asJQuery find: '.cog') remove.\x0a\x09\x0a\x09[ :html | self renderMenuOn: html ] \x0a\x09\x09appendToJQuery: (self wrapper asJQuery find: '.list-label')",
  4550. referencedClasses: [],
  4551. //>>excludeEnd("ide");
  4552. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]
  4553. }),
  4554. $globals.HLToolListWidget);
  4555. $core.addMethod(
  4556. $core.method({
  4557. selector: "on:",
  4558. protocol: "instance creation",
  4559. fn: function (aModel){
  4560. var self=this;
  4561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4562. return $core.withContext(function($ctx1) {
  4563. //>>excludeEnd("ctx");
  4564. var $1;
  4565. $1=self._new();
  4566. $recv($1)._model_(aModel);
  4567. return $recv($1)._yourself();
  4568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4569. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},$globals.HLToolListWidget.klass)});
  4570. //>>excludeEnd("ctx");
  4571. },
  4572. //>>excludeStart("ide", pragmas.excludeIdeData);
  4573. args: ["aModel"],
  4574. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  4575. referencedClasses: [],
  4576. //>>excludeEnd("ide");
  4577. messageSends: ["model:", "new", "yourself"]
  4578. }),
  4579. $globals.HLToolListWidget.klass);
  4580. $core.addClass("HLTabListWidget", $globals.HLListWidget, ["callback"], "Helios-Core");
  4581. //>>excludeStart("ide", pragmas.excludeIdeData);
  4582. $globals.HLTabListWidget.comment="I am a widget used to display a list of helios tabs.\x0a\x0aWhen a tab is selected, `callback` is evaluated with the selected tab as argument.";
  4583. //>>excludeEnd("ide");
  4584. $core.addMethod(
  4585. $core.method({
  4586. selector: "callback",
  4587. protocol: "accessing",
  4588. fn: function (){
  4589. var self=this;
  4590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4591. return $core.withContext(function($ctx1) {
  4592. //>>excludeEnd("ctx");
  4593. var $1,$receiver;
  4594. $1=self["@callback"];
  4595. if(($receiver = $1) == null || $receiver.isNil){
  4596. return (function(){
  4597. });
  4598. } else {
  4599. return $1;
  4600. }
  4601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4602. }, function($ctx1) {$ctx1.fill(self,"callback",{},$globals.HLTabListWidget)});
  4603. //>>excludeEnd("ctx");
  4604. },
  4605. //>>excludeStart("ide", pragmas.excludeIdeData);
  4606. args: [],
  4607. source: "callback\x0a\x09^ callback ifNil: [ [] ]",
  4608. referencedClasses: [],
  4609. //>>excludeEnd("ide");
  4610. messageSends: ["ifNil:"]
  4611. }),
  4612. $globals.HLTabListWidget);
  4613. $core.addMethod(
  4614. $core.method({
  4615. selector: "callback:",
  4616. protocol: "accessing",
  4617. fn: function (aBlock){
  4618. var self=this;
  4619. self["@callback"]=aBlock;
  4620. return self;
  4621. },
  4622. //>>excludeStart("ide", pragmas.excludeIdeData);
  4623. args: ["aBlock"],
  4624. source: "callback: aBlock\x0a\x09callback := aBlock",
  4625. referencedClasses: [],
  4626. //>>excludeEnd("ide");
  4627. messageSends: []
  4628. }),
  4629. $globals.HLTabListWidget);
  4630. $core.addMethod(
  4631. $core.method({
  4632. selector: "renderItemLabel:on:",
  4633. protocol: "rendering",
  4634. fn: function (aTab,html){
  4635. var self=this;
  4636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4637. return $core.withContext(function($ctx1) {
  4638. //>>excludeEnd("ctx");
  4639. var $1;
  4640. $1=$recv(html)._span();
  4641. $recv($1)._class_($recv(aTab)._cssClass());
  4642. $recv($1)._with_($recv(aTab)._label());
  4643. return self;
  4644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4645. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aTab:aTab,html:html},$globals.HLTabListWidget)});
  4646. //>>excludeEnd("ctx");
  4647. },
  4648. //>>excludeStart("ide", pragmas.excludeIdeData);
  4649. args: ["aTab", "html"],
  4650. source: "renderItemLabel: aTab on: html\x0a\x09html span\x0a\x09\x09class: aTab cssClass;\x0a\x09\x09with: aTab label",
  4651. referencedClasses: [],
  4652. //>>excludeEnd("ide");
  4653. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  4654. }),
  4655. $globals.HLTabListWidget);
  4656. $core.addMethod(
  4657. $core.method({
  4658. selector: "selectItem:",
  4659. protocol: "actions",
  4660. fn: function (aTab){
  4661. var self=this;
  4662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4663. return $core.withContext(function($ctx1) {
  4664. //>>excludeEnd("ctx");
  4665. (
  4666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4667. $ctx1.supercall = true,
  4668. //>>excludeEnd("ctx");
  4669. ($globals.HLTabListWidget.superclass||$boot.nilAsClass).fn.prototype._selectItem_.apply($recv(self), [aTab]));
  4670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4671. $ctx1.supercall = false;
  4672. //>>excludeEnd("ctx");;
  4673. $recv(self._callback())._value_(aTab);
  4674. return self;
  4675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4676. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aTab:aTab},$globals.HLTabListWidget)});
  4677. //>>excludeEnd("ctx");
  4678. },
  4679. //>>excludeStart("ide", pragmas.excludeIdeData);
  4680. args: ["aTab"],
  4681. source: "selectItem: aTab\x0a\x09super selectItem: aTab.\x0a\x09self callback value: aTab",
  4682. referencedClasses: [],
  4683. //>>excludeEnd("ide");
  4684. messageSends: ["selectItem:", "value:", "callback"]
  4685. }),
  4686. $globals.HLTabListWidget);
  4687. $core.addClass("HLInformationWidget", $globals.HLWidget, ["informationString"], "Helios-Core");
  4688. //>>excludeStart("ide", pragmas.excludeIdeData);
  4689. $globals.HLInformationWidget.comment="I display an information dialog.\x0a\x0a## API\x0a\x0a`HLWidget >> #inform:` is a convenience method for creating information dialogs.";
  4690. //>>excludeEnd("ide");
  4691. $core.addMethod(
  4692. $core.method({
  4693. selector: "informationString",
  4694. protocol: "accessing",
  4695. fn: function (){
  4696. var self=this;
  4697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4698. return $core.withContext(function($ctx1) {
  4699. //>>excludeEnd("ctx");
  4700. var $1,$receiver;
  4701. $1=self["@informationString"];
  4702. if(($receiver = $1) == null || $receiver.isNil){
  4703. return "";
  4704. } else {
  4705. return $1;
  4706. }
  4707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4708. }, function($ctx1) {$ctx1.fill(self,"informationString",{},$globals.HLInformationWidget)});
  4709. //>>excludeEnd("ctx");
  4710. },
  4711. //>>excludeStart("ide", pragmas.excludeIdeData);
  4712. args: [],
  4713. source: "informationString\x0a\x09^ informationString ifNil: [ '' ]",
  4714. referencedClasses: [],
  4715. //>>excludeEnd("ide");
  4716. messageSends: ["ifNil:"]
  4717. }),
  4718. $globals.HLInformationWidget);
  4719. $core.addMethod(
  4720. $core.method({
  4721. selector: "informationString:",
  4722. protocol: "accessing",
  4723. fn: function (anObject){
  4724. var self=this;
  4725. self["@informationString"]=anObject;
  4726. return self;
  4727. },
  4728. //>>excludeStart("ide", pragmas.excludeIdeData);
  4729. args: ["anObject"],
  4730. source: "informationString: anObject\x0a\x09informationString := anObject",
  4731. referencedClasses: [],
  4732. //>>excludeEnd("ide");
  4733. messageSends: []
  4734. }),
  4735. $globals.HLInformationWidget);
  4736. $core.addMethod(
  4737. $core.method({
  4738. selector: "remove",
  4739. protocol: "actions",
  4740. fn: function (){
  4741. var self=this;
  4742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4743. return $core.withContext(function($ctx1) {
  4744. //>>excludeEnd("ctx");
  4745. var $2,$1;
  4746. $recv((function(){
  4747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4748. return $core.withContext(function($ctx2) {
  4749. //>>excludeEnd("ctx");
  4750. $2=self._wrapper();
  4751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4752. $ctx2.sendIdx["wrapper"]=1;
  4753. //>>excludeEnd("ctx");
  4754. $1=$recv($2)._asJQuery();
  4755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4756. $ctx2.sendIdx["asJQuery"]=1;
  4757. //>>excludeEnd("ctx");
  4758. $recv($1)._fadeOut_((100));
  4759. return $recv((function(){
  4760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4761. return $core.withContext(function($ctx3) {
  4762. //>>excludeEnd("ctx");
  4763. return $recv($recv(self._wrapper())._asJQuery())._remove();
  4764. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4765. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4766. //>>excludeEnd("ctx");
  4767. }))._valueWithTimeout_((400));
  4768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4769. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4770. //>>excludeEnd("ctx");
  4771. }))._valueWithTimeout_((1500));
  4772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4773. $ctx1.sendIdx["valueWithTimeout:"]=1;
  4774. //>>excludeEnd("ctx");
  4775. return self;
  4776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4777. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLInformationWidget)});
  4778. //>>excludeEnd("ctx");
  4779. },
  4780. //>>excludeStart("ide", pragmas.excludeIdeData);
  4781. args: [],
  4782. source: "remove\x0a\x09[ \x0a\x09\x09self wrapper asJQuery fadeOut: 100.\x0a\x09\x09[ self wrapper asJQuery remove ]\x0a\x09\x09\x09valueWithTimeout: 400.\x0a\x09]\x0a\x09\x09valueWithTimeout: 1500",
  4783. referencedClasses: [],
  4784. //>>excludeEnd("ide");
  4785. messageSends: ["valueWithTimeout:", "fadeOut:", "asJQuery", "wrapper", "remove"]
  4786. }),
  4787. $globals.HLInformationWidget);
  4788. $core.addMethod(
  4789. $core.method({
  4790. selector: "renderContentOn:",
  4791. protocol: "rendering",
  4792. fn: function (html){
  4793. var self=this;
  4794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4795. return $core.withContext(function($ctx1) {
  4796. //>>excludeEnd("ctx");
  4797. var $1;
  4798. $1=$recv(html)._div();
  4799. $recv($1)._class_("growl");
  4800. $recv($1)._with_(self._informationString());
  4801. self._remove();
  4802. return self;
  4803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4804. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLInformationWidget)});
  4805. //>>excludeEnd("ctx");
  4806. },
  4807. //>>excludeStart("ide", pragmas.excludeIdeData);
  4808. args: ["html"],
  4809. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'growl'; \x0a\x09\x09with: self informationString.\x0a\x09\x09\x0a\x09self remove",
  4810. referencedClasses: [],
  4811. //>>excludeEnd("ide");
  4812. messageSends: ["class:", "div", "with:", "informationString", "remove"]
  4813. }),
  4814. $globals.HLInformationWidget);
  4815. $core.addMethod(
  4816. $core.method({
  4817. selector: "show",
  4818. protocol: "actions",
  4819. fn: function (){
  4820. var self=this;
  4821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4822. return $core.withContext(function($ctx1) {
  4823. //>>excludeEnd("ctx");
  4824. self._appendToJQuery_("body"._asJQuery());
  4825. return self;
  4826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4827. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLInformationWidget)});
  4828. //>>excludeEnd("ctx");
  4829. },
  4830. //>>excludeStart("ide", pragmas.excludeIdeData);
  4831. args: [],
  4832. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  4833. referencedClasses: [],
  4834. //>>excludeEnd("ide");
  4835. messageSends: ["appendToJQuery:", "asJQuery"]
  4836. }),
  4837. $globals.HLInformationWidget);
  4838. $core.addClass("HLManager", $globals.HLWidget, ["tabsWidget", "environment", "history", "announcer", "rendered"], "Helios-Core");
  4839. //>>excludeStart("ide", pragmas.excludeIdeData);
  4840. $globals.HLManager.comment="HLManager is the entry point Class of Helios.\x0a\x0aIts `singleton` instance is created on startup, and rendered on body.";
  4841. //>>excludeEnd("ide");
  4842. $core.addMethod(
  4843. $core.method({
  4844. selector: "activate:",
  4845. protocol: "actions",
  4846. fn: function (aTab){
  4847. var self=this;
  4848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4849. return $core.withContext(function($ctx1) {
  4850. //>>excludeEnd("ctx");
  4851. $recv(self._tabsWidget())._activate_(aTab);
  4852. return self;
  4853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4854. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLManager)});
  4855. //>>excludeEnd("ctx");
  4856. },
  4857. //>>excludeStart("ide", pragmas.excludeIdeData);
  4858. args: ["aTab"],
  4859. source: "activate: aTab\x0a\x09self tabsWidget activate: aTab",
  4860. referencedClasses: [],
  4861. //>>excludeEnd("ide");
  4862. messageSends: ["activate:", "tabsWidget"]
  4863. }),
  4864. $globals.HLManager);
  4865. $core.addMethod(
  4866. $core.method({
  4867. selector: "activeTab",
  4868. protocol: "accessing",
  4869. fn: function (){
  4870. var self=this;
  4871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4872. return $core.withContext(function($ctx1) {
  4873. //>>excludeEnd("ctx");
  4874. return $recv(self._tabsWidget())._activeTab();
  4875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4876. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},$globals.HLManager)});
  4877. //>>excludeEnd("ctx");
  4878. },
  4879. //>>excludeStart("ide", pragmas.excludeIdeData);
  4880. args: [],
  4881. source: "activeTab\x0a\x09^ self tabsWidget activeTab",
  4882. referencedClasses: [],
  4883. //>>excludeEnd("ide");
  4884. messageSends: ["activeTab", "tabsWidget"]
  4885. }),
  4886. $globals.HLManager);
  4887. $core.addMethod(
  4888. $core.method({
  4889. selector: "addTab:",
  4890. protocol: "actions",
  4891. fn: function (aTab){
  4892. var self=this;
  4893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4894. return $core.withContext(function($ctx1) {
  4895. //>>excludeEnd("ctx");
  4896. $recv(self._tabsWidget())._addTab_(aTab);
  4897. return self;
  4898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4899. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLManager)});
  4900. //>>excludeEnd("ctx");
  4901. },
  4902. //>>excludeStart("ide", pragmas.excludeIdeData);
  4903. args: ["aTab"],
  4904. source: "addTab: aTab\x0a\x09self tabsWidget addTab: aTab",
  4905. referencedClasses: [],
  4906. //>>excludeEnd("ide");
  4907. messageSends: ["addTab:", "tabsWidget"]
  4908. }),
  4909. $globals.HLManager);
  4910. $core.addMethod(
  4911. $core.method({
  4912. selector: "announcer",
  4913. protocol: "accessing",
  4914. fn: function (){
  4915. var self=this;
  4916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4917. return $core.withContext(function($ctx1) {
  4918. //>>excludeEnd("ctx");
  4919. var $1,$receiver;
  4920. $1=self["@announcer"];
  4921. if(($receiver = $1) == null || $receiver.isNil){
  4922. self["@announcer"]=$recv($globals.Announcer)._new();
  4923. return self["@announcer"];
  4924. } else {
  4925. return $1;
  4926. }
  4927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4928. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLManager)});
  4929. //>>excludeEnd("ctx");
  4930. },
  4931. //>>excludeStart("ide", pragmas.excludeIdeData);
  4932. args: [],
  4933. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  4934. referencedClasses: ["Announcer"],
  4935. //>>excludeEnd("ide");
  4936. messageSends: ["ifNil:", "new"]
  4937. }),
  4938. $globals.HLManager);
  4939. $core.addMethod(
  4940. $core.method({
  4941. selector: "confirm:ifFalse:",
  4942. protocol: "actions",
  4943. fn: function (aString,aBlock){
  4944. var self=this;
  4945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4946. return $core.withContext(function($ctx1) {
  4947. //>>excludeEnd("ctx");
  4948. self._confirm_ifTrue_ifFalse_(aString,(function(){
  4949. }),aBlock);
  4950. return self;
  4951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4952. }, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  4953. //>>excludeEnd("ctx");
  4954. },
  4955. //>>excludeStart("ide", pragmas.excludeIdeData);
  4956. args: ["aString", "aBlock"],
  4957. source: "confirm: aString ifFalse: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: []\x0a\x09\x09ifFalse: aBlock",
  4958. referencedClasses: [],
  4959. //>>excludeEnd("ide");
  4960. messageSends: ["confirm:ifTrue:ifFalse:"]
  4961. }),
  4962. $globals.HLManager);
  4963. $core.addMethod(
  4964. $core.method({
  4965. selector: "confirm:ifTrue:",
  4966. protocol: "actions",
  4967. fn: function (aString,aBlock){
  4968. var self=this;
  4969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4970. return $core.withContext(function($ctx1) {
  4971. //>>excludeEnd("ctx");
  4972. self._confirm_ifTrue_ifFalse_(aString,aBlock,(function(){
  4973. }));
  4974. return self;
  4975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4976. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  4977. //>>excludeEnd("ctx");
  4978. },
  4979. //>>excludeStart("ide", pragmas.excludeIdeData);
  4980. args: ["aString", "aBlock"],
  4981. source: "confirm: aString ifTrue: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: []",
  4982. referencedClasses: [],
  4983. //>>excludeEnd("ide");
  4984. messageSends: ["confirm:ifTrue:ifFalse:"]
  4985. }),
  4986. $globals.HLManager);
  4987. $core.addMethod(
  4988. $core.method({
  4989. selector: "confirm:ifTrue:ifFalse:",
  4990. protocol: "actions",
  4991. fn: function (aString,aBlock,anotherBlock){
  4992. var self=this;
  4993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4994. return $core.withContext(function($ctx1) {
  4995. //>>excludeEnd("ctx");
  4996. var $1;
  4997. $1=$recv($globals.HLConfirmationWidget)._new();
  4998. $recv($1)._confirmationString_(aString);
  4999. $recv($1)._actionBlock_(aBlock);
  5000. $recv($1)._cancelBlock_(anotherBlock);
  5001. $recv($1)._show();
  5002. return self;
  5003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5004. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLManager)});
  5005. //>>excludeEnd("ctx");
  5006. },
  5007. //>>excludeStart("ide", pragmas.excludeIdeData);
  5008. args: ["aString", "aBlock", "anotherBlock"],
  5009. source: "confirm: aString ifTrue: aBlock ifFalse: anotherBlock\x0a\x09HLConfirmationWidget new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09actionBlock: aBlock;\x0a\x09\x09cancelBlock: anotherBlock;\x0a\x09\x09show",
  5010. referencedClasses: ["HLConfirmationWidget"],
  5011. //>>excludeEnd("ide");
  5012. messageSends: ["confirmationString:", "new", "actionBlock:", "cancelBlock:", "show"]
  5013. }),
  5014. $globals.HLManager);
  5015. $core.addMethod(
  5016. $core.method({
  5017. selector: "defaultEnvironment",
  5018. protocol: "defaults",
  5019. fn: function (){
  5020. var self=this;
  5021. var parent,parentSmalltalkGlobals;
  5022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5023. return $core.withContext(function($ctx1) {
  5024. //>>excludeEnd("ctx");
  5025. var $1,$2,$3,$5,$4,$6,$7,$8,$receiver;
  5026. $1=$recv(window)._opener();
  5027. if(($receiver = $1) == null || $receiver.isNil){
  5028. parent=$recv(window)._parent();
  5029. } else {
  5030. parent=$1;
  5031. }
  5032. $2=parent;
  5033. if(($receiver = $2) == null || $receiver.isNil){
  5034. $3=$recv($globals.Environment)._new();
  5035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5036. $ctx1.sendIdx["new"]=1;
  5037. //>>excludeEnd("ctx");
  5038. return $3;
  5039. } else {
  5040. $2;
  5041. }
  5042. $recv((function(){
  5043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5044. return $core.withContext(function($ctx2) {
  5045. //>>excludeEnd("ctx");
  5046. $5=$recv(parent)._at_("requirejs");
  5047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5048. $ctx2.sendIdx["at:"]=2;
  5049. //>>excludeEnd("ctx");
  5050. $4=$recv($5)._value_("amber/boot");
  5051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5052. $ctx2.sendIdx["value:"]=1;
  5053. //>>excludeEnd("ctx");
  5054. parentSmalltalkGlobals=$recv($4)._at_("globals");
  5055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5056. $ctx2.sendIdx["at:"]=1;
  5057. //>>excludeEnd("ctx");
  5058. return parentSmalltalkGlobals;
  5059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5060. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5061. //>>excludeEnd("ctx");
  5062. }))._on_do_($globals.Error,(function(){
  5063. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5064. return $core.withContext(function($ctx2) {
  5065. //>>excludeEnd("ctx");
  5066. $6=$recv(parent)._at_("requirejs");
  5067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5068. $ctx2.sendIdx["at:"]=3;
  5069. //>>excludeEnd("ctx");
  5070. parentSmalltalkGlobals=$recv($6)._value_("amber_vm/globals");
  5071. return parentSmalltalkGlobals;
  5072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5073. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  5074. //>>excludeEnd("ctx");
  5075. }));
  5076. $7=parentSmalltalkGlobals;
  5077. if(($receiver = $7) == null || $receiver.isNil){
  5078. $8=$recv($globals.Environment)._new();
  5079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5080. $ctx1.sendIdx["new"]=2;
  5081. //>>excludeEnd("ctx");
  5082. return $8;
  5083. } else {
  5084. $7;
  5085. }
  5086. self._handleLossOfEnvironmentWithParent_(parent);
  5087. return $recv($recv(parentSmalltalkGlobals)._at_("Environment"))._new();
  5088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5089. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalkGlobals:parentSmalltalkGlobals},$globals.HLManager)});
  5090. //>>excludeEnd("ctx");
  5091. },
  5092. //>>excludeStart("ide", pragmas.excludeIdeData);
  5093. args: [],
  5094. source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent parentSmalltalkGlobals |\x0a\x09\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x09parent ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09[ parentSmalltalkGlobals := ((parent at: 'requirejs') value: 'amber/boot') at: 'globals' ]\x0a\x09on: Error do: [ parentSmalltalkGlobals := (parent at: 'requirejs') value: 'amber_vm/globals' ].\x0a\x09parentSmalltalkGlobals ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09self handleLossOfEnvironmentWithParent: parent.\x0a\x09\x0a\x09^ (parentSmalltalkGlobals at: 'Environment') new",
  5095. referencedClasses: ["Environment", "Error"],
  5096. //>>excludeEnd("ide");
  5097. messageSends: ["ifNil:", "opener", "parent", "new", "on:do:", "at:", "value:", "handleLossOfEnvironmentWithParent:"]
  5098. }),
  5099. $globals.HLManager);
  5100. $core.addMethod(
  5101. $core.method({
  5102. selector: "environment",
  5103. protocol: "accessing",
  5104. fn: function (){
  5105. var self=this;
  5106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5107. return $core.withContext(function($ctx1) {
  5108. //>>excludeEnd("ctx");
  5109. var $1,$receiver;
  5110. $1=self["@environment"];
  5111. if(($receiver = $1) == null || $receiver.isNil){
  5112. self["@environment"]=self._defaultEnvironment();
  5113. return self["@environment"];
  5114. } else {
  5115. return $1;
  5116. }
  5117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5118. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLManager)});
  5119. //>>excludeEnd("ctx");
  5120. },
  5121. //>>excludeStart("ide", pragmas.excludeIdeData);
  5122. args: [],
  5123. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  5124. referencedClasses: [],
  5125. //>>excludeEnd("ide");
  5126. messageSends: ["ifNil:", "defaultEnvironment"]
  5127. }),
  5128. $globals.HLManager);
  5129. $core.addMethod(
  5130. $core.method({
  5131. selector: "environment:",
  5132. protocol: "accessing",
  5133. fn: function (anEnvironment){
  5134. var self=this;
  5135. self["@environment"]=anEnvironment;
  5136. return self;
  5137. },
  5138. //>>excludeStart("ide", pragmas.excludeIdeData);
  5139. args: ["anEnvironment"],
  5140. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  5141. referencedClasses: [],
  5142. //>>excludeEnd("ide");
  5143. messageSends: []
  5144. }),
  5145. $globals.HLManager);
  5146. $core.addMethod(
  5147. $core.method({
  5148. selector: "handleLossOfEnvironmentWithParent:",
  5149. protocol: "actions",
  5150. fn: function (parent){
  5151. var self=this;
  5152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5153. return $core.withContext(function($ctx1) {
  5154. //>>excludeEnd("ctx");
  5155. $recv(parent)._at_put_("onunload",(function(){
  5156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5157. return $core.withContext(function($ctx2) {
  5158. //>>excludeEnd("ctx");
  5159. self._removeBeforeUnloadMessage();
  5160. return $recv(window)._close();
  5161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5162. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5163. //>>excludeEnd("ctx");
  5164. }));
  5165. return self;
  5166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5167. }, function($ctx1) {$ctx1.fill(self,"handleLossOfEnvironmentWithParent:",{parent:parent},$globals.HLManager)});
  5168. //>>excludeEnd("ctx");
  5169. },
  5170. //>>excludeStart("ide", pragmas.excludeIdeData);
  5171. args: ["parent"],
  5172. source: "handleLossOfEnvironmentWithParent: parent\x0a\x09parent at: 'onunload' put: [ \x0a\x09\x09self removeBeforeUnloadMessage.\x0a\x09\x09window close ]",
  5173. referencedClasses: [],
  5174. //>>excludeEnd("ide");
  5175. messageSends: ["at:put:", "removeBeforeUnloadMessage", "close"]
  5176. }),
  5177. $globals.HLManager);
  5178. $core.addMethod(
  5179. $core.method({
  5180. selector: "history",
  5181. protocol: "accessing",
  5182. fn: function (){
  5183. var self=this;
  5184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5185. return $core.withContext(function($ctx1) {
  5186. //>>excludeEnd("ctx");
  5187. var $1,$receiver;
  5188. $1=self["@history"];
  5189. if(($receiver = $1) == null || $receiver.isNil){
  5190. self["@history"]=$recv($globals.OrderedCollection)._new();
  5191. return self["@history"];
  5192. } else {
  5193. return $1;
  5194. }
  5195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5196. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLManager)});
  5197. //>>excludeEnd("ctx");
  5198. },
  5199. //>>excludeStart("ide", pragmas.excludeIdeData);
  5200. args: [],
  5201. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  5202. referencedClasses: ["OrderedCollection"],
  5203. //>>excludeEnd("ide");
  5204. messageSends: ["ifNil:", "new"]
  5205. }),
  5206. $globals.HLManager);
  5207. $core.addMethod(
  5208. $core.method({
  5209. selector: "history:",
  5210. protocol: "accessing",
  5211. fn: function (aCollection){
  5212. var self=this;
  5213. self["@history"]=aCollection;
  5214. return self;
  5215. },
  5216. //>>excludeStart("ide", pragmas.excludeIdeData);
  5217. args: ["aCollection"],
  5218. source: "history: aCollection\x0a\x09history := aCollection",
  5219. referencedClasses: [],
  5220. //>>excludeEnd("ide");
  5221. messageSends: []
  5222. }),
  5223. $globals.HLManager);
  5224. $core.addMethod(
  5225. $core.method({
  5226. selector: "inform:",
  5227. protocol: "actions",
  5228. fn: function (aString){
  5229. var self=this;
  5230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5231. return $core.withContext(function($ctx1) {
  5232. //>>excludeEnd("ctx");
  5233. var $1;
  5234. $1=$recv($globals.HLInformationWidget)._new();
  5235. $recv($1)._informationString_(aString);
  5236. $recv($1)._show();
  5237. return self;
  5238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5239. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLManager)});
  5240. //>>excludeEnd("ctx");
  5241. },
  5242. //>>excludeStart("ide", pragmas.excludeIdeData);
  5243. args: ["aString"],
  5244. source: "inform: aString\x0a\x09HLInformationWidget new\x0a\x09\x09informationString: aString;\x0a\x09\x09show",
  5245. referencedClasses: ["HLInformationWidget"],
  5246. //>>excludeEnd("ide");
  5247. messageSends: ["informationString:", "new", "show"]
  5248. }),
  5249. $globals.HLManager);
  5250. $core.addMethod(
  5251. $core.method({
  5252. selector: "initialize",
  5253. protocol: "initialization",
  5254. fn: function (){
  5255. var self=this;
  5256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5257. return $core.withContext(function($ctx1) {
  5258. //>>excludeEnd("ctx");
  5259. (
  5260. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5261. $ctx1.supercall = true,
  5262. //>>excludeEnd("ctx");
  5263. ($globals.HLManager.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($recv(self), []));
  5264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5265. $ctx1.supercall = false;
  5266. //>>excludeEnd("ctx");;
  5267. self["@rendered"]=false;
  5268. return self;
  5269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5270. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.HLManager)});
  5271. //>>excludeEnd("ctx");
  5272. },
  5273. //>>excludeStart("ide", pragmas.excludeIdeData);
  5274. args: [],
  5275. source: "initialize\x0a\x09super initialize.\x0a\x09rendered := false",
  5276. referencedClasses: [],
  5277. //>>excludeEnd("ide");
  5278. messageSends: ["initialize"]
  5279. }),
  5280. $globals.HLManager);
  5281. $core.addMethod(
  5282. $core.method({
  5283. selector: "keyBinder",
  5284. protocol: "accessing",
  5285. fn: function (){
  5286. var self=this;
  5287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5288. return $core.withContext(function($ctx1) {
  5289. //>>excludeEnd("ctx");
  5290. return $recv($globals.HLKeyBinder)._current();
  5291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5292. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},$globals.HLManager)});
  5293. //>>excludeEnd("ctx");
  5294. },
  5295. //>>excludeStart("ide", pragmas.excludeIdeData);
  5296. args: [],
  5297. source: "keyBinder\x0a\x09^ HLKeyBinder current",
  5298. referencedClasses: ["HLKeyBinder"],
  5299. //>>excludeEnd("ide");
  5300. messageSends: ["current"]
  5301. }),
  5302. $globals.HLManager);
  5303. $core.addMethod(
  5304. $core.method({
  5305. selector: "registerErrorHandler",
  5306. protocol: "services",
  5307. fn: function (){
  5308. var self=this;
  5309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5310. return $core.withContext(function($ctx1) {
  5311. //>>excludeEnd("ctx");
  5312. var $1,$2;
  5313. $1=self._environment();
  5314. $2=$recv($globals.HLErrorHandler)._new();
  5315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5316. $ctx1.sendIdx["new"]=1;
  5317. //>>excludeEnd("ctx");
  5318. $recv($1)._registerErrorHandler_($2);
  5319. $recv($globals.ErrorHandler)._register_($recv($globals.HLErrorHandler)._new());
  5320. return self;
  5321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5322. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler",{},$globals.HLManager)});
  5323. //>>excludeEnd("ctx");
  5324. },
  5325. //>>excludeStart("ide", pragmas.excludeIdeData);
  5326. args: [],
  5327. source: "registerErrorHandler\x0a\x09self environment registerErrorHandler: HLErrorHandler new.\x0a\x09ErrorHandler register: HLErrorHandler new",
  5328. referencedClasses: ["HLErrorHandler", "ErrorHandler"],
  5329. //>>excludeEnd("ide");
  5330. messageSends: ["registerErrorHandler:", "environment", "new", "register:"]
  5331. }),
  5332. $globals.HLManager);
  5333. $core.addMethod(
  5334. $core.method({
  5335. selector: "registerFinder",
  5336. protocol: "services",
  5337. fn: function (){
  5338. var self=this;
  5339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5340. return $core.withContext(function($ctx1) {
  5341. //>>excludeEnd("ctx");
  5342. var $1,$2;
  5343. $1=self._environment();
  5344. $2=$recv($globals.HLFinder)._new();
  5345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5346. $ctx1.sendIdx["new"]=1;
  5347. //>>excludeEnd("ctx");
  5348. $recv($1)._registerFinder_($2);
  5349. $recv($globals.Finder)._register_($recv($globals.HLFinder)._new());
  5350. return self;
  5351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5352. }, function($ctx1) {$ctx1.fill(self,"registerFinder",{},$globals.HLManager)});
  5353. //>>excludeEnd("ctx");
  5354. },
  5355. //>>excludeStart("ide", pragmas.excludeIdeData);
  5356. args: [],
  5357. source: "registerFinder\x0a\x09self environment registerFinder: HLFinder new.\x0a\x09Finder register: HLFinder new",
  5358. referencedClasses: ["HLFinder", "Finder"],
  5359. //>>excludeEnd("ide");
  5360. messageSends: ["registerFinder:", "environment", "new", "register:"]
  5361. }),
  5362. $globals.HLManager);
  5363. $core.addMethod(
  5364. $core.method({
  5365. selector: "registerInspector",
  5366. protocol: "services",
  5367. fn: function (){
  5368. var self=this;
  5369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5370. return $core.withContext(function($ctx1) {
  5371. //>>excludeEnd("ctx");
  5372. $recv(self._environment())._registerInspector_($globals.HLInspector);
  5373. $recv($globals.Inspector)._register_($globals.HLInspector);
  5374. return self;
  5375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5376. }, function($ctx1) {$ctx1.fill(self,"registerInspector",{},$globals.HLManager)});
  5377. //>>excludeEnd("ctx");
  5378. },
  5379. //>>excludeStart("ide", pragmas.excludeIdeData);
  5380. args: [],
  5381. source: "registerInspector\x0a\x09self environment registerInspector: HLInspector.\x0a\x09Inspector register: HLInspector",
  5382. referencedClasses: ["HLInspector", "Inspector"],
  5383. //>>excludeEnd("ide");
  5384. messageSends: ["registerInspector:", "environment", "register:"]
  5385. }),
  5386. $globals.HLManager);
  5387. $core.addMethod(
  5388. $core.method({
  5389. selector: "registerProgressHandler",
  5390. protocol: "services",
  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;
  5397. $1=self._environment();
  5398. $2=$recv($globals.HLProgressHandler)._new();
  5399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5400. $ctx1.sendIdx["new"]=1;
  5401. //>>excludeEnd("ctx");
  5402. $recv($1)._registerProgressHandler_($2);
  5403. $recv($globals.ProgressHandler)._register_($recv($globals.HLProgressHandler)._new());
  5404. return self;
  5405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5406. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler",{},$globals.HLManager)});
  5407. //>>excludeEnd("ctx");
  5408. },
  5409. //>>excludeStart("ide", pragmas.excludeIdeData);
  5410. args: [],
  5411. source: "registerProgressHandler\x0a\x09self environment registerProgressHandler: HLProgressHandler new.\x0a\x09ProgressHandler register: HLProgressHandler new",
  5412. referencedClasses: ["HLProgressHandler", "ProgressHandler"],
  5413. //>>excludeEnd("ide");
  5414. messageSends: ["registerProgressHandler:", "environment", "new", "register:"]
  5415. }),
  5416. $globals.HLManager);
  5417. $core.addMethod(
  5418. $core.method({
  5419. selector: "registerServices",
  5420. protocol: "private",
  5421. fn: function (){
  5422. var self=this;
  5423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5424. return $core.withContext(function($ctx1) {
  5425. //>>excludeEnd("ctx");
  5426. self._registerInspector();
  5427. self._registerErrorHandler();
  5428. self._registerProgressHandler();
  5429. self._registerTranscript();
  5430. self._registerFinder();
  5431. return self;
  5432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5433. }, function($ctx1) {$ctx1.fill(self,"registerServices",{},$globals.HLManager)});
  5434. //>>excludeEnd("ctx");
  5435. },
  5436. //>>excludeStart("ide", pragmas.excludeIdeData);
  5437. args: [],
  5438. source: "registerServices\x0a\x09self\x0a\x09\x09registerInspector;\x0a\x09\x09registerErrorHandler;\x0a\x09\x09registerProgressHandler;\x0a\x09\x09registerTranscript;\x0a\x09\x09registerFinder",
  5439. referencedClasses: [],
  5440. //>>excludeEnd("ide");
  5441. messageSends: ["registerInspector", "registerErrorHandler", "registerProgressHandler", "registerTranscript", "registerFinder"]
  5442. }),
  5443. $globals.HLManager);
  5444. $core.addMethod(
  5445. $core.method({
  5446. selector: "registerTranscript",
  5447. protocol: "services",
  5448. fn: function (){
  5449. var self=this;
  5450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5451. return $core.withContext(function($ctx1) {
  5452. //>>excludeEnd("ctx");
  5453. $recv(self._environment())._registerTranscript_($globals.HLTranscriptHandler);
  5454. return self;
  5455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5456. }, function($ctx1) {$ctx1.fill(self,"registerTranscript",{},$globals.HLManager)});
  5457. //>>excludeEnd("ctx");
  5458. },
  5459. //>>excludeStart("ide", pragmas.excludeIdeData);
  5460. args: [],
  5461. source: "registerTranscript\x0a\x09self environment registerTranscript: HLTranscriptHandler",
  5462. referencedClasses: ["HLTranscriptHandler"],
  5463. //>>excludeEnd("ide");
  5464. messageSends: ["registerTranscript:", "environment"]
  5465. }),
  5466. $globals.HLManager);
  5467. $core.addMethod(
  5468. $core.method({
  5469. selector: "removeActiveTab",
  5470. protocol: "actions",
  5471. fn: function (){
  5472. var self=this;
  5473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5474. return $core.withContext(function($ctx1) {
  5475. //>>excludeEnd("ctx");
  5476. $recv(self._tabsWidget())._removeActiveTab();
  5477. return self;
  5478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5479. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLManager)});
  5480. //>>excludeEnd("ctx");
  5481. },
  5482. //>>excludeStart("ide", pragmas.excludeIdeData);
  5483. args: [],
  5484. source: "removeActiveTab\x0a\x09self tabsWidget removeActiveTab",
  5485. referencedClasses: [],
  5486. //>>excludeEnd("ide");
  5487. messageSends: ["removeActiveTab", "tabsWidget"]
  5488. }),
  5489. $globals.HLManager);
  5490. $core.addMethod(
  5491. $core.method({
  5492. selector: "removeBeforeUnloadMessage",
  5493. protocol: "actions",
  5494. fn: function (){
  5495. var self=this;
  5496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5497. return $core.withContext(function($ctx1) {
  5498. //>>excludeEnd("ctx");
  5499. window.onbeforeunload = null;
  5500. return self;
  5501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5502. }, function($ctx1) {$ctx1.fill(self,"removeBeforeUnloadMessage",{},$globals.HLManager)});
  5503. //>>excludeEnd("ctx");
  5504. },
  5505. //>>excludeStart("ide", pragmas.excludeIdeData);
  5506. args: [],
  5507. source: "removeBeforeUnloadMessage\x0a\x09<inlineJS: 'window.onbeforeunload = null'>",
  5508. referencedClasses: [],
  5509. //>>excludeEnd("ide");
  5510. messageSends: []
  5511. }),
  5512. $globals.HLManager);
  5513. $core.addMethod(
  5514. $core.method({
  5515. selector: "removeTabForWidget:",
  5516. protocol: "actions",
  5517. fn: function (aWidget){
  5518. var self=this;
  5519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5520. return $core.withContext(function($ctx1) {
  5521. //>>excludeEnd("ctx");
  5522. $recv(self._tabsWidget())._removeTabForWidget_(aWidget);
  5523. return self;
  5524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5525. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLManager)});
  5526. //>>excludeEnd("ctx");
  5527. },
  5528. //>>excludeStart("ide", pragmas.excludeIdeData);
  5529. args: ["aWidget"],
  5530. source: "removeTabForWidget: aWidget\x0a\x09self tabsWidget removeTabForWidget: aWidget",
  5531. referencedClasses: [],
  5532. //>>excludeEnd("ide");
  5533. messageSends: ["removeTabForWidget:", "tabsWidget"]
  5534. }),
  5535. $globals.HLManager);
  5536. $core.addMethod(
  5537. $core.method({
  5538. selector: "renderContentOn:",
  5539. protocol: "rendering",
  5540. fn: function (html){
  5541. var self=this;
  5542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5543. return $core.withContext(function($ctx1) {
  5544. //>>excludeEnd("ctx");
  5545. $recv(html)._with_(self._tabsWidget());
  5546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5547. $ctx1.sendIdx["with:"]=1;
  5548. //>>excludeEnd("ctx");
  5549. $recv(html)._with_($recv($globals.HLWelcomeWidget)._new());
  5550. self._renderDefaultTabs();
  5551. self["@rendered"]=true;
  5552. return self;
  5553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5554. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLManager)});
  5555. //>>excludeEnd("ctx");
  5556. },
  5557. //>>excludeStart("ide", pragmas.excludeIdeData);
  5558. args: ["html"],
  5559. source: "renderContentOn: html\x0a\x09html with: self tabsWidget.\x0a\x09html with: HLWelcomeWidget new.\x0a\x09\x0a\x09self renderDefaultTabs.\x0a\x09rendered := true",
  5560. referencedClasses: ["HLWelcomeWidget"],
  5561. //>>excludeEnd("ide");
  5562. messageSends: ["with:", "tabsWidget", "new", "renderDefaultTabs"]
  5563. }),
  5564. $globals.HLManager);
  5565. $core.addMethod(
  5566. $core.method({
  5567. selector: "renderDefaultTabs",
  5568. protocol: "rendering",
  5569. fn: function (){
  5570. var self=this;
  5571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5572. return $core.withContext(function($ctx1) {
  5573. //>>excludeEnd("ctx");
  5574. var $1;
  5575. $1=self["@rendered"];
  5576. if(!$core.assert($1)){
  5577. $recv($globals.HLWorkspace)._openAsTab();
  5578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5579. $ctx1.sendIdx["openAsTab"]=1;
  5580. //>>excludeEnd("ctx");
  5581. $recv($globals.HLBrowser)._openAsTab();
  5582. }
  5583. return self;
  5584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5585. }, function($ctx1) {$ctx1.fill(self,"renderDefaultTabs",{},$globals.HLManager)});
  5586. //>>excludeEnd("ctx");
  5587. },
  5588. //>>excludeStart("ide", pragmas.excludeIdeData);
  5589. args: [],
  5590. source: "renderDefaultTabs\x0a\x09rendered ifFalse: [\x0a\x09\x09HLWorkspace openAsTab.\x0a\x09\x09HLBrowser openAsTab ]",
  5591. referencedClasses: ["HLWorkspace", "HLBrowser"],
  5592. //>>excludeEnd("ide");
  5593. messageSends: ["ifFalse:", "openAsTab"]
  5594. }),
  5595. $globals.HLManager);
  5596. $core.addMethod(
  5597. $core.method({
  5598. selector: "request:do:",
  5599. protocol: "actions",
  5600. fn: function (aString,aBlock){
  5601. var self=this;
  5602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5603. return $core.withContext(function($ctx1) {
  5604. //>>excludeEnd("ctx");
  5605. self._request_value_do_(aString,"",aBlock);
  5606. return self;
  5607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5608. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5609. //>>excludeEnd("ctx");
  5610. },
  5611. //>>excludeStart("ide", pragmas.excludeIdeData);
  5612. args: ["aString", "aBlock"],
  5613. source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
  5614. referencedClasses: [],
  5615. //>>excludeEnd("ide");
  5616. messageSends: ["request:value:do:"]
  5617. }),
  5618. $globals.HLManager);
  5619. $core.addMethod(
  5620. $core.method({
  5621. selector: "request:value:do:",
  5622. protocol: "actions",
  5623. fn: function (aString,valueString,aBlock){
  5624. var self=this;
  5625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5626. return $core.withContext(function($ctx1) {
  5627. //>>excludeEnd("ctx");
  5628. var $1;
  5629. $1=$recv($globals.HLRequestWidget)._new();
  5630. $recv($1)._confirmationString_(aString);
  5631. $recv($1)._actionBlock_(aBlock);
  5632. $recv($1)._value_(valueString);
  5633. $recv($1)._show();
  5634. return self;
  5635. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5636. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLManager)});
  5637. //>>excludeEnd("ctx");
  5638. },
  5639. //>>excludeStart("ide", pragmas.excludeIdeData);
  5640. args: ["aString", "valueString", "aBlock"],
  5641. source: "request: aString value: valueString do: aBlock\x0a\x09HLRequestWidget new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09actionBlock: aBlock;\x0a\x09\x09value: valueString;\x0a\x09\x09show",
  5642. referencedClasses: ["HLRequestWidget"],
  5643. //>>excludeEnd("ide");
  5644. messageSends: ["confirmationString:", "new", "actionBlock:", "value:", "show"]
  5645. }),
  5646. $globals.HLManager);
  5647. $core.addMethod(
  5648. $core.method({
  5649. selector: "setEditorTheme:",
  5650. protocol: "accessing",
  5651. fn: function (aTheme){
  5652. var self=this;
  5653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5654. return $core.withContext(function($ctx1) {
  5655. //>>excludeEnd("ctx");
  5656. $recv("helios.editorTheme"._asSetting())._value_(aTheme);
  5657. return self;
  5658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5659. }, function($ctx1) {$ctx1.fill(self,"setEditorTheme:",{aTheme:aTheme},$globals.HLManager)});
  5660. //>>excludeEnd("ctx");
  5661. },
  5662. //>>excludeStart("ide", pragmas.excludeIdeData);
  5663. args: ["aTheme"],
  5664. source: "setEditorTheme: aTheme\x0a\x0a\x09'helios.editorTheme' asSetting value: aTheme",
  5665. referencedClasses: [],
  5666. //>>excludeEnd("ide");
  5667. messageSends: ["value:", "asSetting"]
  5668. }),
  5669. $globals.HLManager);
  5670. $core.addMethod(
  5671. $core.method({
  5672. selector: "setTheme:",
  5673. protocol: "accessing",
  5674. fn: function (aTheme){
  5675. var self=this;
  5676. var currentTheme;
  5677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5678. return $core.withContext(function($ctx1) {
  5679. //>>excludeEnd("ctx");
  5680. var $1;
  5681. currentTheme="helios.theme"._asSettingIfAbsent_("default");
  5682. $1="body"._asJQuery();
  5683. $recv($1)._removeClass_($recv(currentTheme)._value());
  5684. $recv($1)._addClass_(aTheme);
  5685. $recv("helios.theme"._asSetting())._value_(aTheme);
  5686. return self;
  5687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5688. }, function($ctx1) {$ctx1.fill(self,"setTheme:",{aTheme:aTheme,currentTheme:currentTheme},$globals.HLManager)});
  5689. //>>excludeEnd("ctx");
  5690. },
  5691. //>>excludeStart("ide", pragmas.excludeIdeData);
  5692. args: ["aTheme"],
  5693. source: "setTheme: aTheme\x0a\x09| currentTheme |\x0a\x0a\x09currentTheme := 'helios.theme' asSettingIfAbsent: 'default'.\x0a\x09\x0a\x09'body' asJQuery\x0a\x09\x09removeClass: currentTheme value;\x0a\x09\x09addClass: aTheme.\x0a\x09\x09\x0a\x09\x0a\x09'helios.theme' asSetting value: aTheme",
  5694. referencedClasses: [],
  5695. //>>excludeEnd("ide");
  5696. messageSends: ["asSettingIfAbsent:", "removeClass:", "asJQuery", "value", "addClass:", "value:", "asSetting"]
  5697. }),
  5698. $globals.HLManager);
  5699. $core.addMethod(
  5700. $core.method({
  5701. selector: "setup",
  5702. protocol: "initialization",
  5703. fn: function (){
  5704. var self=this;
  5705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5706. return $core.withContext(function($ctx1) {
  5707. //>>excludeEnd("ctx");
  5708. var $1;
  5709. self._registerServices();
  5710. $1=self._setupEvents();
  5711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5712. $ctx1.sendIdx["setupEvents"]=1;
  5713. //>>excludeEnd("ctx");
  5714. $recv(self._keyBinder())._setupEvents();
  5715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5716. $ctx1.sendIdx["setupEvents"]=2;
  5717. //>>excludeEnd("ctx");
  5718. $recv(self._tabsWidget())._setupEvents();
  5719. self._setupTheme();
  5720. $recv("#helper"._asJQuery())._fadeOut();
  5721. return self;
  5722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5723. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager)});
  5724. //>>excludeEnd("ctx");
  5725. },
  5726. //>>excludeStart("ide", pragmas.excludeIdeData);
  5727. args: [],
  5728. source: "setup\x0a\x09self \x0a\x09\x09registerServices;\x0a\x09\x09setupEvents.\x0a self keyBinder setupEvents.\x0a\x09self tabsWidget setupEvents.\x0a\x09self setupTheme.\x0a\x09\x0a\x09\x0a\x09'#helper' asJQuery fadeOut",
  5729. referencedClasses: [],
  5730. //>>excludeEnd("ide");
  5731. messageSends: ["registerServices", "setupEvents", "keyBinder", "tabsWidget", "setupTheme", "fadeOut", "asJQuery"]
  5732. }),
  5733. $globals.HLManager);
  5734. $core.addMethod(
  5735. $core.method({
  5736. selector: "setupEvents",
  5737. protocol: "private",
  5738. fn: function (){
  5739. var self=this;
  5740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5741. return $core.withContext(function($ctx1) {
  5742. //>>excludeEnd("ctx");
  5743. var $1,$2,$3,$4,$5;
  5744. $1="body"._asJQuery();
  5745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5746. $ctx1.sendIdx["asJQuery"]=1;
  5747. //>>excludeEnd("ctx");
  5748. $recv($1)._keydown_((function(event){
  5749. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5750. return $core.withContext(function($ctx2) {
  5751. //>>excludeEnd("ctx");
  5752. $2=$recv(event)._ctrlKey();
  5753. if($core.assert($2)){
  5754. $3="body"._asJQuery();
  5755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5756. $ctx2.sendIdx["asJQuery"]=2;
  5757. //>>excludeEnd("ctx");
  5758. return $recv($3)._addClass_("navigation");
  5759. }
  5760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5761. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  5762. //>>excludeEnd("ctx");
  5763. }));
  5764. $4="body"._asJQuery();
  5765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5766. $ctx1.sendIdx["asJQuery"]=3;
  5767. //>>excludeEnd("ctx");
  5768. $recv($4)._keyup_((function(event){
  5769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5770. return $core.withContext(function($ctx2) {
  5771. //>>excludeEnd("ctx");
  5772. $5="body"._asJQuery();
  5773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5774. $ctx2.sendIdx["asJQuery"]=4;
  5775. //>>excludeEnd("ctx");
  5776. return $recv($5)._removeClass_("navigation");
  5777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5778. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  5779. //>>excludeEnd("ctx");
  5780. }));
  5781. $recv($recv(window)._asJQuery())._resize_((function(event){
  5782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5783. return $core.withContext(function($ctx2) {
  5784. //>>excludeEnd("ctx");
  5785. return self._refresh();
  5786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5787. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,4)});
  5788. //>>excludeEnd("ctx");
  5789. }));
  5790. return self;
  5791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5792. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLManager)});
  5793. //>>excludeEnd("ctx");
  5794. },
  5795. //>>excludeStart("ide", pragmas.excludeIdeData);
  5796. args: [],
  5797. source: "setupEvents\x0a\x09'body' asJQuery keydown: [ :event |\x0a\x09\x09\x09\x0a\x09\x09\x22On ctrl keydown, adds a 'navigation' css class to <body>\x0a\x09\x09for the CodeMirror navigation links. See `HLCodeWidget`.\x22\x0a\x09\x09event ctrlKey ifTrue: [\x0a\x09\x09\x09'body' asJQuery addClass: 'navigation' ] ].\x0a\x09\x09\x09\x0a\x09'body' asJQuery keyup: [ :event |\x0a\x09\x09'body' asJQuery removeClass: 'navigation' ].\x0a\x09\x09\x0a\x09window asJQuery resize: [ :event |\x0a\x09\x09self refresh ]",
  5798. referencedClasses: [],
  5799. //>>excludeEnd("ide");
  5800. messageSends: ["keydown:", "asJQuery", "ifTrue:", "ctrlKey", "addClass:", "keyup:", "removeClass:", "resize:", "refresh"]
  5801. }),
  5802. $globals.HLManager);
  5803. $core.addMethod(
  5804. $core.method({
  5805. selector: "setupTheme",
  5806. protocol: "private",
  5807. fn: function (){
  5808. var self=this;
  5809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5810. return $core.withContext(function($ctx1) {
  5811. //>>excludeEnd("ctx");
  5812. self._setTheme_("default");
  5813. self._setEditorTheme_("default");
  5814. return self;
  5815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5816. }, function($ctx1) {$ctx1.fill(self,"setupTheme",{},$globals.HLManager)});
  5817. //>>excludeEnd("ctx");
  5818. },
  5819. //>>excludeStart("ide", pragmas.excludeIdeData);
  5820. args: [],
  5821. source: "setupTheme\x0a\x09\x22self \x0a\x09\x09setTheme: 'niflheim';\x0a\x09\x09setEditorTheme: 'niflheim'.\x22\x0a\x09\x09\x0a\x09self \x0a\x09\x09setTheme: 'default';\x0a\x09\x09setEditorTheme: 'default'.",
  5822. referencedClasses: [],
  5823. //>>excludeEnd("ide");
  5824. messageSends: ["setTheme:", "setEditorTheme:"]
  5825. }),
  5826. $globals.HLManager);
  5827. $core.addMethod(
  5828. $core.method({
  5829. selector: "tabWidth",
  5830. protocol: "accessing",
  5831. fn: function (){
  5832. var self=this;
  5833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5834. return $core.withContext(function($ctx1) {
  5835. //>>excludeEnd("ctx");
  5836. return $recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  5837. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5838. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLManager)});
  5839. //>>excludeEnd("ctx");
  5840. },
  5841. //>>excludeStart("ide", pragmas.excludeIdeData);
  5842. args: [],
  5843. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  5844. referencedClasses: [],
  5845. //>>excludeEnd("ide");
  5846. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  5847. }),
  5848. $globals.HLManager);
  5849. $core.addMethod(
  5850. $core.method({
  5851. selector: "tabs",
  5852. protocol: "accessing",
  5853. fn: function (){
  5854. var self=this;
  5855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5856. return $core.withContext(function($ctx1) {
  5857. //>>excludeEnd("ctx");
  5858. return $recv(self._tabsWidget())._tabs();
  5859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5860. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLManager)});
  5861. //>>excludeEnd("ctx");
  5862. },
  5863. //>>excludeStart("ide", pragmas.excludeIdeData);
  5864. args: [],
  5865. source: "tabs\x0a\x09^ self tabsWidget tabs",
  5866. referencedClasses: [],
  5867. //>>excludeEnd("ide");
  5868. messageSends: ["tabs", "tabsWidget"]
  5869. }),
  5870. $globals.HLManager);
  5871. $core.addMethod(
  5872. $core.method({
  5873. selector: "tabsWidget",
  5874. protocol: "accessing",
  5875. fn: function (){
  5876. var self=this;
  5877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5878. return $core.withContext(function($ctx1) {
  5879. //>>excludeEnd("ctx");
  5880. var $1,$receiver;
  5881. $1=self["@tabsWidget"];
  5882. if(($receiver = $1) == null || $receiver.isNil){
  5883. self["@tabsWidget"]=$recv($globals.HLTabsWidget)._new();
  5884. return self["@tabsWidget"];
  5885. } else {
  5886. return $1;
  5887. }
  5888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5889. }, function($ctx1) {$ctx1.fill(self,"tabsWidget",{},$globals.HLManager)});
  5890. //>>excludeEnd("ctx");
  5891. },
  5892. //>>excludeStart("ide", pragmas.excludeIdeData);
  5893. args: [],
  5894. source: "tabsWidget\x0a\x09^ tabsWidget ifNil: [ tabsWidget := HLTabsWidget new ]",
  5895. referencedClasses: ["HLTabsWidget"],
  5896. //>>excludeEnd("ide");
  5897. messageSends: ["ifNil:", "new"]
  5898. }),
  5899. $globals.HLManager);
  5900. $globals.HLManager.klass.iVarNames = ["current"];
  5901. $core.addMethod(
  5902. $core.method({
  5903. selector: "current",
  5904. protocol: "accessing",
  5905. fn: function (){
  5906. var self=this;
  5907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5908. return $core.withContext(function($ctx1) {
  5909. //>>excludeEnd("ctx");
  5910. var $1,$receiver;
  5911. $1=self["@current"];
  5912. if(($receiver = $1) == null || $receiver.isNil){
  5913. self["@current"]=$recv(self._basicNew())._initialize();
  5914. return self["@current"];
  5915. } else {
  5916. return $1;
  5917. }
  5918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5919. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.HLManager.klass)});
  5920. //>>excludeEnd("ctx");
  5921. },
  5922. //>>excludeStart("ide", pragmas.excludeIdeData);
  5923. args: [],
  5924. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  5925. referencedClasses: [],
  5926. //>>excludeEnd("ide");
  5927. messageSends: ["ifNil:", "initialize", "basicNew"]
  5928. }),
  5929. $globals.HLManager.klass);
  5930. $core.addMethod(
  5931. $core.method({
  5932. selector: "new",
  5933. protocol: "instance creation",
  5934. fn: function (){
  5935. var self=this;
  5936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5937. return $core.withContext(function($ctx1) {
  5938. //>>excludeEnd("ctx");
  5939. self._shouldNotImplement();
  5940. return self;
  5941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5942. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.HLManager.klass)});
  5943. //>>excludeEnd("ctx");
  5944. },
  5945. //>>excludeStart("ide", pragmas.excludeIdeData);
  5946. args: [],
  5947. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  5948. referencedClasses: [],
  5949. //>>excludeEnd("ide");
  5950. messageSends: ["shouldNotImplement"]
  5951. }),
  5952. $globals.HLManager.klass);
  5953. $core.addMethod(
  5954. $core.method({
  5955. selector: "setup",
  5956. protocol: "initialization",
  5957. fn: function (){
  5958. var self=this;
  5959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5960. return $core.withContext(function($ctx1) {
  5961. //>>excludeEnd("ctx");
  5962. var $1,$2;
  5963. $1=self._current();
  5964. $recv($1)._setup();
  5965. $recv($1)._appendToJQuery_("body"._asJQuery());
  5966. $2="helios.confirmOnExit"._settingValueIfAbsent_(true);
  5967. if($core.assert($2)){
  5968. $recv(window)._onbeforeunload_((function(){
  5969. return "Do you want to close Amber? All uncommitted changes will be lost.";
  5970. }));
  5971. }
  5972. return self;
  5973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5974. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager.klass)});
  5975. //>>excludeEnd("ctx");
  5976. },
  5977. //>>excludeStart("ide", pragmas.excludeIdeData);
  5978. args: [],
  5979. source: "setup\x0a\x09self current \x0a\x09\x09setup;\x0a\x09\x09appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09('helios.confirmOnExit' settingValueIfAbsent: true) ifTrue: [\x0a\x09\x09window onbeforeunload: [ 'Do you want to close Amber? All uncommitted changes will be lost.' ] ]",
  5980. referencedClasses: [],
  5981. //>>excludeEnd("ide");
  5982. messageSends: ["setup", "current", "appendToJQuery:", "asJQuery", "ifTrue:", "settingValueIfAbsent:", "onbeforeunload:"]
  5983. }),
  5984. $globals.HLManager.klass);
  5985. $core.addClass("HLModalWidget", $globals.HLWidget, [], "Helios-Core");
  5986. //>>excludeStart("ide", pragmas.excludeIdeData);
  5987. $globals.HLModalWidget.comment="I implement an abstract modal widget.";
  5988. //>>excludeEnd("ide");
  5989. $core.addMethod(
  5990. $core.method({
  5991. selector: "giveFocusToButton:",
  5992. protocol: "private",
  5993. fn: function (aButton){
  5994. var self=this;
  5995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5996. return $core.withContext(function($ctx1) {
  5997. //>>excludeEnd("ctx");
  5998. $recv($recv(aButton)._asJQuery())._focus();
  5999. return self;
  6000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6001. }, function($ctx1) {$ctx1.fill(self,"giveFocusToButton:",{aButton:aButton},$globals.HLModalWidget)});
  6002. //>>excludeEnd("ctx");
  6003. },
  6004. //>>excludeStart("ide", pragmas.excludeIdeData);
  6005. args: ["aButton"],
  6006. source: "giveFocusToButton: aButton\x0a\x09aButton asJQuery focus",
  6007. referencedClasses: [],
  6008. //>>excludeEnd("ide");
  6009. messageSends: ["focus", "asJQuery"]
  6010. }),
  6011. $globals.HLModalWidget);
  6012. $core.addMethod(
  6013. $core.method({
  6014. selector: "hasButtons",
  6015. protocol: "rendering",
  6016. fn: function (){
  6017. var self=this;
  6018. return true;
  6019. },
  6020. //>>excludeStart("ide", pragmas.excludeIdeData);
  6021. args: [],
  6022. source: "hasButtons\x0a\x09^ true",
  6023. referencedClasses: [],
  6024. //>>excludeEnd("ide");
  6025. messageSends: []
  6026. }),
  6027. $globals.HLModalWidget);
  6028. $core.addMethod(
  6029. $core.method({
  6030. selector: "remove",
  6031. protocol: "actions",
  6032. fn: function (){
  6033. var self=this;
  6034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6035. return $core.withContext(function($ctx1) {
  6036. //>>excludeEnd("ctx");
  6037. var $1,$2;
  6038. $1=".dialog"._asJQuery();
  6039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6040. $ctx1.sendIdx["asJQuery"]=1;
  6041. //>>excludeEnd("ctx");
  6042. $recv($1)._removeClass_("active");
  6043. $recv((function(){
  6044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6045. return $core.withContext(function($ctx2) {
  6046. //>>excludeEnd("ctx");
  6047. $2="#overlay"._asJQuery();
  6048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6049. $ctx2.sendIdx["asJQuery"]=2;
  6050. //>>excludeEnd("ctx");
  6051. $recv($2)._remove();
  6052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6053. $ctx2.sendIdx["remove"]=1;
  6054. //>>excludeEnd("ctx");
  6055. return $recv($recv(self["@wrapper"])._asJQuery())._remove();
  6056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6057. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6058. //>>excludeEnd("ctx");
  6059. }))._valueWithTimeout_((300));
  6060. return self;
  6061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6062. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLModalWidget)});
  6063. //>>excludeEnd("ctx");
  6064. },
  6065. //>>excludeStart("ide", pragmas.excludeIdeData);
  6066. args: [],
  6067. source: "remove\x0a\x09'.dialog' asJQuery removeClass: 'active'.\x0a\x09[ \x0a\x09\x09'#overlay' asJQuery remove.\x0a\x09\x09wrapper asJQuery remove\x0a\x09] valueWithTimeout: 300",
  6068. referencedClasses: [],
  6069. //>>excludeEnd("ide");
  6070. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]
  6071. }),
  6072. $globals.HLModalWidget);
  6073. $core.addMethod(
  6074. $core.method({
  6075. selector: "renderButtonsOn:",
  6076. protocol: "rendering",
  6077. fn: function (html){
  6078. var self=this;
  6079. return self;
  6080. },
  6081. //>>excludeStart("ide", pragmas.excludeIdeData);
  6082. args: ["html"],
  6083. source: "renderButtonsOn: html",
  6084. referencedClasses: [],
  6085. //>>excludeEnd("ide");
  6086. messageSends: []
  6087. }),
  6088. $globals.HLModalWidget);
  6089. $core.addMethod(
  6090. $core.method({
  6091. selector: "renderContentOn:",
  6092. protocol: "rendering",
  6093. fn: function (html){
  6094. var self=this;
  6095. var confirmButton;
  6096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6097. return $core.withContext(function($ctx1) {
  6098. //>>excludeEnd("ctx");
  6099. var $1,$2,$3;
  6100. $1=$recv(html)._div();
  6101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6102. $ctx1.sendIdx["div"]=1;
  6103. //>>excludeEnd("ctx");
  6104. $recv($1)._id_("overlay");
  6105. $2=$recv(html)._div();
  6106. $recv($2)._class_("dialog ".__comma(self._cssClass()));
  6107. $recv($2)._with_((function(){
  6108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6109. return $core.withContext(function($ctx2) {
  6110. //>>excludeEnd("ctx");
  6111. self._renderMainOn_(html);
  6112. $3=self._hasButtons();
  6113. if($core.assert($3)){
  6114. return self._renderButtonsOn_(html);
  6115. }
  6116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6117. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6118. //>>excludeEnd("ctx");
  6119. }));
  6120. $recv(".dialog"._asJQuery())._addClass_("active");
  6121. self._setupKeyBindings();
  6122. return self;
  6123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6124. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},$globals.HLModalWidget)});
  6125. //>>excludeEnd("ctx");
  6126. },
  6127. //>>excludeStart("ide", pragmas.excludeIdeData);
  6128. args: ["html"],
  6129. source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'dialog ', self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self renderMainOn: html.\x0a\x09\x09\x09self hasButtons ifTrue: [ \x0a\x09\x09\x09\x09self renderButtonsOn: html ] ].\x0a\x0a\x09'.dialog' asJQuery addClass: 'active'.\x0a\x09self setupKeyBindings",
  6130. referencedClasses: [],
  6131. //>>excludeEnd("ide");
  6132. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "ifTrue:", "hasButtons", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]
  6133. }),
  6134. $globals.HLModalWidget);
  6135. $core.addMethod(
  6136. $core.method({
  6137. selector: "renderMainOn:",
  6138. protocol: "rendering",
  6139. fn: function (html){
  6140. var self=this;
  6141. return self;
  6142. },
  6143. //>>excludeStart("ide", pragmas.excludeIdeData);
  6144. args: ["html"],
  6145. source: "renderMainOn: html",
  6146. referencedClasses: [],
  6147. //>>excludeEnd("ide");
  6148. messageSends: []
  6149. }),
  6150. $globals.HLModalWidget);
  6151. $core.addMethod(
  6152. $core.method({
  6153. selector: "setupKeyBindings",
  6154. protocol: "rendering",
  6155. fn: function (){
  6156. var self=this;
  6157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6158. return $core.withContext(function($ctx1) {
  6159. //>>excludeEnd("ctx");
  6160. var $1;
  6161. $recv(".dialog"._asJQuery())._keyup_((function(e){
  6162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6163. return $core.withContext(function($ctx2) {
  6164. //>>excludeEnd("ctx");
  6165. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($globals.String)._esc())._asciiValue());
  6166. if($core.assert($1)){
  6167. return self._cancel();
  6168. }
  6169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6170. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  6171. //>>excludeEnd("ctx");
  6172. }));
  6173. return self;
  6174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6175. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLModalWidget)});
  6176. //>>excludeEnd("ctx");
  6177. },
  6178. //>>excludeStart("ide", pragmas.excludeIdeData);
  6179. args: [],
  6180. source: "setupKeyBindings\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String esc asciiValue ifTrue: [ self cancel ] ]",
  6181. referencedClasses: ["String"],
  6182. //>>excludeEnd("ide");
  6183. messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "esc", "cancel"]
  6184. }),
  6185. $globals.HLModalWidget);
  6186. $core.addMethod(
  6187. $core.method({
  6188. selector: "show",
  6189. protocol: "actions",
  6190. fn: function (){
  6191. var self=this;
  6192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6193. return $core.withContext(function($ctx1) {
  6194. //>>excludeEnd("ctx");
  6195. self._appendToJQuery_("body"._asJQuery());
  6196. return self;
  6197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6198. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLModalWidget)});
  6199. //>>excludeEnd("ctx");
  6200. },
  6201. //>>excludeStart("ide", pragmas.excludeIdeData);
  6202. args: [],
  6203. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  6204. referencedClasses: [],
  6205. //>>excludeEnd("ide");
  6206. messageSends: ["appendToJQuery:", "asJQuery"]
  6207. }),
  6208. $globals.HLModalWidget);
  6209. $core.addClass("HLConfirmationWidget", $globals.HLModalWidget, ["cancelButtonLabel", "confirmButtonLabel", "confirmationString", "actionBlock", "cancelBlock"], "Helios-Core");
  6210. //>>excludeStart("ide", pragmas.excludeIdeData);
  6211. $globals.HLConfirmationWidget.comment="I display confirmation dialog. \x0a\x0a## API\x0a\x0aHLWidget contains convenience methods like `HLWidget >> #confirm:ifTrue:` for creating confirmation dialogs.";
  6212. //>>excludeEnd("ide");
  6213. $core.addMethod(
  6214. $core.method({
  6215. selector: "actionBlock",
  6216. protocol: "accessing",
  6217. fn: function (){
  6218. var self=this;
  6219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6220. return $core.withContext(function($ctx1) {
  6221. //>>excludeEnd("ctx");
  6222. var $1,$receiver;
  6223. $1=self["@actionBlock"];
  6224. if(($receiver = $1) == null || $receiver.isNil){
  6225. return (function(){
  6226. });
  6227. } else {
  6228. return $1;
  6229. }
  6230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6231. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},$globals.HLConfirmationWidget)});
  6232. //>>excludeEnd("ctx");
  6233. },
  6234. //>>excludeStart("ide", pragmas.excludeIdeData);
  6235. args: [],
  6236. source: "actionBlock\x0a\x09^ actionBlock ifNil: [ [] ]",
  6237. referencedClasses: [],
  6238. //>>excludeEnd("ide");
  6239. messageSends: ["ifNil:"]
  6240. }),
  6241. $globals.HLConfirmationWidget);
  6242. $core.addMethod(
  6243. $core.method({
  6244. selector: "actionBlock:",
  6245. protocol: "accessing",
  6246. fn: function (aBlock){
  6247. var self=this;
  6248. self["@actionBlock"]=aBlock;
  6249. return self;
  6250. },
  6251. //>>excludeStart("ide", pragmas.excludeIdeData);
  6252. args: ["aBlock"],
  6253. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  6254. referencedClasses: [],
  6255. //>>excludeEnd("ide");
  6256. messageSends: []
  6257. }),
  6258. $globals.HLConfirmationWidget);
  6259. $core.addMethod(
  6260. $core.method({
  6261. selector: "cancel",
  6262. protocol: "actions",
  6263. fn: function (){
  6264. var self=this;
  6265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6266. return $core.withContext(function($ctx1) {
  6267. //>>excludeEnd("ctx");
  6268. $recv(self._cancelBlock())._value();
  6269. self._remove();
  6270. return self;
  6271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6272. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLConfirmationWidget)});
  6273. //>>excludeEnd("ctx");
  6274. },
  6275. //>>excludeStart("ide", pragmas.excludeIdeData);
  6276. args: [],
  6277. source: "cancel\x0a\x09self cancelBlock value.\x0a\x09self remove",
  6278. referencedClasses: [],
  6279. //>>excludeEnd("ide");
  6280. messageSends: ["value", "cancelBlock", "remove"]
  6281. }),
  6282. $globals.HLConfirmationWidget);
  6283. $core.addMethod(
  6284. $core.method({
  6285. selector: "cancelBlock",
  6286. protocol: "accessing",
  6287. fn: function (){
  6288. var self=this;
  6289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6290. return $core.withContext(function($ctx1) {
  6291. //>>excludeEnd("ctx");
  6292. var $1,$receiver;
  6293. $1=self["@cancelBlock"];
  6294. if(($receiver = $1) == null || $receiver.isNil){
  6295. return (function(){
  6296. });
  6297. } else {
  6298. return $1;
  6299. }
  6300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6301. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},$globals.HLConfirmationWidget)});
  6302. //>>excludeEnd("ctx");
  6303. },
  6304. //>>excludeStart("ide", pragmas.excludeIdeData);
  6305. args: [],
  6306. source: "cancelBlock\x0a\x09^ cancelBlock ifNil: [ [] ]",
  6307. referencedClasses: [],
  6308. //>>excludeEnd("ide");
  6309. messageSends: ["ifNil:"]
  6310. }),
  6311. $globals.HLConfirmationWidget);
  6312. $core.addMethod(
  6313. $core.method({
  6314. selector: "cancelBlock:",
  6315. protocol: "accessing",
  6316. fn: function (aBlock){
  6317. var self=this;
  6318. self["@cancelBlock"]=aBlock;
  6319. return self;
  6320. },
  6321. //>>excludeStart("ide", pragmas.excludeIdeData);
  6322. args: ["aBlock"],
  6323. source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
  6324. referencedClasses: [],
  6325. //>>excludeEnd("ide");
  6326. messageSends: []
  6327. }),
  6328. $globals.HLConfirmationWidget);
  6329. $core.addMethod(
  6330. $core.method({
  6331. selector: "cancelButtonLabel",
  6332. protocol: "accessing",
  6333. fn: function (){
  6334. var self=this;
  6335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6336. return $core.withContext(function($ctx1) {
  6337. //>>excludeEnd("ctx");
  6338. var $1,$receiver;
  6339. $1=self["@cancelButtonLabel"];
  6340. if(($receiver = $1) == null || $receiver.isNil){
  6341. return "Cancel";
  6342. } else {
  6343. return $1;
  6344. }
  6345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6346. }, function($ctx1) {$ctx1.fill(self,"cancelButtonLabel",{},$globals.HLConfirmationWidget)});
  6347. //>>excludeEnd("ctx");
  6348. },
  6349. //>>excludeStart("ide", pragmas.excludeIdeData);
  6350. args: [],
  6351. source: "cancelButtonLabel\x0a\x09^ cancelButtonLabel ifNil: [ 'Cancel' ]",
  6352. referencedClasses: [],
  6353. //>>excludeEnd("ide");
  6354. messageSends: ["ifNil:"]
  6355. }),
  6356. $globals.HLConfirmationWidget);
  6357. $core.addMethod(
  6358. $core.method({
  6359. selector: "cancelButtonLabel:",
  6360. protocol: "accessing",
  6361. fn: function (aString){
  6362. var self=this;
  6363. var $1;
  6364. self["@cancelButtonLabel"]=aString;
  6365. $1=self["@cancelButtonLabel"];
  6366. return $1;
  6367. },
  6368. //>>excludeStart("ide", pragmas.excludeIdeData);
  6369. args: ["aString"],
  6370. source: "cancelButtonLabel: aString\x0a\x09^ cancelButtonLabel := aString",
  6371. referencedClasses: [],
  6372. //>>excludeEnd("ide");
  6373. messageSends: []
  6374. }),
  6375. $globals.HLConfirmationWidget);
  6376. $core.addMethod(
  6377. $core.method({
  6378. selector: "confirm",
  6379. protocol: "actions",
  6380. fn: function (){
  6381. var self=this;
  6382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6383. return $core.withContext(function($ctx1) {
  6384. //>>excludeEnd("ctx");
  6385. self._remove();
  6386. $recv(self._actionBlock())._value();
  6387. return self;
  6388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6389. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLConfirmationWidget)});
  6390. //>>excludeEnd("ctx");
  6391. },
  6392. //>>excludeStart("ide", pragmas.excludeIdeData);
  6393. args: [],
  6394. source: "confirm\x0a\x09self remove.\x0a\x09self actionBlock value",
  6395. referencedClasses: [],
  6396. //>>excludeEnd("ide");
  6397. messageSends: ["remove", "value", "actionBlock"]
  6398. }),
  6399. $globals.HLConfirmationWidget);
  6400. $core.addMethod(
  6401. $core.method({
  6402. selector: "confirmButtonLabel",
  6403. protocol: "accessing",
  6404. fn: function (){
  6405. var self=this;
  6406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6407. return $core.withContext(function($ctx1) {
  6408. //>>excludeEnd("ctx");
  6409. var $1,$receiver;
  6410. $1=self["@confirmButtonLabel"];
  6411. if(($receiver = $1) == null || $receiver.isNil){
  6412. return "Confirm";
  6413. } else {
  6414. return $1;
  6415. }
  6416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6417. }, function($ctx1) {$ctx1.fill(self,"confirmButtonLabel",{},$globals.HLConfirmationWidget)});
  6418. //>>excludeEnd("ctx");
  6419. },
  6420. //>>excludeStart("ide", pragmas.excludeIdeData);
  6421. args: [],
  6422. source: "confirmButtonLabel\x0a\x09^ confirmButtonLabel ifNil: [ 'Confirm' ]",
  6423. referencedClasses: [],
  6424. //>>excludeEnd("ide");
  6425. messageSends: ["ifNil:"]
  6426. }),
  6427. $globals.HLConfirmationWidget);
  6428. $core.addMethod(
  6429. $core.method({
  6430. selector: "confirmButtonLabel:",
  6431. protocol: "accessing",
  6432. fn: function (aString){
  6433. var self=this;
  6434. var $1;
  6435. self["@confirmButtonLabel"]=aString;
  6436. $1=self["@confirmButtonLabel"];
  6437. return $1;
  6438. },
  6439. //>>excludeStart("ide", pragmas.excludeIdeData);
  6440. args: ["aString"],
  6441. source: "confirmButtonLabel: aString\x0a\x09^ confirmButtonLabel := aString",
  6442. referencedClasses: [],
  6443. //>>excludeEnd("ide");
  6444. messageSends: []
  6445. }),
  6446. $globals.HLConfirmationWidget);
  6447. $core.addMethod(
  6448. $core.method({
  6449. selector: "confirmationString",
  6450. protocol: "accessing",
  6451. fn: function (){
  6452. var self=this;
  6453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6454. return $core.withContext(function($ctx1) {
  6455. //>>excludeEnd("ctx");
  6456. var $1,$receiver;
  6457. $1=self["@confirmationString"];
  6458. if(($receiver = $1) == null || $receiver.isNil){
  6459. return "Confirm";
  6460. } else {
  6461. return $1;
  6462. }
  6463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6464. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},$globals.HLConfirmationWidget)});
  6465. //>>excludeEnd("ctx");
  6466. },
  6467. //>>excludeStart("ide", pragmas.excludeIdeData);
  6468. args: [],
  6469. source: "confirmationString\x0a\x09^ confirmationString ifNil: [ 'Confirm' ]",
  6470. referencedClasses: [],
  6471. //>>excludeEnd("ide");
  6472. messageSends: ["ifNil:"]
  6473. }),
  6474. $globals.HLConfirmationWidget);
  6475. $core.addMethod(
  6476. $core.method({
  6477. selector: "confirmationString:",
  6478. protocol: "accessing",
  6479. fn: function (aString){
  6480. var self=this;
  6481. self["@confirmationString"]=aString;
  6482. return self;
  6483. },
  6484. //>>excludeStart("ide", pragmas.excludeIdeData);
  6485. args: ["aString"],
  6486. source: "confirmationString: aString\x0a\x09confirmationString := aString",
  6487. referencedClasses: [],
  6488. //>>excludeEnd("ide");
  6489. messageSends: []
  6490. }),
  6491. $globals.HLConfirmationWidget);
  6492. $core.addMethod(
  6493. $core.method({
  6494. selector: "renderButtonsOn:",
  6495. protocol: "rendering",
  6496. fn: function (html){
  6497. var self=this;
  6498. var confirmButton;
  6499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6500. return $core.withContext(function($ctx1) {
  6501. //>>excludeEnd("ctx");
  6502. var $1,$3,$4,$5,$2;
  6503. $1=$recv(html)._div();
  6504. $recv($1)._class_("buttons");
  6505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6506. $ctx1.sendIdx["class:"]=1;
  6507. //>>excludeEnd("ctx");
  6508. $2=$recv($1)._with_((function(){
  6509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6510. return $core.withContext(function($ctx2) {
  6511. //>>excludeEnd("ctx");
  6512. $3=$recv(html)._button();
  6513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6514. $ctx2.sendIdx["button"]=1;
  6515. //>>excludeEnd("ctx");
  6516. $recv($3)._class_("button");
  6517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6518. $ctx2.sendIdx["class:"]=2;
  6519. //>>excludeEnd("ctx");
  6520. $recv($3)._with_(self._cancelButtonLabel());
  6521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6522. $ctx2.sendIdx["with:"]=2;
  6523. //>>excludeEnd("ctx");
  6524. $4=$recv($3)._onClick_((function(){
  6525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6526. return $core.withContext(function($ctx3) {
  6527. //>>excludeEnd("ctx");
  6528. return self._cancel();
  6529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6530. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6531. //>>excludeEnd("ctx");
  6532. }));
  6533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6534. $ctx2.sendIdx["onClick:"]=1;
  6535. //>>excludeEnd("ctx");
  6536. $4;
  6537. $5=$recv(html)._button();
  6538. $recv($5)._class_("button default");
  6539. $recv($5)._with_(self._confirmButtonLabel());
  6540. confirmButton=$recv($5)._onClick_((function(){
  6541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6542. return $core.withContext(function($ctx3) {
  6543. //>>excludeEnd("ctx");
  6544. return self._confirm();
  6545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6546. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  6547. //>>excludeEnd("ctx");
  6548. }));
  6549. return confirmButton;
  6550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6551. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6552. //>>excludeEnd("ctx");
  6553. }));
  6554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6555. $ctx1.sendIdx["with:"]=1;
  6556. //>>excludeEnd("ctx");
  6557. self._giveFocusToButton_(confirmButton);
  6558. return self;
  6559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6560. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLConfirmationWidget)});
  6561. //>>excludeEnd("ctx");
  6562. },
  6563. //>>excludeStart("ide", pragmas.excludeIdeData);
  6564. args: ["html"],
  6565. source: "renderButtonsOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button\x0a\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09with: self cancelButtonLabel;\x0a\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09with: self confirmButtonLabel;\x0a\x09\x09\x09\x09onClick: [ self confirm ] ].\x0a\x0a\x09self giveFocusToButton:confirmButton",
  6566. referencedClasses: [],
  6567. //>>excludeEnd("ide");
  6568. messageSends: ["class:", "div", "with:", "button", "cancelButtonLabel", "onClick:", "cancel", "confirmButtonLabel", "confirm", "giveFocusToButton:"]
  6569. }),
  6570. $globals.HLConfirmationWidget);
  6571. $core.addMethod(
  6572. $core.method({
  6573. selector: "renderMainOn:",
  6574. protocol: "rendering",
  6575. fn: function (html){
  6576. var self=this;
  6577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6578. return $core.withContext(function($ctx1) {
  6579. //>>excludeEnd("ctx");
  6580. var $1;
  6581. $1=$recv(html)._span();
  6582. $recv($1)._class_("head");
  6583. $recv($1)._with_(self._confirmationString());
  6584. return self;
  6585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6586. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLConfirmationWidget)});
  6587. //>>excludeEnd("ctx");
  6588. },
  6589. //>>excludeStart("ide", pragmas.excludeIdeData);
  6590. args: ["html"],
  6591. source: "renderMainOn: html\x0a\x09html span \x0a\x09\x09class: 'head'; \x0a\x09\x09with: self confirmationString",
  6592. referencedClasses: [],
  6593. //>>excludeEnd("ide");
  6594. messageSends: ["class:", "span", "with:", "confirmationString"]
  6595. }),
  6596. $globals.HLConfirmationWidget);
  6597. $core.addClass("HLRequestWidget", $globals.HLConfirmationWidget, ["input", "multiline", "value"], "Helios-Core");
  6598. //>>excludeStart("ide", pragmas.excludeIdeData);
  6599. $globals.HLRequestWidget.comment="I display a modal window requesting user input.\x0a\x0a## API\x0a\x0a`HLWidget >> #request:do:` and `#request:value:do:` are convenience methods for creating modal request dialogs.";
  6600. //>>excludeEnd("ide");
  6601. $core.addMethod(
  6602. $core.method({
  6603. selector: "beMultiline",
  6604. protocol: "accessing",
  6605. fn: function (){
  6606. var self=this;
  6607. self["@multiline"]=true;
  6608. return self;
  6609. },
  6610. //>>excludeStart("ide", pragmas.excludeIdeData);
  6611. args: [],
  6612. source: "beMultiline\x0a\x09multiline := true",
  6613. referencedClasses: [],
  6614. //>>excludeEnd("ide");
  6615. messageSends: []
  6616. }),
  6617. $globals.HLRequestWidget);
  6618. $core.addMethod(
  6619. $core.method({
  6620. selector: "beSingleline",
  6621. protocol: "accessing",
  6622. fn: function (){
  6623. var self=this;
  6624. self["@multiline"]=false;
  6625. return self;
  6626. },
  6627. //>>excludeStart("ide", pragmas.excludeIdeData);
  6628. args: [],
  6629. source: "beSingleline\x0a\x09multiline := false",
  6630. referencedClasses: [],
  6631. //>>excludeEnd("ide");
  6632. messageSends: []
  6633. }),
  6634. $globals.HLRequestWidget);
  6635. $core.addMethod(
  6636. $core.method({
  6637. selector: "confirm",
  6638. protocol: "actions",
  6639. fn: function (){
  6640. var self=this;
  6641. var val;
  6642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6643. return $core.withContext(function($ctx1) {
  6644. //>>excludeEnd("ctx");
  6645. val=$recv($recv(self["@input"])._asJQuery())._val();
  6646. self._remove();
  6647. $recv(self._actionBlock())._value_(val);
  6648. return self;
  6649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6650. }, function($ctx1) {$ctx1.fill(self,"confirm",{val:val},$globals.HLRequestWidget)});
  6651. //>>excludeEnd("ctx");
  6652. },
  6653. //>>excludeStart("ide", pragmas.excludeIdeData);
  6654. args: [],
  6655. source: "confirm\x0a\x09| val |\x0a\x09val := input asJQuery val.\x0a\x09self remove.\x0a\x09self actionBlock value: val",
  6656. referencedClasses: [],
  6657. //>>excludeEnd("ide");
  6658. messageSends: ["val", "asJQuery", "remove", "value:", "actionBlock"]
  6659. }),
  6660. $globals.HLRequestWidget);
  6661. $core.addMethod(
  6662. $core.method({
  6663. selector: "cssClass",
  6664. protocol: "accessing",
  6665. fn: function (){
  6666. var self=this;
  6667. return "large";
  6668. },
  6669. //>>excludeStart("ide", pragmas.excludeIdeData);
  6670. args: [],
  6671. source: "cssClass\x0a\x09^ 'large'",
  6672. referencedClasses: [],
  6673. //>>excludeEnd("ide");
  6674. messageSends: []
  6675. }),
  6676. $globals.HLRequestWidget);
  6677. $core.addMethod(
  6678. $core.method({
  6679. selector: "giveFocusToButton:",
  6680. protocol: "private",
  6681. fn: function (aButton){
  6682. var self=this;
  6683. return self;
  6684. },
  6685. //>>excludeStart("ide", pragmas.excludeIdeData);
  6686. args: ["aButton"],
  6687. source: "giveFocusToButton: aButton",
  6688. referencedClasses: [],
  6689. //>>excludeEnd("ide");
  6690. messageSends: []
  6691. }),
  6692. $globals.HLRequestWidget);
  6693. $core.addMethod(
  6694. $core.method({
  6695. selector: "isMultiline",
  6696. protocol: "testing",
  6697. fn: function (){
  6698. var self=this;
  6699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6700. return $core.withContext(function($ctx1) {
  6701. //>>excludeEnd("ctx");
  6702. var $1,$receiver;
  6703. $1=self["@multiline"];
  6704. if(($receiver = $1) == null || $receiver.isNil){
  6705. return true;
  6706. } else {
  6707. return $1;
  6708. }
  6709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6710. }, function($ctx1) {$ctx1.fill(self,"isMultiline",{},$globals.HLRequestWidget)});
  6711. //>>excludeEnd("ctx");
  6712. },
  6713. //>>excludeStart("ide", pragmas.excludeIdeData);
  6714. args: [],
  6715. source: "isMultiline\x0a\x09^ multiline ifNil: [ true ]",
  6716. referencedClasses: [],
  6717. //>>excludeEnd("ide");
  6718. messageSends: ["ifNil:"]
  6719. }),
  6720. $globals.HLRequestWidget);
  6721. $core.addMethod(
  6722. $core.method({
  6723. selector: "renderMainOn:",
  6724. protocol: "rendering",
  6725. fn: function (html){
  6726. var self=this;
  6727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6728. return $core.withContext(function($ctx1) {
  6729. //>>excludeEnd("ctx");
  6730. var $1,$2,$3,$4;
  6731. (
  6732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6733. $ctx1.supercall = true,
  6734. //>>excludeEnd("ctx");
  6735. ($globals.HLRequestWidget.superclass||$boot.nilAsClass).fn.prototype._renderMainOn_.apply($recv(self), [html]));
  6736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6737. $ctx1.supercall = false;
  6738. //>>excludeEnd("ctx");;
  6739. $1=self._isMultiline();
  6740. if($core.assert($1)){
  6741. self["@input"]=$recv(html)._textarea();
  6742. self["@input"];
  6743. } else {
  6744. $2=$recv(html)._input();
  6745. $recv($2)._type_("text");
  6746. $recv($2)._onKeyDown_((function(event){
  6747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6748. return $core.withContext(function($ctx2) {
  6749. //>>excludeEnd("ctx");
  6750. $3=$recv($recv(event)._keyCode()).__eq((13));
  6751. if($core.assert($3)){
  6752. return self._confirm();
  6753. }
  6754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6755. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  6756. //>>excludeEnd("ctx");
  6757. }));
  6758. self["@input"]=$recv($2)._yourself();
  6759. self["@input"];
  6760. }
  6761. $4=$recv(self["@input"])._asJQuery();
  6762. $recv($4)._val_(self._value());
  6763. $recv($4)._focus();
  6764. return self;
  6765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6766. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLRequestWidget)});
  6767. //>>excludeEnd("ctx");
  6768. },
  6769. //>>excludeStart("ide", pragmas.excludeIdeData);
  6770. args: ["html"],
  6771. source: "renderMainOn: html\x0a\x09super renderMainOn: html.\x0a\x09self isMultiline\x0a\x09\x09ifTrue: [ input := html textarea ]\x0a\x09\x09ifFalse: [ input := html input \x0a\x09\x09\x09type: 'text';\x0a\x09\x09\x09onKeyDown: [ :event |\x0a\x09\x09\x09\x09event keyCode = 13 ifTrue: [\x0a\x09\x09\x09\x09\x09self confirm ] ];\x0a\x09\x09\x09yourself ].\x0a\x09input asJQuery \x0a\x09\x09val: self value;\x0a\x09\x09focus",
  6772. referencedClasses: [],
  6773. //>>excludeEnd("ide");
  6774. messageSends: ["renderMainOn:", "ifTrue:ifFalse:", "isMultiline", "textarea", "type:", "input", "onKeyDown:", "ifTrue:", "=", "keyCode", "confirm", "yourself", "val:", "asJQuery", "value", "focus"]
  6775. }),
  6776. $globals.HLRequestWidget);
  6777. $core.addMethod(
  6778. $core.method({
  6779. selector: "value",
  6780. protocol: "accessing",
  6781. fn: function (){
  6782. var self=this;
  6783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6784. return $core.withContext(function($ctx1) {
  6785. //>>excludeEnd("ctx");
  6786. var $1,$receiver;
  6787. $1=self["@value"];
  6788. if(($receiver = $1) == null || $receiver.isNil){
  6789. return "";
  6790. } else {
  6791. return $1;
  6792. }
  6793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6794. }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.HLRequestWidget)});
  6795. //>>excludeEnd("ctx");
  6796. },
  6797. //>>excludeStart("ide", pragmas.excludeIdeData);
  6798. args: [],
  6799. source: "value\x0a\x09^ value ifNil: [ '' ]",
  6800. referencedClasses: [],
  6801. //>>excludeEnd("ide");
  6802. messageSends: ["ifNil:"]
  6803. }),
  6804. $globals.HLRequestWidget);
  6805. $core.addMethod(
  6806. $core.method({
  6807. selector: "value:",
  6808. protocol: "accessing",
  6809. fn: function (aString){
  6810. var self=this;
  6811. self["@value"]=aString;
  6812. return self;
  6813. },
  6814. //>>excludeStart("ide", pragmas.excludeIdeData);
  6815. args: ["aString"],
  6816. source: "value: aString\x0a\x09value := aString",
  6817. referencedClasses: [],
  6818. //>>excludeEnd("ide");
  6819. messageSends: []
  6820. }),
  6821. $globals.HLRequestWidget);
  6822. $core.addClass("HLProgressWidget", $globals.HLModalWidget, ["progressBars", "visible"], "Helios-Core");
  6823. //>>excludeStart("ide", pragmas.excludeIdeData);
  6824. $globals.HLProgressWidget.comment="I am a widget used to display progress modal dialogs.\x0a\x0aMy default instance is accessed with `HLProgressWidget class >> #default`.\x0a\x0aSee `HLProgressHandler` for usage.";
  6825. //>>excludeEnd("ide");
  6826. $core.addMethod(
  6827. $core.method({
  6828. selector: "addProgressBar:",
  6829. protocol: "actions",
  6830. fn: function (aProgressBar){
  6831. var self=this;
  6832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6833. return $core.withContext(function($ctx1) {
  6834. //>>excludeEnd("ctx");
  6835. self._show();
  6836. $recv(self._progressBars())._add_(aProgressBar);
  6837. $recv(aProgressBar)._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".dialog"));
  6838. return self;
  6839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6840. }, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  6841. //>>excludeEnd("ctx");
  6842. },
  6843. //>>excludeStart("ide", pragmas.excludeIdeData);
  6844. args: ["aProgressBar"],
  6845. source: "addProgressBar: aProgressBar\x0a\x09self show.\x0a\x09self progressBars add: aProgressBar.\x0a\x09aProgressBar appendToJQuery: (self wrapper asJQuery find: '.dialog')",
  6846. referencedClasses: [],
  6847. //>>excludeEnd("ide");
  6848. messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]
  6849. }),
  6850. $globals.HLProgressWidget);
  6851. $core.addMethod(
  6852. $core.method({
  6853. selector: "do:on:displaying:",
  6854. protocol: "actions",
  6855. fn: function (aBlock,aCollection,aString){
  6856. var self=this;
  6857. var progressBar;
  6858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6859. return $core.withContext(function($ctx1) {
  6860. //>>excludeEnd("ctx");
  6861. var $1;
  6862. $1=$recv($globals.HLProgressBarWidget)._new();
  6863. $recv($1)._parent_(self);
  6864. $recv($1)._label_(aString);
  6865. $recv($1)._workBlock_(aBlock);
  6866. $recv($1)._collection_(aCollection);
  6867. progressBar=$recv($1)._yourself();
  6868. self._addProgressBar_(progressBar);
  6869. $recv(progressBar)._start();
  6870. return self;
  6871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6872. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},$globals.HLProgressWidget)});
  6873. //>>excludeEnd("ctx");
  6874. },
  6875. //>>excludeStart("ide", pragmas.excludeIdeData);
  6876. args: ["aBlock", "aCollection", "aString"],
  6877. source: "do: aBlock on: aCollection displaying: aString\x0a\x09| progressBar |\x0a\x09\x0a\x09progressBar := HLProgressBarWidget new\x0a\x09\x09parent: self;\x0a\x09\x09label: aString;\x0a\x09\x09workBlock: aBlock;\x0a\x09\x09collection: aCollection;\x0a\x09\x09yourself.\x0a\x09\x0a\x09self addProgressBar: progressBar.\x0a\x09progressBar start",
  6878. referencedClasses: ["HLProgressBarWidget"],
  6879. //>>excludeEnd("ide");
  6880. messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]
  6881. }),
  6882. $globals.HLProgressWidget);
  6883. $core.addMethod(
  6884. $core.method({
  6885. selector: "flush",
  6886. protocol: "actions",
  6887. fn: function (){
  6888. var self=this;
  6889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6890. return $core.withContext(function($ctx1) {
  6891. //>>excludeEnd("ctx");
  6892. $recv(self._progressBars())._do_((function(each){
  6893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6894. return $core.withContext(function($ctx2) {
  6895. //>>excludeEnd("ctx");
  6896. return self._removeProgressBar_(each);
  6897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6898. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  6899. //>>excludeEnd("ctx");
  6900. }));
  6901. return self;
  6902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6903. }, function($ctx1) {$ctx1.fill(self,"flush",{},$globals.HLProgressWidget)});
  6904. //>>excludeEnd("ctx");
  6905. },
  6906. //>>excludeStart("ide", pragmas.excludeIdeData);
  6907. args: [],
  6908. source: "flush\x0a\x09self progressBars do: [ :each |\x0a\x09\x09self removeProgressBar: each ]",
  6909. referencedClasses: [],
  6910. //>>excludeEnd("ide");
  6911. messageSends: ["do:", "progressBars", "removeProgressBar:"]
  6912. }),
  6913. $globals.HLProgressWidget);
  6914. $core.addMethod(
  6915. $core.method({
  6916. selector: "hasButtons",
  6917. protocol: "testing",
  6918. fn: function (){
  6919. var self=this;
  6920. return false;
  6921. },
  6922. //>>excludeStart("ide", pragmas.excludeIdeData);
  6923. args: [],
  6924. source: "hasButtons\x0a\x09^ false",
  6925. referencedClasses: [],
  6926. //>>excludeEnd("ide");
  6927. messageSends: []
  6928. }),
  6929. $globals.HLProgressWidget);
  6930. $core.addMethod(
  6931. $core.method({
  6932. selector: "isVisible",
  6933. protocol: "testing",
  6934. fn: function (){
  6935. var self=this;
  6936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6937. return $core.withContext(function($ctx1) {
  6938. //>>excludeEnd("ctx");
  6939. var $1,$receiver;
  6940. $1=self["@visible"];
  6941. if(($receiver = $1) == null || $receiver.isNil){
  6942. return false;
  6943. } else {
  6944. return $1;
  6945. }
  6946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6947. }, function($ctx1) {$ctx1.fill(self,"isVisible",{},$globals.HLProgressWidget)});
  6948. //>>excludeEnd("ctx");
  6949. },
  6950. //>>excludeStart("ide", pragmas.excludeIdeData);
  6951. args: [],
  6952. source: "isVisible\x0a\x09^ visible ifNil: [ false ]",
  6953. referencedClasses: [],
  6954. //>>excludeEnd("ide");
  6955. messageSends: ["ifNil:"]
  6956. }),
  6957. $globals.HLProgressWidget);
  6958. $core.addMethod(
  6959. $core.method({
  6960. selector: "progressBars",
  6961. protocol: "accessing",
  6962. fn: function (){
  6963. var self=this;
  6964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6965. return $core.withContext(function($ctx1) {
  6966. //>>excludeEnd("ctx");
  6967. var $1,$receiver;
  6968. $1=self["@progressBars"];
  6969. if(($receiver = $1) == null || $receiver.isNil){
  6970. self["@progressBars"]=$recv($globals.OrderedCollection)._new();
  6971. return self["@progressBars"];
  6972. } else {
  6973. return $1;
  6974. }
  6975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6976. }, function($ctx1) {$ctx1.fill(self,"progressBars",{},$globals.HLProgressWidget)});
  6977. //>>excludeEnd("ctx");
  6978. },
  6979. //>>excludeStart("ide", pragmas.excludeIdeData);
  6980. args: [],
  6981. source: "progressBars\x0a\x09^ progressBars ifNil: [ progressBars := OrderedCollection new ]",
  6982. referencedClasses: ["OrderedCollection"],
  6983. //>>excludeEnd("ide");
  6984. messageSends: ["ifNil:", "new"]
  6985. }),
  6986. $globals.HLProgressWidget);
  6987. $core.addMethod(
  6988. $core.method({
  6989. selector: "remove",
  6990. protocol: "actions",
  6991. fn: function (){
  6992. var self=this;
  6993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6994. return $core.withContext(function($ctx1) {
  6995. //>>excludeEnd("ctx");
  6996. var $1;
  6997. $1=self._isVisible();
  6998. if($core.assert($1)){
  6999. self["@visible"]=false;
  7000. self["@visible"];
  7001. (
  7002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7003. $ctx1.supercall = true,
  7004. //>>excludeEnd("ctx");
  7005. ($globals.HLProgressWidget.superclass||$boot.nilAsClass).fn.prototype._remove.apply($recv(self), []));
  7006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7007. $ctx1.supercall = false;
  7008. //>>excludeEnd("ctx");;
  7009. }
  7010. return self;
  7011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7012. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressWidget)});
  7013. //>>excludeEnd("ctx");
  7014. },
  7015. //>>excludeStart("ide", pragmas.excludeIdeData);
  7016. args: [],
  7017. source: "remove\x0a\x09self isVisible ifTrue: [\x0a\x09\x09visible := false.\x0a\x09\x09super remove ]",
  7018. referencedClasses: [],
  7019. //>>excludeEnd("ide");
  7020. messageSends: ["ifTrue:", "isVisible", "remove"]
  7021. }),
  7022. $globals.HLProgressWidget);
  7023. $core.addMethod(
  7024. $core.method({
  7025. selector: "removeProgressBar:",
  7026. protocol: "actions",
  7027. fn: function (aProgressBar){
  7028. var self=this;
  7029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7030. return $core.withContext(function($ctx1) {
  7031. //>>excludeEnd("ctx");
  7032. var $1;
  7033. $1=self._progressBars();
  7034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7035. $ctx1.sendIdx["progressBars"]=1;
  7036. //>>excludeEnd("ctx");
  7037. $recv($1)._remove_ifAbsent_(aProgressBar,(function(){
  7038. }));
  7039. $recv($recv($recv(aProgressBar)._wrapper())._asJQuery())._remove();
  7040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7041. $ctx1.sendIdx["remove"]=1;
  7042. //>>excludeEnd("ctx");
  7043. $recv(self._progressBars())._ifEmpty_((function(){
  7044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7045. return $core.withContext(function($ctx2) {
  7046. //>>excludeEnd("ctx");
  7047. return self._remove();
  7048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7049. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7050. //>>excludeEnd("ctx");
  7051. }));
  7052. return self;
  7053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7054. }, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  7055. //>>excludeEnd("ctx");
  7056. },
  7057. //>>excludeStart("ide", pragmas.excludeIdeData);
  7058. args: ["aProgressBar"],
  7059. source: "removeProgressBar: aProgressBar\x0a\x09self progressBars remove: aProgressBar ifAbsent: [].\x0a\x09aProgressBar wrapper asJQuery remove.\x0a\x09\x0a\x09self progressBars ifEmpty: [ self remove ]",
  7060. referencedClasses: [],
  7061. //>>excludeEnd("ide");
  7062. messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]
  7063. }),
  7064. $globals.HLProgressWidget);
  7065. $core.addMethod(
  7066. $core.method({
  7067. selector: "renderMainOn:",
  7068. protocol: "rendering",
  7069. fn: function (html){
  7070. var self=this;
  7071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7072. return $core.withContext(function($ctx1) {
  7073. //>>excludeEnd("ctx");
  7074. $recv(self._progressBars())._do_((function(each){
  7075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7076. return $core.withContext(function($ctx2) {
  7077. //>>excludeEnd("ctx");
  7078. return $recv(html)._with_(each);
  7079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7080. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7081. //>>excludeEnd("ctx");
  7082. }));
  7083. return self;
  7084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7085. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLProgressWidget)});
  7086. //>>excludeEnd("ctx");
  7087. },
  7088. //>>excludeStart("ide", pragmas.excludeIdeData);
  7089. args: ["html"],
  7090. source: "renderMainOn: html\x0a\x09self progressBars do: [ :each |\x0a\x09\x09html with: each ]",
  7091. referencedClasses: [],
  7092. //>>excludeEnd("ide");
  7093. messageSends: ["do:", "progressBars", "with:"]
  7094. }),
  7095. $globals.HLProgressWidget);
  7096. $core.addMethod(
  7097. $core.method({
  7098. selector: "show",
  7099. protocol: "actions",
  7100. fn: function (){
  7101. var self=this;
  7102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7103. return $core.withContext(function($ctx1) {
  7104. //>>excludeEnd("ctx");
  7105. var $1;
  7106. $1=self._isVisible();
  7107. if(!$core.assert($1)){
  7108. self["@visible"]=true;
  7109. self["@visible"];
  7110. (
  7111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7112. $ctx1.supercall = true,
  7113. //>>excludeEnd("ctx");
  7114. ($globals.HLProgressWidget.superclass||$boot.nilAsClass).fn.prototype._show.apply($recv(self), []));
  7115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7116. $ctx1.supercall = false;
  7117. //>>excludeEnd("ctx");;
  7118. }
  7119. return self;
  7120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7121. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLProgressWidget)});
  7122. //>>excludeEnd("ctx");
  7123. },
  7124. //>>excludeStart("ide", pragmas.excludeIdeData);
  7125. args: [],
  7126. source: "show\x0a\x09self isVisible ifFalse: [\x0a\x09\x09visible := true.\x0a\x09\x09super show ]",
  7127. referencedClasses: [],
  7128. //>>excludeEnd("ide");
  7129. messageSends: ["ifFalse:", "isVisible", "show"]
  7130. }),
  7131. $globals.HLProgressWidget);
  7132. $globals.HLProgressWidget.klass.iVarNames = ["default"];
  7133. $core.addMethod(
  7134. $core.method({
  7135. selector: "default",
  7136. protocol: "accessing",
  7137. fn: function (){
  7138. var self=this;
  7139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7140. return $core.withContext(function($ctx1) {
  7141. //>>excludeEnd("ctx");
  7142. var $1,$receiver;
  7143. $1=self["@default"];
  7144. if(($receiver = $1) == null || $receiver.isNil){
  7145. self["@default"]=self._new();
  7146. return self["@default"];
  7147. } else {
  7148. return $1;
  7149. }
  7150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7151. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressWidget.klass)});
  7152. //>>excludeEnd("ctx");
  7153. },
  7154. //>>excludeStart("ide", pragmas.excludeIdeData);
  7155. args: [],
  7156. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  7157. referencedClasses: [],
  7158. //>>excludeEnd("ide");
  7159. messageSends: ["ifNil:", "new"]
  7160. }),
  7161. $globals.HLProgressWidget.klass);
  7162. $core.addClass("HLTabSelectionWidget", $globals.HLModalWidget, ["tabs", "tabList", "selectedTab", "selectCallback", "cancelCallback", "confirmCallback"], "Helios-Core");
  7163. //>>excludeStart("ide", pragmas.excludeIdeData);
  7164. $globals.HLTabSelectionWidget.comment="I am a modal window used to select or create tabs.";
  7165. //>>excludeEnd("ide");
  7166. $core.addMethod(
  7167. $core.method({
  7168. selector: "cancel",
  7169. protocol: "actions",
  7170. fn: function (){
  7171. var self=this;
  7172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7173. return $core.withContext(function($ctx1) {
  7174. //>>excludeEnd("ctx");
  7175. self._remove();
  7176. $recv(self._cancelCallback())._value();
  7177. return self;
  7178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7179. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLTabSelectionWidget)});
  7180. //>>excludeEnd("ctx");
  7181. },
  7182. //>>excludeStart("ide", pragmas.excludeIdeData);
  7183. args: [],
  7184. source: "cancel\x0a\x09self remove.\x0a\x09self cancelCallback value",
  7185. referencedClasses: [],
  7186. //>>excludeEnd("ide");
  7187. messageSends: ["remove", "value", "cancelCallback"]
  7188. }),
  7189. $globals.HLTabSelectionWidget);
  7190. $core.addMethod(
  7191. $core.method({
  7192. selector: "cancelCallback",
  7193. protocol: "accessing",
  7194. fn: function (){
  7195. var self=this;
  7196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7197. return $core.withContext(function($ctx1) {
  7198. //>>excludeEnd("ctx");
  7199. var $1,$receiver;
  7200. $1=self["@cancelCallback"];
  7201. if(($receiver = $1) == null || $receiver.isNil){
  7202. return (function(){
  7203. });
  7204. } else {
  7205. return $1;
  7206. }
  7207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7208. }, function($ctx1) {$ctx1.fill(self,"cancelCallback",{},$globals.HLTabSelectionWidget)});
  7209. //>>excludeEnd("ctx");
  7210. },
  7211. //>>excludeStart("ide", pragmas.excludeIdeData);
  7212. args: [],
  7213. source: "cancelCallback\x0a\x09^ cancelCallback ifNil: [ [] ]",
  7214. referencedClasses: [],
  7215. //>>excludeEnd("ide");
  7216. messageSends: ["ifNil:"]
  7217. }),
  7218. $globals.HLTabSelectionWidget);
  7219. $core.addMethod(
  7220. $core.method({
  7221. selector: "cancelCallback:",
  7222. protocol: "accessing",
  7223. fn: function (aBlock){
  7224. var self=this;
  7225. self["@cancelCallback"]=aBlock;
  7226. return self;
  7227. },
  7228. //>>excludeStart("ide", pragmas.excludeIdeData);
  7229. args: ["aBlock"],
  7230. source: "cancelCallback: aBlock\x0a\x09cancelCallback := aBlock",
  7231. referencedClasses: [],
  7232. //>>excludeEnd("ide");
  7233. messageSends: []
  7234. }),
  7235. $globals.HLTabSelectionWidget);
  7236. $core.addMethod(
  7237. $core.method({
  7238. selector: "confirm",
  7239. protocol: "actions",
  7240. fn: function (){
  7241. var self=this;
  7242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7243. return $core.withContext(function($ctx1) {
  7244. //>>excludeEnd("ctx");
  7245. self._remove();
  7246. $recv(self._confirmCallback())._value_(self._selectedTab());
  7247. return self;
  7248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7249. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLTabSelectionWidget)});
  7250. //>>excludeEnd("ctx");
  7251. },
  7252. //>>excludeStart("ide", pragmas.excludeIdeData);
  7253. args: [],
  7254. source: "confirm\x0a\x09self remove.\x0a\x09self confirmCallback value: self selectedTab",
  7255. referencedClasses: [],
  7256. //>>excludeEnd("ide");
  7257. messageSends: ["remove", "value:", "confirmCallback", "selectedTab"]
  7258. }),
  7259. $globals.HLTabSelectionWidget);
  7260. $core.addMethod(
  7261. $core.method({
  7262. selector: "confirmCallback",
  7263. protocol: "accessing",
  7264. fn: function (){
  7265. var self=this;
  7266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7267. return $core.withContext(function($ctx1) {
  7268. //>>excludeEnd("ctx");
  7269. var $1,$receiver;
  7270. $1=self["@confirmCallback"];
  7271. if(($receiver = $1) == null || $receiver.isNil){
  7272. return (function(){
  7273. });
  7274. } else {
  7275. return $1;
  7276. }
  7277. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7278. }, function($ctx1) {$ctx1.fill(self,"confirmCallback",{},$globals.HLTabSelectionWidget)});
  7279. //>>excludeEnd("ctx");
  7280. },
  7281. //>>excludeStart("ide", pragmas.excludeIdeData);
  7282. args: [],
  7283. source: "confirmCallback\x0a\x09^ confirmCallback ifNil: [ [] ]",
  7284. referencedClasses: [],
  7285. //>>excludeEnd("ide");
  7286. messageSends: ["ifNil:"]
  7287. }),
  7288. $globals.HLTabSelectionWidget);
  7289. $core.addMethod(
  7290. $core.method({
  7291. selector: "confirmCallback:",
  7292. protocol: "accessing",
  7293. fn: function (aBlock){
  7294. var self=this;
  7295. self["@confirmCallback"]=aBlock;
  7296. return self;
  7297. },
  7298. //>>excludeStart("ide", pragmas.excludeIdeData);
  7299. args: ["aBlock"],
  7300. source: "confirmCallback: aBlock\x0a\x09confirmCallback := aBlock",
  7301. referencedClasses: [],
  7302. //>>excludeEnd("ide");
  7303. messageSends: []
  7304. }),
  7305. $globals.HLTabSelectionWidget);
  7306. $core.addMethod(
  7307. $core.method({
  7308. selector: "renderButtonsOn:",
  7309. protocol: "rendering",
  7310. fn: function (html){
  7311. var self=this;
  7312. var confirmButton;
  7313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7314. return $core.withContext(function($ctx1) {
  7315. //>>excludeEnd("ctx");
  7316. var $1,$3,$4,$5,$2;
  7317. $1=$recv(html)._div();
  7318. $recv($1)._class_("buttons");
  7319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7320. $ctx1.sendIdx["class:"]=1;
  7321. //>>excludeEnd("ctx");
  7322. $2=$recv($1)._with_((function(){
  7323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7324. return $core.withContext(function($ctx2) {
  7325. //>>excludeEnd("ctx");
  7326. $3=$recv(html)._button();
  7327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7328. $ctx2.sendIdx["button"]=1;
  7329. //>>excludeEnd("ctx");
  7330. $recv($3)._class_("button");
  7331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7332. $ctx2.sendIdx["class:"]=2;
  7333. //>>excludeEnd("ctx");
  7334. $recv($3)._with_("Cancel");
  7335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7336. $ctx2.sendIdx["with:"]=2;
  7337. //>>excludeEnd("ctx");
  7338. $4=$recv($3)._onClick_((function(){
  7339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7340. return $core.withContext(function($ctx3) {
  7341. //>>excludeEnd("ctx");
  7342. return self._cancel();
  7343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7344. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7345. //>>excludeEnd("ctx");
  7346. }));
  7347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7348. $ctx2.sendIdx["onClick:"]=1;
  7349. //>>excludeEnd("ctx");
  7350. $4;
  7351. $5=$recv(html)._button();
  7352. $recv($5)._class_("button default");
  7353. $recv($5)._with_("Select tab");
  7354. confirmButton=$recv($5)._onClick_((function(){
  7355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7356. return $core.withContext(function($ctx3) {
  7357. //>>excludeEnd("ctx");
  7358. return self._confirm();
  7359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7360. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  7361. //>>excludeEnd("ctx");
  7362. }));
  7363. return confirmButton;
  7364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7365. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7366. //>>excludeEnd("ctx");
  7367. }));
  7368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7369. $ctx1.sendIdx["with:"]=1;
  7370. //>>excludeEnd("ctx");
  7371. self._giveFocusToButton_(confirmButton);
  7372. return self;
  7373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7374. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLTabSelectionWidget)});
  7375. //>>excludeEnd("ctx");
  7376. },
  7377. //>>excludeStart("ide", pragmas.excludeIdeData);
  7378. args: ["html"],
  7379. source: "renderButtonsOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'buttons';\x0a\x09\x09with: [\x0a\x09\x09\x09html button\x0a\x09\x09\x09\x09class: 'button';\x0a\x09\x09\x09\x09with: 'Cancel';\x0a\x09\x09\x09\x09onClick: [ self cancel ].\x0a\x09\x09\x09confirmButton := html button\x0a\x09\x09\x09\x09class: 'button default';\x0a\x09\x09\x09\x09with: 'Select tab';\x0a\x09\x09\x09\x09onClick: [ self confirm ] ].\x0a\x0a\x09self giveFocusToButton:confirmButton",
  7380. referencedClasses: [],
  7381. //>>excludeEnd("ide");
  7382. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "giveFocusToButton:"]
  7383. }),
  7384. $globals.HLTabSelectionWidget);
  7385. $core.addMethod(
  7386. $core.method({
  7387. selector: "renderContentOn:",
  7388. protocol: "rendering",
  7389. fn: function (html){
  7390. var self=this;
  7391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7392. return $core.withContext(function($ctx1) {
  7393. //>>excludeEnd("ctx");
  7394. (
  7395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7396. $ctx1.supercall = true,
  7397. //>>excludeEnd("ctx");
  7398. ($globals.HLTabSelectionWidget.superclass||$boot.nilAsClass).fn.prototype._renderContentOn_.apply($recv(self), [html]));
  7399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7400. $ctx1.supercall = false;
  7401. //>>excludeEnd("ctx");;
  7402. $recv(self._tabList())._focus();
  7403. return self;
  7404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7405. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabSelectionWidget)});
  7406. //>>excludeEnd("ctx");
  7407. },
  7408. //>>excludeStart("ide", pragmas.excludeIdeData);
  7409. args: ["html"],
  7410. source: "renderContentOn: html\x0a\x09super renderContentOn: html.\x0a\x09self tabList focus",
  7411. referencedClasses: [],
  7412. //>>excludeEnd("ide");
  7413. messageSends: ["renderContentOn:", "focus", "tabList"]
  7414. }),
  7415. $globals.HLTabSelectionWidget);
  7416. $core.addMethod(
  7417. $core.method({
  7418. selector: "renderMainOn:",
  7419. protocol: "rendering",
  7420. fn: function (html){
  7421. var self=this;
  7422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7423. return $core.withContext(function($ctx1) {
  7424. //>>excludeEnd("ctx");
  7425. var $1,$2;
  7426. $1=$recv(html)._div();
  7427. $recv($1)._class_("title");
  7428. $2=$recv($1)._with_("Tab selection");
  7429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7430. $ctx1.sendIdx["with:"]=1;
  7431. //>>excludeEnd("ctx");
  7432. $recv(html)._with_(self._tabList());
  7433. return self;
  7434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7435. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLTabSelectionWidget)});
  7436. //>>excludeEnd("ctx");
  7437. },
  7438. //>>excludeStart("ide", pragmas.excludeIdeData);
  7439. args: ["html"],
  7440. source: "renderMainOn: html\x0a\x09html div \x0a\x09\x09class: 'title'; \x0a\x09\x09with: 'Tab selection'.\x0a\x09\x0a\x09html with: self tabList",
  7441. referencedClasses: [],
  7442. //>>excludeEnd("ide");
  7443. messageSends: ["class:", "div", "with:", "tabList"]
  7444. }),
  7445. $globals.HLTabSelectionWidget);
  7446. $core.addMethod(
  7447. $core.method({
  7448. selector: "renderTab:on:",
  7449. protocol: "rendering",
  7450. fn: function (aTab,html){
  7451. var self=this;
  7452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7453. return $core.withContext(function($ctx1) {
  7454. //>>excludeEnd("ctx");
  7455. var $1;
  7456. $1=$recv(html)._span();
  7457. $recv($1)._class_($recv(aTab)._cssClass());
  7458. $recv($1)._with_($recv(aTab)._label());
  7459. return self;
  7460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7461. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html},$globals.HLTabSelectionWidget)});
  7462. //>>excludeEnd("ctx");
  7463. },
  7464. //>>excludeStart("ide", pragmas.excludeIdeData);
  7465. args: ["aTab", "html"],
  7466. source: "renderTab: aTab on: html\x0a\x09html \x0a\x09\x09span \x0a\x09\x09\x09class: aTab cssClass;\x0a\x09\x09\x09with: aTab label",
  7467. referencedClasses: [],
  7468. //>>excludeEnd("ide");
  7469. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  7470. }),
  7471. $globals.HLTabSelectionWidget);
  7472. $core.addMethod(
  7473. $core.method({
  7474. selector: "renderTabsOn:",
  7475. protocol: "rendering",
  7476. fn: function (html){
  7477. var self=this;
  7478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7479. return $core.withContext(function($ctx1) {
  7480. //>>excludeEnd("ctx");
  7481. var $1;
  7482. $recv(self._tabs())._do_((function(each){
  7483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7484. return $core.withContext(function($ctx2) {
  7485. //>>excludeEnd("ctx");
  7486. return $recv($recv(html)._li())._with_((function(){
  7487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7488. return $core.withContext(function($ctx3) {
  7489. //>>excludeEnd("ctx");
  7490. $1=$recv(html)._a();
  7491. $recv($1)._with_((function(){
  7492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7493. return $core.withContext(function($ctx4) {
  7494. //>>excludeEnd("ctx");
  7495. return self._renderTab_on_(each,html);
  7496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7497. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7498. //>>excludeEnd("ctx");
  7499. }));
  7500. return $recv($1)._onClick_((function(){
  7501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7502. return $core.withContext(function($ctx4) {
  7503. //>>excludeEnd("ctx");
  7504. return self._selectTab_(each);
  7505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7506. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7507. //>>excludeEnd("ctx");
  7508. }));
  7509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7510. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7511. //>>excludeEnd("ctx");
  7512. }));
  7513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7514. $ctx2.sendIdx["with:"]=1;
  7515. //>>excludeEnd("ctx");
  7516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7517. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7518. //>>excludeEnd("ctx");
  7519. }));
  7520. return self;
  7521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7522. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.HLTabSelectionWidget)});
  7523. //>>excludeEnd("ctx");
  7524. },
  7525. //>>excludeStart("ide", pragmas.excludeIdeData);
  7526. args: ["html"],
  7527. source: "renderTabsOn: html\x0a\x09self tabs do: [ :each |\x0a\x09\x09html li with: [ \x0a\x09\x09\x09html a \x0a\x09\x09\x09\x09with: [ \x0a\x09\x09\x09\x09\x09self renderTab: each on: html ];\x0a\x09\x09\x09\x09onClick: [ self selectTab: each ] ] ]",
  7528. referencedClasses: [],
  7529. //>>excludeEnd("ide");
  7530. messageSends: ["do:", "tabs", "with:", "li", "a", "renderTab:on:", "onClick:", "selectTab:"]
  7531. }),
  7532. $globals.HLTabSelectionWidget);
  7533. $core.addMethod(
  7534. $core.method({
  7535. selector: "selectCallback",
  7536. protocol: "accessing",
  7537. fn: function (){
  7538. var self=this;
  7539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7540. return $core.withContext(function($ctx1) {
  7541. //>>excludeEnd("ctx");
  7542. var $1,$receiver;
  7543. $1=self["@selectCallback"];
  7544. if(($receiver = $1) == null || $receiver.isNil){
  7545. return (function(){
  7546. });
  7547. } else {
  7548. return $1;
  7549. }
  7550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7551. }, function($ctx1) {$ctx1.fill(self,"selectCallback",{},$globals.HLTabSelectionWidget)});
  7552. //>>excludeEnd("ctx");
  7553. },
  7554. //>>excludeStart("ide", pragmas.excludeIdeData);
  7555. args: [],
  7556. source: "selectCallback\x0a\x09^ selectCallback ifNil: [ [] ]",
  7557. referencedClasses: [],
  7558. //>>excludeEnd("ide");
  7559. messageSends: ["ifNil:"]
  7560. }),
  7561. $globals.HLTabSelectionWidget);
  7562. $core.addMethod(
  7563. $core.method({
  7564. selector: "selectCallback:",
  7565. protocol: "accessing",
  7566. fn: function (aBlock){
  7567. var self=this;
  7568. self["@selectCallback"]=aBlock;
  7569. return self;
  7570. },
  7571. //>>excludeStart("ide", pragmas.excludeIdeData);
  7572. args: ["aBlock"],
  7573. source: "selectCallback: aBlock\x0a\x09selectCallback := aBlock",
  7574. referencedClasses: [],
  7575. //>>excludeEnd("ide");
  7576. messageSends: []
  7577. }),
  7578. $globals.HLTabSelectionWidget);
  7579. $core.addMethod(
  7580. $core.method({
  7581. selector: "selectTab:",
  7582. protocol: "actions",
  7583. fn: function (aTab){
  7584. var self=this;
  7585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7586. return $core.withContext(function($ctx1) {
  7587. //>>excludeEnd("ctx");
  7588. self._selectedTab_(aTab);
  7589. $recv(self._selectCallback())._value_(aTab);
  7590. return self;
  7591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7592. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aTab:aTab},$globals.HLTabSelectionWidget)});
  7593. //>>excludeEnd("ctx");
  7594. },
  7595. //>>excludeStart("ide", pragmas.excludeIdeData);
  7596. args: ["aTab"],
  7597. source: "selectTab: aTab\x0a\x09self selectedTab: aTab.\x0a\x09self selectCallback value: aTab",
  7598. referencedClasses: [],
  7599. //>>excludeEnd("ide");
  7600. messageSends: ["selectedTab:", "value:", "selectCallback"]
  7601. }),
  7602. $globals.HLTabSelectionWidget);
  7603. $core.addMethod(
  7604. $core.method({
  7605. selector: "selectedTab",
  7606. protocol: "accessing",
  7607. fn: function (){
  7608. var self=this;
  7609. return self["@selectedTab"];
  7610. },
  7611. //>>excludeStart("ide", pragmas.excludeIdeData);
  7612. args: [],
  7613. source: "selectedTab\x0a\x09^ selectedTab",
  7614. referencedClasses: [],
  7615. //>>excludeEnd("ide");
  7616. messageSends: []
  7617. }),
  7618. $globals.HLTabSelectionWidget);
  7619. $core.addMethod(
  7620. $core.method({
  7621. selector: "selectedTab:",
  7622. protocol: "accessing",
  7623. fn: function (aTab){
  7624. var self=this;
  7625. self["@selectedTab"]=aTab;
  7626. return self;
  7627. },
  7628. //>>excludeStart("ide", pragmas.excludeIdeData);
  7629. args: ["aTab"],
  7630. source: "selectedTab: aTab\x0a\x09selectedTab := aTab",
  7631. referencedClasses: [],
  7632. //>>excludeEnd("ide");
  7633. messageSends: []
  7634. }),
  7635. $globals.HLTabSelectionWidget);
  7636. $core.addMethod(
  7637. $core.method({
  7638. selector: "setupKeyBindings",
  7639. protocol: "actions",
  7640. fn: function (){
  7641. var self=this;
  7642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7643. return $core.withContext(function($ctx1) {
  7644. //>>excludeEnd("ctx");
  7645. var $1;
  7646. (
  7647. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7648. $ctx1.supercall = true,
  7649. //>>excludeEnd("ctx");
  7650. ($globals.HLTabSelectionWidget.superclass||$boot.nilAsClass).fn.prototype._setupKeyBindings.apply($recv(self), []));
  7651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7652. $ctx1.supercall = false;
  7653. //>>excludeEnd("ctx");;
  7654. $recv(".dialog"._asJQuery())._keyup_((function(e){
  7655. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7656. return $core.withContext(function($ctx2) {
  7657. //>>excludeEnd("ctx");
  7658. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($globals.String)._cr())._asciiValue());
  7659. if($core.assert($1)){
  7660. return self._confirm();
  7661. }
  7662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7663. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  7664. //>>excludeEnd("ctx");
  7665. }));
  7666. return self;
  7667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7668. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLTabSelectionWidget)});
  7669. //>>excludeEnd("ctx");
  7670. },
  7671. //>>excludeStart("ide", pragmas.excludeIdeData);
  7672. args: [],
  7673. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String cr asciiValue ifTrue: [ self confirm ] ]",
  7674. referencedClasses: ["String"],
  7675. //>>excludeEnd("ide");
  7676. messageSends: ["setupKeyBindings", "keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "cr", "confirm"]
  7677. }),
  7678. $globals.HLTabSelectionWidget);
  7679. $core.addMethod(
  7680. $core.method({
  7681. selector: "tabList",
  7682. protocol: "rendering",
  7683. fn: function (){
  7684. var self=this;
  7685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7686. return $core.withContext(function($ctx1) {
  7687. //>>excludeEnd("ctx");
  7688. var $1,$2,$receiver;
  7689. $1=self["@tabList"];
  7690. if(($receiver = $1) == null || $receiver.isNil){
  7691. self["@tabList"]=$recv($globals.HLTabListWidget)._new();
  7692. self["@tabList"];
  7693. $2=self["@tabList"];
  7694. $recv($2)._callback_((function(tab){
  7695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7696. return $core.withContext(function($ctx2) {
  7697. //>>excludeEnd("ctx");
  7698. self._selectTab_(tab);
  7699. return $recv(self["@tabList"])._focus();
  7700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7701. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  7702. //>>excludeEnd("ctx");
  7703. }));
  7704. $recv($2)._selectedItem_(self._selectedTab());
  7705. $recv($2)._items_(self._tabs());
  7706. } else {
  7707. $1;
  7708. }
  7709. return self["@tabList"];
  7710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7711. }, function($ctx1) {$ctx1.fill(self,"tabList",{},$globals.HLTabSelectionWidget)});
  7712. //>>excludeEnd("ctx");
  7713. },
  7714. //>>excludeStart("ide", pragmas.excludeIdeData);
  7715. args: [],
  7716. source: "tabList\x0a\x09tabList ifNil: [ \x0a\x09\x09tabList := HLTabListWidget new.\x0a\x09\x09tabList\x0a\x09\x09\x09callback: [ :tab | self selectTab: tab. tabList focus ];\x0a\x09\x09\x09selectedItem: self selectedTab;\x0a\x09\x09\x09items: self tabs ].\x0a\x09\x0a\x09^ tabList",
  7717. referencedClasses: ["HLTabListWidget"],
  7718. //>>excludeEnd("ide");
  7719. messageSends: ["ifNil:", "new", "callback:", "selectTab:", "focus", "selectedItem:", "selectedTab", "items:", "tabs"]
  7720. }),
  7721. $globals.HLTabSelectionWidget);
  7722. $core.addMethod(
  7723. $core.method({
  7724. selector: "tabs",
  7725. protocol: "accessing",
  7726. fn: function (){
  7727. var self=this;
  7728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7729. return $core.withContext(function($ctx1) {
  7730. //>>excludeEnd("ctx");
  7731. var $1,$receiver;
  7732. $1=self["@tabs"];
  7733. if(($receiver = $1) == null || $receiver.isNil){
  7734. return [];
  7735. } else {
  7736. return $1;
  7737. }
  7738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7739. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabSelectionWidget)});
  7740. //>>excludeEnd("ctx");
  7741. },
  7742. //>>excludeStart("ide", pragmas.excludeIdeData);
  7743. args: [],
  7744. source: "tabs\x0a\x09^ tabs ifNil: [ #() ]",
  7745. referencedClasses: [],
  7746. //>>excludeEnd("ide");
  7747. messageSends: ["ifNil:"]
  7748. }),
  7749. $globals.HLTabSelectionWidget);
  7750. $core.addMethod(
  7751. $core.method({
  7752. selector: "tabs:",
  7753. protocol: "accessing",
  7754. fn: function (aCollection){
  7755. var self=this;
  7756. self["@tabs"]=aCollection;
  7757. return self;
  7758. },
  7759. //>>excludeStart("ide", pragmas.excludeIdeData);
  7760. args: ["aCollection"],
  7761. source: "tabs: aCollection\x0a\x09tabs := aCollection",
  7762. referencedClasses: [],
  7763. //>>excludeEnd("ide");
  7764. messageSends: []
  7765. }),
  7766. $globals.HLTabSelectionWidget);
  7767. $core.addClass("HLProgressBarWidget", $globals.HLWidget, ["label", "parent", "workBlock", "collection", "bar"], "Helios-Core");
  7768. //>>excludeStart("ide", pragmas.excludeIdeData);
  7769. $globals.HLProgressBarWidget.comment="I am a widget used to display a progress bar while iterating over a collection.";
  7770. //>>excludeEnd("ide");
  7771. $core.addMethod(
  7772. $core.method({
  7773. selector: "collection",
  7774. protocol: "accessing",
  7775. fn: function (){
  7776. var self=this;
  7777. return self["@collection"];
  7778. },
  7779. //>>excludeStart("ide", pragmas.excludeIdeData);
  7780. args: [],
  7781. source: "collection\x0a\x09^ collection",
  7782. referencedClasses: [],
  7783. //>>excludeEnd("ide");
  7784. messageSends: []
  7785. }),
  7786. $globals.HLProgressBarWidget);
  7787. $core.addMethod(
  7788. $core.method({
  7789. selector: "collection:",
  7790. protocol: "accessing",
  7791. fn: function (aCollection){
  7792. var self=this;
  7793. self["@collection"]=aCollection;
  7794. return self;
  7795. },
  7796. //>>excludeStart("ide", pragmas.excludeIdeData);
  7797. args: ["aCollection"],
  7798. source: "collection: aCollection\x0a\x09collection := aCollection",
  7799. referencedClasses: [],
  7800. //>>excludeEnd("ide");
  7801. messageSends: []
  7802. }),
  7803. $globals.HLProgressBarWidget);
  7804. $core.addMethod(
  7805. $core.method({
  7806. selector: "evaluateAt:",
  7807. protocol: "actions",
  7808. fn: function (anInteger){
  7809. var self=this;
  7810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7811. return $core.withContext(function($ctx1) {
  7812. //>>excludeEnd("ctx");
  7813. var $4,$3,$2,$1,$7,$6,$5;
  7814. $4=self._collection();
  7815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7816. $ctx1.sendIdx["collection"]=1;
  7817. //>>excludeEnd("ctx");
  7818. $3=$recv($4)._size();
  7819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7820. $ctx1.sendIdx["size"]=1;
  7821. //>>excludeEnd("ctx");
  7822. $2=$recv(anInteger).__slash($3);
  7823. $1=$recv($2).__star((100));
  7824. self._updateProgress_($1);
  7825. $7=self._collection();
  7826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7827. $ctx1.sendIdx["collection"]=2;
  7828. //>>excludeEnd("ctx");
  7829. $6=$recv($7)._size();
  7830. $5=$recv(anInteger).__lt_eq($6);
  7831. if($core.assert($5)){
  7832. $recv((function(){
  7833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7834. return $core.withContext(function($ctx2) {
  7835. //>>excludeEnd("ctx");
  7836. $recv(self._workBlock())._value_($recv(self._collection())._at_(anInteger));
  7837. return self._evaluateAt_($recv(anInteger).__plus((1)));
  7838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7839. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7840. //>>excludeEnd("ctx");
  7841. }))._fork();
  7842. } else {
  7843. $recv((function(){
  7844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7845. return $core.withContext(function($ctx2) {
  7846. //>>excludeEnd("ctx");
  7847. return self._remove();
  7848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7849. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  7850. //>>excludeEnd("ctx");
  7851. }))._valueWithTimeout_((500));
  7852. }
  7853. return self;
  7854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7855. }, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  7856. //>>excludeEnd("ctx");
  7857. },
  7858. //>>excludeStart("ide", pragmas.excludeIdeData);
  7859. args: ["anInteger"],
  7860. source: "evaluateAt: anInteger\x0a\x09self updateProgress: (anInteger / self collection size) * 100.\x0a\x09anInteger <= self collection size\x0a\x09\x09ifTrue: [ \x0a\x09\x09\x09[ \x0a\x09\x09\x09\x09self workBlock value: (self collection at: anInteger).\x0a\x09\x09\x09\x09self evaluateAt: anInteger + 1 ] fork ]\x0a\x09\x09ifFalse: [ [ self remove ] valueWithTimeout: 500 ]",
  7861. referencedClasses: [],
  7862. //>>excludeEnd("ide");
  7863. messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "<=", "fork", "value:", "workBlock", "at:", "evaluateAt:", "+", "valueWithTimeout:", "remove"]
  7864. }),
  7865. $globals.HLProgressBarWidget);
  7866. $core.addMethod(
  7867. $core.method({
  7868. selector: "label",
  7869. protocol: "accessing",
  7870. fn: function (){
  7871. var self=this;
  7872. return self["@label"];
  7873. },
  7874. //>>excludeStart("ide", pragmas.excludeIdeData);
  7875. args: [],
  7876. source: "label\x0a\x09^ label",
  7877. referencedClasses: [],
  7878. //>>excludeEnd("ide");
  7879. messageSends: []
  7880. }),
  7881. $globals.HLProgressBarWidget);
  7882. $core.addMethod(
  7883. $core.method({
  7884. selector: "label:",
  7885. protocol: "accessing",
  7886. fn: function (aString){
  7887. var self=this;
  7888. self["@label"]=aString;
  7889. return self;
  7890. },
  7891. //>>excludeStart("ide", pragmas.excludeIdeData);
  7892. args: ["aString"],
  7893. source: "label: aString\x0a\x09label := aString",
  7894. referencedClasses: [],
  7895. //>>excludeEnd("ide");
  7896. messageSends: []
  7897. }),
  7898. $globals.HLProgressBarWidget);
  7899. $core.addMethod(
  7900. $core.method({
  7901. selector: "parent",
  7902. protocol: "accessing",
  7903. fn: function (){
  7904. var self=this;
  7905. return self["@parent"];
  7906. },
  7907. //>>excludeStart("ide", pragmas.excludeIdeData);
  7908. args: [],
  7909. source: "parent\x0a\x09^ parent",
  7910. referencedClasses: [],
  7911. //>>excludeEnd("ide");
  7912. messageSends: []
  7913. }),
  7914. $globals.HLProgressBarWidget);
  7915. $core.addMethod(
  7916. $core.method({
  7917. selector: "parent:",
  7918. protocol: "accessing",
  7919. fn: function (aProgress){
  7920. var self=this;
  7921. self["@parent"]=aProgress;
  7922. return self;
  7923. },
  7924. //>>excludeStart("ide", pragmas.excludeIdeData);
  7925. args: ["aProgress"],
  7926. source: "parent: aProgress\x0a\x09parent := aProgress",
  7927. referencedClasses: [],
  7928. //>>excludeEnd("ide");
  7929. messageSends: []
  7930. }),
  7931. $globals.HLProgressBarWidget);
  7932. $core.addMethod(
  7933. $core.method({
  7934. selector: "remove",
  7935. protocol: "actions",
  7936. fn: function (){
  7937. var self=this;
  7938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7939. return $core.withContext(function($ctx1) {
  7940. //>>excludeEnd("ctx");
  7941. $recv(self._parent())._removeProgressBar_(self);
  7942. return self;
  7943. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7944. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressBarWidget)});
  7945. //>>excludeEnd("ctx");
  7946. },
  7947. //>>excludeStart("ide", pragmas.excludeIdeData);
  7948. args: [],
  7949. source: "remove\x0a\x09self parent removeProgressBar: self",
  7950. referencedClasses: [],
  7951. //>>excludeEnd("ide");
  7952. messageSends: ["removeProgressBar:", "parent"]
  7953. }),
  7954. $globals.HLProgressBarWidget);
  7955. $core.addMethod(
  7956. $core.method({
  7957. selector: "renderContentOn:",
  7958. protocol: "rendering",
  7959. fn: function (html){
  7960. var self=this;
  7961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7962. return $core.withContext(function($ctx1) {
  7963. //>>excludeEnd("ctx");
  7964. var $1,$2,$3,$4,$5;
  7965. $1=$recv(html)._span();
  7966. $2=self._label();
  7967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7968. $ctx1.sendIdx["label"]=1;
  7969. //>>excludeEnd("ctx");
  7970. $recv($1)._with_($2);
  7971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7972. $ctx1.sendIdx["with:"]=1;
  7973. //>>excludeEnd("ctx");
  7974. $3=console;
  7975. $recv($3)._log_("progress bar: ");
  7976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7977. $ctx1.sendIdx["log:"]=1;
  7978. //>>excludeEnd("ctx");
  7979. $recv($3)._log_(self._label());
  7980. $4=$recv(html)._div();
  7981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7982. $ctx1.sendIdx["div"]=1;
  7983. //>>excludeEnd("ctx");
  7984. $recv($4)._class_("progress");
  7985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7986. $ctx1.sendIdx["class:"]=1;
  7987. //>>excludeEnd("ctx");
  7988. $recv($4)._with_((function(){
  7989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7990. return $core.withContext(function($ctx2) {
  7991. //>>excludeEnd("ctx");
  7992. $5=$recv(html)._div();
  7993. $recv($5)._class_("progress-bar");
  7994. self["@bar"]=$recv($5)._style_("width: 0%");
  7995. return self["@bar"];
  7996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7997. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7998. //>>excludeEnd("ctx");
  7999. }));
  8000. return self;
  8001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8002. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLProgressBarWidget)});
  8003. //>>excludeEnd("ctx");
  8004. },
  8005. //>>excludeStart("ide", pragmas.excludeIdeData);
  8006. args: ["html"],
  8007. source: "renderContentOn: html\x0a\x09html span with: self label.\x0a\x09console log: 'progress bar: '; log: self label.\x0a\x09html div \x0a\x09\x09class: 'progress';\x0a\x09\x09with: [\x0a\x09\x09\x09bar := html div \x0a\x09\x09\x09\x09class: 'progress-bar';\x0a\x09\x09\x09\x09style: 'width: 0%' ]",
  8008. referencedClasses: [],
  8009. //>>excludeEnd("ide");
  8010. messageSends: ["with:", "span", "label", "log:", "class:", "div", "style:"]
  8011. }),
  8012. $globals.HLProgressBarWidget);
  8013. $core.addMethod(
  8014. $core.method({
  8015. selector: "start",
  8016. protocol: "actions",
  8017. fn: function (){
  8018. var self=this;
  8019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8020. return $core.withContext(function($ctx1) {
  8021. //>>excludeEnd("ctx");
  8022. self._evaluateAt_((1));
  8023. return self;
  8024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8025. }, function($ctx1) {$ctx1.fill(self,"start",{},$globals.HLProgressBarWidget)});
  8026. //>>excludeEnd("ctx");
  8027. },
  8028. //>>excludeStart("ide", pragmas.excludeIdeData);
  8029. args: [],
  8030. source: "start\x0a\x09\x22Make sure the UI has some time to update itself between each iteration\x22\x0a\x09\x0a\x09self evaluateAt: 1",
  8031. referencedClasses: [],
  8032. //>>excludeEnd("ide");
  8033. messageSends: ["evaluateAt:"]
  8034. }),
  8035. $globals.HLProgressBarWidget);
  8036. $core.addMethod(
  8037. $core.method({
  8038. selector: "updateProgress:",
  8039. protocol: "actions",
  8040. fn: function (anInteger){
  8041. var self=this;
  8042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8043. return $core.withContext(function($ctx1) {
  8044. //>>excludeEnd("ctx");
  8045. $recv($recv(self["@bar"])._asJQuery())._css_put_("width",$recv($recv(anInteger)._asString()).__comma("%"));
  8046. return self;
  8047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8048. }, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  8049. //>>excludeEnd("ctx");
  8050. },
  8051. //>>excludeStart("ide", pragmas.excludeIdeData);
  8052. args: ["anInteger"],
  8053. source: "updateProgress: anInteger\x0a\x09bar asJQuery css: 'width' put: anInteger asString, '%'",
  8054. referencedClasses: [],
  8055. //>>excludeEnd("ide");
  8056. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  8057. }),
  8058. $globals.HLProgressBarWidget);
  8059. $core.addMethod(
  8060. $core.method({
  8061. selector: "workBlock",
  8062. protocol: "accessing",
  8063. fn: function (){
  8064. var self=this;
  8065. return self["@workBlock"];
  8066. },
  8067. //>>excludeStart("ide", pragmas.excludeIdeData);
  8068. args: [],
  8069. source: "workBlock\x0a\x09^ workBlock",
  8070. referencedClasses: [],
  8071. //>>excludeEnd("ide");
  8072. messageSends: []
  8073. }),
  8074. $globals.HLProgressBarWidget);
  8075. $core.addMethod(
  8076. $core.method({
  8077. selector: "workBlock:",
  8078. protocol: "accessing",
  8079. fn: function (aBlock){
  8080. var self=this;
  8081. self["@workBlock"]=aBlock;
  8082. return self;
  8083. },
  8084. //>>excludeStart("ide", pragmas.excludeIdeData);
  8085. args: ["aBlock"],
  8086. source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
  8087. referencedClasses: [],
  8088. //>>excludeEnd("ide");
  8089. messageSends: []
  8090. }),
  8091. $globals.HLProgressBarWidget);
  8092. $globals.HLProgressBarWidget.klass.iVarNames = ["default"];
  8093. $core.addMethod(
  8094. $core.method({
  8095. selector: "default",
  8096. protocol: "accessing",
  8097. fn: function (){
  8098. var self=this;
  8099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8100. return $core.withContext(function($ctx1) {
  8101. //>>excludeEnd("ctx");
  8102. var $1,$receiver;
  8103. $1=self["@default"];
  8104. if(($receiver = $1) == null || $receiver.isNil){
  8105. self["@default"]=self._new();
  8106. return self["@default"];
  8107. } else {
  8108. return $1;
  8109. }
  8110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8111. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressBarWidget.klass)});
  8112. //>>excludeEnd("ctx");
  8113. },
  8114. //>>excludeStart("ide", pragmas.excludeIdeData);
  8115. args: [],
  8116. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  8117. referencedClasses: [],
  8118. //>>excludeEnd("ide");
  8119. messageSends: ["ifNil:", "new"]
  8120. }),
  8121. $globals.HLProgressBarWidget.klass);
  8122. $core.addClass("HLSpotlightWidget", $globals.HLWidget, ["input"], "Helios-Core");
  8123. $core.addMethod(
  8124. $core.method({
  8125. selector: "findMatches:andRender:",
  8126. protocol: "actions",
  8127. fn: function (aQueryString,aRenderCallback){
  8128. var self=this;
  8129. var matches;
  8130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8131. return $core.withContext(function($ctx1) {
  8132. //>>excludeEnd("ctx");
  8133. matches=$recv(self._inputCompletion())._select_((function(each){
  8134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8135. return $core.withContext(function($ctx2) {
  8136. //>>excludeEnd("ctx");
  8137. return $recv(each)._match_(aQueryString);
  8138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8139. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8140. //>>excludeEnd("ctx");
  8141. }));
  8142. $recv(aRenderCallback)._value_(matches);
  8143. return self;
  8144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8145. }, function($ctx1) {$ctx1.fill(self,"findMatches:andRender:",{aQueryString:aQueryString,aRenderCallback:aRenderCallback,matches:matches},$globals.HLSpotlightWidget)});
  8146. //>>excludeEnd("ctx");
  8147. },
  8148. //>>excludeStart("ide", pragmas.excludeIdeData);
  8149. args: ["aQueryString", "aRenderCallback"],
  8150. source: "findMatches: aQueryString andRender: aRenderCallback\x0a\x09| matches |\x0a\x09matches := self inputCompletion select: [ :each | each match: aQueryString ].\x0a\x09aRenderCallback value: matches",
  8151. referencedClasses: [],
  8152. //>>excludeEnd("ide");
  8153. messageSends: ["select:", "inputCompletion", "match:", "value:"]
  8154. }),
  8155. $globals.HLSpotlightWidget);
  8156. $core.addMethod(
  8157. $core.method({
  8158. selector: "ghostText",
  8159. protocol: "accessing",
  8160. fn: function (){
  8161. var self=this;
  8162. return "Search... (Ctrl+F)";
  8163. },
  8164. //>>excludeStart("ide", pragmas.excludeIdeData);
  8165. args: [],
  8166. source: "ghostText\x0a\x09^ 'Search... (Ctrl+F)'",
  8167. referencedClasses: [],
  8168. //>>excludeEnd("ide");
  8169. messageSends: []
  8170. }),
  8171. $globals.HLSpotlightWidget);
  8172. $core.addMethod(
  8173. $core.method({
  8174. selector: "inputCompletion",
  8175. protocol: "accessing",
  8176. fn: function (){
  8177. var self=this;
  8178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8179. return $core.withContext(function($ctx1) {
  8180. //>>excludeEnd("ctx");
  8181. var $3,$2,$1;
  8182. $3=self._manager();
  8183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8184. $ctx1.sendIdx["manager"]=1;
  8185. //>>excludeEnd("ctx");
  8186. $2=$recv($3)._environment();
  8187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8188. $ctx1.sendIdx["environment"]=1;
  8189. //>>excludeEnd("ctx");
  8190. $1=$recv($2)._availableClassNames();
  8191. return $recv($1).__comma($recv($recv(self._manager())._environment())._allSelectors());
  8192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8193. }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},$globals.HLSpotlightWidget)});
  8194. //>>excludeEnd("ctx");
  8195. },
  8196. //>>excludeStart("ide", pragmas.excludeIdeData);
  8197. args: [],
  8198. source: "inputCompletion\x0a\x09^ self manager environment availableClassNames, self manager environment allSelectors",
  8199. referencedClasses: [],
  8200. //>>excludeEnd("ide");
  8201. messageSends: [",", "availableClassNames", "environment", "manager", "allSelectors"]
  8202. }),
  8203. $globals.HLSpotlightWidget);
  8204. $core.addMethod(
  8205. $core.method({
  8206. selector: "renderContentOn:",
  8207. protocol: "rendering",
  8208. fn: function (html){
  8209. var self=this;
  8210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8211. return $core.withContext(function($ctx1) {
  8212. //>>excludeEnd("ctx");
  8213. var $1,$2,$4,$3;
  8214. $1=$recv(html)._input();
  8215. $recv($1)._class_("spotlight typeahead");
  8216. $recv($1)._placeholder_(self._ghostText());
  8217. self["@input"]=$recv($1)._onKeyDown_($recv((function(event){
  8218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8219. return $core.withContext(function($ctx2) {
  8220. //>>excludeEnd("ctx");
  8221. $2=$recv($recv(event)._which()).__eq((13));
  8222. if($core.assert($2)){
  8223. $4=$recv(self["@input"])._asJQuery();
  8224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8225. $ctx2.sendIdx["asJQuery"]=1;
  8226. //>>excludeEnd("ctx");
  8227. $3=$recv($4)._val();
  8228. return self._search_($3);
  8229. }
  8230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8231. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  8232. //>>excludeEnd("ctx");
  8233. }))._yourself());
  8234. $recv($recv(self["@input"])._asJQuery())._typeahead_value_($globals.HashedCollection._newFromPairs_(["hint",true]),$globals.HashedCollection._newFromPairs_(["name","classesAndSelectors","displayKey",(function(suggestion){
  8235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8236. return $core.withContext(function($ctx2) {
  8237. //>>excludeEnd("ctx");
  8238. return $recv(suggestion)._asString();
  8239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8240. }, function($ctx2) {$ctx2.fillBlock({suggestion:suggestion},$ctx1,3)});
  8241. //>>excludeEnd("ctx");
  8242. }),"source",(function(query,callback){
  8243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8244. return $core.withContext(function($ctx2) {
  8245. //>>excludeEnd("ctx");
  8246. return self._findMatches_andRender_(query,callback);
  8247. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8248. }, function($ctx2) {$ctx2.fillBlock({query:query,callback:callback},$ctx1,4)});
  8249. //>>excludeEnd("ctx");
  8250. })]));
  8251. return self;
  8252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8253. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLSpotlightWidget)});
  8254. //>>excludeEnd("ctx");
  8255. },
  8256. //>>excludeStart("ide", pragmas.excludeIdeData);
  8257. args: ["html"],
  8258. source: "renderContentOn: html\x0a\x09input := html input\x0a\x09\x09class: 'spotlight typeahead';\x0a\x09\x09placeholder: self ghostText;\x0a\x09\x09onKeyDown: [ :event | \x0a\x09\x09\x09event which = 13 ifTrue: [\x0a\x09\x09\x09\x09self search: input asJQuery val ] ]\x0a\x09\x09yourself.\x0a\x09\x09\x09\x0a\x09input asJQuery \x0a\x09\x09typeahead: #{ 'hint' -> true }\x0a\x09\x09value: #{ 'name' -> 'classesAndSelectors'.\x0a\x09\x09\x09'displayKey' -> [ :suggestion | suggestion asString ].\x0a\x09\x09\x09'source' -> [ :query :callback | self findMatches: query andRender: callback ]}.\x0a\x09\x09\x22use additional datasets for grouping into classes and selectors\x22",
  8259. referencedClasses: [],
  8260. //>>excludeEnd("ide");
  8261. messageSends: ["class:", "input", "placeholder:", "ghostText", "onKeyDown:", "yourself", "ifTrue:", "=", "which", "search:", "val", "asJQuery", "typeahead:value:", "asString", "findMatches:andRender:"]
  8262. }),
  8263. $globals.HLSpotlightWidget);
  8264. $core.addMethod(
  8265. $core.method({
  8266. selector: "search:",
  8267. protocol: "actions",
  8268. fn: function (aString){
  8269. var self=this;
  8270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8271. return $core.withContext(function($ctx1) {
  8272. //>>excludeEnd("ctx");
  8273. $recv(aString)._ifNotEmpty_((function(){
  8274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8275. return $core.withContext(function($ctx2) {
  8276. //>>excludeEnd("ctx");
  8277. return $recv($globals.Finder)._findString_(aString);
  8278. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8279. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8280. //>>excludeEnd("ctx");
  8281. }));
  8282. return self;
  8283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8284. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.HLSpotlightWidget)});
  8285. //>>excludeEnd("ctx");
  8286. },
  8287. //>>excludeStart("ide", pragmas.excludeIdeData);
  8288. args: ["aString"],
  8289. source: "search: aString\x0a\x09\x22open a new Browser pointing to aString\x22\x0a\x09aString ifNotEmpty: [\x0a\x09\x09Finder findString: aString ]",
  8290. referencedClasses: ["Finder"],
  8291. //>>excludeEnd("ide");
  8292. messageSends: ["ifNotEmpty:", "findString:"]
  8293. }),
  8294. $globals.HLSpotlightWidget);
  8295. $core.addClass("HLTabWidget", $globals.HLWidget, ["widget", "label", "root"], "Helios-Core");
  8296. //>>excludeStart("ide", pragmas.excludeIdeData);
  8297. $globals.HLTabWidget.comment="I am a widget specialized into building another widget as an Helios tab.\x0a\x0aI should not be used directly, `HLWidget class >> #openAsTab` should be used instead.\x0a\x0a## Example\x0a\x0a HLWorkspace openAsTab";
  8298. //>>excludeEnd("ide");
  8299. $core.addMethod(
  8300. $core.method({
  8301. selector: "activate",
  8302. protocol: "accessing",
  8303. fn: function (){
  8304. var self=this;
  8305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8306. return $core.withContext(function($ctx1) {
  8307. //>>excludeEnd("ctx");
  8308. $recv(self._manager())._activate_(self);
  8309. return self;
  8310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8311. }, function($ctx1) {$ctx1.fill(self,"activate",{},$globals.HLTabWidget)});
  8312. //>>excludeEnd("ctx");
  8313. },
  8314. //>>excludeStart("ide", pragmas.excludeIdeData);
  8315. args: [],
  8316. source: "activate\x0a\x09self manager activate: self",
  8317. referencedClasses: [],
  8318. //>>excludeEnd("ide");
  8319. messageSends: ["activate:", "manager"]
  8320. }),
  8321. $globals.HLTabWidget);
  8322. $core.addMethod(
  8323. $core.method({
  8324. selector: "add",
  8325. protocol: "actions",
  8326. fn: function (){
  8327. var self=this;
  8328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8329. return $core.withContext(function($ctx1) {
  8330. //>>excludeEnd("ctx");
  8331. $recv(self._manager())._addTab_(self);
  8332. self._observeManager();
  8333. return self;
  8334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8335. }, function($ctx1) {$ctx1.fill(self,"add",{},$globals.HLTabWidget)});
  8336. //>>excludeEnd("ctx");
  8337. },
  8338. //>>excludeStart("ide", pragmas.excludeIdeData);
  8339. args: [],
  8340. source: "add\x0a\x09self manager addTab: self.\x0a\x09self observeManager",
  8341. referencedClasses: [],
  8342. //>>excludeEnd("ide");
  8343. messageSends: ["addTab:", "manager", "observeManager"]
  8344. }),
  8345. $globals.HLTabWidget);
  8346. $core.addMethod(
  8347. $core.method({
  8348. selector: "cssClass",
  8349. protocol: "accessing",
  8350. fn: function (){
  8351. var self=this;
  8352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8353. return $core.withContext(function($ctx1) {
  8354. //>>excludeEnd("ctx");
  8355. return $recv(self._widget())._tabClass();
  8356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8357. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},$globals.HLTabWidget)});
  8358. //>>excludeEnd("ctx");
  8359. },
  8360. //>>excludeStart("ide", pragmas.excludeIdeData);
  8361. args: [],
  8362. source: "cssClass\x0a\x09^ self widget tabClass",
  8363. referencedClasses: [],
  8364. //>>excludeEnd("ide");
  8365. messageSends: ["tabClass", "widget"]
  8366. }),
  8367. $globals.HLTabWidget);
  8368. $core.addMethod(
  8369. $core.method({
  8370. selector: "focus",
  8371. protocol: "accessing",
  8372. fn: function (){
  8373. var self=this;
  8374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8375. return $core.withContext(function($ctx1) {
  8376. //>>excludeEnd("ctx");
  8377. var $2,$1;
  8378. $2=self._widget();
  8379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8380. $ctx1.sendIdx["widget"]=1;
  8381. //>>excludeEnd("ctx");
  8382. $1=$recv($2)._canHaveFocus();
  8383. if($core.assert($1)){
  8384. $recv(self._widget())._focus();
  8385. }
  8386. return self;
  8387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8388. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLTabWidget)});
  8389. //>>excludeEnd("ctx");
  8390. },
  8391. //>>excludeStart("ide", pragmas.excludeIdeData);
  8392. args: [],
  8393. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  8394. referencedClasses: [],
  8395. //>>excludeEnd("ide");
  8396. messageSends: ["ifTrue:", "canHaveFocus", "widget", "focus"]
  8397. }),
  8398. $globals.HLTabWidget);
  8399. $core.addMethod(
  8400. $core.method({
  8401. selector: "hide",
  8402. protocol: "actions",
  8403. fn: function (){
  8404. var self=this;
  8405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8406. return $core.withContext(function($ctx1) {
  8407. //>>excludeEnd("ctx");
  8408. var $1,$receiver;
  8409. $1=self["@root"];
  8410. if(($receiver = $1) == null || $receiver.isNil){
  8411. $1;
  8412. } else {
  8413. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  8414. }
  8415. return self;
  8416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8417. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.HLTabWidget)});
  8418. //>>excludeEnd("ctx");
  8419. },
  8420. //>>excludeStart("ide", pragmas.excludeIdeData);
  8421. args: [],
  8422. source: "hide\x0a\x09root ifNotNil: [ root asJQuery css: 'visibility' put: 'hidden' ]",
  8423. referencedClasses: [],
  8424. //>>excludeEnd("ide");
  8425. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]
  8426. }),
  8427. $globals.HLTabWidget);
  8428. $core.addMethod(
  8429. $core.method({
  8430. selector: "isActive",
  8431. protocol: "testing",
  8432. fn: function (){
  8433. var self=this;
  8434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8435. return $core.withContext(function($ctx1) {
  8436. //>>excludeEnd("ctx");
  8437. return $recv($recv(self._manager())._activeTab()).__eq(self);
  8438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8439. }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLTabWidget)});
  8440. //>>excludeEnd("ctx");
  8441. },
  8442. //>>excludeStart("ide", pragmas.excludeIdeData);
  8443. args: [],
  8444. source: "isActive\x0a\x09^ self manager activeTab = self",
  8445. referencedClasses: [],
  8446. //>>excludeEnd("ide");
  8447. messageSends: ["=", "activeTab", "manager"]
  8448. }),
  8449. $globals.HLTabWidget);
  8450. $core.addMethod(
  8451. $core.method({
  8452. selector: "label",
  8453. protocol: "accessing",
  8454. fn: function (){
  8455. var self=this;
  8456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8457. return $core.withContext(function($ctx1) {
  8458. //>>excludeEnd("ctx");
  8459. var $1,$receiver;
  8460. $1=self["@label"];
  8461. if(($receiver = $1) == null || $receiver.isNil){
  8462. return "";
  8463. } else {
  8464. return $1;
  8465. }
  8466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8467. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.HLTabWidget)});
  8468. //>>excludeEnd("ctx");
  8469. },
  8470. //>>excludeStart("ide", pragmas.excludeIdeData);
  8471. args: [],
  8472. source: "label\x0a\x09^ label ifNil: [ '' ]",
  8473. referencedClasses: [],
  8474. //>>excludeEnd("ide");
  8475. messageSends: ["ifNil:"]
  8476. }),
  8477. $globals.HLTabWidget);
  8478. $core.addMethod(
  8479. $core.method({
  8480. selector: "label:",
  8481. protocol: "accessing",
  8482. fn: function (aString){
  8483. var self=this;
  8484. self["@label"]=aString;
  8485. return self;
  8486. },
  8487. //>>excludeStart("ide", pragmas.excludeIdeData);
  8488. args: ["aString"],
  8489. source: "label: aString\x0a\x09label := aString",
  8490. referencedClasses: [],
  8491. //>>excludeEnd("ide");
  8492. messageSends: []
  8493. }),
  8494. $globals.HLTabWidget);
  8495. $core.addMethod(
  8496. $core.method({
  8497. selector: "manager",
  8498. protocol: "accessing",
  8499. fn: function (){
  8500. var self=this;
  8501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8502. return $core.withContext(function($ctx1) {
  8503. //>>excludeEnd("ctx");
  8504. return $recv($globals.HLManager)._current();
  8505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8506. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLTabWidget)});
  8507. //>>excludeEnd("ctx");
  8508. },
  8509. //>>excludeStart("ide", pragmas.excludeIdeData);
  8510. args: [],
  8511. source: "manager\x0a\x09^ HLManager current",
  8512. referencedClasses: ["HLManager"],
  8513. //>>excludeEnd("ide");
  8514. messageSends: ["current"]
  8515. }),
  8516. $globals.HLTabWidget);
  8517. $core.addMethod(
  8518. $core.method({
  8519. selector: "observeManager",
  8520. protocol: "actions",
  8521. fn: function (){
  8522. var self=this;
  8523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8524. return $core.withContext(function($ctx1) {
  8525. //>>excludeEnd("ctx");
  8526. $recv($recv(self._manager())._announcer())._on_send_to_($globals.HLTabLabelChanged,"onTabLabelChanged:",self);
  8527. return self;
  8528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8529. }, function($ctx1) {$ctx1.fill(self,"observeManager",{},$globals.HLTabWidget)});
  8530. //>>excludeEnd("ctx");
  8531. },
  8532. //>>excludeStart("ide", pragmas.excludeIdeData);
  8533. args: [],
  8534. source: "observeManager\x0a\x09self manager announcer \x0a\x09\x09on: HLTabLabelChanged\x0a\x09\x09send: #onTabLabelChanged:\x0a\x09\x09to: self",
  8535. referencedClasses: ["HLTabLabelChanged"],
  8536. //>>excludeEnd("ide");
  8537. messageSends: ["on:send:to:", "announcer", "manager"]
  8538. }),
  8539. $globals.HLTabWidget);
  8540. $core.addMethod(
  8541. $core.method({
  8542. selector: "onTabLabelChanged:",
  8543. protocol: "reactions",
  8544. fn: function (anAnnouncement){
  8545. var self=this;
  8546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8547. return $core.withContext(function($ctx1) {
  8548. //>>excludeEnd("ctx");
  8549. var $2,$1,$4,$5,$3;
  8550. $2=$recv(anAnnouncement)._widget();
  8551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8552. $ctx1.sendIdx["widget"]=1;
  8553. //>>excludeEnd("ctx");
  8554. $1=$recv($2).__eq(self._widget());
  8555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8556. $ctx1.sendIdx["="]=1;
  8557. //>>excludeEnd("ctx");
  8558. if($core.assert($1)){
  8559. $4=self._label();
  8560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8561. $ctx1.sendIdx["label"]=1;
  8562. //>>excludeEnd("ctx");
  8563. $5=$recv(anAnnouncement)._label();
  8564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8565. $ctx1.sendIdx["label"]=2;
  8566. //>>excludeEnd("ctx");
  8567. $3=$recv($4).__eq($5);
  8568. if(!$core.assert($3)){
  8569. self._label_($recv(anAnnouncement)._label());
  8570. $recv(self._manager())._refresh();
  8571. }
  8572. }
  8573. return self;
  8574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8575. }, function($ctx1) {$ctx1.fill(self,"onTabLabelChanged:",{anAnnouncement:anAnnouncement},$globals.HLTabWidget)});
  8576. //>>excludeEnd("ctx");
  8577. },
  8578. //>>excludeStart("ide", pragmas.excludeIdeData);
  8579. args: ["anAnnouncement"],
  8580. source: "onTabLabelChanged: anAnnouncement\x0a\x09anAnnouncement widget = self widget ifTrue: [\x0a\x09\x09self label = anAnnouncement label ifFalse: [\x0a\x09\x09\x09self label: anAnnouncement label.\x0a\x09\x09\x09self manager refresh ] ]",
  8581. referencedClasses: [],
  8582. //>>excludeEnd("ide");
  8583. messageSends: ["ifTrue:", "=", "widget", "ifFalse:", "label", "label:", "refresh", "manager"]
  8584. }),
  8585. $globals.HLTabWidget);
  8586. $core.addMethod(
  8587. $core.method({
  8588. selector: "registerBindings",
  8589. protocol: "actions",
  8590. fn: function (){
  8591. var self=this;
  8592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8593. return $core.withContext(function($ctx1) {
  8594. //>>excludeEnd("ctx");
  8595. $recv(self._widget())._registerBindings();
  8596. return self;
  8597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8598. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLTabWidget)});
  8599. //>>excludeEnd("ctx");
  8600. },
  8601. //>>excludeStart("ide", pragmas.excludeIdeData);
  8602. args: [],
  8603. source: "registerBindings\x0a\x09self widget registerBindings",
  8604. referencedClasses: [],
  8605. //>>excludeEnd("ide");
  8606. messageSends: ["registerBindings", "widget"]
  8607. }),
  8608. $globals.HLTabWidget);
  8609. $core.addMethod(
  8610. $core.method({
  8611. selector: "remove",
  8612. protocol: "actions",
  8613. fn: function (){
  8614. var self=this;
  8615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8616. return $core.withContext(function($ctx1) {
  8617. //>>excludeEnd("ctx");
  8618. var $1,$receiver;
  8619. self._unregister();
  8620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8621. $ctx1.sendIdx["unregister"]=1;
  8622. //>>excludeEnd("ctx");
  8623. $recv(self._widget())._unregister();
  8624. $1=self["@root"];
  8625. if(($receiver = $1) == null || $receiver.isNil){
  8626. $1;
  8627. } else {
  8628. $recv($recv(self["@root"])._asJQuery())._remove();
  8629. }
  8630. return self;
  8631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8632. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLTabWidget)});
  8633. //>>excludeEnd("ctx");
  8634. },
  8635. //>>excludeStart("ide", pragmas.excludeIdeData);
  8636. args: [],
  8637. source: "remove\x0a\x09self unregister.\x0a\x09self widget unregister.\x0a\x09root ifNotNil: [ root asJQuery remove ]",
  8638. referencedClasses: [],
  8639. //>>excludeEnd("ide");
  8640. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"]
  8641. }),
  8642. $globals.HLTabWidget);
  8643. $core.addMethod(
  8644. $core.method({
  8645. selector: "renderOn:",
  8646. protocol: "rendering",
  8647. fn: function (html){
  8648. var self=this;
  8649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8650. return $core.withContext(function($ctx1) {
  8651. //>>excludeEnd("ctx");
  8652. var $1;
  8653. $1=$recv(html)._div();
  8654. $recv($1)._class_("tab");
  8655. self["@root"]=$recv($1)._yourself();
  8656. self._renderTab();
  8657. return self;
  8658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8659. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLTabWidget)});
  8660. //>>excludeEnd("ctx");
  8661. },
  8662. //>>excludeStart("ide", pragmas.excludeIdeData);
  8663. args: ["html"],
  8664. source: "renderOn: html\x0a\x09root := html div\x0a\x09\x09class: 'tab';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  8665. referencedClasses: [],
  8666. //>>excludeEnd("ide");
  8667. messageSends: ["class:", "div", "yourself", "renderTab"]
  8668. }),
  8669. $globals.HLTabWidget);
  8670. $core.addMethod(
  8671. $core.method({
  8672. selector: "renderTab",
  8673. protocol: "rendering",
  8674. fn: function (){
  8675. var self=this;
  8676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8677. return $core.withContext(function($ctx1) {
  8678. //>>excludeEnd("ctx");
  8679. var $1;
  8680. $recv(self["@root"])._contents_((function(html){
  8681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8682. return $core.withContext(function($ctx2) {
  8683. //>>excludeEnd("ctx");
  8684. $1=$recv(html)._div();
  8685. $recv($1)._class_("amber_box");
  8686. return $recv($1)._with_((function(){
  8687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8688. return $core.withContext(function($ctx3) {
  8689. //>>excludeEnd("ctx");
  8690. return $recv(self._widget())._renderOn_(html);
  8691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8692. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8693. //>>excludeEnd("ctx");
  8694. }));
  8695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8696. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8697. //>>excludeEnd("ctx");
  8698. }));
  8699. return self;
  8700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8701. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.HLTabWidget)});
  8702. //>>excludeEnd("ctx");
  8703. },
  8704. //>>excludeStart("ide", pragmas.excludeIdeData);
  8705. args: [],
  8706. source: "renderTab\x0a\x09root contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'amber_box';\x0a\x09\x09\x09with: [ self widget renderOn: html ] ]",
  8707. referencedClasses: [],
  8708. //>>excludeEnd("ide");
  8709. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]
  8710. }),
  8711. $globals.HLTabWidget);
  8712. $core.addMethod(
  8713. $core.method({
  8714. selector: "show",
  8715. protocol: "actions",
  8716. fn: function (){
  8717. var self=this;
  8718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8719. return $core.withContext(function($ctx1) {
  8720. //>>excludeEnd("ctx");
  8721. var $1,$2,$receiver;
  8722. $1=self["@root"];
  8723. if(($receiver = $1) == null || $receiver.isNil){
  8724. $2="body"._asJQuery();
  8725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8726. $ctx1.sendIdx["asJQuery"]=1;
  8727. //>>excludeEnd("ctx");
  8728. self._appendToJQuery_($2);
  8729. } else {
  8730. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","visible");
  8731. }
  8732. return self;
  8733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8734. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLTabWidget)});
  8735. //>>excludeEnd("ctx");
  8736. },
  8737. //>>excludeStart("ide", pragmas.excludeIdeData);
  8738. args: [],
  8739. source: "show\x0a\x09root\x0a\x09\x09ifNil: [ self appendToJQuery: 'body' asJQuery ]\x0a\x09\x09ifNotNil: [ root asJQuery css: 'visibility' put: 'visible' ]",
  8740. referencedClasses: [],
  8741. //>>excludeEnd("ide");
  8742. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]
  8743. }),
  8744. $globals.HLTabWidget);
  8745. $core.addMethod(
  8746. $core.method({
  8747. selector: "unregister",
  8748. protocol: "actions",
  8749. fn: function (){
  8750. var self=this;
  8751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8752. return $core.withContext(function($ctx1) {
  8753. //>>excludeEnd("ctx");
  8754. $recv($recv(self._manager())._announcer())._unsubscribe_(self);
  8755. return self;
  8756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8757. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLTabWidget)});
  8758. //>>excludeEnd("ctx");
  8759. },
  8760. //>>excludeStart("ide", pragmas.excludeIdeData);
  8761. args: [],
  8762. source: "unregister\x0a\x09self manager announcer unsubscribe: self",
  8763. referencedClasses: [],
  8764. //>>excludeEnd("ide");
  8765. messageSends: ["unsubscribe:", "announcer", "manager"]
  8766. }),
  8767. $globals.HLTabWidget);
  8768. $core.addMethod(
  8769. $core.method({
  8770. selector: "widget",
  8771. protocol: "accessing",
  8772. fn: function (){
  8773. var self=this;
  8774. return self["@widget"];
  8775. },
  8776. //>>excludeStart("ide", pragmas.excludeIdeData);
  8777. args: [],
  8778. source: "widget\x0a\x09^ widget",
  8779. referencedClasses: [],
  8780. //>>excludeEnd("ide");
  8781. messageSends: []
  8782. }),
  8783. $globals.HLTabWidget);
  8784. $core.addMethod(
  8785. $core.method({
  8786. selector: "widget:",
  8787. protocol: "accessing",
  8788. fn: function (aWidget){
  8789. var self=this;
  8790. self["@widget"]=aWidget;
  8791. return self;
  8792. },
  8793. //>>excludeStart("ide", pragmas.excludeIdeData);
  8794. args: ["aWidget"],
  8795. source: "widget: aWidget\x0a\x09widget := aWidget",
  8796. referencedClasses: [],
  8797. //>>excludeEnd("ide");
  8798. messageSends: []
  8799. }),
  8800. $globals.HLTabWidget);
  8801. $core.addMethod(
  8802. $core.method({
  8803. selector: "on:labelled:",
  8804. protocol: "instance creation",
  8805. fn: function (aWidget,aString){
  8806. var self=this;
  8807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8808. return $core.withContext(function($ctx1) {
  8809. //>>excludeEnd("ctx");
  8810. var $1;
  8811. $1=self._new();
  8812. $recv($1)._widget_(aWidget);
  8813. $recv($1)._label_(aString);
  8814. return $recv($1)._yourself();
  8815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8816. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},$globals.HLTabWidget.klass)});
  8817. //>>excludeEnd("ctx");
  8818. },
  8819. //>>excludeStart("ide", pragmas.excludeIdeData);
  8820. args: ["aWidget", "aString"],
  8821. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  8822. referencedClasses: [],
  8823. //>>excludeEnd("ide");
  8824. messageSends: ["widget:", "new", "label:", "yourself"]
  8825. }),
  8826. $globals.HLTabWidget.klass);
  8827. $core.addClass("HLTabsWidget", $globals.HLWidget, ["tabs", "activeTab", "history", "selectionDisabled", "spotlight"], "Helios-Core");
  8828. $core.addMethod(
  8829. $core.method({
  8830. selector: "activate:",
  8831. protocol: "actions",
  8832. fn: function (aTab){
  8833. var self=this;
  8834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8835. return $core.withContext(function($ctx1) {
  8836. //>>excludeEnd("ctx");
  8837. var $1;
  8838. $1=self._isSelectionDisabled();
  8839. if($core.assert($1)){
  8840. return self;
  8841. }
  8842. $recv($recv(self._manager())._keyBinder())._flushBindings();
  8843. $recv(aTab)._registerBindings();
  8844. self["@activeTab"]=aTab;
  8845. self._refresh();
  8846. self._addToHistory_(aTab);
  8847. self._show_(aTab);
  8848. return self;
  8849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8850. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLTabsWidget)});
  8851. //>>excludeEnd("ctx");
  8852. },
  8853. //>>excludeStart("ide", pragmas.excludeIdeData);
  8854. args: ["aTab"],
  8855. source: "activate: aTab\x0a\x09self isSelectionDisabled ifTrue: [ ^ self ].\x0a\x0a\x09self manager keyBinder flushBindings.\x0a\x09aTab registerBindings.\x0a\x09activeTab := aTab.\x0a\x09\x0a\x09self \x0a\x09\x09refresh;\x0a\x09\x09addToHistory: aTab;\x0a\x09\x09show: aTab",
  8856. referencedClasses: [],
  8857. //>>excludeEnd("ide");
  8858. messageSends: ["ifTrue:", "isSelectionDisabled", "flushBindings", "keyBinder", "manager", "registerBindings", "refresh", "addToHistory:", "show:"]
  8859. }),
  8860. $globals.HLTabsWidget);
  8861. $core.addMethod(
  8862. $core.method({
  8863. selector: "activateNextTab",
  8864. protocol: "actions",
  8865. fn: function (){
  8866. var self=this;
  8867. var nextTab;
  8868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8869. return $core.withContext(function($ctx1) {
  8870. //>>excludeEnd("ctx");
  8871. var $1,$2,$5,$4,$3;
  8872. var $early={};
  8873. try {
  8874. $1=self._tabs();
  8875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8876. $ctx1.sendIdx["tabs"]=1;
  8877. //>>excludeEnd("ctx");
  8878. $recv($1)._ifEmpty_((function(){
  8879. throw $early=[self];
  8880. }));
  8881. $2=self._tabs();
  8882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8883. $ctx1.sendIdx["tabs"]=2;
  8884. //>>excludeEnd("ctx");
  8885. $5=self._tabs();
  8886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8887. $ctx1.sendIdx["tabs"]=3;
  8888. //>>excludeEnd("ctx");
  8889. $4=$recv($5)._indexOf_(self._activeTab());
  8890. $3=$recv($4).__plus((1));
  8891. nextTab=$recv($2)._at_ifAbsent_($3,(function(){
  8892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8893. return $core.withContext(function($ctx2) {
  8894. //>>excludeEnd("ctx");
  8895. return $recv(self._tabs())._first();
  8896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8897. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8898. //>>excludeEnd("ctx");
  8899. }));
  8900. self._activate_(nextTab);
  8901. return self;
  8902. }
  8903. catch(e) {if(e===$early)return e[0]; throw e}
  8904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8905. }, function($ctx1) {$ctx1.fill(self,"activateNextTab",{nextTab:nextTab},$globals.HLTabsWidget)});
  8906. //>>excludeEnd("ctx");
  8907. },
  8908. //>>excludeStart("ide", pragmas.excludeIdeData);
  8909. args: [],
  8910. source: "activateNextTab\x0a\x09| nextTab |\x0a\x09\x0a\x09self tabs ifEmpty: [ ^ self ].\x0a\x09\x0a\x09nextTab := self tabs \x0a\x09\x09at: (self tabs indexOf: self activeTab) + 1 \x0a\x09\x09ifAbsent: [ self tabs first ].\x0a\x09\x09\x0a\x09self activate: nextTab",
  8911. referencedClasses: [],
  8912. //>>excludeEnd("ide");
  8913. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "+", "indexOf:", "activeTab", "first", "activate:"]
  8914. }),
  8915. $globals.HLTabsWidget);
  8916. $core.addMethod(
  8917. $core.method({
  8918. selector: "activatePreviousTab",
  8919. protocol: "actions",
  8920. fn: function (){
  8921. var self=this;
  8922. var previousTab;
  8923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8924. return $core.withContext(function($ctx1) {
  8925. //>>excludeEnd("ctx");
  8926. var $1,$2,$5,$4,$3;
  8927. var $early={};
  8928. try {
  8929. $1=self._tabs();
  8930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8931. $ctx1.sendIdx["tabs"]=1;
  8932. //>>excludeEnd("ctx");
  8933. $recv($1)._ifEmpty_((function(){
  8934. throw $early=[self];
  8935. }));
  8936. $2=self._tabs();
  8937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8938. $ctx1.sendIdx["tabs"]=2;
  8939. //>>excludeEnd("ctx");
  8940. $5=self._tabs();
  8941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8942. $ctx1.sendIdx["tabs"]=3;
  8943. //>>excludeEnd("ctx");
  8944. $4=$recv($5)._indexOf_(self._activeTab());
  8945. $3=$recv($4).__minus((1));
  8946. previousTab=$recv($2)._at_ifAbsent_($3,(function(){
  8947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8948. return $core.withContext(function($ctx2) {
  8949. //>>excludeEnd("ctx");
  8950. return $recv(self._tabs())._last();
  8951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8952. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8953. //>>excludeEnd("ctx");
  8954. }));
  8955. self._activate_(previousTab);
  8956. return self;
  8957. }
  8958. catch(e) {if(e===$early)return e[0]; throw e}
  8959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8960. }, function($ctx1) {$ctx1.fill(self,"activatePreviousTab",{previousTab:previousTab},$globals.HLTabsWidget)});
  8961. //>>excludeEnd("ctx");
  8962. },
  8963. //>>excludeStart("ide", pragmas.excludeIdeData);
  8964. args: [],
  8965. source: "activatePreviousTab\x0a\x09| previousTab |\x0a\x09\x0a\x09self tabs ifEmpty: [ ^ self ].\x0a\x09\x0a\x09previousTab := self tabs \x0a\x09\x09at: (self tabs indexOf: self activeTab) - 1 \x0a\x09\x09ifAbsent: [ self tabs last ].\x0a\x09\x09\x0a\x09self activate: previousTab",
  8966. referencedClasses: [],
  8967. //>>excludeEnd("ide");
  8968. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "-", "indexOf:", "activeTab", "last", "activate:"]
  8969. }),
  8970. $globals.HLTabsWidget);
  8971. $core.addMethod(
  8972. $core.method({
  8973. selector: "activeTab",
  8974. protocol: "accessing",
  8975. fn: function (){
  8976. var self=this;
  8977. return self["@activeTab"];
  8978. },
  8979. //>>excludeStart("ide", pragmas.excludeIdeData);
  8980. args: [],
  8981. source: "activeTab\x0a\x09^ activeTab",
  8982. referencedClasses: [],
  8983. //>>excludeEnd("ide");
  8984. messageSends: []
  8985. }),
  8986. $globals.HLTabsWidget);
  8987. $core.addMethod(
  8988. $core.method({
  8989. selector: "addTab:",
  8990. protocol: "actions",
  8991. fn: function (aTab){
  8992. var self=this;
  8993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8994. return $core.withContext(function($ctx1) {
  8995. //>>excludeEnd("ctx");
  8996. $recv(self._tabs())._add_(aTab);
  8997. self._activate_(aTab);
  8998. return self;
  8999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9000. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9001. //>>excludeEnd("ctx");
  9002. },
  9003. //>>excludeStart("ide", pragmas.excludeIdeData);
  9004. args: ["aTab"],
  9005. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  9006. referencedClasses: [],
  9007. //>>excludeEnd("ide");
  9008. messageSends: ["add:", "tabs", "activate:"]
  9009. }),
  9010. $globals.HLTabsWidget);
  9011. $core.addMethod(
  9012. $core.method({
  9013. selector: "addToHistory:",
  9014. protocol: "actions",
  9015. fn: function (aTab){
  9016. var self=this;
  9017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9018. return $core.withContext(function($ctx1) {
  9019. //>>excludeEnd("ctx");
  9020. self._removeFromHistory_(aTab);
  9021. $recv(self._history())._add_(aTab);
  9022. return self;
  9023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9024. }, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9025. //>>excludeEnd("ctx");
  9026. },
  9027. //>>excludeStart("ide", pragmas.excludeIdeData);
  9028. args: ["aTab"],
  9029. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  9030. referencedClasses: [],
  9031. //>>excludeEnd("ide");
  9032. messageSends: ["removeFromHistory:", "add:", "history"]
  9033. }),
  9034. $globals.HLTabsWidget);
  9035. $core.addMethod(
  9036. $core.method({
  9037. selector: "disableSelection",
  9038. protocol: "actions",
  9039. fn: function (){
  9040. var self=this;
  9041. self["@selectionDisabled"]=true;
  9042. return self;
  9043. },
  9044. //>>excludeStart("ide", pragmas.excludeIdeData);
  9045. args: [],
  9046. source: "disableSelection\x0a\x09selectionDisabled := true",
  9047. referencedClasses: [],
  9048. //>>excludeEnd("ide");
  9049. messageSends: []
  9050. }),
  9051. $globals.HLTabsWidget);
  9052. $core.addMethod(
  9053. $core.method({
  9054. selector: "enableSelection",
  9055. protocol: "actions",
  9056. fn: function (){
  9057. var self=this;
  9058. self["@selectionDisabled"]=false;
  9059. return self;
  9060. },
  9061. //>>excludeStart("ide", pragmas.excludeIdeData);
  9062. args: [],
  9063. source: "enableSelection\x0a\x09selectionDisabled := false",
  9064. referencedClasses: [],
  9065. //>>excludeEnd("ide");
  9066. messageSends: []
  9067. }),
  9068. $globals.HLTabsWidget);
  9069. $core.addMethod(
  9070. $core.method({
  9071. selector: "history",
  9072. protocol: "accessing",
  9073. fn: function (){
  9074. var self=this;
  9075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9076. return $core.withContext(function($ctx1) {
  9077. //>>excludeEnd("ctx");
  9078. var $1,$receiver;
  9079. $1=self["@history"];
  9080. if(($receiver = $1) == null || $receiver.isNil){
  9081. self["@history"]=$recv($globals.OrderedCollection)._new();
  9082. return self["@history"];
  9083. } else {
  9084. return $1;
  9085. }
  9086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9087. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLTabsWidget)});
  9088. //>>excludeEnd("ctx");
  9089. },
  9090. //>>excludeStart("ide", pragmas.excludeIdeData);
  9091. args: [],
  9092. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  9093. referencedClasses: ["OrderedCollection"],
  9094. //>>excludeEnd("ide");
  9095. messageSends: ["ifNil:", "new"]
  9096. }),
  9097. $globals.HLTabsWidget);
  9098. $core.addMethod(
  9099. $core.method({
  9100. selector: "history:",
  9101. protocol: "accessing",
  9102. fn: function (aCollection){
  9103. var self=this;
  9104. self["@history"]=aCollection;
  9105. return self;
  9106. },
  9107. //>>excludeStart("ide", pragmas.excludeIdeData);
  9108. args: ["aCollection"],
  9109. source: "history: aCollection\x0a\x09history := aCollection",
  9110. referencedClasses: [],
  9111. //>>excludeEnd("ide");
  9112. messageSends: []
  9113. }),
  9114. $globals.HLTabsWidget);
  9115. $core.addMethod(
  9116. $core.method({
  9117. selector: "isSelectionDisabled",
  9118. protocol: "testing",
  9119. fn: function (){
  9120. var self=this;
  9121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9122. return $core.withContext(function($ctx1) {
  9123. //>>excludeEnd("ctx");
  9124. var $1,$receiver;
  9125. $1=self["@selectionDisabled"];
  9126. if(($receiver = $1) == null || $receiver.isNil){
  9127. return false;
  9128. } else {
  9129. return $1;
  9130. }
  9131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9132. }, function($ctx1) {$ctx1.fill(self,"isSelectionDisabled",{},$globals.HLTabsWidget)});
  9133. //>>excludeEnd("ctx");
  9134. },
  9135. //>>excludeStart("ide", pragmas.excludeIdeData);
  9136. args: [],
  9137. source: "isSelectionDisabled\x0a\x09^ selectionDisabled ifNil: [ false ]",
  9138. referencedClasses: [],
  9139. //>>excludeEnd("ide");
  9140. messageSends: ["ifNil:"]
  9141. }),
  9142. $globals.HLTabsWidget);
  9143. $core.addMethod(
  9144. $core.method({
  9145. selector: "removeActiveTab",
  9146. protocol: "actions",
  9147. fn: function (){
  9148. var self=this;
  9149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9150. return $core.withContext(function($ctx1) {
  9151. //>>excludeEnd("ctx");
  9152. self._removeTab_(self._activeTab());
  9153. return self;
  9154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9155. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLTabsWidget)});
  9156. //>>excludeEnd("ctx");
  9157. },
  9158. //>>excludeStart("ide", pragmas.excludeIdeData);
  9159. args: [],
  9160. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  9161. referencedClasses: [],
  9162. //>>excludeEnd("ide");
  9163. messageSends: ["removeTab:", "activeTab"]
  9164. }),
  9165. $globals.HLTabsWidget);
  9166. $core.addMethod(
  9167. $core.method({
  9168. selector: "removeFromHistory:",
  9169. protocol: "actions",
  9170. fn: function (aTab){
  9171. var self=this;
  9172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9173. return $core.withContext(function($ctx1) {
  9174. //>>excludeEnd("ctx");
  9175. self._history_($recv(self._history())._reject_((function(each){
  9176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9177. return $core.withContext(function($ctx2) {
  9178. //>>excludeEnd("ctx");
  9179. return $recv(each).__eq_eq(aTab);
  9180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9181. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9182. //>>excludeEnd("ctx");
  9183. })));
  9184. return self;
  9185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9186. }, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9187. //>>excludeEnd("ctx");
  9188. },
  9189. //>>excludeStart("ide", pragmas.excludeIdeData);
  9190. args: ["aTab"],
  9191. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  9192. referencedClasses: [],
  9193. //>>excludeEnd("ide");
  9194. messageSends: ["history:", "reject:", "history", "=="]
  9195. }),
  9196. $globals.HLTabsWidget);
  9197. $core.addMethod(
  9198. $core.method({
  9199. selector: "removeTab:",
  9200. protocol: "actions",
  9201. fn: function (aTab){
  9202. var self=this;
  9203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9204. return $core.withContext(function($ctx1) {
  9205. //>>excludeEnd("ctx");
  9206. var $2,$1,$3;
  9207. $2=self._tabs();
  9208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9209. $ctx1.sendIdx["tabs"]=1;
  9210. //>>excludeEnd("ctx");
  9211. $1=$recv($2)._includes_(aTab);
  9212. if(!$core.assert($1)){
  9213. return self;
  9214. }
  9215. self._removeFromHistory_(aTab);
  9216. $recv(self._tabs())._remove_(aTab);
  9217. $recv($recv(self._manager())._keyBinder())._flushBindings();
  9218. $recv(aTab)._remove();
  9219. self._refresh();
  9220. $3=self._history();
  9221. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9222. $ctx1.sendIdx["history"]=1;
  9223. //>>excludeEnd("ctx");
  9224. $recv($3)._ifNotEmpty_((function(){
  9225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9226. return $core.withContext(function($ctx2) {
  9227. //>>excludeEnd("ctx");
  9228. return $recv($recv(self._history())._last())._activate();
  9229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9230. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9231. //>>excludeEnd("ctx");
  9232. }));
  9233. return self;
  9234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9235. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9236. //>>excludeEnd("ctx");
  9237. },
  9238. //>>excludeStart("ide", pragmas.excludeIdeData);
  9239. args: ["aTab"],
  9240. source: "removeTab: aTab\x0a\x09(self tabs includes: aTab) ifFalse: [ ^ self ].\x0a\x0a\x09self removeFromHistory: aTab.\x0a\x09self tabs remove: aTab.\x0a\x09self manager keyBinder flushBindings.\x0a\x09aTab remove.\x0a\x09self refresh.\x0a\x09self history ifNotEmpty: [\x0a\x09\x09self history last activate ]",
  9241. referencedClasses: [],
  9242. //>>excludeEnd("ide");
  9243. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "manager", "remove", "refresh", "ifNotEmpty:", "history", "activate", "last"]
  9244. }),
  9245. $globals.HLTabsWidget);
  9246. $core.addMethod(
  9247. $core.method({
  9248. selector: "removeTabForWidget:",
  9249. protocol: "actions",
  9250. fn: function (aWidget){
  9251. var self=this;
  9252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9253. return $core.withContext(function($ctx1) {
  9254. //>>excludeEnd("ctx");
  9255. var $early={};
  9256. try {
  9257. self._removeTab_($recv(self._tabs())._detect_ifNone_((function(each){
  9258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9259. return $core.withContext(function($ctx2) {
  9260. //>>excludeEnd("ctx");
  9261. return $recv($recv(each)._widget()).__eq(aWidget);
  9262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9263. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9264. //>>excludeEnd("ctx");
  9265. }),(function(){
  9266. throw $early=[self];
  9267. })));
  9268. return self;
  9269. }
  9270. catch(e) {if(e===$early)return e[0]; throw e}
  9271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9272. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLTabsWidget)});
  9273. //>>excludeEnd("ctx");
  9274. },
  9275. //>>excludeStart("ide", pragmas.excludeIdeData);
  9276. args: ["aWidget"],
  9277. source: "removeTabForWidget: aWidget\x0a\x09self removeTab: (self tabs \x0a\x09\x09detect: [ :each | each widget = aWidget ]\x0a\x09\x09ifNone: [ ^ self ])",
  9278. referencedClasses: [],
  9279. //>>excludeEnd("ide");
  9280. messageSends: ["removeTab:", "detect:ifNone:", "tabs", "=", "widget"]
  9281. }),
  9282. $globals.HLTabsWidget);
  9283. $core.addMethod(
  9284. $core.method({
  9285. selector: "renderAddOn:",
  9286. protocol: "rendering",
  9287. fn: function (html){
  9288. var self=this;
  9289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9290. return $core.withContext(function($ctx1) {
  9291. //>>excludeEnd("ctx");
  9292. var $1,$3,$4,$5,$7,$8,$6,$2;
  9293. $1=$recv(html)._div();
  9294. $recv($1)._class_("dropdown new_tab");
  9295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9296. $ctx1.sendIdx["class:"]=1;
  9297. //>>excludeEnd("ctx");
  9298. $2=$recv($1)._with_((function(){
  9299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9300. return $core.withContext(function($ctx2) {
  9301. //>>excludeEnd("ctx");
  9302. $3=$recv(html)._a();
  9303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9304. $ctx2.sendIdx["a"]=1;
  9305. //>>excludeEnd("ctx");
  9306. $recv($3)._class_("dropdown-toggle");
  9307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9308. $ctx2.sendIdx["class:"]=2;
  9309. //>>excludeEnd("ctx");
  9310. $recv($3)._at_put_("data-toggle","dropdown");
  9311. $4=$recv($3)._with_((function(){
  9312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9313. return $core.withContext(function($ctx3) {
  9314. //>>excludeEnd("ctx");
  9315. return $recv($recv(html)._tag_("b"))._class_("caret");
  9316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9317. $ctx3.sendIdx["class:"]=3;
  9318. //>>excludeEnd("ctx");
  9319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9320. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9321. //>>excludeEnd("ctx");
  9322. }));
  9323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9324. $ctx2.sendIdx["with:"]=2;
  9325. //>>excludeEnd("ctx");
  9326. $4;
  9327. $5=$recv(html)._ul();
  9328. $recv($5)._class_("dropdown-menu");
  9329. $6=$recv($5)._with_((function(){
  9330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9331. return $core.withContext(function($ctx3) {
  9332. //>>excludeEnd("ctx");
  9333. return $recv($recv($recv($recv($globals.HLWidget)._withAllSubclasses())._select_((function(each){
  9334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9335. return $core.withContext(function($ctx4) {
  9336. //>>excludeEnd("ctx");
  9337. return $recv(each)._canBeOpenAsTab();
  9338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9339. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,4)});
  9340. //>>excludeEnd("ctx");
  9341. })))._sorted_((function(a,b){
  9342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9343. return $core.withContext(function($ctx4) {
  9344. //>>excludeEnd("ctx");
  9345. $7=$recv(a)._tabPriority();
  9346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9347. $ctx4.sendIdx["tabPriority"]=1;
  9348. //>>excludeEnd("ctx");
  9349. return $recv($7).__lt($recv(b)._tabPriority());
  9350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9351. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3,5)});
  9352. //>>excludeEnd("ctx");
  9353. })))._do_((function(each){
  9354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9355. return $core.withContext(function($ctx4) {
  9356. //>>excludeEnd("ctx");
  9357. return $recv($recv(html)._li())._with_((function(){
  9358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9359. return $core.withContext(function($ctx5) {
  9360. //>>excludeEnd("ctx");
  9361. $8=$recv(html)._a();
  9362. $recv($8)._with_($recv(each)._tabLabel());
  9363. return $recv($8)._onClick_((function(){
  9364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9365. return $core.withContext(function($ctx6) {
  9366. //>>excludeEnd("ctx");
  9367. return $recv(each)._openAsTab();
  9368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9369. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,8)});
  9370. //>>excludeEnd("ctx");
  9371. }));
  9372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9373. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9374. //>>excludeEnd("ctx");
  9375. }));
  9376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9377. $ctx4.sendIdx["with:"]=4;
  9378. //>>excludeEnd("ctx");
  9379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9380. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)});
  9381. //>>excludeEnd("ctx");
  9382. }));
  9383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9384. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  9385. //>>excludeEnd("ctx");
  9386. }));
  9387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9388. $ctx2.sendIdx["with:"]=3;
  9389. //>>excludeEnd("ctx");
  9390. return $6;
  9391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9392. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9393. //>>excludeEnd("ctx");
  9394. }));
  9395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9396. $ctx1.sendIdx["with:"]=1;
  9397. //>>excludeEnd("ctx");
  9398. return self;
  9399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9400. }, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},$globals.HLTabsWidget)});
  9401. //>>excludeEnd("ctx");
  9402. },
  9403. //>>excludeStart("ide", pragmas.excludeIdeData);
  9404. args: ["html"],
  9405. source: "renderAddOn: html\x0a html div \x0a \x09class: 'dropdown new_tab';\x0a with: [ \x0a\x09\x09\x09html a \x0a \x09\x09class: 'dropdown-toggle';\x0a \x09 \x09at: 'data-toggle' put: 'dropdown';\x0a \x09with: [\x0a \x09\x09\x09\x09\x09(html tag: 'b') class: 'caret' ].\x0a html ul \x0a \x09\x09class: 'dropdown-menu';\x0a with: [\x0a \x09((HLWidget withAllSubclasses\x0a \x09select: [ :each | each canBeOpenAsTab ])\x0a sorted: [ :a :b | a tabPriority < b tabPriority ])\x0a do: [ :each |\x0a \x09\x09\x09\x09\x09\x09\x09html li with: [\x0a \x09\x09\x09html a \x0a \x09with: each tabLabel;\x0a \x09\x09\x09\x09\x09\x09\x09\x09onClick: [ each openAsTab ] ] ] ] ]",
  9406. referencedClasses: ["HLWidget"],
  9407. //>>excludeEnd("ide");
  9408. messageSends: ["class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "li", "tabLabel", "onClick:", "openAsTab"]
  9409. }),
  9410. $globals.HLTabsWidget);
  9411. $core.addMethod(
  9412. $core.method({
  9413. selector: "renderContentOn:",
  9414. protocol: "rendering",
  9415. fn: function (html){
  9416. var self=this;
  9417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9418. return $core.withContext(function($ctx1) {
  9419. //>>excludeEnd("ctx");
  9420. var $1,$3,$4,$2;
  9421. $1=$recv(html)._div();
  9422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9423. $ctx1.sendIdx["div"]=1;
  9424. //>>excludeEnd("ctx");
  9425. $recv($1)._class_("navbar navbar-fixed-top");
  9426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9427. $ctx1.sendIdx["class:"]=1;
  9428. //>>excludeEnd("ctx");
  9429. $2=$recv($1)._with_((function(){
  9430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9431. return $core.withContext(function($ctx2) {
  9432. //>>excludeEnd("ctx");
  9433. $3=$recv(html)._div();
  9434. $recv($3)._class_("navbar-header");
  9435. $recv($3)._at_put_("role","tabpanel");
  9436. $4=$recv($3)._with_((function(){
  9437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9438. return $core.withContext(function($ctx3) {
  9439. //>>excludeEnd("ctx");
  9440. return self._renderTabsOn_(html);
  9441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9442. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9443. //>>excludeEnd("ctx");
  9444. }));
  9445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9446. $ctx2.sendIdx["with:"]=2;
  9447. //>>excludeEnd("ctx");
  9448. return $4;
  9449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9450. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9451. //>>excludeEnd("ctx");
  9452. }));
  9453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9454. $ctx1.sendIdx["with:"]=1;
  9455. //>>excludeEnd("ctx");
  9456. $recv(html)._with_(self._spotlight());
  9457. self._renderAddOn_(html);
  9458. return self;
  9459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9460. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabsWidget)});
  9461. //>>excludeEnd("ctx");
  9462. },
  9463. //>>excludeStart("ide", pragmas.excludeIdeData);
  9464. args: ["html"],
  9465. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-header';\x0a\x09\x09\x09at: 'role' put: 'tabpanel';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ].\x0a\x09\x09\x09\x0a\x09html with: self spotlight.\x0a\x09self renderAddOn: html",
  9466. referencedClasses: [],
  9467. //>>excludeEnd("ide");
  9468. messageSends: ["class:", "div", "with:", "at:put:", "renderTabsOn:", "spotlight", "renderAddOn:"]
  9469. }),
  9470. $globals.HLTabsWidget);
  9471. $core.addMethod(
  9472. $core.method({
  9473. selector: "renderTab:on:",
  9474. protocol: "rendering",
  9475. fn: function (aTab,html){
  9476. var self=this;
  9477. var li;
  9478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9479. return $core.withContext(function($ctx1) {
  9480. //>>excludeEnd("ctx");
  9481. var $1,$2,$4,$3,$5,$6,$7,$8,$9;
  9482. $1=$recv(html)._li();
  9483. $2=$recv("width: ".__comma($recv(self._tabWidth())._asString())).__comma("px");
  9484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9485. $ctx1.sendIdx[","]=1;
  9486. //>>excludeEnd("ctx");
  9487. $recv($1)._style_($2);
  9488. $4=$recv(aTab)._isActive();
  9489. if($core.assert($4)){
  9490. $3="tab active";
  9491. } else {
  9492. $3="tab inactive";
  9493. }
  9494. $recv($1)._class_($3);
  9495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9496. $ctx1.sendIdx["class:"]=1;
  9497. //>>excludeEnd("ctx");
  9498. $recv($1)._with_((function(){
  9499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9500. return $core.withContext(function($ctx2) {
  9501. //>>excludeEnd("ctx");
  9502. $5=$recv(html)._a();
  9503. $recv($5)._with_((function(){
  9504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9505. return $core.withContext(function($ctx3) {
  9506. //>>excludeEnd("ctx");
  9507. $6=$recv($recv(html)._tag_("i"))._class_("close");
  9508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9509. $ctx3.sendIdx["class:"]=2;
  9510. //>>excludeEnd("ctx");
  9511. $recv($6)._onClick_((function(){
  9512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9513. return $core.withContext(function($ctx4) {
  9514. //>>excludeEnd("ctx");
  9515. return self._removeTab_(aTab);
  9516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9517. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9518. //>>excludeEnd("ctx");
  9519. }));
  9520. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9521. $ctx3.sendIdx["onClick:"]=1;
  9522. //>>excludeEnd("ctx");
  9523. $7=$recv(html)._span();
  9524. $recv($7)._class_($recv(aTab)._cssClass());
  9525. $8=$recv(aTab)._label();
  9526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9527. $ctx3.sendIdx["label"]=1;
  9528. //>>excludeEnd("ctx");
  9529. $recv($7)._title_($8);
  9530. return $recv($7)._with_($recv(aTab)._label());
  9531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9532. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9533. //>>excludeEnd("ctx");
  9534. }));
  9535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9536. $ctx2.sendIdx["with:"]=2;
  9537. //>>excludeEnd("ctx");
  9538. $9=$recv($5)._at_put_("role","tab");
  9539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9540. $ctx2.sendIdx["at:put:"]=1;
  9541. //>>excludeEnd("ctx");
  9542. return $9;
  9543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9544. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9545. //>>excludeEnd("ctx");
  9546. }));
  9547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9548. $ctx1.sendIdx["with:"]=1;
  9549. //>>excludeEnd("ctx");
  9550. li=$recv($1)._onClick_((function(){
  9551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9552. return $core.withContext(function($ctx2) {
  9553. //>>excludeEnd("ctx");
  9554. return $recv(aTab)._activate();
  9555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9556. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9557. //>>excludeEnd("ctx");
  9558. }));
  9559. $recv($recv(li)._asDomNode())._at_put_("tab-data",aTab);
  9560. return self;
  9561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9562. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html,li:li},$globals.HLTabsWidget)});
  9563. //>>excludeEnd("ctx");
  9564. },
  9565. //>>excludeStart("ide", pragmas.excludeIdeData);
  9566. args: ["aTab", "html"],
  9567. source: "renderTab: aTab on: html\x0a\x09| li |\x0a\x09li := html li \x0a\x09\x09style: 'width: ', self tabWidth asString, 'px';\x0a\x09\x09class: (aTab isActive ifTrue: [ 'tab active' ] ifFalse: [ 'tab inactive' ]);\x0a\x09\x09with: [\x0a\x09\x09\x09html a\x0a\x09\x09\x09with: [\x0a\x09\x09\x09\x09((html tag: 'i') class: 'close')\x0a\x09\x09\x09\x09\x09onClick: [ self removeTab: aTab ].\x0a\x09\x09\x09\x09html span \x0a\x09\x09\x09\x09\x09class: aTab cssClass;\x0a\x09\x09\x09\x09\x09title: aTab label;\x0a\x09\x09\x09\x09\x09with: aTab label ];\x0a\x09\x09\x09at: 'role' put: 'tab'];\x0a\x09\x09onClick: [ aTab activate ].\x0a\x09\x0a\x09li asDomNode at: 'tab-data' put: aTab",
  9568. referencedClasses: [],
  9569. //>>excludeEnd("ide");
  9570. messageSends: ["style:", "li", ",", "asString", "tabWidth", "class:", "ifTrue:ifFalse:", "isActive", "with:", "a", "onClick:", "tag:", "removeTab:", "span", "cssClass", "title:", "label", "at:put:", "activate", "asDomNode"]
  9571. }),
  9572. $globals.HLTabsWidget);
  9573. $core.addMethod(
  9574. $core.method({
  9575. selector: "renderTabsOn:",
  9576. protocol: "rendering",
  9577. fn: function (html){
  9578. var self=this;
  9579. var ul;
  9580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9581. return $core.withContext(function($ctx1) {
  9582. //>>excludeEnd("ctx");
  9583. var $1;
  9584. $1=$recv(html)._ul();
  9585. $recv($1)._class_("nav navbar-nav nav-tabs");
  9586. $recv($1)._at_put_("role","tablist");
  9587. ul=$recv($1)._with_((function(){
  9588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9589. return $core.withContext(function($ctx2) {
  9590. //>>excludeEnd("ctx");
  9591. return $recv(self._tabs())._do_((function(each){
  9592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9593. return $core.withContext(function($ctx3) {
  9594. //>>excludeEnd("ctx");
  9595. return self._renderTab_on_(each,html);
  9596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9597. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  9598. //>>excludeEnd("ctx");
  9599. }));
  9600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9601. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9602. //>>excludeEnd("ctx");
  9603. }));
  9604. $recv($recv(ul)._asJQuery())._sortable_($globals.HashedCollection._newFromPairs_(["containment","parent","start",(function(){
  9605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9606. return $core.withContext(function($ctx2) {
  9607. //>>excludeEnd("ctx");
  9608. return self._disableSelection();
  9609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9610. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9611. //>>excludeEnd("ctx");
  9612. }),"stop",(function(){
  9613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9614. return $core.withContext(function($ctx2) {
  9615. //>>excludeEnd("ctx");
  9616. return $recv((function(){
  9617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9618. return $core.withContext(function($ctx3) {
  9619. //>>excludeEnd("ctx");
  9620. return self._enableSelection();
  9621. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9622. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  9623. //>>excludeEnd("ctx");
  9624. }))._valueWithTimeout_((300));
  9625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9626. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  9627. //>>excludeEnd("ctx");
  9628. }),"update",(function(){
  9629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9630. return $core.withContext(function($ctx2) {
  9631. //>>excludeEnd("ctx");
  9632. return self._updateTabsOrder();
  9633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9634. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9635. //>>excludeEnd("ctx");
  9636. })]));
  9637. return self;
  9638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9639. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html,ul:ul},$globals.HLTabsWidget)});
  9640. //>>excludeEnd("ctx");
  9641. },
  9642. //>>excludeStart("ide", pragmas.excludeIdeData);
  9643. args: ["html"],
  9644. source: "renderTabsOn: html\x0a\x09| ul |\x0a\x09ul := html ul \x0a\x09\x09class: 'nav navbar-nav nav-tabs';\x0a\x09\x09at: 'role' put: 'tablist';\x0a\x09\x09with: [ \x0a \x09self tabs do: [ :each |\x0a\x09\x09\x09\x09self renderTab: each on: html ] ].\x0a\x09\x09\x0a\x09ul asJQuery sortable: #{\x0a\x09\x09'containment' -> 'parent'.\x0a\x09\x09'start' -> [ self disableSelection ].\x0a\x09\x09'stop' -> [ [ self enableSelection] valueWithTimeout: 300 ].\x0a\x09\x09'update' -> [ self updateTabsOrder ]\x0a\x09}",
  9645. referencedClasses: [],
  9646. //>>excludeEnd("ide");
  9647. messageSends: ["class:", "ul", "at:put:", "with:", "do:", "tabs", "renderTab:on:", "sortable:", "asJQuery", "disableSelection", "valueWithTimeout:", "enableSelection", "updateTabsOrder"]
  9648. }),
  9649. $globals.HLTabsWidget);
  9650. $core.addMethod(
  9651. $core.method({
  9652. selector: "setupEvents",
  9653. protocol: "private",
  9654. fn: function (){
  9655. var self=this;
  9656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9657. return $core.withContext(function($ctx1) {
  9658. //>>excludeEnd("ctx");
  9659. var $2,$3,$1,$4;
  9660. $recv("body"._asJQuery())._keydown_((function(event){
  9661. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9662. return $core.withContext(function($ctx2) {
  9663. //>>excludeEnd("ctx");
  9664. $2=$recv(event)._ctrlKey();
  9665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9666. $ctx2.sendIdx["ctrlKey"]=1;
  9667. //>>excludeEnd("ctx");
  9668. $1=$recv($2)._and_((function(){
  9669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9670. return $core.withContext(function($ctx3) {
  9671. //>>excludeEnd("ctx");
  9672. $3=$recv(event)._which();
  9673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9674. $ctx3.sendIdx["which"]=1;
  9675. //>>excludeEnd("ctx");
  9676. return $recv($3).__eq((188));
  9677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9678. $ctx3.sendIdx["="]=1;
  9679. //>>excludeEnd("ctx");
  9680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9681. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9682. //>>excludeEnd("ctx");
  9683. }));
  9684. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9685. $ctx2.sendIdx["and:"]=1;
  9686. //>>excludeEnd("ctx");
  9687. if($core.assert($1)){
  9688. self._activatePreviousTab();
  9689. $recv(event)._preventDefault();
  9690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9691. $ctx2.sendIdx["preventDefault"]=1;
  9692. //>>excludeEnd("ctx");
  9693. }
  9694. $4=$recv($recv(event)._ctrlKey())._and_((function(){
  9695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9696. return $core.withContext(function($ctx3) {
  9697. //>>excludeEnd("ctx");
  9698. return $recv($recv(event)._which()).__eq((190));
  9699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9700. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9701. //>>excludeEnd("ctx");
  9702. }));
  9703. if($core.assert($4)){
  9704. self._activateNextTab();
  9705. return $recv(event)._preventDefault();
  9706. }
  9707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9708. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  9709. //>>excludeEnd("ctx");
  9710. }));
  9711. return self;
  9712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9713. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLTabsWidget)});
  9714. //>>excludeEnd("ctx");
  9715. },
  9716. //>>excludeStart("ide", pragmas.excludeIdeData);
  9717. args: [],
  9718. source: "setupEvents\x0a\x09'body' asJQuery keydown: [ :event |\x0a\x09\x0a\x09\x09\x22ctrl+> and ctrl+<\x22\x0a\x09\x09(event ctrlKey and: [ event which = 188 ]) ifTrue: [\x0a\x09\x09\x09self activatePreviousTab.\x0a\x09\x09\x09event preventDefault ].\x0a\x09\x09(event ctrlKey and: [ event which = 190 ]) ifTrue: [\x0a\x09\x09\x09self activateNextTab.\x0a\x09\x09\x09event preventDefault ] ]",
  9719. referencedClasses: [],
  9720. //>>excludeEnd("ide");
  9721. messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", "ctrlKey", "=", "which", "activatePreviousTab", "preventDefault", "activateNextTab"]
  9722. }),
  9723. $globals.HLTabsWidget);
  9724. $core.addMethod(
  9725. $core.method({
  9726. selector: "show:",
  9727. protocol: "rendering",
  9728. fn: function (aTab){
  9729. var self=this;
  9730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9731. return $core.withContext(function($ctx1) {
  9732. //>>excludeEnd("ctx");
  9733. $recv(self._tabs())._do_((function(each){
  9734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9735. return $core.withContext(function($ctx2) {
  9736. //>>excludeEnd("ctx");
  9737. return $recv(each)._hide();
  9738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9739. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9740. //>>excludeEnd("ctx");
  9741. }));
  9742. $recv(aTab)._show();
  9743. $recv(aTab)._focus();
  9744. return self;
  9745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9746. }, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},$globals.HLTabsWidget)});
  9747. //>>excludeEnd("ctx");
  9748. },
  9749. //>>excludeStart("ide", pragmas.excludeIdeData);
  9750. args: ["aTab"],
  9751. source: "show: aTab\x0a\x09self tabs do: [ :each | each hide ].\x0a\x09aTab show; focus",
  9752. referencedClasses: [],
  9753. //>>excludeEnd("ide");
  9754. messageSends: ["do:", "tabs", "hide", "show", "focus"]
  9755. }),
  9756. $globals.HLTabsWidget);
  9757. $core.addMethod(
  9758. $core.method({
  9759. selector: "spotlight",
  9760. protocol: "accessing",
  9761. fn: function (){
  9762. var self=this;
  9763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9764. return $core.withContext(function($ctx1) {
  9765. //>>excludeEnd("ctx");
  9766. var $1,$receiver;
  9767. $1=self["@spotlight"];
  9768. if(($receiver = $1) == null || $receiver.isNil){
  9769. self["@spotlight"]=$recv($globals.HLSpotlightWidget)._new();
  9770. return self["@spotlight"];
  9771. } else {
  9772. return $1;
  9773. }
  9774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9775. }, function($ctx1) {$ctx1.fill(self,"spotlight",{},$globals.HLTabsWidget)});
  9776. //>>excludeEnd("ctx");
  9777. },
  9778. //>>excludeStart("ide", pragmas.excludeIdeData);
  9779. args: [],
  9780. source: "spotlight\x0a\x09^ spotlight ifNil: [ spotlight := HLSpotlightWidget new ]",
  9781. referencedClasses: ["HLSpotlightWidget"],
  9782. //>>excludeEnd("ide");
  9783. messageSends: ["ifNil:", "new"]
  9784. }),
  9785. $globals.HLTabsWidget);
  9786. $core.addMethod(
  9787. $core.method({
  9788. selector: "tabWidth",
  9789. protocol: "accessing",
  9790. fn: function (){
  9791. var self=this;
  9792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9793. return $core.withContext(function($ctx1) {
  9794. //>>excludeEnd("ctx");
  9795. return $recv($recv($recv($recv(window)._asJQuery())._width()).__minus((250))).__slash($recv(self._tabs())._size());
  9796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9797. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLTabsWidget)});
  9798. //>>excludeEnd("ctx");
  9799. },
  9800. //>>excludeStart("ide", pragmas.excludeIdeData);
  9801. args: [],
  9802. source: "tabWidth\x0a\x09^ (window asJQuery width - 250) / self tabs size",
  9803. referencedClasses: [],
  9804. //>>excludeEnd("ide");
  9805. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  9806. }),
  9807. $globals.HLTabsWidget);
  9808. $core.addMethod(
  9809. $core.method({
  9810. selector: "tabs",
  9811. protocol: "accessing",
  9812. fn: function (){
  9813. var self=this;
  9814. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9815. return $core.withContext(function($ctx1) {
  9816. //>>excludeEnd("ctx");
  9817. var $1,$receiver;
  9818. $1=self["@tabs"];
  9819. if(($receiver = $1) == null || $receiver.isNil){
  9820. self["@tabs"]=$recv($globals.OrderedCollection)._new();
  9821. return self["@tabs"];
  9822. } else {
  9823. return $1;
  9824. }
  9825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9826. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabsWidget)});
  9827. //>>excludeEnd("ctx");
  9828. },
  9829. //>>excludeStart("ide", pragmas.excludeIdeData);
  9830. args: [],
  9831. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  9832. referencedClasses: ["OrderedCollection"],
  9833. //>>excludeEnd("ide");
  9834. messageSends: ["ifNil:", "new"]
  9835. }),
  9836. $globals.HLTabsWidget);
  9837. $core.addMethod(
  9838. $core.method({
  9839. selector: "updateTabsOrder",
  9840. protocol: "actions",
  9841. fn: function (){
  9842. var self=this;
  9843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9844. return $core.withContext(function($ctx1) {
  9845. //>>excludeEnd("ctx");
  9846. self["@tabs"]=$recv($recv(".nav-tabs li"._asJQuery())._toArray())._collect_((function(each){
  9847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9848. return $core.withContext(function($ctx2) {
  9849. //>>excludeEnd("ctx");
  9850. return $recv(each)._at_("tab-data");
  9851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9852. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9853. //>>excludeEnd("ctx");
  9854. }));
  9855. return self;
  9856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9857. }, function($ctx1) {$ctx1.fill(self,"updateTabsOrder",{},$globals.HLTabsWidget)});
  9858. //>>excludeEnd("ctx");
  9859. },
  9860. //>>excludeStart("ide", pragmas.excludeIdeData);
  9861. args: [],
  9862. source: "updateTabsOrder\x0a\x09tabs := '.nav-tabs li' asJQuery toArray\x0a\x09\x09collect: [ :each | each at: 'tab-data' ]",
  9863. referencedClasses: [],
  9864. //>>excludeEnd("ide");
  9865. messageSends: ["collect:", "toArray", "asJQuery", "at:"]
  9866. }),
  9867. $globals.HLTabsWidget);
  9868. $globals.HLTabsWidget.klass.iVarNames = ["current"];
  9869. $core.addClass("HLWelcomeWidget", $globals.HLWidget, [], "Helios-Core");
  9870. $core.addMethod(
  9871. $core.method({
  9872. selector: "cssClass",
  9873. protocol: "accessing",
  9874. fn: function (){
  9875. var self=this;
  9876. return "welcome";
  9877. },
  9878. //>>excludeStart("ide", pragmas.excludeIdeData);
  9879. args: [],
  9880. source: "cssClass\x0a\x09^ 'welcome'",
  9881. referencedClasses: [],
  9882. //>>excludeEnd("ide");
  9883. messageSends: []
  9884. }),
  9885. $globals.HLWelcomeWidget);
  9886. $core.addMethod(
  9887. $core.method({
  9888. selector: "openClassBrowser",
  9889. protocol: "actions",
  9890. fn: function (){
  9891. var self=this;
  9892. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9893. return $core.withContext(function($ctx1) {
  9894. //>>excludeEnd("ctx");
  9895. $recv($globals.HLBrowser)._openAsTab();
  9896. return self;
  9897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9898. }, function($ctx1) {$ctx1.fill(self,"openClassBrowser",{},$globals.HLWelcomeWidget)});
  9899. //>>excludeEnd("ctx");
  9900. },
  9901. //>>excludeStart("ide", pragmas.excludeIdeData);
  9902. args: [],
  9903. source: "openClassBrowser\x0a\x09HLBrowser openAsTab",
  9904. referencedClasses: ["HLBrowser"],
  9905. //>>excludeEnd("ide");
  9906. messageSends: ["openAsTab"]
  9907. }),
  9908. $globals.HLWelcomeWidget);
  9909. $core.addMethod(
  9910. $core.method({
  9911. selector: "openHelp",
  9912. protocol: "actions",
  9913. fn: function (){
  9914. var self=this;
  9915. return self;
  9916. },
  9917. //>>excludeStart("ide", pragmas.excludeIdeData);
  9918. args: [],
  9919. source: "openHelp",
  9920. referencedClasses: [],
  9921. //>>excludeEnd("ide");
  9922. messageSends: []
  9923. }),
  9924. $globals.HLWelcomeWidget);
  9925. $core.addMethod(
  9926. $core.method({
  9927. selector: "openTestRunner",
  9928. protocol: "actions",
  9929. fn: function (){
  9930. var self=this;
  9931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9932. return $core.withContext(function($ctx1) {
  9933. //>>excludeEnd("ctx");
  9934. $recv($globals.HLSUnit)._openAsTab();
  9935. return self;
  9936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9937. }, function($ctx1) {$ctx1.fill(self,"openTestRunner",{},$globals.HLWelcomeWidget)});
  9938. //>>excludeEnd("ctx");
  9939. },
  9940. //>>excludeStart("ide", pragmas.excludeIdeData);
  9941. args: [],
  9942. source: "openTestRunner\x0a\x09HLSUnit openAsTab",
  9943. referencedClasses: ["HLSUnit"],
  9944. //>>excludeEnd("ide");
  9945. messageSends: ["openAsTab"]
  9946. }),
  9947. $globals.HLWelcomeWidget);
  9948. $core.addMethod(
  9949. $core.method({
  9950. selector: "openWorkspace",
  9951. protocol: "actions",
  9952. fn: function (){
  9953. var self=this;
  9954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9955. return $core.withContext(function($ctx1) {
  9956. //>>excludeEnd("ctx");
  9957. $recv($globals.HLWorkspace)._openAsTab();
  9958. return self;
  9959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9960. }, function($ctx1) {$ctx1.fill(self,"openWorkspace",{},$globals.HLWelcomeWidget)});
  9961. //>>excludeEnd("ctx");
  9962. },
  9963. //>>excludeStart("ide", pragmas.excludeIdeData);
  9964. args: [],
  9965. source: "openWorkspace\x0a\x09HLWorkspace openAsTab",
  9966. referencedClasses: ["HLWorkspace"],
  9967. //>>excludeEnd("ide");
  9968. messageSends: ["openAsTab"]
  9969. }),
  9970. $globals.HLWelcomeWidget);
  9971. $core.addMethod(
  9972. $core.method({
  9973. selector: "renderButtonsOn:",
  9974. protocol: "rendering",
  9975. fn: function (html){
  9976. var self=this;
  9977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9978. return $core.withContext(function($ctx1) {
  9979. //>>excludeEnd("ctx");
  9980. var $1,$2,$3,$4,$5;
  9981. $1=$recv(html)._button();
  9982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9983. $ctx1.sendIdx["button"]=1;
  9984. //>>excludeEnd("ctx");
  9985. $recv($1)._class_("button");
  9986. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9987. $ctx1.sendIdx["class:"]=1;
  9988. //>>excludeEnd("ctx");
  9989. $recv($1)._with_("Class Browser");
  9990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9991. $ctx1.sendIdx["with:"]=1;
  9992. //>>excludeEnd("ctx");
  9993. $2=$recv($1)._onClick_((function(){
  9994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9995. return $core.withContext(function($ctx2) {
  9996. //>>excludeEnd("ctx");
  9997. return self._openClassBrowser();
  9998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9999. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10000. //>>excludeEnd("ctx");
  10001. }));
  10002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10003. $ctx1.sendIdx["onClick:"]=1;
  10004. //>>excludeEnd("ctx");
  10005. $3=$recv(html)._button();
  10006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10007. $ctx1.sendIdx["button"]=2;
  10008. //>>excludeEnd("ctx");
  10009. $recv($3)._class_("button");
  10010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10011. $ctx1.sendIdx["class:"]=2;
  10012. //>>excludeEnd("ctx");
  10013. $recv($3)._with_("Workspace");
  10014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10015. $ctx1.sendIdx["with:"]=2;
  10016. //>>excludeEnd("ctx");
  10017. $4=$recv($3)._onClick_((function(){
  10018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10019. return $core.withContext(function($ctx2) {
  10020. //>>excludeEnd("ctx");
  10021. return self._openWorkspace();
  10022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10023. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10024. //>>excludeEnd("ctx");
  10025. }));
  10026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10027. $ctx1.sendIdx["onClick:"]=2;
  10028. //>>excludeEnd("ctx");
  10029. $5=$recv(html)._button();
  10030. $recv($5)._class_("button");
  10031. $recv($5)._with_("Test Runner");
  10032. $recv($5)._onClick_((function(){
  10033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10034. return $core.withContext(function($ctx2) {
  10035. //>>excludeEnd("ctx");
  10036. return self._openTestRunner();
  10037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10038. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10039. //>>excludeEnd("ctx");
  10040. }));
  10041. return self;
  10042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10043. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLWelcomeWidget)});
  10044. //>>excludeEnd("ctx");
  10045. },
  10046. //>>excludeStart("ide", pragmas.excludeIdeData);
  10047. args: ["html"],
  10048. source: "renderButtonsOn: html\x0a\x09html button\x0a\x09\x09class: 'button';\x0a\x09\x09with: 'Class Browser';\x0a\x09\x09onClick: [ self openClassBrowser ].\x0a\x09html button\x0a\x09\x09class: 'button';\x0a\x09\x09with: 'Workspace';\x0a\x09\x09onClick: [ self openWorkspace ].\x0a\x09html button\x0a\x09\x09class: 'button';\x0a\x09\x09with: 'Test Runner';\x0a\x09\x09onClick: [ self openTestRunner ].\x0a\x09\x22html button\x0a\x09\x09class: 'button';\x0a\x09\x09with: 'Help';\x0a\x09\x09onClick: [ self openHelp ]\x22",
  10049. referencedClasses: [],
  10050. //>>excludeEnd("ide");
  10051. messageSends: ["class:", "button", "with:", "onClick:", "openClassBrowser", "openWorkspace", "openTestRunner"]
  10052. }),
  10053. $globals.HLWelcomeWidget);
  10054. $core.addMethod(
  10055. $core.method({
  10056. selector: "renderContentOn:",
  10057. protocol: "rendering",
  10058. fn: function (html){
  10059. var self=this;
  10060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10061. return $core.withContext(function($ctx1) {
  10062. //>>excludeEnd("ctx");
  10063. self._renderHelpOn_(html);
  10064. self._renderButtonsOn_(html);
  10065. return self;
  10066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10067. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLWelcomeWidget)});
  10068. //>>excludeEnd("ctx");
  10069. },
  10070. //>>excludeStart("ide", pragmas.excludeIdeData);
  10071. args: ["html"],
  10072. source: "renderContentOn: html\x0a\x09self\x0a\x09\x09renderHelpOn: html;\x0a\x09\x09renderButtonsOn: html",
  10073. referencedClasses: [],
  10074. //>>excludeEnd("ide");
  10075. messageSends: ["renderHelpOn:", "renderButtonsOn:"]
  10076. }),
  10077. $globals.HLWelcomeWidget);
  10078. $core.addMethod(
  10079. $core.method({
  10080. selector: "renderHelpOn:",
  10081. protocol: "rendering",
  10082. fn: function (html){
  10083. var self=this;
  10084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10085. return $core.withContext(function($ctx1) {
  10086. //>>excludeEnd("ctx");
  10087. var $1;
  10088. $recv($recv(html)._h2())._with_("No tools are open");
  10089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10090. $ctx1.sendIdx["with:"]=1;
  10091. //>>excludeEnd("ctx");
  10092. $recv($recv(html)._ul())._with_((function(){
  10093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10094. return $core.withContext(function($ctx2) {
  10095. //>>excludeEnd("ctx");
  10096. $1=$recv(html)._li();
  10097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10098. $ctx2.sendIdx["li"]=1;
  10099. //>>excludeEnd("ctx");
  10100. $recv($1)._with_("Perform actions with ctrl + space");
  10101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10102. $ctx2.sendIdx["with:"]=3;
  10103. //>>excludeEnd("ctx");
  10104. return $recv($recv(html)._li())._with_("Open one of the common tools:");
  10105. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10106. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10107. //>>excludeEnd("ctx");
  10108. }));
  10109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10110. $ctx1.sendIdx["with:"]=2;
  10111. //>>excludeEnd("ctx");
  10112. return self;
  10113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10114. }, function($ctx1) {$ctx1.fill(self,"renderHelpOn:",{html:html},$globals.HLWelcomeWidget)});
  10115. //>>excludeEnd("ctx");
  10116. },
  10117. //>>excludeStart("ide", pragmas.excludeIdeData);
  10118. args: ["html"],
  10119. source: "renderHelpOn: html\x0a\x09html h2 with: 'No tools are open'.\x0a\x09html ul with: [\x0a\x09\x09html li with: 'Perform actions with ctrl + space'.\x0a\x09\x09html li with: 'Open one of the common tools:' ]",
  10120. referencedClasses: [],
  10121. //>>excludeEnd("ide");
  10122. messageSends: ["with:", "h2", "ul", "li"]
  10123. }),
  10124. $globals.HLWelcomeWidget);
  10125. });