Helios-Core.js 359 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000700170027003700470057006700770087009701070117012701370147015701670177018701970207021702270237024702570267027702870297030703170327033703470357036703770387039704070417042704370447045704670477048704970507051705270537054705570567057705870597060706170627063706470657066706770687069707070717072707370747075707670777078707970807081708270837084708570867087708870897090709170927093709470957096709770987099710071017102710371047105710671077108710971107111711271137114711571167117711871197120712171227123712471257126712771287129713071317132713371347135713671377138713971407141714271437144714571467147714871497150715171527153715471557156715771587159716071617162716371647165716671677168716971707171717271737174717571767177717871797180718171827183718471857186718771887189719071917192719371947195719671977198719972007201720272037204720572067207720872097210721172127213721472157216721772187219722072217222722372247225722672277228722972307231723272337234723572367237723872397240724172427243724472457246724772487249725072517252725372547255725672577258725972607261726272637264726572667267726872697270727172727273727472757276727772787279728072817282728372847285728672877288728972907291729272937294729572967297729872997300730173027303730473057306730773087309731073117312731373147315731673177318731973207321732273237324732573267327732873297330733173327333733473357336733773387339734073417342734373447345734673477348734973507351735273537354735573567357735873597360736173627363736473657366736773687369737073717372737373747375737673777378737973807381738273837384738573867387738873897390739173927393739473957396739773987399740074017402740374047405740674077408740974107411741274137414741574167417741874197420742174227423742474257426742774287429743074317432743374347435743674377438743974407441744274437444744574467447744874497450745174527453745474557456745774587459746074617462746374647465746674677468746974707471747274737474747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558755975607561756275637564756575667567756875697570757175727573757475757576757775787579758075817582758375847585758675877588758975907591759275937594759575967597759875997600760176027603760476057606760776087609761076117612761376147615761676177618761976207621762276237624762576267627762876297630763176327633763476357636763776387639764076417642764376447645764676477648764976507651765276537654765576567657765876597660766176627663766476657666766776687669767076717672767376747675767676777678767976807681768276837684768576867687768876897690769176927693769476957696769776987699770077017702770377047705770677077708770977107711771277137714771577167717771877197720772177227723772477257726772777287729773077317732773377347735773677377738773977407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762776377647765776677677768776977707771777277737774777577767777777877797780778177827783778477857786778777887789779077917792779377947795779677977798779978007801780278037804780578067807780878097810781178127813781478157816781778187819782078217822782378247825782678277828782978307831783278337834783578367837783878397840784178427843784478457846784778487849785078517852785378547855785678577858785978607861786278637864786578667867786878697870787178727873787478757876787778787879788078817882788378847885788678877888788978907891789278937894789578967897789878997900790179027903790479057906790779087909791079117912791379147915791679177918791979207921792279237924792579267927792879297930793179327933793479357936793779387939794079417942794379447945794679477948794979507951795279537954795579567957795879597960796179627963796479657966796779687969797079717972797379747975797679777978797979807981798279837984798579867987798879897990799179927993799479957996799779987999800080018002800380048005800680078008800980108011801280138014801580168017801880198020802180228023802480258026802780288029803080318032803380348035803680378038803980408041804280438044804580468047804880498050805180528053805480558056805780588059806080618062806380648065806680678068806980708071807280738074807580768077807880798080808180828083808480858086808780888089809080918092809380948095809680978098809981008101810281038104810581068107810881098110811181128113811481158116811781188119812081218122812381248125812681278128812981308131813281338134813581368137813881398140814181428143814481458146814781488149815081518152815381548155815681578158815981608161816281638164816581668167816881698170817181728173817481758176817781788179818081818182818381848185818681878188818981908191819281938194819581968197819881998200820182028203820482058206820782088209821082118212821382148215821682178218821982208221822282238224822582268227822882298230823182328233823482358236823782388239824082418242824382448245824682478248824982508251825282538254825582568257825882598260826182628263826482658266826782688269827082718272827382748275827682778278827982808281828282838284828582868287828882898290829182928293829482958296829782988299830083018302830383048305830683078308830983108311831283138314831583168317831883198320832183228323832483258326832783288329833083318332833383348335833683378338833983408341834283438344834583468347834883498350835183528353835483558356835783588359836083618362836383648365836683678368836983708371837283738374837583768377837883798380838183828383838483858386838783888389839083918392839383948395839683978398839984008401840284038404840584068407840884098410841184128413841484158416841784188419842084218422842384248425842684278428842984308431843284338434843584368437843884398440844184428443844484458446844784488449845084518452845384548455845684578458845984608461846284638464846584668467846884698470847184728473847484758476847784788479848084818482848384848485848684878488848984908491849284938494849584968497849884998500850185028503850485058506850785088509851085118512851385148515851685178518851985208521852285238524852585268527852885298530853185328533853485358536853785388539854085418542854385448545854685478548854985508551855285538554855585568557855885598560856185628563856485658566856785688569857085718572857385748575857685778578857985808581858285838584858585868587858885898590859185928593859485958596859785988599860086018602860386048605860686078608860986108611861286138614861586168617861886198620862186228623862486258626862786288629863086318632863386348635863686378638863986408641864286438644864586468647864886498650865186528653865486558656865786588659866086618662866386648665866686678668866986708671867286738674867586768677867886798680868186828683868486858686868786888689869086918692869386948695869686978698869987008701870287038704870587068707870887098710871187128713871487158716871787188719872087218722872387248725872687278728872987308731873287338734873587368737873887398740874187428743874487458746874787488749875087518752875387548755875687578758875987608761876287638764876587668767876887698770877187728773877487758776877787788779878087818782878387848785878687878788878987908791879287938794879587968797879887998800880188028803880488058806880788088809881088118812881388148815881688178818881988208821882288238824882588268827882888298830883188328833883488358836883788388839884088418842884388448845884688478848884988508851885288538854885588568857885888598860886188628863886488658866886788688869887088718872887388748875887688778878887988808881888288838884888588868887888888898890889188928893889488958896889788988899890089018902890389048905890689078908890989108911891289138914891589168917891889198920892189228923892489258926892789288929893089318932893389348935893689378938893989408941894289438944894589468947894889498950895189528953895489558956895789588959896089618962896389648965896689678968896989708971897289738974897589768977897889798980898189828983898489858986898789888989899089918992899389948995899689978998899990009001900290039004900590069007900890099010901190129013901490159016901790189019902090219022902390249025902690279028902990309031903290339034903590369037903890399040904190429043904490459046904790489049905090519052905390549055905690579058905990609061906290639064906590669067906890699070907190729073907490759076907790789079908090819082908390849085908690879088908990909091909290939094909590969097909890999100910191029103910491059106910791089109911091119112911391149115911691179118911991209121912291239124912591269127912891299130913191329133913491359136913791389139914091419142914391449145914691479148914991509151915291539154915591569157915891599160916191629163916491659166916791689169917091719172917391749175917691779178917991809181918291839184918591869187918891899190919191929193919491959196919791989199920092019202920392049205920692079208920992109211921292139214921592169217921892199220922192229223922492259226922792289229923092319232923392349235923692379238923992409241924292439244924592469247924892499250925192529253925492559256925792589259926092619262926392649265926692679268926992709271927292739274927592769277927892799280928192829283928492859286928792889289929092919292929392949295929692979298929993009301930293039304930593069307930893099310931193129313931493159316931793189319932093219322932393249325932693279328932993309331933293339334933593369337933893399340934193429343934493459346934793489349935093519352935393549355935693579358935993609361936293639364936593669367936893699370937193729373937493759376937793789379938093819382938393849385938693879388938993909391939293939394939593969397939893999400940194029403940494059406940794089409941094119412941394149415941694179418941994209421942294239424942594269427942894299430943194329433943494359436943794389439944094419442944394449445944694479448944994509451945294539454945594569457945894599460946194629463946494659466946794689469947094719472947394749475947694779478947994809481948294839484948594869487948894899490949194929493949494959496949794989499950095019502950395049505950695079508950995109511951295139514951595169517951895199520952195229523952495259526952795289529953095319532953395349535953695379538953995409541954295439544954595469547954895499550955195529553955495559556955795589559956095619562956395649565956695679568956995709571957295739574957595769577957895799580958195829583958495859586958795889589959095919592959395949595959695979598959996009601960296039604960596069607960896099610961196129613961496159616961796189619962096219622962396249625962696279628962996309631963296339634963596369637963896399640964196429643964496459646964796489649965096519652965396549655965696579658965996609661966296639664966596669667966896699670967196729673967496759676967796789679968096819682968396849685968696879688968996909691969296939694969596969697969896999700970197029703970497059706970797089709971097119712971397149715971697179718971997209721972297239724972597269727972897299730973197329733973497359736973797389739974097419742974397449745974697479748974997509751975297539754975597569757975897599760976197629763976497659766976797689769977097719772977397749775977697779778977997809781978297839784978597869787978897899790979197929793979497959796979797989799980098019802980398049805980698079808980998109811981298139814981598169817981898199820982198229823982498259826982798289829983098319832983398349835983698379838983998409841984298439844984598469847984898499850985198529853985498559856985798589859986098619862986398649865986698679868986998709871987298739874987598769877987898799880988198829883988498859886988798889889989098919892989398949895989698979898989999009901990299039904990599069907990899099910991199129913991499159916991799189919992099219922992399249925992699279928992999309931993299339934993599369937993899399940994199429943994499459946994799489949995099519952995399549955995699579958995999609961996299639964996599669967996899699970997199729973997499759976997799789979998099819982998399849985998699879988998999909991999299939994999599969997999899991000010001100021000310004100051000610007100081000910010100111001210013100141001510016100171001810019100201002110022100231002410025100261002710028100291003010031100321003310034100351003610037100381003910040100411004210043100441004510046100471004810049100501005110052100531005410055100561005710058100591006010061100621006310064100651006610067100681006910070100711007210073100741007510076100771007810079100801008110082100831008410085100861008710088100891009010091100921009310094100951009610097100981009910100101011010210103101041010510106101071010810109101101011110112101131011410115101161011710118101191012010121101221012310124101251012610127101281012910130101311013210133101341013510136101371013810139101401014110142101431014410145101461014710148101491015010151101521015310154101551015610157101581015910160101611016210163101641016510166101671016810169101701017110172101731017410175101761017710178101791018010181101821018310184101851018610187101881018910190101911019210193101941019510196101971019810199102001020110202102031020410205102061020710208102091021010211102121021310214102151021610217102181021910220102211022210223102241022510226102271022810229102301023110232102331023410235102361023710238102391024010241102421024310244102451024610247102481024910250102511025210253102541025510256102571025810259102601026110262102631026410265102661026710268102691027010271102721027310274102751027610277102781027910280102811028210283102841028510286102871028810289102901029110292102931029410295102961029710298102991030010301103021030310304103051030610307103081030910310103111031210313103141031510316103171031810319103201032110322103231032410325103261032710328103291033010331103321033310334103351033610337103381033910340103411034210343103441034510346103471034810349103501035110352103531035410355103561035710358103591036010361103621036310364103651036610367103681036910370103711037210373103741037510376103771037810379103801038110382103831038410385103861038710388103891039010391103921039310394103951039610397103981039910400104011040210403104041040510406104071040810409104101041110412104131041410415104161041710418104191042010421104221042310424104251042610427104281042910430104311043210433104341043510436104371043810439104401044110442104431044410445104461044710448104491045010451104521045310454104551045610457104581045910460104611046210463104641046510466104671046810469104701047110472104731047410475104761047710478104791048010481104821048310484104851048610487104881048910490104911049210493104941049510496104971049810499105001050110502105031050410505105061050710508105091051010511105121051310514105151051610517105181051910520105211052210523105241052510526105271052810529105301053110532105331053410535105361053710538105391054010541105421054310544105451054610547105481054910550105511055210553105541055510556105571055810559105601056110562105631056410565105661056710568105691057010571105721057310574105751057610577105781057910580105811058210583105841058510586105871058810589105901059110592105931059410595105961059710598105991060010601106021060310604106051060610607106081060910610106111061210613106141061510616106171061810619106201062110622106231062410625106261062710628106291063010631106321063310634106351063610637106381063910640106411064210643106441064510646106471064810649106501065110652106531065410655106561065710658106591066010661106621066310664106651066610667106681066910670106711067210673106741067510676106771067810679106801068110682106831068410685106861068710688106891069010691106921069310694106951069610697106981069910700107011070210703107041070510706107071070810709107101071110712107131071410715107161071710718107191072010721107221072310724107251072610727107281072910730107311073210733107341073510736107371073810739107401074110742107431074410745107461074710748107491075010751107521075310754107551075610757107581075910760107611076210763107641076510766107671076810769107701077110772107731077410775107761077710778107791078010781107821078310784107851078610787107881078910790107911079210793107941079510796107971079810799108001080110802108031080410805108061080710808108091081010811108121081310814108151081610817108181081910820108211082210823108241082510826108271082810829108301083110832108331083410835108361083710838108391084010841108421084310844108451084610847108481084910850108511085210853108541085510856108571085810859108601086110862108631086410865108661086710868108691087010871108721087310874108751087610877108781087910880108811088210883108841088510886108871088810889108901089110892108931089410895108961089710898108991090010901109021090310904109051090610907109081090910910109111091210913109141091510916109171091810919109201092110922
  1. define(["amber/boot", "amber/web/Web", "amber_core/Kernel-Objects"], function($boot){"use strict";
  2. if(!$boot.nilAsReceiver)$boot.nilAsReceiver=$boot.nil;
  3. if(!("nilAsValue" in $boot))$boot.nilAsValue=$boot.nilAsReceiver;
  4. var $core=$boot.api,nil=$boot.nilAsValue,$nil=$boot.nilAsReceiver,$recv=$boot.asReceiver,$globals=$boot.globals;
  5. if(!$boot.nilAsClass)$boot.nilAsClass=$boot.dnu;
  6. $core.addPackage("Helios-Core");
  7. $core.packages["Helios-Core"].innerEval = function (expr) { return eval(expr); };
  8. $core.packages["Helios-Core"].transport = {"type":"amd","amdNamespace":"helios"};
  9. $core.addClass("HLModel", $globals.Object, ["announcer", "environment"], "Helios-Core");
  10. //>>excludeStart("ide", pragmas.excludeIdeData);
  11. $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).";
  12. //>>excludeEnd("ide");
  13. $core.addMethod(
  14. $core.method({
  15. selector: "announcer",
  16. protocol: "accessing",
  17. fn: function (){
  18. var self=this,$self=this;
  19. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  20. return $core.withContext(function($ctx1) {
  21. //>>excludeEnd("ctx");
  22. var $1,$receiver;
  23. $1=$self["@announcer"];
  24. if(($receiver = $1) == null || $receiver.a$nil){
  25. $self["@announcer"]=$recv($globals.Announcer)._new();
  26. return $self["@announcer"];
  27. } else {
  28. return $1;
  29. }
  30. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  31. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLModel)});
  32. //>>excludeEnd("ctx");
  33. },
  34. //>>excludeStart("ide", pragmas.excludeIdeData);
  35. args: [],
  36. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  37. referencedClasses: ["Announcer"],
  38. //>>excludeEnd("ide");
  39. messageSends: ["ifNil:", "new"]
  40. }),
  41. $globals.HLModel);
  42. $core.addMethod(
  43. $core.method({
  44. selector: "environment",
  45. protocol: "accessing",
  46. fn: function (){
  47. var self=this,$self=this;
  48. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  49. return $core.withContext(function($ctx1) {
  50. //>>excludeEnd("ctx");
  51. var $1,$receiver;
  52. $1=$self["@environment"];
  53. if(($receiver = $1) == null || $receiver.a$nil){
  54. return $recv($self._manager())._environment();
  55. } else {
  56. return $1;
  57. }
  58. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  59. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLModel)});
  60. //>>excludeEnd("ctx");
  61. },
  62. //>>excludeStart("ide", pragmas.excludeIdeData);
  63. args: [],
  64. source: "environment\x0a\x09^ environment ifNil: [ self manager environment ]",
  65. referencedClasses: [],
  66. //>>excludeEnd("ide");
  67. messageSends: ["ifNil:", "environment", "manager"]
  68. }),
  69. $globals.HLModel);
  70. $core.addMethod(
  71. $core.method({
  72. selector: "environment:",
  73. protocol: "accessing",
  74. fn: function (anEnvironment){
  75. var self=this,$self=this;
  76. $self["@environment"]=anEnvironment;
  77. return self;
  78. },
  79. //>>excludeStart("ide", pragmas.excludeIdeData);
  80. args: ["anEnvironment"],
  81. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  82. referencedClasses: [],
  83. //>>excludeEnd("ide");
  84. messageSends: []
  85. }),
  86. $globals.HLModel);
  87. $core.addMethod(
  88. $core.method({
  89. selector: "isBrowserModel",
  90. protocol: "testing",
  91. fn: function (){
  92. var self=this,$self=this;
  93. return false;
  94. },
  95. //>>excludeStart("ide", pragmas.excludeIdeData);
  96. args: [],
  97. source: "isBrowserModel\x0a\x09^ false",
  98. referencedClasses: [],
  99. //>>excludeEnd("ide");
  100. messageSends: []
  101. }),
  102. $globals.HLModel);
  103. $core.addMethod(
  104. $core.method({
  105. selector: "isReferencesModel",
  106. protocol: "testing",
  107. fn: function (){
  108. var self=this,$self=this;
  109. return false;
  110. },
  111. //>>excludeStart("ide", pragmas.excludeIdeData);
  112. args: [],
  113. source: "isReferencesModel\x0a\x09^ false",
  114. referencedClasses: [],
  115. //>>excludeEnd("ide");
  116. messageSends: []
  117. }),
  118. $globals.HLModel);
  119. $core.addMethod(
  120. $core.method({
  121. selector: "isToolModel",
  122. protocol: "testing",
  123. fn: function (){
  124. var self=this,$self=this;
  125. return false;
  126. },
  127. //>>excludeStart("ide", pragmas.excludeIdeData);
  128. args: [],
  129. source: "isToolModel\x0a\x09^ false",
  130. referencedClasses: [],
  131. //>>excludeEnd("ide");
  132. messageSends: []
  133. }),
  134. $globals.HLModel);
  135. $core.addMethod(
  136. $core.method({
  137. selector: "manager",
  138. protocol: "accessing",
  139. fn: function (){
  140. var self=this,$self=this;
  141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  142. return $core.withContext(function($ctx1) {
  143. //>>excludeEnd("ctx");
  144. return $recv($globals.HLManager)._current();
  145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  146. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLModel)});
  147. //>>excludeEnd("ctx");
  148. },
  149. //>>excludeStart("ide", pragmas.excludeIdeData);
  150. args: [],
  151. source: "manager\x0a\x09^ HLManager current",
  152. referencedClasses: ["HLManager"],
  153. //>>excludeEnd("ide");
  154. messageSends: ["current"]
  155. }),
  156. $globals.HLModel);
  157. $core.addMethod(
  158. $core.method({
  159. selector: "systemAnnouncer",
  160. protocol: "accessing",
  161. fn: function (){
  162. var self=this,$self=this;
  163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  164. return $core.withContext(function($ctx1) {
  165. //>>excludeEnd("ctx");
  166. return $recv($self._environment())._systemAnnouncer();
  167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  168. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},$globals.HLModel)});
  169. //>>excludeEnd("ctx");
  170. },
  171. //>>excludeStart("ide", pragmas.excludeIdeData);
  172. args: [],
  173. source: "systemAnnouncer\x0a\x09^ self environment systemAnnouncer",
  174. referencedClasses: [],
  175. //>>excludeEnd("ide");
  176. messageSends: ["systemAnnouncer", "environment"]
  177. }),
  178. $globals.HLModel);
  179. $core.addMethod(
  180. $core.method({
  181. selector: "withChangesDo:",
  182. protocol: "error handling",
  183. fn: function (aBlock){
  184. var self=this,$self=this;
  185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  186. return $core.withContext(function($ctx1) {
  187. //>>excludeEnd("ctx");
  188. var $1,$3,$2;
  189. $recv((function(){
  190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  191. return $core.withContext(function($ctx2) {
  192. //>>excludeEnd("ctx");
  193. $1=$self._announcer();
  194. $3=$recv($globals.HLAboutToChange)._new();
  195. $recv($3)._actionBlock_(aBlock);
  196. $2=$recv($3)._yourself();
  197. $recv($1)._announce_($2);
  198. return $recv(aBlock)._value();
  199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  200. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  201. //>>excludeEnd("ctx");
  202. }))._on_do_($globals.HLChangeForbidden,(function(ex){
  203. }));
  204. return self;
  205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  206. }, function($ctx1) {$ctx1.fill(self,"withChangesDo:",{aBlock:aBlock},$globals.HLModel)});
  207. //>>excludeEnd("ctx");
  208. },
  209. //>>excludeStart("ide", pragmas.excludeIdeData);
  210. args: ["aBlock"],
  211. 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 | ]",
  212. referencedClasses: ["HLAboutToChange", "HLChangeForbidden"],
  213. //>>excludeEnd("ide");
  214. messageSends: ["on:do:", "announce:", "announcer", "actionBlock:", "new", "yourself", "value"]
  215. }),
  216. $globals.HLModel);
  217. $core.addClass("HLFinder", $globals.HLModel, [], "Helios-Core");
  218. //>>excludeStart("ide", pragmas.excludeIdeData);
  219. $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.";
  220. //>>excludeEnd("ide");
  221. $core.addMethod(
  222. $core.method({
  223. selector: "findClass:",
  224. protocol: "finding",
  225. fn: function (aClass){
  226. var self=this,$self=this;
  227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  228. return $core.withContext(function($ctx1) {
  229. //>>excludeEnd("ctx");
  230. $recv($recv($globals.HLBrowser)._openAsTab())._openClassNamed_($recv(aClass)._name());
  231. return self;
  232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  233. }, function($ctx1) {$ctx1.fill(self,"findClass:",{aClass:aClass},$globals.HLFinder)});
  234. //>>excludeEnd("ctx");
  235. },
  236. //>>excludeStart("ide", pragmas.excludeIdeData);
  237. args: ["aClass"],
  238. source: "findClass: aClass\x0a\x09HLBrowser openAsTab openClassNamed: aClass name",
  239. referencedClasses: ["HLBrowser"],
  240. //>>excludeEnd("ide");
  241. messageSends: ["openClassNamed:", "openAsTab", "name"]
  242. }),
  243. $globals.HLFinder);
  244. $core.addMethod(
  245. $core.method({
  246. selector: "findMethod:",
  247. protocol: "finding",
  248. fn: function (aCompiledMethod){
  249. var self=this,$self=this;
  250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  251. return $core.withContext(function($ctx1) {
  252. //>>excludeEnd("ctx");
  253. $recv($recv($globals.HLBrowser)._openAsTab())._openMethod_(aCompiledMethod);
  254. return self;
  255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  256. }, function($ctx1) {$ctx1.fill(self,"findMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLFinder)});
  257. //>>excludeEnd("ctx");
  258. },
  259. //>>excludeStart("ide", pragmas.excludeIdeData);
  260. args: ["aCompiledMethod"],
  261. source: "findMethod: aCompiledMethod\x0a\x09HLBrowser openAsTab openMethod: aCompiledMethod",
  262. referencedClasses: ["HLBrowser"],
  263. //>>excludeEnd("ide");
  264. messageSends: ["openMethod:", "openAsTab"]
  265. }),
  266. $globals.HLFinder);
  267. $core.addMethod(
  268. $core.method({
  269. selector: "findString:",
  270. protocol: "finding",
  271. fn: function (aString){
  272. var self=this,$self=this;
  273. var foundClass;
  274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  275. return $core.withContext(function($ctx1) {
  276. //>>excludeEnd("ctx");
  277. var $1,$receiver;
  278. foundClass=$recv($recv($self._environment())._classes())._detect_ifNone_((function(each){
  279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  280. return $core.withContext(function($ctx2) {
  281. //>>excludeEnd("ctx");
  282. return $recv($recv(each)._name()).__eq(aString);
  283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  284. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  285. //>>excludeEnd("ctx");
  286. }),(function(){
  287. return nil;
  288. }));
  289. $1=foundClass;
  290. if(($receiver = $1) == null || $receiver.a$nil){
  291. $recv($recv($globals.HLReferences)._openAsTab())._search_(aString);
  292. } else {
  293. $self._findClass_(foundClass);
  294. }
  295. return self;
  296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  297. }, function($ctx1) {$ctx1.fill(self,"findString:",{aString:aString,foundClass:foundClass},$globals.HLFinder)});
  298. //>>excludeEnd("ctx");
  299. },
  300. //>>excludeStart("ide", pragmas.excludeIdeData);
  301. args: ["aString"],
  302. 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 ]",
  303. referencedClasses: ["HLReferences"],
  304. //>>excludeEnd("ide");
  305. messageSends: ["detect:ifNone:", "classes", "environment", "=", "name", "ifNil:ifNotNil:", "search:", "openAsTab", "findClass:"]
  306. }),
  307. $globals.HLFinder);
  308. $core.addClass("HLToolModel", $globals.HLModel, ["selectedClass", "selectedPackage", "selectedProtocol", "selectedSelector"], "Helios-Core");
  309. //>>excludeStart("ide", pragmas.excludeIdeData);
  310. $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.";
  311. //>>excludeEnd("ide");
  312. $core.addMethod(
  313. $core.method({
  314. selector: "addInstVarNamed:",
  315. protocol: "actions",
  316. fn: function (aString){
  317. var self=this,$self=this;
  318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  319. return $core.withContext(function($ctx1) {
  320. //>>excludeEnd("ctx");
  321. var $1,$2,$3,$5,$4;
  322. $1=$self._environment();
  323. $2=$self._selectedClass();
  324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  325. $ctx1.sendIdx["selectedClass"]=1;
  326. //>>excludeEnd("ctx");
  327. $recv($1)._addInstVarNamed_to_(aString,$2);
  328. $3=$self._announcer();
  329. $5=$recv($globals.HLInstVarAdded)._new();
  330. $recv($5)._theClass_($self._selectedClass());
  331. $recv($5)._variableName_(aString);
  332. $4=$recv($5)._yourself();
  333. $recv($3)._announce_($4);
  334. return self;
  335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  336. }, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},$globals.HLToolModel)});
  337. //>>excludeEnd("ctx");
  338. },
  339. //>>excludeStart("ide", pragmas.excludeIdeData);
  340. args: ["aString"],
  341. 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)",
  342. referencedClasses: ["HLInstVarAdded"],
  343. //>>excludeEnd("ide");
  344. messageSends: ["addInstVarNamed:to:", "environment", "selectedClass", "announce:", "announcer", "theClass:", "new", "variableName:", "yourself"]
  345. }),
  346. $globals.HLToolModel);
  347. $core.addMethod(
  348. $core.method({
  349. selector: "allProtocol",
  350. protocol: "defaults",
  351. fn: function (){
  352. var self=this,$self=this;
  353. return "-- all --";
  354. },
  355. //>>excludeStart("ide", pragmas.excludeIdeData);
  356. args: [],
  357. source: "allProtocol\x0a\x09^ '-- all --'",
  358. referencedClasses: [],
  359. //>>excludeEnd("ide");
  360. messageSends: []
  361. }),
  362. $globals.HLToolModel);
  363. $core.addMethod(
  364. $core.method({
  365. selector: "allSelectors",
  366. protocol: "accessing",
  367. fn: function (){
  368. var self=this,$self=this;
  369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  370. return $core.withContext(function($ctx1) {
  371. //>>excludeEnd("ctx");
  372. return $recv($self._environment())._allSelectors();
  373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  374. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},$globals.HLToolModel)});
  375. //>>excludeEnd("ctx");
  376. },
  377. //>>excludeStart("ide", pragmas.excludeIdeData);
  378. args: [],
  379. source: "allSelectors\x0a\x09^ self environment allSelectors",
  380. referencedClasses: [],
  381. //>>excludeEnd("ide");
  382. messageSends: ["allSelectors", "environment"]
  383. }),
  384. $globals.HLToolModel);
  385. $core.addMethod(
  386. $core.method({
  387. selector: "availableClassNames",
  388. protocol: "accessing",
  389. fn: function (){
  390. var self=this,$self=this;
  391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  392. return $core.withContext(function($ctx1) {
  393. //>>excludeEnd("ctx");
  394. return $recv($self._environment())._availableClassNames();
  395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  396. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},$globals.HLToolModel)});
  397. //>>excludeEnd("ctx");
  398. },
  399. //>>excludeStart("ide", pragmas.excludeIdeData);
  400. args: [],
  401. source: "availableClassNames\x0a\x09^ self environment availableClassNames",
  402. referencedClasses: [],
  403. //>>excludeEnd("ide");
  404. messageSends: ["availableClassNames", "environment"]
  405. }),
  406. $globals.HLToolModel);
  407. $core.addMethod(
  408. $core.method({
  409. selector: "availablePackageNames",
  410. protocol: "accessing",
  411. fn: function (){
  412. var self=this,$self=this;
  413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  414. return $core.withContext(function($ctx1) {
  415. //>>excludeEnd("ctx");
  416. return $recv($self._environment())._availablePackageNames();
  417. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  418. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},$globals.HLToolModel)});
  419. //>>excludeEnd("ctx");
  420. },
  421. //>>excludeStart("ide", pragmas.excludeIdeData);
  422. args: [],
  423. source: "availablePackageNames\x0a\x09^ self environment availablePackageNames",
  424. referencedClasses: [],
  425. //>>excludeEnd("ide");
  426. messageSends: ["availablePackageNames", "environment"]
  427. }),
  428. $globals.HLToolModel);
  429. $core.addMethod(
  430. $core.method({
  431. selector: "availablePackages",
  432. protocol: "accessing",
  433. fn: function (){
  434. var self=this,$self=this;
  435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  436. return $core.withContext(function($ctx1) {
  437. //>>excludeEnd("ctx");
  438. return $recv($self._environment())._availablePackageNames();
  439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  440. }, function($ctx1) {$ctx1.fill(self,"availablePackages",{},$globals.HLToolModel)});
  441. //>>excludeEnd("ctx");
  442. },
  443. //>>excludeStart("ide", pragmas.excludeIdeData);
  444. args: [],
  445. source: "availablePackages\x0a\x09^ self environment availablePackageNames",
  446. referencedClasses: [],
  447. //>>excludeEnd("ide");
  448. messageSends: ["availablePackageNames", "environment"]
  449. }),
  450. $globals.HLToolModel);
  451. $core.addMethod(
  452. $core.method({
  453. selector: "availableProtocols",
  454. protocol: "accessing",
  455. fn: function (){
  456. var self=this,$self=this;
  457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  458. return $core.withContext(function($ctx1) {
  459. //>>excludeEnd("ctx");
  460. return $recv($self._environment())._availableProtocolsFor_($self._selectedClass());
  461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  462. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},$globals.HLToolModel)});
  463. //>>excludeEnd("ctx");
  464. },
  465. //>>excludeStart("ide", pragmas.excludeIdeData);
  466. args: [],
  467. source: "availableProtocols\x0a\x09^ self environment availableProtocolsFor: self selectedClass",
  468. referencedClasses: [],
  469. //>>excludeEnd("ide");
  470. messageSends: ["availableProtocolsFor:", "environment", "selectedClass"]
  471. }),
  472. $globals.HLToolModel);
  473. $core.addMethod(
  474. $core.method({
  475. selector: "commitPackageOnSuccess:onError:",
  476. protocol: "commands actions",
  477. fn: function (aBlock,anotherBlock){
  478. var self=this,$self=this;
  479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  480. return $core.withContext(function($ctx1) {
  481. //>>excludeEnd("ctx");
  482. $recv($self._environment())._commitPackage_onSuccess_onError_($self._packageToCommit(),aBlock,anotherBlock);
  483. return self;
  484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  485. }, function($ctx1) {$ctx1.fill(self,"commitPackageOnSuccess:onError:",{aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLToolModel)});
  486. //>>excludeEnd("ctx");
  487. },
  488. //>>excludeStart("ide", pragmas.excludeIdeData);
  489. args: ["aBlock", "anotherBlock"],
  490. source: "commitPackageOnSuccess: aBlock onError: anotherBlock\x0a\x09self environment \x0a\x09\x09commitPackage: self packageToCommit\x0a\x09\x09onSuccess: aBlock\x0a\x09\x09onError: anotherBlock",
  491. referencedClasses: [],
  492. //>>excludeEnd("ide");
  493. messageSends: ["commitPackage:onSuccess:onError:", "environment", "packageToCommit"]
  494. }),
  495. $globals.HLToolModel);
  496. $core.addMethod(
  497. $core.method({
  498. selector: "compilationProtocol",
  499. protocol: "private",
  500. fn: function (){
  501. var self=this,$self=this;
  502. var currentProtocol;
  503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  504. return $core.withContext(function($ctx1) {
  505. //>>excludeEnd("ctx");
  506. var $1,$2,$3,$receiver;
  507. currentProtocol=$self._selectedProtocol();
  508. $1=currentProtocol;
  509. if(($receiver = $1) == null || $receiver.a$nil){
  510. currentProtocol=$self._unclassifiedProtocol();
  511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  512. $ctx1.sendIdx["unclassifiedProtocol"]=1;
  513. //>>excludeEnd("ctx");
  514. currentProtocol;
  515. } else {
  516. $1;
  517. }
  518. $2=$self._selectedMethod();
  519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  520. $ctx1.sendIdx["selectedMethod"]=1;
  521. //>>excludeEnd("ctx");
  522. if(($receiver = $2) == null || $receiver.a$nil){
  523. $2;
  524. } else {
  525. currentProtocol=$recv($self._selectedMethod())._protocol();
  526. currentProtocol;
  527. }
  528. $3=$recv(currentProtocol).__eq($self._allProtocol());
  529. if($core.assert($3)){
  530. return $self._unclassifiedProtocol();
  531. } else {
  532. return currentProtocol;
  533. }
  534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  535. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},$globals.HLToolModel)});
  536. //>>excludeEnd("ctx");
  537. },
  538. //>>excludeStart("ide", pragmas.excludeIdeData);
  539. args: [],
  540. 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 ]",
  541. referencedClasses: [],
  542. //>>excludeEnd("ide");
  543. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "selectedMethod", "protocol", "ifTrue:ifFalse:", "=", "allProtocol"]
  544. }),
  545. $globals.HLToolModel);
  546. $core.addMethod(
  547. $core.method({
  548. selector: "compileClassComment:",
  549. protocol: "compiling",
  550. fn: function (aString){
  551. var self=this,$self=this;
  552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  553. return $core.withContext(function($ctx1) {
  554. //>>excludeEnd("ctx");
  555. $recv($self._environment())._compileClassComment_for_(aString,$self._selectedClass());
  556. return self;
  557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  558. }, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},$globals.HLToolModel)});
  559. //>>excludeEnd("ctx");
  560. },
  561. //>>excludeStart("ide", pragmas.excludeIdeData);
  562. args: ["aString"],
  563. source: "compileClassComment: aString\x0a\x09self environment \x0a\x09\x09compileClassComment: aString \x0a\x09\x09for: self selectedClass",
  564. referencedClasses: [],
  565. //>>excludeEnd("ide");
  566. messageSends: ["compileClassComment:for:", "environment", "selectedClass"]
  567. }),
  568. $globals.HLToolModel);
  569. $core.addMethod(
  570. $core.method({
  571. selector: "compileClassDefinition:",
  572. protocol: "compiling",
  573. fn: function (aString){
  574. var self=this,$self=this;
  575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  576. return $core.withContext(function($ctx1) {
  577. //>>excludeEnd("ctx");
  578. $recv($self._environment())._compileClassDefinition_(aString);
  579. return self;
  580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  581. }, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},$globals.HLToolModel)});
  582. //>>excludeEnd("ctx");
  583. },
  584. //>>excludeStart("ide", pragmas.excludeIdeData);
  585. args: ["aString"],
  586. source: "compileClassDefinition: aString\x0a\x09self environment compileClassDefinition: aString",
  587. referencedClasses: [],
  588. //>>excludeEnd("ide");
  589. messageSends: ["compileClassDefinition:", "environment"]
  590. }),
  591. $globals.HLToolModel);
  592. $core.addMethod(
  593. $core.method({
  594. selector: "compileMethod:",
  595. protocol: "compiling",
  596. fn: function (aString){
  597. var self=this,$self=this;
  598. var method;
  599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  600. return $core.withContext(function($ctx1) {
  601. //>>excludeEnd("ctx");
  602. $self._withCompileErrorHandling_((function(){
  603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  604. return $core.withContext(function($ctx2) {
  605. //>>excludeEnd("ctx");
  606. method=$recv($self._environment())._compileMethod_for_protocol_(aString,$self._selectedClass(),$self._compilationProtocol());
  607. method;
  608. return $self._selectedMethod_(method);
  609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  610. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  611. //>>excludeEnd("ctx");
  612. }));
  613. return self;
  614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  615. }, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString,method:method},$globals.HLToolModel)});
  616. //>>excludeEnd("ctx");
  617. },
  618. //>>excludeStart("ide", pragmas.excludeIdeData);
  619. args: ["aString"],
  620. 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 ]",
  621. referencedClasses: [],
  622. //>>excludeEnd("ide");
  623. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "environment", "selectedClass", "compilationProtocol", "selectedMethod:"]
  624. }),
  625. $globals.HLToolModel);
  626. $core.addMethod(
  627. $core.method({
  628. selector: "copyClassTo:",
  629. protocol: "commands actions",
  630. fn: function (aClassName){
  631. var self=this,$self=this;
  632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  633. return $core.withContext(function($ctx1) {
  634. //>>excludeEnd("ctx");
  635. var $1;
  636. $self._withChangesDo_((function(){
  637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  638. return $core.withContext(function($ctx2) {
  639. //>>excludeEnd("ctx");
  640. $1=$self._environment();
  641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  642. $ctx2.sendIdx["environment"]=1;
  643. //>>excludeEnd("ctx");
  644. $recv($1)._copyClass_to_($recv($self._selectedClass())._theNonMetaClass(),aClassName);
  645. return $self._selectedClass_($recv($self._environment())._classNamed_(aClassName));
  646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  647. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  648. //>>excludeEnd("ctx");
  649. }));
  650. return self;
  651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  652. }, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  653. //>>excludeEnd("ctx");
  654. },
  655. //>>excludeStart("ide", pragmas.excludeIdeData);
  656. args: ["aClassName"],
  657. 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) ]",
  658. referencedClasses: [],
  659. //>>excludeEnd("ide");
  660. messageSends: ["withChangesDo:", "copyClass:to:", "environment", "theNonMetaClass", "selectedClass", "selectedClass:", "classNamed:"]
  661. }),
  662. $globals.HLToolModel);
  663. $core.addMethod(
  664. $core.method({
  665. selector: "forceSelectedClass:",
  666. protocol: "accessing",
  667. fn: function (aClass){
  668. var self=this,$self=this;
  669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  670. return $core.withContext(function($ctx1) {
  671. //>>excludeEnd("ctx");
  672. $self._withChangesDo_((function(){
  673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  674. return $core.withContext(function($ctx2) {
  675. //>>excludeEnd("ctx");
  676. $self._selectedClass_(nil);
  677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  678. $ctx2.sendIdx["selectedClass:"]=1;
  679. //>>excludeEnd("ctx");
  680. return $self._selectedClass_(aClass);
  681. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  682. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  683. //>>excludeEnd("ctx");
  684. }));
  685. return self;
  686. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  687. }, function($ctx1) {$ctx1.fill(self,"forceSelectedClass:",{aClass:aClass},$globals.HLToolModel)});
  688. //>>excludeEnd("ctx");
  689. },
  690. //>>excludeStart("ide", pragmas.excludeIdeData);
  691. args: ["aClass"],
  692. source: "forceSelectedClass: aClass\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedClass: nil;\x0a\x09\x09\x09selectedClass: aClass ]",
  693. referencedClasses: [],
  694. //>>excludeEnd("ide");
  695. messageSends: ["withChangesDo:", "selectedClass:"]
  696. }),
  697. $globals.HLToolModel);
  698. $core.addMethod(
  699. $core.method({
  700. selector: "forceSelectedMethod:",
  701. protocol: "accessing",
  702. fn: function (aMethod){
  703. var self=this,$self=this;
  704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  705. return $core.withContext(function($ctx1) {
  706. //>>excludeEnd("ctx");
  707. $self._withChangesDo_((function(){
  708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  709. return $core.withContext(function($ctx2) {
  710. //>>excludeEnd("ctx");
  711. $self._selectedMethod_(nil);
  712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  713. $ctx2.sendIdx["selectedMethod:"]=1;
  714. //>>excludeEnd("ctx");
  715. return $self._selectedMethod_(aMethod);
  716. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  717. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  718. //>>excludeEnd("ctx");
  719. }));
  720. return self;
  721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  722. }, function($ctx1) {$ctx1.fill(self,"forceSelectedMethod:",{aMethod:aMethod},$globals.HLToolModel)});
  723. //>>excludeEnd("ctx");
  724. },
  725. //>>excludeStart("ide", pragmas.excludeIdeData);
  726. args: ["aMethod"],
  727. source: "forceSelectedMethod: aMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedMethod: nil;\x0a\x09\x09\x09selectedMethod: aMethod ]",
  728. referencedClasses: [],
  729. //>>excludeEnd("ide");
  730. messageSends: ["withChangesDo:", "selectedMethod:"]
  731. }),
  732. $globals.HLToolModel);
  733. $core.addMethod(
  734. $core.method({
  735. selector: "forceSelectedPackage:",
  736. protocol: "accessing",
  737. fn: function (aPackage){
  738. var self=this,$self=this;
  739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  740. return $core.withContext(function($ctx1) {
  741. //>>excludeEnd("ctx");
  742. $self._withChangesDo_((function(){
  743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  744. return $core.withContext(function($ctx2) {
  745. //>>excludeEnd("ctx");
  746. $self._selectedPackage_(nil);
  747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  748. $ctx2.sendIdx["selectedPackage:"]=1;
  749. //>>excludeEnd("ctx");
  750. return $self._selectedPackage_(aPackage);
  751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  752. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  753. //>>excludeEnd("ctx");
  754. }));
  755. return self;
  756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  757. }, function($ctx1) {$ctx1.fill(self,"forceSelectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  758. //>>excludeEnd("ctx");
  759. },
  760. //>>excludeStart("ide", pragmas.excludeIdeData);
  761. args: ["aPackage"],
  762. source: "forceSelectedPackage: aPackage\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedPackage: nil;\x0a\x09\x09\x09selectedPackage: aPackage ]",
  763. referencedClasses: [],
  764. //>>excludeEnd("ide");
  765. messageSends: ["withChangesDo:", "selectedPackage:"]
  766. }),
  767. $globals.HLToolModel);
  768. $core.addMethod(
  769. $core.method({
  770. selector: "forceSelectedProtocol:",
  771. protocol: "accessing",
  772. fn: function (aProtocol){
  773. var self=this,$self=this;
  774. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  775. return $core.withContext(function($ctx1) {
  776. //>>excludeEnd("ctx");
  777. $self._withChangesDo_((function(){
  778. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  779. return $core.withContext(function($ctx2) {
  780. //>>excludeEnd("ctx");
  781. $self._selectedProtocol_(nil);
  782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  783. $ctx2.sendIdx["selectedProtocol:"]=1;
  784. //>>excludeEnd("ctx");
  785. return $self._selectedProtocol_(aProtocol);
  786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  787. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  788. //>>excludeEnd("ctx");
  789. }));
  790. return self;
  791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  792. }, function($ctx1) {$ctx1.fill(self,"forceSelectedProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  793. //>>excludeEnd("ctx");
  794. },
  795. //>>excludeStart("ide", pragmas.excludeIdeData);
  796. args: ["aProtocol"],
  797. source: "forceSelectedProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedProtocol: nil;\x0a\x09\x09\x09selectedProtocol: aProtocol ]",
  798. referencedClasses: [],
  799. //>>excludeEnd("ide");
  800. messageSends: ["withChangesDo:", "selectedProtocol:"]
  801. }),
  802. $globals.HLToolModel);
  803. $core.addMethod(
  804. $core.method({
  805. selector: "handleCompileError:",
  806. protocol: "error handling",
  807. fn: function (anError){
  808. var self=this,$self=this;
  809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  810. return $core.withContext(function($ctx1) {
  811. //>>excludeEnd("ctx");
  812. var $1,$3,$2;
  813. $1=$self._announcer();
  814. $3=$recv($globals.HLCompileErrorRaised)._new();
  815. $recv($3)._error_(anError);
  816. $2=$recv($3)._yourself();
  817. $recv($1)._announce_($2);
  818. return self;
  819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  820. }, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},$globals.HLToolModel)});
  821. //>>excludeEnd("ctx");
  822. },
  823. //>>excludeStart("ide", pragmas.excludeIdeData);
  824. args: ["anError"],
  825. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  826. referencedClasses: ["HLCompileErrorRaised"],
  827. //>>excludeEnd("ide");
  828. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  829. }),
  830. $globals.HLToolModel);
  831. $core.addMethod(
  832. $core.method({
  833. selector: "handleParseError:",
  834. protocol: "error handling",
  835. fn: function (anError){
  836. var self=this,$self=this;
  837. var split,line,column,messageToInsert;
  838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  839. return $core.withContext(function($ctx1) {
  840. //>>excludeEnd("ctx");
  841. var $1,$3,$2,$4,$6,$7,$5;
  842. split=$recv($recv(anError)._messageText())._tokenize_(" : ");
  843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  844. $ctx1.sendIdx["tokenize:"]=1;
  845. //>>excludeEnd("ctx");
  846. messageToInsert=$recv(split)._second();
  847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  848. $ctx1.sendIdx["second"]=1;
  849. //>>excludeEnd("ctx");
  850. $1=$recv(split)._first();
  851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  852. $ctx1.sendIdx["first"]=1;
  853. //>>excludeEnd("ctx");
  854. $3=$recv(split)._first();
  855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  856. $ctx1.sendIdx["first"]=2;
  857. //>>excludeEnd("ctx");
  858. $2=$recv($3)._size();
  859. split=$recv($1)._copyFrom_to_((21),$2);
  860. split=$recv(split)._tokenize_(" column ");
  861. line=$recv(split)._first();
  862. column=$recv(split)._second();
  863. $4=$self._announcer();
  864. $6=$recv($globals.HLParseErrorRaised)._new();
  865. $7=$recv(line)._asNumber();
  866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  867. $ctx1.sendIdx["asNumber"]=1;
  868. //>>excludeEnd("ctx");
  869. $recv($6)._line_($7);
  870. $recv($6)._column_($recv(column)._asNumber());
  871. $recv($6)._message_(messageToInsert);
  872. $recv($6)._error_(anError);
  873. $5=$recv($6)._yourself();
  874. $recv($4)._announce_($5);
  875. return self;
  876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  877. }, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},$globals.HLToolModel)});
  878. //>>excludeEnd("ctx");
  879. },
  880. //>>excludeStart("ide", pragmas.excludeIdeData);
  881. args: ["anError"],
  882. 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)",
  883. referencedClasses: ["HLParseErrorRaised"],
  884. //>>excludeEnd("ide");
  885. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "first", "size", "announce:", "announcer", "line:", "new", "asNumber", "column:", "message:", "error:", "yourself"]
  886. }),
  887. $globals.HLToolModel);
  888. $core.addMethod(
  889. $core.method({
  890. selector: "handleUnkownVariableError:",
  891. protocol: "error handling",
  892. fn: function (anError){
  893. var self=this,$self=this;
  894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  895. return $core.withContext(function($ctx1) {
  896. //>>excludeEnd("ctx");
  897. var $1,$3,$2;
  898. $1=$self._announcer();
  899. $3=$recv($globals.HLUnknownVariableErrorRaised)._new();
  900. $recv($3)._error_(anError);
  901. $2=$recv($3)._yourself();
  902. $recv($1)._announce_($2);
  903. return self;
  904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  905. }, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},$globals.HLToolModel)});
  906. //>>excludeEnd("ctx");
  907. },
  908. //>>excludeStart("ide", pragmas.excludeIdeData);
  909. args: ["anError"],
  910. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  911. referencedClasses: ["HLUnknownVariableErrorRaised"],
  912. //>>excludeEnd("ide");
  913. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  914. }),
  915. $globals.HLToolModel);
  916. $core.addMethod(
  917. $core.method({
  918. selector: "isToolModel",
  919. protocol: "testing",
  920. fn: function (){
  921. var self=this,$self=this;
  922. return true;
  923. },
  924. //>>excludeStart("ide", pragmas.excludeIdeData);
  925. args: [],
  926. source: "isToolModel\x0a\x09^ true",
  927. referencedClasses: [],
  928. //>>excludeEnd("ide");
  929. messageSends: []
  930. }),
  931. $globals.HLToolModel);
  932. $core.addMethod(
  933. $core.method({
  934. selector: "moveClassToPackage:",
  935. protocol: "commands actions",
  936. fn: function (aPackageName){
  937. var self=this,$self=this;
  938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  939. return $core.withContext(function($ctx1) {
  940. //>>excludeEnd("ctx");
  941. $self._withChangesDo_((function(){
  942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  943. return $core.withContext(function($ctx2) {
  944. //>>excludeEnd("ctx");
  945. return $recv($self._environment())._moveClass_toPackage_($recv($self._selectedClass())._theNonMetaClass(),aPackageName);
  946. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  947. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  948. //>>excludeEnd("ctx");
  949. }));
  950. return self;
  951. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  952. }, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},$globals.HLToolModel)});
  953. //>>excludeEnd("ctx");
  954. },
  955. //>>excludeStart("ide", pragmas.excludeIdeData);
  956. args: ["aPackageName"],
  957. source: "moveClassToPackage: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09toPackage: aPackageName ]",
  958. referencedClasses: [],
  959. //>>excludeEnd("ide");
  960. messageSends: ["withChangesDo:", "moveClass:toPackage:", "environment", "theNonMetaClass", "selectedClass"]
  961. }),
  962. $globals.HLToolModel);
  963. $core.addMethod(
  964. $core.method({
  965. selector: "moveMethodToClass:",
  966. protocol: "commands actions",
  967. fn: function (aClassName){
  968. var self=this,$self=this;
  969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  970. return $core.withContext(function($ctx1) {
  971. //>>excludeEnd("ctx");
  972. $self._withChangesDo_((function(){
  973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  974. return $core.withContext(function($ctx2) {
  975. //>>excludeEnd("ctx");
  976. return $recv($self._environment())._moveMethod_toClass_($self._selectedMethod(),aClassName);
  977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  978. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  979. //>>excludeEnd("ctx");
  980. }));
  981. return self;
  982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  983. }, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},$globals.HLToolModel)});
  984. //>>excludeEnd("ctx");
  985. },
  986. //>>excludeStart("ide", pragmas.excludeIdeData);
  987. args: ["aClassName"],
  988. source: "moveMethodToClass: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toClass: aClassName ]",
  989. referencedClasses: [],
  990. //>>excludeEnd("ide");
  991. messageSends: ["withChangesDo:", "moveMethod:toClass:", "environment", "selectedMethod"]
  992. }),
  993. $globals.HLToolModel);
  994. $core.addMethod(
  995. $core.method({
  996. selector: "moveMethodToProtocol:",
  997. protocol: "commands actions",
  998. fn: function (aProtocol){
  999. var self=this,$self=this;
  1000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1001. return $core.withContext(function($ctx1) {
  1002. //>>excludeEnd("ctx");
  1003. $self._withChangesDo_((function(){
  1004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1005. return $core.withContext(function($ctx2) {
  1006. //>>excludeEnd("ctx");
  1007. return $recv($self._environment())._moveMethod_toProtocol_($self._selectedMethod(),aProtocol);
  1008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1009. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1010. //>>excludeEnd("ctx");
  1011. }));
  1012. return self;
  1013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1014. }, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  1015. //>>excludeEnd("ctx");
  1016. },
  1017. //>>excludeStart("ide", pragmas.excludeIdeData);
  1018. args: ["aProtocol"],
  1019. source: "moveMethodToProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toProtocol: aProtocol ]",
  1020. referencedClasses: [],
  1021. //>>excludeEnd("ide");
  1022. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "environment", "selectedMethod"]
  1023. }),
  1024. $globals.HLToolModel);
  1025. $core.addMethod(
  1026. $core.method({
  1027. selector: "openClassNamed:",
  1028. protocol: "commands actions",
  1029. fn: function (aString){
  1030. var self=this,$self=this;
  1031. var class_;
  1032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1033. return $core.withContext(function($ctx1) {
  1034. //>>excludeEnd("ctx");
  1035. $self._withChangesDo_((function(){
  1036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1037. return $core.withContext(function($ctx2) {
  1038. //>>excludeEnd("ctx");
  1039. class_=$recv($self._environment())._classNamed_(aString);
  1040. class_;
  1041. $self._selectedPackage_($recv(class_)._package());
  1042. return $self._selectedClass_(class_);
  1043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1044. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1045. //>>excludeEnd("ctx");
  1046. }));
  1047. return self;
  1048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1049. }, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},$globals.HLToolModel)});
  1050. //>>excludeEnd("ctx");
  1051. },
  1052. //>>excludeStart("ide", pragmas.excludeIdeData);
  1053. args: ["aString"],
  1054. 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 ]",
  1055. referencedClasses: [],
  1056. //>>excludeEnd("ide");
  1057. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"]
  1058. }),
  1059. $globals.HLToolModel);
  1060. $core.addMethod(
  1061. $core.method({
  1062. selector: "packageToCommit",
  1063. protocol: "accessing",
  1064. fn: function (){
  1065. var self=this,$self=this;
  1066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1067. return $core.withContext(function($ctx1) {
  1068. //>>excludeEnd("ctx");
  1069. var $1,$receiver;
  1070. $1=$self._selectedMethod();
  1071. if(($receiver = $1) == null || $receiver.a$nil){
  1072. return $self._selectedPackage();
  1073. } else {
  1074. var method;
  1075. method=$receiver;
  1076. return $recv(method)._package();
  1077. }
  1078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1079. }, function($ctx1) {$ctx1.fill(self,"packageToCommit",{},$globals.HLToolModel)});
  1080. //>>excludeEnd("ctx");
  1081. },
  1082. //>>excludeStart("ide", pragmas.excludeIdeData);
  1083. args: [],
  1084. 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 ]",
  1085. referencedClasses: [],
  1086. //>>excludeEnd("ide");
  1087. messageSends: ["ifNil:ifNotNil:", "selectedMethod", "selectedPackage", "package"]
  1088. }),
  1089. $globals.HLToolModel);
  1090. $core.addMethod(
  1091. $core.method({
  1092. selector: "packages",
  1093. protocol: "accessing",
  1094. fn: function (){
  1095. var self=this,$self=this;
  1096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1097. return $core.withContext(function($ctx1) {
  1098. //>>excludeEnd("ctx");
  1099. return $recv($self._environment())._packages();
  1100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1101. }, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.HLToolModel)});
  1102. //>>excludeEnd("ctx");
  1103. },
  1104. //>>excludeStart("ide", pragmas.excludeIdeData);
  1105. args: [],
  1106. source: "packages\x0a\x09^ self environment packages",
  1107. referencedClasses: [],
  1108. //>>excludeEnd("ide");
  1109. messageSends: ["packages", "environment"]
  1110. }),
  1111. $globals.HLToolModel);
  1112. $core.addMethod(
  1113. $core.method({
  1114. selector: "removeClass",
  1115. protocol: "commands actions",
  1116. fn: function (){
  1117. var self=this,$self=this;
  1118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1119. return $core.withContext(function($ctx1) {
  1120. //>>excludeEnd("ctx");
  1121. var $1,$5,$4,$3,$2;
  1122. $self._withChangesDo_((function(){
  1123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1124. return $core.withContext(function($ctx2) {
  1125. //>>excludeEnd("ctx");
  1126. $1=$self._manager();
  1127. $5=$self._selectedClass();
  1128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1129. $ctx2.sendIdx["selectedClass"]=1;
  1130. //>>excludeEnd("ctx");
  1131. $4=$recv($5)._theNonMetaClass();
  1132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1133. $ctx2.sendIdx["theNonMetaClass"]=1;
  1134. //>>excludeEnd("ctx");
  1135. $3=$recv($4)._name();
  1136. $2="Do you REALLY want to remove class ".__comma($3);
  1137. return $recv($1)._confirm_ifTrue_($2,(function(){
  1138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1139. return $core.withContext(function($ctx3) {
  1140. //>>excludeEnd("ctx");
  1141. return $recv($self._environment())._removeClass_($recv($self._selectedClass())._theNonMetaClass());
  1142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1143. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1144. //>>excludeEnd("ctx");
  1145. }));
  1146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1147. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1148. //>>excludeEnd("ctx");
  1149. }));
  1150. return self;
  1151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1152. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.HLToolModel)});
  1153. //>>excludeEnd("ctx");
  1154. },
  1155. //>>excludeStart("ide", pragmas.excludeIdeData);
  1156. args: [],
  1157. 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 ] ]",
  1158. referencedClasses: [],
  1159. //>>excludeEnd("ide");
  1160. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "theNonMetaClass", "selectedClass", "removeClass:", "environment"]
  1161. }),
  1162. $globals.HLToolModel);
  1163. $core.addMethod(
  1164. $core.method({
  1165. selector: "removeMethod",
  1166. protocol: "commands actions",
  1167. fn: function (){
  1168. var self=this,$self=this;
  1169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1170. return $core.withContext(function($ctx1) {
  1171. //>>excludeEnd("ctx");
  1172. var $1,$7,$6,$5,$4,$3,$9,$8,$2;
  1173. $self._withChangesDo_((function(){
  1174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1175. return $core.withContext(function($ctx2) {
  1176. //>>excludeEnd("ctx");
  1177. $1=$self._manager();
  1178. $7=$self._selectedMethod();
  1179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1180. $ctx2.sendIdx["selectedMethod"]=1;
  1181. //>>excludeEnd("ctx");
  1182. $6=$recv($7)._methodClass();
  1183. $5=$recv($6)._name();
  1184. $4="Do you REALLY want to remove method ".__comma($5);
  1185. $3=$recv($4).__comma(" >> #");
  1186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1187. $ctx2.sendIdx[","]=2;
  1188. //>>excludeEnd("ctx");
  1189. $9=$self._selectedMethod();
  1190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1191. $ctx2.sendIdx["selectedMethod"]=2;
  1192. //>>excludeEnd("ctx");
  1193. $8=$recv($9)._selector();
  1194. $2=$recv($3).__comma($8);
  1195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1196. $ctx2.sendIdx[","]=1;
  1197. //>>excludeEnd("ctx");
  1198. return $recv($1)._confirm_ifTrue_($2,(function(){
  1199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1200. return $core.withContext(function($ctx3) {
  1201. //>>excludeEnd("ctx");
  1202. return $recv($self._environment())._removeMethod_($self._selectedMethod());
  1203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1204. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1205. //>>excludeEnd("ctx");
  1206. }));
  1207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1208. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1209. //>>excludeEnd("ctx");
  1210. }));
  1211. return self;
  1212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1213. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.HLToolModel)});
  1214. //>>excludeEnd("ctx");
  1215. },
  1216. //>>excludeStart("ide", pragmas.excludeIdeData);
  1217. args: [],
  1218. 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 ] ]",
  1219. referencedClasses: [],
  1220. //>>excludeEnd("ide");
  1221. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "methodClass", "selectedMethod", "selector", "removeMethod:", "environment"]
  1222. }),
  1223. $globals.HLToolModel);
  1224. $core.addMethod(
  1225. $core.method({
  1226. selector: "removeProtocol",
  1227. protocol: "commands actions",
  1228. fn: function (){
  1229. var self=this,$self=this;
  1230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1231. return $core.withContext(function($ctx1) {
  1232. //>>excludeEnd("ctx");
  1233. var $1,$3,$2;
  1234. $self._withChangesDo_((function(){
  1235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1236. return $core.withContext(function($ctx2) {
  1237. //>>excludeEnd("ctx");
  1238. $1=$self._manager();
  1239. $3=$self._selectedProtocol();
  1240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1241. $ctx2.sendIdx["selectedProtocol"]=1;
  1242. //>>excludeEnd("ctx");
  1243. $2="Do you REALLY want to remove protocol ".__comma($3);
  1244. return $recv($1)._confirm_ifTrue_($2,(function(){
  1245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1246. return $core.withContext(function($ctx3) {
  1247. //>>excludeEnd("ctx");
  1248. return $recv($self._environment())._removeProtocol_from_($self._selectedProtocol(),$self._selectedClass());
  1249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1250. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1251. //>>excludeEnd("ctx");
  1252. }));
  1253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1254. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1255. //>>excludeEnd("ctx");
  1256. }));
  1257. return self;
  1258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1259. }, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},$globals.HLToolModel)});
  1260. //>>excludeEnd("ctx");
  1261. },
  1262. //>>excludeStart("ide", pragmas.excludeIdeData);
  1263. args: [],
  1264. 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 ] ]",
  1265. referencedClasses: [],
  1266. //>>excludeEnd("ide");
  1267. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "selectedProtocol", "removeProtocol:from:", "environment", "selectedClass"]
  1268. }),
  1269. $globals.HLToolModel);
  1270. $core.addMethod(
  1271. $core.method({
  1272. selector: "renameClassTo:",
  1273. protocol: "commands actions",
  1274. fn: function (aClassName){
  1275. var self=this,$self=this;
  1276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1277. return $core.withContext(function($ctx1) {
  1278. //>>excludeEnd("ctx");
  1279. $self._withChangesDo_((function(){
  1280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1281. return $core.withContext(function($ctx2) {
  1282. //>>excludeEnd("ctx");
  1283. return $recv($self._environment())._renameClass_to_($recv($self._selectedClass())._theNonMetaClass(),aClassName);
  1284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1285. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1286. //>>excludeEnd("ctx");
  1287. }));
  1288. return self;
  1289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1290. }, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  1291. //>>excludeEnd("ctx");
  1292. },
  1293. //>>excludeStart("ide", pragmas.excludeIdeData);
  1294. args: ["aClassName"],
  1295. source: "renameClassTo: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  1296. referencedClasses: [],
  1297. //>>excludeEnd("ide");
  1298. messageSends: ["withChangesDo:", "renameClass:to:", "environment", "theNonMetaClass", "selectedClass"]
  1299. }),
  1300. $globals.HLToolModel);
  1301. $core.addMethod(
  1302. $core.method({
  1303. selector: "renamePackageTo:",
  1304. protocol: "commands actions",
  1305. fn: function (aPackageName){
  1306. var self=this,$self=this;
  1307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1308. return $core.withContext(function($ctx1) {
  1309. //>>excludeEnd("ctx");
  1310. $self._withChangesDo_((function(){
  1311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1312. return $core.withContext(function($ctx2) {
  1313. //>>excludeEnd("ctx");
  1314. return $recv($self._environment())._renamePackage_to_($recv($self._selectedPackage())._name(),aPackageName);
  1315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1316. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1317. //>>excludeEnd("ctx");
  1318. }));
  1319. return self;
  1320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1321. }, function($ctx1) {$ctx1.fill(self,"renamePackageTo:",{aPackageName:aPackageName},$globals.HLToolModel)});
  1322. //>>excludeEnd("ctx");
  1323. },
  1324. //>>excludeStart("ide", pragmas.excludeIdeData);
  1325. args: ["aPackageName"],
  1326. source: "renamePackageTo: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment\x0a\x09\x09\x09renamePackage: self selectedPackage name\x0a\x09\x09\x09to: aPackageName ]",
  1327. referencedClasses: [],
  1328. //>>excludeEnd("ide");
  1329. messageSends: ["withChangesDo:", "renamePackage:to:", "environment", "name", "selectedPackage"]
  1330. }),
  1331. $globals.HLToolModel);
  1332. $core.addMethod(
  1333. $core.method({
  1334. selector: "renameProtocolTo:",
  1335. protocol: "commands actions",
  1336. fn: function (aString){
  1337. var self=this,$self=this;
  1338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1339. return $core.withContext(function($ctx1) {
  1340. //>>excludeEnd("ctx");
  1341. $self._withChangesDo_((function(){
  1342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1343. return $core.withContext(function($ctx2) {
  1344. //>>excludeEnd("ctx");
  1345. return $recv($self._environment())._renameProtocol_to_in_($self._selectedProtocol(),aString,$self._selectedClass());
  1346. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1347. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1348. //>>excludeEnd("ctx");
  1349. }));
  1350. return self;
  1351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1352. }, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},$globals.HLToolModel)});
  1353. //>>excludeEnd("ctx");
  1354. },
  1355. //>>excludeStart("ide", pragmas.excludeIdeData);
  1356. args: ["aString"],
  1357. 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 ]",
  1358. referencedClasses: [],
  1359. //>>excludeEnd("ide");
  1360. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "environment", "selectedProtocol", "selectedClass"]
  1361. }),
  1362. $globals.HLToolModel);
  1363. $core.addMethod(
  1364. $core.method({
  1365. selector: "save:",
  1366. protocol: "actions",
  1367. fn: function (aString){
  1368. var self=this,$self=this;
  1369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1370. return $core.withContext(function($ctx1) {
  1371. //>>excludeEnd("ctx");
  1372. var $1;
  1373. $recv($self._announcer())._announce_($recv($globals.HLSourceCodeSaved)._new());
  1374. $1=$self._shouldCompileDefinition_(aString);
  1375. if($core.assert($1)){
  1376. $self._compileClassDefinition_(aString);
  1377. } else {
  1378. $self._compileMethod_(aString);
  1379. }
  1380. return self;
  1381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1382. }, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},$globals.HLToolModel)});
  1383. //>>excludeEnd("ctx");
  1384. },
  1385. //>>excludeStart("ide", pragmas.excludeIdeData);
  1386. args: ["aString"],
  1387. 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 ]",
  1388. referencedClasses: ["HLSourceCodeSaved"],
  1389. //>>excludeEnd("ide");
  1390. messageSends: ["announce:", "announcer", "new", "ifTrue:ifFalse:", "shouldCompileDefinition:", "compileClassDefinition:", "compileMethod:"]
  1391. }),
  1392. $globals.HLToolModel);
  1393. $core.addMethod(
  1394. $core.method({
  1395. selector: "saveSourceCode",
  1396. protocol: "actions",
  1397. fn: function (){
  1398. var self=this,$self=this;
  1399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1400. return $core.withContext(function($ctx1) {
  1401. //>>excludeEnd("ctx");
  1402. $recv($self._announcer())._announce_($recv($globals.HLSaveSourceCode)._new());
  1403. return self;
  1404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1405. }, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},$globals.HLToolModel)});
  1406. //>>excludeEnd("ctx");
  1407. },
  1408. //>>excludeStart("ide", pragmas.excludeIdeData);
  1409. args: [],
  1410. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  1411. referencedClasses: ["HLSaveSourceCode"],
  1412. //>>excludeEnd("ide");
  1413. messageSends: ["announce:", "announcer", "new"]
  1414. }),
  1415. $globals.HLToolModel);
  1416. $core.addMethod(
  1417. $core.method({
  1418. selector: "selectedClass",
  1419. protocol: "accessing",
  1420. fn: function (){
  1421. var self=this,$self=this;
  1422. return $self["@selectedClass"];
  1423. },
  1424. //>>excludeStart("ide", pragmas.excludeIdeData);
  1425. args: [],
  1426. source: "selectedClass\x0a\x09^ selectedClass",
  1427. referencedClasses: [],
  1428. //>>excludeEnd("ide");
  1429. messageSends: []
  1430. }),
  1431. $globals.HLToolModel);
  1432. $core.addMethod(
  1433. $core.method({
  1434. selector: "selectedClass:",
  1435. protocol: "accessing",
  1436. fn: function (aClass){
  1437. var self=this,$self=this;
  1438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1439. return $core.withContext(function($ctx1) {
  1440. //>>excludeEnd("ctx");
  1441. var $3,$2,$1,$5,$4,$6,$receiver;
  1442. $3=$self._selectedClass();
  1443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1444. $ctx1.sendIdx["selectedClass"]=1;
  1445. //>>excludeEnd("ctx");
  1446. $2=$recv($3).__eq(aClass);
  1447. $1=$recv($2)._and_((function(){
  1448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1449. return $core.withContext(function($ctx2) {
  1450. //>>excludeEnd("ctx");
  1451. return $recv(aClass)._isNil();
  1452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1453. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1454. //>>excludeEnd("ctx");
  1455. }));
  1456. if($core.assert($1)){
  1457. return self;
  1458. }
  1459. $self._withChangesDo_((function(){
  1460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1461. return $core.withContext(function($ctx2) {
  1462. //>>excludeEnd("ctx");
  1463. if(($receiver = aClass) == null || $receiver.a$nil){
  1464. $self["@selectedClass"]=nil;
  1465. $self["@selectedClass"];
  1466. } else {
  1467. $5=$recv(aClass)._theNonMetaClass();
  1468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1469. $ctx2.sendIdx["theNonMetaClass"]=1;
  1470. //>>excludeEnd("ctx");
  1471. $4=$recv($5)._package();
  1472. $self._selectedPackage_($4);
  1473. $6=$self._showInstance();
  1474. if($core.assert($6)){
  1475. $self["@selectedClass"]=$recv(aClass)._theNonMetaClass();
  1476. $self["@selectedClass"];
  1477. } else {
  1478. $self["@selectedClass"]=$recv(aClass)._theMetaClass();
  1479. $self["@selectedClass"];
  1480. }
  1481. }
  1482. $self["@selectedProtocol"]=nil;
  1483. $self["@selectedProtocol"];
  1484. $self._selectedProtocol_($self._allProtocol());
  1485. return $recv($self._announcer())._announce_($recv($globals.HLClassSelected)._on_($self._selectedClass()));
  1486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1487. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1488. //>>excludeEnd("ctx");
  1489. }));
  1490. return self;
  1491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1492. }, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},$globals.HLToolModel)});
  1493. //>>excludeEnd("ctx");
  1494. },
  1495. //>>excludeStart("ide", pragmas.excludeIdeData);
  1496. args: ["aClass"],
  1497. 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) ]",
  1498. referencedClasses: ["HLClassSelected"],
  1499. //>>excludeEnd("ide");
  1500. messageSends: ["ifTrue:", "and:", "=", "selectedClass", "isNil", "withChangesDo:", "ifNil:ifNotNil:", "selectedPackage:", "package", "theNonMetaClass", "ifTrue:ifFalse:", "showInstance", "theMetaClass", "selectedProtocol:", "allProtocol", "announce:", "announcer", "on:"]
  1501. }),
  1502. $globals.HLToolModel);
  1503. $core.addMethod(
  1504. $core.method({
  1505. selector: "selectedMethod",
  1506. protocol: "accessing",
  1507. fn: function (){
  1508. var self=this,$self=this;
  1509. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1510. return $core.withContext(function($ctx1) {
  1511. //>>excludeEnd("ctx");
  1512. var $1,$receiver;
  1513. $1=$self._selectedClass();
  1514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1515. $ctx1.sendIdx["selectedClass"]=1;
  1516. //>>excludeEnd("ctx");
  1517. if(($receiver = $1) == null || $receiver.a$nil){
  1518. return $1;
  1519. } else {
  1520. return $recv($recv($self._selectedClass())._methodDictionary())._at_ifAbsent_($self["@selectedSelector"],(function(){
  1521. return nil;
  1522. }));
  1523. }
  1524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1525. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},$globals.HLToolModel)});
  1526. //>>excludeEnd("ctx");
  1527. },
  1528. //>>excludeStart("ide", pragmas.excludeIdeData);
  1529. args: [],
  1530. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09ifAbsent: [ nil ] ]",
  1531. referencedClasses: [],
  1532. //>>excludeEnd("ide");
  1533. messageSends: ["ifNotNil:", "selectedClass", "at:ifAbsent:", "methodDictionary"]
  1534. }),
  1535. $globals.HLToolModel);
  1536. $core.addMethod(
  1537. $core.method({
  1538. selector: "selectedMethod:",
  1539. protocol: "accessing",
  1540. fn: function (aCompiledMethod){
  1541. var self=this,$self=this;
  1542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1543. return $core.withContext(function($ctx1) {
  1544. //>>excludeEnd("ctx");
  1545. var $1,$2,$receiver;
  1546. $1=$recv($self["@selectedSelector"]).__eq(aCompiledMethod);
  1547. if($core.assert($1)){
  1548. return self;
  1549. }
  1550. $self._withChangesDo_((function(){
  1551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1552. return $core.withContext(function($ctx2) {
  1553. //>>excludeEnd("ctx");
  1554. if(($receiver = aCompiledMethod) == null || $receiver.a$nil){
  1555. $self["@selectedSelector"]=nil;
  1556. $self["@selectedSelector"];
  1557. } else {
  1558. $self["@selectedSelector"]=$recv(aCompiledMethod)._selector();
  1559. $self["@selectedSelector"];
  1560. $2=$recv($recv($self["@selectedClass"])._notNil())._and_((function(){
  1561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1562. return $core.withContext(function($ctx3) {
  1563. //>>excludeEnd("ctx");
  1564. return $recv($recv($self["@selectedClass"])._methodDictionary())._includesKey_($self["@selectedSelector"]);
  1565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1566. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  1567. //>>excludeEnd("ctx");
  1568. }));
  1569. if(!$core.assert($2)){
  1570. $self["@selectedClass"]=$recv(aCompiledMethod)._methodClass();
  1571. $self["@selectedClass"];
  1572. $self["@selectedPackage"]=$recv($recv($self["@selectedClass"])._theNonMetaClass())._package();
  1573. $self["@selectedPackage"];
  1574. }
  1575. }
  1576. return $recv($self._announcer())._announce_($recv($globals.HLMethodSelected)._on_(aCompiledMethod));
  1577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1578. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1579. //>>excludeEnd("ctx");
  1580. }));
  1581. return self;
  1582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1583. }, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLToolModel)});
  1584. //>>excludeEnd("ctx");
  1585. },
  1586. //>>excludeStart("ide", pragmas.excludeIdeData);
  1587. args: ["aCompiledMethod"],
  1588. 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) ]",
  1589. referencedClasses: ["HLMethodSelected"],
  1590. //>>excludeEnd("ide");
  1591. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "selector", "ifFalse:", "and:", "notNil", "includesKey:", "methodDictionary", "methodClass", "package", "theNonMetaClass", "announce:", "announcer", "on:"]
  1592. }),
  1593. $globals.HLToolModel);
  1594. $core.addMethod(
  1595. $core.method({
  1596. selector: "selectedPackage",
  1597. protocol: "accessing",
  1598. fn: function (){
  1599. var self=this,$self=this;
  1600. return $self["@selectedPackage"];
  1601. },
  1602. //>>excludeStart("ide", pragmas.excludeIdeData);
  1603. args: [],
  1604. source: "selectedPackage\x0a\x09^ selectedPackage",
  1605. referencedClasses: [],
  1606. //>>excludeEnd("ide");
  1607. messageSends: []
  1608. }),
  1609. $globals.HLToolModel);
  1610. $core.addMethod(
  1611. $core.method({
  1612. selector: "selectedPackage:",
  1613. protocol: "accessing",
  1614. fn: function (aPackage){
  1615. var self=this,$self=this;
  1616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1617. return $core.withContext(function($ctx1) {
  1618. //>>excludeEnd("ctx");
  1619. var $1;
  1620. $1=$recv($self["@selectedPackage"]).__eq(aPackage);
  1621. if($core.assert($1)){
  1622. return self;
  1623. }
  1624. $self._withChangesDo_((function(){
  1625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1626. return $core.withContext(function($ctx2) {
  1627. //>>excludeEnd("ctx");
  1628. $self["@selectedPackage"]=aPackage;
  1629. $self["@selectedPackage"];
  1630. $self._selectedClass_(nil);
  1631. return $recv($self._announcer())._announce_($recv($globals.HLPackageSelected)._on_(aPackage));
  1632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1633. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1634. //>>excludeEnd("ctx");
  1635. }));
  1636. return self;
  1637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1638. }, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  1639. //>>excludeEnd("ctx");
  1640. },
  1641. //>>excludeStart("ide", pragmas.excludeIdeData);
  1642. args: ["aPackage"],
  1643. 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) ]",
  1644. referencedClasses: ["HLPackageSelected"],
  1645. //>>excludeEnd("ide");
  1646. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "announcer", "on:"]
  1647. }),
  1648. $globals.HLToolModel);
  1649. $core.addMethod(
  1650. $core.method({
  1651. selector: "selectedProtocol",
  1652. protocol: "accessing",
  1653. fn: function (){
  1654. var self=this,$self=this;
  1655. return $self["@selectedProtocol"];
  1656. },
  1657. //>>excludeStart("ide", pragmas.excludeIdeData);
  1658. args: [],
  1659. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1660. referencedClasses: [],
  1661. //>>excludeEnd("ide");
  1662. messageSends: []
  1663. }),
  1664. $globals.HLToolModel);
  1665. $core.addMethod(
  1666. $core.method({
  1667. selector: "selectedProtocol:",
  1668. protocol: "accessing",
  1669. fn: function (aString){
  1670. var self=this,$self=this;
  1671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1672. return $core.withContext(function($ctx1) {
  1673. //>>excludeEnd("ctx");
  1674. var $1;
  1675. $1=$recv($self["@selectedProtocol"]).__eq(aString);
  1676. if($core.assert($1)){
  1677. return self;
  1678. }
  1679. $self._withChangesDo_((function(){
  1680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1681. return $core.withContext(function($ctx2) {
  1682. //>>excludeEnd("ctx");
  1683. $self["@selectedProtocol"]=aString;
  1684. $self["@selectedProtocol"];
  1685. $self._selectedMethod_(nil);
  1686. return $recv($self._announcer())._announce_($recv($globals.HLProtocolSelected)._on_(aString));
  1687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1688. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1689. //>>excludeEnd("ctx");
  1690. }));
  1691. return self;
  1692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1693. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},$globals.HLToolModel)});
  1694. //>>excludeEnd("ctx");
  1695. },
  1696. //>>excludeStart("ide", pragmas.excludeIdeData);
  1697. args: ["aString"],
  1698. 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) ]",
  1699. referencedClasses: ["HLProtocolSelected"],
  1700. //>>excludeEnd("ide");
  1701. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "announcer", "on:"]
  1702. }),
  1703. $globals.HLToolModel);
  1704. $core.addMethod(
  1705. $core.method({
  1706. selector: "shouldCompileDefinition:",
  1707. protocol: "testing",
  1708. fn: function (aString){
  1709. var self=this,$self=this;
  1710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1711. return $core.withContext(function($ctx1) {
  1712. //>>excludeEnd("ctx");
  1713. return $recv($recv($self._selectedClass())._isNil())._or_((function(){
  1714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1715. return $core.withContext(function($ctx2) {
  1716. //>>excludeEnd("ctx");
  1717. return $recv(aString)._match_("^\x5cs*[A-Z]");
  1718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1719. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1720. //>>excludeEnd("ctx");
  1721. }));
  1722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1723. }, function($ctx1) {$ctx1.fill(self,"shouldCompileDefinition:",{aString:aString},$globals.HLToolModel)});
  1724. //>>excludeEnd("ctx");
  1725. },
  1726. //>>excludeStart("ide", pragmas.excludeIdeData);
  1727. args: ["aString"],
  1728. source: "shouldCompileDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^\x5cs*[A-Z]' ]",
  1729. referencedClasses: [],
  1730. //>>excludeEnd("ide");
  1731. messageSends: ["or:", "isNil", "selectedClass", "match:"]
  1732. }),
  1733. $globals.HLToolModel);
  1734. $core.addMethod(
  1735. $core.method({
  1736. selector: "unclassifiedProtocol",
  1737. protocol: "defaults",
  1738. fn: function (){
  1739. var self=this,$self=this;
  1740. return "as yet unclassified";
  1741. },
  1742. //>>excludeStart("ide", pragmas.excludeIdeData);
  1743. args: [],
  1744. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  1745. referencedClasses: [],
  1746. //>>excludeEnd("ide");
  1747. messageSends: []
  1748. }),
  1749. $globals.HLToolModel);
  1750. $core.addMethod(
  1751. $core.method({
  1752. selector: "withCompileErrorHandling:",
  1753. protocol: "error handling",
  1754. fn: function (aBlock){
  1755. var self=this,$self=this;
  1756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1757. return $core.withContext(function($ctx1) {
  1758. //>>excludeEnd("ctx");
  1759. var $1,$2;
  1760. $1=$self._environment();
  1761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1762. $ctx1.sendIdx["environment"]=1;
  1763. //>>excludeEnd("ctx");
  1764. $recv($1)._evaluate_on_do_((function(){
  1765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1766. return $core.withContext(function($ctx2) {
  1767. //>>excludeEnd("ctx");
  1768. $2=$self._environment();
  1769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1770. $ctx2.sendIdx["environment"]=2;
  1771. //>>excludeEnd("ctx");
  1772. return $recv($2)._evaluate_on_do_((function(){
  1773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1774. return $core.withContext(function($ctx3) {
  1775. //>>excludeEnd("ctx");
  1776. return $recv($self._environment())._evaluate_on_do_(aBlock,$globals.ParseError,(function(ex){
  1777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1778. return $core.withContext(function($ctx4) {
  1779. //>>excludeEnd("ctx");
  1780. return $self._handleParseError_(ex);
  1781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1782. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx3,3)});
  1783. //>>excludeEnd("ctx");
  1784. }));
  1785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1786. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1787. //>>excludeEnd("ctx");
  1788. }),$globals.UnknownVariableError,(function(ex){
  1789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1790. return $core.withContext(function($ctx3) {
  1791. //>>excludeEnd("ctx");
  1792. return $self._handleUnkownVariableError_(ex);
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx2,4)});
  1795. //>>excludeEnd("ctx");
  1796. }));
  1797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1798. $ctx2.sendIdx["evaluate:on:do:"]=2;
  1799. //>>excludeEnd("ctx");
  1800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1801. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1802. //>>excludeEnd("ctx");
  1803. }),$globals.CompilerError,(function(ex){
  1804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1805. return $core.withContext(function($ctx2) {
  1806. //>>excludeEnd("ctx");
  1807. return $self._handleCompileError_(ex);
  1808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1809. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,5)});
  1810. //>>excludeEnd("ctx");
  1811. }));
  1812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1813. $ctx1.sendIdx["evaluate:on:do:"]=1;
  1814. //>>excludeEnd("ctx");
  1815. return self;
  1816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1817. }, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},$globals.HLToolModel)});
  1818. //>>excludeEnd("ctx");
  1819. },
  1820. //>>excludeStart("ide", pragmas.excludeIdeData);
  1821. args: ["aBlock"],
  1822. 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 ]",
  1823. referencedClasses: ["ParseError", "UnknownVariableError", "CompilerError"],
  1824. //>>excludeEnd("ide");
  1825. messageSends: ["evaluate:on:do:", "environment", "handleParseError:", "handleUnkownVariableError:", "handleCompileError:"]
  1826. }),
  1827. $globals.HLToolModel);
  1828. $core.addMethod(
  1829. $core.method({
  1830. selector: "withHelperLabelled:do:",
  1831. protocol: "private",
  1832. fn: function (aString,aBlock){
  1833. var self=this,$self=this;
  1834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1835. return $core.withContext(function($ctx1) {
  1836. //>>excludeEnd("ctx");
  1837. var $1,$3,$2,$4;
  1838. $1="#helper"._asJQuery();
  1839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1840. $ctx1.sendIdx["asJQuery"]=1;
  1841. //>>excludeEnd("ctx");
  1842. $recv($1)._remove();
  1843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1844. $ctx1.sendIdx["remove"]=1;
  1845. //>>excludeEnd("ctx");
  1846. $2=(function(html){
  1847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1848. return $core.withContext(function($ctx2) {
  1849. //>>excludeEnd("ctx");
  1850. $3=$recv(html)._div();
  1851. $recv($3)._id_("helper");
  1852. return $recv($3)._with_(aString);
  1853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1854. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1855. //>>excludeEnd("ctx");
  1856. });
  1857. $4="body"._asJQuery();
  1858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1859. $ctx1.sendIdx["asJQuery"]=2;
  1860. //>>excludeEnd("ctx");
  1861. $recv($2)._appendToJQuery_($4);
  1862. $recv((function(){
  1863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1864. return $core.withContext(function($ctx2) {
  1865. //>>excludeEnd("ctx");
  1866. $recv(aBlock)._value();
  1867. return $recv("#helper"._asJQuery())._remove();
  1868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1869. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1870. //>>excludeEnd("ctx");
  1871. }))._fork();
  1872. return self;
  1873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1874. }, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},$globals.HLToolModel)});
  1875. //>>excludeEnd("ctx");
  1876. },
  1877. //>>excludeStart("ide", pragmas.excludeIdeData);
  1878. args: ["aString", "aBlock"],
  1879. 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",
  1880. referencedClasses: [],
  1881. //>>excludeEnd("ide");
  1882. messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", "fork", "value"]
  1883. }),
  1884. $globals.HLToolModel);
  1885. $core.addMethod(
  1886. $core.method({
  1887. selector: "on:",
  1888. protocol: "actions",
  1889. fn: function (anEnvironment){
  1890. var self=this,$self=this;
  1891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1892. return $core.withContext(function($ctx1) {
  1893. //>>excludeEnd("ctx");
  1894. var $1;
  1895. $1=$self._new();
  1896. $recv($1)._environment_(anEnvironment);
  1897. return $recv($1)._yourself();
  1898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1899. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},$globals.HLToolModel.a$cls)});
  1900. //>>excludeEnd("ctx");
  1901. },
  1902. //>>excludeStart("ide", pragmas.excludeIdeData);
  1903. args: ["anEnvironment"],
  1904. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1905. referencedClasses: [],
  1906. //>>excludeEnd("ide");
  1907. messageSends: ["environment:", "new", "yourself"]
  1908. }),
  1909. $globals.HLToolModel.a$cls);
  1910. $core.addClass("HLProgressHandler", $globals.Object, [], "Helios-Core");
  1911. //>>excludeStart("ide", pragmas.excludeIdeData);
  1912. $globals.HLProgressHandler.comment="I am a specific progress handler for Helios, displaying progresses in a modal window.";
  1913. //>>excludeEnd("ide");
  1914. $core.addMethod(
  1915. $core.method({
  1916. selector: "do:on:displaying:",
  1917. protocol: "progress handling",
  1918. fn: function (aBlock,aCollection,aString){
  1919. var self=this,$self=this;
  1920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1921. return $core.withContext(function($ctx1) {
  1922. //>>excludeEnd("ctx");
  1923. $recv($recv($globals.HLProgressWidget)._default())._do_on_displaying_(aBlock,aCollection,aString);
  1924. return self;
  1925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1926. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.HLProgressHandler)});
  1927. //>>excludeEnd("ctx");
  1928. },
  1929. //>>excludeStart("ide", pragmas.excludeIdeData);
  1930. args: ["aBlock", "aCollection", "aString"],
  1931. source: "do: aBlock on: aCollection displaying: aString\x0a\x09HLProgressWidget default\x0a\x09\x09do: aBlock \x0a\x09\x09on: aCollection \x0a\x09\x09displaying: aString",
  1932. referencedClasses: ["HLProgressWidget"],
  1933. //>>excludeEnd("ide");
  1934. messageSends: ["do:on:displaying:", "default"]
  1935. }),
  1936. $globals.HLProgressHandler);
  1937. $core.addClass("HLWidget", $globals.Widget, ["wrapper"], "Helios-Core");
  1938. //>>excludeStart("ide", pragmas.excludeIdeData);
  1939. $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:`.";
  1940. //>>excludeEnd("ide");
  1941. $core.addMethod(
  1942. $core.method({
  1943. selector: "bindKeyDown:keyUp:",
  1944. protocol: "keybindings",
  1945. fn: function (keyDownBlock,keyUpBlock){
  1946. var self=this,$self=this;
  1947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1948. return $core.withContext(function($ctx1) {
  1949. //>>excludeEnd("ctx");
  1950. var $1,$2,$receiver;
  1951. $1=$self._wrapper();
  1952. if(($receiver = $1) == null || $receiver.a$nil){
  1953. $1;
  1954. } else {
  1955. $2=$self["@wrapper"];
  1956. $recv($2)._onKeyDown_(keyDownBlock);
  1957. $recv($2)._onKeyUp_(keyUpBlock);
  1958. }
  1959. return self;
  1960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1961. }, function($ctx1) {$ctx1.fill(self,"bindKeyDown:keyUp:",{keyDownBlock:keyDownBlock,keyUpBlock:keyUpBlock},$globals.HLWidget)});
  1962. //>>excludeEnd("ctx");
  1963. },
  1964. //>>excludeStart("ide", pragmas.excludeIdeData);
  1965. args: ["keyDownBlock", "keyUpBlock"],
  1966. source: "bindKeyDown: keyDownBlock keyUp: keyUpBlock\x0a\x09self wrapper ifNotNil: [ wrapper\x0a\x09\x09onKeyDown: keyDownBlock;\x0a\x09\x09onKeyUp: keyUpBlock ]",
  1967. referencedClasses: [],
  1968. //>>excludeEnd("ide");
  1969. messageSends: ["ifNotNil:", "wrapper", "onKeyDown:", "onKeyUp:"]
  1970. }),
  1971. $globals.HLWidget);
  1972. $core.addMethod(
  1973. $core.method({
  1974. selector: "canHaveFocus",
  1975. protocol: "testing",
  1976. fn: function (){
  1977. var self=this,$self=this;
  1978. return false;
  1979. },
  1980. //>>excludeStart("ide", pragmas.excludeIdeData);
  1981. args: [],
  1982. source: "canHaveFocus\x0a\x09^ false",
  1983. referencedClasses: [],
  1984. //>>excludeEnd("ide");
  1985. messageSends: []
  1986. }),
  1987. $globals.HLWidget);
  1988. $core.addMethod(
  1989. $core.method({
  1990. selector: "confirm:ifTrue:",
  1991. protocol: "actions",
  1992. fn: function (aString,aBlock){
  1993. var self=this,$self=this;
  1994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1995. return $core.withContext(function($ctx1) {
  1996. //>>excludeEnd("ctx");
  1997. $recv($self._manager())._confirm_ifTrue_(aString,aBlock);
  1998. return self;
  1999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2000. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2001. //>>excludeEnd("ctx");
  2002. },
  2003. //>>excludeStart("ide", pragmas.excludeIdeData);
  2004. args: ["aString", "aBlock"],
  2005. source: "confirm: aString ifTrue: aBlock\x0a\x09self manager confirm: aString ifTrue: aBlock",
  2006. referencedClasses: [],
  2007. //>>excludeEnd("ide");
  2008. messageSends: ["confirm:ifTrue:", "manager"]
  2009. }),
  2010. $globals.HLWidget);
  2011. $core.addMethod(
  2012. $core.method({
  2013. selector: "confirm:ifTrue:ifFalse:",
  2014. protocol: "actions",
  2015. fn: function (aString,aBlock,anotherBlock){
  2016. var self=this,$self=this;
  2017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2018. return $core.withContext(function($ctx1) {
  2019. //>>excludeEnd("ctx");
  2020. $recv($self._manager())._confirm_ifTrue_ifFalse_(aString,aBlock,anotherBlock);
  2021. return self;
  2022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2023. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLWidget)});
  2024. //>>excludeEnd("ctx");
  2025. },
  2026. //>>excludeStart("ide", pragmas.excludeIdeData);
  2027. args: ["aString", "aBlock", "anotherBlock"],
  2028. source: "confirm: aString ifTrue: aBlock ifFalse: anotherBlock\x0a\x09self manager \x0a\x09\x09confirm: aString \x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: anotherBlock",
  2029. referencedClasses: [],
  2030. //>>excludeEnd("ide");
  2031. messageSends: ["confirm:ifTrue:ifFalse:", "manager"]
  2032. }),
  2033. $globals.HLWidget);
  2034. $core.addMethod(
  2035. $core.method({
  2036. selector: "cssClass",
  2037. protocol: "accessing",
  2038. fn: function (){
  2039. var self=this,$self=this;
  2040. return "hl_widget";
  2041. },
  2042. //>>excludeStart("ide", pragmas.excludeIdeData);
  2043. args: [],
  2044. source: "cssClass\x0a\x09^ 'hl_widget'",
  2045. referencedClasses: [],
  2046. //>>excludeEnd("ide");
  2047. messageSends: []
  2048. }),
  2049. $globals.HLWidget);
  2050. $core.addMethod(
  2051. $core.method({
  2052. selector: "defaultTabLabel",
  2053. protocol: "defaults",
  2054. fn: function (){
  2055. var self=this,$self=this;
  2056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2057. return $core.withContext(function($ctx1) {
  2058. //>>excludeEnd("ctx");
  2059. return $recv($self._class())._tabLabel();
  2060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2061. }, function($ctx1) {$ctx1.fill(self,"defaultTabLabel",{},$globals.HLWidget)});
  2062. //>>excludeEnd("ctx");
  2063. },
  2064. //>>excludeStart("ide", pragmas.excludeIdeData);
  2065. args: [],
  2066. source: "defaultTabLabel\x0a\x09^ self class tabLabel",
  2067. referencedClasses: [],
  2068. //>>excludeEnd("ide");
  2069. messageSends: ["tabLabel", "class"]
  2070. }),
  2071. $globals.HLWidget);
  2072. $core.addMethod(
  2073. $core.method({
  2074. selector: "execute:",
  2075. protocol: "actions",
  2076. fn: function(aCommand){
  2077. var self=this,$self=this;
  2078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2079. return $core.withContext(function($ctx1) {
  2080. //>>excludeEnd("ctx");
  2081. var $1,$2;
  2082. $1=$recv($recv($globals.HLManager)._current())._keyBinder();
  2083. $recv($1)._activate();
  2084. $recv($1)._applyBinding_($recv(aCommand)._asBinding());
  2085. $2=$recv($globals.HLShortcutSuggestionWidget)._new();
  2086. $recv($2)._command_(aCommand);
  2087. $recv($2)._show();
  2088. return self;
  2089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2090. }, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},$globals.HLWidget)});
  2091. //>>excludeEnd("ctx");
  2092. },
  2093. //>>excludeStart("ide", pragmas.excludeIdeData);
  2094. args: ["aCommand"],
  2095. source: "execute: aCommand\x0a\x09HLManager current keyBinder\x0a\x09\x09activate;\x0a\x09\x09applyBinding: aCommand asBinding.\x0a\x0a\x09(HLShortcutSuggestionWidget new)\x0a\x09\x09command: aCommand;\x0a\x09\x09show.",
  2096. referencedClasses: ["HLManager", "HLShortcutSuggestionWidget"],
  2097. //>>excludeEnd("ide");
  2098. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding", "command:", "new", "show"]
  2099. }),
  2100. $globals.HLWidget);
  2101. $core.addMethod(
  2102. $core.method({
  2103. selector: "inform:",
  2104. protocol: "actions",
  2105. fn: function (aString){
  2106. var self=this,$self=this;
  2107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2108. return $core.withContext(function($ctx1) {
  2109. //>>excludeEnd("ctx");
  2110. $recv($self._manager())._inform_(aString);
  2111. return self;
  2112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2113. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLWidget)});
  2114. //>>excludeEnd("ctx");
  2115. },
  2116. //>>excludeStart("ide", pragmas.excludeIdeData);
  2117. args: ["aString"],
  2118. source: "inform: aString\x0a\x09self manager inform: aString",
  2119. referencedClasses: [],
  2120. //>>excludeEnd("ide");
  2121. messageSends: ["inform:", "manager"]
  2122. }),
  2123. $globals.HLWidget);
  2124. $core.addMethod(
  2125. $core.method({
  2126. selector: "manager",
  2127. protocol: "accessing",
  2128. fn: function (){
  2129. var self=this,$self=this;
  2130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2131. return $core.withContext(function($ctx1) {
  2132. //>>excludeEnd("ctx");
  2133. return $recv($globals.HLManager)._current();
  2134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2135. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLWidget)});
  2136. //>>excludeEnd("ctx");
  2137. },
  2138. //>>excludeStart("ide", pragmas.excludeIdeData);
  2139. args: [],
  2140. source: "manager\x0a\x09^ HLManager current",
  2141. referencedClasses: ["HLManager"],
  2142. //>>excludeEnd("ide");
  2143. messageSends: ["current"]
  2144. }),
  2145. $globals.HLWidget);
  2146. $core.addMethod(
  2147. $core.method({
  2148. selector: "openAsTab",
  2149. protocol: "actions",
  2150. fn: function (){
  2151. var self=this,$self=this;
  2152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2153. return $core.withContext(function($ctx1) {
  2154. //>>excludeEnd("ctx");
  2155. $recv($recv($globals.HLTabWidget)._on_labelled_(self,$self._defaultTabLabel()))._add();
  2156. return self;
  2157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2158. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{},$globals.HLWidget)});
  2159. //>>excludeEnd("ctx");
  2160. },
  2161. //>>excludeStart("ide", pragmas.excludeIdeData);
  2162. args: [],
  2163. source: "openAsTab\x0a\x09(HLTabWidget on: self labelled: self defaultTabLabel)\x0a\x09\x09add",
  2164. referencedClasses: ["HLTabWidget"],
  2165. //>>excludeEnd("ide");
  2166. messageSends: ["add", "on:labelled:", "defaultTabLabel"]
  2167. }),
  2168. $globals.HLWidget);
  2169. $core.addMethod(
  2170. $core.method({
  2171. selector: "refresh",
  2172. protocol: "updating",
  2173. fn: function (){
  2174. var self=this,$self=this;
  2175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2176. return $core.withContext(function($ctx1) {
  2177. //>>excludeEnd("ctx");
  2178. var $1,$receiver;
  2179. $1=$self._wrapper();
  2180. if(($receiver = $1) == null || $receiver.a$nil){
  2181. $1;
  2182. } else {
  2183. var wrap;
  2184. wrap=$receiver;
  2185. $recv(wrap)._contents_((function(html){
  2186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2187. return $core.withContext(function($ctx2) {
  2188. //>>excludeEnd("ctx");
  2189. return $self._renderContentOn_(html);
  2190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2191. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)});
  2192. //>>excludeEnd("ctx");
  2193. }));
  2194. }
  2195. return self;
  2196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2197. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLWidget)});
  2198. //>>excludeEnd("ctx");
  2199. },
  2200. //>>excludeStart("ide", pragmas.excludeIdeData);
  2201. args: [],
  2202. source: "refresh\x0a\x09self wrapper\x0a\x09\x09ifNotNil: [ :wrap | wrap contents: [ :html | self renderContentOn: html ] ]",
  2203. referencedClasses: [],
  2204. //>>excludeEnd("ide");
  2205. messageSends: ["ifNotNil:", "wrapper", "contents:", "renderContentOn:"]
  2206. }),
  2207. $globals.HLWidget);
  2208. $core.addMethod(
  2209. $core.method({
  2210. selector: "registerBindings",
  2211. protocol: "keybindings",
  2212. fn: function (){
  2213. var self=this,$self=this;
  2214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2215. return $core.withContext(function($ctx1) {
  2216. //>>excludeEnd("ctx");
  2217. $self._registerBindingsOn_($recv($recv($self._manager())._keyBinder())._bindings());
  2218. return self;
  2219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2220. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLWidget)});
  2221. //>>excludeEnd("ctx");
  2222. },
  2223. //>>excludeStart("ide", pragmas.excludeIdeData);
  2224. args: [],
  2225. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  2226. referencedClasses: [],
  2227. //>>excludeEnd("ide");
  2228. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]
  2229. }),
  2230. $globals.HLWidget);
  2231. $core.addMethod(
  2232. $core.method({
  2233. selector: "registerBindingsOn:",
  2234. protocol: "keybindings",
  2235. fn: function (aBindingGroup){
  2236. var self=this,$self=this;
  2237. return self;
  2238. },
  2239. //>>excludeStart("ide", pragmas.excludeIdeData);
  2240. args: ["aBindingGroup"],
  2241. source: "registerBindingsOn: aBindingGroup",
  2242. referencedClasses: [],
  2243. //>>excludeEnd("ide");
  2244. messageSends: []
  2245. }),
  2246. $globals.HLWidget);
  2247. $core.addMethod(
  2248. $core.method({
  2249. selector: "removeTab",
  2250. protocol: "accessing",
  2251. fn: function (){
  2252. var self=this,$self=this;
  2253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2254. return $core.withContext(function($ctx1) {
  2255. //>>excludeEnd("ctx");
  2256. $recv($self._manager())._removeTabForWidget_(self);
  2257. return self;
  2258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2259. }, function($ctx1) {$ctx1.fill(self,"removeTab",{},$globals.HLWidget)});
  2260. //>>excludeEnd("ctx");
  2261. },
  2262. //>>excludeStart("ide", pragmas.excludeIdeData);
  2263. args: [],
  2264. source: "removeTab\x0a\x09self manager removeTabForWidget: self",
  2265. referencedClasses: [],
  2266. //>>excludeEnd("ide");
  2267. messageSends: ["removeTabForWidget:", "manager"]
  2268. }),
  2269. $globals.HLWidget);
  2270. $core.addMethod(
  2271. $core.method({
  2272. selector: "renderContentOn:",
  2273. protocol: "rendering",
  2274. fn: function (html){
  2275. var self=this,$self=this;
  2276. return self;
  2277. },
  2278. //>>excludeStart("ide", pragmas.excludeIdeData);
  2279. args: ["html"],
  2280. source: "renderContentOn: html",
  2281. referencedClasses: [],
  2282. //>>excludeEnd("ide");
  2283. messageSends: []
  2284. }),
  2285. $globals.HLWidget);
  2286. $core.addMethod(
  2287. $core.method({
  2288. selector: "renderOn:",
  2289. protocol: "rendering",
  2290. fn: function (html){
  2291. var self=this,$self=this;
  2292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2293. return $core.withContext(function($ctx1) {
  2294. //>>excludeEnd("ctx");
  2295. var $1;
  2296. $1=$recv(html)._div();
  2297. $recv($1)._class_($self._cssClass());
  2298. $self["@wrapper"]=$recv($1)._yourself();
  2299. $recv($self["@wrapper"])._with_((function(){
  2300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2301. return $core.withContext(function($ctx2) {
  2302. //>>excludeEnd("ctx");
  2303. return $self._renderContentOn_(html);
  2304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2305. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2306. //>>excludeEnd("ctx");
  2307. }));
  2308. return self;
  2309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2310. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLWidget)});
  2311. //>>excludeEnd("ctx");
  2312. },
  2313. //>>excludeStart("ide", pragmas.excludeIdeData);
  2314. args: ["html"],
  2315. 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 ]",
  2316. referencedClasses: [],
  2317. //>>excludeEnd("ide");
  2318. messageSends: ["class:", "div", "cssClass", "yourself", "with:", "renderContentOn:"]
  2319. }),
  2320. $globals.HLWidget);
  2321. $core.addMethod(
  2322. $core.method({
  2323. selector: "request:do:",
  2324. protocol: "actions",
  2325. fn: function (aString,aBlock){
  2326. var self=this,$self=this;
  2327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2328. return $core.withContext(function($ctx1) {
  2329. //>>excludeEnd("ctx");
  2330. $recv($self._manager())._request_do_(aString,aBlock);
  2331. return self;
  2332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2333. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2334. //>>excludeEnd("ctx");
  2335. },
  2336. //>>excludeStart("ide", pragmas.excludeIdeData);
  2337. args: ["aString", "aBlock"],
  2338. source: "request: aString do: aBlock\x0a\x09self manager request: aString do: aBlock",
  2339. referencedClasses: [],
  2340. //>>excludeEnd("ide");
  2341. messageSends: ["request:do:", "manager"]
  2342. }),
  2343. $globals.HLWidget);
  2344. $core.addMethod(
  2345. $core.method({
  2346. selector: "request:value:do:",
  2347. protocol: "actions",
  2348. fn: function (aString,valueString,aBlock){
  2349. var self=this,$self=this;
  2350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2351. return $core.withContext(function($ctx1) {
  2352. //>>excludeEnd("ctx");
  2353. $recv($self._manager())._request_value_do_(aString,valueString,aBlock);
  2354. return self;
  2355. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2356. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLWidget)});
  2357. //>>excludeEnd("ctx");
  2358. },
  2359. //>>excludeStart("ide", pragmas.excludeIdeData);
  2360. args: ["aString", "valueString", "aBlock"],
  2361. source: "request: aString value: valueString do: aBlock\x0a\x09self manager \x0a\x09\x09request: aString \x0a\x09\x09value: valueString\x0a\x09\x09do: aBlock",
  2362. referencedClasses: [],
  2363. //>>excludeEnd("ide");
  2364. messageSends: ["request:value:do:", "manager"]
  2365. }),
  2366. $globals.HLWidget);
  2367. $core.addMethod(
  2368. $core.method({
  2369. selector: "setTabLabel:",
  2370. protocol: "accessing",
  2371. fn: function (aString){
  2372. var self=this,$self=this;
  2373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2374. return $core.withContext(function($ctx1) {
  2375. //>>excludeEnd("ctx");
  2376. var $1,$3,$2;
  2377. $1=$recv($self._manager())._announcer();
  2378. $3=$recv($globals.HLTabLabelChanged)._new();
  2379. $recv($3)._widget_(self);
  2380. $recv($3)._label_(aString);
  2381. $2=$recv($3)._yourself();
  2382. $recv($1)._announce_($2);
  2383. return self;
  2384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2385. }, function($ctx1) {$ctx1.fill(self,"setTabLabel:",{aString:aString},$globals.HLWidget)});
  2386. //>>excludeEnd("ctx");
  2387. },
  2388. //>>excludeStart("ide", pragmas.excludeIdeData);
  2389. args: ["aString"],
  2390. source: "setTabLabel: aString\x0a\x09self manager announcer announce: (HLTabLabelChanged new\x0a\x09\x09widget: self;\x0a\x09\x09label: aString;\x0a\x09\x09yourself)",
  2391. referencedClasses: ["HLTabLabelChanged"],
  2392. //>>excludeEnd("ide");
  2393. messageSends: ["announce:", "announcer", "manager", "widget:", "new", "label:", "yourself"]
  2394. }),
  2395. $globals.HLWidget);
  2396. $core.addMethod(
  2397. $core.method({
  2398. selector: "tabClass",
  2399. protocol: "accessing",
  2400. fn: function (){
  2401. var self=this,$self=this;
  2402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2403. return $core.withContext(function($ctx1) {
  2404. //>>excludeEnd("ctx");
  2405. return $recv($self._class())._tabClass();
  2406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2407. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},$globals.HLWidget)});
  2408. //>>excludeEnd("ctx");
  2409. },
  2410. //>>excludeStart("ide", pragmas.excludeIdeData);
  2411. args: [],
  2412. source: "tabClass\x0a\x09^ self class tabClass",
  2413. referencedClasses: [],
  2414. //>>excludeEnd("ide");
  2415. messageSends: ["tabClass", "class"]
  2416. }),
  2417. $globals.HLWidget);
  2418. $core.addMethod(
  2419. $core.method({
  2420. selector: "unbindKeyDownKeyUp",
  2421. protocol: "keybindings",
  2422. fn: function (){
  2423. var self=this,$self=this;
  2424. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2425. return $core.withContext(function($ctx1) {
  2426. //>>excludeEnd("ctx");
  2427. var $1;
  2428. $1=$recv($self._wrapper())._asJQuery();
  2429. $recv($1)._unbind_("keydown");
  2430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2431. $ctx1.sendIdx["unbind:"]=1;
  2432. //>>excludeEnd("ctx");
  2433. $recv($1)._unbind_("keyup");
  2434. return self;
  2435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2436. }, function($ctx1) {$ctx1.fill(self,"unbindKeyDownKeyUp",{},$globals.HLWidget)});
  2437. //>>excludeEnd("ctx");
  2438. },
  2439. //>>excludeStart("ide", pragmas.excludeIdeData);
  2440. args: [],
  2441. source: "unbindKeyDownKeyUp\x0a\x09self wrapper asJQuery\x0a\x09\x09unbind: 'keydown';\x0a\x09\x09unbind: 'keyup'",
  2442. referencedClasses: [],
  2443. //>>excludeEnd("ide");
  2444. messageSends: ["unbind:", "asJQuery", "wrapper"]
  2445. }),
  2446. $globals.HLWidget);
  2447. $core.addMethod(
  2448. $core.method({
  2449. selector: "unregister",
  2450. protocol: "actions",
  2451. fn: function (){
  2452. var self=this,$self=this;
  2453. return self;
  2454. },
  2455. //>>excludeStart("ide", pragmas.excludeIdeData);
  2456. args: [],
  2457. 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",
  2458. referencedClasses: [],
  2459. //>>excludeEnd("ide");
  2460. messageSends: []
  2461. }),
  2462. $globals.HLWidget);
  2463. $core.addMethod(
  2464. $core.method({
  2465. selector: "wrapper",
  2466. protocol: "accessing",
  2467. fn: function (){
  2468. var self=this,$self=this;
  2469. return $self["@wrapper"];
  2470. },
  2471. //>>excludeStart("ide", pragmas.excludeIdeData);
  2472. args: [],
  2473. source: "wrapper\x0a\x09^ wrapper",
  2474. referencedClasses: [],
  2475. //>>excludeEnd("ide");
  2476. messageSends: []
  2477. }),
  2478. $globals.HLWidget);
  2479. $core.addMethod(
  2480. $core.method({
  2481. selector: "canBeOpenAsTab",
  2482. protocol: "testing",
  2483. fn: function (){
  2484. var self=this,$self=this;
  2485. return false;
  2486. },
  2487. //>>excludeStart("ide", pragmas.excludeIdeData);
  2488. args: [],
  2489. source: "canBeOpenAsTab\x0a\x09^ false",
  2490. referencedClasses: [],
  2491. //>>excludeEnd("ide");
  2492. messageSends: []
  2493. }),
  2494. $globals.HLWidget.a$cls);
  2495. $core.addMethod(
  2496. $core.method({
  2497. selector: "openAsTab",
  2498. protocol: "accessing",
  2499. fn: function (){
  2500. var self=this,$self=this;
  2501. var instance;
  2502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2503. return $core.withContext(function($ctx1) {
  2504. //>>excludeEnd("ctx");
  2505. instance=$self._new();
  2506. $recv($recv($globals.HLTabWidget)._on_labelled_(instance,$recv(instance)._defaultTabLabel()))._add();
  2507. return instance;
  2508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2509. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{instance:instance},$globals.HLWidget.a$cls)});
  2510. //>>excludeEnd("ctx");
  2511. },
  2512. //>>excludeStart("ide", pragmas.excludeIdeData);
  2513. args: [],
  2514. 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",
  2515. referencedClasses: ["HLTabWidget"],
  2516. //>>excludeEnd("ide");
  2517. messageSends: ["new", "add", "on:labelled:", "defaultTabLabel"]
  2518. }),
  2519. $globals.HLWidget.a$cls);
  2520. $core.addMethod(
  2521. $core.method({
  2522. selector: "tabClass",
  2523. protocol: "accessing",
  2524. fn: function (){
  2525. var self=this,$self=this;
  2526. return "";
  2527. },
  2528. //>>excludeStart("ide", pragmas.excludeIdeData);
  2529. args: [],
  2530. source: "tabClass\x0a\x09^ ''",
  2531. referencedClasses: [],
  2532. //>>excludeEnd("ide");
  2533. messageSends: []
  2534. }),
  2535. $globals.HLWidget.a$cls);
  2536. $core.addMethod(
  2537. $core.method({
  2538. selector: "tabLabel",
  2539. protocol: "accessing",
  2540. fn: function (){
  2541. var self=this,$self=this;
  2542. return "Tab";
  2543. },
  2544. //>>excludeStart("ide", pragmas.excludeIdeData);
  2545. args: [],
  2546. source: "tabLabel\x0a\x09^ 'Tab'",
  2547. referencedClasses: [],
  2548. //>>excludeEnd("ide");
  2549. messageSends: []
  2550. }),
  2551. $globals.HLWidget.a$cls);
  2552. $core.addMethod(
  2553. $core.method({
  2554. selector: "tabPriority",
  2555. protocol: "accessing",
  2556. fn: function (){
  2557. var self=this,$self=this;
  2558. return (500);
  2559. },
  2560. //>>excludeStart("ide", pragmas.excludeIdeData);
  2561. args: [],
  2562. source: "tabPriority\x0a\x09^ 500",
  2563. referencedClasses: [],
  2564. //>>excludeEnd("ide");
  2565. messageSends: []
  2566. }),
  2567. $globals.HLWidget.a$cls);
  2568. $core.addClass("HLContextMenuWidget", $globals.HLWidget, ["commands"], "Helios-Core");
  2569. $core.addMethod(
  2570. $core.method({
  2571. selector: "bindToElement:",
  2572. protocol: "as yet unclassified",
  2573. fn: function(anElement){
  2574. var self=this,$self=this;
  2575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2576. return $core.withContext(function($ctx1) {
  2577. //>>excludeEnd("ctx");
  2578. var $1;
  2579. $1=$recv(anElement)._asDomNode();
  2580. $recv($1)._setAttribute_put_("data-toggle","dropdown");
  2581. $recv($1)._addEventListener_do_("contextmenu",(function(evt){
  2582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2583. return $core.withContext(function($ctx2) {
  2584. //>>excludeEnd("ctx");
  2585. $recv(evt)._preventDefault();
  2586. return $self._openForEvent_(evt);
  2587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2588. }, function($ctx2) {$ctx2.fillBlock({evt:evt},$ctx1,1)});
  2589. //>>excludeEnd("ctx");
  2590. }));
  2591. return self;
  2592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2593. }, function($ctx1) {$ctx1.fill(self,"bindToElement:",{anElement:anElement},$globals.HLContextMenuWidget)});
  2594. //>>excludeEnd("ctx");
  2595. },
  2596. //>>excludeStart("ide", pragmas.excludeIdeData);
  2597. args: ["anElement"],
  2598. source: "bindToElement: anElement\x0a\x09anElement asDomNode\x0a\x09\x09setAttribute: 'data-toggle' put: 'dropdown';\x0a\x09\x09addEventListener: 'contextmenu' do: [ :evt |\x0a\x09\x09\x09evt preventDefault.\x0a\x09\x09\x09self openForEvent: evt\x0a\x09\x09]",
  2599. referencedClasses: [],
  2600. //>>excludeEnd("ide");
  2601. messageSends: ["setAttribute:put:", "asDomNode", "addEventListener:do:", "preventDefault", "openForEvent:"]
  2602. }),
  2603. $globals.HLContextMenuWidget);
  2604. $core.addMethod(
  2605. $core.method({
  2606. selector: "openForEvent:",
  2607. protocol: "as yet unclassified",
  2608. fn: function(anEvent){
  2609. var self=this,$self=this;
  2610. var rect,x,y;
  2611. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2612. return $core.withContext(function($ctx1) {
  2613. //>>excludeEnd("ctx");
  2614. var $4,$3,$2,$1,$5;
  2615. x=$recv(anEvent)._clientX();
  2616. y=$recv(anEvent)._clientY();
  2617. $4=$self._wrapper();
  2618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2619. $ctx1.sendIdx["wrapper"]=1;
  2620. //>>excludeEnd("ctx");
  2621. $3=$recv($4)._asDomNode();
  2622. $2=$recv($3)._querySelector_(".dropdown-menu");
  2623. $1=$recv($2)._style();
  2624. $5=$recv(x).__comma("px");
  2625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2626. $ctx1.sendIdx[","]=1;
  2627. //>>excludeEnd("ctx");
  2628. $recv($1)._left_($5);
  2629. $recv($1)._top_($recv(y).__comma("px"));
  2630. $recv($recv($recv($self._wrapper())._asJQuery())._dropdown())._toggle();
  2631. return self;
  2632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2633. }, function($ctx1) {$ctx1.fill(self,"openForEvent:",{anEvent:anEvent,rect:rect,x:x,y:y},$globals.HLContextMenuWidget)});
  2634. //>>excludeEnd("ctx");
  2635. },
  2636. //>>excludeStart("ide", pragmas.excludeIdeData);
  2637. args: ["anEvent"],
  2638. source: "openForEvent: anEvent\x0a\x09| rect x y |\x0a\x09x := anEvent clientX.\x0a\x09y := anEvent clientY.\x0a\x09(self wrapper asDomNode querySelector: '.dropdown-menu') style\x0a\x09\x09left: x, 'px';\x0a\x09\x09top: y, 'px'.\x0a\x09self wrapper asJQuery dropdown toggle",
  2639. referencedClasses: [],
  2640. //>>excludeEnd("ide");
  2641. messageSends: ["clientX", "clientY", "left:", "style", "querySelector:", "asDomNode", "wrapper", ",", "top:", "toggle", "dropdown", "asJQuery"]
  2642. }),
  2643. $globals.HLContextMenuWidget);
  2644. $core.addMethod(
  2645. $core.method({
  2646. selector: "renderContentOn:",
  2647. protocol: "as yet unclassified",
  2648. fn: function (html){
  2649. var self=this,$self=this;
  2650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2651. return $core.withContext(function($ctx1) {
  2652. //>>excludeEnd("ctx");
  2653. var $1,$2;
  2654. $1=$recv(html)._ul();
  2655. $recv($1)._class_("dropdown-menu");
  2656. $recv($1)._style_("position: fixed");
  2657. $recv($1)._width_((function(){
  2658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2659. return $core.withContext(function($ctx2) {
  2660. //>>excludeEnd("ctx");
  2661. return $recv($recv(html)._li())._with_((function(){
  2662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2663. return $core.withContext(function($ctx3) {
  2664. //>>excludeEnd("ctx");
  2665. $2=$recv(html)._a();
  2666. $recv($2)._with_("Test");
  2667. return $recv($2)._onClick_((function(){
  2668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2669. return $core.withContext(function($ctx4) {
  2670. //>>excludeEnd("ctx");
  2671. return $recv(window)._alert_("Clicked Test");
  2672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2673. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  2674. //>>excludeEnd("ctx");
  2675. }));
  2676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2677. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  2678. //>>excludeEnd("ctx");
  2679. }));
  2680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2681. $ctx2.sendIdx["with:"]=1;
  2682. //>>excludeEnd("ctx");
  2683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2684. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2685. //>>excludeEnd("ctx");
  2686. }));
  2687. return self;
  2688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2689. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLContextMenuWidget)});
  2690. //>>excludeEnd("ctx");
  2691. },
  2692. //>>excludeStart("ide", pragmas.excludeIdeData);
  2693. args: ["html"],
  2694. source: "renderContentOn: html\x0a\x09html ul\x0a\x09\x09class: 'dropdown-menu';\x0a\x09\x09style: 'position: fixed';\x0a\x09\x09width: [\x0a\x09\x09\x09html li\x0a\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09html a\x0a\x09\x09\x09\x09\x09\x09with: 'Test';\x0a\x09\x09\x09\x09\x09\x09onClick: [ window alert: 'Clicked Test' ]\x0a\x09\x09\x09\x09]\x0a\x09\x09]",
  2695. referencedClasses: [],
  2696. //>>excludeEnd("ide");
  2697. messageSends: ["class:", "ul", "style:", "width:", "with:", "li", "a", "onClick:", "alert:"]
  2698. }),
  2699. $globals.HLContextMenuWidget);
  2700. $core.addClass("HLFocusableWidget", $globals.HLWidget, [], "Helios-Core");
  2701. //>>excludeStart("ide", pragmas.excludeIdeData);
  2702. $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.";
  2703. //>>excludeEnd("ide");
  2704. $core.addMethod(
  2705. $core.method({
  2706. selector: "blur",
  2707. protocol: "events",
  2708. fn: function (){
  2709. var self=this,$self=this;
  2710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2711. return $core.withContext(function($ctx1) {
  2712. //>>excludeEnd("ctx");
  2713. $recv($recv($self._wrapper())._asJQuery())._blur();
  2714. return self;
  2715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2716. }, function($ctx1) {$ctx1.fill(self,"blur",{},$globals.HLFocusableWidget)});
  2717. //>>excludeEnd("ctx");
  2718. },
  2719. //>>excludeStart("ide", pragmas.excludeIdeData);
  2720. args: [],
  2721. source: "blur\x0a\x09self wrapper asJQuery blur",
  2722. referencedClasses: [],
  2723. //>>excludeEnd("ide");
  2724. messageSends: ["blur", "asJQuery", "wrapper"]
  2725. }),
  2726. $globals.HLFocusableWidget);
  2727. $core.addMethod(
  2728. $core.method({
  2729. selector: "canHaveFocus",
  2730. protocol: "testing",
  2731. fn: function (){
  2732. var self=this,$self=this;
  2733. return true;
  2734. },
  2735. //>>excludeStart("ide", pragmas.excludeIdeData);
  2736. args: [],
  2737. source: "canHaveFocus\x0a\x09^ true",
  2738. referencedClasses: [],
  2739. //>>excludeEnd("ide");
  2740. messageSends: []
  2741. }),
  2742. $globals.HLFocusableWidget);
  2743. $core.addMethod(
  2744. $core.method({
  2745. selector: "focus",
  2746. protocol: "events",
  2747. fn: function (){
  2748. var self=this,$self=this;
  2749. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2750. return $core.withContext(function($ctx1) {
  2751. //>>excludeEnd("ctx");
  2752. $recv($recv($self._wrapper())._asJQuery())._focus();
  2753. return self;
  2754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2755. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLFocusableWidget)});
  2756. //>>excludeEnd("ctx");
  2757. },
  2758. //>>excludeStart("ide", pragmas.excludeIdeData);
  2759. args: [],
  2760. source: "focus\x0a\x09self wrapper asJQuery focus",
  2761. referencedClasses: [],
  2762. //>>excludeEnd("ide");
  2763. messageSends: ["focus", "asJQuery", "wrapper"]
  2764. }),
  2765. $globals.HLFocusableWidget);
  2766. $core.addMethod(
  2767. $core.method({
  2768. selector: "focusClass",
  2769. protocol: "accessing",
  2770. fn: function (){
  2771. var self=this,$self=this;
  2772. return "focused";
  2773. },
  2774. //>>excludeStart("ide", pragmas.excludeIdeData);
  2775. args: [],
  2776. source: "focusClass\x0a\x09^ 'focused'",
  2777. referencedClasses: [],
  2778. //>>excludeEnd("ide");
  2779. messageSends: []
  2780. }),
  2781. $globals.HLFocusableWidget);
  2782. $core.addMethod(
  2783. $core.method({
  2784. selector: "hasFocus",
  2785. protocol: "testing",
  2786. fn: function (){
  2787. var self=this,$self=this;
  2788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2789. return $core.withContext(function($ctx1) {
  2790. //>>excludeEnd("ctx");
  2791. var $2,$1;
  2792. $2=$self._wrapper();
  2793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2794. $ctx1.sendIdx["wrapper"]=1;
  2795. //>>excludeEnd("ctx");
  2796. $1=$recv($2)._notNil();
  2797. return $recv($1)._and_((function(){
  2798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2799. return $core.withContext(function($ctx2) {
  2800. //>>excludeEnd("ctx");
  2801. return $recv($recv($self._wrapper())._asJQuery())._hasClass_($self._focusClass());
  2802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2803. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2804. //>>excludeEnd("ctx");
  2805. }));
  2806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2807. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},$globals.HLFocusableWidget)});
  2808. //>>excludeEnd("ctx");
  2809. },
  2810. //>>excludeStart("ide", pragmas.excludeIdeData);
  2811. args: [],
  2812. source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]",
  2813. referencedClasses: [],
  2814. //>>excludeEnd("ide");
  2815. messageSends: ["and:", "notNil", "wrapper", "hasClass:", "asJQuery", "focusClass"]
  2816. }),
  2817. $globals.HLFocusableWidget);
  2818. $core.addMethod(
  2819. $core.method({
  2820. selector: "renderContentOn:",
  2821. protocol: "rendering",
  2822. fn: function (html){
  2823. var self=this,$self=this;
  2824. return self;
  2825. },
  2826. //>>excludeStart("ide", pragmas.excludeIdeData);
  2827. args: ["html"],
  2828. source: "renderContentOn: html",
  2829. referencedClasses: [],
  2830. //>>excludeEnd("ide");
  2831. messageSends: []
  2832. }),
  2833. $globals.HLFocusableWidget);
  2834. $core.addMethod(
  2835. $core.method({
  2836. selector: "renderOn:",
  2837. protocol: "rendering",
  2838. fn: function (html){
  2839. var self=this,$self=this;
  2840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2841. return $core.withContext(function($ctx1) {
  2842. //>>excludeEnd("ctx");
  2843. var $1,$3,$2,$4;
  2844. $1=$recv(html)._div();
  2845. $recv($1)._class_($self._cssClass());
  2846. $recv($1)._at_put_("tabindex","0");
  2847. $recv($1)._onBlur_((function(){
  2848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2849. return $core.withContext(function($ctx2) {
  2850. //>>excludeEnd("ctx");
  2851. $3=$self._wrapper();
  2852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2853. $ctx2.sendIdx["wrapper"]=1;
  2854. //>>excludeEnd("ctx");
  2855. $2=$recv($3)._asJQuery();
  2856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2857. $ctx2.sendIdx["asJQuery"]=1;
  2858. //>>excludeEnd("ctx");
  2859. $4=$self._focusClass();
  2860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2861. $ctx2.sendIdx["focusClass"]=1;
  2862. //>>excludeEnd("ctx");
  2863. return $recv($2)._removeClass_($4);
  2864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2865. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2866. //>>excludeEnd("ctx");
  2867. }));
  2868. $recv($1)._onFocus_((function(){
  2869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2870. return $core.withContext(function($ctx2) {
  2871. //>>excludeEnd("ctx");
  2872. return $recv($recv($self._wrapper())._asJQuery())._addClass_($self._focusClass());
  2873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2874. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  2875. //>>excludeEnd("ctx");
  2876. }));
  2877. $self["@wrapper"]=$recv($1)._yourself();
  2878. $recv($self["@wrapper"])._with_((function(){
  2879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2880. return $core.withContext(function($ctx2) {
  2881. //>>excludeEnd("ctx");
  2882. return $self._renderContentOn_(html);
  2883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2884. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  2885. //>>excludeEnd("ctx");
  2886. }));
  2887. return self;
  2888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2889. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLFocusableWidget)});
  2890. //>>excludeEnd("ctx");
  2891. },
  2892. //>>excludeStart("ide", pragmas.excludeIdeData);
  2893. args: ["html"],
  2894. 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 ]",
  2895. referencedClasses: [],
  2896. //>>excludeEnd("ide");
  2897. messageSends: ["class:", "div", "cssClass", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:", "yourself", "with:", "renderContentOn:"]
  2898. }),
  2899. $globals.HLFocusableWidget);
  2900. $core.addClass("HLListWidget", $globals.HLFocusableWidget, ["items", "selectedItem"], "Helios-Core");
  2901. $core.addMethod(
  2902. $core.method({
  2903. selector: "activateFirstListItem",
  2904. protocol: "actions",
  2905. fn: function (){
  2906. var self=this,$self=this;
  2907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2908. return $core.withContext(function($ctx1) {
  2909. //>>excludeEnd("ctx");
  2910. $self._activateListItem_($recv($recv($recv($self["@wrapper"])._asJQuery())._find_("li.inactive"))._eq_((0)));
  2911. return self;
  2912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2913. }, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},$globals.HLListWidget)});
  2914. //>>excludeEnd("ctx");
  2915. },
  2916. //>>excludeStart("ide", pragmas.excludeIdeData);
  2917. args: [],
  2918. source: "activateFirstListItem\x0a\x09self activateListItem: ((wrapper asJQuery find: 'li.inactive') eq: 0)",
  2919. referencedClasses: [],
  2920. //>>excludeEnd("ide");
  2921. messageSends: ["activateListItem:", "eq:", "find:", "asJQuery"]
  2922. }),
  2923. $globals.HLListWidget);
  2924. $core.addMethod(
  2925. $core.method({
  2926. selector: "activateItem:",
  2927. protocol: "actions",
  2928. fn: function (anObject){
  2929. var self=this,$self=this;
  2930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2931. return $core.withContext(function($ctx1) {
  2932. //>>excludeEnd("ctx");
  2933. $self._activateListItem_($self._findListItemFor_(anObject));
  2934. return self;
  2935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2936. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},$globals.HLListWidget)});
  2937. //>>excludeEnd("ctx");
  2938. },
  2939. //>>excludeStart("ide", pragmas.excludeIdeData);
  2940. args: ["anObject"],
  2941. source: "activateItem: anObject\x0a\x09self activateListItem: (self findListItemFor: anObject)",
  2942. referencedClasses: [],
  2943. //>>excludeEnd("ide");
  2944. messageSends: ["activateListItem:", "findListItemFor:"]
  2945. }),
  2946. $globals.HLListWidget);
  2947. $core.addMethod(
  2948. $core.method({
  2949. selector: "activateListItem:",
  2950. protocol: "actions",
  2951. fn: function (aListItem){
  2952. var self=this,$self=this;
  2953. var item;
  2954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2955. return $core.withContext(function($ctx1) {
  2956. //>>excludeEnd("ctx");
  2957. var $1,$2,$3,$4,$receiver;
  2958. $1=$recv(aListItem)._get_((0));
  2959. if(($receiver = $1) == null || $receiver.a$nil){
  2960. return self;
  2961. } else {
  2962. $1;
  2963. }
  2964. $2=$recv($recv(aListItem)._parent())._children();
  2965. $3=$self._activeItemCssClass();
  2966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2967. $ctx1.sendIdx["activeItemCssClass"]=1;
  2968. //>>excludeEnd("ctx");
  2969. $recv($2)._removeClass_($3);
  2970. $recv(aListItem)._addClass_($self._activeItemCssClass());
  2971. $self._ensureVisible_(aListItem);
  2972. item=$recv(aListItem)._data_("item");
  2973. $4=$recv($self._selectedItem()).__eq_eq(item);
  2974. if(!$core.assert($4)){
  2975. $self._selectItem_(item);
  2976. }
  2977. return self;
  2978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2979. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},$globals.HLListWidget)});
  2980. //>>excludeEnd("ctx");
  2981. },
  2982. //>>excludeStart("ide", pragmas.excludeIdeData);
  2983. args: ["aListItem"],
  2984. 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 ]",
  2985. referencedClasses: [],
  2986. //>>excludeEnd("ide");
  2987. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "activeItemCssClass", "addClass:", "ensureVisible:", "data:", "ifFalse:", "==", "selectedItem", "selectItem:"]
  2988. }),
  2989. $globals.HLListWidget);
  2990. $core.addMethod(
  2991. $core.method({
  2992. selector: "activateNextListItem",
  2993. protocol: "actions",
  2994. fn: function (){
  2995. var self=this,$self=this;
  2996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2997. return $core.withContext(function($ctx1) {
  2998. //>>excludeEnd("ctx");
  2999. var $4,$3,$6,$5,$2,$1;
  3000. $4=$self._wrapper();
  3001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3002. $ctx1.sendIdx["wrapper"]=1;
  3003. //>>excludeEnd("ctx");
  3004. $3=$recv($4)._asJQuery();
  3005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3006. $ctx1.sendIdx["asJQuery"]=1;
  3007. //>>excludeEnd("ctx");
  3008. $6=$self._activeItemCssClass();
  3009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3010. $ctx1.sendIdx["activeItemCssClass"]=1;
  3011. //>>excludeEnd("ctx");
  3012. $5="li.".__comma($6);
  3013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3014. $ctx1.sendIdx[","]=1;
  3015. //>>excludeEnd("ctx");
  3016. $2=$recv($3)._find_($5);
  3017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3018. $ctx1.sendIdx["find:"]=1;
  3019. //>>excludeEnd("ctx");
  3020. $1=$recv($2)._next();
  3021. $self._activateListItem_($1);
  3022. $recv($recv($recv($recv($self._wrapper())._asJQuery())._find_(" .".__comma($self._activeItemCssClass())))._get())._ifEmpty_((function(){
  3023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3024. return $core.withContext(function($ctx2) {
  3025. //>>excludeEnd("ctx");
  3026. return $self._activateFirstListItem();
  3027. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3028. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3029. //>>excludeEnd("ctx");
  3030. }));
  3031. return self;
  3032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3033. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLListWidget)});
  3034. //>>excludeEnd("ctx");
  3035. },
  3036. //>>excludeStart("ide", pragmas.excludeIdeData);
  3037. args: [],
  3038. 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 ]",
  3039. referencedClasses: [],
  3040. //>>excludeEnd("ide");
  3041. messageSends: ["activateListItem:", "next", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass", "ifEmpty:", "get", "activateFirstListItem"]
  3042. }),
  3043. $globals.HLListWidget);
  3044. $core.addMethod(
  3045. $core.method({
  3046. selector: "activatePreviousListItem",
  3047. protocol: "actions",
  3048. fn: function (){
  3049. var self=this,$self=this;
  3050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3051. return $core.withContext(function($ctx1) {
  3052. //>>excludeEnd("ctx");
  3053. $self._activateListItem_($recv($recv($recv($self._wrapper())._asJQuery())._find_("li.".__comma($self._activeItemCssClass())))._prev());
  3054. return self;
  3055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3056. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLListWidget)});
  3057. //>>excludeEnd("ctx");
  3058. },
  3059. //>>excludeStart("ide", pragmas.excludeIdeData);
  3060. args: [],
  3061. source: "activatePreviousListItem\x0a\x09self activateListItem: (self wrapper asJQuery find: ('li.', self activeItemCssClass)) prev",
  3062. referencedClasses: [],
  3063. //>>excludeEnd("ide");
  3064. messageSends: ["activateListItem:", "prev", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass"]
  3065. }),
  3066. $globals.HLListWidget);
  3067. $core.addMethod(
  3068. $core.method({
  3069. selector: "activeItemCssClass",
  3070. protocol: "accessing",
  3071. fn: function (){
  3072. var self=this,$self=this;
  3073. return "active";
  3074. },
  3075. //>>excludeStart("ide", pragmas.excludeIdeData);
  3076. args: [],
  3077. source: "activeItemCssClass\x0a\x09^'active'",
  3078. referencedClasses: [],
  3079. //>>excludeEnd("ide");
  3080. messageSends: []
  3081. }),
  3082. $globals.HLListWidget);
  3083. $core.addMethod(
  3084. $core.method({
  3085. selector: "buttonsDivCssClass",
  3086. protocol: "accessing",
  3087. fn: function (){
  3088. var self=this,$self=this;
  3089. return "pane_actions form-group";
  3090. },
  3091. //>>excludeStart("ide", pragmas.excludeIdeData);
  3092. args: [],
  3093. source: "buttonsDivCssClass\x0a\x09^ 'pane_actions form-group'",
  3094. referencedClasses: [],
  3095. //>>excludeEnd("ide");
  3096. messageSends: []
  3097. }),
  3098. $globals.HLListWidget);
  3099. $core.addMethod(
  3100. $core.method({
  3101. selector: "cssClassForItem:",
  3102. protocol: "accessing",
  3103. fn: function (anObject){
  3104. var self=this,$self=this;
  3105. return "";
  3106. },
  3107. //>>excludeStart("ide", pragmas.excludeIdeData);
  3108. args: ["anObject"],
  3109. source: "cssClassForItem: anObject\x0a\x09^ ''",
  3110. referencedClasses: [],
  3111. //>>excludeEnd("ide");
  3112. messageSends: []
  3113. }),
  3114. $globals.HLListWidget);
  3115. $core.addMethod(
  3116. $core.method({
  3117. selector: "defaultItems",
  3118. protocol: "defaults",
  3119. fn: function (){
  3120. var self=this,$self=this;
  3121. return [];
  3122. },
  3123. //>>excludeStart("ide", pragmas.excludeIdeData);
  3124. args: [],
  3125. source: "defaultItems\x0a\x09^ #()",
  3126. referencedClasses: [],
  3127. //>>excludeEnd("ide");
  3128. messageSends: []
  3129. }),
  3130. $globals.HLListWidget);
  3131. $core.addMethod(
  3132. $core.method({
  3133. selector: "ensureVisible:",
  3134. protocol: "actions",
  3135. fn: function (aListItem){
  3136. var self=this,$self=this;
  3137. var parent,position;
  3138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3139. return $core.withContext(function($ctx1) {
  3140. //>>excludeEnd("ctx");
  3141. 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;
  3142. $1=$recv(aListItem)._get_((0));
  3143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3144. $ctx1.sendIdx["get:"]=1;
  3145. //>>excludeEnd("ctx");
  3146. if(($receiver = $1) == null || $receiver.a$nil){
  3147. return self;
  3148. } else {
  3149. $1;
  3150. }
  3151. position=$self._positionOf_(aListItem);
  3152. parent=$recv(aListItem)._parent();
  3153. $4=$recv(aListItem)._position();
  3154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3155. $ctx1.sendIdx["position"]=1;
  3156. //>>excludeEnd("ctx");
  3157. $3=$recv($4)._top();
  3158. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3159. $ctx1.sendIdx["top"]=1;
  3160. //>>excludeEnd("ctx");
  3161. $2=$recv($3).__lt((0));
  3162. if($core.assert($2)){
  3163. $5=$recv(parent)._get_((0));
  3164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3165. $ctx1.sendIdx["get:"]=2;
  3166. //>>excludeEnd("ctx");
  3167. $9=$recv(parent)._get_((0));
  3168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3169. $ctx1.sendIdx["get:"]=3;
  3170. //>>excludeEnd("ctx");
  3171. $8=$recv($9)._scrollTop();
  3172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3173. $ctx1.sendIdx["scrollTop"]=1;
  3174. //>>excludeEnd("ctx");
  3175. $11=$recv(aListItem)._position();
  3176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3177. $ctx1.sendIdx["position"]=2;
  3178. //>>excludeEnd("ctx");
  3179. $10=$recv($11)._top();
  3180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3181. $ctx1.sendIdx["top"]=2;
  3182. //>>excludeEnd("ctx");
  3183. $7=$recv($8).__plus($10);
  3184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3185. $ctx1.sendIdx["+"]=1;
  3186. //>>excludeEnd("ctx");
  3187. $6=$recv($7).__minus((10));
  3188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3189. $ctx1.sendIdx["-"]=1;
  3190. //>>excludeEnd("ctx");
  3191. $recv($5)._scrollTop_($6);
  3192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3193. $ctx1.sendIdx["scrollTop:"]=1;
  3194. //>>excludeEnd("ctx");
  3195. }
  3196. $15=$recv(aListItem)._position();
  3197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3198. $ctx1.sendIdx["position"]=3;
  3199. //>>excludeEnd("ctx");
  3200. $14=$recv($15)._top();
  3201. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3202. $ctx1.sendIdx["top"]=3;
  3203. //>>excludeEnd("ctx");
  3204. $16=$recv(aListItem)._height();
  3205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3206. $ctx1.sendIdx["height"]=1;
  3207. //>>excludeEnd("ctx");
  3208. $13=$recv($14).__plus($16);
  3209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3210. $ctx1.sendIdx["+"]=2;
  3211. //>>excludeEnd("ctx");
  3212. $17=$recv(parent)._height();
  3213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3214. $ctx1.sendIdx["height"]=2;
  3215. //>>excludeEnd("ctx");
  3216. $12=$recv($13).__gt($17);
  3217. if($core.assert($12)){
  3218. $18=$recv(parent)._get_((0));
  3219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3220. $ctx1.sendIdx["get:"]=4;
  3221. //>>excludeEnd("ctx");
  3222. $22=$recv($recv(parent)._get_((0)))._scrollTop();
  3223. $23=$recv(aListItem)._height();
  3224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3225. $ctx1.sendIdx["height"]=3;
  3226. //>>excludeEnd("ctx");
  3227. $21=$recv($22).__plus($23);
  3228. $20=$recv($21).__minus($recv($recv(parent)._height()).__minus($recv($recv(aListItem)._position())._top()));
  3229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3230. $ctx1.sendIdx["-"]=2;
  3231. //>>excludeEnd("ctx");
  3232. $19=$recv($20).__plus((10));
  3233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3234. $ctx1.sendIdx["+"]=3;
  3235. //>>excludeEnd("ctx");
  3236. $recv($18)._scrollTop_($19);
  3237. }
  3238. return self;
  3239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3240. }, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},$globals.HLListWidget)});
  3241. //>>excludeEnd("ctx");
  3242. },
  3243. //>>excludeStart("ide", pragmas.excludeIdeData);
  3244. args: ["aListItem"],
  3245. 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 ]",
  3246. referencedClasses: [],
  3247. //>>excludeEnd("ide");
  3248. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "-", "+", "scrollTop", ">", "height"]
  3249. }),
  3250. $globals.HLListWidget);
  3251. $core.addMethod(
  3252. $core.method({
  3253. selector: "findListItemFor:",
  3254. protocol: "accessing",
  3255. fn: function (anObject){
  3256. var self=this,$self=this;
  3257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3258. return $core.withContext(function($ctx1) {
  3259. //>>excludeEnd("ctx");
  3260. var $3,$2,$1;
  3261. $3=$recv($self["@wrapper"])._asJQuery();
  3262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3263. $ctx1.sendIdx["asJQuery"]=1;
  3264. //>>excludeEnd("ctx");
  3265. $2=$recv($3)._find_("li");
  3266. $1=$recv($2)._filter_($recv((function(thisArg,otherArg){
  3267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3268. return $core.withContext(function($ctx2) {
  3269. //>>excludeEnd("ctx");
  3270. return $recv($recv($recv(thisArg)._asJQuery())._data_("item")).__eq(anObject);
  3271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3272. }, function($ctx2) {$ctx2.fillBlock({thisArg:thisArg,otherArg:otherArg},$ctx1,1)});
  3273. //>>excludeEnd("ctx");
  3274. }))._currySelf());
  3275. return $recv($1)._eq_((0));
  3276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3277. }, function($ctx1) {$ctx1.fill(self,"findListItemFor:",{anObject:anObject},$globals.HLListWidget)});
  3278. //>>excludeEnd("ctx");
  3279. },
  3280. //>>excludeStart("ide", pragmas.excludeIdeData);
  3281. args: ["anObject"],
  3282. source: "findListItemFor: anObject\x0a\x09^ (((wrapper asJQuery find: 'li') \x0a\x09\x09filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)",
  3283. referencedClasses: [],
  3284. //>>excludeEnd("ide");
  3285. messageSends: ["eq:", "filter:", "find:", "asJQuery", "currySelf", "=", "data:"]
  3286. }),
  3287. $globals.HLListWidget);
  3288. $core.addMethod(
  3289. $core.method({
  3290. selector: "focus",
  3291. protocol: "actions",
  3292. fn: function (){
  3293. var self=this,$self=this;
  3294. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3295. return $core.withContext(function($ctx1) {
  3296. //>>excludeEnd("ctx");
  3297. var $1,$receiver;
  3298. (
  3299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3300. $ctx1.supercall = true,
  3301. //>>excludeEnd("ctx");
  3302. ($globals.HLListWidget.superclass||$boot.nilAsClass).fn.prototype._focus.apply($self, []));
  3303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3304. $ctx1.supercall = false;
  3305. //>>excludeEnd("ctx");;
  3306. $recv($self._items())._ifNotEmpty_((function(){
  3307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3308. return $core.withContext(function($ctx2) {
  3309. //>>excludeEnd("ctx");
  3310. $1=$self._selectedItem();
  3311. if(($receiver = $1) == null || $receiver.a$nil){
  3312. return $self._activateFirstListItem();
  3313. } else {
  3314. return $1;
  3315. }
  3316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3317. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3318. //>>excludeEnd("ctx");
  3319. }));
  3320. return self;
  3321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3322. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLListWidget)});
  3323. //>>excludeEnd("ctx");
  3324. },
  3325. //>>excludeStart("ide", pragmas.excludeIdeData);
  3326. args: [],
  3327. source: "focus\x0a\x09super focus.\x0a self items ifNotEmpty: [ \x0a\x09\x09self selectedItem ifNil: [ self activateFirstListItem ] ]",
  3328. referencedClasses: [],
  3329. //>>excludeEnd("ide");
  3330. messageSends: ["focus", "ifNotEmpty:", "items", "ifNil:", "selectedItem", "activateFirstListItem"]
  3331. }),
  3332. $globals.HLListWidget);
  3333. $core.addMethod(
  3334. $core.method({
  3335. selector: "items",
  3336. protocol: "accessing",
  3337. fn: function (){
  3338. var self=this,$self=this;
  3339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3340. return $core.withContext(function($ctx1) {
  3341. //>>excludeEnd("ctx");
  3342. var $1,$receiver;
  3343. $1=$self["@items"];
  3344. if(($receiver = $1) == null || $receiver.a$nil){
  3345. $self["@items"]=$self._defaultItems();
  3346. return $self["@items"];
  3347. } else {
  3348. return $1;
  3349. }
  3350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3351. }, function($ctx1) {$ctx1.fill(self,"items",{},$globals.HLListWidget)});
  3352. //>>excludeEnd("ctx");
  3353. },
  3354. //>>excludeStart("ide", pragmas.excludeIdeData);
  3355. args: [],
  3356. source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
  3357. referencedClasses: [],
  3358. //>>excludeEnd("ide");
  3359. messageSends: ["ifNil:", "defaultItems"]
  3360. }),
  3361. $globals.HLListWidget);
  3362. $core.addMethod(
  3363. $core.method({
  3364. selector: "items:",
  3365. protocol: "accessing",
  3366. fn: function (aCollection){
  3367. var self=this,$self=this;
  3368. $self["@items"]=aCollection;
  3369. return self;
  3370. },
  3371. //>>excludeStart("ide", pragmas.excludeIdeData);
  3372. args: ["aCollection"],
  3373. source: "items: aCollection\x0a\x09items := aCollection",
  3374. referencedClasses: [],
  3375. //>>excludeEnd("ide");
  3376. messageSends: []
  3377. }),
  3378. $globals.HLListWidget);
  3379. $core.addMethod(
  3380. $core.method({
  3381. selector: "listCssClass",
  3382. protocol: "accessing",
  3383. fn: function (){
  3384. var self=this,$self=this;
  3385. return "nav nav-pills nav-stacked";
  3386. },
  3387. //>>excludeStart("ide", pragmas.excludeIdeData);
  3388. args: [],
  3389. source: "listCssClass \x0a\x09^'nav nav-pills nav-stacked'",
  3390. referencedClasses: [],
  3391. //>>excludeEnd("ide");
  3392. messageSends: []
  3393. }),
  3394. $globals.HLListWidget);
  3395. $core.addMethod(
  3396. $core.method({
  3397. selector: "listCssClassForItem:",
  3398. protocol: "accessing",
  3399. fn: function (anObject){
  3400. var self=this,$self=this;
  3401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3402. return $core.withContext(function($ctx1) {
  3403. //>>excludeEnd("ctx");
  3404. var $1;
  3405. $1=$recv($self._selectedItem()).__eq(anObject);
  3406. if($core.assert($1)){
  3407. return $self._activeItemCssClass();
  3408. } else {
  3409. return "inactive";
  3410. }
  3411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3412. }, function($ctx1) {$ctx1.fill(self,"listCssClassForItem:",{anObject:anObject},$globals.HLListWidget)});
  3413. //>>excludeEnd("ctx");
  3414. },
  3415. //>>excludeStart("ide", pragmas.excludeIdeData);
  3416. args: ["anObject"],
  3417. source: "listCssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09ifTrue: [ self activeItemCssClass ]\x0a\x09\x09ifFalse: [ 'inactive' ]",
  3418. referencedClasses: [],
  3419. //>>excludeEnd("ide");
  3420. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem", "activeItemCssClass"]
  3421. }),
  3422. $globals.HLListWidget);
  3423. $core.addMethod(
  3424. $core.method({
  3425. selector: "positionOf:",
  3426. protocol: "accessing",
  3427. fn: function (aListItem){
  3428. var self=this,$self=this;
  3429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3430. return $core.withContext(function($ctx1) {
  3431. //>>excludeEnd("ctx");
  3432. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  3433. ;
  3434. return self;
  3435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3436. }, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},$globals.HLListWidget)});
  3437. //>>excludeEnd("ctx");
  3438. },
  3439. //>>excludeStart("ide", pragmas.excludeIdeData);
  3440. args: ["aListItem"],
  3441. source: "positionOf: aListItem\x0a\x09<inlineJS: '\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09'>",
  3442. referencedClasses: [],
  3443. //>>excludeEnd("ide");
  3444. messageSends: []
  3445. }),
  3446. $globals.HLListWidget);
  3447. $core.addMethod(
  3448. $core.method({
  3449. selector: "reactivateListItem:",
  3450. protocol: "actions",
  3451. fn: function (aListItem){
  3452. var self=this,$self=this;
  3453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3454. return $core.withContext(function($ctx1) {
  3455. //>>excludeEnd("ctx");
  3456. $self._activateListItem_(aListItem);
  3457. $self._reselectItem_($self._selectedItem());
  3458. return self;
  3459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3460. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{aListItem:aListItem},$globals.HLListWidget)});
  3461. //>>excludeEnd("ctx");
  3462. },
  3463. //>>excludeStart("ide", pragmas.excludeIdeData);
  3464. args: ["aListItem"],
  3465. source: "reactivateListItem: aListItem\x0a\x09self activateListItem: aListItem.\x0a\x09self reselectItem: self selectedItem",
  3466. referencedClasses: [],
  3467. //>>excludeEnd("ide");
  3468. messageSends: ["activateListItem:", "reselectItem:", "selectedItem"]
  3469. }),
  3470. $globals.HLListWidget);
  3471. $core.addMethod(
  3472. $core.method({
  3473. selector: "refresh",
  3474. protocol: "actions",
  3475. fn: function (){
  3476. var self=this,$self=this;
  3477. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3478. return $core.withContext(function($ctx1) {
  3479. //>>excludeEnd("ctx");
  3480. var $1,$receiver;
  3481. (
  3482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3483. $ctx1.supercall = true,
  3484. //>>excludeEnd("ctx");
  3485. ($globals.HLListWidget.superclass||$boot.nilAsClass).fn.prototype._refresh.apply($self, []));
  3486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3487. $ctx1.supercall = false;
  3488. //>>excludeEnd("ctx");;
  3489. $1=$self._selectedItem();
  3490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3491. $ctx1.sendIdx["selectedItem"]=1;
  3492. //>>excludeEnd("ctx");
  3493. if(($receiver = $1) == null || $receiver.a$nil){
  3494. $1;
  3495. } else {
  3496. $self._ensureVisible_($self._findListItemFor_($self._selectedItem()));
  3497. }
  3498. return self;
  3499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3500. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLListWidget)});
  3501. //>>excludeEnd("ctx");
  3502. },
  3503. //>>excludeStart("ide", pragmas.excludeIdeData);
  3504. args: [],
  3505. source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
  3506. referencedClasses: [],
  3507. //>>excludeEnd("ide");
  3508. messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"]
  3509. }),
  3510. $globals.HLListWidget);
  3511. $core.addMethod(
  3512. $core.method({
  3513. selector: "renderButtonsOn:",
  3514. protocol: "rendering",
  3515. fn: function (html){
  3516. var self=this,$self=this;
  3517. return self;
  3518. },
  3519. //>>excludeStart("ide", pragmas.excludeIdeData);
  3520. args: ["html"],
  3521. source: "renderButtonsOn: html",
  3522. referencedClasses: [],
  3523. //>>excludeEnd("ide");
  3524. messageSends: []
  3525. }),
  3526. $globals.HLListWidget);
  3527. $core.addMethod(
  3528. $core.method({
  3529. selector: "renderContentOn:",
  3530. protocol: "rendering",
  3531. fn: function(html){
  3532. var self=this,$self=this;
  3533. var ul,contextMenu;
  3534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3535. return $core.withContext(function($ctx1) {
  3536. //>>excludeEnd("ctx");
  3537. var $1,$2,$3;
  3538. contextMenu=$recv($globals.HLContextMenuWidget)._new();
  3539. $1=$recv(html)._ul();
  3540. $recv($1)._class_($self._listCssClass());
  3541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3542. $ctx1.sendIdx["class:"]=1;
  3543. //>>excludeEnd("ctx");
  3544. $recv($1)._with_((function(){
  3545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3546. return $core.withContext(function($ctx2) {
  3547. //>>excludeEnd("ctx");
  3548. return $self._renderListOn_(html);
  3549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3550. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3551. //>>excludeEnd("ctx");
  3552. }));
  3553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3554. $ctx1.sendIdx["with:"]=1;
  3555. //>>excludeEnd("ctx");
  3556. ul=$recv($1)._onClick_((function(evt){
  3557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3558. return $core.withContext(function($ctx2) {
  3559. //>>excludeEnd("ctx");
  3560. $recv(console)._log_(evt);
  3561. return $self._focus();
  3562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3563. }, function($ctx2) {$ctx2.fillBlock({evt:evt},$ctx1,2)});
  3564. //>>excludeEnd("ctx");
  3565. }));
  3566. $recv(contextMenu)._bindToElement_(ul);
  3567. $2=$recv(html)._div();
  3568. $recv($2)._class_($self._buttonsDivCssClass());
  3569. $3=$recv($2)._with_((function(){
  3570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3571. return $core.withContext(function($ctx2) {
  3572. //>>excludeEnd("ctx");
  3573. return $self._renderButtonsOn_(html);
  3574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3575. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3576. //>>excludeEnd("ctx");
  3577. }));
  3578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3579. $ctx1.sendIdx["with:"]=2;
  3580. //>>excludeEnd("ctx");
  3581. $recv(html)._with_(contextMenu);
  3582. $self._setupKeyBindings();
  3583. return self;
  3584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3585. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,ul:ul,contextMenu:contextMenu},$globals.HLListWidget)});
  3586. //>>excludeEnd("ctx");
  3587. },
  3588. //>>excludeStart("ide", pragmas.excludeIdeData);
  3589. args: ["html"],
  3590. source: "renderContentOn: html\x0a\x09| ul contextMenu |\x0a\x09contextMenu := HLContextMenuWidget new.\x0a\x09\x0a\x09ul := html ul\x0a \x09class: self listCssClass;\x0a with: [ self renderListOn: html ];\x0a\x09\x09onClick: [ :evt | console log: evt. self focus ].\x0a\x09\x09\x0a\x09contextMenu bindToElement: ul.\x0a\x09\x0a html div class: self buttonsDivCssClass; with: [\x0a \x09self renderButtonsOn: html ].\x0a\x09\x09\x0a\x09html with: contextMenu.\x0a \x0a self setupKeyBindings",
  3591. referencedClasses: ["HLContextMenuWidget"],
  3592. //>>excludeEnd("ide");
  3593. messageSends: ["new", "class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "log:", "focus", "bindToElement:", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
  3594. }),
  3595. $globals.HLListWidget);
  3596. $core.addMethod(
  3597. $core.method({
  3598. selector: "renderItem:on:",
  3599. protocol: "rendering",
  3600. fn: function (anObject,html){
  3601. var self=this,$self=this;
  3602. var li;
  3603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3604. return $core.withContext(function($ctx1) {
  3605. //>>excludeEnd("ctx");
  3606. var $1,$2,$4,$3;
  3607. li=$recv(html)._li();
  3608. $1=$recv(li)._asJQuery();
  3609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3610. $ctx1.sendIdx["asJQuery"]=1;
  3611. //>>excludeEnd("ctx");
  3612. $recv($1)._data_put_("item",anObject);
  3613. $2=li;
  3614. $recv($2)._class_($self._listCssClassForItem_(anObject));
  3615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3616. $ctx1.sendIdx["class:"]=1;
  3617. //>>excludeEnd("ctx");
  3618. $3=$recv($2)._with_((function(){
  3619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3620. return $core.withContext(function($ctx2) {
  3621. //>>excludeEnd("ctx");
  3622. $4=$recv(html)._a();
  3623. $recv($4)._with_((function(){
  3624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3625. return $core.withContext(function($ctx3) {
  3626. //>>excludeEnd("ctx");
  3627. $recv($recv(html)._tag_("i"))._class_($self._cssClassForItem_(anObject));
  3628. return $self._renderItemLabel_on_(anObject,html);
  3629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3630. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3631. //>>excludeEnd("ctx");
  3632. }));
  3633. return $recv($4)._onClick_((function(){
  3634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3635. return $core.withContext(function($ctx3) {
  3636. //>>excludeEnd("ctx");
  3637. return $self._reactivateListItem_($recv(li)._asJQuery());
  3638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3639. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3640. //>>excludeEnd("ctx");
  3641. }));
  3642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3643. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3644. //>>excludeEnd("ctx");
  3645. }));
  3646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3647. $ctx1.sendIdx["with:"]=1;
  3648. //>>excludeEnd("ctx");
  3649. return self;
  3650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3651. }, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},$globals.HLListWidget)});
  3652. //>>excludeEnd("ctx");
  3653. },
  3654. //>>excludeStart("ide", pragmas.excludeIdeData);
  3655. args: ["anObject", "html"],
  3656. 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 ] ]",
  3657. referencedClasses: [],
  3658. //>>excludeEnd("ide");
  3659. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:on:", "onClick:", "reactivateListItem:"]
  3660. }),
  3661. $globals.HLListWidget);
  3662. $core.addMethod(
  3663. $core.method({
  3664. selector: "renderItemLabel:on:",
  3665. protocol: "rendering",
  3666. fn: function (anObject,html){
  3667. var self=this,$self=this;
  3668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3669. return $core.withContext(function($ctx1) {
  3670. //>>excludeEnd("ctx");
  3671. $recv(html)._with_($recv(anObject)._asString());
  3672. return self;
  3673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3674. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},$globals.HLListWidget)});
  3675. //>>excludeEnd("ctx");
  3676. },
  3677. //>>excludeStart("ide", pragmas.excludeIdeData);
  3678. args: ["anObject", "html"],
  3679. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  3680. referencedClasses: [],
  3681. //>>excludeEnd("ide");
  3682. messageSends: ["with:", "asString"]
  3683. }),
  3684. $globals.HLListWidget);
  3685. $core.addMethod(
  3686. $core.method({
  3687. selector: "renderListOn:",
  3688. protocol: "rendering",
  3689. fn: function (html){
  3690. var self=this,$self=this;
  3691. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3692. return $core.withContext(function($ctx1) {
  3693. //>>excludeEnd("ctx");
  3694. $recv($self._items())._do_((function(each){
  3695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3696. return $core.withContext(function($ctx2) {
  3697. //>>excludeEnd("ctx");
  3698. return $self._renderItem_on_(each,html);
  3699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3700. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3701. //>>excludeEnd("ctx");
  3702. }));
  3703. return self;
  3704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3705. }, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},$globals.HLListWidget)});
  3706. //>>excludeEnd("ctx");
  3707. },
  3708. //>>excludeStart("ide", pragmas.excludeIdeData);
  3709. args: ["html"],
  3710. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  3711. referencedClasses: [],
  3712. //>>excludeEnd("ide");
  3713. messageSends: ["do:", "items", "renderItem:on:"]
  3714. }),
  3715. $globals.HLListWidget);
  3716. $core.addMethod(
  3717. $core.method({
  3718. selector: "reselectItem:",
  3719. protocol: "actions",
  3720. fn: function (anObject){
  3721. var self=this,$self=this;
  3722. return self;
  3723. },
  3724. //>>excludeStart("ide", pragmas.excludeIdeData);
  3725. args: ["anObject"],
  3726. source: "reselectItem: anObject",
  3727. referencedClasses: [],
  3728. //>>excludeEnd("ide");
  3729. messageSends: []
  3730. }),
  3731. $globals.HLListWidget);
  3732. $core.addMethod(
  3733. $core.method({
  3734. selector: "selectItem:",
  3735. protocol: "actions",
  3736. fn: function (anObject){
  3737. var self=this,$self=this;
  3738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3739. return $core.withContext(function($ctx1) {
  3740. //>>excludeEnd("ctx");
  3741. $self._selectedItem_(anObject);
  3742. return self;
  3743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3744. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},$globals.HLListWidget)});
  3745. //>>excludeEnd("ctx");
  3746. },
  3747. //>>excludeStart("ide", pragmas.excludeIdeData);
  3748. args: ["anObject"],
  3749. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  3750. referencedClasses: [],
  3751. //>>excludeEnd("ide");
  3752. messageSends: ["selectedItem:"]
  3753. }),
  3754. $globals.HLListWidget);
  3755. $core.addMethod(
  3756. $core.method({
  3757. selector: "selectedItem",
  3758. protocol: "accessing",
  3759. fn: function (){
  3760. var self=this,$self=this;
  3761. return $self["@selectedItem"];
  3762. },
  3763. //>>excludeStart("ide", pragmas.excludeIdeData);
  3764. args: [],
  3765. source: "selectedItem\x0a\x09^ selectedItem",
  3766. referencedClasses: [],
  3767. //>>excludeEnd("ide");
  3768. messageSends: []
  3769. }),
  3770. $globals.HLListWidget);
  3771. $core.addMethod(
  3772. $core.method({
  3773. selector: "selectedItem:",
  3774. protocol: "accessing",
  3775. fn: function (anObject){
  3776. var self=this,$self=this;
  3777. $self["@selectedItem"]=anObject;
  3778. return self;
  3779. },
  3780. //>>excludeStart("ide", pragmas.excludeIdeData);
  3781. args: ["anObject"],
  3782. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  3783. referencedClasses: [],
  3784. //>>excludeEnd("ide");
  3785. messageSends: []
  3786. }),
  3787. $globals.HLListWidget);
  3788. $core.addMethod(
  3789. $core.method({
  3790. selector: "setupKeyBindings",
  3791. protocol: "events",
  3792. fn: function (){
  3793. var self=this,$self=this;
  3794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3795. return $core.withContext(function($ctx1) {
  3796. //>>excludeEnd("ctx");
  3797. var $1,$2;
  3798. $1=$recv($globals.HLRepeatedKeyDownHandler)._on_(self);
  3799. $recv($1)._whileKeyDown_do_((38),(function(){
  3800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3801. return $core.withContext(function($ctx2) {
  3802. //>>excludeEnd("ctx");
  3803. return $self._activatePreviousListItem();
  3804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3805. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3806. //>>excludeEnd("ctx");
  3807. }));
  3808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3809. $ctx1.sendIdx["whileKeyDown:do:"]=1;
  3810. //>>excludeEnd("ctx");
  3811. $recv($1)._whileKeyDown_do_((40),(function(){
  3812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3813. return $core.withContext(function($ctx2) {
  3814. //>>excludeEnd("ctx");
  3815. return $self._activateNextListItem();
  3816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3817. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3818. //>>excludeEnd("ctx");
  3819. }));
  3820. $recv($1)._rebindKeys();
  3821. $recv($recv($self._wrapper())._asJQuery())._keydown_((function(e){
  3822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3823. return $core.withContext(function($ctx2) {
  3824. //>>excludeEnd("ctx");
  3825. $2=$recv($recv(e)._which()).__eq((13));
  3826. if($core.assert($2)){
  3827. return $self._reselectItem_($self._selectedItem());
  3828. }
  3829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3830. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,3)});
  3831. //>>excludeEnd("ctx");
  3832. }));
  3833. return self;
  3834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3835. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLListWidget)});
  3836. //>>excludeEnd("ctx");
  3837. },
  3838. //>>excludeStart("ide", pragmas.excludeIdeData);
  3839. args: [],
  3840. 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 ] ]",
  3841. referencedClasses: ["HLRepeatedKeyDownHandler"],
  3842. //>>excludeEnd("ide");
  3843. messageSends: ["whileKeyDown:do:", "on:", "activatePreviousListItem", "activateNextListItem", "rebindKeys", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "reselectItem:", "selectedItem"]
  3844. }),
  3845. $globals.HLListWidget);
  3846. $core.addClass("HLNavigationListWidget", $globals.HLListWidget, ["previous", "next"], "Helios-Core");
  3847. $core.addMethod(
  3848. $core.method({
  3849. selector: "next",
  3850. protocol: "accessing",
  3851. fn: function (){
  3852. var self=this,$self=this;
  3853. return $self["@next"];
  3854. },
  3855. //>>excludeStart("ide", pragmas.excludeIdeData);
  3856. args: [],
  3857. source: "next\x0a\x09^ next",
  3858. referencedClasses: [],
  3859. //>>excludeEnd("ide");
  3860. messageSends: []
  3861. }),
  3862. $globals.HLNavigationListWidget);
  3863. $core.addMethod(
  3864. $core.method({
  3865. selector: "next:",
  3866. protocol: "accessing",
  3867. fn: function (aWidget){
  3868. var self=this,$self=this;
  3869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3870. return $core.withContext(function($ctx1) {
  3871. //>>excludeEnd("ctx");
  3872. var $1;
  3873. $self["@next"]=aWidget;
  3874. $1=$recv($recv(aWidget)._previous()).__eq(self);
  3875. if(!$core.assert($1)){
  3876. $recv(aWidget)._previous_(self);
  3877. }
  3878. return self;
  3879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3880. }, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3881. //>>excludeEnd("ctx");
  3882. },
  3883. //>>excludeStart("ide", pragmas.excludeIdeData);
  3884. args: ["aWidget"],
  3885. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  3886. referencedClasses: [],
  3887. //>>excludeEnd("ide");
  3888. messageSends: ["ifFalse:", "=", "previous", "previous:"]
  3889. }),
  3890. $globals.HLNavigationListWidget);
  3891. $core.addMethod(
  3892. $core.method({
  3893. selector: "nextFocus",
  3894. protocol: "actions",
  3895. fn: function (){
  3896. var self=this,$self=this;
  3897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3898. return $core.withContext(function($ctx1) {
  3899. //>>excludeEnd("ctx");
  3900. var $1,$receiver;
  3901. $1=$self._next();
  3902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3903. $ctx1.sendIdx["next"]=1;
  3904. //>>excludeEnd("ctx");
  3905. if(($receiver = $1) == null || $receiver.a$nil){
  3906. $1;
  3907. } else {
  3908. $recv($self._next())._focus();
  3909. }
  3910. return self;
  3911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3912. }, function($ctx1) {$ctx1.fill(self,"nextFocus",{},$globals.HLNavigationListWidget)});
  3913. //>>excludeEnd("ctx");
  3914. },
  3915. //>>excludeStart("ide", pragmas.excludeIdeData);
  3916. args: [],
  3917. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  3918. referencedClasses: [],
  3919. //>>excludeEnd("ide");
  3920. messageSends: ["ifNotNil:", "next", "focus"]
  3921. }),
  3922. $globals.HLNavigationListWidget);
  3923. $core.addMethod(
  3924. $core.method({
  3925. selector: "previous",
  3926. protocol: "accessing",
  3927. fn: function (){
  3928. var self=this,$self=this;
  3929. return $self["@previous"];
  3930. },
  3931. //>>excludeStart("ide", pragmas.excludeIdeData);
  3932. args: [],
  3933. source: "previous\x0a\x09^ previous",
  3934. referencedClasses: [],
  3935. //>>excludeEnd("ide");
  3936. messageSends: []
  3937. }),
  3938. $globals.HLNavigationListWidget);
  3939. $core.addMethod(
  3940. $core.method({
  3941. selector: "previous:",
  3942. protocol: "accessing",
  3943. fn: function (aWidget){
  3944. var self=this,$self=this;
  3945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3946. return $core.withContext(function($ctx1) {
  3947. //>>excludeEnd("ctx");
  3948. var $1;
  3949. $self["@previous"]=aWidget;
  3950. $1=$recv($recv(aWidget)._next()).__eq(self);
  3951. if(!$core.assert($1)){
  3952. $recv(aWidget)._next_(self);
  3953. }
  3954. return self;
  3955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3956. }, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3957. //>>excludeEnd("ctx");
  3958. },
  3959. //>>excludeStart("ide", pragmas.excludeIdeData);
  3960. args: ["aWidget"],
  3961. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  3962. referencedClasses: [],
  3963. //>>excludeEnd("ide");
  3964. messageSends: ["ifFalse:", "=", "next", "next:"]
  3965. }),
  3966. $globals.HLNavigationListWidget);
  3967. $core.addMethod(
  3968. $core.method({
  3969. selector: "previousFocus",
  3970. protocol: "actions",
  3971. fn: function (){
  3972. var self=this,$self=this;
  3973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3974. return $core.withContext(function($ctx1) {
  3975. //>>excludeEnd("ctx");
  3976. var $1,$receiver;
  3977. $1=$self._previous();
  3978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3979. $ctx1.sendIdx["previous"]=1;
  3980. //>>excludeEnd("ctx");
  3981. if(($receiver = $1) == null || $receiver.a$nil){
  3982. $1;
  3983. } else {
  3984. $recv($self._previous())._focus();
  3985. }
  3986. return self;
  3987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3988. }, function($ctx1) {$ctx1.fill(self,"previousFocus",{},$globals.HLNavigationListWidget)});
  3989. //>>excludeEnd("ctx");
  3990. },
  3991. //>>excludeStart("ide", pragmas.excludeIdeData);
  3992. args: [],
  3993. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  3994. referencedClasses: [],
  3995. //>>excludeEnd("ide");
  3996. messageSends: ["ifNotNil:", "previous", "focus"]
  3997. }),
  3998. $globals.HLNavigationListWidget);
  3999. $core.addMethod(
  4000. $core.method({
  4001. selector: "setupKeyBindings",
  4002. protocol: "events",
  4003. fn: function (){
  4004. var self=this,$self=this;
  4005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4006. return $core.withContext(function($ctx1) {
  4007. //>>excludeEnd("ctx");
  4008. var $1,$3,$2,$4,$receiver;
  4009. (
  4010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4011. $ctx1.supercall = true,
  4012. //>>excludeEnd("ctx");
  4013. ($globals.HLNavigationListWidget.superclass||$boot.nilAsClass).fn.prototype._setupKeyBindings.apply($self, []));
  4014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4015. $ctx1.supercall = false;
  4016. //>>excludeEnd("ctx");;
  4017. $1=$self._wrapper();
  4018. if(($receiver = $1) == null || $receiver.a$nil){
  4019. $1;
  4020. } else {
  4021. $recv($self["@wrapper"])._onKeyDown_((function(e){
  4022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4023. return $core.withContext(function($ctx2) {
  4024. //>>excludeEnd("ctx");
  4025. $3=$recv(e)._which();
  4026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4027. $ctx2.sendIdx["which"]=1;
  4028. //>>excludeEnd("ctx");
  4029. $2=$recv($3).__eq((39));
  4030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4031. $ctx2.sendIdx["="]=1;
  4032. //>>excludeEnd("ctx");
  4033. if($core.assert($2)){
  4034. $self._nextFocus();
  4035. }
  4036. $4=$recv($recv(e)._which()).__eq((37));
  4037. if($core.assert($4)){
  4038. return $self._previousFocus();
  4039. }
  4040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4041. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,2)});
  4042. //>>excludeEnd("ctx");
  4043. }));
  4044. }
  4045. return self;
  4046. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4047. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLNavigationListWidget)});
  4048. //>>excludeEnd("ctx");
  4049. },
  4050. //>>excludeStart("ide", pragmas.excludeIdeData);
  4051. args: [],
  4052. 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 ] ] ]",
  4053. referencedClasses: [],
  4054. //>>excludeEnd("ide");
  4055. messageSends: ["setupKeyBindings", "ifNotNil:", "wrapper", "onKeyDown:", "ifTrue:", "=", "which", "nextFocus", "previousFocus"]
  4056. }),
  4057. $globals.HLNavigationListWidget);
  4058. $core.addClass("HLToolListWidget", $globals.HLNavigationListWidget, ["model"], "Helios-Core");
  4059. $core.addMethod(
  4060. $core.method({
  4061. selector: "activateListItem:",
  4062. protocol: "actions",
  4063. fn: function (anItem){
  4064. var self=this,$self=this;
  4065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4066. return $core.withContext(function($ctx1) {
  4067. //>>excludeEnd("ctx");
  4068. $recv($self._model())._withChangesDo_((function(){
  4069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4070. return $core.withContext(function($ctx2) {
  4071. //>>excludeEnd("ctx");
  4072. return (
  4073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4074. $ctx2.supercall = true,
  4075. //>>excludeEnd("ctx");
  4076. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._activateListItem_.apply($self, [anItem]));
  4077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4078. $ctx2.supercall = false;
  4079. //>>excludeEnd("ctx");;
  4080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4081. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4082. //>>excludeEnd("ctx");
  4083. }));
  4084. return self;
  4085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4086. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4087. //>>excludeEnd("ctx");
  4088. },
  4089. //>>excludeStart("ide", pragmas.excludeIdeData);
  4090. args: ["anItem"],
  4091. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  4092. referencedClasses: [],
  4093. //>>excludeEnd("ide");
  4094. messageSends: ["withChangesDo:", "model", "activateListItem:"]
  4095. }),
  4096. $globals.HLToolListWidget);
  4097. $core.addMethod(
  4098. $core.method({
  4099. selector: "activateNextListItem",
  4100. protocol: "actions",
  4101. fn: function (){
  4102. var self=this,$self=this;
  4103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4104. return $core.withContext(function($ctx1) {
  4105. //>>excludeEnd("ctx");
  4106. $recv($self._model())._withChangesDo_((function(){
  4107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4108. return $core.withContext(function($ctx2) {
  4109. //>>excludeEnd("ctx");
  4110. return (
  4111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4112. $ctx2.supercall = true,
  4113. //>>excludeEnd("ctx");
  4114. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._activateNextListItem.apply($self, []));
  4115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4116. $ctx2.supercall = false;
  4117. //>>excludeEnd("ctx");;
  4118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4119. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4120. //>>excludeEnd("ctx");
  4121. }));
  4122. return self;
  4123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4124. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLToolListWidget)});
  4125. //>>excludeEnd("ctx");
  4126. },
  4127. //>>excludeStart("ide", pragmas.excludeIdeData);
  4128. args: [],
  4129. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  4130. referencedClasses: [],
  4131. //>>excludeEnd("ide");
  4132. messageSends: ["withChangesDo:", "model", "activateNextListItem"]
  4133. }),
  4134. $globals.HLToolListWidget);
  4135. $core.addMethod(
  4136. $core.method({
  4137. selector: "activatePreviousListItem",
  4138. protocol: "actions",
  4139. fn: function (){
  4140. var self=this,$self=this;
  4141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4142. return $core.withContext(function($ctx1) {
  4143. //>>excludeEnd("ctx");
  4144. $recv($self._model())._withChangesDo_((function(){
  4145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4146. return $core.withContext(function($ctx2) {
  4147. //>>excludeEnd("ctx");
  4148. return (
  4149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4150. $ctx2.supercall = true,
  4151. //>>excludeEnd("ctx");
  4152. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._activatePreviousListItem.apply($self, []));
  4153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4154. $ctx2.supercall = false;
  4155. //>>excludeEnd("ctx");;
  4156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4157. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4158. //>>excludeEnd("ctx");
  4159. }));
  4160. return self;
  4161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4162. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLToolListWidget)});
  4163. //>>excludeEnd("ctx");
  4164. },
  4165. //>>excludeStart("ide", pragmas.excludeIdeData);
  4166. args: [],
  4167. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  4168. referencedClasses: [],
  4169. //>>excludeEnd("ide");
  4170. messageSends: ["withChangesDo:", "model", "activatePreviousListItem"]
  4171. }),
  4172. $globals.HLToolListWidget);
  4173. $core.addMethod(
  4174. $core.method({
  4175. selector: "commandCategory",
  4176. protocol: "accessing",
  4177. fn: function (){
  4178. var self=this,$self=this;
  4179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4180. return $core.withContext(function($ctx1) {
  4181. //>>excludeEnd("ctx");
  4182. return $self._label();
  4183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4184. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},$globals.HLToolListWidget)});
  4185. //>>excludeEnd("ctx");
  4186. },
  4187. //>>excludeStart("ide", pragmas.excludeIdeData);
  4188. args: [],
  4189. source: "commandCategory\x0a\x09^ self label",
  4190. referencedClasses: [],
  4191. //>>excludeEnd("ide");
  4192. messageSends: ["label"]
  4193. }),
  4194. $globals.HLToolListWidget);
  4195. $core.addMethod(
  4196. $core.method({
  4197. selector: "label",
  4198. protocol: "accessing",
  4199. fn: function (){
  4200. var self=this,$self=this;
  4201. return "List";
  4202. },
  4203. //>>excludeStart("ide", pragmas.excludeIdeData);
  4204. args: [],
  4205. source: "label\x0a\x09^ 'List'",
  4206. referencedClasses: [],
  4207. //>>excludeEnd("ide");
  4208. messageSends: []
  4209. }),
  4210. $globals.HLToolListWidget);
  4211. $core.addMethod(
  4212. $core.method({
  4213. selector: "menuCommands",
  4214. protocol: "accessing",
  4215. fn: function (){
  4216. var self=this,$self=this;
  4217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4218. return $core.withContext(function($ctx1) {
  4219. //>>excludeEnd("ctx");
  4220. var $2,$1;
  4221. $1=$recv($recv($recv($recv($globals.HLToolCommand)._concreteClasses())._select_((function(each){
  4222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4223. return $core.withContext(function($ctx2) {
  4224. //>>excludeEnd("ctx");
  4225. $2=$self._model();
  4226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4227. $ctx2.sendIdx["model"]=1;
  4228. //>>excludeEnd("ctx");
  4229. return $recv(each)._isValidFor_($2);
  4230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4231. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4232. //>>excludeEnd("ctx");
  4233. })))._collect_((function(each){
  4234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4235. return $core.withContext(function($ctx2) {
  4236. //>>excludeEnd("ctx");
  4237. return $recv(each)._for_($self._model());
  4238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4239. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4240. //>>excludeEnd("ctx");
  4241. })))._select_((function(each){
  4242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4243. return $core.withContext(function($ctx2) {
  4244. //>>excludeEnd("ctx");
  4245. return $recv($recv($recv(each)._category()).__eq($self._commandCategory()))._and_((function(){
  4246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4247. return $core.withContext(function($ctx3) {
  4248. //>>excludeEnd("ctx");
  4249. return $recv($recv(each)._isAction())._and_((function(){
  4250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4251. return $core.withContext(function($ctx4) {
  4252. //>>excludeEnd("ctx");
  4253. return $recv(each)._isActive();
  4254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4255. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4256. //>>excludeEnd("ctx");
  4257. }));
  4258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4259. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4260. //>>excludeEnd("ctx");
  4261. }));
  4262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4263. $ctx2.sendIdx["and:"]=1;
  4264. //>>excludeEnd("ctx");
  4265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4266. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  4267. //>>excludeEnd("ctx");
  4268. }));
  4269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4270. $ctx1.sendIdx["select:"]=1;
  4271. //>>excludeEnd("ctx");
  4272. return $1;
  4273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4274. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},$globals.HLToolListWidget)});
  4275. //>>excludeEnd("ctx");
  4276. },
  4277. //>>excludeStart("ide", pragmas.excludeIdeData);
  4278. args: [],
  4279. 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 ] ] ]",
  4280. referencedClasses: ["HLToolCommand"],
  4281. //>>excludeEnd("ide");
  4282. messageSends: ["select:", "collect:", "concreteClasses", "isValidFor:", "model", "for:", "and:", "=", "category", "commandCategory", "isAction", "isActive"]
  4283. }),
  4284. $globals.HLToolListWidget);
  4285. $core.addMethod(
  4286. $core.method({
  4287. selector: "model",
  4288. protocol: "accessing",
  4289. fn: function (){
  4290. var self=this,$self=this;
  4291. return $self["@model"];
  4292. },
  4293. //>>excludeStart("ide", pragmas.excludeIdeData);
  4294. args: [],
  4295. source: "model\x0a\x09^ model",
  4296. referencedClasses: [],
  4297. //>>excludeEnd("ide");
  4298. messageSends: []
  4299. }),
  4300. $globals.HLToolListWidget);
  4301. $core.addMethod(
  4302. $core.method({
  4303. selector: "model:",
  4304. protocol: "accessing",
  4305. fn: function (aBrowserModel){
  4306. var self=this,$self=this;
  4307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4308. return $core.withContext(function($ctx1) {
  4309. //>>excludeEnd("ctx");
  4310. $self["@model"]=aBrowserModel;
  4311. $self._observeSystem();
  4312. $self._observeModel();
  4313. return self;
  4314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4315. }, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},$globals.HLToolListWidget)});
  4316. //>>excludeEnd("ctx");
  4317. },
  4318. //>>excludeStart("ide", pragmas.excludeIdeData);
  4319. args: ["aBrowserModel"],
  4320. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  4321. referencedClasses: [],
  4322. //>>excludeEnd("ide");
  4323. messageSends: ["observeSystem", "observeModel"]
  4324. }),
  4325. $globals.HLToolListWidget);
  4326. $core.addMethod(
  4327. $core.method({
  4328. selector: "observeModel",
  4329. protocol: "actions",
  4330. fn: function (){
  4331. var self=this,$self=this;
  4332. return self;
  4333. },
  4334. //>>excludeStart("ide", pragmas.excludeIdeData);
  4335. args: [],
  4336. source: "observeModel",
  4337. referencedClasses: [],
  4338. //>>excludeEnd("ide");
  4339. messageSends: []
  4340. }),
  4341. $globals.HLToolListWidget);
  4342. $core.addMethod(
  4343. $core.method({
  4344. selector: "observeSystem",
  4345. protocol: "actions",
  4346. fn: function (){
  4347. var self=this,$self=this;
  4348. return self;
  4349. },
  4350. //>>excludeStart("ide", pragmas.excludeIdeData);
  4351. args: [],
  4352. source: "observeSystem",
  4353. referencedClasses: [],
  4354. //>>excludeEnd("ide");
  4355. messageSends: []
  4356. }),
  4357. $globals.HLToolListWidget);
  4358. $core.addMethod(
  4359. $core.method({
  4360. selector: "reactivateListItem:",
  4361. protocol: "actions",
  4362. fn: function (anItem){
  4363. var self=this,$self=this;
  4364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4365. return $core.withContext(function($ctx1) {
  4366. //>>excludeEnd("ctx");
  4367. $recv($self._model())._withChangesDo_((function(){
  4368. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4369. return $core.withContext(function($ctx2) {
  4370. //>>excludeEnd("ctx");
  4371. return (
  4372. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4373. $ctx2.supercall = true,
  4374. //>>excludeEnd("ctx");
  4375. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._reactivateListItem_.apply($self, [anItem]));
  4376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4377. $ctx2.supercall = false;
  4378. //>>excludeEnd("ctx");;
  4379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4380. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4381. //>>excludeEnd("ctx");
  4382. }));
  4383. return self;
  4384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4385. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4386. //>>excludeEnd("ctx");
  4387. },
  4388. //>>excludeStart("ide", pragmas.excludeIdeData);
  4389. args: ["anItem"],
  4390. source: "reactivateListItem: anItem\x0a\x09self model withChangesDo: [ super reactivateListItem: anItem ]",
  4391. referencedClasses: [],
  4392. //>>excludeEnd("ide");
  4393. messageSends: ["withChangesDo:", "model", "reactivateListItem:"]
  4394. }),
  4395. $globals.HLToolListWidget);
  4396. $core.addMethod(
  4397. $core.method({
  4398. selector: "renderContentOn:",
  4399. protocol: "rendering",
  4400. fn: function (html){
  4401. var self=this,$self=this;
  4402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4403. return $core.withContext(function($ctx1) {
  4404. //>>excludeEnd("ctx");
  4405. $self._renderHeadOn_(html);
  4406. (
  4407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4408. $ctx1.supercall = true,
  4409. //>>excludeEnd("ctx");
  4410. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._renderContentOn_.apply($self, [html]));
  4411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4412. $ctx1.supercall = false;
  4413. //>>excludeEnd("ctx");;
  4414. return self;
  4415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4416. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLToolListWidget)});
  4417. //>>excludeEnd("ctx");
  4418. },
  4419. //>>excludeStart("ide", pragmas.excludeIdeData);
  4420. args: ["html"],
  4421. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  4422. referencedClasses: [],
  4423. //>>excludeEnd("ide");
  4424. messageSends: ["renderHeadOn:", "renderContentOn:"]
  4425. }),
  4426. $globals.HLToolListWidget);
  4427. $core.addMethod(
  4428. $core.method({
  4429. selector: "renderHeadOn:",
  4430. protocol: "rendering",
  4431. fn: function (html){
  4432. var self=this,$self=this;
  4433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4434. return $core.withContext(function($ctx1) {
  4435. //>>excludeEnd("ctx");
  4436. var $1,$2;
  4437. $1=$recv(html)._div();
  4438. $recv($1)._class_("list-label");
  4439. $2=$recv($1)._with_((function(){
  4440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4441. return $core.withContext(function($ctx2) {
  4442. //>>excludeEnd("ctx");
  4443. $recv(html)._with_($self._label());
  4444. return $self._renderMenuOn_(html);
  4445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4446. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4447. //>>excludeEnd("ctx");
  4448. }));
  4449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4450. $ctx1.sendIdx["with:"]=1;
  4451. //>>excludeEnd("ctx");
  4452. return self;
  4453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4454. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},$globals.HLToolListWidget)});
  4455. //>>excludeEnd("ctx");
  4456. },
  4457. //>>excludeStart("ide", pragmas.excludeIdeData);
  4458. args: ["html"],
  4459. 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 ]",
  4460. referencedClasses: [],
  4461. //>>excludeEnd("ide");
  4462. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]
  4463. }),
  4464. $globals.HLToolListWidget);
  4465. $core.addMethod(
  4466. $core.method({
  4467. selector: "renderMenuOn:",
  4468. protocol: "rendering",
  4469. fn: function (html){
  4470. var self=this,$self=this;
  4471. var commands;
  4472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4473. return $core.withContext(function($ctx1) {
  4474. //>>excludeEnd("ctx");
  4475. var $1,$3,$4,$5,$7,$6,$2;
  4476. var $early={};
  4477. try {
  4478. commands=$self._menuCommands();
  4479. $recv(commands)._ifEmpty_((function(){
  4480. throw $early=[self];
  4481. }));
  4482. $1=$recv(html)._div();
  4483. $recv($1)._class_("btn-group cog");
  4484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4485. $ctx1.sendIdx["class:"]=1;
  4486. //>>excludeEnd("ctx");
  4487. $2=$recv($1)._with_((function(){
  4488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4489. return $core.withContext(function($ctx2) {
  4490. //>>excludeEnd("ctx");
  4491. $3=$recv(html)._a();
  4492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4493. $ctx2.sendIdx["a"]=1;
  4494. //>>excludeEnd("ctx");
  4495. $recv($3)._class_("btn btn-default dropdown-toggle");
  4496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4497. $ctx2.sendIdx["class:"]=2;
  4498. //>>excludeEnd("ctx");
  4499. $recv($3)._at_put_("data-toggle","dropdown");
  4500. $4=$recv($3)._with_((function(){
  4501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4502. return $core.withContext(function($ctx3) {
  4503. //>>excludeEnd("ctx");
  4504. return $recv($recv(html)._tag_("i"))._class_("glyphicon glyphicon-chevron-down");
  4505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4506. $ctx3.sendIdx["class:"]=3;
  4507. //>>excludeEnd("ctx");
  4508. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4509. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4510. //>>excludeEnd("ctx");
  4511. }));
  4512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4513. $ctx2.sendIdx["with:"]=2;
  4514. //>>excludeEnd("ctx");
  4515. $4;
  4516. $5=$recv(html)._ul();
  4517. $recv($5)._class_("dropdown-menu pull-right");
  4518. $6=$recv($5)._with_((function(){
  4519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4520. return $core.withContext(function($ctx3) {
  4521. //>>excludeEnd("ctx");
  4522. return $recv(commands)._do_((function(each){
  4523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4524. return $core.withContext(function($ctx4) {
  4525. //>>excludeEnd("ctx");
  4526. return $recv($recv(html)._li())._with_((function(){
  4527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4528. return $core.withContext(function($ctx5) {
  4529. //>>excludeEnd("ctx");
  4530. $7=$recv(html)._a();
  4531. $recv($7)._with_($recv(each)._menuLabel());
  4532. return $recv($7)._onClick_((function(){
  4533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4534. return $core.withContext(function($ctx6) {
  4535. //>>excludeEnd("ctx");
  4536. return $self._execute_(each);
  4537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4538. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)});
  4539. //>>excludeEnd("ctx");
  4540. }));
  4541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4542. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  4543. //>>excludeEnd("ctx");
  4544. }));
  4545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4546. $ctx4.sendIdx["with:"]=4;
  4547. //>>excludeEnd("ctx");
  4548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4549. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)});
  4550. //>>excludeEnd("ctx");
  4551. }));
  4552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4553. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4554. //>>excludeEnd("ctx");
  4555. }));
  4556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4557. $ctx2.sendIdx["with:"]=3;
  4558. //>>excludeEnd("ctx");
  4559. return $6;
  4560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4561. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4562. //>>excludeEnd("ctx");
  4563. }));
  4564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4565. $ctx1.sendIdx["with:"]=1;
  4566. //>>excludeEnd("ctx");
  4567. return self;
  4568. }
  4569. catch(e) {if(e===$early)return e[0]; throw e}
  4570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4571. }, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},$globals.HLToolListWidget)});
  4572. //>>excludeEnd("ctx");
  4573. },
  4574. //>>excludeStart("ide", pragmas.excludeIdeData);
  4575. args: ["html"],
  4576. 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 ] ] ] ] ]",
  4577. referencedClasses: [],
  4578. //>>excludeEnd("ide");
  4579. messageSends: ["menuCommands", "ifEmpty:", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "li", "menuLabel", "onClick:", "execute:"]
  4580. }),
  4581. $globals.HLToolListWidget);
  4582. $core.addMethod(
  4583. $core.method({
  4584. selector: "selectedItem:",
  4585. protocol: "accessing",
  4586. fn: function (anItem){
  4587. var self=this,$self=this;
  4588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4589. return $core.withContext(function($ctx1) {
  4590. //>>excludeEnd("ctx");
  4591. (
  4592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4593. $ctx1.supercall = true,
  4594. //>>excludeEnd("ctx");
  4595. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._selectedItem_.apply($self, [anItem]));
  4596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4597. $ctx1.supercall = false;
  4598. //>>excludeEnd("ctx");;
  4599. $self._updateMenu();
  4600. return self;
  4601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4602. }, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4603. //>>excludeEnd("ctx");
  4604. },
  4605. //>>excludeStart("ide", pragmas.excludeIdeData);
  4606. args: ["anItem"],
  4607. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  4608. referencedClasses: [],
  4609. //>>excludeEnd("ide");
  4610. messageSends: ["selectedItem:", "updateMenu"]
  4611. }),
  4612. $globals.HLToolListWidget);
  4613. $core.addMethod(
  4614. $core.method({
  4615. selector: "unregister",
  4616. protocol: "actions",
  4617. fn: function (){
  4618. var self=this,$self=this;
  4619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4620. return $core.withContext(function($ctx1) {
  4621. //>>excludeEnd("ctx");
  4622. var $2,$1;
  4623. (
  4624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4625. $ctx1.supercall = true,
  4626. //>>excludeEnd("ctx");
  4627. ($globals.HLToolListWidget.superclass||$boot.nilAsClass).fn.prototype._unregister.apply($self, []));
  4628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4629. $ctx1.supercall = false;
  4630. //>>excludeEnd("ctx");;
  4631. $2=$self._model();
  4632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4633. $ctx1.sendIdx["model"]=1;
  4634. //>>excludeEnd("ctx");
  4635. $1=$recv($2)._announcer();
  4636. $recv($1)._unsubscribe_(self);
  4637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4638. $ctx1.sendIdx["unsubscribe:"]=1;
  4639. //>>excludeEnd("ctx");
  4640. $recv($recv($self._model())._systemAnnouncer())._unsubscribe_(self);
  4641. return self;
  4642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4643. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLToolListWidget)});
  4644. //>>excludeEnd("ctx");
  4645. },
  4646. //>>excludeStart("ide", pragmas.excludeIdeData);
  4647. args: [],
  4648. source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
  4649. referencedClasses: [],
  4650. //>>excludeEnd("ide");
  4651. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]
  4652. }),
  4653. $globals.HLToolListWidget);
  4654. $core.addMethod(
  4655. $core.method({
  4656. selector: "updateMenu",
  4657. protocol: "updating",
  4658. fn: function (){
  4659. var self=this,$self=this;
  4660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4661. return $core.withContext(function($ctx1) {
  4662. //>>excludeEnd("ctx");
  4663. var $3,$2,$1;
  4664. $3=$self._wrapper();
  4665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4666. $ctx1.sendIdx["wrapper"]=1;
  4667. //>>excludeEnd("ctx");
  4668. $2=$recv($3)._asJQuery();
  4669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4670. $ctx1.sendIdx["asJQuery"]=1;
  4671. //>>excludeEnd("ctx");
  4672. $1=$recv($2)._find_(".cog");
  4673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4674. $ctx1.sendIdx["find:"]=1;
  4675. //>>excludeEnd("ctx");
  4676. $recv($1)._remove();
  4677. $recv((function(html){
  4678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4679. return $core.withContext(function($ctx2) {
  4680. //>>excludeEnd("ctx");
  4681. return $self._renderMenuOn_(html);
  4682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4683. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4684. //>>excludeEnd("ctx");
  4685. }))._appendToJQuery_($recv($recv($self._wrapper())._asJQuery())._find_(".list-label"));
  4686. return self;
  4687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4688. }, function($ctx1) {$ctx1.fill(self,"updateMenu",{},$globals.HLToolListWidget)});
  4689. //>>excludeEnd("ctx");
  4690. },
  4691. //>>excludeStart("ide", pragmas.excludeIdeData);
  4692. args: [],
  4693. 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')",
  4694. referencedClasses: [],
  4695. //>>excludeEnd("ide");
  4696. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]
  4697. }),
  4698. $globals.HLToolListWidget);
  4699. $core.addMethod(
  4700. $core.method({
  4701. selector: "on:",
  4702. protocol: "instance creation",
  4703. fn: function (aModel){
  4704. var self=this,$self=this;
  4705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4706. return $core.withContext(function($ctx1) {
  4707. //>>excludeEnd("ctx");
  4708. var $1;
  4709. $1=$self._new();
  4710. $recv($1)._model_(aModel);
  4711. return $recv($1)._yourself();
  4712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4713. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},$globals.HLToolListWidget.a$cls)});
  4714. //>>excludeEnd("ctx");
  4715. },
  4716. //>>excludeStart("ide", pragmas.excludeIdeData);
  4717. args: ["aModel"],
  4718. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  4719. referencedClasses: [],
  4720. //>>excludeEnd("ide");
  4721. messageSends: ["model:", "new", "yourself"]
  4722. }),
  4723. $globals.HLToolListWidget.a$cls);
  4724. $core.addClass("HLTabListWidget", $globals.HLListWidget, ["callback"], "Helios-Core");
  4725. //>>excludeStart("ide", pragmas.excludeIdeData);
  4726. $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.";
  4727. //>>excludeEnd("ide");
  4728. $core.addMethod(
  4729. $core.method({
  4730. selector: "callback",
  4731. protocol: "accessing",
  4732. fn: function (){
  4733. var self=this,$self=this;
  4734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4735. return $core.withContext(function($ctx1) {
  4736. //>>excludeEnd("ctx");
  4737. var $1,$receiver;
  4738. $1=$self["@callback"];
  4739. if(($receiver = $1) == null || $receiver.a$nil){
  4740. return (function(){
  4741. });
  4742. } else {
  4743. return $1;
  4744. }
  4745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4746. }, function($ctx1) {$ctx1.fill(self,"callback",{},$globals.HLTabListWidget)});
  4747. //>>excludeEnd("ctx");
  4748. },
  4749. //>>excludeStart("ide", pragmas.excludeIdeData);
  4750. args: [],
  4751. source: "callback\x0a\x09^ callback ifNil: [ [] ]",
  4752. referencedClasses: [],
  4753. //>>excludeEnd("ide");
  4754. messageSends: ["ifNil:"]
  4755. }),
  4756. $globals.HLTabListWidget);
  4757. $core.addMethod(
  4758. $core.method({
  4759. selector: "callback:",
  4760. protocol: "accessing",
  4761. fn: function (aBlock){
  4762. var self=this,$self=this;
  4763. $self["@callback"]=aBlock;
  4764. return self;
  4765. },
  4766. //>>excludeStart("ide", pragmas.excludeIdeData);
  4767. args: ["aBlock"],
  4768. source: "callback: aBlock\x0a\x09callback := aBlock",
  4769. referencedClasses: [],
  4770. //>>excludeEnd("ide");
  4771. messageSends: []
  4772. }),
  4773. $globals.HLTabListWidget);
  4774. $core.addMethod(
  4775. $core.method({
  4776. selector: "renderItemLabel:on:",
  4777. protocol: "rendering",
  4778. fn: function (aTab,html){
  4779. var self=this,$self=this;
  4780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4781. return $core.withContext(function($ctx1) {
  4782. //>>excludeEnd("ctx");
  4783. var $1;
  4784. $1=$recv(html)._span();
  4785. $recv($1)._class_($recv(aTab)._cssClass());
  4786. $recv($1)._with_($recv(aTab)._label());
  4787. return self;
  4788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4789. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aTab:aTab,html:html},$globals.HLTabListWidget)});
  4790. //>>excludeEnd("ctx");
  4791. },
  4792. //>>excludeStart("ide", pragmas.excludeIdeData);
  4793. args: ["aTab", "html"],
  4794. source: "renderItemLabel: aTab on: html\x0a\x09html span\x0a\x09\x09class: aTab cssClass;\x0a\x09\x09with: aTab label",
  4795. referencedClasses: [],
  4796. //>>excludeEnd("ide");
  4797. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  4798. }),
  4799. $globals.HLTabListWidget);
  4800. $core.addMethod(
  4801. $core.method({
  4802. selector: "selectItem:",
  4803. protocol: "actions",
  4804. fn: function (aTab){
  4805. var self=this,$self=this;
  4806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4807. return $core.withContext(function($ctx1) {
  4808. //>>excludeEnd("ctx");
  4809. (
  4810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4811. $ctx1.supercall = true,
  4812. //>>excludeEnd("ctx");
  4813. ($globals.HLTabListWidget.superclass||$boot.nilAsClass).fn.prototype._selectItem_.apply($self, [aTab]));
  4814. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4815. $ctx1.supercall = false;
  4816. //>>excludeEnd("ctx");;
  4817. $recv($self._callback())._value_(aTab);
  4818. return self;
  4819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4820. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aTab:aTab},$globals.HLTabListWidget)});
  4821. //>>excludeEnd("ctx");
  4822. },
  4823. //>>excludeStart("ide", pragmas.excludeIdeData);
  4824. args: ["aTab"],
  4825. source: "selectItem: aTab\x0a\x09super selectItem: aTab.\x0a\x09self callback value: aTab",
  4826. referencedClasses: [],
  4827. //>>excludeEnd("ide");
  4828. messageSends: ["selectItem:", "value:", "callback"]
  4829. }),
  4830. $globals.HLTabListWidget);
  4831. $core.addClass("HLInformationWidget", $globals.HLWidget, ["informationString"], "Helios-Core");
  4832. //>>excludeStart("ide", pragmas.excludeIdeData);
  4833. $globals.HLInformationWidget.comment="I display an information dialog.\x0a\x0a## API\x0a\x0a`HLWidget >> #inform:` is a convenience method for creating information dialogs.";
  4834. //>>excludeEnd("ide");
  4835. $core.addMethod(
  4836. $core.method({
  4837. selector: "informationString",
  4838. protocol: "accessing",
  4839. fn: function (){
  4840. var self=this,$self=this;
  4841. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4842. return $core.withContext(function($ctx1) {
  4843. //>>excludeEnd("ctx");
  4844. var $1,$receiver;
  4845. $1=$self["@informationString"];
  4846. if(($receiver = $1) == null || $receiver.a$nil){
  4847. return "";
  4848. } else {
  4849. return $1;
  4850. }
  4851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4852. }, function($ctx1) {$ctx1.fill(self,"informationString",{},$globals.HLInformationWidget)});
  4853. //>>excludeEnd("ctx");
  4854. },
  4855. //>>excludeStart("ide", pragmas.excludeIdeData);
  4856. args: [],
  4857. source: "informationString\x0a\x09^ informationString ifNil: [ '' ]",
  4858. referencedClasses: [],
  4859. //>>excludeEnd("ide");
  4860. messageSends: ["ifNil:"]
  4861. }),
  4862. $globals.HLInformationWidget);
  4863. $core.addMethod(
  4864. $core.method({
  4865. selector: "informationString:",
  4866. protocol: "accessing",
  4867. fn: function (anObject){
  4868. var self=this,$self=this;
  4869. $self["@informationString"]=anObject;
  4870. return self;
  4871. },
  4872. //>>excludeStart("ide", pragmas.excludeIdeData);
  4873. args: ["anObject"],
  4874. source: "informationString: anObject\x0a\x09informationString := anObject",
  4875. referencedClasses: [],
  4876. //>>excludeEnd("ide");
  4877. messageSends: []
  4878. }),
  4879. $globals.HLInformationWidget);
  4880. $core.addMethod(
  4881. $core.method({
  4882. selector: "remove",
  4883. protocol: "actions",
  4884. fn: function (){
  4885. var self=this,$self=this;
  4886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4887. return $core.withContext(function($ctx1) {
  4888. //>>excludeEnd("ctx");
  4889. var $2,$1;
  4890. $recv((function(){
  4891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4892. return $core.withContext(function($ctx2) {
  4893. //>>excludeEnd("ctx");
  4894. $2=$self._wrapper();
  4895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4896. $ctx2.sendIdx["wrapper"]=1;
  4897. //>>excludeEnd("ctx");
  4898. $1=$recv($2)._asJQuery();
  4899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4900. $ctx2.sendIdx["asJQuery"]=1;
  4901. //>>excludeEnd("ctx");
  4902. $recv($1)._fadeOut_((100));
  4903. return $recv((function(){
  4904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4905. return $core.withContext(function($ctx3) {
  4906. //>>excludeEnd("ctx");
  4907. return $recv($recv($self._wrapper())._asJQuery())._remove();
  4908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4909. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4910. //>>excludeEnd("ctx");
  4911. }))._valueWithTimeout_((400));
  4912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4913. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4914. //>>excludeEnd("ctx");
  4915. }))._valueWithTimeout_((1500));
  4916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4917. $ctx1.sendIdx["valueWithTimeout:"]=1;
  4918. //>>excludeEnd("ctx");
  4919. return self;
  4920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4921. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLInformationWidget)});
  4922. //>>excludeEnd("ctx");
  4923. },
  4924. //>>excludeStart("ide", pragmas.excludeIdeData);
  4925. args: [],
  4926. 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",
  4927. referencedClasses: [],
  4928. //>>excludeEnd("ide");
  4929. messageSends: ["valueWithTimeout:", "fadeOut:", "asJQuery", "wrapper", "remove"]
  4930. }),
  4931. $globals.HLInformationWidget);
  4932. $core.addMethod(
  4933. $core.method({
  4934. selector: "renderContentOn:",
  4935. protocol: "rendering",
  4936. fn: function (html){
  4937. var self=this,$self=this;
  4938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4939. return $core.withContext(function($ctx1) {
  4940. //>>excludeEnd("ctx");
  4941. var $1;
  4942. $1=$recv(html)._div();
  4943. $recv($1)._class_("growl");
  4944. $recv($1)._with_($self._informationString());
  4945. $self._remove();
  4946. return self;
  4947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4948. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLInformationWidget)});
  4949. //>>excludeEnd("ctx");
  4950. },
  4951. //>>excludeStart("ide", pragmas.excludeIdeData);
  4952. args: ["html"],
  4953. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'growl'; \x0a\x09\x09with: self informationString.\x0a\x09\x09\x0a\x09self remove",
  4954. referencedClasses: [],
  4955. //>>excludeEnd("ide");
  4956. messageSends: ["class:", "div", "with:", "informationString", "remove"]
  4957. }),
  4958. $globals.HLInformationWidget);
  4959. $core.addMethod(
  4960. $core.method({
  4961. selector: "show",
  4962. protocol: "actions",
  4963. fn: function (){
  4964. var self=this,$self=this;
  4965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4966. return $core.withContext(function($ctx1) {
  4967. //>>excludeEnd("ctx");
  4968. $self._appendToJQuery_("body"._asJQuery());
  4969. return self;
  4970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4971. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLInformationWidget)});
  4972. //>>excludeEnd("ctx");
  4973. },
  4974. //>>excludeStart("ide", pragmas.excludeIdeData);
  4975. args: [],
  4976. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  4977. referencedClasses: [],
  4978. //>>excludeEnd("ide");
  4979. messageSends: ["appendToJQuery:", "asJQuery"]
  4980. }),
  4981. $globals.HLInformationWidget);
  4982. $core.addClass("HLManager", $globals.HLWidget, ["tabsWidget", "environment", "history", "announcer", "rendered"], "Helios-Core");
  4983. //>>excludeStart("ide", pragmas.excludeIdeData);
  4984. $globals.HLManager.comment="HLManager is the entry point Class of Helios.\x0a\x0aIts `singleton` instance is created on startup, and rendered on body.";
  4985. //>>excludeEnd("ide");
  4986. $core.addMethod(
  4987. $core.method({
  4988. selector: "activate:",
  4989. protocol: "actions",
  4990. fn: function (aTab){
  4991. var self=this,$self=this;
  4992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4993. return $core.withContext(function($ctx1) {
  4994. //>>excludeEnd("ctx");
  4995. $recv($self._tabsWidget())._activate_(aTab);
  4996. return self;
  4997. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4998. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLManager)});
  4999. //>>excludeEnd("ctx");
  5000. },
  5001. //>>excludeStart("ide", pragmas.excludeIdeData);
  5002. args: ["aTab"],
  5003. source: "activate: aTab\x0a\x09self tabsWidget activate: aTab",
  5004. referencedClasses: [],
  5005. //>>excludeEnd("ide");
  5006. messageSends: ["activate:", "tabsWidget"]
  5007. }),
  5008. $globals.HLManager);
  5009. $core.addMethod(
  5010. $core.method({
  5011. selector: "activeTab",
  5012. protocol: "accessing",
  5013. fn: function (){
  5014. var self=this,$self=this;
  5015. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5016. return $core.withContext(function($ctx1) {
  5017. //>>excludeEnd("ctx");
  5018. return $recv($self._tabsWidget())._activeTab();
  5019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5020. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},$globals.HLManager)});
  5021. //>>excludeEnd("ctx");
  5022. },
  5023. //>>excludeStart("ide", pragmas.excludeIdeData);
  5024. args: [],
  5025. source: "activeTab\x0a\x09^ self tabsWidget activeTab",
  5026. referencedClasses: [],
  5027. //>>excludeEnd("ide");
  5028. messageSends: ["activeTab", "tabsWidget"]
  5029. }),
  5030. $globals.HLManager);
  5031. $core.addMethod(
  5032. $core.method({
  5033. selector: "addTab:",
  5034. protocol: "actions",
  5035. fn: function (aTab){
  5036. var self=this,$self=this;
  5037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5038. return $core.withContext(function($ctx1) {
  5039. //>>excludeEnd("ctx");
  5040. $recv($self._tabsWidget())._addTab_(aTab);
  5041. return self;
  5042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5043. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLManager)});
  5044. //>>excludeEnd("ctx");
  5045. },
  5046. //>>excludeStart("ide", pragmas.excludeIdeData);
  5047. args: ["aTab"],
  5048. source: "addTab: aTab\x0a\x09self tabsWidget addTab: aTab",
  5049. referencedClasses: [],
  5050. //>>excludeEnd("ide");
  5051. messageSends: ["addTab:", "tabsWidget"]
  5052. }),
  5053. $globals.HLManager);
  5054. $core.addMethod(
  5055. $core.method({
  5056. selector: "announcer",
  5057. protocol: "accessing",
  5058. fn: function (){
  5059. var self=this,$self=this;
  5060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5061. return $core.withContext(function($ctx1) {
  5062. //>>excludeEnd("ctx");
  5063. var $1,$receiver;
  5064. $1=$self["@announcer"];
  5065. if(($receiver = $1) == null || $receiver.a$nil){
  5066. $self["@announcer"]=$recv($globals.Announcer)._new();
  5067. return $self["@announcer"];
  5068. } else {
  5069. return $1;
  5070. }
  5071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5072. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLManager)});
  5073. //>>excludeEnd("ctx");
  5074. },
  5075. //>>excludeStart("ide", pragmas.excludeIdeData);
  5076. args: [],
  5077. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  5078. referencedClasses: ["Announcer"],
  5079. //>>excludeEnd("ide");
  5080. messageSends: ["ifNil:", "new"]
  5081. }),
  5082. $globals.HLManager);
  5083. $core.addMethod(
  5084. $core.method({
  5085. selector: "confirm:ifFalse:",
  5086. protocol: "actions",
  5087. fn: function (aString,aBlock){
  5088. var self=this,$self=this;
  5089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5090. return $core.withContext(function($ctx1) {
  5091. //>>excludeEnd("ctx");
  5092. $self._confirm_ifTrue_ifFalse_(aString,(function(){
  5093. }),aBlock);
  5094. return self;
  5095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5096. }, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5097. //>>excludeEnd("ctx");
  5098. },
  5099. //>>excludeStart("ide", pragmas.excludeIdeData);
  5100. args: ["aString", "aBlock"],
  5101. source: "confirm: aString ifFalse: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: []\x0a\x09\x09ifFalse: aBlock",
  5102. referencedClasses: [],
  5103. //>>excludeEnd("ide");
  5104. messageSends: ["confirm:ifTrue:ifFalse:"]
  5105. }),
  5106. $globals.HLManager);
  5107. $core.addMethod(
  5108. $core.method({
  5109. selector: "confirm:ifTrue:",
  5110. protocol: "actions",
  5111. fn: function (aString,aBlock){
  5112. var self=this,$self=this;
  5113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5114. return $core.withContext(function($ctx1) {
  5115. //>>excludeEnd("ctx");
  5116. $self._confirm_ifTrue_ifFalse_(aString,aBlock,(function(){
  5117. }));
  5118. return self;
  5119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5120. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5121. //>>excludeEnd("ctx");
  5122. },
  5123. //>>excludeStart("ide", pragmas.excludeIdeData);
  5124. args: ["aString", "aBlock"],
  5125. source: "confirm: aString ifTrue: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: []",
  5126. referencedClasses: [],
  5127. //>>excludeEnd("ide");
  5128. messageSends: ["confirm:ifTrue:ifFalse:"]
  5129. }),
  5130. $globals.HLManager);
  5131. $core.addMethod(
  5132. $core.method({
  5133. selector: "confirm:ifTrue:ifFalse:",
  5134. protocol: "actions",
  5135. fn: function (aString,aBlock,anotherBlock){
  5136. var self=this,$self=this;
  5137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5138. return $core.withContext(function($ctx1) {
  5139. //>>excludeEnd("ctx");
  5140. var $1;
  5141. $1=$recv($globals.HLConfirmationWidget)._new();
  5142. $recv($1)._confirmationString_(aString);
  5143. $recv($1)._actionBlock_(aBlock);
  5144. $recv($1)._cancelBlock_(anotherBlock);
  5145. $recv($1)._show();
  5146. return self;
  5147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5148. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLManager)});
  5149. //>>excludeEnd("ctx");
  5150. },
  5151. //>>excludeStart("ide", pragmas.excludeIdeData);
  5152. args: ["aString", "aBlock", "anotherBlock"],
  5153. 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",
  5154. referencedClasses: ["HLConfirmationWidget"],
  5155. //>>excludeEnd("ide");
  5156. messageSends: ["confirmationString:", "new", "actionBlock:", "cancelBlock:", "show"]
  5157. }),
  5158. $globals.HLManager);
  5159. $core.addMethod(
  5160. $core.method({
  5161. selector: "defaultEnvironment",
  5162. protocol: "defaults",
  5163. fn: function (){
  5164. var self=this,$self=this;
  5165. var parent,parentSmalltalkGlobals;
  5166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5167. return $core.withContext(function($ctx1) {
  5168. //>>excludeEnd("ctx");
  5169. var $1,$2,$3,$5,$4,$6,$7,$8,$receiver;
  5170. $1=$recv(window)._opener();
  5171. if(($receiver = $1) == null || $receiver.a$nil){
  5172. parent=$recv(window)._parent();
  5173. } else {
  5174. parent=$1;
  5175. }
  5176. $2=parent;
  5177. if(($receiver = $2) == null || $receiver.a$nil){
  5178. $3=$recv($globals.Environment)._new();
  5179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5180. $ctx1.sendIdx["new"]=1;
  5181. //>>excludeEnd("ctx");
  5182. return $3;
  5183. } else {
  5184. $2;
  5185. }
  5186. $recv((function(){
  5187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5188. return $core.withContext(function($ctx2) {
  5189. //>>excludeEnd("ctx");
  5190. $5=$recv(parent)._at_("requirejs");
  5191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5192. $ctx2.sendIdx["at:"]=2;
  5193. //>>excludeEnd("ctx");
  5194. $4=$recv($5)._value_("amber/boot");
  5195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5196. $ctx2.sendIdx["value:"]=1;
  5197. //>>excludeEnd("ctx");
  5198. parentSmalltalkGlobals=$recv($4)._at_("globals");
  5199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5200. $ctx2.sendIdx["at:"]=1;
  5201. //>>excludeEnd("ctx");
  5202. return parentSmalltalkGlobals;
  5203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5204. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5205. //>>excludeEnd("ctx");
  5206. }))._on_do_($globals.Error,(function(){
  5207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5208. return $core.withContext(function($ctx2) {
  5209. //>>excludeEnd("ctx");
  5210. $6=$recv(parent)._at_("requirejs");
  5211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5212. $ctx2.sendIdx["at:"]=3;
  5213. //>>excludeEnd("ctx");
  5214. parentSmalltalkGlobals=$recv($6)._value_("amber_vm/globals");
  5215. return parentSmalltalkGlobals;
  5216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5217. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  5218. //>>excludeEnd("ctx");
  5219. }));
  5220. $7=parentSmalltalkGlobals;
  5221. if(($receiver = $7) == null || $receiver.a$nil){
  5222. $8=$recv($globals.Environment)._new();
  5223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5224. $ctx1.sendIdx["new"]=2;
  5225. //>>excludeEnd("ctx");
  5226. return $8;
  5227. } else {
  5228. $7;
  5229. }
  5230. $self._handleLossOfEnvironmentWithParent_(parent);
  5231. return $recv($recv(parentSmalltalkGlobals)._at_("Environment"))._new();
  5232. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5233. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalkGlobals:parentSmalltalkGlobals},$globals.HLManager)});
  5234. //>>excludeEnd("ctx");
  5235. },
  5236. //>>excludeStart("ide", pragmas.excludeIdeData);
  5237. args: [],
  5238. 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",
  5239. referencedClasses: ["Environment", "Error"],
  5240. //>>excludeEnd("ide");
  5241. messageSends: ["ifNil:", "opener", "parent", "new", "on:do:", "at:", "value:", "handleLossOfEnvironmentWithParent:"]
  5242. }),
  5243. $globals.HLManager);
  5244. $core.addMethod(
  5245. $core.method({
  5246. selector: "environment",
  5247. protocol: "accessing",
  5248. fn: function (){
  5249. var self=this,$self=this;
  5250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5251. return $core.withContext(function($ctx1) {
  5252. //>>excludeEnd("ctx");
  5253. var $1,$receiver;
  5254. $1=$self["@environment"];
  5255. if(($receiver = $1) == null || $receiver.a$nil){
  5256. $self["@environment"]=$self._defaultEnvironment();
  5257. return $self["@environment"];
  5258. } else {
  5259. return $1;
  5260. }
  5261. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5262. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLManager)});
  5263. //>>excludeEnd("ctx");
  5264. },
  5265. //>>excludeStart("ide", pragmas.excludeIdeData);
  5266. args: [],
  5267. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  5268. referencedClasses: [],
  5269. //>>excludeEnd("ide");
  5270. messageSends: ["ifNil:", "defaultEnvironment"]
  5271. }),
  5272. $globals.HLManager);
  5273. $core.addMethod(
  5274. $core.method({
  5275. selector: "environment:",
  5276. protocol: "accessing",
  5277. fn: function (anEnvironment){
  5278. var self=this,$self=this;
  5279. $self["@environment"]=anEnvironment;
  5280. return self;
  5281. },
  5282. //>>excludeStart("ide", pragmas.excludeIdeData);
  5283. args: ["anEnvironment"],
  5284. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  5285. referencedClasses: [],
  5286. //>>excludeEnd("ide");
  5287. messageSends: []
  5288. }),
  5289. $globals.HLManager);
  5290. $core.addMethod(
  5291. $core.method({
  5292. selector: "handleLossOfEnvironmentWithParent:",
  5293. protocol: "actions",
  5294. fn: function (parent){
  5295. var self=this,$self=this;
  5296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5297. return $core.withContext(function($ctx1) {
  5298. //>>excludeEnd("ctx");
  5299. $recv(parent)._at_put_("onunload",(function(){
  5300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5301. return $core.withContext(function($ctx2) {
  5302. //>>excludeEnd("ctx");
  5303. $self._removeBeforeUnloadMessage();
  5304. return $recv(window)._close();
  5305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5306. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5307. //>>excludeEnd("ctx");
  5308. }));
  5309. return self;
  5310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5311. }, function($ctx1) {$ctx1.fill(self,"handleLossOfEnvironmentWithParent:",{parent:parent},$globals.HLManager)});
  5312. //>>excludeEnd("ctx");
  5313. },
  5314. //>>excludeStart("ide", pragmas.excludeIdeData);
  5315. args: ["parent"],
  5316. source: "handleLossOfEnvironmentWithParent: parent\x0a\x09parent at: 'onunload' put: [ \x0a\x09\x09self removeBeforeUnloadMessage.\x0a\x09\x09window close ]",
  5317. referencedClasses: [],
  5318. //>>excludeEnd("ide");
  5319. messageSends: ["at:put:", "removeBeforeUnloadMessage", "close"]
  5320. }),
  5321. $globals.HLManager);
  5322. $core.addMethod(
  5323. $core.method({
  5324. selector: "history",
  5325. protocol: "accessing",
  5326. fn: function (){
  5327. var self=this,$self=this;
  5328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5329. return $core.withContext(function($ctx1) {
  5330. //>>excludeEnd("ctx");
  5331. var $1,$receiver;
  5332. $1=$self["@history"];
  5333. if(($receiver = $1) == null || $receiver.a$nil){
  5334. $self["@history"]=$recv($globals.OrderedCollection)._new();
  5335. return $self["@history"];
  5336. } else {
  5337. return $1;
  5338. }
  5339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5340. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLManager)});
  5341. //>>excludeEnd("ctx");
  5342. },
  5343. //>>excludeStart("ide", pragmas.excludeIdeData);
  5344. args: [],
  5345. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  5346. referencedClasses: ["OrderedCollection"],
  5347. //>>excludeEnd("ide");
  5348. messageSends: ["ifNil:", "new"]
  5349. }),
  5350. $globals.HLManager);
  5351. $core.addMethod(
  5352. $core.method({
  5353. selector: "history:",
  5354. protocol: "accessing",
  5355. fn: function (aCollection){
  5356. var self=this,$self=this;
  5357. $self["@history"]=aCollection;
  5358. return self;
  5359. },
  5360. //>>excludeStart("ide", pragmas.excludeIdeData);
  5361. args: ["aCollection"],
  5362. source: "history: aCollection\x0a\x09history := aCollection",
  5363. referencedClasses: [],
  5364. //>>excludeEnd("ide");
  5365. messageSends: []
  5366. }),
  5367. $globals.HLManager);
  5368. $core.addMethod(
  5369. $core.method({
  5370. selector: "inform:",
  5371. protocol: "actions",
  5372. fn: function (aString){
  5373. var self=this,$self=this;
  5374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5375. return $core.withContext(function($ctx1) {
  5376. //>>excludeEnd("ctx");
  5377. var $1;
  5378. $1=$recv($globals.HLInformationWidget)._new();
  5379. $recv($1)._informationString_(aString);
  5380. $recv($1)._show();
  5381. return self;
  5382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5383. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLManager)});
  5384. //>>excludeEnd("ctx");
  5385. },
  5386. //>>excludeStart("ide", pragmas.excludeIdeData);
  5387. args: ["aString"],
  5388. source: "inform: aString\x0a\x09HLInformationWidget new\x0a\x09\x09informationString: aString;\x0a\x09\x09show",
  5389. referencedClasses: ["HLInformationWidget"],
  5390. //>>excludeEnd("ide");
  5391. messageSends: ["informationString:", "new", "show"]
  5392. }),
  5393. $globals.HLManager);
  5394. $core.addMethod(
  5395. $core.method({
  5396. selector: "initialize",
  5397. protocol: "initialization",
  5398. fn: function (){
  5399. var self=this,$self=this;
  5400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5401. return $core.withContext(function($ctx1) {
  5402. //>>excludeEnd("ctx");
  5403. (
  5404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5405. $ctx1.supercall = true,
  5406. //>>excludeEnd("ctx");
  5407. ($globals.HLManager.superclass||$boot.nilAsClass).fn.prototype._initialize.apply($self, []));
  5408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5409. $ctx1.supercall = false;
  5410. //>>excludeEnd("ctx");;
  5411. $self["@rendered"]=false;
  5412. return self;
  5413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5414. }, function($ctx1) {$ctx1.fill(self,"initialize",{},$globals.HLManager)});
  5415. //>>excludeEnd("ctx");
  5416. },
  5417. //>>excludeStart("ide", pragmas.excludeIdeData);
  5418. args: [],
  5419. source: "initialize\x0a\x09super initialize.\x0a\x09rendered := false",
  5420. referencedClasses: [],
  5421. //>>excludeEnd("ide");
  5422. messageSends: ["initialize"]
  5423. }),
  5424. $globals.HLManager);
  5425. $core.addMethod(
  5426. $core.method({
  5427. selector: "keyBinder",
  5428. protocol: "accessing",
  5429. fn: function (){
  5430. var self=this,$self=this;
  5431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5432. return $core.withContext(function($ctx1) {
  5433. //>>excludeEnd("ctx");
  5434. return $recv($globals.HLKeyBinder)._current();
  5435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5436. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},$globals.HLManager)});
  5437. //>>excludeEnd("ctx");
  5438. },
  5439. //>>excludeStart("ide", pragmas.excludeIdeData);
  5440. args: [],
  5441. source: "keyBinder\x0a\x09^ HLKeyBinder current",
  5442. referencedClasses: ["HLKeyBinder"],
  5443. //>>excludeEnd("ide");
  5444. messageSends: ["current"]
  5445. }),
  5446. $globals.HLManager);
  5447. $core.addMethod(
  5448. $core.method({
  5449. selector: "registerErrorHandler",
  5450. protocol: "services",
  5451. fn: function (){
  5452. var self=this,$self=this;
  5453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5454. return $core.withContext(function($ctx1) {
  5455. //>>excludeEnd("ctx");
  5456. var $1,$2;
  5457. $1=$self._environment();
  5458. $2=$recv($globals.HLErrorHandler)._new();
  5459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5460. $ctx1.sendIdx["new"]=1;
  5461. //>>excludeEnd("ctx");
  5462. $recv($1)._registerErrorHandler_($2);
  5463. $recv($globals.ErrorHandler)._register_($recv($globals.HLErrorHandler)._new());
  5464. return self;
  5465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5466. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler",{},$globals.HLManager)});
  5467. //>>excludeEnd("ctx");
  5468. },
  5469. //>>excludeStart("ide", pragmas.excludeIdeData);
  5470. args: [],
  5471. source: "registerErrorHandler\x0a\x09self environment registerErrorHandler: HLErrorHandler new.\x0a\x09ErrorHandler register: HLErrorHandler new",
  5472. referencedClasses: ["HLErrorHandler", "ErrorHandler"],
  5473. //>>excludeEnd("ide");
  5474. messageSends: ["registerErrorHandler:", "environment", "new", "register:"]
  5475. }),
  5476. $globals.HLManager);
  5477. $core.addMethod(
  5478. $core.method({
  5479. selector: "registerFinder",
  5480. protocol: "services",
  5481. fn: function (){
  5482. var self=this,$self=this;
  5483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5484. return $core.withContext(function($ctx1) {
  5485. //>>excludeEnd("ctx");
  5486. var $1,$2;
  5487. $1=$self._environment();
  5488. $2=$recv($globals.HLFinder)._new();
  5489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5490. $ctx1.sendIdx["new"]=1;
  5491. //>>excludeEnd("ctx");
  5492. $recv($1)._registerFinder_($2);
  5493. $recv($globals.Finder)._register_($recv($globals.HLFinder)._new());
  5494. return self;
  5495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5496. }, function($ctx1) {$ctx1.fill(self,"registerFinder",{},$globals.HLManager)});
  5497. //>>excludeEnd("ctx");
  5498. },
  5499. //>>excludeStart("ide", pragmas.excludeIdeData);
  5500. args: [],
  5501. source: "registerFinder\x0a\x09self environment registerFinder: HLFinder new.\x0a\x09Finder register: HLFinder new",
  5502. referencedClasses: ["HLFinder", "Finder"],
  5503. //>>excludeEnd("ide");
  5504. messageSends: ["registerFinder:", "environment", "new", "register:"]
  5505. }),
  5506. $globals.HLManager);
  5507. $core.addMethod(
  5508. $core.method({
  5509. selector: "registerInspector",
  5510. protocol: "services",
  5511. fn: function (){
  5512. var self=this,$self=this;
  5513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5514. return $core.withContext(function($ctx1) {
  5515. //>>excludeEnd("ctx");
  5516. $recv($self._environment())._registerInspector_($globals.HLInspector);
  5517. $recv($globals.Inspector)._register_($globals.HLInspector);
  5518. return self;
  5519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5520. }, function($ctx1) {$ctx1.fill(self,"registerInspector",{},$globals.HLManager)});
  5521. //>>excludeEnd("ctx");
  5522. },
  5523. //>>excludeStart("ide", pragmas.excludeIdeData);
  5524. args: [],
  5525. source: "registerInspector\x0a\x09self environment registerInspector: HLInspector.\x0a\x09Inspector register: HLInspector",
  5526. referencedClasses: ["HLInspector", "Inspector"],
  5527. //>>excludeEnd("ide");
  5528. messageSends: ["registerInspector:", "environment", "register:"]
  5529. }),
  5530. $globals.HLManager);
  5531. $core.addMethod(
  5532. $core.method({
  5533. selector: "registerProgressHandler",
  5534. protocol: "services",
  5535. fn: function (){
  5536. var self=this,$self=this;
  5537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5538. return $core.withContext(function($ctx1) {
  5539. //>>excludeEnd("ctx");
  5540. var $1,$2;
  5541. $1=$self._environment();
  5542. $2=$recv($globals.HLProgressHandler)._new();
  5543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5544. $ctx1.sendIdx["new"]=1;
  5545. //>>excludeEnd("ctx");
  5546. $recv($1)._registerProgressHandler_($2);
  5547. $recv($globals.ProgressHandler)._register_($recv($globals.HLProgressHandler)._new());
  5548. return self;
  5549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5550. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler",{},$globals.HLManager)});
  5551. //>>excludeEnd("ctx");
  5552. },
  5553. //>>excludeStart("ide", pragmas.excludeIdeData);
  5554. args: [],
  5555. source: "registerProgressHandler\x0a\x09self environment registerProgressHandler: HLProgressHandler new.\x0a\x09ProgressHandler register: HLProgressHandler new",
  5556. referencedClasses: ["HLProgressHandler", "ProgressHandler"],
  5557. //>>excludeEnd("ide");
  5558. messageSends: ["registerProgressHandler:", "environment", "new", "register:"]
  5559. }),
  5560. $globals.HLManager);
  5561. $core.addMethod(
  5562. $core.method({
  5563. selector: "registerServices",
  5564. protocol: "private",
  5565. fn: function (){
  5566. var self=this,$self=this;
  5567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5568. return $core.withContext(function($ctx1) {
  5569. //>>excludeEnd("ctx");
  5570. $self._registerInspector();
  5571. $self._registerErrorHandler();
  5572. $self._registerProgressHandler();
  5573. $self._registerTranscript();
  5574. $self._registerFinder();
  5575. return self;
  5576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5577. }, function($ctx1) {$ctx1.fill(self,"registerServices",{},$globals.HLManager)});
  5578. //>>excludeEnd("ctx");
  5579. },
  5580. //>>excludeStart("ide", pragmas.excludeIdeData);
  5581. args: [],
  5582. source: "registerServices\x0a\x09self\x0a\x09\x09registerInspector;\x0a\x09\x09registerErrorHandler;\x0a\x09\x09registerProgressHandler;\x0a\x09\x09registerTranscript;\x0a\x09\x09registerFinder",
  5583. referencedClasses: [],
  5584. //>>excludeEnd("ide");
  5585. messageSends: ["registerInspector", "registerErrorHandler", "registerProgressHandler", "registerTranscript", "registerFinder"]
  5586. }),
  5587. $globals.HLManager);
  5588. $core.addMethod(
  5589. $core.method({
  5590. selector: "registerTranscript",
  5591. protocol: "services",
  5592. fn: function (){
  5593. var self=this,$self=this;
  5594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5595. return $core.withContext(function($ctx1) {
  5596. //>>excludeEnd("ctx");
  5597. $recv($self._environment())._registerTranscript_($globals.HLTranscriptHandler);
  5598. return self;
  5599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5600. }, function($ctx1) {$ctx1.fill(self,"registerTranscript",{},$globals.HLManager)});
  5601. //>>excludeEnd("ctx");
  5602. },
  5603. //>>excludeStart("ide", pragmas.excludeIdeData);
  5604. args: [],
  5605. source: "registerTranscript\x0a\x09self environment registerTranscript: HLTranscriptHandler",
  5606. referencedClasses: ["HLTranscriptHandler"],
  5607. //>>excludeEnd("ide");
  5608. messageSends: ["registerTranscript:", "environment"]
  5609. }),
  5610. $globals.HLManager);
  5611. $core.addMethod(
  5612. $core.method({
  5613. selector: "removeActiveTab",
  5614. protocol: "actions",
  5615. fn: function (){
  5616. var self=this,$self=this;
  5617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5618. return $core.withContext(function($ctx1) {
  5619. //>>excludeEnd("ctx");
  5620. $recv($self._tabsWidget())._removeActiveTab();
  5621. return self;
  5622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5623. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLManager)});
  5624. //>>excludeEnd("ctx");
  5625. },
  5626. //>>excludeStart("ide", pragmas.excludeIdeData);
  5627. args: [],
  5628. source: "removeActiveTab\x0a\x09self tabsWidget removeActiveTab",
  5629. referencedClasses: [],
  5630. //>>excludeEnd("ide");
  5631. messageSends: ["removeActiveTab", "tabsWidget"]
  5632. }),
  5633. $globals.HLManager);
  5634. $core.addMethod(
  5635. $core.method({
  5636. selector: "removeBeforeUnloadMessage",
  5637. protocol: "actions",
  5638. fn: function (){
  5639. var self=this,$self=this;
  5640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5641. return $core.withContext(function($ctx1) {
  5642. //>>excludeEnd("ctx");
  5643. window.onbeforeunload = null;
  5644. return self;
  5645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5646. }, function($ctx1) {$ctx1.fill(self,"removeBeforeUnloadMessage",{},$globals.HLManager)});
  5647. //>>excludeEnd("ctx");
  5648. },
  5649. //>>excludeStart("ide", pragmas.excludeIdeData);
  5650. args: [],
  5651. source: "removeBeforeUnloadMessage\x0a\x09<inlineJS: 'window.onbeforeunload = null'>",
  5652. referencedClasses: [],
  5653. //>>excludeEnd("ide");
  5654. messageSends: []
  5655. }),
  5656. $globals.HLManager);
  5657. $core.addMethod(
  5658. $core.method({
  5659. selector: "removeTabForWidget:",
  5660. protocol: "actions",
  5661. fn: function (aWidget){
  5662. var self=this,$self=this;
  5663. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5664. return $core.withContext(function($ctx1) {
  5665. //>>excludeEnd("ctx");
  5666. $recv($self._tabsWidget())._removeTabForWidget_(aWidget);
  5667. return self;
  5668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5669. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLManager)});
  5670. //>>excludeEnd("ctx");
  5671. },
  5672. //>>excludeStart("ide", pragmas.excludeIdeData);
  5673. args: ["aWidget"],
  5674. source: "removeTabForWidget: aWidget\x0a\x09self tabsWidget removeTabForWidget: aWidget",
  5675. referencedClasses: [],
  5676. //>>excludeEnd("ide");
  5677. messageSends: ["removeTabForWidget:", "tabsWidget"]
  5678. }),
  5679. $globals.HLManager);
  5680. $core.addMethod(
  5681. $core.method({
  5682. selector: "renderContentOn:",
  5683. protocol: "rendering",
  5684. fn: function (html){
  5685. var self=this,$self=this;
  5686. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5687. return $core.withContext(function($ctx1) {
  5688. //>>excludeEnd("ctx");
  5689. $recv(html)._with_($self._tabsWidget());
  5690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5691. $ctx1.sendIdx["with:"]=1;
  5692. //>>excludeEnd("ctx");
  5693. $recv(html)._with_($recv($globals.HLWelcomeWidget)._new());
  5694. $self._renderDefaultTabs();
  5695. $self["@rendered"]=true;
  5696. return self;
  5697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5698. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLManager)});
  5699. //>>excludeEnd("ctx");
  5700. },
  5701. //>>excludeStart("ide", pragmas.excludeIdeData);
  5702. args: ["html"],
  5703. source: "renderContentOn: html\x0a\x09html with: self tabsWidget.\x0a\x09html with: HLWelcomeWidget new.\x0a\x09\x0a\x09self renderDefaultTabs.\x0a\x09rendered := true",
  5704. referencedClasses: ["HLWelcomeWidget"],
  5705. //>>excludeEnd("ide");
  5706. messageSends: ["with:", "tabsWidget", "new", "renderDefaultTabs"]
  5707. }),
  5708. $globals.HLManager);
  5709. $core.addMethod(
  5710. $core.method({
  5711. selector: "renderDefaultTabs",
  5712. protocol: "rendering",
  5713. fn: function (){
  5714. var self=this,$self=this;
  5715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5716. return $core.withContext(function($ctx1) {
  5717. //>>excludeEnd("ctx");
  5718. var $1;
  5719. $1=$self["@rendered"];
  5720. if(!$core.assert($1)){
  5721. $recv($globals.HLWorkspace)._openAsTab();
  5722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5723. $ctx1.sendIdx["openAsTab"]=1;
  5724. //>>excludeEnd("ctx");
  5725. $recv($globals.HLBrowser)._openAsTab();
  5726. }
  5727. return self;
  5728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5729. }, function($ctx1) {$ctx1.fill(self,"renderDefaultTabs",{},$globals.HLManager)});
  5730. //>>excludeEnd("ctx");
  5731. },
  5732. //>>excludeStart("ide", pragmas.excludeIdeData);
  5733. args: [],
  5734. source: "renderDefaultTabs\x0a\x09rendered ifFalse: [\x0a\x09\x09HLWorkspace openAsTab.\x0a\x09\x09HLBrowser openAsTab ]",
  5735. referencedClasses: ["HLWorkspace", "HLBrowser"],
  5736. //>>excludeEnd("ide");
  5737. messageSends: ["ifFalse:", "openAsTab"]
  5738. }),
  5739. $globals.HLManager);
  5740. $core.addMethod(
  5741. $core.method({
  5742. selector: "request:do:",
  5743. protocol: "actions",
  5744. fn: function (aString,aBlock){
  5745. var self=this,$self=this;
  5746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5747. return $core.withContext(function($ctx1) {
  5748. //>>excludeEnd("ctx");
  5749. $self._request_value_do_(aString,"",aBlock);
  5750. return self;
  5751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5752. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5753. //>>excludeEnd("ctx");
  5754. },
  5755. //>>excludeStart("ide", pragmas.excludeIdeData);
  5756. args: ["aString", "aBlock"],
  5757. source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
  5758. referencedClasses: [],
  5759. //>>excludeEnd("ide");
  5760. messageSends: ["request:value:do:"]
  5761. }),
  5762. $globals.HLManager);
  5763. $core.addMethod(
  5764. $core.method({
  5765. selector: "request:value:do:",
  5766. protocol: "actions",
  5767. fn: function (aString,valueString,aBlock){
  5768. var self=this,$self=this;
  5769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5770. return $core.withContext(function($ctx1) {
  5771. //>>excludeEnd("ctx");
  5772. var $1;
  5773. $1=$recv($globals.HLRequestWidget)._new();
  5774. $recv($1)._confirmationString_(aString);
  5775. $recv($1)._actionBlock_(aBlock);
  5776. $recv($1)._value_(valueString);
  5777. $recv($1)._show();
  5778. return self;
  5779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5780. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLManager)});
  5781. //>>excludeEnd("ctx");
  5782. },
  5783. //>>excludeStart("ide", pragmas.excludeIdeData);
  5784. args: ["aString", "valueString", "aBlock"],
  5785. 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",
  5786. referencedClasses: ["HLRequestWidget"],
  5787. //>>excludeEnd("ide");
  5788. messageSends: ["confirmationString:", "new", "actionBlock:", "value:", "show"]
  5789. }),
  5790. $globals.HLManager);
  5791. $core.addMethod(
  5792. $core.method({
  5793. selector: "setEditorTheme:",
  5794. protocol: "accessing",
  5795. fn: function (aTheme){
  5796. var self=this,$self=this;
  5797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5798. return $core.withContext(function($ctx1) {
  5799. //>>excludeEnd("ctx");
  5800. $recv("helios.editorTheme"._asSetting())._value_(aTheme);
  5801. return self;
  5802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5803. }, function($ctx1) {$ctx1.fill(self,"setEditorTheme:",{aTheme:aTheme},$globals.HLManager)});
  5804. //>>excludeEnd("ctx");
  5805. },
  5806. //>>excludeStart("ide", pragmas.excludeIdeData);
  5807. args: ["aTheme"],
  5808. source: "setEditorTheme: aTheme\x0a\x0a\x09'helios.editorTheme' asSetting value: aTheme",
  5809. referencedClasses: [],
  5810. //>>excludeEnd("ide");
  5811. messageSends: ["value:", "asSetting"]
  5812. }),
  5813. $globals.HLManager);
  5814. $core.addMethod(
  5815. $core.method({
  5816. selector: "setTheme:",
  5817. protocol: "accessing",
  5818. fn: function (aTheme){
  5819. var self=this,$self=this;
  5820. var currentTheme;
  5821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5822. return $core.withContext(function($ctx1) {
  5823. //>>excludeEnd("ctx");
  5824. var $1;
  5825. currentTheme="helios.theme"._asSettingIfAbsent_("default");
  5826. $1="body"._asJQuery();
  5827. $recv($1)._removeClass_($recv(currentTheme)._value());
  5828. $recv($1)._addClass_(aTheme);
  5829. $recv("helios.theme"._asSetting())._value_(aTheme);
  5830. return self;
  5831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5832. }, function($ctx1) {$ctx1.fill(self,"setTheme:",{aTheme:aTheme,currentTheme:currentTheme},$globals.HLManager)});
  5833. //>>excludeEnd("ctx");
  5834. },
  5835. //>>excludeStart("ide", pragmas.excludeIdeData);
  5836. args: ["aTheme"],
  5837. 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",
  5838. referencedClasses: [],
  5839. //>>excludeEnd("ide");
  5840. messageSends: ["asSettingIfAbsent:", "removeClass:", "asJQuery", "value", "addClass:", "value:", "asSetting"]
  5841. }),
  5842. $globals.HLManager);
  5843. $core.addMethod(
  5844. $core.method({
  5845. selector: "setup",
  5846. protocol: "initialization",
  5847. fn: function (){
  5848. var self=this,$self=this;
  5849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5850. return $core.withContext(function($ctx1) {
  5851. //>>excludeEnd("ctx");
  5852. var $1;
  5853. $self._registerServices();
  5854. $1=$self._setupEvents();
  5855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5856. $ctx1.sendIdx["setupEvents"]=1;
  5857. //>>excludeEnd("ctx");
  5858. $recv($self._keyBinder())._setupEvents();
  5859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5860. $ctx1.sendIdx["setupEvents"]=2;
  5861. //>>excludeEnd("ctx");
  5862. $recv($self._tabsWidget())._setupEvents();
  5863. $self._setupTheme();
  5864. $recv("#helper"._asJQuery())._fadeOut();
  5865. return self;
  5866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5867. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager)});
  5868. //>>excludeEnd("ctx");
  5869. },
  5870. //>>excludeStart("ide", pragmas.excludeIdeData);
  5871. args: [],
  5872. 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",
  5873. referencedClasses: [],
  5874. //>>excludeEnd("ide");
  5875. messageSends: ["registerServices", "setupEvents", "keyBinder", "tabsWidget", "setupTheme", "fadeOut", "asJQuery"]
  5876. }),
  5877. $globals.HLManager);
  5878. $core.addMethod(
  5879. $core.method({
  5880. selector: "setupEvents",
  5881. protocol: "private",
  5882. fn: function (){
  5883. var self=this,$self=this;
  5884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5885. return $core.withContext(function($ctx1) {
  5886. //>>excludeEnd("ctx");
  5887. var $1,$2,$3,$4,$5;
  5888. $1="body"._asJQuery();
  5889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5890. $ctx1.sendIdx["asJQuery"]=1;
  5891. //>>excludeEnd("ctx");
  5892. $recv($1)._keydown_((function(event){
  5893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5894. return $core.withContext(function($ctx2) {
  5895. //>>excludeEnd("ctx");
  5896. $2=$recv(event)._ctrlKey();
  5897. if($core.assert($2)){
  5898. $3="body"._asJQuery();
  5899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5900. $ctx2.sendIdx["asJQuery"]=2;
  5901. //>>excludeEnd("ctx");
  5902. return $recv($3)._addClass_("navigation");
  5903. }
  5904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5905. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  5906. //>>excludeEnd("ctx");
  5907. }));
  5908. $4="body"._asJQuery();
  5909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5910. $ctx1.sendIdx["asJQuery"]=3;
  5911. //>>excludeEnd("ctx");
  5912. $recv($4)._keyup_((function(event){
  5913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5914. return $core.withContext(function($ctx2) {
  5915. //>>excludeEnd("ctx");
  5916. $5="body"._asJQuery();
  5917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5918. $ctx2.sendIdx["asJQuery"]=4;
  5919. //>>excludeEnd("ctx");
  5920. return $recv($5)._removeClass_("navigation");
  5921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5922. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  5923. //>>excludeEnd("ctx");
  5924. }));
  5925. $recv($recv(window)._asJQuery())._resize_((function(event){
  5926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5927. return $core.withContext(function($ctx2) {
  5928. //>>excludeEnd("ctx");
  5929. return $self._refresh();
  5930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5931. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,4)});
  5932. //>>excludeEnd("ctx");
  5933. }));
  5934. return self;
  5935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5936. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLManager)});
  5937. //>>excludeEnd("ctx");
  5938. },
  5939. //>>excludeStart("ide", pragmas.excludeIdeData);
  5940. args: [],
  5941. 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 ]",
  5942. referencedClasses: [],
  5943. //>>excludeEnd("ide");
  5944. messageSends: ["keydown:", "asJQuery", "ifTrue:", "ctrlKey", "addClass:", "keyup:", "removeClass:", "resize:", "refresh"]
  5945. }),
  5946. $globals.HLManager);
  5947. $core.addMethod(
  5948. $core.method({
  5949. selector: "setupTheme",
  5950. protocol: "private",
  5951. fn: function (){
  5952. var self=this,$self=this;
  5953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5954. return $core.withContext(function($ctx1) {
  5955. //>>excludeEnd("ctx");
  5956. $self._setTheme_("default");
  5957. $self._setEditorTheme_("default");
  5958. return self;
  5959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5960. }, function($ctx1) {$ctx1.fill(self,"setupTheme",{},$globals.HLManager)});
  5961. //>>excludeEnd("ctx");
  5962. },
  5963. //>>excludeStart("ide", pragmas.excludeIdeData);
  5964. args: [],
  5965. 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'.",
  5966. referencedClasses: [],
  5967. //>>excludeEnd("ide");
  5968. messageSends: ["setTheme:", "setEditorTheme:"]
  5969. }),
  5970. $globals.HLManager);
  5971. $core.addMethod(
  5972. $core.method({
  5973. selector: "tabWidth",
  5974. protocol: "accessing",
  5975. fn: function (){
  5976. var self=this,$self=this;
  5977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5978. return $core.withContext(function($ctx1) {
  5979. //>>excludeEnd("ctx");
  5980. return $recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv($self._tabs())._size());
  5981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5982. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLManager)});
  5983. //>>excludeEnd("ctx");
  5984. },
  5985. //>>excludeStart("ide", pragmas.excludeIdeData);
  5986. args: [],
  5987. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  5988. referencedClasses: [],
  5989. //>>excludeEnd("ide");
  5990. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  5991. }),
  5992. $globals.HLManager);
  5993. $core.addMethod(
  5994. $core.method({
  5995. selector: "tabs",
  5996. protocol: "accessing",
  5997. fn: function (){
  5998. var self=this,$self=this;
  5999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6000. return $core.withContext(function($ctx1) {
  6001. //>>excludeEnd("ctx");
  6002. return $recv($self._tabsWidget())._tabs();
  6003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6004. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLManager)});
  6005. //>>excludeEnd("ctx");
  6006. },
  6007. //>>excludeStart("ide", pragmas.excludeIdeData);
  6008. args: [],
  6009. source: "tabs\x0a\x09^ self tabsWidget tabs",
  6010. referencedClasses: [],
  6011. //>>excludeEnd("ide");
  6012. messageSends: ["tabs", "tabsWidget"]
  6013. }),
  6014. $globals.HLManager);
  6015. $core.addMethod(
  6016. $core.method({
  6017. selector: "tabsWidget",
  6018. protocol: "accessing",
  6019. fn: function (){
  6020. var self=this,$self=this;
  6021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6022. return $core.withContext(function($ctx1) {
  6023. //>>excludeEnd("ctx");
  6024. var $1,$receiver;
  6025. $1=$self["@tabsWidget"];
  6026. if(($receiver = $1) == null || $receiver.a$nil){
  6027. $self["@tabsWidget"]=$recv($globals.HLTabsWidget)._new();
  6028. return $self["@tabsWidget"];
  6029. } else {
  6030. return $1;
  6031. }
  6032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6033. }, function($ctx1) {$ctx1.fill(self,"tabsWidget",{},$globals.HLManager)});
  6034. //>>excludeEnd("ctx");
  6035. },
  6036. //>>excludeStart("ide", pragmas.excludeIdeData);
  6037. args: [],
  6038. source: "tabsWidget\x0a\x09^ tabsWidget ifNil: [ tabsWidget := HLTabsWidget new ]",
  6039. referencedClasses: ["HLTabsWidget"],
  6040. //>>excludeEnd("ide");
  6041. messageSends: ["ifNil:", "new"]
  6042. }),
  6043. $globals.HLManager);
  6044. $globals.HLManager.a$cls.iVarNames = ["current"];
  6045. $core.addMethod(
  6046. $core.method({
  6047. selector: "current",
  6048. protocol: "accessing",
  6049. fn: function (){
  6050. var self=this,$self=this;
  6051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6052. return $core.withContext(function($ctx1) {
  6053. //>>excludeEnd("ctx");
  6054. var $1,$receiver;
  6055. $1=$self["@current"];
  6056. if(($receiver = $1) == null || $receiver.a$nil){
  6057. $self["@current"]=$recv($self._basicNew())._initialize();
  6058. return $self["@current"];
  6059. } else {
  6060. return $1;
  6061. }
  6062. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6063. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.HLManager.a$cls)});
  6064. //>>excludeEnd("ctx");
  6065. },
  6066. //>>excludeStart("ide", pragmas.excludeIdeData);
  6067. args: [],
  6068. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  6069. referencedClasses: [],
  6070. //>>excludeEnd("ide");
  6071. messageSends: ["ifNil:", "initialize", "basicNew"]
  6072. }),
  6073. $globals.HLManager.a$cls);
  6074. $core.addMethod(
  6075. $core.method({
  6076. selector: "new",
  6077. protocol: "instance creation",
  6078. fn: function (){
  6079. var self=this,$self=this;
  6080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6081. return $core.withContext(function($ctx1) {
  6082. //>>excludeEnd("ctx");
  6083. $self._shouldNotImplement();
  6084. return self;
  6085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6086. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.HLManager.a$cls)});
  6087. //>>excludeEnd("ctx");
  6088. },
  6089. //>>excludeStart("ide", pragmas.excludeIdeData);
  6090. args: [],
  6091. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  6092. referencedClasses: [],
  6093. //>>excludeEnd("ide");
  6094. messageSends: ["shouldNotImplement"]
  6095. }),
  6096. $globals.HLManager.a$cls);
  6097. $core.addMethod(
  6098. $core.method({
  6099. selector: "setup",
  6100. protocol: "initialization",
  6101. fn: function (){
  6102. var self=this,$self=this;
  6103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6104. return $core.withContext(function($ctx1) {
  6105. //>>excludeEnd("ctx");
  6106. var $1,$2;
  6107. $1=$self._current();
  6108. $recv($1)._setup();
  6109. $recv($1)._appendToJQuery_("body"._asJQuery());
  6110. $2="helios.confirmOnExit"._settingValueIfAbsent_(true);
  6111. if($core.assert($2)){
  6112. $recv(window)._onbeforeunload_((function(){
  6113. return "Do you want to close Amber? All uncommitted changes will be lost.";
  6114. }));
  6115. }
  6116. return self;
  6117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6118. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager.a$cls)});
  6119. //>>excludeEnd("ctx");
  6120. },
  6121. //>>excludeStart("ide", pragmas.excludeIdeData);
  6122. args: [],
  6123. 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.' ] ]",
  6124. referencedClasses: [],
  6125. //>>excludeEnd("ide");
  6126. messageSends: ["setup", "current", "appendToJQuery:", "asJQuery", "ifTrue:", "settingValueIfAbsent:", "onbeforeunload:"]
  6127. }),
  6128. $globals.HLManager.a$cls);
  6129. $core.addClass("HLModalWidget", $globals.HLWidget, [], "Helios-Core");
  6130. //>>excludeStart("ide", pragmas.excludeIdeData);
  6131. $globals.HLModalWidget.comment="I implement an abstract modal widget.";
  6132. //>>excludeEnd("ide");
  6133. $core.addMethod(
  6134. $core.method({
  6135. selector: "giveFocusToButton:",
  6136. protocol: "private",
  6137. fn: function (aButton){
  6138. var self=this,$self=this;
  6139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6140. return $core.withContext(function($ctx1) {
  6141. //>>excludeEnd("ctx");
  6142. $recv($recv(aButton)._asJQuery())._focus();
  6143. return self;
  6144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6145. }, function($ctx1) {$ctx1.fill(self,"giveFocusToButton:",{aButton:aButton},$globals.HLModalWidget)});
  6146. //>>excludeEnd("ctx");
  6147. },
  6148. //>>excludeStart("ide", pragmas.excludeIdeData);
  6149. args: ["aButton"],
  6150. source: "giveFocusToButton: aButton\x0a\x09aButton asJQuery focus",
  6151. referencedClasses: [],
  6152. //>>excludeEnd("ide");
  6153. messageSends: ["focus", "asJQuery"]
  6154. }),
  6155. $globals.HLModalWidget);
  6156. $core.addMethod(
  6157. $core.method({
  6158. selector: "hasButtons",
  6159. protocol: "rendering",
  6160. fn: function (){
  6161. var self=this,$self=this;
  6162. return true;
  6163. },
  6164. //>>excludeStart("ide", pragmas.excludeIdeData);
  6165. args: [],
  6166. source: "hasButtons\x0a\x09^ true",
  6167. referencedClasses: [],
  6168. //>>excludeEnd("ide");
  6169. messageSends: []
  6170. }),
  6171. $globals.HLModalWidget);
  6172. $core.addMethod(
  6173. $core.method({
  6174. selector: "remove",
  6175. protocol: "actions",
  6176. fn: function (){
  6177. var self=this,$self=this;
  6178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6179. return $core.withContext(function($ctx1) {
  6180. //>>excludeEnd("ctx");
  6181. var $1,$2;
  6182. $1=".dialog"._asJQuery();
  6183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6184. $ctx1.sendIdx["asJQuery"]=1;
  6185. //>>excludeEnd("ctx");
  6186. $recv($1)._removeClass_("active");
  6187. $recv((function(){
  6188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6189. return $core.withContext(function($ctx2) {
  6190. //>>excludeEnd("ctx");
  6191. $2="#overlay"._asJQuery();
  6192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6193. $ctx2.sendIdx["asJQuery"]=2;
  6194. //>>excludeEnd("ctx");
  6195. $recv($2)._remove();
  6196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6197. $ctx2.sendIdx["remove"]=1;
  6198. //>>excludeEnd("ctx");
  6199. return $recv($recv($self["@wrapper"])._asJQuery())._remove();
  6200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6201. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6202. //>>excludeEnd("ctx");
  6203. }))._valueWithTimeout_((300));
  6204. return self;
  6205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6206. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLModalWidget)});
  6207. //>>excludeEnd("ctx");
  6208. },
  6209. //>>excludeStart("ide", pragmas.excludeIdeData);
  6210. args: [],
  6211. 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",
  6212. referencedClasses: [],
  6213. //>>excludeEnd("ide");
  6214. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]
  6215. }),
  6216. $globals.HLModalWidget);
  6217. $core.addMethod(
  6218. $core.method({
  6219. selector: "renderButtonsOn:",
  6220. protocol: "rendering",
  6221. fn: function (html){
  6222. var self=this,$self=this;
  6223. return self;
  6224. },
  6225. //>>excludeStart("ide", pragmas.excludeIdeData);
  6226. args: ["html"],
  6227. source: "renderButtonsOn: html",
  6228. referencedClasses: [],
  6229. //>>excludeEnd("ide");
  6230. messageSends: []
  6231. }),
  6232. $globals.HLModalWidget);
  6233. $core.addMethod(
  6234. $core.method({
  6235. selector: "renderContentOn:",
  6236. protocol: "rendering",
  6237. fn: function(html){
  6238. var self=this,$self=this;
  6239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6240. return $core.withContext(function($ctx1) {
  6241. //>>excludeEnd("ctx");
  6242. var $1,$2,$3;
  6243. $1=$recv(html)._div();
  6244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6245. $ctx1.sendIdx["div"]=1;
  6246. //>>excludeEnd("ctx");
  6247. $recv($1)._id_("overlay");
  6248. $2=$recv(html)._div();
  6249. $recv($2)._class_("dialog ".__comma($self._cssClass()));
  6250. $recv($2)._with_((function(){
  6251. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6252. return $core.withContext(function($ctx2) {
  6253. //>>excludeEnd("ctx");
  6254. $self._renderMainOn_(html);
  6255. $3=$self._hasButtons();
  6256. if($core.assert($3)){
  6257. return $self._renderButtonsOn_(html);
  6258. }
  6259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6260. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6261. //>>excludeEnd("ctx");
  6262. }));
  6263. $recv(".dialog"._asJQuery())._addClass_("active");
  6264. $self._setupKeyBindings();
  6265. return self;
  6266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6267. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLModalWidget)});
  6268. //>>excludeEnd("ctx");
  6269. },
  6270. //>>excludeStart("ide", pragmas.excludeIdeData);
  6271. args: ["html"],
  6272. source: "renderContentOn: html\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",
  6273. referencedClasses: [],
  6274. //>>excludeEnd("ide");
  6275. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "ifTrue:", "hasButtons", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]
  6276. }),
  6277. $globals.HLModalWidget);
  6278. $core.addMethod(
  6279. $core.method({
  6280. selector: "renderMainOn:",
  6281. protocol: "rendering",
  6282. fn: function (html){
  6283. var self=this,$self=this;
  6284. return self;
  6285. },
  6286. //>>excludeStart("ide", pragmas.excludeIdeData);
  6287. args: ["html"],
  6288. source: "renderMainOn: html",
  6289. referencedClasses: [],
  6290. //>>excludeEnd("ide");
  6291. messageSends: []
  6292. }),
  6293. $globals.HLModalWidget);
  6294. $core.addMethod(
  6295. $core.method({
  6296. selector: "setupKeyBindings",
  6297. protocol: "rendering",
  6298. fn: function (){
  6299. var self=this,$self=this;
  6300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6301. return $core.withContext(function($ctx1) {
  6302. //>>excludeEnd("ctx");
  6303. var $1;
  6304. $recv(".dialog"._asJQuery())._keyup_((function(e){
  6305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6306. return $core.withContext(function($ctx2) {
  6307. //>>excludeEnd("ctx");
  6308. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($globals.String)._esc())._asciiValue());
  6309. if($core.assert($1)){
  6310. return $self._cancel();
  6311. }
  6312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6313. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  6314. //>>excludeEnd("ctx");
  6315. }));
  6316. return self;
  6317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6318. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLModalWidget)});
  6319. //>>excludeEnd("ctx");
  6320. },
  6321. //>>excludeStart("ide", pragmas.excludeIdeData);
  6322. args: [],
  6323. source: "setupKeyBindings\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String esc asciiValue ifTrue: [ self cancel ] ]",
  6324. referencedClasses: ["String"],
  6325. //>>excludeEnd("ide");
  6326. messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "esc", "cancel"]
  6327. }),
  6328. $globals.HLModalWidget);
  6329. $core.addMethod(
  6330. $core.method({
  6331. selector: "show",
  6332. protocol: "actions",
  6333. fn: function (){
  6334. var self=this,$self=this;
  6335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6336. return $core.withContext(function($ctx1) {
  6337. //>>excludeEnd("ctx");
  6338. $self._appendToJQuery_("body"._asJQuery());
  6339. return self;
  6340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6341. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLModalWidget)});
  6342. //>>excludeEnd("ctx");
  6343. },
  6344. //>>excludeStart("ide", pragmas.excludeIdeData);
  6345. args: [],
  6346. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  6347. referencedClasses: [],
  6348. //>>excludeEnd("ide");
  6349. messageSends: ["appendToJQuery:", "asJQuery"]
  6350. }),
  6351. $globals.HLModalWidget);
  6352. $core.addClass("HLConfirmationWidget", $globals.HLModalWidget, ["cancelButtonLabel", "confirmButtonLabel", "confirmationString", "actionBlock", "cancelBlock"], "Helios-Core");
  6353. //>>excludeStart("ide", pragmas.excludeIdeData);
  6354. $globals.HLConfirmationWidget.comment="I display confirmation dialog. \x0a\x0a## API\x0a\x0aHLWidget contains convenience methods like `HLWidget >> #confirm:ifTrue:` for creating confirmation dialogs.";
  6355. //>>excludeEnd("ide");
  6356. $core.addMethod(
  6357. $core.method({
  6358. selector: "actionBlock",
  6359. protocol: "accessing",
  6360. fn: function (){
  6361. var self=this,$self=this;
  6362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6363. return $core.withContext(function($ctx1) {
  6364. //>>excludeEnd("ctx");
  6365. var $1,$receiver;
  6366. $1=$self["@actionBlock"];
  6367. if(($receiver = $1) == null || $receiver.a$nil){
  6368. return (function(){
  6369. });
  6370. } else {
  6371. return $1;
  6372. }
  6373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6374. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},$globals.HLConfirmationWidget)});
  6375. //>>excludeEnd("ctx");
  6376. },
  6377. //>>excludeStart("ide", pragmas.excludeIdeData);
  6378. args: [],
  6379. source: "actionBlock\x0a\x09^ actionBlock ifNil: [ [] ]",
  6380. referencedClasses: [],
  6381. //>>excludeEnd("ide");
  6382. messageSends: ["ifNil:"]
  6383. }),
  6384. $globals.HLConfirmationWidget);
  6385. $core.addMethod(
  6386. $core.method({
  6387. selector: "actionBlock:",
  6388. protocol: "accessing",
  6389. fn: function (aBlock){
  6390. var self=this,$self=this;
  6391. $self["@actionBlock"]=aBlock;
  6392. return self;
  6393. },
  6394. //>>excludeStart("ide", pragmas.excludeIdeData);
  6395. args: ["aBlock"],
  6396. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  6397. referencedClasses: [],
  6398. //>>excludeEnd("ide");
  6399. messageSends: []
  6400. }),
  6401. $globals.HLConfirmationWidget);
  6402. $core.addMethod(
  6403. $core.method({
  6404. selector: "cancel",
  6405. protocol: "actions",
  6406. fn: function (){
  6407. var self=this,$self=this;
  6408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6409. return $core.withContext(function($ctx1) {
  6410. //>>excludeEnd("ctx");
  6411. $recv($self._cancelBlock())._value();
  6412. $self._remove();
  6413. return self;
  6414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6415. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLConfirmationWidget)});
  6416. //>>excludeEnd("ctx");
  6417. },
  6418. //>>excludeStart("ide", pragmas.excludeIdeData);
  6419. args: [],
  6420. source: "cancel\x0a\x09self cancelBlock value.\x0a\x09self remove",
  6421. referencedClasses: [],
  6422. //>>excludeEnd("ide");
  6423. messageSends: ["value", "cancelBlock", "remove"]
  6424. }),
  6425. $globals.HLConfirmationWidget);
  6426. $core.addMethod(
  6427. $core.method({
  6428. selector: "cancelBlock",
  6429. protocol: "accessing",
  6430. fn: function (){
  6431. var self=this,$self=this;
  6432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6433. return $core.withContext(function($ctx1) {
  6434. //>>excludeEnd("ctx");
  6435. var $1,$receiver;
  6436. $1=$self["@cancelBlock"];
  6437. if(($receiver = $1) == null || $receiver.a$nil){
  6438. return (function(){
  6439. });
  6440. } else {
  6441. return $1;
  6442. }
  6443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6444. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},$globals.HLConfirmationWidget)});
  6445. //>>excludeEnd("ctx");
  6446. },
  6447. //>>excludeStart("ide", pragmas.excludeIdeData);
  6448. args: [],
  6449. source: "cancelBlock\x0a\x09^ cancelBlock ifNil: [ [] ]",
  6450. referencedClasses: [],
  6451. //>>excludeEnd("ide");
  6452. messageSends: ["ifNil:"]
  6453. }),
  6454. $globals.HLConfirmationWidget);
  6455. $core.addMethod(
  6456. $core.method({
  6457. selector: "cancelBlock:",
  6458. protocol: "accessing",
  6459. fn: function (aBlock){
  6460. var self=this,$self=this;
  6461. $self["@cancelBlock"]=aBlock;
  6462. return self;
  6463. },
  6464. //>>excludeStart("ide", pragmas.excludeIdeData);
  6465. args: ["aBlock"],
  6466. source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
  6467. referencedClasses: [],
  6468. //>>excludeEnd("ide");
  6469. messageSends: []
  6470. }),
  6471. $globals.HLConfirmationWidget);
  6472. $core.addMethod(
  6473. $core.method({
  6474. selector: "cancelButtonLabel",
  6475. protocol: "accessing",
  6476. fn: function (){
  6477. var self=this,$self=this;
  6478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6479. return $core.withContext(function($ctx1) {
  6480. //>>excludeEnd("ctx");
  6481. var $1,$receiver;
  6482. $1=$self["@cancelButtonLabel"];
  6483. if(($receiver = $1) == null || $receiver.a$nil){
  6484. return "Cancel";
  6485. } else {
  6486. return $1;
  6487. }
  6488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6489. }, function($ctx1) {$ctx1.fill(self,"cancelButtonLabel",{},$globals.HLConfirmationWidget)});
  6490. //>>excludeEnd("ctx");
  6491. },
  6492. //>>excludeStart("ide", pragmas.excludeIdeData);
  6493. args: [],
  6494. source: "cancelButtonLabel\x0a\x09^ cancelButtonLabel ifNil: [ 'Cancel' ]",
  6495. referencedClasses: [],
  6496. //>>excludeEnd("ide");
  6497. messageSends: ["ifNil:"]
  6498. }),
  6499. $globals.HLConfirmationWidget);
  6500. $core.addMethod(
  6501. $core.method({
  6502. selector: "cancelButtonLabel:",
  6503. protocol: "accessing",
  6504. fn: function (aString){
  6505. var self=this,$self=this;
  6506. var $1;
  6507. $self["@cancelButtonLabel"]=aString;
  6508. $1=$self["@cancelButtonLabel"];
  6509. return $1;
  6510. },
  6511. //>>excludeStart("ide", pragmas.excludeIdeData);
  6512. args: ["aString"],
  6513. source: "cancelButtonLabel: aString\x0a\x09^ cancelButtonLabel := aString",
  6514. referencedClasses: [],
  6515. //>>excludeEnd("ide");
  6516. messageSends: []
  6517. }),
  6518. $globals.HLConfirmationWidget);
  6519. $core.addMethod(
  6520. $core.method({
  6521. selector: "confirm",
  6522. protocol: "actions",
  6523. fn: function (){
  6524. var self=this,$self=this;
  6525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6526. return $core.withContext(function($ctx1) {
  6527. //>>excludeEnd("ctx");
  6528. $self._remove();
  6529. $recv($self._actionBlock())._value();
  6530. return self;
  6531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6532. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLConfirmationWidget)});
  6533. //>>excludeEnd("ctx");
  6534. },
  6535. //>>excludeStart("ide", pragmas.excludeIdeData);
  6536. args: [],
  6537. source: "confirm\x0a\x09self remove.\x0a\x09self actionBlock value",
  6538. referencedClasses: [],
  6539. //>>excludeEnd("ide");
  6540. messageSends: ["remove", "value", "actionBlock"]
  6541. }),
  6542. $globals.HLConfirmationWidget);
  6543. $core.addMethod(
  6544. $core.method({
  6545. selector: "confirmButtonLabel",
  6546. protocol: "accessing",
  6547. fn: function (){
  6548. var self=this,$self=this;
  6549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6550. return $core.withContext(function($ctx1) {
  6551. //>>excludeEnd("ctx");
  6552. var $1,$receiver;
  6553. $1=$self["@confirmButtonLabel"];
  6554. if(($receiver = $1) == null || $receiver.a$nil){
  6555. return "Confirm";
  6556. } else {
  6557. return $1;
  6558. }
  6559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6560. }, function($ctx1) {$ctx1.fill(self,"confirmButtonLabel",{},$globals.HLConfirmationWidget)});
  6561. //>>excludeEnd("ctx");
  6562. },
  6563. //>>excludeStart("ide", pragmas.excludeIdeData);
  6564. args: [],
  6565. source: "confirmButtonLabel\x0a\x09^ confirmButtonLabel ifNil: [ 'Confirm' ]",
  6566. referencedClasses: [],
  6567. //>>excludeEnd("ide");
  6568. messageSends: ["ifNil:"]
  6569. }),
  6570. $globals.HLConfirmationWidget);
  6571. $core.addMethod(
  6572. $core.method({
  6573. selector: "confirmButtonLabel:",
  6574. protocol: "accessing",
  6575. fn: function (aString){
  6576. var self=this,$self=this;
  6577. var $1;
  6578. $self["@confirmButtonLabel"]=aString;
  6579. $1=$self["@confirmButtonLabel"];
  6580. return $1;
  6581. },
  6582. //>>excludeStart("ide", pragmas.excludeIdeData);
  6583. args: ["aString"],
  6584. source: "confirmButtonLabel: aString\x0a\x09^ confirmButtonLabel := aString",
  6585. referencedClasses: [],
  6586. //>>excludeEnd("ide");
  6587. messageSends: []
  6588. }),
  6589. $globals.HLConfirmationWidget);
  6590. $core.addMethod(
  6591. $core.method({
  6592. selector: "confirmationString",
  6593. protocol: "accessing",
  6594. fn: function (){
  6595. var self=this,$self=this;
  6596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6597. return $core.withContext(function($ctx1) {
  6598. //>>excludeEnd("ctx");
  6599. var $1,$receiver;
  6600. $1=$self["@confirmationString"];
  6601. if(($receiver = $1) == null || $receiver.a$nil){
  6602. return "Confirm";
  6603. } else {
  6604. return $1;
  6605. }
  6606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6607. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},$globals.HLConfirmationWidget)});
  6608. //>>excludeEnd("ctx");
  6609. },
  6610. //>>excludeStart("ide", pragmas.excludeIdeData);
  6611. args: [],
  6612. source: "confirmationString\x0a\x09^ confirmationString ifNil: [ 'Confirm' ]",
  6613. referencedClasses: [],
  6614. //>>excludeEnd("ide");
  6615. messageSends: ["ifNil:"]
  6616. }),
  6617. $globals.HLConfirmationWidget);
  6618. $core.addMethod(
  6619. $core.method({
  6620. selector: "confirmationString:",
  6621. protocol: "accessing",
  6622. fn: function (aString){
  6623. var self=this,$self=this;
  6624. $self["@confirmationString"]=aString;
  6625. return self;
  6626. },
  6627. //>>excludeStart("ide", pragmas.excludeIdeData);
  6628. args: ["aString"],
  6629. source: "confirmationString: aString\x0a\x09confirmationString := aString",
  6630. referencedClasses: [],
  6631. //>>excludeEnd("ide");
  6632. messageSends: []
  6633. }),
  6634. $globals.HLConfirmationWidget);
  6635. $core.addMethod(
  6636. $core.method({
  6637. selector: "renderButtonsOn:",
  6638. protocol: "rendering",
  6639. fn: function (html){
  6640. var self=this,$self=this;
  6641. var confirmButton;
  6642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6643. return $core.withContext(function($ctx1) {
  6644. //>>excludeEnd("ctx");
  6645. var $1,$3,$4,$5,$2;
  6646. $1=$recv(html)._div();
  6647. $recv($1)._class_("buttons");
  6648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6649. $ctx1.sendIdx["class:"]=1;
  6650. //>>excludeEnd("ctx");
  6651. $2=$recv($1)._with_((function(){
  6652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6653. return $core.withContext(function($ctx2) {
  6654. //>>excludeEnd("ctx");
  6655. $3=$recv(html)._button();
  6656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6657. $ctx2.sendIdx["button"]=1;
  6658. //>>excludeEnd("ctx");
  6659. $recv($3)._class_("button");
  6660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6661. $ctx2.sendIdx["class:"]=2;
  6662. //>>excludeEnd("ctx");
  6663. $recv($3)._with_($self._cancelButtonLabel());
  6664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6665. $ctx2.sendIdx["with:"]=2;
  6666. //>>excludeEnd("ctx");
  6667. $4=$recv($3)._onClick_((function(){
  6668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6669. return $core.withContext(function($ctx3) {
  6670. //>>excludeEnd("ctx");
  6671. return $self._cancel();
  6672. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6673. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6674. //>>excludeEnd("ctx");
  6675. }));
  6676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6677. $ctx2.sendIdx["onClick:"]=1;
  6678. //>>excludeEnd("ctx");
  6679. $4;
  6680. $5=$recv(html)._button();
  6681. $recv($5)._class_("button default");
  6682. $recv($5)._with_($self._confirmButtonLabel());
  6683. confirmButton=$recv($5)._onClick_((function(){
  6684. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6685. return $core.withContext(function($ctx3) {
  6686. //>>excludeEnd("ctx");
  6687. return $self._confirm();
  6688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6689. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  6690. //>>excludeEnd("ctx");
  6691. }));
  6692. return confirmButton;
  6693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6694. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6695. //>>excludeEnd("ctx");
  6696. }));
  6697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6698. $ctx1.sendIdx["with:"]=1;
  6699. //>>excludeEnd("ctx");
  6700. $self._giveFocusToButton_(confirmButton);
  6701. return self;
  6702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6703. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLConfirmationWidget)});
  6704. //>>excludeEnd("ctx");
  6705. },
  6706. //>>excludeStart("ide", pragmas.excludeIdeData);
  6707. args: ["html"],
  6708. 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",
  6709. referencedClasses: [],
  6710. //>>excludeEnd("ide");
  6711. messageSends: ["class:", "div", "with:", "button", "cancelButtonLabel", "onClick:", "cancel", "confirmButtonLabel", "confirm", "giveFocusToButton:"]
  6712. }),
  6713. $globals.HLConfirmationWidget);
  6714. $core.addMethod(
  6715. $core.method({
  6716. selector: "renderMainOn:",
  6717. protocol: "rendering",
  6718. fn: function (html){
  6719. var self=this,$self=this;
  6720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6721. return $core.withContext(function($ctx1) {
  6722. //>>excludeEnd("ctx");
  6723. var $1;
  6724. $1=$recv(html)._span();
  6725. $recv($1)._class_("head");
  6726. $recv($1)._with_($self._confirmationString());
  6727. return self;
  6728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6729. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLConfirmationWidget)});
  6730. //>>excludeEnd("ctx");
  6731. },
  6732. //>>excludeStart("ide", pragmas.excludeIdeData);
  6733. args: ["html"],
  6734. source: "renderMainOn: html\x0a\x09html span \x0a\x09\x09class: 'head'; \x0a\x09\x09with: self confirmationString",
  6735. referencedClasses: [],
  6736. //>>excludeEnd("ide");
  6737. messageSends: ["class:", "span", "with:", "confirmationString"]
  6738. }),
  6739. $globals.HLConfirmationWidget);
  6740. $core.addClass("HLRequestWidget", $globals.HLConfirmationWidget, ["input", "multiline", "value"], "Helios-Core");
  6741. //>>excludeStart("ide", pragmas.excludeIdeData);
  6742. $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.";
  6743. //>>excludeEnd("ide");
  6744. $core.addMethod(
  6745. $core.method({
  6746. selector: "beMultiline",
  6747. protocol: "accessing",
  6748. fn: function (){
  6749. var self=this,$self=this;
  6750. $self["@multiline"]=true;
  6751. return self;
  6752. },
  6753. //>>excludeStart("ide", pragmas.excludeIdeData);
  6754. args: [],
  6755. source: "beMultiline\x0a\x09multiline := true",
  6756. referencedClasses: [],
  6757. //>>excludeEnd("ide");
  6758. messageSends: []
  6759. }),
  6760. $globals.HLRequestWidget);
  6761. $core.addMethod(
  6762. $core.method({
  6763. selector: "beSingleline",
  6764. protocol: "accessing",
  6765. fn: function (){
  6766. var self=this,$self=this;
  6767. $self["@multiline"]=false;
  6768. return self;
  6769. },
  6770. //>>excludeStart("ide", pragmas.excludeIdeData);
  6771. args: [],
  6772. source: "beSingleline\x0a\x09multiline := false",
  6773. referencedClasses: [],
  6774. //>>excludeEnd("ide");
  6775. messageSends: []
  6776. }),
  6777. $globals.HLRequestWidget);
  6778. $core.addMethod(
  6779. $core.method({
  6780. selector: "confirm",
  6781. protocol: "actions",
  6782. fn: function (){
  6783. var self=this,$self=this;
  6784. var val;
  6785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6786. return $core.withContext(function($ctx1) {
  6787. //>>excludeEnd("ctx");
  6788. val=$recv($recv($self["@input"])._asJQuery())._val();
  6789. $self._remove();
  6790. $recv($self._actionBlock())._value_(val);
  6791. return self;
  6792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6793. }, function($ctx1) {$ctx1.fill(self,"confirm",{val:val},$globals.HLRequestWidget)});
  6794. //>>excludeEnd("ctx");
  6795. },
  6796. //>>excludeStart("ide", pragmas.excludeIdeData);
  6797. args: [],
  6798. source: "confirm\x0a\x09| val |\x0a\x09val := input asJQuery val.\x0a\x09self remove.\x0a\x09self actionBlock value: val",
  6799. referencedClasses: [],
  6800. //>>excludeEnd("ide");
  6801. messageSends: ["val", "asJQuery", "remove", "value:", "actionBlock"]
  6802. }),
  6803. $globals.HLRequestWidget);
  6804. $core.addMethod(
  6805. $core.method({
  6806. selector: "cssClass",
  6807. protocol: "accessing",
  6808. fn: function (){
  6809. var self=this,$self=this;
  6810. return "large";
  6811. },
  6812. //>>excludeStart("ide", pragmas.excludeIdeData);
  6813. args: [],
  6814. source: "cssClass\x0a\x09^ 'large'",
  6815. referencedClasses: [],
  6816. //>>excludeEnd("ide");
  6817. messageSends: []
  6818. }),
  6819. $globals.HLRequestWidget);
  6820. $core.addMethod(
  6821. $core.method({
  6822. selector: "giveFocusToButton:",
  6823. protocol: "private",
  6824. fn: function (aButton){
  6825. var self=this,$self=this;
  6826. return self;
  6827. },
  6828. //>>excludeStart("ide", pragmas.excludeIdeData);
  6829. args: ["aButton"],
  6830. source: "giveFocusToButton: aButton",
  6831. referencedClasses: [],
  6832. //>>excludeEnd("ide");
  6833. messageSends: []
  6834. }),
  6835. $globals.HLRequestWidget);
  6836. $core.addMethod(
  6837. $core.method({
  6838. selector: "isMultiline",
  6839. protocol: "testing",
  6840. fn: function (){
  6841. var self=this,$self=this;
  6842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6843. return $core.withContext(function($ctx1) {
  6844. //>>excludeEnd("ctx");
  6845. var $1,$receiver;
  6846. $1=$self["@multiline"];
  6847. if(($receiver = $1) == null || $receiver.a$nil){
  6848. return true;
  6849. } else {
  6850. return $1;
  6851. }
  6852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6853. }, function($ctx1) {$ctx1.fill(self,"isMultiline",{},$globals.HLRequestWidget)});
  6854. //>>excludeEnd("ctx");
  6855. },
  6856. //>>excludeStart("ide", pragmas.excludeIdeData);
  6857. args: [],
  6858. source: "isMultiline\x0a\x09^ multiline ifNil: [ true ]",
  6859. referencedClasses: [],
  6860. //>>excludeEnd("ide");
  6861. messageSends: ["ifNil:"]
  6862. }),
  6863. $globals.HLRequestWidget);
  6864. $core.addMethod(
  6865. $core.method({
  6866. selector: "renderMainOn:",
  6867. protocol: "rendering",
  6868. fn: function (html){
  6869. var self=this,$self=this;
  6870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6871. return $core.withContext(function($ctx1) {
  6872. //>>excludeEnd("ctx");
  6873. var $1,$2,$3,$4;
  6874. (
  6875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6876. $ctx1.supercall = true,
  6877. //>>excludeEnd("ctx");
  6878. ($globals.HLRequestWidget.superclass||$boot.nilAsClass).fn.prototype._renderMainOn_.apply($self, [html]));
  6879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6880. $ctx1.supercall = false;
  6881. //>>excludeEnd("ctx");;
  6882. $1=$self._isMultiline();
  6883. if($core.assert($1)){
  6884. $self["@input"]=$recv(html)._textarea();
  6885. $self["@input"];
  6886. } else {
  6887. $2=$recv(html)._input();
  6888. $recv($2)._type_("text");
  6889. $recv($2)._onKeyDown_((function(event){
  6890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6891. return $core.withContext(function($ctx2) {
  6892. //>>excludeEnd("ctx");
  6893. $3=$recv($recv(event)._keyCode()).__eq((13));
  6894. if($core.assert($3)){
  6895. return $self._confirm();
  6896. }
  6897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6898. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  6899. //>>excludeEnd("ctx");
  6900. }));
  6901. $self["@input"]=$recv($2)._yourself();
  6902. $self["@input"];
  6903. }
  6904. $4=$recv($self["@input"])._asJQuery();
  6905. $recv($4)._val_($self._value());
  6906. $recv($4)._focus();
  6907. return self;
  6908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6909. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLRequestWidget)});
  6910. //>>excludeEnd("ctx");
  6911. },
  6912. //>>excludeStart("ide", pragmas.excludeIdeData);
  6913. args: ["html"],
  6914. 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",
  6915. referencedClasses: [],
  6916. //>>excludeEnd("ide");
  6917. messageSends: ["renderMainOn:", "ifTrue:ifFalse:", "isMultiline", "textarea", "type:", "input", "onKeyDown:", "ifTrue:", "=", "keyCode", "confirm", "yourself", "val:", "asJQuery", "value", "focus"]
  6918. }),
  6919. $globals.HLRequestWidget);
  6920. $core.addMethod(
  6921. $core.method({
  6922. selector: "value",
  6923. protocol: "accessing",
  6924. fn: function (){
  6925. var self=this,$self=this;
  6926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6927. return $core.withContext(function($ctx1) {
  6928. //>>excludeEnd("ctx");
  6929. var $1,$receiver;
  6930. $1=$self["@value"];
  6931. if(($receiver = $1) == null || $receiver.a$nil){
  6932. return "";
  6933. } else {
  6934. return $1;
  6935. }
  6936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6937. }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.HLRequestWidget)});
  6938. //>>excludeEnd("ctx");
  6939. },
  6940. //>>excludeStart("ide", pragmas.excludeIdeData);
  6941. args: [],
  6942. source: "value\x0a\x09^ value ifNil: [ '' ]",
  6943. referencedClasses: [],
  6944. //>>excludeEnd("ide");
  6945. messageSends: ["ifNil:"]
  6946. }),
  6947. $globals.HLRequestWidget);
  6948. $core.addMethod(
  6949. $core.method({
  6950. selector: "value:",
  6951. protocol: "accessing",
  6952. fn: function (aString){
  6953. var self=this,$self=this;
  6954. $self["@value"]=aString;
  6955. return self;
  6956. },
  6957. //>>excludeStart("ide", pragmas.excludeIdeData);
  6958. args: ["aString"],
  6959. source: "value: aString\x0a\x09value := aString",
  6960. referencedClasses: [],
  6961. //>>excludeEnd("ide");
  6962. messageSends: []
  6963. }),
  6964. $globals.HLRequestWidget);
  6965. $core.addClass("HLProgressWidget", $globals.HLModalWidget, ["progressBars", "visible"], "Helios-Core");
  6966. //>>excludeStart("ide", pragmas.excludeIdeData);
  6967. $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.";
  6968. //>>excludeEnd("ide");
  6969. $core.addMethod(
  6970. $core.method({
  6971. selector: "addProgressBar:",
  6972. protocol: "actions",
  6973. fn: function (aProgressBar){
  6974. var self=this,$self=this;
  6975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6976. return $core.withContext(function($ctx1) {
  6977. //>>excludeEnd("ctx");
  6978. $self._show();
  6979. $recv($self._progressBars())._add_(aProgressBar);
  6980. $recv(aProgressBar)._appendToJQuery_($recv($recv($self._wrapper())._asJQuery())._find_(".dialog"));
  6981. return self;
  6982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6983. }, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  6984. //>>excludeEnd("ctx");
  6985. },
  6986. //>>excludeStart("ide", pragmas.excludeIdeData);
  6987. args: ["aProgressBar"],
  6988. source: "addProgressBar: aProgressBar\x0a\x09self show.\x0a\x09self progressBars add: aProgressBar.\x0a\x09aProgressBar appendToJQuery: (self wrapper asJQuery find: '.dialog')",
  6989. referencedClasses: [],
  6990. //>>excludeEnd("ide");
  6991. messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]
  6992. }),
  6993. $globals.HLProgressWidget);
  6994. $core.addMethod(
  6995. $core.method({
  6996. selector: "do:on:displaying:",
  6997. protocol: "actions",
  6998. fn: function (aBlock,aCollection,aString){
  6999. var self=this,$self=this;
  7000. var progressBar;
  7001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7002. return $core.withContext(function($ctx1) {
  7003. //>>excludeEnd("ctx");
  7004. var $1;
  7005. $1=$recv($globals.HLProgressBarWidget)._new();
  7006. $recv($1)._parent_(self);
  7007. $recv($1)._label_(aString);
  7008. $recv($1)._workBlock_(aBlock);
  7009. $recv($1)._collection_(aCollection);
  7010. progressBar=$recv($1)._yourself();
  7011. $self._addProgressBar_(progressBar);
  7012. $recv(progressBar)._start();
  7013. return self;
  7014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7015. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},$globals.HLProgressWidget)});
  7016. //>>excludeEnd("ctx");
  7017. },
  7018. //>>excludeStart("ide", pragmas.excludeIdeData);
  7019. args: ["aBlock", "aCollection", "aString"],
  7020. 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",
  7021. referencedClasses: ["HLProgressBarWidget"],
  7022. //>>excludeEnd("ide");
  7023. messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]
  7024. }),
  7025. $globals.HLProgressWidget);
  7026. $core.addMethod(
  7027. $core.method({
  7028. selector: "flush",
  7029. protocol: "actions",
  7030. fn: function (){
  7031. var self=this,$self=this;
  7032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7033. return $core.withContext(function($ctx1) {
  7034. //>>excludeEnd("ctx");
  7035. $recv($self._progressBars())._do_((function(each){
  7036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7037. return $core.withContext(function($ctx2) {
  7038. //>>excludeEnd("ctx");
  7039. return $self._removeProgressBar_(each);
  7040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7041. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7042. //>>excludeEnd("ctx");
  7043. }));
  7044. return self;
  7045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7046. }, function($ctx1) {$ctx1.fill(self,"flush",{},$globals.HLProgressWidget)});
  7047. //>>excludeEnd("ctx");
  7048. },
  7049. //>>excludeStart("ide", pragmas.excludeIdeData);
  7050. args: [],
  7051. source: "flush\x0a\x09self progressBars do: [ :each |\x0a\x09\x09self removeProgressBar: each ]",
  7052. referencedClasses: [],
  7053. //>>excludeEnd("ide");
  7054. messageSends: ["do:", "progressBars", "removeProgressBar:"]
  7055. }),
  7056. $globals.HLProgressWidget);
  7057. $core.addMethod(
  7058. $core.method({
  7059. selector: "hasButtons",
  7060. protocol: "testing",
  7061. fn: function (){
  7062. var self=this,$self=this;
  7063. return false;
  7064. },
  7065. //>>excludeStart("ide", pragmas.excludeIdeData);
  7066. args: [],
  7067. source: "hasButtons\x0a\x09^ false",
  7068. referencedClasses: [],
  7069. //>>excludeEnd("ide");
  7070. messageSends: []
  7071. }),
  7072. $globals.HLProgressWidget);
  7073. $core.addMethod(
  7074. $core.method({
  7075. selector: "isVisible",
  7076. protocol: "testing",
  7077. fn: function (){
  7078. var self=this,$self=this;
  7079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7080. return $core.withContext(function($ctx1) {
  7081. //>>excludeEnd("ctx");
  7082. var $1,$receiver;
  7083. $1=$self["@visible"];
  7084. if(($receiver = $1) == null || $receiver.a$nil){
  7085. return false;
  7086. } else {
  7087. return $1;
  7088. }
  7089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7090. }, function($ctx1) {$ctx1.fill(self,"isVisible",{},$globals.HLProgressWidget)});
  7091. //>>excludeEnd("ctx");
  7092. },
  7093. //>>excludeStart("ide", pragmas.excludeIdeData);
  7094. args: [],
  7095. source: "isVisible\x0a\x09^ visible ifNil: [ false ]",
  7096. referencedClasses: [],
  7097. //>>excludeEnd("ide");
  7098. messageSends: ["ifNil:"]
  7099. }),
  7100. $globals.HLProgressWidget);
  7101. $core.addMethod(
  7102. $core.method({
  7103. selector: "progressBars",
  7104. protocol: "accessing",
  7105. fn: function (){
  7106. var self=this,$self=this;
  7107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7108. return $core.withContext(function($ctx1) {
  7109. //>>excludeEnd("ctx");
  7110. var $1,$receiver;
  7111. $1=$self["@progressBars"];
  7112. if(($receiver = $1) == null || $receiver.a$nil){
  7113. $self["@progressBars"]=$recv($globals.OrderedCollection)._new();
  7114. return $self["@progressBars"];
  7115. } else {
  7116. return $1;
  7117. }
  7118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7119. }, function($ctx1) {$ctx1.fill(self,"progressBars",{},$globals.HLProgressWidget)});
  7120. //>>excludeEnd("ctx");
  7121. },
  7122. //>>excludeStart("ide", pragmas.excludeIdeData);
  7123. args: [],
  7124. source: "progressBars\x0a\x09^ progressBars ifNil: [ progressBars := OrderedCollection new ]",
  7125. referencedClasses: ["OrderedCollection"],
  7126. //>>excludeEnd("ide");
  7127. messageSends: ["ifNil:", "new"]
  7128. }),
  7129. $globals.HLProgressWidget);
  7130. $core.addMethod(
  7131. $core.method({
  7132. selector: "remove",
  7133. protocol: "actions",
  7134. fn: function (){
  7135. var self=this,$self=this;
  7136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7137. return $core.withContext(function($ctx1) {
  7138. //>>excludeEnd("ctx");
  7139. var $1;
  7140. $1=$self._isVisible();
  7141. if($core.assert($1)){
  7142. $self["@visible"]=false;
  7143. $self["@visible"];
  7144. (
  7145. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7146. $ctx1.supercall = true,
  7147. //>>excludeEnd("ctx");
  7148. ($globals.HLProgressWidget.superclass||$boot.nilAsClass).fn.prototype._remove.apply($self, []));
  7149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7150. $ctx1.supercall = false;
  7151. //>>excludeEnd("ctx");;
  7152. }
  7153. return self;
  7154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7155. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressWidget)});
  7156. //>>excludeEnd("ctx");
  7157. },
  7158. //>>excludeStart("ide", pragmas.excludeIdeData);
  7159. args: [],
  7160. source: "remove\x0a\x09self isVisible ifTrue: [\x0a\x09\x09visible := false.\x0a\x09\x09super remove ]",
  7161. referencedClasses: [],
  7162. //>>excludeEnd("ide");
  7163. messageSends: ["ifTrue:", "isVisible", "remove"]
  7164. }),
  7165. $globals.HLProgressWidget);
  7166. $core.addMethod(
  7167. $core.method({
  7168. selector: "removeProgressBar:",
  7169. protocol: "actions",
  7170. fn: function (aProgressBar){
  7171. var self=this,$self=this;
  7172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7173. return $core.withContext(function($ctx1) {
  7174. //>>excludeEnd("ctx");
  7175. var $1;
  7176. $1=$self._progressBars();
  7177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7178. $ctx1.sendIdx["progressBars"]=1;
  7179. //>>excludeEnd("ctx");
  7180. $recv($1)._remove_ifAbsent_(aProgressBar,(function(){
  7181. }));
  7182. $recv($recv($recv(aProgressBar)._wrapper())._asJQuery())._remove();
  7183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7184. $ctx1.sendIdx["remove"]=1;
  7185. //>>excludeEnd("ctx");
  7186. $recv($self._progressBars())._ifEmpty_((function(){
  7187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7188. return $core.withContext(function($ctx2) {
  7189. //>>excludeEnd("ctx");
  7190. return $self._remove();
  7191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7192. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7193. //>>excludeEnd("ctx");
  7194. }));
  7195. return self;
  7196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7197. }, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  7198. //>>excludeEnd("ctx");
  7199. },
  7200. //>>excludeStart("ide", pragmas.excludeIdeData);
  7201. args: ["aProgressBar"],
  7202. source: "removeProgressBar: aProgressBar\x0a\x09self progressBars remove: aProgressBar ifAbsent: [].\x0a\x09aProgressBar wrapper asJQuery remove.\x0a\x09\x0a\x09self progressBars ifEmpty: [ self remove ]",
  7203. referencedClasses: [],
  7204. //>>excludeEnd("ide");
  7205. messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]
  7206. }),
  7207. $globals.HLProgressWidget);
  7208. $core.addMethod(
  7209. $core.method({
  7210. selector: "renderMainOn:",
  7211. protocol: "rendering",
  7212. fn: function (html){
  7213. var self=this,$self=this;
  7214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7215. return $core.withContext(function($ctx1) {
  7216. //>>excludeEnd("ctx");
  7217. $recv($self._progressBars())._do_((function(each){
  7218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7219. return $core.withContext(function($ctx2) {
  7220. //>>excludeEnd("ctx");
  7221. return $recv(html)._with_(each);
  7222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7223. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7224. //>>excludeEnd("ctx");
  7225. }));
  7226. return self;
  7227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7228. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLProgressWidget)});
  7229. //>>excludeEnd("ctx");
  7230. },
  7231. //>>excludeStart("ide", pragmas.excludeIdeData);
  7232. args: ["html"],
  7233. source: "renderMainOn: html\x0a\x09self progressBars do: [ :each |\x0a\x09\x09html with: each ]",
  7234. referencedClasses: [],
  7235. //>>excludeEnd("ide");
  7236. messageSends: ["do:", "progressBars", "with:"]
  7237. }),
  7238. $globals.HLProgressWidget);
  7239. $core.addMethod(
  7240. $core.method({
  7241. selector: "show",
  7242. protocol: "actions",
  7243. fn: function (){
  7244. var self=this,$self=this;
  7245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7246. return $core.withContext(function($ctx1) {
  7247. //>>excludeEnd("ctx");
  7248. var $1;
  7249. $1=$self._isVisible();
  7250. if(!$core.assert($1)){
  7251. $self["@visible"]=true;
  7252. $self["@visible"];
  7253. (
  7254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7255. $ctx1.supercall = true,
  7256. //>>excludeEnd("ctx");
  7257. ($globals.HLProgressWidget.superclass||$boot.nilAsClass).fn.prototype._show.apply($self, []));
  7258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7259. $ctx1.supercall = false;
  7260. //>>excludeEnd("ctx");;
  7261. }
  7262. return self;
  7263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7264. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLProgressWidget)});
  7265. //>>excludeEnd("ctx");
  7266. },
  7267. //>>excludeStart("ide", pragmas.excludeIdeData);
  7268. args: [],
  7269. source: "show\x0a\x09self isVisible ifFalse: [\x0a\x09\x09visible := true.\x0a\x09\x09super show ]",
  7270. referencedClasses: [],
  7271. //>>excludeEnd("ide");
  7272. messageSends: ["ifFalse:", "isVisible", "show"]
  7273. }),
  7274. $globals.HLProgressWidget);
  7275. $globals.HLProgressWidget.a$cls.iVarNames = ["default"];
  7276. $core.addMethod(
  7277. $core.method({
  7278. selector: "default",
  7279. protocol: "accessing",
  7280. fn: function (){
  7281. var self=this,$self=this;
  7282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7283. return $core.withContext(function($ctx1) {
  7284. //>>excludeEnd("ctx");
  7285. var $1,$receiver;
  7286. $1=$self["@default"];
  7287. if(($receiver = $1) == null || $receiver.a$nil){
  7288. $self["@default"]=$self._new();
  7289. return $self["@default"];
  7290. } else {
  7291. return $1;
  7292. }
  7293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7294. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressWidget.a$cls)});
  7295. //>>excludeEnd("ctx");
  7296. },
  7297. //>>excludeStart("ide", pragmas.excludeIdeData);
  7298. args: [],
  7299. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  7300. referencedClasses: [],
  7301. //>>excludeEnd("ide");
  7302. messageSends: ["ifNil:", "new"]
  7303. }),
  7304. $globals.HLProgressWidget.a$cls);
  7305. $core.addClass("HLShortcutSuggestionWidget", $globals.HLModalWidget, ["command"], "Helios-Core");
  7306. //>>excludeStart("ide", pragmas.excludeIdeData);
  7307. $globals.HLShortcutSuggestionWidget.comment="I am a modal that displays the keyboard shortcut associated to a specific command.";
  7308. //>>excludeEnd("ide");
  7309. $core.addMethod(
  7310. $core.method({
  7311. selector: "command",
  7312. protocol: "accessing",
  7313. fn: function(){
  7314. var self=this,$self=this;
  7315. return $self["@command"];
  7316. },
  7317. //>>excludeStart("ide", pragmas.excludeIdeData);
  7318. args: [],
  7319. source: "command\x0a\x09^ command",
  7320. referencedClasses: [],
  7321. //>>excludeEnd("ide");
  7322. messageSends: []
  7323. }),
  7324. $globals.HLShortcutSuggestionWidget);
  7325. $core.addMethod(
  7326. $core.method({
  7327. selector: "command:",
  7328. protocol: "accessing",
  7329. fn: function(aCommand){
  7330. var self=this,$self=this;
  7331. $self["@command"]=aCommand;
  7332. return self;
  7333. },
  7334. //>>excludeStart("ide", pragmas.excludeIdeData);
  7335. args: ["aCommand"],
  7336. source: "command: aCommand\x0a\x09command := aCommand",
  7337. referencedClasses: [],
  7338. //>>excludeEnd("ide");
  7339. messageSends: []
  7340. }),
  7341. $globals.HLShortcutSuggestionWidget);
  7342. $core.addMethod(
  7343. $core.method({
  7344. selector: "hasButtons",
  7345. protocol: "rendering",
  7346. fn: function(){
  7347. var self=this,$self=this;
  7348. return false;
  7349. },
  7350. //>>excludeStart("ide", pragmas.excludeIdeData);
  7351. args: [],
  7352. source: "hasButtons\x0a\x09^ false",
  7353. referencedClasses: [],
  7354. //>>excludeEnd("ide");
  7355. messageSends: []
  7356. }),
  7357. $globals.HLShortcutSuggestionWidget);
  7358. $core.addMethod(
  7359. $core.method({
  7360. selector: "renderMainOn:",
  7361. protocol: "rendering",
  7362. fn: function(html){
  7363. var self=this,$self=this;
  7364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7365. return $core.withContext(function($ctx1) {
  7366. //>>excludeEnd("ctx");
  7367. var $1,$2;
  7368. $1=$recv(html)._div();
  7369. $recv($1)._class_("title");
  7370. $2=$recv($1)._with_($recv($self["@command"])._label());
  7371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7372. $ctx1.sendIdx["with:"]=1;
  7373. //>>excludeEnd("ctx");
  7374. $recv($recv(html)._p())._with_("Ctrl-space + ".__comma($recv($recv($self["@command"])._keySequence())._join_(" + ")));
  7375. return self;
  7376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7377. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLShortcutSuggestionWidget)});
  7378. //>>excludeEnd("ctx");
  7379. },
  7380. //>>excludeStart("ide", pragmas.excludeIdeData);
  7381. args: ["html"],
  7382. source: "renderMainOn: html\x0a\x09html div\x0a\x09\x09class: 'title';\x0a\x09\x09with: command label.\x0a\x09\x09\x0a\x09html p\x0a\x09\x09with: 'Ctrl-space + ', (command keySequence join: ' + ')",
  7383. referencedClasses: [],
  7384. //>>excludeEnd("ide");
  7385. messageSends: ["class:", "div", "with:", "label", "p", ",", "join:", "keySequence"]
  7386. }),
  7387. $globals.HLShortcutSuggestionWidget);
  7388. $core.addMethod(
  7389. $core.method({
  7390. selector: "show",
  7391. protocol: "actions",
  7392. fn: function(){
  7393. var self=this,$self=this;
  7394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7395. return $core.withContext(function($ctx1) {
  7396. //>>excludeEnd("ctx");
  7397. (
  7398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7399. $ctx1.supercall = true,
  7400. //>>excludeEnd("ctx");
  7401. ($globals.HLShortcutSuggestionWidget.superclass||$boot.nilAsClass).fn.prototype._show.apply($self, []));
  7402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7403. $ctx1.supercall = false;
  7404. //>>excludeEnd("ctx");;
  7405. $recv((function(){
  7406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7407. return $core.withContext(function($ctx2) {
  7408. //>>excludeEnd("ctx");
  7409. return $self._remove();
  7410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7411. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7412. //>>excludeEnd("ctx");
  7413. }))._valueWithTimeout_($self._visibleDelay());
  7414. return self;
  7415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7416. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLShortcutSuggestionWidget)});
  7417. //>>excludeEnd("ctx");
  7418. },
  7419. //>>excludeStart("ide", pragmas.excludeIdeData);
  7420. args: [],
  7421. source: "show\x0a\x09super show.\x0a\x09[ self remove ] valueWithTimeout: self visibleDelay.",
  7422. referencedClasses: [],
  7423. //>>excludeEnd("ide");
  7424. messageSends: ["show", "valueWithTimeout:", "remove", "visibleDelay"]
  7425. }),
  7426. $globals.HLShortcutSuggestionWidget);
  7427. $core.addMethod(
  7428. $core.method({
  7429. selector: "visibleDelay",
  7430. protocol: "constants",
  7431. fn: function(){
  7432. var self=this,$self=this;
  7433. return (2000);
  7434. },
  7435. //>>excludeStart("ide", pragmas.excludeIdeData);
  7436. args: [],
  7437. source: "visibleDelay\x0a\x09^ 2000",
  7438. referencedClasses: [],
  7439. //>>excludeEnd("ide");
  7440. messageSends: []
  7441. }),
  7442. $globals.HLShortcutSuggestionWidget);
  7443. $core.addMethod(
  7444. $core.method({
  7445. selector: "command:",
  7446. protocol: "instance creation",
  7447. fn: function(aCommand){
  7448. var self=this,$self=this;
  7449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7450. return $core.withContext(function($ctx1) {
  7451. //>>excludeEnd("ctx");
  7452. return $recv($self._new())._command_(aCommand);
  7453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7454. }, function($ctx1) {$ctx1.fill(self,"command:",{aCommand:aCommand},$globals.HLShortcutSuggestionWidget.a$cls)});
  7455. //>>excludeEnd("ctx");
  7456. },
  7457. //>>excludeStart("ide", pragmas.excludeIdeData);
  7458. args: ["aCommand"],
  7459. source: "command: aCommand\x0a\x09^ self new command: aCommand",
  7460. referencedClasses: [],
  7461. //>>excludeEnd("ide");
  7462. messageSends: ["command:", "new"]
  7463. }),
  7464. $globals.HLShortcutSuggestionWidget.a$cls);
  7465. $core.addClass("HLTabSelectionWidget", $globals.HLModalWidget, ["tabs", "tabList", "selectedTab", "selectCallback", "cancelCallback", "confirmCallback"], "Helios-Core");
  7466. //>>excludeStart("ide", pragmas.excludeIdeData);
  7467. $globals.HLTabSelectionWidget.comment="I am a modal window used to select or create tabs.";
  7468. //>>excludeEnd("ide");
  7469. $core.addMethod(
  7470. $core.method({
  7471. selector: "cancel",
  7472. protocol: "actions",
  7473. fn: function (){
  7474. var self=this,$self=this;
  7475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7476. return $core.withContext(function($ctx1) {
  7477. //>>excludeEnd("ctx");
  7478. $self._remove();
  7479. $recv($self._cancelCallback())._value();
  7480. return self;
  7481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7482. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLTabSelectionWidget)});
  7483. //>>excludeEnd("ctx");
  7484. },
  7485. //>>excludeStart("ide", pragmas.excludeIdeData);
  7486. args: [],
  7487. source: "cancel\x0a\x09self remove.\x0a\x09self cancelCallback value",
  7488. referencedClasses: [],
  7489. //>>excludeEnd("ide");
  7490. messageSends: ["remove", "value", "cancelCallback"]
  7491. }),
  7492. $globals.HLTabSelectionWidget);
  7493. $core.addMethod(
  7494. $core.method({
  7495. selector: "cancelCallback",
  7496. protocol: "accessing",
  7497. fn: function (){
  7498. var self=this,$self=this;
  7499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7500. return $core.withContext(function($ctx1) {
  7501. //>>excludeEnd("ctx");
  7502. var $1,$receiver;
  7503. $1=$self["@cancelCallback"];
  7504. if(($receiver = $1) == null || $receiver.a$nil){
  7505. return (function(){
  7506. });
  7507. } else {
  7508. return $1;
  7509. }
  7510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7511. }, function($ctx1) {$ctx1.fill(self,"cancelCallback",{},$globals.HLTabSelectionWidget)});
  7512. //>>excludeEnd("ctx");
  7513. },
  7514. //>>excludeStart("ide", pragmas.excludeIdeData);
  7515. args: [],
  7516. source: "cancelCallback\x0a\x09^ cancelCallback ifNil: [ [] ]",
  7517. referencedClasses: [],
  7518. //>>excludeEnd("ide");
  7519. messageSends: ["ifNil:"]
  7520. }),
  7521. $globals.HLTabSelectionWidget);
  7522. $core.addMethod(
  7523. $core.method({
  7524. selector: "cancelCallback:",
  7525. protocol: "accessing",
  7526. fn: function (aBlock){
  7527. var self=this,$self=this;
  7528. $self["@cancelCallback"]=aBlock;
  7529. return self;
  7530. },
  7531. //>>excludeStart("ide", pragmas.excludeIdeData);
  7532. args: ["aBlock"],
  7533. source: "cancelCallback: aBlock\x0a\x09cancelCallback := aBlock",
  7534. referencedClasses: [],
  7535. //>>excludeEnd("ide");
  7536. messageSends: []
  7537. }),
  7538. $globals.HLTabSelectionWidget);
  7539. $core.addMethod(
  7540. $core.method({
  7541. selector: "confirm",
  7542. protocol: "actions",
  7543. fn: function (){
  7544. var self=this,$self=this;
  7545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7546. return $core.withContext(function($ctx1) {
  7547. //>>excludeEnd("ctx");
  7548. $self._remove();
  7549. $recv($self._confirmCallback())._value_($self._selectedTab());
  7550. return self;
  7551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7552. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLTabSelectionWidget)});
  7553. //>>excludeEnd("ctx");
  7554. },
  7555. //>>excludeStart("ide", pragmas.excludeIdeData);
  7556. args: [],
  7557. source: "confirm\x0a\x09self remove.\x0a\x09self confirmCallback value: self selectedTab",
  7558. referencedClasses: [],
  7559. //>>excludeEnd("ide");
  7560. messageSends: ["remove", "value:", "confirmCallback", "selectedTab"]
  7561. }),
  7562. $globals.HLTabSelectionWidget);
  7563. $core.addMethod(
  7564. $core.method({
  7565. selector: "confirmCallback",
  7566. protocol: "accessing",
  7567. fn: function (){
  7568. var self=this,$self=this;
  7569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7570. return $core.withContext(function($ctx1) {
  7571. //>>excludeEnd("ctx");
  7572. var $1,$receiver;
  7573. $1=$self["@confirmCallback"];
  7574. if(($receiver = $1) == null || $receiver.a$nil){
  7575. return (function(){
  7576. });
  7577. } else {
  7578. return $1;
  7579. }
  7580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7581. }, function($ctx1) {$ctx1.fill(self,"confirmCallback",{},$globals.HLTabSelectionWidget)});
  7582. //>>excludeEnd("ctx");
  7583. },
  7584. //>>excludeStart("ide", pragmas.excludeIdeData);
  7585. args: [],
  7586. source: "confirmCallback\x0a\x09^ confirmCallback ifNil: [ [] ]",
  7587. referencedClasses: [],
  7588. //>>excludeEnd("ide");
  7589. messageSends: ["ifNil:"]
  7590. }),
  7591. $globals.HLTabSelectionWidget);
  7592. $core.addMethod(
  7593. $core.method({
  7594. selector: "confirmCallback:",
  7595. protocol: "accessing",
  7596. fn: function (aBlock){
  7597. var self=this,$self=this;
  7598. $self["@confirmCallback"]=aBlock;
  7599. return self;
  7600. },
  7601. //>>excludeStart("ide", pragmas.excludeIdeData);
  7602. args: ["aBlock"],
  7603. source: "confirmCallback: aBlock\x0a\x09confirmCallback := aBlock",
  7604. referencedClasses: [],
  7605. //>>excludeEnd("ide");
  7606. messageSends: []
  7607. }),
  7608. $globals.HLTabSelectionWidget);
  7609. $core.addMethod(
  7610. $core.method({
  7611. selector: "renderButtonsOn:",
  7612. protocol: "rendering",
  7613. fn: function (html){
  7614. var self=this,$self=this;
  7615. var confirmButton;
  7616. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7617. return $core.withContext(function($ctx1) {
  7618. //>>excludeEnd("ctx");
  7619. var $1,$3,$4,$5,$2;
  7620. $1=$recv(html)._div();
  7621. $recv($1)._class_("buttons");
  7622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7623. $ctx1.sendIdx["class:"]=1;
  7624. //>>excludeEnd("ctx");
  7625. $2=$recv($1)._with_((function(){
  7626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7627. return $core.withContext(function($ctx2) {
  7628. //>>excludeEnd("ctx");
  7629. $3=$recv(html)._button();
  7630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7631. $ctx2.sendIdx["button"]=1;
  7632. //>>excludeEnd("ctx");
  7633. $recv($3)._class_("button");
  7634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7635. $ctx2.sendIdx["class:"]=2;
  7636. //>>excludeEnd("ctx");
  7637. $recv($3)._with_("Cancel");
  7638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7639. $ctx2.sendIdx["with:"]=2;
  7640. //>>excludeEnd("ctx");
  7641. $4=$recv($3)._onClick_((function(){
  7642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7643. return $core.withContext(function($ctx3) {
  7644. //>>excludeEnd("ctx");
  7645. return $self._cancel();
  7646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7647. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7648. //>>excludeEnd("ctx");
  7649. }));
  7650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7651. $ctx2.sendIdx["onClick:"]=1;
  7652. //>>excludeEnd("ctx");
  7653. $4;
  7654. $5=$recv(html)._button();
  7655. $recv($5)._class_("button default");
  7656. $recv($5)._with_("Select tab");
  7657. confirmButton=$recv($5)._onClick_((function(){
  7658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7659. return $core.withContext(function($ctx3) {
  7660. //>>excludeEnd("ctx");
  7661. return $self._confirm();
  7662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7663. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  7664. //>>excludeEnd("ctx");
  7665. }));
  7666. return confirmButton;
  7667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7668. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7669. //>>excludeEnd("ctx");
  7670. }));
  7671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7672. $ctx1.sendIdx["with:"]=1;
  7673. //>>excludeEnd("ctx");
  7674. $self._giveFocusToButton_(confirmButton);
  7675. return self;
  7676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7677. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLTabSelectionWidget)});
  7678. //>>excludeEnd("ctx");
  7679. },
  7680. //>>excludeStart("ide", pragmas.excludeIdeData);
  7681. args: ["html"],
  7682. 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",
  7683. referencedClasses: [],
  7684. //>>excludeEnd("ide");
  7685. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "giveFocusToButton:"]
  7686. }),
  7687. $globals.HLTabSelectionWidget);
  7688. $core.addMethod(
  7689. $core.method({
  7690. selector: "renderContentOn:",
  7691. protocol: "rendering",
  7692. fn: function (html){
  7693. var self=this,$self=this;
  7694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7695. return $core.withContext(function($ctx1) {
  7696. //>>excludeEnd("ctx");
  7697. (
  7698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7699. $ctx1.supercall = true,
  7700. //>>excludeEnd("ctx");
  7701. ($globals.HLTabSelectionWidget.superclass||$boot.nilAsClass).fn.prototype._renderContentOn_.apply($self, [html]));
  7702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7703. $ctx1.supercall = false;
  7704. //>>excludeEnd("ctx");;
  7705. $recv($self._tabList())._focus();
  7706. return self;
  7707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7708. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabSelectionWidget)});
  7709. //>>excludeEnd("ctx");
  7710. },
  7711. //>>excludeStart("ide", pragmas.excludeIdeData);
  7712. args: ["html"],
  7713. source: "renderContentOn: html\x0a\x09super renderContentOn: html.\x0a\x09self tabList focus",
  7714. referencedClasses: [],
  7715. //>>excludeEnd("ide");
  7716. messageSends: ["renderContentOn:", "focus", "tabList"]
  7717. }),
  7718. $globals.HLTabSelectionWidget);
  7719. $core.addMethod(
  7720. $core.method({
  7721. selector: "renderMainOn:",
  7722. protocol: "rendering",
  7723. fn: function (html){
  7724. var self=this,$self=this;
  7725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7726. return $core.withContext(function($ctx1) {
  7727. //>>excludeEnd("ctx");
  7728. var $1,$2;
  7729. $1=$recv(html)._div();
  7730. $recv($1)._class_("title");
  7731. $2=$recv($1)._with_("Tab selection");
  7732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7733. $ctx1.sendIdx["with:"]=1;
  7734. //>>excludeEnd("ctx");
  7735. $recv(html)._with_($self._tabList());
  7736. return self;
  7737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7738. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLTabSelectionWidget)});
  7739. //>>excludeEnd("ctx");
  7740. },
  7741. //>>excludeStart("ide", pragmas.excludeIdeData);
  7742. args: ["html"],
  7743. source: "renderMainOn: html\x0a\x09html div \x0a\x09\x09class: 'title'; \x0a\x09\x09with: 'Tab selection'.\x0a\x09\x0a\x09html with: self tabList",
  7744. referencedClasses: [],
  7745. //>>excludeEnd("ide");
  7746. messageSends: ["class:", "div", "with:", "tabList"]
  7747. }),
  7748. $globals.HLTabSelectionWidget);
  7749. $core.addMethod(
  7750. $core.method({
  7751. selector: "renderTab:on:",
  7752. protocol: "rendering",
  7753. fn: function (aTab,html){
  7754. var self=this,$self=this;
  7755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7756. return $core.withContext(function($ctx1) {
  7757. //>>excludeEnd("ctx");
  7758. var $1;
  7759. $1=$recv(html)._span();
  7760. $recv($1)._class_($recv(aTab)._cssClass());
  7761. $recv($1)._with_($recv(aTab)._label());
  7762. return self;
  7763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7764. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html},$globals.HLTabSelectionWidget)});
  7765. //>>excludeEnd("ctx");
  7766. },
  7767. //>>excludeStart("ide", pragmas.excludeIdeData);
  7768. args: ["aTab", "html"],
  7769. source: "renderTab: aTab on: html\x0a\x09html \x0a\x09\x09span \x0a\x09\x09\x09class: aTab cssClass;\x0a\x09\x09\x09with: aTab label",
  7770. referencedClasses: [],
  7771. //>>excludeEnd("ide");
  7772. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  7773. }),
  7774. $globals.HLTabSelectionWidget);
  7775. $core.addMethod(
  7776. $core.method({
  7777. selector: "renderTabsOn:",
  7778. protocol: "rendering",
  7779. fn: function (html){
  7780. var self=this,$self=this;
  7781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7782. return $core.withContext(function($ctx1) {
  7783. //>>excludeEnd("ctx");
  7784. var $1;
  7785. $recv($self._tabs())._do_((function(each){
  7786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7787. return $core.withContext(function($ctx2) {
  7788. //>>excludeEnd("ctx");
  7789. return $recv($recv(html)._li())._with_((function(){
  7790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7791. return $core.withContext(function($ctx3) {
  7792. //>>excludeEnd("ctx");
  7793. $1=$recv(html)._a();
  7794. $recv($1)._with_((function(){
  7795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7796. return $core.withContext(function($ctx4) {
  7797. //>>excludeEnd("ctx");
  7798. return $self._renderTab_on_(each,html);
  7799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7800. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7801. //>>excludeEnd("ctx");
  7802. }));
  7803. return $recv($1)._onClick_((function(){
  7804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7805. return $core.withContext(function($ctx4) {
  7806. //>>excludeEnd("ctx");
  7807. return $self._selectTab_(each);
  7808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7809. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7810. //>>excludeEnd("ctx");
  7811. }));
  7812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7813. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7814. //>>excludeEnd("ctx");
  7815. }));
  7816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7817. $ctx2.sendIdx["with:"]=1;
  7818. //>>excludeEnd("ctx");
  7819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7820. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7821. //>>excludeEnd("ctx");
  7822. }));
  7823. return self;
  7824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7825. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.HLTabSelectionWidget)});
  7826. //>>excludeEnd("ctx");
  7827. },
  7828. //>>excludeStart("ide", pragmas.excludeIdeData);
  7829. args: ["html"],
  7830. 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 ] ] ]",
  7831. referencedClasses: [],
  7832. //>>excludeEnd("ide");
  7833. messageSends: ["do:", "tabs", "with:", "li", "a", "renderTab:on:", "onClick:", "selectTab:"]
  7834. }),
  7835. $globals.HLTabSelectionWidget);
  7836. $core.addMethod(
  7837. $core.method({
  7838. selector: "selectCallback",
  7839. protocol: "accessing",
  7840. fn: function (){
  7841. var self=this,$self=this;
  7842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7843. return $core.withContext(function($ctx1) {
  7844. //>>excludeEnd("ctx");
  7845. var $1,$receiver;
  7846. $1=$self["@selectCallback"];
  7847. if(($receiver = $1) == null || $receiver.a$nil){
  7848. return (function(){
  7849. });
  7850. } else {
  7851. return $1;
  7852. }
  7853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7854. }, function($ctx1) {$ctx1.fill(self,"selectCallback",{},$globals.HLTabSelectionWidget)});
  7855. //>>excludeEnd("ctx");
  7856. },
  7857. //>>excludeStart("ide", pragmas.excludeIdeData);
  7858. args: [],
  7859. source: "selectCallback\x0a\x09^ selectCallback ifNil: [ [] ]",
  7860. referencedClasses: [],
  7861. //>>excludeEnd("ide");
  7862. messageSends: ["ifNil:"]
  7863. }),
  7864. $globals.HLTabSelectionWidget);
  7865. $core.addMethod(
  7866. $core.method({
  7867. selector: "selectCallback:",
  7868. protocol: "accessing",
  7869. fn: function (aBlock){
  7870. var self=this,$self=this;
  7871. $self["@selectCallback"]=aBlock;
  7872. return self;
  7873. },
  7874. //>>excludeStart("ide", pragmas.excludeIdeData);
  7875. args: ["aBlock"],
  7876. source: "selectCallback: aBlock\x0a\x09selectCallback := aBlock",
  7877. referencedClasses: [],
  7878. //>>excludeEnd("ide");
  7879. messageSends: []
  7880. }),
  7881. $globals.HLTabSelectionWidget);
  7882. $core.addMethod(
  7883. $core.method({
  7884. selector: "selectTab:",
  7885. protocol: "actions",
  7886. fn: function (aTab){
  7887. var self=this,$self=this;
  7888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7889. return $core.withContext(function($ctx1) {
  7890. //>>excludeEnd("ctx");
  7891. $self._selectedTab_(aTab);
  7892. $recv($self._selectCallback())._value_(aTab);
  7893. return self;
  7894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7895. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aTab:aTab},$globals.HLTabSelectionWidget)});
  7896. //>>excludeEnd("ctx");
  7897. },
  7898. //>>excludeStart("ide", pragmas.excludeIdeData);
  7899. args: ["aTab"],
  7900. source: "selectTab: aTab\x0a\x09self selectedTab: aTab.\x0a\x09self selectCallback value: aTab",
  7901. referencedClasses: [],
  7902. //>>excludeEnd("ide");
  7903. messageSends: ["selectedTab:", "value:", "selectCallback"]
  7904. }),
  7905. $globals.HLTabSelectionWidget);
  7906. $core.addMethod(
  7907. $core.method({
  7908. selector: "selectedTab",
  7909. protocol: "accessing",
  7910. fn: function (){
  7911. var self=this,$self=this;
  7912. return $self["@selectedTab"];
  7913. },
  7914. //>>excludeStart("ide", pragmas.excludeIdeData);
  7915. args: [],
  7916. source: "selectedTab\x0a\x09^ selectedTab",
  7917. referencedClasses: [],
  7918. //>>excludeEnd("ide");
  7919. messageSends: []
  7920. }),
  7921. $globals.HLTabSelectionWidget);
  7922. $core.addMethod(
  7923. $core.method({
  7924. selector: "selectedTab:",
  7925. protocol: "accessing",
  7926. fn: function (aTab){
  7927. var self=this,$self=this;
  7928. $self["@selectedTab"]=aTab;
  7929. return self;
  7930. },
  7931. //>>excludeStart("ide", pragmas.excludeIdeData);
  7932. args: ["aTab"],
  7933. source: "selectedTab: aTab\x0a\x09selectedTab := aTab",
  7934. referencedClasses: [],
  7935. //>>excludeEnd("ide");
  7936. messageSends: []
  7937. }),
  7938. $globals.HLTabSelectionWidget);
  7939. $core.addMethod(
  7940. $core.method({
  7941. selector: "setupKeyBindings",
  7942. protocol: "actions",
  7943. fn: function (){
  7944. var self=this,$self=this;
  7945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7946. return $core.withContext(function($ctx1) {
  7947. //>>excludeEnd("ctx");
  7948. var $1;
  7949. (
  7950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7951. $ctx1.supercall = true,
  7952. //>>excludeEnd("ctx");
  7953. ($globals.HLTabSelectionWidget.superclass||$boot.nilAsClass).fn.prototype._setupKeyBindings.apply($self, []));
  7954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7955. $ctx1.supercall = false;
  7956. //>>excludeEnd("ctx");;
  7957. $recv(".dialog"._asJQuery())._keyup_((function(e){
  7958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7959. return $core.withContext(function($ctx2) {
  7960. //>>excludeEnd("ctx");
  7961. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($globals.String)._cr())._asciiValue());
  7962. if($core.assert($1)){
  7963. return $self._confirm();
  7964. }
  7965. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7966. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  7967. //>>excludeEnd("ctx");
  7968. }));
  7969. return self;
  7970. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7971. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLTabSelectionWidget)});
  7972. //>>excludeEnd("ctx");
  7973. },
  7974. //>>excludeStart("ide", pragmas.excludeIdeData);
  7975. args: [],
  7976. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String cr asciiValue ifTrue: [ self confirm ] ]",
  7977. referencedClasses: ["String"],
  7978. //>>excludeEnd("ide");
  7979. messageSends: ["setupKeyBindings", "keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "cr", "confirm"]
  7980. }),
  7981. $globals.HLTabSelectionWidget);
  7982. $core.addMethod(
  7983. $core.method({
  7984. selector: "tabList",
  7985. protocol: "rendering",
  7986. fn: function (){
  7987. var self=this,$self=this;
  7988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7989. return $core.withContext(function($ctx1) {
  7990. //>>excludeEnd("ctx");
  7991. var $1,$2,$receiver;
  7992. $1=$self["@tabList"];
  7993. if(($receiver = $1) == null || $receiver.a$nil){
  7994. $self["@tabList"]=$recv($globals.HLTabListWidget)._new();
  7995. $self["@tabList"];
  7996. $2=$self["@tabList"];
  7997. $recv($2)._callback_((function(tab){
  7998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7999. return $core.withContext(function($ctx2) {
  8000. //>>excludeEnd("ctx");
  8001. $self._selectTab_(tab);
  8002. return $recv($self["@tabList"])._focus();
  8003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8004. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  8005. //>>excludeEnd("ctx");
  8006. }));
  8007. $recv($2)._selectedItem_($self._selectedTab());
  8008. $recv($2)._items_($self._tabs());
  8009. } else {
  8010. $1;
  8011. }
  8012. return $self["@tabList"];
  8013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8014. }, function($ctx1) {$ctx1.fill(self,"tabList",{},$globals.HLTabSelectionWidget)});
  8015. //>>excludeEnd("ctx");
  8016. },
  8017. //>>excludeStart("ide", pragmas.excludeIdeData);
  8018. args: [],
  8019. 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",
  8020. referencedClasses: ["HLTabListWidget"],
  8021. //>>excludeEnd("ide");
  8022. messageSends: ["ifNil:", "new", "callback:", "selectTab:", "focus", "selectedItem:", "selectedTab", "items:", "tabs"]
  8023. }),
  8024. $globals.HLTabSelectionWidget);
  8025. $core.addMethod(
  8026. $core.method({
  8027. selector: "tabs",
  8028. protocol: "accessing",
  8029. fn: function (){
  8030. var self=this,$self=this;
  8031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8032. return $core.withContext(function($ctx1) {
  8033. //>>excludeEnd("ctx");
  8034. var $1,$receiver;
  8035. $1=$self["@tabs"];
  8036. if(($receiver = $1) == null || $receiver.a$nil){
  8037. return [];
  8038. } else {
  8039. return $1;
  8040. }
  8041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8042. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabSelectionWidget)});
  8043. //>>excludeEnd("ctx");
  8044. },
  8045. //>>excludeStart("ide", pragmas.excludeIdeData);
  8046. args: [],
  8047. source: "tabs\x0a\x09^ tabs ifNil: [ #() ]",
  8048. referencedClasses: [],
  8049. //>>excludeEnd("ide");
  8050. messageSends: ["ifNil:"]
  8051. }),
  8052. $globals.HLTabSelectionWidget);
  8053. $core.addMethod(
  8054. $core.method({
  8055. selector: "tabs:",
  8056. protocol: "accessing",
  8057. fn: function (aCollection){
  8058. var self=this,$self=this;
  8059. $self["@tabs"]=aCollection;
  8060. return self;
  8061. },
  8062. //>>excludeStart("ide", pragmas.excludeIdeData);
  8063. args: ["aCollection"],
  8064. source: "tabs: aCollection\x0a\x09tabs := aCollection",
  8065. referencedClasses: [],
  8066. //>>excludeEnd("ide");
  8067. messageSends: []
  8068. }),
  8069. $globals.HLTabSelectionWidget);
  8070. $core.addClass("HLProgressBarWidget", $globals.HLWidget, ["label", "parent", "workBlock", "collection", "bar"], "Helios-Core");
  8071. //>>excludeStart("ide", pragmas.excludeIdeData);
  8072. $globals.HLProgressBarWidget.comment="I am a widget used to display a progress bar while iterating over a collection.";
  8073. //>>excludeEnd("ide");
  8074. $core.addMethod(
  8075. $core.method({
  8076. selector: "collection",
  8077. protocol: "accessing",
  8078. fn: function (){
  8079. var self=this,$self=this;
  8080. return $self["@collection"];
  8081. },
  8082. //>>excludeStart("ide", pragmas.excludeIdeData);
  8083. args: [],
  8084. source: "collection\x0a\x09^ collection",
  8085. referencedClasses: [],
  8086. //>>excludeEnd("ide");
  8087. messageSends: []
  8088. }),
  8089. $globals.HLProgressBarWidget);
  8090. $core.addMethod(
  8091. $core.method({
  8092. selector: "collection:",
  8093. protocol: "accessing",
  8094. fn: function (aCollection){
  8095. var self=this,$self=this;
  8096. $self["@collection"]=aCollection;
  8097. return self;
  8098. },
  8099. //>>excludeStart("ide", pragmas.excludeIdeData);
  8100. args: ["aCollection"],
  8101. source: "collection: aCollection\x0a\x09collection := aCollection",
  8102. referencedClasses: [],
  8103. //>>excludeEnd("ide");
  8104. messageSends: []
  8105. }),
  8106. $globals.HLProgressBarWidget);
  8107. $core.addMethod(
  8108. $core.method({
  8109. selector: "evaluateAt:",
  8110. protocol: "actions",
  8111. fn: function (anInteger){
  8112. var self=this,$self=this;
  8113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8114. return $core.withContext(function($ctx1) {
  8115. //>>excludeEnd("ctx");
  8116. var $4,$3,$2,$1,$7,$6,$5;
  8117. $4=$self._collection();
  8118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8119. $ctx1.sendIdx["collection"]=1;
  8120. //>>excludeEnd("ctx");
  8121. $3=$recv($4)._size();
  8122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8123. $ctx1.sendIdx["size"]=1;
  8124. //>>excludeEnd("ctx");
  8125. $2=$recv(anInteger).__slash($3);
  8126. $1=$recv($2).__star((100));
  8127. $self._updateProgress_($1);
  8128. $7=$self._collection();
  8129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8130. $ctx1.sendIdx["collection"]=2;
  8131. //>>excludeEnd("ctx");
  8132. $6=$recv($7)._size();
  8133. $5=$recv(anInteger).__lt_eq($6);
  8134. if($core.assert($5)){
  8135. $recv((function(){
  8136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8137. return $core.withContext(function($ctx2) {
  8138. //>>excludeEnd("ctx");
  8139. $recv($self._workBlock())._value_($recv($self._collection())._at_(anInteger));
  8140. return $self._evaluateAt_($recv(anInteger).__plus((1)));
  8141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8142. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8143. //>>excludeEnd("ctx");
  8144. }))._fork();
  8145. } else {
  8146. $recv((function(){
  8147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8148. return $core.withContext(function($ctx2) {
  8149. //>>excludeEnd("ctx");
  8150. return $self._remove();
  8151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8152. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  8153. //>>excludeEnd("ctx");
  8154. }))._valueWithTimeout_((500));
  8155. }
  8156. return self;
  8157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8158. }, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  8159. //>>excludeEnd("ctx");
  8160. },
  8161. //>>excludeStart("ide", pragmas.excludeIdeData);
  8162. args: ["anInteger"],
  8163. 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 ]",
  8164. referencedClasses: [],
  8165. //>>excludeEnd("ide");
  8166. messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "<=", "fork", "value:", "workBlock", "at:", "evaluateAt:", "+", "valueWithTimeout:", "remove"]
  8167. }),
  8168. $globals.HLProgressBarWidget);
  8169. $core.addMethod(
  8170. $core.method({
  8171. selector: "label",
  8172. protocol: "accessing",
  8173. fn: function (){
  8174. var self=this,$self=this;
  8175. return $self["@label"];
  8176. },
  8177. //>>excludeStart("ide", pragmas.excludeIdeData);
  8178. args: [],
  8179. source: "label\x0a\x09^ label",
  8180. referencedClasses: [],
  8181. //>>excludeEnd("ide");
  8182. messageSends: []
  8183. }),
  8184. $globals.HLProgressBarWidget);
  8185. $core.addMethod(
  8186. $core.method({
  8187. selector: "label:",
  8188. protocol: "accessing",
  8189. fn: function (aString){
  8190. var self=this,$self=this;
  8191. $self["@label"]=aString;
  8192. return self;
  8193. },
  8194. //>>excludeStart("ide", pragmas.excludeIdeData);
  8195. args: ["aString"],
  8196. source: "label: aString\x0a\x09label := aString",
  8197. referencedClasses: [],
  8198. //>>excludeEnd("ide");
  8199. messageSends: []
  8200. }),
  8201. $globals.HLProgressBarWidget);
  8202. $core.addMethod(
  8203. $core.method({
  8204. selector: "parent",
  8205. protocol: "accessing",
  8206. fn: function (){
  8207. var self=this,$self=this;
  8208. return $self["@parent"];
  8209. },
  8210. //>>excludeStart("ide", pragmas.excludeIdeData);
  8211. args: [],
  8212. source: "parent\x0a\x09^ parent",
  8213. referencedClasses: [],
  8214. //>>excludeEnd("ide");
  8215. messageSends: []
  8216. }),
  8217. $globals.HLProgressBarWidget);
  8218. $core.addMethod(
  8219. $core.method({
  8220. selector: "parent:",
  8221. protocol: "accessing",
  8222. fn: function (aProgress){
  8223. var self=this,$self=this;
  8224. $self["@parent"]=aProgress;
  8225. return self;
  8226. },
  8227. //>>excludeStart("ide", pragmas.excludeIdeData);
  8228. args: ["aProgress"],
  8229. source: "parent: aProgress\x0a\x09parent := aProgress",
  8230. referencedClasses: [],
  8231. //>>excludeEnd("ide");
  8232. messageSends: []
  8233. }),
  8234. $globals.HLProgressBarWidget);
  8235. $core.addMethod(
  8236. $core.method({
  8237. selector: "remove",
  8238. protocol: "actions",
  8239. fn: function (){
  8240. var self=this,$self=this;
  8241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8242. return $core.withContext(function($ctx1) {
  8243. //>>excludeEnd("ctx");
  8244. $recv($self._parent())._removeProgressBar_(self);
  8245. return self;
  8246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8247. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressBarWidget)});
  8248. //>>excludeEnd("ctx");
  8249. },
  8250. //>>excludeStart("ide", pragmas.excludeIdeData);
  8251. args: [],
  8252. source: "remove\x0a\x09self parent removeProgressBar: self",
  8253. referencedClasses: [],
  8254. //>>excludeEnd("ide");
  8255. messageSends: ["removeProgressBar:", "parent"]
  8256. }),
  8257. $globals.HLProgressBarWidget);
  8258. $core.addMethod(
  8259. $core.method({
  8260. selector: "renderContentOn:",
  8261. protocol: "rendering",
  8262. fn: function (html){
  8263. var self=this,$self=this;
  8264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8265. return $core.withContext(function($ctx1) {
  8266. //>>excludeEnd("ctx");
  8267. var $1,$2,$3,$4,$5;
  8268. $1=$recv(html)._span();
  8269. $2=$self._label();
  8270. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8271. $ctx1.sendIdx["label"]=1;
  8272. //>>excludeEnd("ctx");
  8273. $recv($1)._with_($2);
  8274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8275. $ctx1.sendIdx["with:"]=1;
  8276. //>>excludeEnd("ctx");
  8277. $3=console;
  8278. $recv($3)._log_("progress bar: ");
  8279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8280. $ctx1.sendIdx["log:"]=1;
  8281. //>>excludeEnd("ctx");
  8282. $recv($3)._log_($self._label());
  8283. $4=$recv(html)._div();
  8284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8285. $ctx1.sendIdx["div"]=1;
  8286. //>>excludeEnd("ctx");
  8287. $recv($4)._class_("progress");
  8288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8289. $ctx1.sendIdx["class:"]=1;
  8290. //>>excludeEnd("ctx");
  8291. $recv($4)._with_((function(){
  8292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8293. return $core.withContext(function($ctx2) {
  8294. //>>excludeEnd("ctx");
  8295. $5=$recv(html)._div();
  8296. $recv($5)._class_("progress-bar");
  8297. $self["@bar"]=$recv($5)._style_("width: 0%");
  8298. return $self["@bar"];
  8299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8300. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8301. //>>excludeEnd("ctx");
  8302. }));
  8303. return self;
  8304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8305. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLProgressBarWidget)});
  8306. //>>excludeEnd("ctx");
  8307. },
  8308. //>>excludeStart("ide", pragmas.excludeIdeData);
  8309. args: ["html"],
  8310. 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%' ]",
  8311. referencedClasses: [],
  8312. //>>excludeEnd("ide");
  8313. messageSends: ["with:", "span", "label", "log:", "class:", "div", "style:"]
  8314. }),
  8315. $globals.HLProgressBarWidget);
  8316. $core.addMethod(
  8317. $core.method({
  8318. selector: "start",
  8319. protocol: "actions",
  8320. fn: function (){
  8321. var self=this,$self=this;
  8322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8323. return $core.withContext(function($ctx1) {
  8324. //>>excludeEnd("ctx");
  8325. $self._evaluateAt_((1));
  8326. return self;
  8327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8328. }, function($ctx1) {$ctx1.fill(self,"start",{},$globals.HLProgressBarWidget)});
  8329. //>>excludeEnd("ctx");
  8330. },
  8331. //>>excludeStart("ide", pragmas.excludeIdeData);
  8332. args: [],
  8333. source: "start\x0a\x09\x22Make sure the UI has some time to update itself between each iteration\x22\x0a\x09\x0a\x09self evaluateAt: 1",
  8334. referencedClasses: [],
  8335. //>>excludeEnd("ide");
  8336. messageSends: ["evaluateAt:"]
  8337. }),
  8338. $globals.HLProgressBarWidget);
  8339. $core.addMethod(
  8340. $core.method({
  8341. selector: "updateProgress:",
  8342. protocol: "actions",
  8343. fn: function (anInteger){
  8344. var self=this,$self=this;
  8345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8346. return $core.withContext(function($ctx1) {
  8347. //>>excludeEnd("ctx");
  8348. $recv($recv($self["@bar"])._asJQuery())._css_put_("width",$recv($recv(anInteger)._asString()).__comma("%"));
  8349. return self;
  8350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8351. }, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  8352. //>>excludeEnd("ctx");
  8353. },
  8354. //>>excludeStart("ide", pragmas.excludeIdeData);
  8355. args: ["anInteger"],
  8356. source: "updateProgress: anInteger\x0a\x09bar asJQuery css: 'width' put: anInteger asString, '%'",
  8357. referencedClasses: [],
  8358. //>>excludeEnd("ide");
  8359. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  8360. }),
  8361. $globals.HLProgressBarWidget);
  8362. $core.addMethod(
  8363. $core.method({
  8364. selector: "workBlock",
  8365. protocol: "accessing",
  8366. fn: function (){
  8367. var self=this,$self=this;
  8368. return $self["@workBlock"];
  8369. },
  8370. //>>excludeStart("ide", pragmas.excludeIdeData);
  8371. args: [],
  8372. source: "workBlock\x0a\x09^ workBlock",
  8373. referencedClasses: [],
  8374. //>>excludeEnd("ide");
  8375. messageSends: []
  8376. }),
  8377. $globals.HLProgressBarWidget);
  8378. $core.addMethod(
  8379. $core.method({
  8380. selector: "workBlock:",
  8381. protocol: "accessing",
  8382. fn: function (aBlock){
  8383. var self=this,$self=this;
  8384. $self["@workBlock"]=aBlock;
  8385. return self;
  8386. },
  8387. //>>excludeStart("ide", pragmas.excludeIdeData);
  8388. args: ["aBlock"],
  8389. source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
  8390. referencedClasses: [],
  8391. //>>excludeEnd("ide");
  8392. messageSends: []
  8393. }),
  8394. $globals.HLProgressBarWidget);
  8395. $globals.HLProgressBarWidget.a$cls.iVarNames = ["default"];
  8396. $core.addMethod(
  8397. $core.method({
  8398. selector: "default",
  8399. protocol: "accessing",
  8400. fn: function (){
  8401. var self=this,$self=this;
  8402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8403. return $core.withContext(function($ctx1) {
  8404. //>>excludeEnd("ctx");
  8405. var $1,$receiver;
  8406. $1=$self["@default"];
  8407. if(($receiver = $1) == null || $receiver.a$nil){
  8408. $self["@default"]=$self._new();
  8409. return $self["@default"];
  8410. } else {
  8411. return $1;
  8412. }
  8413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8414. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressBarWidget.a$cls)});
  8415. //>>excludeEnd("ctx");
  8416. },
  8417. //>>excludeStart("ide", pragmas.excludeIdeData);
  8418. args: [],
  8419. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  8420. referencedClasses: [],
  8421. //>>excludeEnd("ide");
  8422. messageSends: ["ifNil:", "new"]
  8423. }),
  8424. $globals.HLProgressBarWidget.a$cls);
  8425. $core.addClass("HLSpotlightWidget", $globals.HLWidget, ["input"], "Helios-Core");
  8426. $core.addMethod(
  8427. $core.method({
  8428. selector: "findMatches:andRender:",
  8429. protocol: "actions",
  8430. fn: function (aQueryString,aRenderCallback){
  8431. var self=this,$self=this;
  8432. var matches;
  8433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8434. return $core.withContext(function($ctx1) {
  8435. //>>excludeEnd("ctx");
  8436. matches=$recv($self._inputCompletion())._select_((function(each){
  8437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8438. return $core.withContext(function($ctx2) {
  8439. //>>excludeEnd("ctx");
  8440. return $recv(each)._match_(aQueryString);
  8441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8442. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  8443. //>>excludeEnd("ctx");
  8444. }));
  8445. $recv(aRenderCallback)._value_(matches);
  8446. return self;
  8447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8448. }, function($ctx1) {$ctx1.fill(self,"findMatches:andRender:",{aQueryString:aQueryString,aRenderCallback:aRenderCallback,matches:matches},$globals.HLSpotlightWidget)});
  8449. //>>excludeEnd("ctx");
  8450. },
  8451. //>>excludeStart("ide", pragmas.excludeIdeData);
  8452. args: ["aQueryString", "aRenderCallback"],
  8453. source: "findMatches: aQueryString andRender: aRenderCallback\x0a\x09| matches |\x0a\x09matches := self inputCompletion select: [ :each | each match: aQueryString ].\x0a\x09aRenderCallback value: matches",
  8454. referencedClasses: [],
  8455. //>>excludeEnd("ide");
  8456. messageSends: ["select:", "inputCompletion", "match:", "value:"]
  8457. }),
  8458. $globals.HLSpotlightWidget);
  8459. $core.addMethod(
  8460. $core.method({
  8461. selector: "ghostText",
  8462. protocol: "accessing",
  8463. fn: function (){
  8464. var self=this,$self=this;
  8465. return "Search... (Ctrl+F)";
  8466. },
  8467. //>>excludeStart("ide", pragmas.excludeIdeData);
  8468. args: [],
  8469. source: "ghostText\x0a\x09^ 'Search... (Ctrl+F)'",
  8470. referencedClasses: [],
  8471. //>>excludeEnd("ide");
  8472. messageSends: []
  8473. }),
  8474. $globals.HLSpotlightWidget);
  8475. $core.addMethod(
  8476. $core.method({
  8477. selector: "inputCompletion",
  8478. protocol: "accessing",
  8479. fn: function (){
  8480. var self=this,$self=this;
  8481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8482. return $core.withContext(function($ctx1) {
  8483. //>>excludeEnd("ctx");
  8484. var $3,$2,$1;
  8485. $3=$self._manager();
  8486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8487. $ctx1.sendIdx["manager"]=1;
  8488. //>>excludeEnd("ctx");
  8489. $2=$recv($3)._environment();
  8490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8491. $ctx1.sendIdx["environment"]=1;
  8492. //>>excludeEnd("ctx");
  8493. $1=$recv($2)._availableClassNames();
  8494. return $recv($1).__comma($recv($recv($self._manager())._environment())._allSelectors());
  8495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8496. }, function($ctx1) {$ctx1.fill(self,"inputCompletion",{},$globals.HLSpotlightWidget)});
  8497. //>>excludeEnd("ctx");
  8498. },
  8499. //>>excludeStart("ide", pragmas.excludeIdeData);
  8500. args: [],
  8501. source: "inputCompletion\x0a\x09^ self manager environment availableClassNames, self manager environment allSelectors",
  8502. referencedClasses: [],
  8503. //>>excludeEnd("ide");
  8504. messageSends: [",", "availableClassNames", "environment", "manager", "allSelectors"]
  8505. }),
  8506. $globals.HLSpotlightWidget);
  8507. $core.addMethod(
  8508. $core.method({
  8509. selector: "renderContentOn:",
  8510. protocol: "rendering",
  8511. fn: function (html){
  8512. var self=this,$self=this;
  8513. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8514. return $core.withContext(function($ctx1) {
  8515. //>>excludeEnd("ctx");
  8516. var $1,$2,$4,$3;
  8517. $1=$recv(html)._input();
  8518. $recv($1)._class_("spotlight typeahead");
  8519. $recv($1)._placeholder_($self._ghostText());
  8520. $self["@input"]=$recv($1)._onKeyDown_($recv((function(event){
  8521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8522. return $core.withContext(function($ctx2) {
  8523. //>>excludeEnd("ctx");
  8524. $2=$recv($recv(event)._which()).__eq((13));
  8525. if($core.assert($2)){
  8526. $4=$recv($self["@input"])._asJQuery();
  8527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8528. $ctx2.sendIdx["asJQuery"]=1;
  8529. //>>excludeEnd("ctx");
  8530. $3=$recv($4)._val();
  8531. return $self._search_($3);
  8532. }
  8533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8534. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  8535. //>>excludeEnd("ctx");
  8536. }))._yourself());
  8537. $recv($recv($self["@input"])._asJQuery())._typeahead_value_($globals.HashedCollection._newFromPairs_(["hint",true]),$globals.HashedCollection._newFromPairs_(["name","classesAndSelectors","displayKey",(function(suggestion){
  8538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8539. return $core.withContext(function($ctx2) {
  8540. //>>excludeEnd("ctx");
  8541. return $recv(suggestion)._asString();
  8542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8543. }, function($ctx2) {$ctx2.fillBlock({suggestion:suggestion},$ctx1,3)});
  8544. //>>excludeEnd("ctx");
  8545. }),"source",(function(query,callback){
  8546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8547. return $core.withContext(function($ctx2) {
  8548. //>>excludeEnd("ctx");
  8549. return $self._findMatches_andRender_(query,callback);
  8550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8551. }, function($ctx2) {$ctx2.fillBlock({query:query,callback:callback},$ctx1,4)});
  8552. //>>excludeEnd("ctx");
  8553. })]));
  8554. return self;
  8555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8556. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLSpotlightWidget)});
  8557. //>>excludeEnd("ctx");
  8558. },
  8559. //>>excludeStart("ide", pragmas.excludeIdeData);
  8560. args: ["html"],
  8561. 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",
  8562. referencedClasses: [],
  8563. //>>excludeEnd("ide");
  8564. messageSends: ["class:", "input", "placeholder:", "ghostText", "onKeyDown:", "yourself", "ifTrue:", "=", "which", "search:", "val", "asJQuery", "typeahead:value:", "asString", "findMatches:andRender:"]
  8565. }),
  8566. $globals.HLSpotlightWidget);
  8567. $core.addMethod(
  8568. $core.method({
  8569. selector: "search:",
  8570. protocol: "actions",
  8571. fn: function (aString){
  8572. var self=this,$self=this;
  8573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8574. return $core.withContext(function($ctx1) {
  8575. //>>excludeEnd("ctx");
  8576. $recv(aString)._ifNotEmpty_((function(){
  8577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8578. return $core.withContext(function($ctx2) {
  8579. //>>excludeEnd("ctx");
  8580. return $recv($globals.Finder)._findString_(aString);
  8581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8582. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8583. //>>excludeEnd("ctx");
  8584. }));
  8585. return self;
  8586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8587. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.HLSpotlightWidget)});
  8588. //>>excludeEnd("ctx");
  8589. },
  8590. //>>excludeStart("ide", pragmas.excludeIdeData);
  8591. args: ["aString"],
  8592. source: "search: aString\x0a\x09\x22open a new Browser pointing to aString\x22\x0a\x09aString ifNotEmpty: [\x0a\x09\x09Finder findString: aString ]",
  8593. referencedClasses: ["Finder"],
  8594. //>>excludeEnd("ide");
  8595. messageSends: ["ifNotEmpty:", "findString:"]
  8596. }),
  8597. $globals.HLSpotlightWidget);
  8598. $core.addClass("HLTabWidget", $globals.HLWidget, ["widget", "label", "root"], "Helios-Core");
  8599. //>>excludeStart("ide", pragmas.excludeIdeData);
  8600. $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";
  8601. //>>excludeEnd("ide");
  8602. $core.addMethod(
  8603. $core.method({
  8604. selector: "activate",
  8605. protocol: "accessing",
  8606. fn: function (){
  8607. var self=this,$self=this;
  8608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8609. return $core.withContext(function($ctx1) {
  8610. //>>excludeEnd("ctx");
  8611. $recv($self._manager())._activate_(self);
  8612. return self;
  8613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8614. }, function($ctx1) {$ctx1.fill(self,"activate",{},$globals.HLTabWidget)});
  8615. //>>excludeEnd("ctx");
  8616. },
  8617. //>>excludeStart("ide", pragmas.excludeIdeData);
  8618. args: [],
  8619. source: "activate\x0a\x09self manager activate: self",
  8620. referencedClasses: [],
  8621. //>>excludeEnd("ide");
  8622. messageSends: ["activate:", "manager"]
  8623. }),
  8624. $globals.HLTabWidget);
  8625. $core.addMethod(
  8626. $core.method({
  8627. selector: "add",
  8628. protocol: "actions",
  8629. fn: function (){
  8630. var self=this,$self=this;
  8631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8632. return $core.withContext(function($ctx1) {
  8633. //>>excludeEnd("ctx");
  8634. $recv($self._manager())._addTab_(self);
  8635. $self._observeManager();
  8636. return self;
  8637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8638. }, function($ctx1) {$ctx1.fill(self,"add",{},$globals.HLTabWidget)});
  8639. //>>excludeEnd("ctx");
  8640. },
  8641. //>>excludeStart("ide", pragmas.excludeIdeData);
  8642. args: [],
  8643. source: "add\x0a\x09self manager addTab: self.\x0a\x09self observeManager",
  8644. referencedClasses: [],
  8645. //>>excludeEnd("ide");
  8646. messageSends: ["addTab:", "manager", "observeManager"]
  8647. }),
  8648. $globals.HLTabWidget);
  8649. $core.addMethod(
  8650. $core.method({
  8651. selector: "cssClass",
  8652. protocol: "accessing",
  8653. fn: function (){
  8654. var self=this,$self=this;
  8655. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8656. return $core.withContext(function($ctx1) {
  8657. //>>excludeEnd("ctx");
  8658. return $recv($self._widget())._tabClass();
  8659. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8660. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},$globals.HLTabWidget)});
  8661. //>>excludeEnd("ctx");
  8662. },
  8663. //>>excludeStart("ide", pragmas.excludeIdeData);
  8664. args: [],
  8665. source: "cssClass\x0a\x09^ self widget tabClass",
  8666. referencedClasses: [],
  8667. //>>excludeEnd("ide");
  8668. messageSends: ["tabClass", "widget"]
  8669. }),
  8670. $globals.HLTabWidget);
  8671. $core.addMethod(
  8672. $core.method({
  8673. selector: "focus",
  8674. protocol: "accessing",
  8675. fn: function (){
  8676. var self=this,$self=this;
  8677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8678. return $core.withContext(function($ctx1) {
  8679. //>>excludeEnd("ctx");
  8680. var $2,$1;
  8681. $2=$self._widget();
  8682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8683. $ctx1.sendIdx["widget"]=1;
  8684. //>>excludeEnd("ctx");
  8685. $1=$recv($2)._canHaveFocus();
  8686. if($core.assert($1)){
  8687. $recv($self._widget())._focus();
  8688. }
  8689. return self;
  8690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8691. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLTabWidget)});
  8692. //>>excludeEnd("ctx");
  8693. },
  8694. //>>excludeStart("ide", pragmas.excludeIdeData);
  8695. args: [],
  8696. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  8697. referencedClasses: [],
  8698. //>>excludeEnd("ide");
  8699. messageSends: ["ifTrue:", "canHaveFocus", "widget", "focus"]
  8700. }),
  8701. $globals.HLTabWidget);
  8702. $core.addMethod(
  8703. $core.method({
  8704. selector: "hide",
  8705. protocol: "actions",
  8706. fn: function (){
  8707. var self=this,$self=this;
  8708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8709. return $core.withContext(function($ctx1) {
  8710. //>>excludeEnd("ctx");
  8711. var $1,$receiver;
  8712. $1=$self["@root"];
  8713. if(($receiver = $1) == null || $receiver.a$nil){
  8714. $1;
  8715. } else {
  8716. $recv($recv($self["@root"])._asJQuery())._css_put_("visibility","hidden");
  8717. }
  8718. return self;
  8719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8720. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.HLTabWidget)});
  8721. //>>excludeEnd("ctx");
  8722. },
  8723. //>>excludeStart("ide", pragmas.excludeIdeData);
  8724. args: [],
  8725. source: "hide\x0a\x09root ifNotNil: [ root asJQuery css: 'visibility' put: 'hidden' ]",
  8726. referencedClasses: [],
  8727. //>>excludeEnd("ide");
  8728. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]
  8729. }),
  8730. $globals.HLTabWidget);
  8731. $core.addMethod(
  8732. $core.method({
  8733. selector: "isActive",
  8734. protocol: "testing",
  8735. fn: function (){
  8736. var self=this,$self=this;
  8737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8738. return $core.withContext(function($ctx1) {
  8739. //>>excludeEnd("ctx");
  8740. return $recv($recv($self._manager())._activeTab()).__eq(self);
  8741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8742. }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLTabWidget)});
  8743. //>>excludeEnd("ctx");
  8744. },
  8745. //>>excludeStart("ide", pragmas.excludeIdeData);
  8746. args: [],
  8747. source: "isActive\x0a\x09^ self manager activeTab = self",
  8748. referencedClasses: [],
  8749. //>>excludeEnd("ide");
  8750. messageSends: ["=", "activeTab", "manager"]
  8751. }),
  8752. $globals.HLTabWidget);
  8753. $core.addMethod(
  8754. $core.method({
  8755. selector: "label",
  8756. protocol: "accessing",
  8757. fn: function (){
  8758. var self=this,$self=this;
  8759. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8760. return $core.withContext(function($ctx1) {
  8761. //>>excludeEnd("ctx");
  8762. var $1,$receiver;
  8763. $1=$self["@label"];
  8764. if(($receiver = $1) == null || $receiver.a$nil){
  8765. return "";
  8766. } else {
  8767. return $1;
  8768. }
  8769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8770. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.HLTabWidget)});
  8771. //>>excludeEnd("ctx");
  8772. },
  8773. //>>excludeStart("ide", pragmas.excludeIdeData);
  8774. args: [],
  8775. source: "label\x0a\x09^ label ifNil: [ '' ]",
  8776. referencedClasses: [],
  8777. //>>excludeEnd("ide");
  8778. messageSends: ["ifNil:"]
  8779. }),
  8780. $globals.HLTabWidget);
  8781. $core.addMethod(
  8782. $core.method({
  8783. selector: "label:",
  8784. protocol: "accessing",
  8785. fn: function (aString){
  8786. var self=this,$self=this;
  8787. $self["@label"]=aString;
  8788. return self;
  8789. },
  8790. //>>excludeStart("ide", pragmas.excludeIdeData);
  8791. args: ["aString"],
  8792. source: "label: aString\x0a\x09label := aString",
  8793. referencedClasses: [],
  8794. //>>excludeEnd("ide");
  8795. messageSends: []
  8796. }),
  8797. $globals.HLTabWidget);
  8798. $core.addMethod(
  8799. $core.method({
  8800. selector: "manager",
  8801. protocol: "accessing",
  8802. fn: function (){
  8803. var self=this,$self=this;
  8804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8805. return $core.withContext(function($ctx1) {
  8806. //>>excludeEnd("ctx");
  8807. return $recv($globals.HLManager)._current();
  8808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8809. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLTabWidget)});
  8810. //>>excludeEnd("ctx");
  8811. },
  8812. //>>excludeStart("ide", pragmas.excludeIdeData);
  8813. args: [],
  8814. source: "manager\x0a\x09^ HLManager current",
  8815. referencedClasses: ["HLManager"],
  8816. //>>excludeEnd("ide");
  8817. messageSends: ["current"]
  8818. }),
  8819. $globals.HLTabWidget);
  8820. $core.addMethod(
  8821. $core.method({
  8822. selector: "observeManager",
  8823. protocol: "actions",
  8824. fn: function (){
  8825. var self=this,$self=this;
  8826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8827. return $core.withContext(function($ctx1) {
  8828. //>>excludeEnd("ctx");
  8829. $recv($recv($self._manager())._announcer())._on_send_to_($globals.HLTabLabelChanged,"onTabLabelChanged:",self);
  8830. return self;
  8831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8832. }, function($ctx1) {$ctx1.fill(self,"observeManager",{},$globals.HLTabWidget)});
  8833. //>>excludeEnd("ctx");
  8834. },
  8835. //>>excludeStart("ide", pragmas.excludeIdeData);
  8836. args: [],
  8837. source: "observeManager\x0a\x09self manager announcer \x0a\x09\x09on: HLTabLabelChanged\x0a\x09\x09send: #onTabLabelChanged:\x0a\x09\x09to: self",
  8838. referencedClasses: ["HLTabLabelChanged"],
  8839. //>>excludeEnd("ide");
  8840. messageSends: ["on:send:to:", "announcer", "manager"]
  8841. }),
  8842. $globals.HLTabWidget);
  8843. $core.addMethod(
  8844. $core.method({
  8845. selector: "onTabLabelChanged:",
  8846. protocol: "reactions",
  8847. fn: function (anAnnouncement){
  8848. var self=this,$self=this;
  8849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8850. return $core.withContext(function($ctx1) {
  8851. //>>excludeEnd("ctx");
  8852. var $2,$1,$4,$5,$3;
  8853. $2=$recv(anAnnouncement)._widget();
  8854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8855. $ctx1.sendIdx["widget"]=1;
  8856. //>>excludeEnd("ctx");
  8857. $1=$recv($2).__eq($self._widget());
  8858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8859. $ctx1.sendIdx["="]=1;
  8860. //>>excludeEnd("ctx");
  8861. if($core.assert($1)){
  8862. $4=$self._label();
  8863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8864. $ctx1.sendIdx["label"]=1;
  8865. //>>excludeEnd("ctx");
  8866. $5=$recv(anAnnouncement)._label();
  8867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8868. $ctx1.sendIdx["label"]=2;
  8869. //>>excludeEnd("ctx");
  8870. $3=$recv($4).__eq($5);
  8871. if(!$core.assert($3)){
  8872. $self._label_($recv(anAnnouncement)._label());
  8873. $recv($self._manager())._refresh();
  8874. }
  8875. }
  8876. return self;
  8877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8878. }, function($ctx1) {$ctx1.fill(self,"onTabLabelChanged:",{anAnnouncement:anAnnouncement},$globals.HLTabWidget)});
  8879. //>>excludeEnd("ctx");
  8880. },
  8881. //>>excludeStart("ide", pragmas.excludeIdeData);
  8882. args: ["anAnnouncement"],
  8883. 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 ] ]",
  8884. referencedClasses: [],
  8885. //>>excludeEnd("ide");
  8886. messageSends: ["ifTrue:", "=", "widget", "ifFalse:", "label", "label:", "refresh", "manager"]
  8887. }),
  8888. $globals.HLTabWidget);
  8889. $core.addMethod(
  8890. $core.method({
  8891. selector: "registerBindings",
  8892. protocol: "actions",
  8893. fn: function (){
  8894. var self=this,$self=this;
  8895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8896. return $core.withContext(function($ctx1) {
  8897. //>>excludeEnd("ctx");
  8898. $recv($self._widget())._registerBindings();
  8899. return self;
  8900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8901. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLTabWidget)});
  8902. //>>excludeEnd("ctx");
  8903. },
  8904. //>>excludeStart("ide", pragmas.excludeIdeData);
  8905. args: [],
  8906. source: "registerBindings\x0a\x09self widget registerBindings",
  8907. referencedClasses: [],
  8908. //>>excludeEnd("ide");
  8909. messageSends: ["registerBindings", "widget"]
  8910. }),
  8911. $globals.HLTabWidget);
  8912. $core.addMethod(
  8913. $core.method({
  8914. selector: "remove",
  8915. protocol: "actions",
  8916. fn: function (){
  8917. var self=this,$self=this;
  8918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8919. return $core.withContext(function($ctx1) {
  8920. //>>excludeEnd("ctx");
  8921. var $1,$receiver;
  8922. $self._unregister();
  8923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8924. $ctx1.sendIdx["unregister"]=1;
  8925. //>>excludeEnd("ctx");
  8926. $recv($self._widget())._unregister();
  8927. $1=$self["@root"];
  8928. if(($receiver = $1) == null || $receiver.a$nil){
  8929. $1;
  8930. } else {
  8931. $recv($recv($self["@root"])._asJQuery())._remove();
  8932. }
  8933. return self;
  8934. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8935. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLTabWidget)});
  8936. //>>excludeEnd("ctx");
  8937. },
  8938. //>>excludeStart("ide", pragmas.excludeIdeData);
  8939. args: [],
  8940. source: "remove\x0a\x09self unregister.\x0a\x09self widget unregister.\x0a\x09root ifNotNil: [ root asJQuery remove ]",
  8941. referencedClasses: [],
  8942. //>>excludeEnd("ide");
  8943. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"]
  8944. }),
  8945. $globals.HLTabWidget);
  8946. $core.addMethod(
  8947. $core.method({
  8948. selector: "renderOn:",
  8949. protocol: "rendering",
  8950. fn: function (html){
  8951. var self=this,$self=this;
  8952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8953. return $core.withContext(function($ctx1) {
  8954. //>>excludeEnd("ctx");
  8955. var $1;
  8956. $1=$recv(html)._div();
  8957. $recv($1)._class_("tab");
  8958. $self["@root"]=$recv($1)._yourself();
  8959. $self._renderTab();
  8960. return self;
  8961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8962. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLTabWidget)});
  8963. //>>excludeEnd("ctx");
  8964. },
  8965. //>>excludeStart("ide", pragmas.excludeIdeData);
  8966. args: ["html"],
  8967. source: "renderOn: html\x0a\x09root := html div\x0a\x09\x09class: 'tab';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  8968. referencedClasses: [],
  8969. //>>excludeEnd("ide");
  8970. messageSends: ["class:", "div", "yourself", "renderTab"]
  8971. }),
  8972. $globals.HLTabWidget);
  8973. $core.addMethod(
  8974. $core.method({
  8975. selector: "renderTab",
  8976. protocol: "rendering",
  8977. fn: function (){
  8978. var self=this,$self=this;
  8979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8980. return $core.withContext(function($ctx1) {
  8981. //>>excludeEnd("ctx");
  8982. var $1;
  8983. $recv($self["@root"])._contents_((function(html){
  8984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8985. return $core.withContext(function($ctx2) {
  8986. //>>excludeEnd("ctx");
  8987. $1=$recv(html)._div();
  8988. $recv($1)._class_("amber_box");
  8989. return $recv($1)._with_((function(){
  8990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8991. return $core.withContext(function($ctx3) {
  8992. //>>excludeEnd("ctx");
  8993. return $recv($self._widget())._renderOn_(html);
  8994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8995. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8996. //>>excludeEnd("ctx");
  8997. }));
  8998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8999. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  9000. //>>excludeEnd("ctx");
  9001. }));
  9002. return self;
  9003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9004. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.HLTabWidget)});
  9005. //>>excludeEnd("ctx");
  9006. },
  9007. //>>excludeStart("ide", pragmas.excludeIdeData);
  9008. args: [],
  9009. source: "renderTab\x0a\x09root contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'amber_box';\x0a\x09\x09\x09with: [ self widget renderOn: html ] ]",
  9010. referencedClasses: [],
  9011. //>>excludeEnd("ide");
  9012. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]
  9013. }),
  9014. $globals.HLTabWidget);
  9015. $core.addMethod(
  9016. $core.method({
  9017. selector: "show",
  9018. protocol: "actions",
  9019. fn: function (){
  9020. var self=this,$self=this;
  9021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9022. return $core.withContext(function($ctx1) {
  9023. //>>excludeEnd("ctx");
  9024. var $1,$2,$receiver;
  9025. $1=$self["@root"];
  9026. if(($receiver = $1) == null || $receiver.a$nil){
  9027. $2="body"._asJQuery();
  9028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9029. $ctx1.sendIdx["asJQuery"]=1;
  9030. //>>excludeEnd("ctx");
  9031. $self._appendToJQuery_($2);
  9032. } else {
  9033. $recv($recv($self["@root"])._asJQuery())._css_put_("visibility","visible");
  9034. }
  9035. return self;
  9036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9037. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLTabWidget)});
  9038. //>>excludeEnd("ctx");
  9039. },
  9040. //>>excludeStart("ide", pragmas.excludeIdeData);
  9041. args: [],
  9042. source: "show\x0a\x09root\x0a\x09\x09ifNil: [ self appendToJQuery: 'body' asJQuery ]\x0a\x09\x09ifNotNil: [ root asJQuery css: 'visibility' put: 'visible' ]",
  9043. referencedClasses: [],
  9044. //>>excludeEnd("ide");
  9045. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]
  9046. }),
  9047. $globals.HLTabWidget);
  9048. $core.addMethod(
  9049. $core.method({
  9050. selector: "unregister",
  9051. protocol: "actions",
  9052. fn: function (){
  9053. var self=this,$self=this;
  9054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9055. return $core.withContext(function($ctx1) {
  9056. //>>excludeEnd("ctx");
  9057. $recv($recv($self._manager())._announcer())._unsubscribe_(self);
  9058. return self;
  9059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9060. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLTabWidget)});
  9061. //>>excludeEnd("ctx");
  9062. },
  9063. //>>excludeStart("ide", pragmas.excludeIdeData);
  9064. args: [],
  9065. source: "unregister\x0a\x09self manager announcer unsubscribe: self",
  9066. referencedClasses: [],
  9067. //>>excludeEnd("ide");
  9068. messageSends: ["unsubscribe:", "announcer", "manager"]
  9069. }),
  9070. $globals.HLTabWidget);
  9071. $core.addMethod(
  9072. $core.method({
  9073. selector: "widget",
  9074. protocol: "accessing",
  9075. fn: function (){
  9076. var self=this,$self=this;
  9077. return $self["@widget"];
  9078. },
  9079. //>>excludeStart("ide", pragmas.excludeIdeData);
  9080. args: [],
  9081. source: "widget\x0a\x09^ widget",
  9082. referencedClasses: [],
  9083. //>>excludeEnd("ide");
  9084. messageSends: []
  9085. }),
  9086. $globals.HLTabWidget);
  9087. $core.addMethod(
  9088. $core.method({
  9089. selector: "widget:",
  9090. protocol: "accessing",
  9091. fn: function (aWidget){
  9092. var self=this,$self=this;
  9093. $self["@widget"]=aWidget;
  9094. return self;
  9095. },
  9096. //>>excludeStart("ide", pragmas.excludeIdeData);
  9097. args: ["aWidget"],
  9098. source: "widget: aWidget\x0a\x09widget := aWidget",
  9099. referencedClasses: [],
  9100. //>>excludeEnd("ide");
  9101. messageSends: []
  9102. }),
  9103. $globals.HLTabWidget);
  9104. $core.addMethod(
  9105. $core.method({
  9106. selector: "on:labelled:",
  9107. protocol: "instance creation",
  9108. fn: function (aWidget,aString){
  9109. var self=this,$self=this;
  9110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9111. return $core.withContext(function($ctx1) {
  9112. //>>excludeEnd("ctx");
  9113. var $1;
  9114. $1=$self._new();
  9115. $recv($1)._widget_(aWidget);
  9116. $recv($1)._label_(aString);
  9117. return $recv($1)._yourself();
  9118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9119. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},$globals.HLTabWidget.a$cls)});
  9120. //>>excludeEnd("ctx");
  9121. },
  9122. //>>excludeStart("ide", pragmas.excludeIdeData);
  9123. args: ["aWidget", "aString"],
  9124. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  9125. referencedClasses: [],
  9126. //>>excludeEnd("ide");
  9127. messageSends: ["widget:", "new", "label:", "yourself"]
  9128. }),
  9129. $globals.HLTabWidget.a$cls);
  9130. $core.addClass("HLTabsWidget", $globals.HLWidget, ["tabs", "activeTab", "history", "selectionDisabled", "spotlight"], "Helios-Core");
  9131. $core.addMethod(
  9132. $core.method({
  9133. selector: "activate:",
  9134. protocol: "actions",
  9135. fn: function (aTab){
  9136. var self=this,$self=this;
  9137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9138. return $core.withContext(function($ctx1) {
  9139. //>>excludeEnd("ctx");
  9140. var $1;
  9141. $1=$self._isSelectionDisabled();
  9142. if($core.assert($1)){
  9143. return self;
  9144. }
  9145. $recv($recv($self._manager())._keyBinder())._flushBindings();
  9146. $recv(aTab)._registerBindings();
  9147. $self["@activeTab"]=aTab;
  9148. $self._refresh();
  9149. $self._addToHistory_(aTab);
  9150. $self._show_(aTab);
  9151. return self;
  9152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9153. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLTabsWidget)});
  9154. //>>excludeEnd("ctx");
  9155. },
  9156. //>>excludeStart("ide", pragmas.excludeIdeData);
  9157. args: ["aTab"],
  9158. 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",
  9159. referencedClasses: [],
  9160. //>>excludeEnd("ide");
  9161. messageSends: ["ifTrue:", "isSelectionDisabled", "flushBindings", "keyBinder", "manager", "registerBindings", "refresh", "addToHistory:", "show:"]
  9162. }),
  9163. $globals.HLTabsWidget);
  9164. $core.addMethod(
  9165. $core.method({
  9166. selector: "activateNextTab",
  9167. protocol: "actions",
  9168. fn: function (){
  9169. var self=this,$self=this;
  9170. var nextTab;
  9171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9172. return $core.withContext(function($ctx1) {
  9173. //>>excludeEnd("ctx");
  9174. var $1,$2,$5,$4,$3;
  9175. var $early={};
  9176. try {
  9177. $1=$self._tabs();
  9178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9179. $ctx1.sendIdx["tabs"]=1;
  9180. //>>excludeEnd("ctx");
  9181. $recv($1)._ifEmpty_((function(){
  9182. throw $early=[self];
  9183. }));
  9184. $2=$self._tabs();
  9185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9186. $ctx1.sendIdx["tabs"]=2;
  9187. //>>excludeEnd("ctx");
  9188. $5=$self._tabs();
  9189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9190. $ctx1.sendIdx["tabs"]=3;
  9191. //>>excludeEnd("ctx");
  9192. $4=$recv($5)._indexOf_($self._activeTab());
  9193. $3=$recv($4).__plus((1));
  9194. nextTab=$recv($2)._at_ifAbsent_($3,(function(){
  9195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9196. return $core.withContext(function($ctx2) {
  9197. //>>excludeEnd("ctx");
  9198. return $recv($self._tabs())._first();
  9199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9200. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9201. //>>excludeEnd("ctx");
  9202. }));
  9203. $self._activate_(nextTab);
  9204. return self;
  9205. }
  9206. catch(e) {if(e===$early)return e[0]; throw e}
  9207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9208. }, function($ctx1) {$ctx1.fill(self,"activateNextTab",{nextTab:nextTab},$globals.HLTabsWidget)});
  9209. //>>excludeEnd("ctx");
  9210. },
  9211. //>>excludeStart("ide", pragmas.excludeIdeData);
  9212. args: [],
  9213. 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",
  9214. referencedClasses: [],
  9215. //>>excludeEnd("ide");
  9216. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "+", "indexOf:", "activeTab", "first", "activate:"]
  9217. }),
  9218. $globals.HLTabsWidget);
  9219. $core.addMethod(
  9220. $core.method({
  9221. selector: "activatePreviousTab",
  9222. protocol: "actions",
  9223. fn: function (){
  9224. var self=this,$self=this;
  9225. var previousTab;
  9226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9227. return $core.withContext(function($ctx1) {
  9228. //>>excludeEnd("ctx");
  9229. var $1,$2,$5,$4,$3;
  9230. var $early={};
  9231. try {
  9232. $1=$self._tabs();
  9233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9234. $ctx1.sendIdx["tabs"]=1;
  9235. //>>excludeEnd("ctx");
  9236. $recv($1)._ifEmpty_((function(){
  9237. throw $early=[self];
  9238. }));
  9239. $2=$self._tabs();
  9240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9241. $ctx1.sendIdx["tabs"]=2;
  9242. //>>excludeEnd("ctx");
  9243. $5=$self._tabs();
  9244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9245. $ctx1.sendIdx["tabs"]=3;
  9246. //>>excludeEnd("ctx");
  9247. $4=$recv($5)._indexOf_($self._activeTab());
  9248. $3=$recv($4).__minus((1));
  9249. previousTab=$recv($2)._at_ifAbsent_($3,(function(){
  9250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9251. return $core.withContext(function($ctx2) {
  9252. //>>excludeEnd("ctx");
  9253. return $recv($self._tabs())._last();
  9254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9255. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9256. //>>excludeEnd("ctx");
  9257. }));
  9258. $self._activate_(previousTab);
  9259. return self;
  9260. }
  9261. catch(e) {if(e===$early)return e[0]; throw e}
  9262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9263. }, function($ctx1) {$ctx1.fill(self,"activatePreviousTab",{previousTab:previousTab},$globals.HLTabsWidget)});
  9264. //>>excludeEnd("ctx");
  9265. },
  9266. //>>excludeStart("ide", pragmas.excludeIdeData);
  9267. args: [],
  9268. 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",
  9269. referencedClasses: [],
  9270. //>>excludeEnd("ide");
  9271. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "-", "indexOf:", "activeTab", "last", "activate:"]
  9272. }),
  9273. $globals.HLTabsWidget);
  9274. $core.addMethod(
  9275. $core.method({
  9276. selector: "activeTab",
  9277. protocol: "accessing",
  9278. fn: function (){
  9279. var self=this,$self=this;
  9280. return $self["@activeTab"];
  9281. },
  9282. //>>excludeStart("ide", pragmas.excludeIdeData);
  9283. args: [],
  9284. source: "activeTab\x0a\x09^ activeTab",
  9285. referencedClasses: [],
  9286. //>>excludeEnd("ide");
  9287. messageSends: []
  9288. }),
  9289. $globals.HLTabsWidget);
  9290. $core.addMethod(
  9291. $core.method({
  9292. selector: "addTab:",
  9293. protocol: "actions",
  9294. fn: function (aTab){
  9295. var self=this,$self=this;
  9296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9297. return $core.withContext(function($ctx1) {
  9298. //>>excludeEnd("ctx");
  9299. $recv($self._tabs())._add_(aTab);
  9300. $self._activate_(aTab);
  9301. return self;
  9302. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9303. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9304. //>>excludeEnd("ctx");
  9305. },
  9306. //>>excludeStart("ide", pragmas.excludeIdeData);
  9307. args: ["aTab"],
  9308. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  9309. referencedClasses: [],
  9310. //>>excludeEnd("ide");
  9311. messageSends: ["add:", "tabs", "activate:"]
  9312. }),
  9313. $globals.HLTabsWidget);
  9314. $core.addMethod(
  9315. $core.method({
  9316. selector: "addToHistory:",
  9317. protocol: "actions",
  9318. fn: function (aTab){
  9319. var self=this,$self=this;
  9320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9321. return $core.withContext(function($ctx1) {
  9322. //>>excludeEnd("ctx");
  9323. $self._removeFromHistory_(aTab);
  9324. $recv($self._history())._add_(aTab);
  9325. return self;
  9326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9327. }, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9328. //>>excludeEnd("ctx");
  9329. },
  9330. //>>excludeStart("ide", pragmas.excludeIdeData);
  9331. args: ["aTab"],
  9332. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  9333. referencedClasses: [],
  9334. //>>excludeEnd("ide");
  9335. messageSends: ["removeFromHistory:", "add:", "history"]
  9336. }),
  9337. $globals.HLTabsWidget);
  9338. $core.addMethod(
  9339. $core.method({
  9340. selector: "disableSelection",
  9341. protocol: "actions",
  9342. fn: function (){
  9343. var self=this,$self=this;
  9344. $self["@selectionDisabled"]=true;
  9345. return self;
  9346. },
  9347. //>>excludeStart("ide", pragmas.excludeIdeData);
  9348. args: [],
  9349. source: "disableSelection\x0a\x09selectionDisabled := true",
  9350. referencedClasses: [],
  9351. //>>excludeEnd("ide");
  9352. messageSends: []
  9353. }),
  9354. $globals.HLTabsWidget);
  9355. $core.addMethod(
  9356. $core.method({
  9357. selector: "enableSelection",
  9358. protocol: "actions",
  9359. fn: function (){
  9360. var self=this,$self=this;
  9361. $self["@selectionDisabled"]=false;
  9362. return self;
  9363. },
  9364. //>>excludeStart("ide", pragmas.excludeIdeData);
  9365. args: [],
  9366. source: "enableSelection\x0a\x09selectionDisabled := false",
  9367. referencedClasses: [],
  9368. //>>excludeEnd("ide");
  9369. messageSends: []
  9370. }),
  9371. $globals.HLTabsWidget);
  9372. $core.addMethod(
  9373. $core.method({
  9374. selector: "history",
  9375. protocol: "accessing",
  9376. fn: function (){
  9377. var self=this,$self=this;
  9378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9379. return $core.withContext(function($ctx1) {
  9380. //>>excludeEnd("ctx");
  9381. var $1,$receiver;
  9382. $1=$self["@history"];
  9383. if(($receiver = $1) == null || $receiver.a$nil){
  9384. $self["@history"]=$recv($globals.OrderedCollection)._new();
  9385. return $self["@history"];
  9386. } else {
  9387. return $1;
  9388. }
  9389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9390. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLTabsWidget)});
  9391. //>>excludeEnd("ctx");
  9392. },
  9393. //>>excludeStart("ide", pragmas.excludeIdeData);
  9394. args: [],
  9395. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  9396. referencedClasses: ["OrderedCollection"],
  9397. //>>excludeEnd("ide");
  9398. messageSends: ["ifNil:", "new"]
  9399. }),
  9400. $globals.HLTabsWidget);
  9401. $core.addMethod(
  9402. $core.method({
  9403. selector: "history:",
  9404. protocol: "accessing",
  9405. fn: function (aCollection){
  9406. var self=this,$self=this;
  9407. $self["@history"]=aCollection;
  9408. return self;
  9409. },
  9410. //>>excludeStart("ide", pragmas.excludeIdeData);
  9411. args: ["aCollection"],
  9412. source: "history: aCollection\x0a\x09history := aCollection",
  9413. referencedClasses: [],
  9414. //>>excludeEnd("ide");
  9415. messageSends: []
  9416. }),
  9417. $globals.HLTabsWidget);
  9418. $core.addMethod(
  9419. $core.method({
  9420. selector: "isSelectionDisabled",
  9421. protocol: "testing",
  9422. fn: function (){
  9423. var self=this,$self=this;
  9424. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9425. return $core.withContext(function($ctx1) {
  9426. //>>excludeEnd("ctx");
  9427. var $1,$receiver;
  9428. $1=$self["@selectionDisabled"];
  9429. if(($receiver = $1) == null || $receiver.a$nil){
  9430. return false;
  9431. } else {
  9432. return $1;
  9433. }
  9434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9435. }, function($ctx1) {$ctx1.fill(self,"isSelectionDisabled",{},$globals.HLTabsWidget)});
  9436. //>>excludeEnd("ctx");
  9437. },
  9438. //>>excludeStart("ide", pragmas.excludeIdeData);
  9439. args: [],
  9440. source: "isSelectionDisabled\x0a\x09^ selectionDisabled ifNil: [ false ]",
  9441. referencedClasses: [],
  9442. //>>excludeEnd("ide");
  9443. messageSends: ["ifNil:"]
  9444. }),
  9445. $globals.HLTabsWidget);
  9446. $core.addMethod(
  9447. $core.method({
  9448. selector: "removeActiveTab",
  9449. protocol: "actions",
  9450. fn: function (){
  9451. var self=this,$self=this;
  9452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9453. return $core.withContext(function($ctx1) {
  9454. //>>excludeEnd("ctx");
  9455. $self._removeTab_($self._activeTab());
  9456. return self;
  9457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9458. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLTabsWidget)});
  9459. //>>excludeEnd("ctx");
  9460. },
  9461. //>>excludeStart("ide", pragmas.excludeIdeData);
  9462. args: [],
  9463. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  9464. referencedClasses: [],
  9465. //>>excludeEnd("ide");
  9466. messageSends: ["removeTab:", "activeTab"]
  9467. }),
  9468. $globals.HLTabsWidget);
  9469. $core.addMethod(
  9470. $core.method({
  9471. selector: "removeFromHistory:",
  9472. protocol: "actions",
  9473. fn: function (aTab){
  9474. var self=this,$self=this;
  9475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9476. return $core.withContext(function($ctx1) {
  9477. //>>excludeEnd("ctx");
  9478. $self._history_($recv($self._history())._reject_((function(each){
  9479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9480. return $core.withContext(function($ctx2) {
  9481. //>>excludeEnd("ctx");
  9482. return $recv(each).__eq_eq(aTab);
  9483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9484. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9485. //>>excludeEnd("ctx");
  9486. })));
  9487. return self;
  9488. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9489. }, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9490. //>>excludeEnd("ctx");
  9491. },
  9492. //>>excludeStart("ide", pragmas.excludeIdeData);
  9493. args: ["aTab"],
  9494. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  9495. referencedClasses: [],
  9496. //>>excludeEnd("ide");
  9497. messageSends: ["history:", "reject:", "history", "=="]
  9498. }),
  9499. $globals.HLTabsWidget);
  9500. $core.addMethod(
  9501. $core.method({
  9502. selector: "removeTab:",
  9503. protocol: "actions",
  9504. fn: function (aTab){
  9505. var self=this,$self=this;
  9506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9507. return $core.withContext(function($ctx1) {
  9508. //>>excludeEnd("ctx");
  9509. var $2,$1,$3;
  9510. $2=$self._tabs();
  9511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9512. $ctx1.sendIdx["tabs"]=1;
  9513. //>>excludeEnd("ctx");
  9514. $1=$recv($2)._includes_(aTab);
  9515. if(!$core.assert($1)){
  9516. return self;
  9517. }
  9518. $self._removeFromHistory_(aTab);
  9519. $recv($self._tabs())._remove_(aTab);
  9520. $recv($recv($self._manager())._keyBinder())._flushBindings();
  9521. $recv(aTab)._remove();
  9522. $self._refresh();
  9523. $3=$self._history();
  9524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9525. $ctx1.sendIdx["history"]=1;
  9526. //>>excludeEnd("ctx");
  9527. $recv($3)._ifNotEmpty_((function(){
  9528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9529. return $core.withContext(function($ctx2) {
  9530. //>>excludeEnd("ctx");
  9531. return $recv($recv($self._history())._last())._activate();
  9532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9533. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9534. //>>excludeEnd("ctx");
  9535. }));
  9536. return self;
  9537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9538. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9539. //>>excludeEnd("ctx");
  9540. },
  9541. //>>excludeStart("ide", pragmas.excludeIdeData);
  9542. args: ["aTab"],
  9543. 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 ]",
  9544. referencedClasses: [],
  9545. //>>excludeEnd("ide");
  9546. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "manager", "remove", "refresh", "ifNotEmpty:", "history", "activate", "last"]
  9547. }),
  9548. $globals.HLTabsWidget);
  9549. $core.addMethod(
  9550. $core.method({
  9551. selector: "removeTabForWidget:",
  9552. protocol: "actions",
  9553. fn: function (aWidget){
  9554. var self=this,$self=this;
  9555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9556. return $core.withContext(function($ctx1) {
  9557. //>>excludeEnd("ctx");
  9558. var $early={};
  9559. try {
  9560. $self._removeTab_($recv($self._tabs())._detect_ifNone_((function(each){
  9561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9562. return $core.withContext(function($ctx2) {
  9563. //>>excludeEnd("ctx");
  9564. return $recv($recv(each)._widget()).__eq(aWidget);
  9565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9566. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9567. //>>excludeEnd("ctx");
  9568. }),(function(){
  9569. throw $early=[self];
  9570. })));
  9571. return self;
  9572. }
  9573. catch(e) {if(e===$early)return e[0]; throw e}
  9574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9575. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLTabsWidget)});
  9576. //>>excludeEnd("ctx");
  9577. },
  9578. //>>excludeStart("ide", pragmas.excludeIdeData);
  9579. args: ["aWidget"],
  9580. source: "removeTabForWidget: aWidget\x0a\x09self removeTab: (self tabs \x0a\x09\x09detect: [ :each | each widget = aWidget ]\x0a\x09\x09ifNone: [ ^ self ])",
  9581. referencedClasses: [],
  9582. //>>excludeEnd("ide");
  9583. messageSends: ["removeTab:", "detect:ifNone:", "tabs", "=", "widget"]
  9584. }),
  9585. $globals.HLTabsWidget);
  9586. $core.addMethod(
  9587. $core.method({
  9588. selector: "renderAddOn:",
  9589. protocol: "rendering",
  9590. fn: function (html){
  9591. var self=this,$self=this;
  9592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9593. return $core.withContext(function($ctx1) {
  9594. //>>excludeEnd("ctx");
  9595. var $1,$3,$4,$5,$7,$8,$6,$2;
  9596. $1=$recv(html)._div();
  9597. $recv($1)._class_("dropdown new_tab");
  9598. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9599. $ctx1.sendIdx["class:"]=1;
  9600. //>>excludeEnd("ctx");
  9601. $2=$recv($1)._with_((function(){
  9602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9603. return $core.withContext(function($ctx2) {
  9604. //>>excludeEnd("ctx");
  9605. $3=$recv(html)._a();
  9606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9607. $ctx2.sendIdx["a"]=1;
  9608. //>>excludeEnd("ctx");
  9609. $recv($3)._class_("dropdown-toggle");
  9610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9611. $ctx2.sendIdx["class:"]=2;
  9612. //>>excludeEnd("ctx");
  9613. $recv($3)._at_put_("data-toggle","dropdown");
  9614. $4=$recv($3)._with_((function(){
  9615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9616. return $core.withContext(function($ctx3) {
  9617. //>>excludeEnd("ctx");
  9618. return $recv($recv(html)._tag_("b"))._class_("caret");
  9619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9620. $ctx3.sendIdx["class:"]=3;
  9621. //>>excludeEnd("ctx");
  9622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9623. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9624. //>>excludeEnd("ctx");
  9625. }));
  9626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9627. $ctx2.sendIdx["with:"]=2;
  9628. //>>excludeEnd("ctx");
  9629. $4;
  9630. $5=$recv(html)._ul();
  9631. $recv($5)._class_("dropdown-menu");
  9632. $6=$recv($5)._with_((function(){
  9633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9634. return $core.withContext(function($ctx3) {
  9635. //>>excludeEnd("ctx");
  9636. return $recv($recv($recv($recv($globals.HLWidget)._withAllSubclasses())._select_((function(each){
  9637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9638. return $core.withContext(function($ctx4) {
  9639. //>>excludeEnd("ctx");
  9640. return $recv(each)._canBeOpenAsTab();
  9641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9642. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,4)});
  9643. //>>excludeEnd("ctx");
  9644. })))._sorted_((function(a,b){
  9645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9646. return $core.withContext(function($ctx4) {
  9647. //>>excludeEnd("ctx");
  9648. $7=$recv(a)._tabPriority();
  9649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9650. $ctx4.sendIdx["tabPriority"]=1;
  9651. //>>excludeEnd("ctx");
  9652. return $recv($7).__lt($recv(b)._tabPriority());
  9653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9654. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3,5)});
  9655. //>>excludeEnd("ctx");
  9656. })))._do_((function(each){
  9657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9658. return $core.withContext(function($ctx4) {
  9659. //>>excludeEnd("ctx");
  9660. return $recv($recv(html)._li())._with_((function(){
  9661. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9662. return $core.withContext(function($ctx5) {
  9663. //>>excludeEnd("ctx");
  9664. $8=$recv(html)._a();
  9665. $recv($8)._with_($recv(each)._tabLabel());
  9666. return $recv($8)._onClick_((function(){
  9667. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9668. return $core.withContext(function($ctx6) {
  9669. //>>excludeEnd("ctx");
  9670. return $recv(each)._openAsTab();
  9671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9672. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,8)});
  9673. //>>excludeEnd("ctx");
  9674. }));
  9675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9676. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9677. //>>excludeEnd("ctx");
  9678. }));
  9679. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9680. $ctx4.sendIdx["with:"]=4;
  9681. //>>excludeEnd("ctx");
  9682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9683. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)});
  9684. //>>excludeEnd("ctx");
  9685. }));
  9686. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9687. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  9688. //>>excludeEnd("ctx");
  9689. }));
  9690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9691. $ctx2.sendIdx["with:"]=3;
  9692. //>>excludeEnd("ctx");
  9693. return $6;
  9694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9695. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9696. //>>excludeEnd("ctx");
  9697. }));
  9698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9699. $ctx1.sendIdx["with:"]=1;
  9700. //>>excludeEnd("ctx");
  9701. return self;
  9702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9703. }, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},$globals.HLTabsWidget)});
  9704. //>>excludeEnd("ctx");
  9705. },
  9706. //>>excludeStart("ide", pragmas.excludeIdeData);
  9707. args: ["html"],
  9708. 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 ] ] ] ] ]",
  9709. referencedClasses: ["HLWidget"],
  9710. //>>excludeEnd("ide");
  9711. messageSends: ["class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "li", "tabLabel", "onClick:", "openAsTab"]
  9712. }),
  9713. $globals.HLTabsWidget);
  9714. $core.addMethod(
  9715. $core.method({
  9716. selector: "renderContentOn:",
  9717. protocol: "rendering",
  9718. fn: function (html){
  9719. var self=this,$self=this;
  9720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9721. return $core.withContext(function($ctx1) {
  9722. //>>excludeEnd("ctx");
  9723. var $1,$3,$4,$2;
  9724. $1=$recv(html)._div();
  9725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9726. $ctx1.sendIdx["div"]=1;
  9727. //>>excludeEnd("ctx");
  9728. $recv($1)._class_("navbar navbar-fixed-top");
  9729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9730. $ctx1.sendIdx["class:"]=1;
  9731. //>>excludeEnd("ctx");
  9732. $2=$recv($1)._with_((function(){
  9733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9734. return $core.withContext(function($ctx2) {
  9735. //>>excludeEnd("ctx");
  9736. $3=$recv(html)._div();
  9737. $recv($3)._class_("navbar-header");
  9738. $recv($3)._at_put_("role","tabpanel");
  9739. $4=$recv($3)._with_((function(){
  9740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9741. return $core.withContext(function($ctx3) {
  9742. //>>excludeEnd("ctx");
  9743. return $self._renderTabsOn_(html);
  9744. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9745. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9746. //>>excludeEnd("ctx");
  9747. }));
  9748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9749. $ctx2.sendIdx["with:"]=2;
  9750. //>>excludeEnd("ctx");
  9751. return $4;
  9752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9753. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9754. //>>excludeEnd("ctx");
  9755. }));
  9756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9757. $ctx1.sendIdx["with:"]=1;
  9758. //>>excludeEnd("ctx");
  9759. $recv(html)._with_($self._spotlight());
  9760. $self._renderAddOn_(html);
  9761. return self;
  9762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9763. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabsWidget)});
  9764. //>>excludeEnd("ctx");
  9765. },
  9766. //>>excludeStart("ide", pragmas.excludeIdeData);
  9767. args: ["html"],
  9768. 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",
  9769. referencedClasses: [],
  9770. //>>excludeEnd("ide");
  9771. messageSends: ["class:", "div", "with:", "at:put:", "renderTabsOn:", "spotlight", "renderAddOn:"]
  9772. }),
  9773. $globals.HLTabsWidget);
  9774. $core.addMethod(
  9775. $core.method({
  9776. selector: "renderTab:on:",
  9777. protocol: "rendering",
  9778. fn: function (aTab,html){
  9779. var self=this,$self=this;
  9780. var li;
  9781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9782. return $core.withContext(function($ctx1) {
  9783. //>>excludeEnd("ctx");
  9784. var $1,$2,$4,$3,$5,$6,$7,$8,$9;
  9785. $1=$recv(html)._li();
  9786. $2=$recv("width: ".__comma($recv($self._tabWidth())._asString())).__comma("px");
  9787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9788. $ctx1.sendIdx[","]=1;
  9789. //>>excludeEnd("ctx");
  9790. $recv($1)._style_($2);
  9791. $4=$recv(aTab)._isActive();
  9792. if($core.assert($4)){
  9793. $3="tab active";
  9794. } else {
  9795. $3="tab inactive";
  9796. }
  9797. $recv($1)._class_($3);
  9798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9799. $ctx1.sendIdx["class:"]=1;
  9800. //>>excludeEnd("ctx");
  9801. $recv($1)._with_((function(){
  9802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9803. return $core.withContext(function($ctx2) {
  9804. //>>excludeEnd("ctx");
  9805. $5=$recv(html)._a();
  9806. $recv($5)._with_((function(){
  9807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9808. return $core.withContext(function($ctx3) {
  9809. //>>excludeEnd("ctx");
  9810. $6=$recv($recv(html)._tag_("i"))._class_("close");
  9811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9812. $ctx3.sendIdx["class:"]=2;
  9813. //>>excludeEnd("ctx");
  9814. $recv($6)._onClick_((function(){
  9815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9816. return $core.withContext(function($ctx4) {
  9817. //>>excludeEnd("ctx");
  9818. return $self._removeTab_(aTab);
  9819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9820. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9821. //>>excludeEnd("ctx");
  9822. }));
  9823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9824. $ctx3.sendIdx["onClick:"]=1;
  9825. //>>excludeEnd("ctx");
  9826. $7=$recv(html)._span();
  9827. $recv($7)._class_($recv(aTab)._cssClass());
  9828. $8=$recv(aTab)._label();
  9829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9830. $ctx3.sendIdx["label"]=1;
  9831. //>>excludeEnd("ctx");
  9832. $recv($7)._title_($8);
  9833. return $recv($7)._with_($recv(aTab)._label());
  9834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9835. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9836. //>>excludeEnd("ctx");
  9837. }));
  9838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9839. $ctx2.sendIdx["with:"]=2;
  9840. //>>excludeEnd("ctx");
  9841. $9=$recv($5)._at_put_("role","tab");
  9842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9843. $ctx2.sendIdx["at:put:"]=1;
  9844. //>>excludeEnd("ctx");
  9845. return $9;
  9846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9847. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9848. //>>excludeEnd("ctx");
  9849. }));
  9850. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9851. $ctx1.sendIdx["with:"]=1;
  9852. //>>excludeEnd("ctx");
  9853. li=$recv($1)._onClick_((function(){
  9854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9855. return $core.withContext(function($ctx2) {
  9856. //>>excludeEnd("ctx");
  9857. return $recv(aTab)._activate();
  9858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9859. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9860. //>>excludeEnd("ctx");
  9861. }));
  9862. $recv($recv(li)._asDomNode())._at_put_("tab-data",aTab);
  9863. return self;
  9864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9865. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html,li:li},$globals.HLTabsWidget)});
  9866. //>>excludeEnd("ctx");
  9867. },
  9868. //>>excludeStart("ide", pragmas.excludeIdeData);
  9869. args: ["aTab", "html"],
  9870. 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",
  9871. referencedClasses: [],
  9872. //>>excludeEnd("ide");
  9873. messageSends: ["style:", "li", ",", "asString", "tabWidth", "class:", "ifTrue:ifFalse:", "isActive", "with:", "a", "onClick:", "tag:", "removeTab:", "span", "cssClass", "title:", "label", "at:put:", "activate", "asDomNode"]
  9874. }),
  9875. $globals.HLTabsWidget);
  9876. $core.addMethod(
  9877. $core.method({
  9878. selector: "renderTabsOn:",
  9879. protocol: "rendering",
  9880. fn: function (html){
  9881. var self=this,$self=this;
  9882. var ul;
  9883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9884. return $core.withContext(function($ctx1) {
  9885. //>>excludeEnd("ctx");
  9886. var $1;
  9887. $1=$recv(html)._ul();
  9888. $recv($1)._class_("nav navbar-nav nav-tabs");
  9889. $recv($1)._at_put_("role","tablist");
  9890. ul=$recv($1)._with_((function(){
  9891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9892. return $core.withContext(function($ctx2) {
  9893. //>>excludeEnd("ctx");
  9894. return $recv($self._tabs())._do_((function(each){
  9895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9896. return $core.withContext(function($ctx3) {
  9897. //>>excludeEnd("ctx");
  9898. return $self._renderTab_on_(each,html);
  9899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9900. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  9901. //>>excludeEnd("ctx");
  9902. }));
  9903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9904. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9905. //>>excludeEnd("ctx");
  9906. }));
  9907. $recv($recv(ul)._asJQuery())._sortable_($globals.HashedCollection._newFromPairs_(["containment","parent","start",(function(){
  9908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9909. return $core.withContext(function($ctx2) {
  9910. //>>excludeEnd("ctx");
  9911. return $self._disableSelection();
  9912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9913. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9914. //>>excludeEnd("ctx");
  9915. }),"stop",(function(){
  9916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9917. return $core.withContext(function($ctx2) {
  9918. //>>excludeEnd("ctx");
  9919. return $recv((function(){
  9920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9921. return $core.withContext(function($ctx3) {
  9922. //>>excludeEnd("ctx");
  9923. return $self._enableSelection();
  9924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9925. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  9926. //>>excludeEnd("ctx");
  9927. }))._valueWithTimeout_((300));
  9928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9929. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  9930. //>>excludeEnd("ctx");
  9931. }),"update",(function(){
  9932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9933. return $core.withContext(function($ctx2) {
  9934. //>>excludeEnd("ctx");
  9935. return $self._updateTabsOrder();
  9936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9937. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9938. //>>excludeEnd("ctx");
  9939. })]));
  9940. return self;
  9941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9942. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html,ul:ul},$globals.HLTabsWidget)});
  9943. //>>excludeEnd("ctx");
  9944. },
  9945. //>>excludeStart("ide", pragmas.excludeIdeData);
  9946. args: ["html"],
  9947. 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}",
  9948. referencedClasses: [],
  9949. //>>excludeEnd("ide");
  9950. messageSends: ["class:", "ul", "at:put:", "with:", "do:", "tabs", "renderTab:on:", "sortable:", "asJQuery", "disableSelection", "valueWithTimeout:", "enableSelection", "updateTabsOrder"]
  9951. }),
  9952. $globals.HLTabsWidget);
  9953. $core.addMethod(
  9954. $core.method({
  9955. selector: "setupEvents",
  9956. protocol: "private",
  9957. fn: function (){
  9958. var self=this,$self=this;
  9959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9960. return $core.withContext(function($ctx1) {
  9961. //>>excludeEnd("ctx");
  9962. var $2,$3,$1,$4;
  9963. $recv("body"._asJQuery())._keydown_((function(event){
  9964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9965. return $core.withContext(function($ctx2) {
  9966. //>>excludeEnd("ctx");
  9967. $2=$recv(event)._ctrlKey();
  9968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9969. $ctx2.sendIdx["ctrlKey"]=1;
  9970. //>>excludeEnd("ctx");
  9971. $1=$recv($2)._and_((function(){
  9972. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9973. return $core.withContext(function($ctx3) {
  9974. //>>excludeEnd("ctx");
  9975. $3=$recv(event)._which();
  9976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9977. $ctx3.sendIdx["which"]=1;
  9978. //>>excludeEnd("ctx");
  9979. return $recv($3).__eq((188));
  9980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9981. $ctx3.sendIdx["="]=1;
  9982. //>>excludeEnd("ctx");
  9983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9984. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9985. //>>excludeEnd("ctx");
  9986. }));
  9987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9988. $ctx2.sendIdx["and:"]=1;
  9989. //>>excludeEnd("ctx");
  9990. if($core.assert($1)){
  9991. $self._activatePreviousTab();
  9992. $recv(event)._preventDefault();
  9993. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9994. $ctx2.sendIdx["preventDefault"]=1;
  9995. //>>excludeEnd("ctx");
  9996. }
  9997. $4=$recv($recv(event)._ctrlKey())._and_((function(){
  9998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9999. return $core.withContext(function($ctx3) {
  10000. //>>excludeEnd("ctx");
  10001. return $recv($recv(event)._which()).__eq((190));
  10002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10003. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  10004. //>>excludeEnd("ctx");
  10005. }));
  10006. if($core.assert($4)){
  10007. $self._activateNextTab();
  10008. return $recv(event)._preventDefault();
  10009. }
  10010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10011. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  10012. //>>excludeEnd("ctx");
  10013. }));
  10014. return self;
  10015. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10016. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLTabsWidget)});
  10017. //>>excludeEnd("ctx");
  10018. },
  10019. //>>excludeStart("ide", pragmas.excludeIdeData);
  10020. args: [],
  10021. 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 ] ]",
  10022. referencedClasses: [],
  10023. //>>excludeEnd("ide");
  10024. messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", "ctrlKey", "=", "which", "activatePreviousTab", "preventDefault", "activateNextTab"]
  10025. }),
  10026. $globals.HLTabsWidget);
  10027. $core.addMethod(
  10028. $core.method({
  10029. selector: "show:",
  10030. protocol: "rendering",
  10031. fn: function (aTab){
  10032. var self=this,$self=this;
  10033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10034. return $core.withContext(function($ctx1) {
  10035. //>>excludeEnd("ctx");
  10036. $recv($self._tabs())._do_((function(each){
  10037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10038. return $core.withContext(function($ctx2) {
  10039. //>>excludeEnd("ctx");
  10040. return $recv(each)._hide();
  10041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10042. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  10043. //>>excludeEnd("ctx");
  10044. }));
  10045. $recv(aTab)._show();
  10046. $recv(aTab)._focus();
  10047. return self;
  10048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10049. }, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},$globals.HLTabsWidget)});
  10050. //>>excludeEnd("ctx");
  10051. },
  10052. //>>excludeStart("ide", pragmas.excludeIdeData);
  10053. args: ["aTab"],
  10054. source: "show: aTab\x0a\x09self tabs do: [ :each | each hide ].\x0a\x09aTab show; focus",
  10055. referencedClasses: [],
  10056. //>>excludeEnd("ide");
  10057. messageSends: ["do:", "tabs", "hide", "show", "focus"]
  10058. }),
  10059. $globals.HLTabsWidget);
  10060. $core.addMethod(
  10061. $core.method({
  10062. selector: "spotlight",
  10063. protocol: "accessing",
  10064. fn: function (){
  10065. var self=this,$self=this;
  10066. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10067. return $core.withContext(function($ctx1) {
  10068. //>>excludeEnd("ctx");
  10069. var $1,$receiver;
  10070. $1=$self["@spotlight"];
  10071. if(($receiver = $1) == null || $receiver.a$nil){
  10072. $self["@spotlight"]=$recv($globals.HLSpotlightWidget)._new();
  10073. return $self["@spotlight"];
  10074. } else {
  10075. return $1;
  10076. }
  10077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10078. }, function($ctx1) {$ctx1.fill(self,"spotlight",{},$globals.HLTabsWidget)});
  10079. //>>excludeEnd("ctx");
  10080. },
  10081. //>>excludeStart("ide", pragmas.excludeIdeData);
  10082. args: [],
  10083. source: "spotlight\x0a\x09^ spotlight ifNil: [ spotlight := HLSpotlightWidget new ]",
  10084. referencedClasses: ["HLSpotlightWidget"],
  10085. //>>excludeEnd("ide");
  10086. messageSends: ["ifNil:", "new"]
  10087. }),
  10088. $globals.HLTabsWidget);
  10089. $core.addMethod(
  10090. $core.method({
  10091. selector: "tabWidth",
  10092. protocol: "accessing",
  10093. fn: function (){
  10094. var self=this,$self=this;
  10095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10096. return $core.withContext(function($ctx1) {
  10097. //>>excludeEnd("ctx");
  10098. return $recv($recv($recv($recv(window)._asJQuery())._width()).__minus((250))).__slash($recv($self._tabs())._size());
  10099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10100. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLTabsWidget)});
  10101. //>>excludeEnd("ctx");
  10102. },
  10103. //>>excludeStart("ide", pragmas.excludeIdeData);
  10104. args: [],
  10105. source: "tabWidth\x0a\x09^ (window asJQuery width - 250) / self tabs size",
  10106. referencedClasses: [],
  10107. //>>excludeEnd("ide");
  10108. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  10109. }),
  10110. $globals.HLTabsWidget);
  10111. $core.addMethod(
  10112. $core.method({
  10113. selector: "tabs",
  10114. protocol: "accessing",
  10115. fn: function (){
  10116. var self=this,$self=this;
  10117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10118. return $core.withContext(function($ctx1) {
  10119. //>>excludeEnd("ctx");
  10120. var $1,$receiver;
  10121. $1=$self["@tabs"];
  10122. if(($receiver = $1) == null || $receiver.a$nil){
  10123. $self["@tabs"]=$recv($globals.OrderedCollection)._new();
  10124. return $self["@tabs"];
  10125. } else {
  10126. return $1;
  10127. }
  10128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10129. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabsWidget)});
  10130. //>>excludeEnd("ctx");
  10131. },
  10132. //>>excludeStart("ide", pragmas.excludeIdeData);
  10133. args: [],
  10134. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  10135. referencedClasses: ["OrderedCollection"],
  10136. //>>excludeEnd("ide");
  10137. messageSends: ["ifNil:", "new"]
  10138. }),
  10139. $globals.HLTabsWidget);
  10140. $core.addMethod(
  10141. $core.method({
  10142. selector: "updateTabsOrder",
  10143. protocol: "actions",
  10144. fn: function (){
  10145. var self=this,$self=this;
  10146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10147. return $core.withContext(function($ctx1) {
  10148. //>>excludeEnd("ctx");
  10149. $self["@tabs"]=$recv($recv(".nav-tabs li"._asJQuery())._toArray())._collect_((function(each){
  10150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10151. return $core.withContext(function($ctx2) {
  10152. //>>excludeEnd("ctx");
  10153. return $recv(each)._at_("tab-data");
  10154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10155. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  10156. //>>excludeEnd("ctx");
  10157. }));
  10158. return self;
  10159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10160. }, function($ctx1) {$ctx1.fill(self,"updateTabsOrder",{},$globals.HLTabsWidget)});
  10161. //>>excludeEnd("ctx");
  10162. },
  10163. //>>excludeStart("ide", pragmas.excludeIdeData);
  10164. args: [],
  10165. source: "updateTabsOrder\x0a\x09tabs := '.nav-tabs li' asJQuery toArray\x0a\x09\x09collect: [ :each | each at: 'tab-data' ]",
  10166. referencedClasses: [],
  10167. //>>excludeEnd("ide");
  10168. messageSends: ["collect:", "toArray", "asJQuery", "at:"]
  10169. }),
  10170. $globals.HLTabsWidget);
  10171. $globals.HLTabsWidget.a$cls.iVarNames = ["current"];
  10172. $core.addClass("HLWelcomeWidget", $globals.HLWidget, [], "Helios-Core");
  10173. $core.addMethod(
  10174. $core.method({
  10175. selector: "cssClass",
  10176. protocol: "accessing",
  10177. fn: function (){
  10178. var self=this,$self=this;
  10179. return "welcome";
  10180. },
  10181. //>>excludeStart("ide", pragmas.excludeIdeData);
  10182. args: [],
  10183. source: "cssClass\x0a\x09^ 'welcome'",
  10184. referencedClasses: [],
  10185. //>>excludeEnd("ide");
  10186. messageSends: []
  10187. }),
  10188. $globals.HLWelcomeWidget);
  10189. $core.addMethod(
  10190. $core.method({
  10191. selector: "openClassBrowser",
  10192. protocol: "actions",
  10193. fn: function (){
  10194. var self=this,$self=this;
  10195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10196. return $core.withContext(function($ctx1) {
  10197. //>>excludeEnd("ctx");
  10198. $recv($globals.HLBrowser)._openAsTab();
  10199. return self;
  10200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10201. }, function($ctx1) {$ctx1.fill(self,"openClassBrowser",{},$globals.HLWelcomeWidget)});
  10202. //>>excludeEnd("ctx");
  10203. },
  10204. //>>excludeStart("ide", pragmas.excludeIdeData);
  10205. args: [],
  10206. source: "openClassBrowser\x0a\x09HLBrowser openAsTab",
  10207. referencedClasses: ["HLBrowser"],
  10208. //>>excludeEnd("ide");
  10209. messageSends: ["openAsTab"]
  10210. }),
  10211. $globals.HLWelcomeWidget);
  10212. $core.addMethod(
  10213. $core.method({
  10214. selector: "openHelp",
  10215. protocol: "actions",
  10216. fn: function (){
  10217. var self=this,$self=this;
  10218. return self;
  10219. },
  10220. //>>excludeStart("ide", pragmas.excludeIdeData);
  10221. args: [],
  10222. source: "openHelp",
  10223. referencedClasses: [],
  10224. //>>excludeEnd("ide");
  10225. messageSends: []
  10226. }),
  10227. $globals.HLWelcomeWidget);
  10228. $core.addMethod(
  10229. $core.method({
  10230. selector: "openTestRunner",
  10231. protocol: "actions",
  10232. fn: function (){
  10233. var self=this,$self=this;
  10234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10235. return $core.withContext(function($ctx1) {
  10236. //>>excludeEnd("ctx");
  10237. $recv($globals.HLSUnit)._openAsTab();
  10238. return self;
  10239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10240. }, function($ctx1) {$ctx1.fill(self,"openTestRunner",{},$globals.HLWelcomeWidget)});
  10241. //>>excludeEnd("ctx");
  10242. },
  10243. //>>excludeStart("ide", pragmas.excludeIdeData);
  10244. args: [],
  10245. source: "openTestRunner\x0a\x09HLSUnit openAsTab",
  10246. referencedClasses: ["HLSUnit"],
  10247. //>>excludeEnd("ide");
  10248. messageSends: ["openAsTab"]
  10249. }),
  10250. $globals.HLWelcomeWidget);
  10251. $core.addMethod(
  10252. $core.method({
  10253. selector: "openWorkspace",
  10254. protocol: "actions",
  10255. fn: function (){
  10256. var self=this,$self=this;
  10257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10258. return $core.withContext(function($ctx1) {
  10259. //>>excludeEnd("ctx");
  10260. $recv($globals.HLWorkspace)._openAsTab();
  10261. return self;
  10262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10263. }, function($ctx1) {$ctx1.fill(self,"openWorkspace",{},$globals.HLWelcomeWidget)});
  10264. //>>excludeEnd("ctx");
  10265. },
  10266. //>>excludeStart("ide", pragmas.excludeIdeData);
  10267. args: [],
  10268. source: "openWorkspace\x0a\x09HLWorkspace openAsTab",
  10269. referencedClasses: ["HLWorkspace"],
  10270. //>>excludeEnd("ide");
  10271. messageSends: ["openAsTab"]
  10272. }),
  10273. $globals.HLWelcomeWidget);
  10274. $core.addMethod(
  10275. $core.method({
  10276. selector: "renderButtonsOn:",
  10277. protocol: "rendering",
  10278. fn: function (html){
  10279. var self=this,$self=this;
  10280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10281. return $core.withContext(function($ctx1) {
  10282. //>>excludeEnd("ctx");
  10283. var $1,$2,$3,$4,$5;
  10284. $1=$recv(html)._button();
  10285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10286. $ctx1.sendIdx["button"]=1;
  10287. //>>excludeEnd("ctx");
  10288. $recv($1)._class_("button");
  10289. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10290. $ctx1.sendIdx["class:"]=1;
  10291. //>>excludeEnd("ctx");
  10292. $recv($1)._with_("Class Browser");
  10293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10294. $ctx1.sendIdx["with:"]=1;
  10295. //>>excludeEnd("ctx");
  10296. $2=$recv($1)._onClick_((function(){
  10297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10298. return $core.withContext(function($ctx2) {
  10299. //>>excludeEnd("ctx");
  10300. return $self._openClassBrowser();
  10301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10302. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10303. //>>excludeEnd("ctx");
  10304. }));
  10305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10306. $ctx1.sendIdx["onClick:"]=1;
  10307. //>>excludeEnd("ctx");
  10308. $3=$recv(html)._button();
  10309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10310. $ctx1.sendIdx["button"]=2;
  10311. //>>excludeEnd("ctx");
  10312. $recv($3)._class_("button");
  10313. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10314. $ctx1.sendIdx["class:"]=2;
  10315. //>>excludeEnd("ctx");
  10316. $recv($3)._with_("Workspace");
  10317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10318. $ctx1.sendIdx["with:"]=2;
  10319. //>>excludeEnd("ctx");
  10320. $4=$recv($3)._onClick_((function(){
  10321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10322. return $core.withContext(function($ctx2) {
  10323. //>>excludeEnd("ctx");
  10324. return $self._openWorkspace();
  10325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10326. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10327. //>>excludeEnd("ctx");
  10328. }));
  10329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10330. $ctx1.sendIdx["onClick:"]=2;
  10331. //>>excludeEnd("ctx");
  10332. $5=$recv(html)._button();
  10333. $recv($5)._class_("button");
  10334. $recv($5)._with_("Test Runner");
  10335. $recv($5)._onClick_((function(){
  10336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10337. return $core.withContext(function($ctx2) {
  10338. //>>excludeEnd("ctx");
  10339. return $self._openTestRunner();
  10340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10341. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10342. //>>excludeEnd("ctx");
  10343. }));
  10344. return self;
  10345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10346. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLWelcomeWidget)});
  10347. //>>excludeEnd("ctx");
  10348. },
  10349. //>>excludeStart("ide", pragmas.excludeIdeData);
  10350. args: ["html"],
  10351. 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",
  10352. referencedClasses: [],
  10353. //>>excludeEnd("ide");
  10354. messageSends: ["class:", "button", "with:", "onClick:", "openClassBrowser", "openWorkspace", "openTestRunner"]
  10355. }),
  10356. $globals.HLWelcomeWidget);
  10357. $core.addMethod(
  10358. $core.method({
  10359. selector: "renderContentOn:",
  10360. protocol: "rendering",
  10361. fn: function (html){
  10362. var self=this,$self=this;
  10363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10364. return $core.withContext(function($ctx1) {
  10365. //>>excludeEnd("ctx");
  10366. $self._renderHelpOn_(html);
  10367. $self._renderButtonsOn_(html);
  10368. return self;
  10369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10370. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLWelcomeWidget)});
  10371. //>>excludeEnd("ctx");
  10372. },
  10373. //>>excludeStart("ide", pragmas.excludeIdeData);
  10374. args: ["html"],
  10375. source: "renderContentOn: html\x0a\x09self\x0a\x09\x09renderHelpOn: html;\x0a\x09\x09renderButtonsOn: html",
  10376. referencedClasses: [],
  10377. //>>excludeEnd("ide");
  10378. messageSends: ["renderHelpOn:", "renderButtonsOn:"]
  10379. }),
  10380. $globals.HLWelcomeWidget);
  10381. $core.addMethod(
  10382. $core.method({
  10383. selector: "renderHelpOn:",
  10384. protocol: "rendering",
  10385. fn: function (html){
  10386. var self=this,$self=this;
  10387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10388. return $core.withContext(function($ctx1) {
  10389. //>>excludeEnd("ctx");
  10390. var $1;
  10391. $recv($recv(html)._h2())._with_("No tools are open");
  10392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10393. $ctx1.sendIdx["with:"]=1;
  10394. //>>excludeEnd("ctx");
  10395. $recv($recv(html)._ul())._with_((function(){
  10396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10397. return $core.withContext(function($ctx2) {
  10398. //>>excludeEnd("ctx");
  10399. $1=$recv(html)._li();
  10400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10401. $ctx2.sendIdx["li"]=1;
  10402. //>>excludeEnd("ctx");
  10403. $recv($1)._with_("Perform actions with ctrl + space");
  10404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10405. $ctx2.sendIdx["with:"]=3;
  10406. //>>excludeEnd("ctx");
  10407. return $recv($recv(html)._li())._with_("Open one of the common tools:");
  10408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10409. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10410. //>>excludeEnd("ctx");
  10411. }));
  10412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10413. $ctx1.sendIdx["with:"]=2;
  10414. //>>excludeEnd("ctx");
  10415. return self;
  10416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10417. }, function($ctx1) {$ctx1.fill(self,"renderHelpOn:",{html:html},$globals.HLWelcomeWidget)});
  10418. //>>excludeEnd("ctx");
  10419. },
  10420. //>>excludeStart("ide", pragmas.excludeIdeData);
  10421. args: ["html"],
  10422. 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:' ]",
  10423. referencedClasses: [],
  10424. //>>excludeEnd("ide");
  10425. messageSends: ["with:", "h2", "ul", "li"]
  10426. }),
  10427. $globals.HLWelcomeWidget);
  10428. });