Helios-Core.js 347 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687
  1. define("helios/Helios-Core", ["amber/boot", "amber_core/Kernel-Infrastructure", "amber_core/Kernel-Objects", "amber_core/Web"], function($boot){
  2. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. var smalltalk=$core,_st=$recv,globals=$globals;
  4. $core.addPackage('Helios-Core');
  5. $core.packages["Helios-Core"].transport = {"type":"amd","amdNamespace":"helios"};
  6. $core.addClass('HLModel', $globals.InterfacingObject, ['announcer', 'environment'], 'Helios-Core');
  7. //>>excludeStart("ide", pragmas.excludeIdeData);
  8. $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).";
  9. //>>excludeEnd("ide");
  10. $core.addMethod(
  11. $core.method({
  12. selector: "announcer",
  13. protocol: 'accessing',
  14. fn: function (){
  15. var self=this;
  16. function $Announcer(){return $globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  17. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  18. return $core.withContext(function($ctx1) {
  19. //>>excludeEnd("ctx");
  20. var $2,$1,$receiver;
  21. $2=self["@announcer"];
  22. if(($receiver = $2) == null || $receiver.isNil){
  23. self["@announcer"]=$recv($Announcer())._new();
  24. $1=self["@announcer"];
  25. } else {
  26. $1=$2;
  27. };
  28. return $1;
  29. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  30. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLModel)});
  31. //>>excludeEnd("ctx");
  32. },
  33. //>>excludeStart("ide", pragmas.excludeIdeData);
  34. args: [],
  35. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  36. referencedClasses: ["Announcer"],
  37. //>>excludeEnd("ide");
  38. messageSends: ["ifNil:", "new"]
  39. }),
  40. $globals.HLModel);
  41. $core.addMethod(
  42. $core.method({
  43. selector: "environment",
  44. protocol: 'accessing',
  45. fn: function (){
  46. var self=this;
  47. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  48. return $core.withContext(function($ctx1) {
  49. //>>excludeEnd("ctx");
  50. var $2,$1,$receiver;
  51. $2=self["@environment"];
  52. if(($receiver = $2) == null || $receiver.isNil){
  53. $1=$recv(self._manager())._environment();
  54. } else {
  55. $1=$2;
  56. };
  57. return $1;
  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;
  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;
  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;
  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;
  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;
  141. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  143. return $core.withContext(function($ctx1) {
  144. //>>excludeEnd("ctx");
  145. var $1;
  146. $1=$recv($HLManager())._current();
  147. return $1;
  148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  149. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLModel)});
  150. //>>excludeEnd("ctx");
  151. },
  152. //>>excludeStart("ide", pragmas.excludeIdeData);
  153. args: [],
  154. source: "manager\x0a\x09^ HLManager current",
  155. referencedClasses: ["HLManager"],
  156. //>>excludeEnd("ide");
  157. messageSends: ["current"]
  158. }),
  159. $globals.HLModel);
  160. $core.addMethod(
  161. $core.method({
  162. selector: "systemAnnouncer",
  163. protocol: 'accessing',
  164. fn: function (){
  165. var self=this;
  166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  167. return $core.withContext(function($ctx1) {
  168. //>>excludeEnd("ctx");
  169. var $1;
  170. $1=$recv(self._environment())._systemAnnouncer();
  171. return $1;
  172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  173. }, function($ctx1) {$ctx1.fill(self,"systemAnnouncer",{},$globals.HLModel)});
  174. //>>excludeEnd("ctx");
  175. },
  176. //>>excludeStart("ide", pragmas.excludeIdeData);
  177. args: [],
  178. source: "systemAnnouncer\x0a\x09^ self environment systemAnnouncer",
  179. referencedClasses: [],
  180. //>>excludeEnd("ide");
  181. messageSends: ["systemAnnouncer", "environment"]
  182. }),
  183. $globals.HLModel);
  184. $core.addMethod(
  185. $core.method({
  186. selector: "withChangesDo:",
  187. protocol: 'error handling',
  188. fn: function (aBlock){
  189. var self=this;
  190. function $HLAboutToChange(){return $globals.HLAboutToChange||(typeof HLAboutToChange=="undefined"?nil:HLAboutToChange)}
  191. function $HLChangeForbidden(){return $globals.HLChangeForbidden||(typeof HLChangeForbidden=="undefined"?nil:HLChangeForbidden)}
  192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  193. return $core.withContext(function($ctx1) {
  194. //>>excludeEnd("ctx");
  195. var $1,$2;
  196. $recv((function(){
  197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  198. return $core.withContext(function($ctx2) {
  199. //>>excludeEnd("ctx");
  200. $1=$recv($HLAboutToChange())._new();
  201. $recv($1)._actionBlock_(aBlock);
  202. $2=$recv($1)._yourself();
  203. $recv(self._announcer())._announce_($2);
  204. return $recv(aBlock)._value();
  205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  206. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  207. //>>excludeEnd("ctx");
  208. }))._on_do_($HLChangeForbidden(),(function(ex){
  209. }));
  210. return self;
  211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  212. }, function($ctx1) {$ctx1.fill(self,"withChangesDo:",{aBlock:aBlock},$globals.HLModel)});
  213. //>>excludeEnd("ctx");
  214. },
  215. //>>excludeStart("ide", pragmas.excludeIdeData);
  216. args: ["aBlock"],
  217. 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 | ]",
  218. referencedClasses: ["HLAboutToChange", "HLChangeForbidden"],
  219. //>>excludeEnd("ide");
  220. messageSends: ["on:do:", "announce:", "announcer", "actionBlock:", "new", "yourself", "value"]
  221. }),
  222. $globals.HLModel);
  223. $core.addClass('HLFinder', $globals.HLModel, [], 'Helios-Core');
  224. //>>excludeStart("ide", pragmas.excludeIdeData);
  225. $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.";
  226. //>>excludeEnd("ide");
  227. $core.addMethod(
  228. $core.method({
  229. selector: "findClass:",
  230. protocol: 'finding',
  231. fn: function (aClass){
  232. var self=this;
  233. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  235. return $core.withContext(function($ctx1) {
  236. //>>excludeEnd("ctx");
  237. $recv($recv($HLBrowser())._openAsTab())._openClassNamed_($recv(aClass)._name());
  238. return self;
  239. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  240. }, function($ctx1) {$ctx1.fill(self,"findClass:",{aClass:aClass},$globals.HLFinder)});
  241. //>>excludeEnd("ctx");
  242. },
  243. //>>excludeStart("ide", pragmas.excludeIdeData);
  244. args: ["aClass"],
  245. source: "findClass: aClass\x0a\x09HLBrowser openAsTab openClassNamed: aClass name",
  246. referencedClasses: ["HLBrowser"],
  247. //>>excludeEnd("ide");
  248. messageSends: ["openClassNamed:", "openAsTab", "name"]
  249. }),
  250. $globals.HLFinder);
  251. $core.addMethod(
  252. $core.method({
  253. selector: "findMethod:",
  254. protocol: 'finding',
  255. fn: function (aCompiledMethod){
  256. var self=this;
  257. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  259. return $core.withContext(function($ctx1) {
  260. //>>excludeEnd("ctx");
  261. $recv($recv($HLBrowser())._openAsTab())._openMethod_(aCompiledMethod);
  262. return self;
  263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  264. }, function($ctx1) {$ctx1.fill(self,"findMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLFinder)});
  265. //>>excludeEnd("ctx");
  266. },
  267. //>>excludeStart("ide", pragmas.excludeIdeData);
  268. args: ["aCompiledMethod"],
  269. source: "findMethod: aCompiledMethod\x0a\x09HLBrowser openAsTab openMethod: aCompiledMethod",
  270. referencedClasses: ["HLBrowser"],
  271. //>>excludeEnd("ide");
  272. messageSends: ["openMethod:", "openAsTab"]
  273. }),
  274. $globals.HLFinder);
  275. $core.addMethod(
  276. $core.method({
  277. selector: "findString:",
  278. protocol: 'finding',
  279. fn: function (aString){
  280. var self=this;
  281. var foundClass;
  282. function $HLReferences(){return $globals.HLReferences||(typeof HLReferences=="undefined"?nil:HLReferences)}
  283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  284. return $core.withContext(function($ctx1) {
  285. //>>excludeEnd("ctx");
  286. var $1,$receiver;
  287. foundClass=$recv($recv(self._environment())._classes())._detect_ifNone_((function(each){
  288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  289. return $core.withContext(function($ctx2) {
  290. //>>excludeEnd("ctx");
  291. return $recv($recv(each)._name()).__eq(aString);
  292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  293. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  294. //>>excludeEnd("ctx");
  295. }),(function(){
  296. return nil;
  297. }));
  298. $1=foundClass;
  299. if(($receiver = $1) == null || $receiver.isNil){
  300. $recv($recv($HLReferences())._openAsTab())._search_(aString);
  301. } else {
  302. self._findClass_(foundClass);
  303. };
  304. return self;
  305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  306. }, function($ctx1) {$ctx1.fill(self,"findString:",{aString:aString,foundClass:foundClass},$globals.HLFinder)});
  307. //>>excludeEnd("ctx");
  308. },
  309. //>>excludeStart("ide", pragmas.excludeIdeData);
  310. args: ["aString"],
  311. 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 ]",
  312. referencedClasses: ["HLReferences"],
  313. //>>excludeEnd("ide");
  314. messageSends: ["detect:ifNone:", "classes", "environment", "=", "name", "ifNil:ifNotNil:", "search:", "openAsTab", "findClass:"]
  315. }),
  316. $globals.HLFinder);
  317. $core.addClass('HLToolModel', $globals.HLModel, ['selectedClass', 'selectedPackage', 'selectedProtocol', 'selectedSelector'], 'Helios-Core');
  318. //>>excludeStart("ide", pragmas.excludeIdeData);
  319. $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.";
  320. //>>excludeEnd("ide");
  321. $core.addMethod(
  322. $core.method({
  323. selector: "addInstVarNamed:",
  324. protocol: 'actions',
  325. fn: function (aString){
  326. var self=this;
  327. function $HLInstVarAdded(){return $globals.HLInstVarAdded||(typeof HLInstVarAdded=="undefined"?nil:HLInstVarAdded)}
  328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  329. return $core.withContext(function($ctx1) {
  330. //>>excludeEnd("ctx");
  331. var $1,$2,$3,$4;
  332. $1=self._environment();
  333. $2=self._selectedClass();
  334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  335. $ctx1.sendIdx["selectedClass"]=1;
  336. //>>excludeEnd("ctx");
  337. $recv($1)._addInstVarNamed_to_(aString,$2);
  338. $3=$recv($HLInstVarAdded())._new();
  339. $recv($3)._theClass_(self._selectedClass());
  340. $recv($3)._variableName_(aString);
  341. $4=$recv($3)._yourself();
  342. $recv(self._announcer())._announce_($4);
  343. return self;
  344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  345. }, function($ctx1) {$ctx1.fill(self,"addInstVarNamed:",{aString:aString},$globals.HLToolModel)});
  346. //>>excludeEnd("ctx");
  347. },
  348. //>>excludeStart("ide", pragmas.excludeIdeData);
  349. args: ["aString"],
  350. 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)",
  351. referencedClasses: ["HLInstVarAdded"],
  352. //>>excludeEnd("ide");
  353. messageSends: ["addInstVarNamed:to:", "environment", "selectedClass", "announce:", "announcer", "theClass:", "new", "variableName:", "yourself"]
  354. }),
  355. $globals.HLToolModel);
  356. $core.addMethod(
  357. $core.method({
  358. selector: "allProtocol",
  359. protocol: 'defaults',
  360. fn: function (){
  361. var self=this;
  362. return "-- all --";
  363. },
  364. //>>excludeStart("ide", pragmas.excludeIdeData);
  365. args: [],
  366. source: "allProtocol\x0a\x09^ '-- all --'",
  367. referencedClasses: [],
  368. //>>excludeEnd("ide");
  369. messageSends: []
  370. }),
  371. $globals.HLToolModel);
  372. $core.addMethod(
  373. $core.method({
  374. selector: "allSelectors",
  375. protocol: 'accessing',
  376. fn: function (){
  377. var self=this;
  378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  379. return $core.withContext(function($ctx1) {
  380. //>>excludeEnd("ctx");
  381. var $1;
  382. $1=$recv(self._environment())._allSelectors();
  383. return $1;
  384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  385. }, function($ctx1) {$ctx1.fill(self,"allSelectors",{},$globals.HLToolModel)});
  386. //>>excludeEnd("ctx");
  387. },
  388. //>>excludeStart("ide", pragmas.excludeIdeData);
  389. args: [],
  390. source: "allSelectors\x0a\x09^ self environment allSelectors",
  391. referencedClasses: [],
  392. //>>excludeEnd("ide");
  393. messageSends: ["allSelectors", "environment"]
  394. }),
  395. $globals.HLToolModel);
  396. $core.addMethod(
  397. $core.method({
  398. selector: "availableClassNames",
  399. protocol: 'accessing',
  400. fn: function (){
  401. var self=this;
  402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  403. return $core.withContext(function($ctx1) {
  404. //>>excludeEnd("ctx");
  405. var $1;
  406. $1=$recv(self._environment())._availableClassNames();
  407. return $1;
  408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  409. }, function($ctx1) {$ctx1.fill(self,"availableClassNames",{},$globals.HLToolModel)});
  410. //>>excludeEnd("ctx");
  411. },
  412. //>>excludeStart("ide", pragmas.excludeIdeData);
  413. args: [],
  414. source: "availableClassNames\x0a\x09^ self environment availableClassNames",
  415. referencedClasses: [],
  416. //>>excludeEnd("ide");
  417. messageSends: ["availableClassNames", "environment"]
  418. }),
  419. $globals.HLToolModel);
  420. $core.addMethod(
  421. $core.method({
  422. selector: "availablePackageNames",
  423. protocol: 'accessing',
  424. fn: function (){
  425. var self=this;
  426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  427. return $core.withContext(function($ctx1) {
  428. //>>excludeEnd("ctx");
  429. var $1;
  430. $1=$recv(self._environment())._availablePackageNames();
  431. return $1;
  432. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  433. }, function($ctx1) {$ctx1.fill(self,"availablePackageNames",{},$globals.HLToolModel)});
  434. //>>excludeEnd("ctx");
  435. },
  436. //>>excludeStart("ide", pragmas.excludeIdeData);
  437. args: [],
  438. source: "availablePackageNames\x0a\x09^ self environment availablePackageNames",
  439. referencedClasses: [],
  440. //>>excludeEnd("ide");
  441. messageSends: ["availablePackageNames", "environment"]
  442. }),
  443. $globals.HLToolModel);
  444. $core.addMethod(
  445. $core.method({
  446. selector: "availablePackages",
  447. protocol: 'accessing',
  448. fn: function (){
  449. var self=this;
  450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  451. return $core.withContext(function($ctx1) {
  452. //>>excludeEnd("ctx");
  453. var $1;
  454. $1=$recv(self._environment())._availablePackageNames();
  455. return $1;
  456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  457. }, function($ctx1) {$ctx1.fill(self,"availablePackages",{},$globals.HLToolModel)});
  458. //>>excludeEnd("ctx");
  459. },
  460. //>>excludeStart("ide", pragmas.excludeIdeData);
  461. args: [],
  462. source: "availablePackages\x0a\x09^ self environment availablePackageNames",
  463. referencedClasses: [],
  464. //>>excludeEnd("ide");
  465. messageSends: ["availablePackageNames", "environment"]
  466. }),
  467. $globals.HLToolModel);
  468. $core.addMethod(
  469. $core.method({
  470. selector: "availableProtocols",
  471. protocol: 'accessing',
  472. fn: function (){
  473. var self=this;
  474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  475. return $core.withContext(function($ctx1) {
  476. //>>excludeEnd("ctx");
  477. var $1;
  478. $1=$recv(self._environment())._availableProtocolsFor_(self._selectedClass());
  479. return $1;
  480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  481. }, function($ctx1) {$ctx1.fill(self,"availableProtocols",{},$globals.HLToolModel)});
  482. //>>excludeEnd("ctx");
  483. },
  484. //>>excludeStart("ide", pragmas.excludeIdeData);
  485. args: [],
  486. source: "availableProtocols\x0a\x09^ self environment availableProtocolsFor: self selectedClass",
  487. referencedClasses: [],
  488. //>>excludeEnd("ide");
  489. messageSends: ["availableProtocolsFor:", "environment", "selectedClass"]
  490. }),
  491. $globals.HLToolModel);
  492. $core.addMethod(
  493. $core.method({
  494. selector: "commitPackageOnSuccess:onError:",
  495. protocol: 'commands actions',
  496. fn: function (aBlock,anotherBlock){
  497. var self=this;
  498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  499. return $core.withContext(function($ctx1) {
  500. //>>excludeEnd("ctx");
  501. $recv(self._environment())._commitPackage_onSuccess_onError_(self._packageToCommit(),aBlock,anotherBlock);
  502. return self;
  503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  504. }, function($ctx1) {$ctx1.fill(self,"commitPackageOnSuccess:onError:",{aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLToolModel)});
  505. //>>excludeEnd("ctx");
  506. },
  507. //>>excludeStart("ide", pragmas.excludeIdeData);
  508. args: ["aBlock", "anotherBlock"],
  509. source: "commitPackageOnSuccess: aBlock onError: anotherBlock\x0a\x09self environment \x0a\x09\x09commitPackage: self packageToCommit\x0a\x09\x09onSuccess: aBlock\x0a\x09\x09onError: anotherBlock",
  510. referencedClasses: [],
  511. //>>excludeEnd("ide");
  512. messageSends: ["commitPackage:onSuccess:onError:", "environment", "packageToCommit"]
  513. }),
  514. $globals.HLToolModel);
  515. $core.addMethod(
  516. $core.method({
  517. selector: "compilationProtocol",
  518. protocol: 'private',
  519. fn: function (){
  520. var self=this;
  521. var currentProtocol;
  522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  523. return $core.withContext(function($ctx1) {
  524. //>>excludeEnd("ctx");
  525. var $1,$2,$4,$3,$receiver;
  526. currentProtocol=self._selectedProtocol();
  527. $1=currentProtocol;
  528. if(($receiver = $1) == null || $receiver.isNil){
  529. currentProtocol=self._unclassifiedProtocol();
  530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  531. $ctx1.sendIdx["unclassifiedProtocol"]=1;
  532. //>>excludeEnd("ctx");
  533. currentProtocol;
  534. } else {
  535. $1;
  536. };
  537. $2=self._selectedMethod();
  538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  539. $ctx1.sendIdx["selectedMethod"]=1;
  540. //>>excludeEnd("ctx");
  541. if(($receiver = $2) == null || $receiver.isNil){
  542. $2;
  543. } else {
  544. currentProtocol=$recv(self._selectedMethod())._protocol();
  545. currentProtocol;
  546. };
  547. $4=$recv(currentProtocol).__eq(self._allProtocol());
  548. if($core.assert($4)){
  549. $3=self._unclassifiedProtocol();
  550. } else {
  551. $3=currentProtocol;
  552. };
  553. return $3;
  554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  555. }, function($ctx1) {$ctx1.fill(self,"compilationProtocol",{currentProtocol:currentProtocol},$globals.HLToolModel)});
  556. //>>excludeEnd("ctx");
  557. },
  558. //>>excludeStart("ide", pragmas.excludeIdeData);
  559. args: [],
  560. 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 ]",
  561. referencedClasses: [],
  562. //>>excludeEnd("ide");
  563. messageSends: ["selectedProtocol", "ifNil:", "unclassifiedProtocol", "ifNotNil:", "selectedMethod", "protocol", "ifTrue:ifFalse:", "=", "allProtocol"]
  564. }),
  565. $globals.HLToolModel);
  566. $core.addMethod(
  567. $core.method({
  568. selector: "compileClassComment:",
  569. protocol: 'compiling',
  570. fn: function (aString){
  571. var self=this;
  572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  573. return $core.withContext(function($ctx1) {
  574. //>>excludeEnd("ctx");
  575. $recv(self._environment())._compileClassComment_for_(aString,self._selectedClass());
  576. return self;
  577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  578. }, function($ctx1) {$ctx1.fill(self,"compileClassComment:",{aString:aString},$globals.HLToolModel)});
  579. //>>excludeEnd("ctx");
  580. },
  581. //>>excludeStart("ide", pragmas.excludeIdeData);
  582. args: ["aString"],
  583. source: "compileClassComment: aString\x0a\x09self environment \x0a\x09\x09compileClassComment: aString \x0a\x09\x09for: self selectedClass",
  584. referencedClasses: [],
  585. //>>excludeEnd("ide");
  586. messageSends: ["compileClassComment:for:", "environment", "selectedClass"]
  587. }),
  588. $globals.HLToolModel);
  589. $core.addMethod(
  590. $core.method({
  591. selector: "compileClassDefinition:",
  592. protocol: 'compiling',
  593. fn: function (aString){
  594. var self=this;
  595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  596. return $core.withContext(function($ctx1) {
  597. //>>excludeEnd("ctx");
  598. $recv(self._environment())._compileClassDefinition_(aString);
  599. return self;
  600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  601. }, function($ctx1) {$ctx1.fill(self,"compileClassDefinition:",{aString:aString},$globals.HLToolModel)});
  602. //>>excludeEnd("ctx");
  603. },
  604. //>>excludeStart("ide", pragmas.excludeIdeData);
  605. args: ["aString"],
  606. source: "compileClassDefinition: aString\x0a\x09self environment compileClassDefinition: aString",
  607. referencedClasses: [],
  608. //>>excludeEnd("ide");
  609. messageSends: ["compileClassDefinition:", "environment"]
  610. }),
  611. $globals.HLToolModel);
  612. $core.addMethod(
  613. $core.method({
  614. selector: "compileMethod:",
  615. protocol: 'compiling',
  616. fn: function (aString){
  617. var self=this;
  618. var method;
  619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  620. return $core.withContext(function($ctx1) {
  621. //>>excludeEnd("ctx");
  622. self._withCompileErrorHandling_((function(){
  623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  624. return $core.withContext(function($ctx2) {
  625. //>>excludeEnd("ctx");
  626. method=$recv(self._environment())._compileMethod_for_protocol_(aString,self._selectedClass(),self._compilationProtocol());
  627. method;
  628. return self._selectedMethod_(method);
  629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  630. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  631. //>>excludeEnd("ctx");
  632. }));
  633. return self;
  634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  635. }, function($ctx1) {$ctx1.fill(self,"compileMethod:",{aString:aString,method:method},$globals.HLToolModel)});
  636. //>>excludeEnd("ctx");
  637. },
  638. //>>excludeStart("ide", pragmas.excludeIdeData);
  639. args: ["aString"],
  640. 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 ]",
  641. referencedClasses: [],
  642. //>>excludeEnd("ide");
  643. messageSends: ["withCompileErrorHandling:", "compileMethod:for:protocol:", "environment", "selectedClass", "compilationProtocol", "selectedMethod:"]
  644. }),
  645. $globals.HLToolModel);
  646. $core.addMethod(
  647. $core.method({
  648. selector: "copyClassTo:",
  649. protocol: 'commands actions',
  650. fn: function (aClassName){
  651. var self=this;
  652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  653. return $core.withContext(function($ctx1) {
  654. //>>excludeEnd("ctx");
  655. self._withChangesDo_((function(){
  656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  657. return $core.withContext(function($ctx2) {
  658. //>>excludeEnd("ctx");
  659. return self._selectedClass_($recv(self._environment())._copyClass_to_($recv(self._selectedClass())._theNonMetaClass(),aClassName));
  660. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  661. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  662. //>>excludeEnd("ctx");
  663. }));
  664. return self;
  665. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  666. }, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  667. //>>excludeEnd("ctx");
  668. },
  669. //>>excludeStart("ide", pragmas.excludeIdeData);
  670. args: ["aClassName"],
  671. source: "copyClassTo: aClassName\x0a\x09self withChangesDo: [ \x0a\x09\x09self selectedClass: (self environment \x0a\x09\x09\x09\x09\x09\x09\x09\x09copyClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09\x09\x09\x09\x09\x09to: aClassName) ]",
  672. referencedClasses: [],
  673. //>>excludeEnd("ide");
  674. messageSends: ["withChangesDo:", "selectedClass:", "copyClass:to:", "environment", "theNonMetaClass", "selectedClass"]
  675. }),
  676. $globals.HLToolModel);
  677. $core.addMethod(
  678. $core.method({
  679. selector: "forceSelectedClass:",
  680. protocol: 'accessing',
  681. fn: function (aClass){
  682. var self=this;
  683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  684. return $core.withContext(function($ctx1) {
  685. //>>excludeEnd("ctx");
  686. var $1;
  687. self._withChangesDo_((function(){
  688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  689. return $core.withContext(function($ctx2) {
  690. //>>excludeEnd("ctx");
  691. self._selectedClass_(nil);
  692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  693. $ctx2.sendIdx["selectedClass:"]=1;
  694. //>>excludeEnd("ctx");
  695. $1=self._selectedClass_(aClass);
  696. return $1;
  697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  698. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  699. //>>excludeEnd("ctx");
  700. }));
  701. return self;
  702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  703. }, function($ctx1) {$ctx1.fill(self,"forceSelectedClass:",{aClass:aClass},$globals.HLToolModel)});
  704. //>>excludeEnd("ctx");
  705. },
  706. //>>excludeStart("ide", pragmas.excludeIdeData);
  707. args: ["aClass"],
  708. source: "forceSelectedClass: aClass\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedClass: nil;\x0a\x09\x09\x09selectedClass: aClass ]",
  709. referencedClasses: [],
  710. //>>excludeEnd("ide");
  711. messageSends: ["withChangesDo:", "selectedClass:"]
  712. }),
  713. $globals.HLToolModel);
  714. $core.addMethod(
  715. $core.method({
  716. selector: "forceSelectedMethod:",
  717. protocol: 'accessing',
  718. fn: function (aMethod){
  719. var self=this;
  720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  721. return $core.withContext(function($ctx1) {
  722. //>>excludeEnd("ctx");
  723. var $1;
  724. self._withChangesDo_((function(){
  725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  726. return $core.withContext(function($ctx2) {
  727. //>>excludeEnd("ctx");
  728. self._selectedMethod_(nil);
  729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  730. $ctx2.sendIdx["selectedMethod:"]=1;
  731. //>>excludeEnd("ctx");
  732. $1=self._selectedMethod_(aMethod);
  733. return $1;
  734. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  735. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  736. //>>excludeEnd("ctx");
  737. }));
  738. return self;
  739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  740. }, function($ctx1) {$ctx1.fill(self,"forceSelectedMethod:",{aMethod:aMethod},$globals.HLToolModel)});
  741. //>>excludeEnd("ctx");
  742. },
  743. //>>excludeStart("ide", pragmas.excludeIdeData);
  744. args: ["aMethod"],
  745. source: "forceSelectedMethod: aMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedMethod: nil;\x0a\x09\x09\x09selectedMethod: aMethod ]",
  746. referencedClasses: [],
  747. //>>excludeEnd("ide");
  748. messageSends: ["withChangesDo:", "selectedMethod:"]
  749. }),
  750. $globals.HLToolModel);
  751. $core.addMethod(
  752. $core.method({
  753. selector: "forceSelectedPackage:",
  754. protocol: 'accessing',
  755. fn: function (aPackage){
  756. var self=this;
  757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  758. return $core.withContext(function($ctx1) {
  759. //>>excludeEnd("ctx");
  760. var $1;
  761. self._withChangesDo_((function(){
  762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  763. return $core.withContext(function($ctx2) {
  764. //>>excludeEnd("ctx");
  765. self._selectedPackage_(nil);
  766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  767. $ctx2.sendIdx["selectedPackage:"]=1;
  768. //>>excludeEnd("ctx");
  769. $1=self._selectedPackage_(aPackage);
  770. return $1;
  771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  772. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  773. //>>excludeEnd("ctx");
  774. }));
  775. return self;
  776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  777. }, function($ctx1) {$ctx1.fill(self,"forceSelectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  778. //>>excludeEnd("ctx");
  779. },
  780. //>>excludeStart("ide", pragmas.excludeIdeData);
  781. args: ["aPackage"],
  782. source: "forceSelectedPackage: aPackage\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedPackage: nil;\x0a\x09\x09\x09selectedPackage: aPackage ]",
  783. referencedClasses: [],
  784. //>>excludeEnd("ide");
  785. messageSends: ["withChangesDo:", "selectedPackage:"]
  786. }),
  787. $globals.HLToolModel);
  788. $core.addMethod(
  789. $core.method({
  790. selector: "forceSelectedProtocol:",
  791. protocol: 'accessing',
  792. fn: function (aProtocol){
  793. var self=this;
  794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  795. return $core.withContext(function($ctx1) {
  796. //>>excludeEnd("ctx");
  797. var $1;
  798. self._withChangesDo_((function(){
  799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  800. return $core.withContext(function($ctx2) {
  801. //>>excludeEnd("ctx");
  802. self._selectedProtocol_(nil);
  803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  804. $ctx2.sendIdx["selectedProtocol:"]=1;
  805. //>>excludeEnd("ctx");
  806. $1=self._selectedProtocol_(aProtocol);
  807. return $1;
  808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  809. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  810. //>>excludeEnd("ctx");
  811. }));
  812. return self;
  813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  814. }, function($ctx1) {$ctx1.fill(self,"forceSelectedProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  815. //>>excludeEnd("ctx");
  816. },
  817. //>>excludeStart("ide", pragmas.excludeIdeData);
  818. args: ["aProtocol"],
  819. source: "forceSelectedProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedProtocol: nil;\x0a\x09\x09\x09selectedProtocol: aProtocol ]",
  820. referencedClasses: [],
  821. //>>excludeEnd("ide");
  822. messageSends: ["withChangesDo:", "selectedProtocol:"]
  823. }),
  824. $globals.HLToolModel);
  825. $core.addMethod(
  826. $core.method({
  827. selector: "handleCompileError:",
  828. protocol: 'error handling',
  829. fn: function (anError){
  830. var self=this;
  831. function $HLCompileErrorRaised(){return $globals.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  833. return $core.withContext(function($ctx1) {
  834. //>>excludeEnd("ctx");
  835. var $1,$2;
  836. $1=$recv($HLCompileErrorRaised())._new();
  837. $recv($1)._error_(anError);
  838. $2=$recv($1)._yourself();
  839. $recv(self._announcer())._announce_($2);
  840. return self;
  841. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  842. }, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},$globals.HLToolModel)});
  843. //>>excludeEnd("ctx");
  844. },
  845. //>>excludeStart("ide", pragmas.excludeIdeData);
  846. args: ["anError"],
  847. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  848. referencedClasses: ["HLCompileErrorRaised"],
  849. //>>excludeEnd("ide");
  850. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  851. }),
  852. $globals.HLToolModel);
  853. $core.addMethod(
  854. $core.method({
  855. selector: "handleParseError:",
  856. protocol: 'error handling',
  857. fn: function (anError){
  858. var self=this;
  859. var split,line,column,messageToInsert;
  860. function $HLParseErrorRaised(){return $globals.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  862. return $core.withContext(function($ctx1) {
  863. //>>excludeEnd("ctx");
  864. var $1,$3,$2,$4,$6,$7,$8,$9,$5;
  865. split=$recv($recv(anError)._messageText())._tokenize_(" : ");
  866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  867. $ctx1.sendIdx["tokenize:"]=1;
  868. //>>excludeEnd("ctx");
  869. messageToInsert=$recv(split)._second();
  870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  871. $ctx1.sendIdx["second"]=1;
  872. //>>excludeEnd("ctx");
  873. $1=$recv(split)._first();
  874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  875. $ctx1.sendIdx["first"]=1;
  876. //>>excludeEnd("ctx");
  877. $3=$recv(split)._first();
  878. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  879. $ctx1.sendIdx["first"]=2;
  880. //>>excludeEnd("ctx");
  881. $2=$recv($3)._size();
  882. split=$recv($1)._copyFrom_to_((21),$2);
  883. split=$recv(split)._tokenize_(" column ");
  884. line=$recv(split)._first();
  885. column=$recv(split)._second();
  886. $4=self._announcer();
  887. $6=$recv($HLParseErrorRaised())._new();
  888. $7=$6;
  889. $8=$recv(line)._asNumber();
  890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  891. $ctx1.sendIdx["asNumber"]=1;
  892. //>>excludeEnd("ctx");
  893. $recv($7)._line_($8);
  894. $recv($6)._column_($recv(column)._asNumber());
  895. $recv($6)._message_(messageToInsert);
  896. $recv($6)._error_(anError);
  897. $9=$recv($6)._yourself();
  898. $5=$9;
  899. $recv($4)._announce_($5);
  900. return self;
  901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  902. }, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},$globals.HLToolModel)});
  903. //>>excludeEnd("ctx");
  904. },
  905. //>>excludeStart("ide", pragmas.excludeIdeData);
  906. args: ["anError"],
  907. 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)",
  908. referencedClasses: ["HLParseErrorRaised"],
  909. //>>excludeEnd("ide");
  910. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "first", "size", "announce:", "announcer", "line:", "new", "asNumber", "column:", "message:", "error:", "yourself"]
  911. }),
  912. $globals.HLToolModel);
  913. $core.addMethod(
  914. $core.method({
  915. selector: "handleUnkownVariableError:",
  916. protocol: 'error handling',
  917. fn: function (anError){
  918. var self=this;
  919. function $HLUnknownVariableErrorRaised(){return $globals.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  921. return $core.withContext(function($ctx1) {
  922. //>>excludeEnd("ctx");
  923. var $1,$2;
  924. $1=$recv($HLUnknownVariableErrorRaised())._new();
  925. $recv($1)._error_(anError);
  926. $2=$recv($1)._yourself();
  927. $recv(self._announcer())._announce_($2);
  928. return self;
  929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  930. }, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},$globals.HLToolModel)});
  931. //>>excludeEnd("ctx");
  932. },
  933. //>>excludeStart("ide", pragmas.excludeIdeData);
  934. args: ["anError"],
  935. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  936. referencedClasses: ["HLUnknownVariableErrorRaised"],
  937. //>>excludeEnd("ide");
  938. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  939. }),
  940. $globals.HLToolModel);
  941. $core.addMethod(
  942. $core.method({
  943. selector: "isToolModel",
  944. protocol: 'testing',
  945. fn: function (){
  946. var self=this;
  947. return true;
  948. },
  949. //>>excludeStart("ide", pragmas.excludeIdeData);
  950. args: [],
  951. source: "isToolModel\x0a\x09^ true",
  952. referencedClasses: [],
  953. //>>excludeEnd("ide");
  954. messageSends: []
  955. }),
  956. $globals.HLToolModel);
  957. $core.addMethod(
  958. $core.method({
  959. selector: "moveClassToPackage:",
  960. protocol: 'commands actions',
  961. fn: function (aPackageName){
  962. var self=this;
  963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  964. return $core.withContext(function($ctx1) {
  965. //>>excludeEnd("ctx");
  966. self._withChangesDo_((function(){
  967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  968. return $core.withContext(function($ctx2) {
  969. //>>excludeEnd("ctx");
  970. return $recv(self._environment())._moveClass_toPackage_($recv(self._selectedClass())._theNonMetaClass(),aPackageName);
  971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  972. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  973. //>>excludeEnd("ctx");
  974. }));
  975. return self;
  976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  977. }, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},$globals.HLToolModel)});
  978. //>>excludeEnd("ctx");
  979. },
  980. //>>excludeStart("ide", pragmas.excludeIdeData);
  981. args: ["aPackageName"],
  982. source: "moveClassToPackage: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09toPackage: aPackageName ]",
  983. referencedClasses: [],
  984. //>>excludeEnd("ide");
  985. messageSends: ["withChangesDo:", "moveClass:toPackage:", "environment", "theNonMetaClass", "selectedClass"]
  986. }),
  987. $globals.HLToolModel);
  988. $core.addMethod(
  989. $core.method({
  990. selector: "moveMethodToClass:",
  991. protocol: 'commands actions',
  992. fn: function (aClassName){
  993. var self=this;
  994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  995. return $core.withContext(function($ctx1) {
  996. //>>excludeEnd("ctx");
  997. self._withChangesDo_((function(){
  998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  999. return $core.withContext(function($ctx2) {
  1000. //>>excludeEnd("ctx");
  1001. return $recv(self._environment())._moveMethod_toClass_(self._selectedMethod(),aClassName);
  1002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1003. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1004. //>>excludeEnd("ctx");
  1005. }));
  1006. return self;
  1007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1008. }, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},$globals.HLToolModel)});
  1009. //>>excludeEnd("ctx");
  1010. },
  1011. //>>excludeStart("ide", pragmas.excludeIdeData);
  1012. args: ["aClassName"],
  1013. source: "moveMethodToClass: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toClass: aClassName ]",
  1014. referencedClasses: [],
  1015. //>>excludeEnd("ide");
  1016. messageSends: ["withChangesDo:", "moveMethod:toClass:", "environment", "selectedMethod"]
  1017. }),
  1018. $globals.HLToolModel);
  1019. $core.addMethod(
  1020. $core.method({
  1021. selector: "moveMethodToProtocol:",
  1022. protocol: 'commands actions',
  1023. fn: function (aProtocol){
  1024. var self=this;
  1025. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1026. return $core.withContext(function($ctx1) {
  1027. //>>excludeEnd("ctx");
  1028. self._withChangesDo_((function(){
  1029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1030. return $core.withContext(function($ctx2) {
  1031. //>>excludeEnd("ctx");
  1032. return $recv(self._environment())._moveMethod_toProtocol_(self._selectedMethod(),aProtocol);
  1033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1034. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1035. //>>excludeEnd("ctx");
  1036. }));
  1037. return self;
  1038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1039. }, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  1040. //>>excludeEnd("ctx");
  1041. },
  1042. //>>excludeStart("ide", pragmas.excludeIdeData);
  1043. args: ["aProtocol"],
  1044. source: "moveMethodToProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toProtocol: aProtocol ]",
  1045. referencedClasses: [],
  1046. //>>excludeEnd("ide");
  1047. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "environment", "selectedMethod"]
  1048. }),
  1049. $globals.HLToolModel);
  1050. $core.addMethod(
  1051. $core.method({
  1052. selector: "openClassNamed:",
  1053. protocol: 'commands actions',
  1054. fn: function (aString){
  1055. var self=this;
  1056. var class_;
  1057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1058. return $core.withContext(function($ctx1) {
  1059. //>>excludeEnd("ctx");
  1060. self._withChangesDo_((function(){
  1061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1062. return $core.withContext(function($ctx2) {
  1063. //>>excludeEnd("ctx");
  1064. class_=$recv(self._environment())._classNamed_(aString);
  1065. class_;
  1066. self._selectedPackage_($recv(class_)._package());
  1067. return self._selectedClass_(class_);
  1068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1069. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1070. //>>excludeEnd("ctx");
  1071. }));
  1072. return self;
  1073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1074. }, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},$globals.HLToolModel)});
  1075. //>>excludeEnd("ctx");
  1076. },
  1077. //>>excludeStart("ide", pragmas.excludeIdeData);
  1078. args: ["aString"],
  1079. 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 ]",
  1080. referencedClasses: [],
  1081. //>>excludeEnd("ide");
  1082. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"]
  1083. }),
  1084. $globals.HLToolModel);
  1085. $core.addMethod(
  1086. $core.method({
  1087. selector: "packageToCommit",
  1088. protocol: 'accessing',
  1089. fn: function (){
  1090. var self=this;
  1091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1092. return $core.withContext(function($ctx1) {
  1093. //>>excludeEnd("ctx");
  1094. var $2,$1,$receiver;
  1095. $2=self._selectedMethod();
  1096. if(($receiver = $2) == null || $receiver.isNil){
  1097. $1=self._selectedPackage();
  1098. } else {
  1099. var method;
  1100. method=$receiver;
  1101. $1=$recv(method)._package();
  1102. };
  1103. return $1;
  1104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1105. }, function($ctx1) {$ctx1.fill(self,"packageToCommit",{},$globals.HLToolModel)});
  1106. //>>excludeEnd("ctx");
  1107. },
  1108. //>>excludeStart("ide", pragmas.excludeIdeData);
  1109. args: [],
  1110. 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 ]",
  1111. referencedClasses: [],
  1112. //>>excludeEnd("ide");
  1113. messageSends: ["ifNil:ifNotNil:", "selectedMethod", "selectedPackage", "package"]
  1114. }),
  1115. $globals.HLToolModel);
  1116. $core.addMethod(
  1117. $core.method({
  1118. selector: "packages",
  1119. protocol: 'accessing',
  1120. fn: function (){
  1121. var self=this;
  1122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1123. return $core.withContext(function($ctx1) {
  1124. //>>excludeEnd("ctx");
  1125. var $1;
  1126. $1=$recv(self._environment())._packages();
  1127. return $1;
  1128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1129. }, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.HLToolModel)});
  1130. //>>excludeEnd("ctx");
  1131. },
  1132. //>>excludeStart("ide", pragmas.excludeIdeData);
  1133. args: [],
  1134. source: "packages\x0a\x09^ self environment packages",
  1135. referencedClasses: [],
  1136. //>>excludeEnd("ide");
  1137. messageSends: ["packages", "environment"]
  1138. }),
  1139. $globals.HLToolModel);
  1140. $core.addMethod(
  1141. $core.method({
  1142. selector: "removeClass",
  1143. protocol: 'commands actions',
  1144. fn: function (){
  1145. var self=this;
  1146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1147. return $core.withContext(function($ctx1) {
  1148. //>>excludeEnd("ctx");
  1149. var $1,$5,$4,$3,$2;
  1150. self._withChangesDo_((function(){
  1151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1152. return $core.withContext(function($ctx2) {
  1153. //>>excludeEnd("ctx");
  1154. $1=self._manager();
  1155. $5=self._selectedClass();
  1156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1157. $ctx2.sendIdx["selectedClass"]=1;
  1158. //>>excludeEnd("ctx");
  1159. $4=$recv($5)._theNonMetaClass();
  1160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1161. $ctx2.sendIdx["theNonMetaClass"]=1;
  1162. //>>excludeEnd("ctx");
  1163. $3=$recv($4)._name();
  1164. $2="Do you REALLY want to remove class ".__comma($3);
  1165. return $recv($1)._confirm_ifTrue_($2,(function(){
  1166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1167. return $core.withContext(function($ctx3) {
  1168. //>>excludeEnd("ctx");
  1169. return $recv(self._environment())._removeClass_($recv(self._selectedClass())._theNonMetaClass());
  1170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1171. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1172. //>>excludeEnd("ctx");
  1173. }));
  1174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1175. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1176. //>>excludeEnd("ctx");
  1177. }));
  1178. return self;
  1179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1180. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.HLToolModel)});
  1181. //>>excludeEnd("ctx");
  1182. },
  1183. //>>excludeStart("ide", pragmas.excludeIdeData);
  1184. args: [],
  1185. 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 ] ]",
  1186. referencedClasses: [],
  1187. //>>excludeEnd("ide");
  1188. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "theNonMetaClass", "selectedClass", "removeClass:", "environment"]
  1189. }),
  1190. $globals.HLToolModel);
  1191. $core.addMethod(
  1192. $core.method({
  1193. selector: "removeMethod",
  1194. protocol: 'commands actions',
  1195. fn: function (){
  1196. var self=this;
  1197. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1198. return $core.withContext(function($ctx1) {
  1199. //>>excludeEnd("ctx");
  1200. var $1,$7,$6,$5,$4,$3,$9,$8,$2;
  1201. self._withChangesDo_((function(){
  1202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1203. return $core.withContext(function($ctx2) {
  1204. //>>excludeEnd("ctx");
  1205. $1=self._manager();
  1206. $7=self._selectedMethod();
  1207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1208. $ctx2.sendIdx["selectedMethod"]=1;
  1209. //>>excludeEnd("ctx");
  1210. $6=$recv($7)._methodClass();
  1211. $5=$recv($6)._name();
  1212. $4="Do you REALLY want to remove method ".__comma($5);
  1213. $3=$recv($4).__comma(" >> #");
  1214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1215. $ctx2.sendIdx[","]=2;
  1216. //>>excludeEnd("ctx");
  1217. $9=self._selectedMethod();
  1218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1219. $ctx2.sendIdx["selectedMethod"]=2;
  1220. //>>excludeEnd("ctx");
  1221. $8=$recv($9)._selector();
  1222. $2=$recv($3).__comma($8);
  1223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1224. $ctx2.sendIdx[","]=1;
  1225. //>>excludeEnd("ctx");
  1226. return $recv($1)._confirm_ifTrue_($2,(function(){
  1227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1228. return $core.withContext(function($ctx3) {
  1229. //>>excludeEnd("ctx");
  1230. return $recv(self._environment())._removeMethod_(self._selectedMethod());
  1231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1232. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1233. //>>excludeEnd("ctx");
  1234. }));
  1235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1236. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1237. //>>excludeEnd("ctx");
  1238. }));
  1239. return self;
  1240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1241. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.HLToolModel)});
  1242. //>>excludeEnd("ctx");
  1243. },
  1244. //>>excludeStart("ide", pragmas.excludeIdeData);
  1245. args: [],
  1246. 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 ] ]",
  1247. referencedClasses: [],
  1248. //>>excludeEnd("ide");
  1249. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "methodClass", "selectedMethod", "selector", "removeMethod:", "environment"]
  1250. }),
  1251. $globals.HLToolModel);
  1252. $core.addMethod(
  1253. $core.method({
  1254. selector: "removeProtocol",
  1255. protocol: 'commands actions',
  1256. fn: function (){
  1257. var self=this;
  1258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1259. return $core.withContext(function($ctx1) {
  1260. //>>excludeEnd("ctx");
  1261. var $1,$3,$2;
  1262. self._withChangesDo_((function(){
  1263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1264. return $core.withContext(function($ctx2) {
  1265. //>>excludeEnd("ctx");
  1266. $1=self._manager();
  1267. $3=self._selectedProtocol();
  1268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1269. $ctx2.sendIdx["selectedProtocol"]=1;
  1270. //>>excludeEnd("ctx");
  1271. $2="Do you REALLY want to remove protocol ".__comma($3);
  1272. return $recv($1)._confirm_ifTrue_($2,(function(){
  1273. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1274. return $core.withContext(function($ctx3) {
  1275. //>>excludeEnd("ctx");
  1276. return $recv(self._environment())._removeProtocol_from_(self._selectedProtocol(),self._selectedClass());
  1277. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1278. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1279. //>>excludeEnd("ctx");
  1280. }));
  1281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1282. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1283. //>>excludeEnd("ctx");
  1284. }));
  1285. return self;
  1286. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1287. }, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},$globals.HLToolModel)});
  1288. //>>excludeEnd("ctx");
  1289. },
  1290. //>>excludeStart("ide", pragmas.excludeIdeData);
  1291. args: [],
  1292. 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 ] ]",
  1293. referencedClasses: [],
  1294. //>>excludeEnd("ide");
  1295. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "selectedProtocol", "removeProtocol:from:", "environment", "selectedClass"]
  1296. }),
  1297. $globals.HLToolModel);
  1298. $core.addMethod(
  1299. $core.method({
  1300. selector: "renameClassTo:",
  1301. protocol: 'commands actions',
  1302. fn: function (aClassName){
  1303. var self=this;
  1304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1305. return $core.withContext(function($ctx1) {
  1306. //>>excludeEnd("ctx");
  1307. self._withChangesDo_((function(){
  1308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1309. return $core.withContext(function($ctx2) {
  1310. //>>excludeEnd("ctx");
  1311. return $recv(self._environment())._renameClass_to_($recv(self._selectedClass())._theNonMetaClass(),aClassName);
  1312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1313. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1314. //>>excludeEnd("ctx");
  1315. }));
  1316. return self;
  1317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1318. }, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  1319. //>>excludeEnd("ctx");
  1320. },
  1321. //>>excludeStart("ide", pragmas.excludeIdeData);
  1322. args: ["aClassName"],
  1323. source: "renameClassTo: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  1324. referencedClasses: [],
  1325. //>>excludeEnd("ide");
  1326. messageSends: ["withChangesDo:", "renameClass:to:", "environment", "theNonMetaClass", "selectedClass"]
  1327. }),
  1328. $globals.HLToolModel);
  1329. $core.addMethod(
  1330. $core.method({
  1331. selector: "renameProtocolTo:",
  1332. protocol: 'commands actions',
  1333. fn: function (aString){
  1334. var self=this;
  1335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1336. return $core.withContext(function($ctx1) {
  1337. //>>excludeEnd("ctx");
  1338. self._withChangesDo_((function(){
  1339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1340. return $core.withContext(function($ctx2) {
  1341. //>>excludeEnd("ctx");
  1342. return $recv(self._environment())._renameProtocol_to_in_(self._selectedProtocol(),aString,self._selectedClass());
  1343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1344. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1345. //>>excludeEnd("ctx");
  1346. }));
  1347. return self;
  1348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1349. }, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},$globals.HLToolModel)});
  1350. //>>excludeEnd("ctx");
  1351. },
  1352. //>>excludeStart("ide", pragmas.excludeIdeData);
  1353. args: ["aString"],
  1354. 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 ]",
  1355. referencedClasses: [],
  1356. //>>excludeEnd("ide");
  1357. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "environment", "selectedProtocol", "selectedClass"]
  1358. }),
  1359. $globals.HLToolModel);
  1360. $core.addMethod(
  1361. $core.method({
  1362. selector: "save:",
  1363. protocol: 'actions',
  1364. fn: function (aString){
  1365. var self=this;
  1366. function $HLSourceCodeSaved(){return $globals.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  1367. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1368. return $core.withContext(function($ctx1) {
  1369. //>>excludeEnd("ctx");
  1370. var $1;
  1371. $recv(self._announcer())._announce_($recv($HLSourceCodeSaved())._new());
  1372. $1=self._shouldCompileClassDefinition_(aString);
  1373. if($core.assert($1)){
  1374. self._compileClassDefinition_(aString);
  1375. } else {
  1376. self._compileMethod_(aString);
  1377. };
  1378. return self;
  1379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1380. }, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},$globals.HLToolModel)});
  1381. //>>excludeEnd("ctx");
  1382. },
  1383. //>>excludeStart("ide", pragmas.excludeIdeData);
  1384. args: ["aString"],
  1385. source: "save: aString\x0a\x09self announcer announce: HLSourceCodeSaved new.\x0a\x09\x0a\x09(self shouldCompileClassDefinition: aString)\x0a\x09\x09ifTrue: [ self compileClassDefinition: aString ]\x0a\x09\x09ifFalse: [ self compileMethod: aString ]",
  1386. referencedClasses: ["HLSourceCodeSaved"],
  1387. //>>excludeEnd("ide");
  1388. messageSends: ["announce:", "announcer", "new", "ifTrue:ifFalse:", "shouldCompileClassDefinition:", "compileClassDefinition:", "compileMethod:"]
  1389. }),
  1390. $globals.HLToolModel);
  1391. $core.addMethod(
  1392. $core.method({
  1393. selector: "saveSourceCode",
  1394. protocol: 'actions',
  1395. fn: function (){
  1396. var self=this;
  1397. function $HLSaveSourceCode(){return $globals.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  1398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1399. return $core.withContext(function($ctx1) {
  1400. //>>excludeEnd("ctx");
  1401. $recv(self._announcer())._announce_($recv($HLSaveSourceCode())._new());
  1402. return self;
  1403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1404. }, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},$globals.HLToolModel)});
  1405. //>>excludeEnd("ctx");
  1406. },
  1407. //>>excludeStart("ide", pragmas.excludeIdeData);
  1408. args: [],
  1409. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  1410. referencedClasses: ["HLSaveSourceCode"],
  1411. //>>excludeEnd("ide");
  1412. messageSends: ["announce:", "announcer", "new"]
  1413. }),
  1414. $globals.HLToolModel);
  1415. $core.addMethod(
  1416. $core.method({
  1417. selector: "selectedClass",
  1418. protocol: 'accessing',
  1419. fn: function (){
  1420. var self=this;
  1421. var $1;
  1422. $1=self["@selectedClass"];
  1423. return $1;
  1424. },
  1425. //>>excludeStart("ide", pragmas.excludeIdeData);
  1426. args: [],
  1427. source: "selectedClass\x0a\x09^ selectedClass",
  1428. referencedClasses: [],
  1429. //>>excludeEnd("ide");
  1430. messageSends: []
  1431. }),
  1432. $globals.HLToolModel);
  1433. $core.addMethod(
  1434. $core.method({
  1435. selector: "selectedClass:",
  1436. protocol: 'accessing',
  1437. fn: function (aClass){
  1438. var self=this;
  1439. function $HLClassSelected(){return $globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1441. return $core.withContext(function($ctx1) {
  1442. //>>excludeEnd("ctx");
  1443. var $3,$2,$1,$4,$6,$5,$7,$receiver;
  1444. $3=self._selectedClass();
  1445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1446. $ctx1.sendIdx["selectedClass"]=1;
  1447. //>>excludeEnd("ctx");
  1448. $2=$recv($3).__eq(aClass);
  1449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1450. $ctx1.sendIdx["="]=1;
  1451. //>>excludeEnd("ctx");
  1452. $1=$recv($2)._and_((function(){
  1453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1454. return $core.withContext(function($ctx2) {
  1455. //>>excludeEnd("ctx");
  1456. return $recv(aClass)._isNil();
  1457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1458. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1459. //>>excludeEnd("ctx");
  1460. }));
  1461. if($core.assert($1)){
  1462. return self;
  1463. };
  1464. self._withChangesDo_((function(){
  1465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1466. return $core.withContext(function($ctx2) {
  1467. //>>excludeEnd("ctx");
  1468. $4=$recv(self["@selectedClass"]).__eq(aClass);
  1469. if($core.assert($4)){
  1470. self._selectedProtocol_(nil);
  1471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1472. $ctx2.sendIdx["selectedProtocol:"]=1;
  1473. //>>excludeEnd("ctx");
  1474. };
  1475. if(($receiver = aClass) == null || $receiver.isNil){
  1476. self["@selectedClass"]=nil;
  1477. self["@selectedClass"];
  1478. } else {
  1479. $6=$recv(aClass)._theNonMetaClass();
  1480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1481. $ctx2.sendIdx["theNonMetaClass"]=1;
  1482. //>>excludeEnd("ctx");
  1483. $5=$recv($6)._package();
  1484. self._selectedPackage_($5);
  1485. $7=self._showInstance();
  1486. if($core.assert($7)){
  1487. self["@selectedClass"]=$recv(aClass)._theNonMetaClass();
  1488. self["@selectedClass"];
  1489. } else {
  1490. self["@selectedClass"]=$recv(aClass)._theMetaClass();
  1491. self["@selectedClass"];
  1492. };
  1493. };
  1494. self._selectedProtocol_(nil);
  1495. return $recv(self._announcer())._announce_($recv($HLClassSelected())._on_(self._selectedClass()));
  1496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1497. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1498. //>>excludeEnd("ctx");
  1499. }));
  1500. return self;
  1501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1502. }, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},$globals.HLToolModel)});
  1503. //>>excludeEnd("ctx");
  1504. },
  1505. //>>excludeStart("ide", pragmas.excludeIdeData);
  1506. args: ["aClass"],
  1507. source: "selectedClass: aClass\x0a\x0a\x09(self selectedClass = aClass and: [ aClass isNil ]) \x0a\x09\x09ifTrue: [ ^ self ].\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09selectedClass = aClass ifTrue: [ \x0a\x09\x09\x09self selectedProtocol: nil ].\x0a \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\x09self selectedProtocol: nil.\x0a\x09\x09self announcer announce: (HLClassSelected on: self selectedClass) ]",
  1508. referencedClasses: ["HLClassSelected"],
  1509. //>>excludeEnd("ide");
  1510. messageSends: ["ifTrue:", "and:", "=", "selectedClass", "isNil", "withChangesDo:", "selectedProtocol:", "ifNil:ifNotNil:", "selectedPackage:", "package", "theNonMetaClass", "ifTrue:ifFalse:", "showInstance", "theMetaClass", "announce:", "announcer", "on:"]
  1511. }),
  1512. $globals.HLToolModel);
  1513. $core.addMethod(
  1514. $core.method({
  1515. selector: "selectedMethod",
  1516. protocol: 'accessing',
  1517. fn: function (){
  1518. var self=this;
  1519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1520. return $core.withContext(function($ctx1) {
  1521. //>>excludeEnd("ctx");
  1522. var $2,$1,$receiver;
  1523. $2=self._selectedClass();
  1524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1525. $ctx1.sendIdx["selectedClass"]=1;
  1526. //>>excludeEnd("ctx");
  1527. if(($receiver = $2) == null || $receiver.isNil){
  1528. $1=$2;
  1529. } else {
  1530. $1=$recv($recv(self._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  1531. return nil;
  1532. }));
  1533. };
  1534. return $1;
  1535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1536. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},$globals.HLToolModel)});
  1537. //>>excludeEnd("ctx");
  1538. },
  1539. //>>excludeStart("ide", pragmas.excludeIdeData);
  1540. args: [],
  1541. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09ifAbsent: [ nil ] ]",
  1542. referencedClasses: [],
  1543. //>>excludeEnd("ide");
  1544. messageSends: ["ifNotNil:", "selectedClass", "at:ifAbsent:", "methodDictionary"]
  1545. }),
  1546. $globals.HLToolModel);
  1547. $core.addMethod(
  1548. $core.method({
  1549. selector: "selectedMethod:",
  1550. protocol: 'accessing',
  1551. fn: function (aCompiledMethod){
  1552. var self=this;
  1553. function $HLMethodSelected(){return $globals.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1555. return $core.withContext(function($ctx1) {
  1556. //>>excludeEnd("ctx");
  1557. var $1,$receiver;
  1558. $1=$recv(self["@selectedSelector"]).__eq(aCompiledMethod);
  1559. if($core.assert($1)){
  1560. return self;
  1561. };
  1562. self._withChangesDo_((function(){
  1563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1564. return $core.withContext(function($ctx2) {
  1565. //>>excludeEnd("ctx");
  1566. if(($receiver = aCompiledMethod) == null || $receiver.isNil){
  1567. self["@selectedSelector"]=nil;
  1568. self["@selectedSelector"];
  1569. } else {
  1570. self["@selectedClass"]=$recv(aCompiledMethod)._methodClass();
  1571. self["@selectedClass"];
  1572. self["@selectedPackage"]=$recv($recv(self["@selectedClass"])._theNonMetaClass())._package();
  1573. self["@selectedPackage"];
  1574. self["@selectedSelector"]=$recv(aCompiledMethod)._selector();
  1575. self["@selectedSelector"];
  1576. };
  1577. return $recv(self._announcer())._announce_($recv($HLMethodSelected())._on_(aCompiledMethod));
  1578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1579. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1580. //>>excludeEnd("ctx");
  1581. }));
  1582. return self;
  1583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1584. }, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLToolModel)});
  1585. //>>excludeEnd("ctx");
  1586. },
  1587. //>>excludeStart("ide", pragmas.excludeIdeData);
  1588. args: ["aCompiledMethod"],
  1589. 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\x09selectedClass := aCompiledMethod methodClass.\x0a\x09\x09\x09\x09selectedPackage := selectedClass theNonMetaClass package.\x0a\x09\x09\x09\x09selectedSelector := aCompiledMethod selector ].\x0a\x0a\x09\x09self announcer announce: (HLMethodSelected on: aCompiledMethod) ]",
  1590. referencedClasses: ["HLMethodSelected"],
  1591. //>>excludeEnd("ide");
  1592. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "methodClass", "package", "theNonMetaClass", "selector", "announce:", "announcer", "on:"]
  1593. }),
  1594. $globals.HLToolModel);
  1595. $core.addMethod(
  1596. $core.method({
  1597. selector: "selectedPackage",
  1598. protocol: 'accessing',
  1599. fn: function (){
  1600. var self=this;
  1601. var $1;
  1602. $1=self["@selectedPackage"];
  1603. return $1;
  1604. },
  1605. //>>excludeStart("ide", pragmas.excludeIdeData);
  1606. args: [],
  1607. source: "selectedPackage\x0a\x09^ selectedPackage",
  1608. referencedClasses: [],
  1609. //>>excludeEnd("ide");
  1610. messageSends: []
  1611. }),
  1612. $globals.HLToolModel);
  1613. $core.addMethod(
  1614. $core.method({
  1615. selector: "selectedPackage:",
  1616. protocol: 'accessing',
  1617. fn: function (aPackage){
  1618. var self=this;
  1619. function $HLPackageSelected(){return $globals.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  1620. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1621. return $core.withContext(function($ctx1) {
  1622. //>>excludeEnd("ctx");
  1623. var $1;
  1624. $1=$recv(self["@selectedPackage"]).__eq(aPackage);
  1625. if($core.assert($1)){
  1626. return self;
  1627. };
  1628. self._withChangesDo_((function(){
  1629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1630. return $core.withContext(function($ctx2) {
  1631. //>>excludeEnd("ctx");
  1632. self["@selectedPackage"]=aPackage;
  1633. self["@selectedPackage"];
  1634. self._selectedClass_(nil);
  1635. return $recv(self._announcer())._announce_($recv($HLPackageSelected())._on_(aPackage));
  1636. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1637. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1638. //>>excludeEnd("ctx");
  1639. }));
  1640. return self;
  1641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1642. }, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  1643. //>>excludeEnd("ctx");
  1644. },
  1645. //>>excludeStart("ide", pragmas.excludeIdeData);
  1646. args: ["aPackage"],
  1647. 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) ]",
  1648. referencedClasses: ["HLPackageSelected"],
  1649. //>>excludeEnd("ide");
  1650. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "announcer", "on:"]
  1651. }),
  1652. $globals.HLToolModel);
  1653. $core.addMethod(
  1654. $core.method({
  1655. selector: "selectedProtocol",
  1656. protocol: 'accessing',
  1657. fn: function (){
  1658. var self=this;
  1659. var $1;
  1660. $1=self["@selectedProtocol"];
  1661. return $1;
  1662. },
  1663. //>>excludeStart("ide", pragmas.excludeIdeData);
  1664. args: [],
  1665. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1666. referencedClasses: [],
  1667. //>>excludeEnd("ide");
  1668. messageSends: []
  1669. }),
  1670. $globals.HLToolModel);
  1671. $core.addMethod(
  1672. $core.method({
  1673. selector: "selectedProtocol:",
  1674. protocol: 'accessing',
  1675. fn: function (aString){
  1676. var self=this;
  1677. function $HLProtocolSelected(){return $globals.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1679. return $core.withContext(function($ctx1) {
  1680. //>>excludeEnd("ctx");
  1681. var $1;
  1682. $1=$recv(self["@selectedProtocol"]).__eq(aString);
  1683. if($core.assert($1)){
  1684. return self;
  1685. };
  1686. self._withChangesDo_((function(){
  1687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1688. return $core.withContext(function($ctx2) {
  1689. //>>excludeEnd("ctx");
  1690. self["@selectedProtocol"]=aString;
  1691. self["@selectedProtocol"];
  1692. self._selectedMethod_(nil);
  1693. return $recv(self._announcer())._announce_($recv($HLProtocolSelected())._on_(aString));
  1694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1695. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1696. //>>excludeEnd("ctx");
  1697. }));
  1698. return self;
  1699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1700. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},$globals.HLToolModel)});
  1701. //>>excludeEnd("ctx");
  1702. },
  1703. //>>excludeStart("ide", pragmas.excludeIdeData);
  1704. args: ["aString"],
  1705. 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) ]",
  1706. referencedClasses: ["HLProtocolSelected"],
  1707. //>>excludeEnd("ide");
  1708. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "announcer", "on:"]
  1709. }),
  1710. $globals.HLToolModel);
  1711. $core.addMethod(
  1712. $core.method({
  1713. selector: "shouldCompileClassDefinition:",
  1714. protocol: 'testing',
  1715. fn: function (aString){
  1716. var self=this;
  1717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1718. return $core.withContext(function($ctx1) {
  1719. //>>excludeEnd("ctx");
  1720. var $1;
  1721. $1=$recv($recv(self._selectedClass())._isNil())._or_((function(){
  1722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1723. return $core.withContext(function($ctx2) {
  1724. //>>excludeEnd("ctx");
  1725. return $recv(aString)._match_("^\x5cs*[A-Z]");
  1726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1727. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1728. //>>excludeEnd("ctx");
  1729. }));
  1730. return $1;
  1731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1732. }, function($ctx1) {$ctx1.fill(self,"shouldCompileClassDefinition:",{aString:aString},$globals.HLToolModel)});
  1733. //>>excludeEnd("ctx");
  1734. },
  1735. //>>excludeStart("ide", pragmas.excludeIdeData);
  1736. args: ["aString"],
  1737. source: "shouldCompileClassDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^\x5cs*[A-Z]' ]",
  1738. referencedClasses: [],
  1739. //>>excludeEnd("ide");
  1740. messageSends: ["or:", "isNil", "selectedClass", "match:"]
  1741. }),
  1742. $globals.HLToolModel);
  1743. $core.addMethod(
  1744. $core.method({
  1745. selector: "unclassifiedProtocol",
  1746. protocol: 'defaults',
  1747. fn: function (){
  1748. var self=this;
  1749. return "as yet unclassified";
  1750. },
  1751. //>>excludeStart("ide", pragmas.excludeIdeData);
  1752. args: [],
  1753. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  1754. referencedClasses: [],
  1755. //>>excludeEnd("ide");
  1756. messageSends: []
  1757. }),
  1758. $globals.HLToolModel);
  1759. $core.addMethod(
  1760. $core.method({
  1761. selector: "withCompileErrorHandling:",
  1762. protocol: 'error handling',
  1763. fn: function (aBlock){
  1764. var self=this;
  1765. function $ParseError(){return $globals.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  1766. function $UnknownVariableError(){return $globals.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
  1767. function $CompilerError(){return $globals.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
  1768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1769. return $core.withContext(function($ctx1) {
  1770. //>>excludeEnd("ctx");
  1771. var $1,$2;
  1772. $1=self._environment();
  1773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1774. $ctx1.sendIdx["environment"]=1;
  1775. //>>excludeEnd("ctx");
  1776. $recv($1)._evaluate_on_do_((function(){
  1777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1778. return $core.withContext(function($ctx2) {
  1779. //>>excludeEnd("ctx");
  1780. $2=self._environment();
  1781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1782. $ctx2.sendIdx["environment"]=2;
  1783. //>>excludeEnd("ctx");
  1784. return $recv($2)._evaluate_on_do_((function(){
  1785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1786. return $core.withContext(function($ctx3) {
  1787. //>>excludeEnd("ctx");
  1788. return $recv(self._environment())._evaluate_on_do_(aBlock,$ParseError(),(function(ex){
  1789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1790. return $core.withContext(function($ctx4) {
  1791. //>>excludeEnd("ctx");
  1792. return self._handleParseError_(ex);
  1793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1794. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx3,3)});
  1795. //>>excludeEnd("ctx");
  1796. }));
  1797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1798. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1799. //>>excludeEnd("ctx");
  1800. }),$UnknownVariableError(),(function(ex){
  1801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1802. return $core.withContext(function($ctx3) {
  1803. //>>excludeEnd("ctx");
  1804. return self._handleUnkownVariableError_(ex);
  1805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1806. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx2,4)});
  1807. //>>excludeEnd("ctx");
  1808. }));
  1809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1810. $ctx2.sendIdx["evaluate:on:do:"]=2;
  1811. //>>excludeEnd("ctx");
  1812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1813. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1814. //>>excludeEnd("ctx");
  1815. }),$CompilerError(),(function(ex){
  1816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1817. return $core.withContext(function($ctx2) {
  1818. //>>excludeEnd("ctx");
  1819. return self._handleCompileError_(ex);
  1820. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1821. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,5)});
  1822. //>>excludeEnd("ctx");
  1823. }));
  1824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1825. $ctx1.sendIdx["evaluate:on:do:"]=1;
  1826. //>>excludeEnd("ctx");
  1827. return self;
  1828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1829. }, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},$globals.HLToolModel)});
  1830. //>>excludeEnd("ctx");
  1831. },
  1832. //>>excludeStart("ide", pragmas.excludeIdeData);
  1833. args: ["aBlock"],
  1834. 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 ]",
  1835. referencedClasses: ["ParseError", "UnknownVariableError", "CompilerError"],
  1836. //>>excludeEnd("ide");
  1837. messageSends: ["evaluate:on:do:", "environment", "handleParseError:", "handleUnkownVariableError:", "handleCompileError:"]
  1838. }),
  1839. $globals.HLToolModel);
  1840. $core.addMethod(
  1841. $core.method({
  1842. selector: "withHelperLabelled:do:",
  1843. protocol: 'private',
  1844. fn: function (aString,aBlock){
  1845. var self=this;
  1846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1847. return $core.withContext(function($ctx1) {
  1848. //>>excludeEnd("ctx");
  1849. var $1,$3,$4,$2,$5;
  1850. $1="#helper"._asJQuery();
  1851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1852. $ctx1.sendIdx["asJQuery"]=1;
  1853. //>>excludeEnd("ctx");
  1854. $recv($1)._remove();
  1855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1856. $ctx1.sendIdx["remove"]=1;
  1857. //>>excludeEnd("ctx");
  1858. $2=(function(html){
  1859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1860. return $core.withContext(function($ctx2) {
  1861. //>>excludeEnd("ctx");
  1862. $3=$recv(html)._div();
  1863. $recv($3)._id_("helper");
  1864. $4=$recv($3)._with_(aString);
  1865. return $4;
  1866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1867. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1868. //>>excludeEnd("ctx");
  1869. });
  1870. $5="body"._asJQuery();
  1871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1872. $ctx1.sendIdx["asJQuery"]=2;
  1873. //>>excludeEnd("ctx");
  1874. $recv($2)._appendToJQuery_($5);
  1875. $recv((function(){
  1876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1877. return $core.withContext(function($ctx2) {
  1878. //>>excludeEnd("ctx");
  1879. $recv(aBlock)._value();
  1880. return $recv("#helper"._asJQuery())._remove();
  1881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1882. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1883. //>>excludeEnd("ctx");
  1884. }))._valueWithTimeout_((10));
  1885. return self;
  1886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1887. }, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},$globals.HLToolModel)});
  1888. //>>excludeEnd("ctx");
  1889. },
  1890. //>>excludeStart("ide", pragmas.excludeIdeData);
  1891. args: ["aString", "aBlock"],
  1892. 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\x0a\x09] \x0a\x09\x09valueWithTimeout: 10",
  1893. referencedClasses: [],
  1894. //>>excludeEnd("ide");
  1895. messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", "valueWithTimeout:", "value"]
  1896. }),
  1897. $globals.HLToolModel);
  1898. $core.addMethod(
  1899. $core.method({
  1900. selector: "on:",
  1901. protocol: 'actions',
  1902. fn: function (anEnvironment){
  1903. var self=this;
  1904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1905. return $core.withContext(function($ctx1) {
  1906. //>>excludeEnd("ctx");
  1907. var $2,$3,$1;
  1908. $2=self._new();
  1909. $recv($2)._environment_(anEnvironment);
  1910. $3=$recv($2)._yourself();
  1911. $1=$3;
  1912. return $1;
  1913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1914. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},$globals.HLToolModel.klass)});
  1915. //>>excludeEnd("ctx");
  1916. },
  1917. //>>excludeStart("ide", pragmas.excludeIdeData);
  1918. args: ["anEnvironment"],
  1919. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1920. referencedClasses: [],
  1921. //>>excludeEnd("ide");
  1922. messageSends: ["environment:", "new", "yourself"]
  1923. }),
  1924. $globals.HLToolModel.klass);
  1925. $core.addClass('HLProgressHandler', $globals.Object, [], 'Helios-Core');
  1926. //>>excludeStart("ide", pragmas.excludeIdeData);
  1927. $globals.HLProgressHandler.comment="I am a specific progress handler for Helios, displaying progresses in a modal window.";
  1928. //>>excludeEnd("ide");
  1929. $core.addMethod(
  1930. $core.method({
  1931. selector: "do:on:displaying:",
  1932. protocol: 'progress handling',
  1933. fn: function (aBlock,aCollection,aString){
  1934. var self=this;
  1935. function $HLProgressWidget(){return $globals.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  1936. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1937. return $core.withContext(function($ctx1) {
  1938. //>>excludeEnd("ctx");
  1939. $recv($recv($HLProgressWidget())._default())._do_on_displaying_(aBlock,aCollection,aString);
  1940. return self;
  1941. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1942. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.HLProgressHandler)});
  1943. //>>excludeEnd("ctx");
  1944. },
  1945. //>>excludeStart("ide", pragmas.excludeIdeData);
  1946. args: ["aBlock", "aCollection", "aString"],
  1947. source: "do: aBlock on: aCollection displaying: aString\x0a\x09HLProgressWidget default\x0a\x09\x09do: aBlock \x0a\x09\x09on: aCollection \x0a\x09\x09displaying: aString",
  1948. referencedClasses: ["HLProgressWidget"],
  1949. //>>excludeEnd("ide");
  1950. messageSends: ["do:on:displaying:", "default"]
  1951. }),
  1952. $globals.HLProgressHandler);
  1953. $core.addClass('HLWidget', $globals.Widget, ['wrapper'], 'Helios-Core');
  1954. //>>excludeStart("ide", pragmas.excludeIdeData);
  1955. $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:`.";
  1956. //>>excludeEnd("ide");
  1957. $core.addMethod(
  1958. $core.method({
  1959. selector: "bindKeyDown:keyUp:",
  1960. protocol: 'keybindings',
  1961. fn: function (keyDownBlock,keyUpBlock){
  1962. var self=this;
  1963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1964. return $core.withContext(function($ctx1) {
  1965. //>>excludeEnd("ctx");
  1966. var $1,$2;
  1967. $1=$recv(self._wrapper())._asJQuery();
  1968. $recv($1)._keydown_(keyDownBlock);
  1969. $2=$recv($1)._keyup_(keyUpBlock);
  1970. return self;
  1971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1972. }, function($ctx1) {$ctx1.fill(self,"bindKeyDown:keyUp:",{keyDownBlock:keyDownBlock,keyUpBlock:keyUpBlock},$globals.HLWidget)});
  1973. //>>excludeEnd("ctx");
  1974. },
  1975. //>>excludeStart("ide", pragmas.excludeIdeData);
  1976. args: ["keyDownBlock", "keyUpBlock"],
  1977. source: "bindKeyDown: keyDownBlock keyUp: keyUpBlock\x0a\x09self wrapper asJQuery\x0a\x09\x09keydown: keyDownBlock;\x0a\x09\x09keyup: keyUpBlock",
  1978. referencedClasses: [],
  1979. //>>excludeEnd("ide");
  1980. messageSends: ["keydown:", "asJQuery", "wrapper", "keyup:"]
  1981. }),
  1982. $globals.HLWidget);
  1983. $core.addMethod(
  1984. $core.method({
  1985. selector: "canHaveFocus",
  1986. protocol: 'testing',
  1987. fn: function (){
  1988. var self=this;
  1989. return false;
  1990. },
  1991. //>>excludeStart("ide", pragmas.excludeIdeData);
  1992. args: [],
  1993. source: "canHaveFocus\x0a\x09^ false",
  1994. referencedClasses: [],
  1995. //>>excludeEnd("ide");
  1996. messageSends: []
  1997. }),
  1998. $globals.HLWidget);
  1999. $core.addMethod(
  2000. $core.method({
  2001. selector: "confirm:ifTrue:",
  2002. protocol: 'actions',
  2003. fn: function (aString,aBlock){
  2004. var self=this;
  2005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2006. return $core.withContext(function($ctx1) {
  2007. //>>excludeEnd("ctx");
  2008. $recv(self._manager())._confirm_ifTrue_(aString,aBlock);
  2009. return self;
  2010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2011. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2012. //>>excludeEnd("ctx");
  2013. },
  2014. //>>excludeStart("ide", pragmas.excludeIdeData);
  2015. args: ["aString", "aBlock"],
  2016. source: "confirm: aString ifTrue: aBlock\x0a\x09self manager confirm: aString ifTrue: aBlock",
  2017. referencedClasses: [],
  2018. //>>excludeEnd("ide");
  2019. messageSends: ["confirm:ifTrue:", "manager"]
  2020. }),
  2021. $globals.HLWidget);
  2022. $core.addMethod(
  2023. $core.method({
  2024. selector: "confirm:ifTrue:ifFalse:",
  2025. protocol: 'actions',
  2026. fn: function (aString,aBlock,anotherBlock){
  2027. var self=this;
  2028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2029. return $core.withContext(function($ctx1) {
  2030. //>>excludeEnd("ctx");
  2031. $recv(self._manager())._confirm_ifTrue_ifFalse_(aString,aBlock,anotherBlock);
  2032. return self;
  2033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2034. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLWidget)});
  2035. //>>excludeEnd("ctx");
  2036. },
  2037. //>>excludeStart("ide", pragmas.excludeIdeData);
  2038. args: ["aString", "aBlock", "anotherBlock"],
  2039. source: "confirm: aString ifTrue: aBlock ifFalse: anotherBlock\x0a\x09self manager \x0a\x09\x09confirm: aString \x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: anotherBlock",
  2040. referencedClasses: [],
  2041. //>>excludeEnd("ide");
  2042. messageSends: ["confirm:ifTrue:ifFalse:", "manager"]
  2043. }),
  2044. $globals.HLWidget);
  2045. $core.addMethod(
  2046. $core.method({
  2047. selector: "cssClass",
  2048. protocol: 'accessing',
  2049. fn: function (){
  2050. var self=this;
  2051. return "hl_widget";
  2052. },
  2053. //>>excludeStart("ide", pragmas.excludeIdeData);
  2054. args: [],
  2055. source: "cssClass\x0a\x09^ 'hl_widget'",
  2056. referencedClasses: [],
  2057. //>>excludeEnd("ide");
  2058. messageSends: []
  2059. }),
  2060. $globals.HLWidget);
  2061. $core.addMethod(
  2062. $core.method({
  2063. selector: "defaultTabLabel",
  2064. protocol: 'defaults',
  2065. fn: function (){
  2066. var self=this;
  2067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2068. return $core.withContext(function($ctx1) {
  2069. //>>excludeEnd("ctx");
  2070. var $1;
  2071. $1=$recv(self._class())._tabLabel();
  2072. return $1;
  2073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2074. }, function($ctx1) {$ctx1.fill(self,"defaultTabLabel",{},$globals.HLWidget)});
  2075. //>>excludeEnd("ctx");
  2076. },
  2077. //>>excludeStart("ide", pragmas.excludeIdeData);
  2078. args: [],
  2079. source: "defaultTabLabel\x0a\x09^ self class tabLabel",
  2080. referencedClasses: [],
  2081. //>>excludeEnd("ide");
  2082. messageSends: ["tabLabel", "class"]
  2083. }),
  2084. $globals.HLWidget);
  2085. $core.addMethod(
  2086. $core.method({
  2087. selector: "execute:",
  2088. protocol: 'actions',
  2089. fn: function (aCommand){
  2090. var self=this;
  2091. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  2092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2093. return $core.withContext(function($ctx1) {
  2094. //>>excludeEnd("ctx");
  2095. var $1,$2;
  2096. $1=$recv($recv($HLManager())._current())._keyBinder();
  2097. $recv($1)._activate();
  2098. $2=$recv($1)._applyBinding_($recv(aCommand)._asBinding());
  2099. return self;
  2100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2101. }, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},$globals.HLWidget)});
  2102. //>>excludeEnd("ctx");
  2103. },
  2104. //>>excludeStart("ide", pragmas.excludeIdeData);
  2105. args: ["aCommand"],
  2106. source: "execute: aCommand\x0a\x09HLManager current keyBinder\x0a\x09\x09activate;\x0a\x09\x09applyBinding: aCommand asBinding",
  2107. referencedClasses: ["HLManager"],
  2108. //>>excludeEnd("ide");
  2109. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"]
  2110. }),
  2111. $globals.HLWidget);
  2112. $core.addMethod(
  2113. $core.method({
  2114. selector: "inform:",
  2115. protocol: 'actions',
  2116. fn: function (aString){
  2117. var self=this;
  2118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2119. return $core.withContext(function($ctx1) {
  2120. //>>excludeEnd("ctx");
  2121. $recv(self._manager())._inform_(aString);
  2122. return self;
  2123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2124. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLWidget)});
  2125. //>>excludeEnd("ctx");
  2126. },
  2127. //>>excludeStart("ide", pragmas.excludeIdeData);
  2128. args: ["aString"],
  2129. source: "inform: aString\x0a\x09self manager inform: aString",
  2130. referencedClasses: [],
  2131. //>>excludeEnd("ide");
  2132. messageSends: ["inform:", "manager"]
  2133. }),
  2134. $globals.HLWidget);
  2135. $core.addMethod(
  2136. $core.method({
  2137. selector: "manager",
  2138. protocol: 'accessing',
  2139. fn: function (){
  2140. var self=this;
  2141. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  2142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2143. return $core.withContext(function($ctx1) {
  2144. //>>excludeEnd("ctx");
  2145. var $1;
  2146. $1=$recv($HLManager())._current();
  2147. return $1;
  2148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2149. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLWidget)});
  2150. //>>excludeEnd("ctx");
  2151. },
  2152. //>>excludeStart("ide", pragmas.excludeIdeData);
  2153. args: [],
  2154. source: "manager\x0a\x09^ HLManager current",
  2155. referencedClasses: ["HLManager"],
  2156. //>>excludeEnd("ide");
  2157. messageSends: ["current"]
  2158. }),
  2159. $globals.HLWidget);
  2160. $core.addMethod(
  2161. $core.method({
  2162. selector: "openAsTab",
  2163. protocol: 'actions',
  2164. fn: function (){
  2165. var self=this;
  2166. function $HLTabWidget(){return $globals.HLTabWidget||(typeof HLTabWidget=="undefined"?nil:HLTabWidget)}
  2167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2168. return $core.withContext(function($ctx1) {
  2169. //>>excludeEnd("ctx");
  2170. $recv($recv($HLTabWidget())._on_labelled_(self,self._defaultTabLabel()))._add();
  2171. return self;
  2172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2173. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{},$globals.HLWidget)});
  2174. //>>excludeEnd("ctx");
  2175. },
  2176. //>>excludeStart("ide", pragmas.excludeIdeData);
  2177. args: [],
  2178. source: "openAsTab\x0a\x09(HLTabWidget on: self labelled: self defaultTabLabel)\x0a\x09\x09add",
  2179. referencedClasses: ["HLTabWidget"],
  2180. //>>excludeEnd("ide");
  2181. messageSends: ["add", "on:labelled:", "defaultTabLabel"]
  2182. }),
  2183. $globals.HLWidget);
  2184. $core.addMethod(
  2185. $core.method({
  2186. selector: "refresh",
  2187. protocol: 'updating',
  2188. fn: function (){
  2189. var self=this;
  2190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2191. return $core.withContext(function($ctx1) {
  2192. //>>excludeEnd("ctx");
  2193. var $1,$3,$2,$receiver;
  2194. $1=self._wrapper();
  2195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2196. $ctx1.sendIdx["wrapper"]=1;
  2197. //>>excludeEnd("ctx");
  2198. if(($receiver = $1) == null || $receiver.isNil){
  2199. return self;
  2200. } else {
  2201. $1;
  2202. };
  2203. $3=self._wrapper();
  2204. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2205. $ctx1.sendIdx["wrapper"]=2;
  2206. //>>excludeEnd("ctx");
  2207. $2=$recv($3)._asJQuery();
  2208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2209. $ctx1.sendIdx["asJQuery"]=1;
  2210. //>>excludeEnd("ctx");
  2211. $recv($2)._empty();
  2212. $recv((function(html){
  2213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2214. return $core.withContext(function($ctx2) {
  2215. //>>excludeEnd("ctx");
  2216. return self._renderContentOn_(html);
  2217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2218. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)});
  2219. //>>excludeEnd("ctx");
  2220. }))._appendToJQuery_($recv(self._wrapper())._asJQuery());
  2221. return self;
  2222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2223. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLWidget)});
  2224. //>>excludeEnd("ctx");
  2225. },
  2226. //>>excludeStart("ide", pragmas.excludeIdeData);
  2227. args: [],
  2228. source: "refresh\x0a\x09self wrapper ifNil: [ ^ self ].\x0a \x0a\x09self wrapper asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery",
  2229. referencedClasses: [],
  2230. //>>excludeEnd("ide");
  2231. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"]
  2232. }),
  2233. $globals.HLWidget);
  2234. $core.addMethod(
  2235. $core.method({
  2236. selector: "registerBindings",
  2237. protocol: 'keybindings',
  2238. fn: function (){
  2239. var self=this;
  2240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2241. return $core.withContext(function($ctx1) {
  2242. //>>excludeEnd("ctx");
  2243. self._registerBindingsOn_($recv($recv(self._manager())._keyBinder())._bindings());
  2244. return self;
  2245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2246. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLWidget)});
  2247. //>>excludeEnd("ctx");
  2248. },
  2249. //>>excludeStart("ide", pragmas.excludeIdeData);
  2250. args: [],
  2251. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  2252. referencedClasses: [],
  2253. //>>excludeEnd("ide");
  2254. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]
  2255. }),
  2256. $globals.HLWidget);
  2257. $core.addMethod(
  2258. $core.method({
  2259. selector: "registerBindingsOn:",
  2260. protocol: 'keybindings',
  2261. fn: function (aBindingGroup){
  2262. var self=this;
  2263. return self;
  2264. },
  2265. //>>excludeStart("ide", pragmas.excludeIdeData);
  2266. args: ["aBindingGroup"],
  2267. source: "registerBindingsOn: aBindingGroup",
  2268. referencedClasses: [],
  2269. //>>excludeEnd("ide");
  2270. messageSends: []
  2271. }),
  2272. $globals.HLWidget);
  2273. $core.addMethod(
  2274. $core.method({
  2275. selector: "removeTab",
  2276. protocol: 'accessing',
  2277. fn: function (){
  2278. var self=this;
  2279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2280. return $core.withContext(function($ctx1) {
  2281. //>>excludeEnd("ctx");
  2282. $recv(self._manager())._removeTabForWidget_(self);
  2283. return self;
  2284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2285. }, function($ctx1) {$ctx1.fill(self,"removeTab",{},$globals.HLWidget)});
  2286. //>>excludeEnd("ctx");
  2287. },
  2288. //>>excludeStart("ide", pragmas.excludeIdeData);
  2289. args: [],
  2290. source: "removeTab\x0a\x09self manager removeTabForWidget: self",
  2291. referencedClasses: [],
  2292. //>>excludeEnd("ide");
  2293. messageSends: ["removeTabForWidget:", "manager"]
  2294. }),
  2295. $globals.HLWidget);
  2296. $core.addMethod(
  2297. $core.method({
  2298. selector: "renderContentOn:",
  2299. protocol: 'rendering',
  2300. fn: function (html){
  2301. var self=this;
  2302. return self;
  2303. },
  2304. //>>excludeStart("ide", pragmas.excludeIdeData);
  2305. args: ["html"],
  2306. source: "renderContentOn: html",
  2307. referencedClasses: [],
  2308. //>>excludeEnd("ide");
  2309. messageSends: []
  2310. }),
  2311. $globals.HLWidget);
  2312. $core.addMethod(
  2313. $core.method({
  2314. selector: "renderOn:",
  2315. protocol: 'rendering',
  2316. fn: function (html){
  2317. var self=this;
  2318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2319. return $core.withContext(function($ctx1) {
  2320. //>>excludeEnd("ctx");
  2321. var $1,$2;
  2322. $1=$recv(html)._div();
  2323. $recv($1)._class_(self._cssClass());
  2324. $2=$recv($1)._yourself();
  2325. self["@wrapper"]=$2;
  2326. $recv((function(renderer){
  2327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2328. return $core.withContext(function($ctx2) {
  2329. //>>excludeEnd("ctx");
  2330. return self._renderContentOn_(renderer);
  2331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2332. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1,1)});
  2333. //>>excludeEnd("ctx");
  2334. }))._appendToJQuery_($recv(self["@wrapper"])._asJQuery());
  2335. return self;
  2336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2337. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLWidget)});
  2338. //>>excludeEnd("ctx");
  2339. },
  2340. //>>excludeStart("ide", pragmas.excludeIdeData);
  2341. args: ["html"],
  2342. source: "renderOn: html\x0a\x09wrapper := html div\x0a\x09\x09class: self cssClass;\x0a\x09\x09yourself.\x0a [ :renderer | self renderContentOn: renderer ] appendToJQuery: wrapper asJQuery",
  2343. referencedClasses: [],
  2344. //>>excludeEnd("ide");
  2345. messageSends: ["class:", "div", "cssClass", "yourself", "appendToJQuery:", "renderContentOn:", "asJQuery"]
  2346. }),
  2347. $globals.HLWidget);
  2348. $core.addMethod(
  2349. $core.method({
  2350. selector: "request:do:",
  2351. protocol: 'actions',
  2352. fn: function (aString,aBlock){
  2353. var self=this;
  2354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2355. return $core.withContext(function($ctx1) {
  2356. //>>excludeEnd("ctx");
  2357. $recv(self._manager())._request_do_(aString,aBlock);
  2358. return self;
  2359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2360. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2361. //>>excludeEnd("ctx");
  2362. },
  2363. //>>excludeStart("ide", pragmas.excludeIdeData);
  2364. args: ["aString", "aBlock"],
  2365. source: "request: aString do: aBlock\x0a\x09self manager request: aString do: aBlock",
  2366. referencedClasses: [],
  2367. //>>excludeEnd("ide");
  2368. messageSends: ["request:do:", "manager"]
  2369. }),
  2370. $globals.HLWidget);
  2371. $core.addMethod(
  2372. $core.method({
  2373. selector: "request:value:do:",
  2374. protocol: 'actions',
  2375. fn: function (aString,valueString,aBlock){
  2376. var self=this;
  2377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2378. return $core.withContext(function($ctx1) {
  2379. //>>excludeEnd("ctx");
  2380. $recv(self._manager())._request_value_do_(aString,valueString,aBlock);
  2381. return self;
  2382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2383. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLWidget)});
  2384. //>>excludeEnd("ctx");
  2385. },
  2386. //>>excludeStart("ide", pragmas.excludeIdeData);
  2387. args: ["aString", "valueString", "aBlock"],
  2388. source: "request: aString value: valueString do: aBlock\x0a\x09self manager \x0a\x09\x09request: aString \x0a\x09\x09value: valueString\x0a\x09\x09do: aBlock",
  2389. referencedClasses: [],
  2390. //>>excludeEnd("ide");
  2391. messageSends: ["request:value:do:", "manager"]
  2392. }),
  2393. $globals.HLWidget);
  2394. $core.addMethod(
  2395. $core.method({
  2396. selector: "setTabLabel:",
  2397. protocol: 'accessing',
  2398. fn: function (aString){
  2399. var self=this;
  2400. function $HLTabLabelChanged(){return $globals.HLTabLabelChanged||(typeof HLTabLabelChanged=="undefined"?nil:HLTabLabelChanged)}
  2401. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2402. return $core.withContext(function($ctx1) {
  2403. //>>excludeEnd("ctx");
  2404. var $1,$2;
  2405. $1=$recv($HLTabLabelChanged())._new();
  2406. $recv($1)._widget_(self);
  2407. $recv($1)._label_(aString);
  2408. $2=$recv($1)._yourself();
  2409. $recv($recv(self._manager())._announcer())._announce_($2);
  2410. return self;
  2411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2412. }, function($ctx1) {$ctx1.fill(self,"setTabLabel:",{aString:aString},$globals.HLWidget)});
  2413. //>>excludeEnd("ctx");
  2414. },
  2415. //>>excludeStart("ide", pragmas.excludeIdeData);
  2416. args: ["aString"],
  2417. source: "setTabLabel: aString\x0a\x09self manager announcer announce: (HLTabLabelChanged new\x0a\x09\x09widget: self;\x0a\x09\x09label: aString;\x0a\x09\x09yourself)",
  2418. referencedClasses: ["HLTabLabelChanged"],
  2419. //>>excludeEnd("ide");
  2420. messageSends: ["announce:", "announcer", "manager", "widget:", "new", "label:", "yourself"]
  2421. }),
  2422. $globals.HLWidget);
  2423. $core.addMethod(
  2424. $core.method({
  2425. selector: "tabClass",
  2426. protocol: 'accessing',
  2427. fn: function (){
  2428. var self=this;
  2429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2430. return $core.withContext(function($ctx1) {
  2431. //>>excludeEnd("ctx");
  2432. var $1;
  2433. $1=$recv(self._class())._tabClass();
  2434. return $1;
  2435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2436. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},$globals.HLWidget)});
  2437. //>>excludeEnd("ctx");
  2438. },
  2439. //>>excludeStart("ide", pragmas.excludeIdeData);
  2440. args: [],
  2441. source: "tabClass\x0a\x09^ self class tabClass",
  2442. referencedClasses: [],
  2443. //>>excludeEnd("ide");
  2444. messageSends: ["tabClass", "class"]
  2445. }),
  2446. $globals.HLWidget);
  2447. $core.addMethod(
  2448. $core.method({
  2449. selector: "unbindKeyDownKeyUp",
  2450. protocol: 'keybindings',
  2451. fn: function (){
  2452. var self=this;
  2453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2454. return $core.withContext(function($ctx1) {
  2455. //>>excludeEnd("ctx");
  2456. var $1,$2;
  2457. $1=$recv(self._wrapper())._asJQuery();
  2458. $recv($1)._unbind_("keydown");
  2459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2460. $ctx1.sendIdx["unbind:"]=1;
  2461. //>>excludeEnd("ctx");
  2462. $2=$recv($1)._unbind_("keyup");
  2463. return self;
  2464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2465. }, function($ctx1) {$ctx1.fill(self,"unbindKeyDownKeyUp",{},$globals.HLWidget)});
  2466. //>>excludeEnd("ctx");
  2467. },
  2468. //>>excludeStart("ide", pragmas.excludeIdeData);
  2469. args: [],
  2470. source: "unbindKeyDownKeyUp\x0a\x09self wrapper asJQuery\x0a\x09\x09unbind: 'keydown';\x0a\x09\x09unbind: 'keyup'",
  2471. referencedClasses: [],
  2472. //>>excludeEnd("ide");
  2473. messageSends: ["unbind:", "asJQuery", "wrapper"]
  2474. }),
  2475. $globals.HLWidget);
  2476. $core.addMethod(
  2477. $core.method({
  2478. selector: "unregister",
  2479. protocol: 'actions',
  2480. fn: function (){
  2481. var self=this;
  2482. return self;
  2483. },
  2484. //>>excludeStart("ide", pragmas.excludeIdeData);
  2485. args: [],
  2486. 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",
  2487. referencedClasses: [],
  2488. //>>excludeEnd("ide");
  2489. messageSends: []
  2490. }),
  2491. $globals.HLWidget);
  2492. $core.addMethod(
  2493. $core.method({
  2494. selector: "wrapper",
  2495. protocol: 'accessing',
  2496. fn: function (){
  2497. var self=this;
  2498. var $1;
  2499. $1=self["@wrapper"];
  2500. return $1;
  2501. },
  2502. //>>excludeStart("ide", pragmas.excludeIdeData);
  2503. args: [],
  2504. source: "wrapper\x0a\x09^ wrapper",
  2505. referencedClasses: [],
  2506. //>>excludeEnd("ide");
  2507. messageSends: []
  2508. }),
  2509. $globals.HLWidget);
  2510. $core.addMethod(
  2511. $core.method({
  2512. selector: "canBeOpenAsTab",
  2513. protocol: 'testing',
  2514. fn: function (){
  2515. var self=this;
  2516. return false;
  2517. },
  2518. //>>excludeStart("ide", pragmas.excludeIdeData);
  2519. args: [],
  2520. source: "canBeOpenAsTab\x0a\x09^ false",
  2521. referencedClasses: [],
  2522. //>>excludeEnd("ide");
  2523. messageSends: []
  2524. }),
  2525. $globals.HLWidget.klass);
  2526. $core.addMethod(
  2527. $core.method({
  2528. selector: "openAsTab",
  2529. protocol: 'accessing',
  2530. fn: function (){
  2531. var self=this;
  2532. var instance;
  2533. function $HLTabWidget(){return $globals.HLTabWidget||(typeof HLTabWidget=="undefined"?nil:HLTabWidget)}
  2534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2535. return $core.withContext(function($ctx1) {
  2536. //>>excludeEnd("ctx");
  2537. var $1;
  2538. instance=self._new();
  2539. $recv($recv($HLTabWidget())._on_labelled_(instance,$recv(instance)._defaultTabLabel()))._add();
  2540. $1=instance;
  2541. return $1;
  2542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2543. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{instance:instance},$globals.HLWidget.klass)});
  2544. //>>excludeEnd("ctx");
  2545. },
  2546. //>>excludeStart("ide", pragmas.excludeIdeData);
  2547. args: [],
  2548. 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",
  2549. referencedClasses: ["HLTabWidget"],
  2550. //>>excludeEnd("ide");
  2551. messageSends: ["new", "add", "on:labelled:", "defaultTabLabel"]
  2552. }),
  2553. $globals.HLWidget.klass);
  2554. $core.addMethod(
  2555. $core.method({
  2556. selector: "tabClass",
  2557. protocol: 'accessing',
  2558. fn: function (){
  2559. var self=this;
  2560. return "";
  2561. },
  2562. //>>excludeStart("ide", pragmas.excludeIdeData);
  2563. args: [],
  2564. source: "tabClass\x0a\x09^ ''",
  2565. referencedClasses: [],
  2566. //>>excludeEnd("ide");
  2567. messageSends: []
  2568. }),
  2569. $globals.HLWidget.klass);
  2570. $core.addMethod(
  2571. $core.method({
  2572. selector: "tabLabel",
  2573. protocol: 'accessing',
  2574. fn: function (){
  2575. var self=this;
  2576. return "Tab";
  2577. },
  2578. //>>excludeStart("ide", pragmas.excludeIdeData);
  2579. args: [],
  2580. source: "tabLabel\x0a\x09^ 'Tab'",
  2581. referencedClasses: [],
  2582. //>>excludeEnd("ide");
  2583. messageSends: []
  2584. }),
  2585. $globals.HLWidget.klass);
  2586. $core.addMethod(
  2587. $core.method({
  2588. selector: "tabPriority",
  2589. protocol: 'accessing',
  2590. fn: function (){
  2591. var self=this;
  2592. return (500);
  2593. },
  2594. //>>excludeStart("ide", pragmas.excludeIdeData);
  2595. args: [],
  2596. source: "tabPriority\x0a\x09^ 500",
  2597. referencedClasses: [],
  2598. //>>excludeEnd("ide");
  2599. messageSends: []
  2600. }),
  2601. $globals.HLWidget.klass);
  2602. $core.addClass('HLFocusableWidget', $globals.HLWidget, [], 'Helios-Core');
  2603. //>>excludeStart("ide", pragmas.excludeIdeData);
  2604. $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.";
  2605. //>>excludeEnd("ide");
  2606. $core.addMethod(
  2607. $core.method({
  2608. selector: "blur",
  2609. protocol: 'events',
  2610. fn: function (){
  2611. var self=this;
  2612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2613. return $core.withContext(function($ctx1) {
  2614. //>>excludeEnd("ctx");
  2615. $recv($recv(self._wrapper())._asJQuery())._blur();
  2616. return self;
  2617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2618. }, function($ctx1) {$ctx1.fill(self,"blur",{},$globals.HLFocusableWidget)});
  2619. //>>excludeEnd("ctx");
  2620. },
  2621. //>>excludeStart("ide", pragmas.excludeIdeData);
  2622. args: [],
  2623. source: "blur\x0a\x09self wrapper asJQuery blur",
  2624. referencedClasses: [],
  2625. //>>excludeEnd("ide");
  2626. messageSends: ["blur", "asJQuery", "wrapper"]
  2627. }),
  2628. $globals.HLFocusableWidget);
  2629. $core.addMethod(
  2630. $core.method({
  2631. selector: "canHaveFocus",
  2632. protocol: 'testing',
  2633. fn: function (){
  2634. var self=this;
  2635. return true;
  2636. },
  2637. //>>excludeStart("ide", pragmas.excludeIdeData);
  2638. args: [],
  2639. source: "canHaveFocus\x0a\x09^ true",
  2640. referencedClasses: [],
  2641. //>>excludeEnd("ide");
  2642. messageSends: []
  2643. }),
  2644. $globals.HLFocusableWidget);
  2645. $core.addMethod(
  2646. $core.method({
  2647. selector: "focus",
  2648. protocol: 'events',
  2649. fn: function (){
  2650. var self=this;
  2651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2652. return $core.withContext(function($ctx1) {
  2653. //>>excludeEnd("ctx");
  2654. $recv($recv(self._wrapper())._asJQuery())._focus();
  2655. return self;
  2656. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2657. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLFocusableWidget)});
  2658. //>>excludeEnd("ctx");
  2659. },
  2660. //>>excludeStart("ide", pragmas.excludeIdeData);
  2661. args: [],
  2662. source: "focus\x0a\x09self wrapper asJQuery focus",
  2663. referencedClasses: [],
  2664. //>>excludeEnd("ide");
  2665. messageSends: ["focus", "asJQuery", "wrapper"]
  2666. }),
  2667. $globals.HLFocusableWidget);
  2668. $core.addMethod(
  2669. $core.method({
  2670. selector: "focusClass",
  2671. protocol: 'accessing',
  2672. fn: function (){
  2673. var self=this;
  2674. return "focused";
  2675. },
  2676. //>>excludeStart("ide", pragmas.excludeIdeData);
  2677. args: [],
  2678. source: "focusClass\x0a\x09^ 'focused'",
  2679. referencedClasses: [],
  2680. //>>excludeEnd("ide");
  2681. messageSends: []
  2682. }),
  2683. $globals.HLFocusableWidget);
  2684. $core.addMethod(
  2685. $core.method({
  2686. selector: "hasFocus",
  2687. protocol: 'testing',
  2688. fn: function (){
  2689. var self=this;
  2690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2691. return $core.withContext(function($ctx1) {
  2692. //>>excludeEnd("ctx");
  2693. var $3,$2,$1;
  2694. $3=self._wrapper();
  2695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2696. $ctx1.sendIdx["wrapper"]=1;
  2697. //>>excludeEnd("ctx");
  2698. $2=$recv($3)._notNil();
  2699. $1=$recv($2)._and_((function(){
  2700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2701. return $core.withContext(function($ctx2) {
  2702. //>>excludeEnd("ctx");
  2703. return $recv($recv(self._wrapper())._asJQuery())._hasClass_(self._focusClass());
  2704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2705. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2706. //>>excludeEnd("ctx");
  2707. }));
  2708. return $1;
  2709. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2710. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},$globals.HLFocusableWidget)});
  2711. //>>excludeEnd("ctx");
  2712. },
  2713. //>>excludeStart("ide", pragmas.excludeIdeData);
  2714. args: [],
  2715. source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]",
  2716. referencedClasses: [],
  2717. //>>excludeEnd("ide");
  2718. messageSends: ["and:", "notNil", "wrapper", "hasClass:", "asJQuery", "focusClass"]
  2719. }),
  2720. $globals.HLFocusableWidget);
  2721. $core.addMethod(
  2722. $core.method({
  2723. selector: "renderContentOn:",
  2724. protocol: 'rendering',
  2725. fn: function (html){
  2726. var self=this;
  2727. return self;
  2728. },
  2729. //>>excludeStart("ide", pragmas.excludeIdeData);
  2730. args: ["html"],
  2731. source: "renderContentOn: html",
  2732. referencedClasses: [],
  2733. //>>excludeEnd("ide");
  2734. messageSends: []
  2735. }),
  2736. $globals.HLFocusableWidget);
  2737. $core.addMethod(
  2738. $core.method({
  2739. selector: "renderOn:",
  2740. protocol: 'rendering',
  2741. fn: function (html){
  2742. var self=this;
  2743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2744. return $core.withContext(function($ctx1) {
  2745. //>>excludeEnd("ctx");
  2746. var $1,$2,$3,$5,$4,$6,$7;
  2747. $1=$recv(html)._div();
  2748. $recv($1)._class_(self._cssClass());
  2749. $2=$recv($1)._yourself();
  2750. self["@wrapper"]=$2;
  2751. $recv(self["@wrapper"])._with_((function(){
  2752. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2753. return $core.withContext(function($ctx2) {
  2754. //>>excludeEnd("ctx");
  2755. return self._renderContentOn_(html);
  2756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2757. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2758. //>>excludeEnd("ctx");
  2759. }));
  2760. $3=self["@wrapper"];
  2761. $recv($3)._at_put_("tabindex","0");
  2762. $recv($3)._onBlur_((function(){
  2763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2764. return $core.withContext(function($ctx2) {
  2765. //>>excludeEnd("ctx");
  2766. $5=self._wrapper();
  2767. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2768. $ctx2.sendIdx["wrapper"]=1;
  2769. //>>excludeEnd("ctx");
  2770. $4=$recv($5)._asJQuery();
  2771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2772. $ctx2.sendIdx["asJQuery"]=1;
  2773. //>>excludeEnd("ctx");
  2774. $6=self._focusClass();
  2775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2776. $ctx2.sendIdx["focusClass"]=1;
  2777. //>>excludeEnd("ctx");
  2778. return $recv($4)._removeClass_($6);
  2779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2780. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  2781. //>>excludeEnd("ctx");
  2782. }));
  2783. $7=$recv($3)._onFocus_((function(){
  2784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2785. return $core.withContext(function($ctx2) {
  2786. //>>excludeEnd("ctx");
  2787. return $recv($recv(self._wrapper())._asJQuery())._addClass_(self._focusClass());
  2788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2789. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  2790. //>>excludeEnd("ctx");
  2791. }));
  2792. return self;
  2793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2794. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLFocusableWidget)});
  2795. //>>excludeEnd("ctx");
  2796. },
  2797. //>>excludeStart("ide", pragmas.excludeIdeData);
  2798. args: ["html"],
  2799. source: "renderOn: html\x0a wrapper := html div \x0a \x09class: self cssClass;\x0a\x09\x09yourself.\x0a\x09\x09\x0a wrapper with: [ self renderContentOn: html ].\x0a\x09\x0a\x09wrapper\x0a\x09\x09at: 'tabindex' put: '0';\x0a\x09\x09onBlur: [ self wrapper asJQuery removeClass: self focusClass ];\x0a onFocus: [ self wrapper asJQuery addClass: self focusClass ]",
  2800. referencedClasses: [],
  2801. //>>excludeEnd("ide");
  2802. messageSends: ["class:", "div", "cssClass", "yourself", "with:", "renderContentOn:", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:"]
  2803. }),
  2804. $globals.HLFocusableWidget);
  2805. $core.addClass('HLListWidget', $globals.HLFocusableWidget, ['items', 'selectedItem'], 'Helios-Core');
  2806. $core.addMethod(
  2807. $core.method({
  2808. selector: "activateFirstListItem",
  2809. protocol: 'actions',
  2810. fn: function (){
  2811. var self=this;
  2812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2813. return $core.withContext(function($ctx1) {
  2814. //>>excludeEnd("ctx");
  2815. self._activateListItem_($recv($recv($recv(self["@wrapper"])._asJQuery())._find_("li.inactive"))._eq_((0)));
  2816. return self;
  2817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2818. }, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},$globals.HLListWidget)});
  2819. //>>excludeEnd("ctx");
  2820. },
  2821. //>>excludeStart("ide", pragmas.excludeIdeData);
  2822. args: [],
  2823. source: "activateFirstListItem\x0a\x09self activateListItem: ((wrapper asJQuery find: 'li.inactive') eq: 0)",
  2824. referencedClasses: [],
  2825. //>>excludeEnd("ide");
  2826. messageSends: ["activateListItem:", "eq:", "find:", "asJQuery"]
  2827. }),
  2828. $globals.HLListWidget);
  2829. $core.addMethod(
  2830. $core.method({
  2831. selector: "activateItem:",
  2832. protocol: 'actions',
  2833. fn: function (anObject){
  2834. var self=this;
  2835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2836. return $core.withContext(function($ctx1) {
  2837. //>>excludeEnd("ctx");
  2838. self._activateListItem_(self._findListItemFor_(anObject));
  2839. return self;
  2840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2841. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},$globals.HLListWidget)});
  2842. //>>excludeEnd("ctx");
  2843. },
  2844. //>>excludeStart("ide", pragmas.excludeIdeData);
  2845. args: ["anObject"],
  2846. source: "activateItem: anObject\x0a\x09self activateListItem: (self findListItemFor: anObject)",
  2847. referencedClasses: [],
  2848. //>>excludeEnd("ide");
  2849. messageSends: ["activateListItem:", "findListItemFor:"]
  2850. }),
  2851. $globals.HLListWidget);
  2852. $core.addMethod(
  2853. $core.method({
  2854. selector: "activateListItem:",
  2855. protocol: 'actions',
  2856. fn: function (aListItem){
  2857. var self=this;
  2858. var item;
  2859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2860. return $core.withContext(function($ctx1) {
  2861. //>>excludeEnd("ctx");
  2862. var $1,$2,$3,$4,$receiver;
  2863. $1=$recv(aListItem)._get_((0));
  2864. if(($receiver = $1) == null || $receiver.isNil){
  2865. return self;
  2866. } else {
  2867. $1;
  2868. };
  2869. $2=$recv($recv(aListItem)._parent())._children();
  2870. $3=self._activeItemCssClass();
  2871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2872. $ctx1.sendIdx["activeItemCssClass"]=1;
  2873. //>>excludeEnd("ctx");
  2874. $recv($2)._removeClass_($3);
  2875. $recv(aListItem)._addClass_(self._activeItemCssClass());
  2876. self._ensureVisible_(aListItem);
  2877. item=$recv(aListItem)._data_("item");
  2878. $4=$recv(self._selectedItem()).__eq_eq(item);
  2879. if(!$core.assert($4)){
  2880. self._selectItem_(item);
  2881. };
  2882. return self;
  2883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2884. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},$globals.HLListWidget)});
  2885. //>>excludeEnd("ctx");
  2886. },
  2887. //>>excludeStart("ide", pragmas.excludeIdeData);
  2888. args: ["aListItem"],
  2889. 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 ]",
  2890. referencedClasses: [],
  2891. //>>excludeEnd("ide");
  2892. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "activeItemCssClass", "addClass:", "ensureVisible:", "data:", "ifFalse:", "==", "selectedItem", "selectItem:"]
  2893. }),
  2894. $globals.HLListWidget);
  2895. $core.addMethod(
  2896. $core.method({
  2897. selector: "activateNextListItem",
  2898. protocol: 'actions',
  2899. fn: function (){
  2900. var self=this;
  2901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2902. return $core.withContext(function($ctx1) {
  2903. //>>excludeEnd("ctx");
  2904. var $4,$3,$6,$5,$2,$1;
  2905. $4=self._wrapper();
  2906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2907. $ctx1.sendIdx["wrapper"]=1;
  2908. //>>excludeEnd("ctx");
  2909. $3=$recv($4)._asJQuery();
  2910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2911. $ctx1.sendIdx["asJQuery"]=1;
  2912. //>>excludeEnd("ctx");
  2913. $6=self._activeItemCssClass();
  2914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2915. $ctx1.sendIdx["activeItemCssClass"]=1;
  2916. //>>excludeEnd("ctx");
  2917. $5="li.".__comma($6);
  2918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2919. $ctx1.sendIdx[","]=1;
  2920. //>>excludeEnd("ctx");
  2921. $2=$recv($3)._find_($5);
  2922. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2923. $ctx1.sendIdx["find:"]=1;
  2924. //>>excludeEnd("ctx");
  2925. $1=$recv($2)._next();
  2926. self._activateListItem_($1);
  2927. $recv($recv($recv($recv(self._wrapper())._asJQuery())._find_(" .".__comma(self._activeItemCssClass())))._get())._ifEmpty_((function(){
  2928. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2929. return $core.withContext(function($ctx2) {
  2930. //>>excludeEnd("ctx");
  2931. return self._activateFirstListItem();
  2932. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2933. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2934. //>>excludeEnd("ctx");
  2935. }));
  2936. return self;
  2937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2938. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLListWidget)});
  2939. //>>excludeEnd("ctx");
  2940. },
  2941. //>>excludeStart("ide", pragmas.excludeIdeData);
  2942. args: [],
  2943. 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 ]",
  2944. referencedClasses: [],
  2945. //>>excludeEnd("ide");
  2946. messageSends: ["activateListItem:", "next", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass", "ifEmpty:", "get", "activateFirstListItem"]
  2947. }),
  2948. $globals.HLListWidget);
  2949. $core.addMethod(
  2950. $core.method({
  2951. selector: "activatePreviousListItem",
  2952. protocol: 'actions',
  2953. fn: function (){
  2954. var self=this;
  2955. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2956. return $core.withContext(function($ctx1) {
  2957. //>>excludeEnd("ctx");
  2958. self._activateListItem_($recv($recv($recv(self._wrapper())._asJQuery())._find_("li.".__comma(self._activeItemCssClass())))._prev());
  2959. return self;
  2960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2961. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLListWidget)});
  2962. //>>excludeEnd("ctx");
  2963. },
  2964. //>>excludeStart("ide", pragmas.excludeIdeData);
  2965. args: [],
  2966. source: "activatePreviousListItem\x0a\x09self activateListItem: (self wrapper asJQuery find: ('li.', self activeItemCssClass)) prev",
  2967. referencedClasses: [],
  2968. //>>excludeEnd("ide");
  2969. messageSends: ["activateListItem:", "prev", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass"]
  2970. }),
  2971. $globals.HLListWidget);
  2972. $core.addMethod(
  2973. $core.method({
  2974. selector: "activeItemCssClass",
  2975. protocol: 'accessing',
  2976. fn: function (){
  2977. var self=this;
  2978. return "active";
  2979. },
  2980. //>>excludeStart("ide", pragmas.excludeIdeData);
  2981. args: [],
  2982. source: "activeItemCssClass\x0a\x09^'active'",
  2983. referencedClasses: [],
  2984. //>>excludeEnd("ide");
  2985. messageSends: []
  2986. }),
  2987. $globals.HLListWidget);
  2988. $core.addMethod(
  2989. $core.method({
  2990. selector: "buttonsDivCssClass",
  2991. protocol: 'accessing',
  2992. fn: function (){
  2993. var self=this;
  2994. return "pane_actions form-actions";
  2995. },
  2996. //>>excludeStart("ide", pragmas.excludeIdeData);
  2997. args: [],
  2998. source: "buttonsDivCssClass\x0a\x09^ 'pane_actions form-actions'",
  2999. referencedClasses: [],
  3000. //>>excludeEnd("ide");
  3001. messageSends: []
  3002. }),
  3003. $globals.HLListWidget);
  3004. $core.addMethod(
  3005. $core.method({
  3006. selector: "cssClassForItem:",
  3007. protocol: 'accessing',
  3008. fn: function (anObject){
  3009. var self=this;
  3010. return "";
  3011. },
  3012. //>>excludeStart("ide", pragmas.excludeIdeData);
  3013. args: ["anObject"],
  3014. source: "cssClassForItem: anObject\x0a\x09^ ''",
  3015. referencedClasses: [],
  3016. //>>excludeEnd("ide");
  3017. messageSends: []
  3018. }),
  3019. $globals.HLListWidget);
  3020. $core.addMethod(
  3021. $core.method({
  3022. selector: "defaultItems",
  3023. protocol: 'defaults',
  3024. fn: function (){
  3025. var self=this;
  3026. var $1;
  3027. $1=[];
  3028. return $1;
  3029. },
  3030. //>>excludeStart("ide", pragmas.excludeIdeData);
  3031. args: [],
  3032. source: "defaultItems\x0a\x09^ #()",
  3033. referencedClasses: [],
  3034. //>>excludeEnd("ide");
  3035. messageSends: []
  3036. }),
  3037. $globals.HLListWidget);
  3038. $core.addMethod(
  3039. $core.method({
  3040. selector: "ensureVisible:",
  3041. protocol: 'actions',
  3042. fn: function (aListItem){
  3043. var self=this;
  3044. var parent,position;
  3045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3046. return $core.withContext(function($ctx1) {
  3047. //>>excludeEnd("ctx");
  3048. 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;
  3049. $1=$recv(aListItem)._get_((0));
  3050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3051. $ctx1.sendIdx["get:"]=1;
  3052. //>>excludeEnd("ctx");
  3053. if(($receiver = $1) == null || $receiver.isNil){
  3054. return self;
  3055. } else {
  3056. $1;
  3057. };
  3058. position=self._positionOf_(aListItem);
  3059. parent=$recv(aListItem)._parent();
  3060. $4=$recv(aListItem)._position();
  3061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3062. $ctx1.sendIdx["position"]=1;
  3063. //>>excludeEnd("ctx");
  3064. $3=$recv($4)._top();
  3065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3066. $ctx1.sendIdx["top"]=1;
  3067. //>>excludeEnd("ctx");
  3068. $2=$recv($3).__lt((0));
  3069. if($core.assert($2)){
  3070. $5=$recv(parent)._get_((0));
  3071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3072. $ctx1.sendIdx["get:"]=2;
  3073. //>>excludeEnd("ctx");
  3074. $9=$recv(parent)._get_((0));
  3075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3076. $ctx1.sendIdx["get:"]=3;
  3077. //>>excludeEnd("ctx");
  3078. $8=$recv($9)._scrollTop();
  3079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3080. $ctx1.sendIdx["scrollTop"]=1;
  3081. //>>excludeEnd("ctx");
  3082. $11=$recv(aListItem)._position();
  3083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3084. $ctx1.sendIdx["position"]=2;
  3085. //>>excludeEnd("ctx");
  3086. $10=$recv($11)._top();
  3087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3088. $ctx1.sendIdx["top"]=2;
  3089. //>>excludeEnd("ctx");
  3090. $7=$recv($8).__plus($10);
  3091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3092. $ctx1.sendIdx["+"]=1;
  3093. //>>excludeEnd("ctx");
  3094. $6=$recv($7).__minus((10));
  3095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3096. $ctx1.sendIdx["-"]=1;
  3097. //>>excludeEnd("ctx");
  3098. $recv($5)._scrollTop_($6);
  3099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3100. $ctx1.sendIdx["scrollTop:"]=1;
  3101. //>>excludeEnd("ctx");
  3102. };
  3103. $15=$recv(aListItem)._position();
  3104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3105. $ctx1.sendIdx["position"]=3;
  3106. //>>excludeEnd("ctx");
  3107. $14=$recv($15)._top();
  3108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3109. $ctx1.sendIdx["top"]=3;
  3110. //>>excludeEnd("ctx");
  3111. $16=$recv(aListItem)._height();
  3112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3113. $ctx1.sendIdx["height"]=1;
  3114. //>>excludeEnd("ctx");
  3115. $13=$recv($14).__plus($16);
  3116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3117. $ctx1.sendIdx["+"]=2;
  3118. //>>excludeEnd("ctx");
  3119. $17=$recv(parent)._height();
  3120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3121. $ctx1.sendIdx["height"]=2;
  3122. //>>excludeEnd("ctx");
  3123. $12=$recv($13).__gt($17);
  3124. if($core.assert($12)){
  3125. $18=$recv(parent)._get_((0));
  3126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3127. $ctx1.sendIdx["get:"]=4;
  3128. //>>excludeEnd("ctx");
  3129. $22=$recv($recv(parent)._get_((0)))._scrollTop();
  3130. $23=$recv(aListItem)._height();
  3131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3132. $ctx1.sendIdx["height"]=3;
  3133. //>>excludeEnd("ctx");
  3134. $21=$recv($22).__plus($23);
  3135. $20=$recv($21).__minus($recv($recv(parent)._height()).__minus($recv($recv(aListItem)._position())._top()));
  3136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3137. $ctx1.sendIdx["-"]=2;
  3138. //>>excludeEnd("ctx");
  3139. $19=$recv($20).__plus((10));
  3140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3141. $ctx1.sendIdx["+"]=3;
  3142. //>>excludeEnd("ctx");
  3143. $recv($18)._scrollTop_($19);
  3144. };
  3145. return self;
  3146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3147. }, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},$globals.HLListWidget)});
  3148. //>>excludeEnd("ctx");
  3149. },
  3150. //>>excludeStart("ide", pragmas.excludeIdeData);
  3151. args: ["aListItem"],
  3152. 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 ]",
  3153. referencedClasses: [],
  3154. //>>excludeEnd("ide");
  3155. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "-", "+", "scrollTop", ">", "height"]
  3156. }),
  3157. $globals.HLListWidget);
  3158. $core.addMethod(
  3159. $core.method({
  3160. selector: "findListItemFor:",
  3161. protocol: 'accessing',
  3162. fn: function (anObject){
  3163. var self=this;
  3164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3165. return $core.withContext(function($ctx1) {
  3166. //>>excludeEnd("ctx");
  3167. var $4,$3,$2,$1;
  3168. $4=$recv(self["@wrapper"])._asJQuery();
  3169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3170. $ctx1.sendIdx["asJQuery"]=1;
  3171. //>>excludeEnd("ctx");
  3172. $3=$recv($4)._find_("li");
  3173. $2=$recv($3)._filter_($recv((function(thisArg,otherArg){
  3174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3175. return $core.withContext(function($ctx2) {
  3176. //>>excludeEnd("ctx");
  3177. return $recv($recv($recv(thisArg)._asJQuery())._data_("item")).__eq(anObject);
  3178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3179. }, function($ctx2) {$ctx2.fillBlock({thisArg:thisArg,otherArg:otherArg},$ctx1,1)});
  3180. //>>excludeEnd("ctx");
  3181. }))._currySelf());
  3182. $1=$recv($2)._eq_((0));
  3183. return $1;
  3184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3185. }, function($ctx1) {$ctx1.fill(self,"findListItemFor:",{anObject:anObject},$globals.HLListWidget)});
  3186. //>>excludeEnd("ctx");
  3187. },
  3188. //>>excludeStart("ide", pragmas.excludeIdeData);
  3189. args: ["anObject"],
  3190. source: "findListItemFor: anObject\x0a\x09^ (((wrapper asJQuery find: 'li') \x0a\x09\x09filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)",
  3191. referencedClasses: [],
  3192. //>>excludeEnd("ide");
  3193. messageSends: ["eq:", "filter:", "find:", "asJQuery", "currySelf", "=", "data:"]
  3194. }),
  3195. $globals.HLListWidget);
  3196. $core.addMethod(
  3197. $core.method({
  3198. selector: "focus",
  3199. protocol: 'actions',
  3200. fn: function (){
  3201. var self=this;
  3202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3203. return $core.withContext(function($ctx1) {
  3204. //>>excludeEnd("ctx");
  3205. var $1,$2,$receiver;
  3206. (
  3207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3208. $ctx1.supercall = true,
  3209. //>>excludeEnd("ctx");
  3210. $globals.HLListWidget.superclass.fn.prototype._focus.apply($recv(self), []));
  3211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3212. $ctx1.supercall = false;
  3213. //>>excludeEnd("ctx");;
  3214. $1=$recv(self._items())._isEmpty();
  3215. if(!$core.assert($1)){
  3216. $2=self._selectedItem();
  3217. if(($receiver = $2) == null || $receiver.isNil){
  3218. self._activateFirstListItem();
  3219. } else {
  3220. $2;
  3221. };
  3222. };
  3223. return self;
  3224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3225. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLListWidget)});
  3226. //>>excludeEnd("ctx");
  3227. },
  3228. //>>excludeStart("ide", pragmas.excludeIdeData);
  3229. args: [],
  3230. source: "focus\x0a\x09super focus.\x0a self items isEmpty ifFalse: [ \x0a\x09\x09self selectedItem ifNil: [ self activateFirstListItem ] ]",
  3231. referencedClasses: [],
  3232. //>>excludeEnd("ide");
  3233. messageSends: ["focus", "ifFalse:", "isEmpty", "items", "ifNil:", "selectedItem", "activateFirstListItem"]
  3234. }),
  3235. $globals.HLListWidget);
  3236. $core.addMethod(
  3237. $core.method({
  3238. selector: "items",
  3239. protocol: 'accessing',
  3240. fn: function (){
  3241. var self=this;
  3242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3243. return $core.withContext(function($ctx1) {
  3244. //>>excludeEnd("ctx");
  3245. var $2,$1,$receiver;
  3246. $2=self["@items"];
  3247. if(($receiver = $2) == null || $receiver.isNil){
  3248. self["@items"]=self._defaultItems();
  3249. $1=self["@items"];
  3250. } else {
  3251. $1=$2;
  3252. };
  3253. return $1;
  3254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3255. }, function($ctx1) {$ctx1.fill(self,"items",{},$globals.HLListWidget)});
  3256. //>>excludeEnd("ctx");
  3257. },
  3258. //>>excludeStart("ide", pragmas.excludeIdeData);
  3259. args: [],
  3260. source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
  3261. referencedClasses: [],
  3262. //>>excludeEnd("ide");
  3263. messageSends: ["ifNil:", "defaultItems"]
  3264. }),
  3265. $globals.HLListWidget);
  3266. $core.addMethod(
  3267. $core.method({
  3268. selector: "items:",
  3269. protocol: 'accessing',
  3270. fn: function (aCollection){
  3271. var self=this;
  3272. self["@items"]=aCollection;
  3273. return self;
  3274. },
  3275. //>>excludeStart("ide", pragmas.excludeIdeData);
  3276. args: ["aCollection"],
  3277. source: "items: aCollection\x0a\x09items := aCollection",
  3278. referencedClasses: [],
  3279. //>>excludeEnd("ide");
  3280. messageSends: []
  3281. }),
  3282. $globals.HLListWidget);
  3283. $core.addMethod(
  3284. $core.method({
  3285. selector: "listCssClass",
  3286. protocol: 'accessing',
  3287. fn: function (){
  3288. var self=this;
  3289. return "nav nav-pills nav-stacked";
  3290. },
  3291. //>>excludeStart("ide", pragmas.excludeIdeData);
  3292. args: [],
  3293. source: "listCssClass \x0a\x09^'nav nav-pills nav-stacked'",
  3294. referencedClasses: [],
  3295. //>>excludeEnd("ide");
  3296. messageSends: []
  3297. }),
  3298. $globals.HLListWidget);
  3299. $core.addMethod(
  3300. $core.method({
  3301. selector: "listCssClassForItem:",
  3302. protocol: 'accessing',
  3303. fn: function (anObject){
  3304. var self=this;
  3305. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3306. return $core.withContext(function($ctx1) {
  3307. //>>excludeEnd("ctx");
  3308. var $2,$1;
  3309. $2=$recv(self._selectedItem()).__eq(anObject);
  3310. if($core.assert($2)){
  3311. $1=self._activeItemCssClass();
  3312. } else {
  3313. $1="inactive";
  3314. };
  3315. return $1;
  3316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3317. }, function($ctx1) {$ctx1.fill(self,"listCssClassForItem:",{anObject:anObject},$globals.HLListWidget)});
  3318. //>>excludeEnd("ctx");
  3319. },
  3320. //>>excludeStart("ide", pragmas.excludeIdeData);
  3321. args: ["anObject"],
  3322. source: "listCssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09ifTrue: [ self activeItemCssClass ]\x0a\x09\x09ifFalse: [ 'inactive' ]",
  3323. referencedClasses: [],
  3324. //>>excludeEnd("ide");
  3325. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem", "activeItemCssClass"]
  3326. }),
  3327. $globals.HLListWidget);
  3328. $core.addMethod(
  3329. $core.method({
  3330. selector: "onItemDoubleClicked:on:",
  3331. protocol: 'reactions',
  3332. fn: function (anEvent,anObject){
  3333. var self=this;
  3334. return self;
  3335. },
  3336. //>>excludeStart("ide", pragmas.excludeIdeData);
  3337. args: ["anEvent", "anObject"],
  3338. source: "onItemDoubleClicked: anEvent on: anObject \x0a\x09\x22The item that this widget has rendered for anObject has been double clicked.\x22\x0a\x0a\x09\x22no-op\x22",
  3339. referencedClasses: [],
  3340. //>>excludeEnd("ide");
  3341. messageSends: []
  3342. }),
  3343. $globals.HLListWidget);
  3344. $core.addMethod(
  3345. $core.method({
  3346. selector: "positionOf:",
  3347. protocol: 'accessing',
  3348. fn: function (aListItem){
  3349. var self=this;
  3350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3351. return $core.withContext(function($ctx1) {
  3352. //>>excludeEnd("ctx");
  3353. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  3354. ;
  3355. return self;
  3356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3357. }, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},$globals.HLListWidget)});
  3358. //>>excludeEnd("ctx");
  3359. },
  3360. //>>excludeStart("ide", pragmas.excludeIdeData);
  3361. args: ["aListItem"],
  3362. source: "positionOf: aListItem\x0a\x09<\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09>",
  3363. referencedClasses: [],
  3364. //>>excludeEnd("ide");
  3365. messageSends: []
  3366. }),
  3367. $globals.HLListWidget);
  3368. $core.addMethod(
  3369. $core.method({
  3370. selector: "reactivateListItem:",
  3371. protocol: 'actions',
  3372. fn: function (aListItem){
  3373. var self=this;
  3374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3375. return $core.withContext(function($ctx1) {
  3376. //>>excludeEnd("ctx");
  3377. self._activateListItem_(aListItem);
  3378. self._reselectItem_(self._selectedItem());
  3379. return self;
  3380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3381. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{aListItem:aListItem},$globals.HLListWidget)});
  3382. //>>excludeEnd("ctx");
  3383. },
  3384. //>>excludeStart("ide", pragmas.excludeIdeData);
  3385. args: ["aListItem"],
  3386. source: "reactivateListItem: aListItem\x0a\x09self activateListItem: aListItem.\x0a\x09self reselectItem: self selectedItem",
  3387. referencedClasses: [],
  3388. //>>excludeEnd("ide");
  3389. messageSends: ["activateListItem:", "reselectItem:", "selectedItem"]
  3390. }),
  3391. $globals.HLListWidget);
  3392. $core.addMethod(
  3393. $core.method({
  3394. selector: "refresh",
  3395. protocol: 'actions',
  3396. fn: function (){
  3397. var self=this;
  3398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3399. return $core.withContext(function($ctx1) {
  3400. //>>excludeEnd("ctx");
  3401. var $1,$receiver;
  3402. (
  3403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3404. $ctx1.supercall = true,
  3405. //>>excludeEnd("ctx");
  3406. $globals.HLListWidget.superclass.fn.prototype._refresh.apply($recv(self), []));
  3407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3408. $ctx1.supercall = false;
  3409. //>>excludeEnd("ctx");;
  3410. $1=self._selectedItem();
  3411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3412. $ctx1.sendIdx["selectedItem"]=1;
  3413. //>>excludeEnd("ctx");
  3414. if(($receiver = $1) == null || $receiver.isNil){
  3415. $1;
  3416. } else {
  3417. self._ensureVisible_(self._findListItemFor_(self._selectedItem()));
  3418. };
  3419. return self;
  3420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3421. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLListWidget)});
  3422. //>>excludeEnd("ctx");
  3423. },
  3424. //>>excludeStart("ide", pragmas.excludeIdeData);
  3425. args: [],
  3426. source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
  3427. referencedClasses: [],
  3428. //>>excludeEnd("ide");
  3429. messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"]
  3430. }),
  3431. $globals.HLListWidget);
  3432. $core.addMethod(
  3433. $core.method({
  3434. selector: "renderButtonsOn:",
  3435. protocol: 'rendering',
  3436. fn: function (html){
  3437. var self=this;
  3438. return self;
  3439. },
  3440. //>>excludeStart("ide", pragmas.excludeIdeData);
  3441. args: ["html"],
  3442. source: "renderButtonsOn: html",
  3443. referencedClasses: [],
  3444. //>>excludeEnd("ide");
  3445. messageSends: []
  3446. }),
  3447. $globals.HLListWidget);
  3448. $core.addMethod(
  3449. $core.method({
  3450. selector: "renderContentOn:",
  3451. protocol: 'rendering',
  3452. fn: function (html){
  3453. var self=this;
  3454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3455. return $core.withContext(function($ctx1) {
  3456. //>>excludeEnd("ctx");
  3457. var $1,$2,$3,$4;
  3458. $1=$recv(html)._ul();
  3459. $recv($1)._class_(self._listCssClass());
  3460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3461. $ctx1.sendIdx["class:"]=1;
  3462. //>>excludeEnd("ctx");
  3463. $recv($1)._with_((function(){
  3464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3465. return $core.withContext(function($ctx2) {
  3466. //>>excludeEnd("ctx");
  3467. return self._renderListOn_(html);
  3468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3469. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3470. //>>excludeEnd("ctx");
  3471. }));
  3472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3473. $ctx1.sendIdx["with:"]=1;
  3474. //>>excludeEnd("ctx");
  3475. $2=$recv($1)._onClick_((function(){
  3476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3477. return $core.withContext(function($ctx2) {
  3478. //>>excludeEnd("ctx");
  3479. return self._focus();
  3480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3481. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3482. //>>excludeEnd("ctx");
  3483. }));
  3484. $3=$recv(html)._div();
  3485. $recv($3)._class_(self._buttonsDivCssClass());
  3486. $4=$recv($3)._with_((function(){
  3487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3488. return $core.withContext(function($ctx2) {
  3489. //>>excludeEnd("ctx");
  3490. return self._renderButtonsOn_(html);
  3491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3492. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3493. //>>excludeEnd("ctx");
  3494. }));
  3495. self._setupKeyBindings();
  3496. return self;
  3497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3498. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLListWidget)});
  3499. //>>excludeEnd("ctx");
  3500. },
  3501. //>>excludeStart("ide", pragmas.excludeIdeData);
  3502. args: ["html"],
  3503. source: "renderContentOn: html\x0a\x09html ul \x0a \x09class: self listCssClass;\x0a with: [ self renderListOn: html ];\x0a\x09\x09onClick: [ self focus ].\x0a html div class: self buttonsDivCssClass; with: [\x0a \x09self renderButtonsOn: html ].\x0a \x0a self setupKeyBindings",
  3504. referencedClasses: [],
  3505. //>>excludeEnd("ide");
  3506. messageSends: ["class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "focus", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
  3507. }),
  3508. $globals.HLListWidget);
  3509. $core.addMethod(
  3510. $core.method({
  3511. selector: "renderItem:on:",
  3512. protocol: 'rendering',
  3513. fn: function (anObject,html){
  3514. var self=this;
  3515. var li,a;
  3516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3517. return $core.withContext(function($ctx1) {
  3518. //>>excludeEnd("ctx");
  3519. var $1,$2,$4,$6,$5,$3;
  3520. li=$recv(html)._li();
  3521. $1=$recv(li)._asJQuery();
  3522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3523. $ctx1.sendIdx["asJQuery"]=1;
  3524. //>>excludeEnd("ctx");
  3525. $recv($1)._data_put_("item",anObject);
  3526. $2=li;
  3527. $recv($2)._class_(self._listCssClassForItem_(anObject));
  3528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3529. $ctx1.sendIdx["class:"]=1;
  3530. //>>excludeEnd("ctx");
  3531. $3=$recv($2)._with_((function(){
  3532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3533. return $core.withContext(function($ctx2) {
  3534. //>>excludeEnd("ctx");
  3535. $4=$recv(html)._a();
  3536. $recv($4)._with_((function(){
  3537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3538. return $core.withContext(function($ctx3) {
  3539. //>>excludeEnd("ctx");
  3540. $recv($recv(html)._tag_("i"))._class_(self._cssClassForItem_(anObject));
  3541. return self._renderItemLabel_on_(anObject,html);
  3542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3543. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3544. //>>excludeEnd("ctx");
  3545. }));
  3546. $5=$recv($4)._onClick_((function(){
  3547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3548. return $core.withContext(function($ctx3) {
  3549. //>>excludeEnd("ctx");
  3550. $6=$recv(li)._asJQuery();
  3551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3552. $ctx3.sendIdx["asJQuery"]=2;
  3553. //>>excludeEnd("ctx");
  3554. return self._reactivateListItem_($6);
  3555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3556. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3557. //>>excludeEnd("ctx");
  3558. }));
  3559. a=$5;
  3560. a;
  3561. return $recv($recv(a)._asJQuery())._dblclick_((function(ev){
  3562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3563. return $core.withContext(function($ctx3) {
  3564. //>>excludeEnd("ctx");
  3565. return self._onItemDoubleClicked_on_(ev,anObject);
  3566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3567. }, function($ctx3) {$ctx3.fillBlock({ev:ev},$ctx2,4)});
  3568. //>>excludeEnd("ctx");
  3569. }));
  3570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3571. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3572. //>>excludeEnd("ctx");
  3573. }));
  3574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3575. $ctx1.sendIdx["with:"]=1;
  3576. //>>excludeEnd("ctx");
  3577. return self;
  3578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3579. }, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li,a:a},$globals.HLListWidget)});
  3580. //>>excludeEnd("ctx");
  3581. },
  3582. //>>excludeStart("ide", pragmas.excludeIdeData);
  3583. args: ["anObject", "html"],
  3584. source: "renderItem: anObject on: html\x0a\x09| li a |\x0a \x0a\x09li := html li.\x0a\x09li asJQuery data: 'item' put: anObject.\x0a li\x0a\x09\x09class: (self listCssClassForItem: anObject);\x0a with: [ \x0a \x09a := html 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: [ self reactivateListItem: li asJQuery ].\x0a\x09\x09\x09a asJQuery dblclick: [ :ev | self onItemDoubleClicked: ev on: anObject ].\x0a\x09\x09]",
  3585. referencedClasses: [],
  3586. //>>excludeEnd("ide");
  3587. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:on:", "onClick:", "reactivateListItem:", "dblclick:", "onItemDoubleClicked:on:"]
  3588. }),
  3589. $globals.HLListWidget);
  3590. $core.addMethod(
  3591. $core.method({
  3592. selector: "renderItemLabel:on:",
  3593. protocol: 'rendering',
  3594. fn: function (anObject,html){
  3595. var self=this;
  3596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3597. return $core.withContext(function($ctx1) {
  3598. //>>excludeEnd("ctx");
  3599. $recv(html)._with_($recv(anObject)._asString());
  3600. return self;
  3601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3602. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},$globals.HLListWidget)});
  3603. //>>excludeEnd("ctx");
  3604. },
  3605. //>>excludeStart("ide", pragmas.excludeIdeData);
  3606. args: ["anObject", "html"],
  3607. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  3608. referencedClasses: [],
  3609. //>>excludeEnd("ide");
  3610. messageSends: ["with:", "asString"]
  3611. }),
  3612. $globals.HLListWidget);
  3613. $core.addMethod(
  3614. $core.method({
  3615. selector: "renderListOn:",
  3616. protocol: 'rendering',
  3617. fn: function (html){
  3618. var self=this;
  3619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3620. return $core.withContext(function($ctx1) {
  3621. //>>excludeEnd("ctx");
  3622. $recv(self._items())._do_((function(each){
  3623. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3624. return $core.withContext(function($ctx2) {
  3625. //>>excludeEnd("ctx");
  3626. return self._renderItem_on_(each,html);
  3627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3628. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3629. //>>excludeEnd("ctx");
  3630. }));
  3631. return self;
  3632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3633. }, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},$globals.HLListWidget)});
  3634. //>>excludeEnd("ctx");
  3635. },
  3636. //>>excludeStart("ide", pragmas.excludeIdeData);
  3637. args: ["html"],
  3638. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  3639. referencedClasses: [],
  3640. //>>excludeEnd("ide");
  3641. messageSends: ["do:", "items", "renderItem:on:"]
  3642. }),
  3643. $globals.HLListWidget);
  3644. $core.addMethod(
  3645. $core.method({
  3646. selector: "reselectItem:",
  3647. protocol: 'actions',
  3648. fn: function (anObject){
  3649. var self=this;
  3650. return self;
  3651. },
  3652. //>>excludeStart("ide", pragmas.excludeIdeData);
  3653. args: ["anObject"],
  3654. source: "reselectItem: anObject",
  3655. referencedClasses: [],
  3656. //>>excludeEnd("ide");
  3657. messageSends: []
  3658. }),
  3659. $globals.HLListWidget);
  3660. $core.addMethod(
  3661. $core.method({
  3662. selector: "selectItem:",
  3663. protocol: 'actions',
  3664. fn: function (anObject){
  3665. var self=this;
  3666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3667. return $core.withContext(function($ctx1) {
  3668. //>>excludeEnd("ctx");
  3669. self._selectedItem_(anObject);
  3670. return self;
  3671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3672. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},$globals.HLListWidget)});
  3673. //>>excludeEnd("ctx");
  3674. },
  3675. //>>excludeStart("ide", pragmas.excludeIdeData);
  3676. args: ["anObject"],
  3677. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  3678. referencedClasses: [],
  3679. //>>excludeEnd("ide");
  3680. messageSends: ["selectedItem:"]
  3681. }),
  3682. $globals.HLListWidget);
  3683. $core.addMethod(
  3684. $core.method({
  3685. selector: "selectedItem",
  3686. protocol: 'accessing',
  3687. fn: function (){
  3688. var self=this;
  3689. var $1;
  3690. $1=self["@selectedItem"];
  3691. return $1;
  3692. },
  3693. //>>excludeStart("ide", pragmas.excludeIdeData);
  3694. args: [],
  3695. source: "selectedItem\x0a\x09^ selectedItem",
  3696. referencedClasses: [],
  3697. //>>excludeEnd("ide");
  3698. messageSends: []
  3699. }),
  3700. $globals.HLListWidget);
  3701. $core.addMethod(
  3702. $core.method({
  3703. selector: "selectedItem:",
  3704. protocol: 'accessing',
  3705. fn: function (anObject){
  3706. var self=this;
  3707. self["@selectedItem"]=anObject;
  3708. return self;
  3709. },
  3710. //>>excludeStart("ide", pragmas.excludeIdeData);
  3711. args: ["anObject"],
  3712. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  3713. referencedClasses: [],
  3714. //>>excludeEnd("ide");
  3715. messageSends: []
  3716. }),
  3717. $globals.HLListWidget);
  3718. $core.addMethod(
  3719. $core.method({
  3720. selector: "setupKeyBindings",
  3721. protocol: 'events',
  3722. fn: function (){
  3723. var self=this;
  3724. function $HLRepeatedKeyDownHandler(){return $globals.HLRepeatedKeyDownHandler||(typeof HLRepeatedKeyDownHandler=="undefined"?nil:HLRepeatedKeyDownHandler)}
  3725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3726. return $core.withContext(function($ctx1) {
  3727. //>>excludeEnd("ctx");
  3728. var $1,$2,$3;
  3729. $1=$recv($HLRepeatedKeyDownHandler())._on_(self);
  3730. $recv($1)._whileKeyDown_do_((38),(function(){
  3731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3732. return $core.withContext(function($ctx2) {
  3733. //>>excludeEnd("ctx");
  3734. return self._activatePreviousListItem();
  3735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3736. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3737. //>>excludeEnd("ctx");
  3738. }));
  3739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3740. $ctx1.sendIdx["whileKeyDown:do:"]=1;
  3741. //>>excludeEnd("ctx");
  3742. $recv($1)._whileKeyDown_do_((40),(function(){
  3743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3744. return $core.withContext(function($ctx2) {
  3745. //>>excludeEnd("ctx");
  3746. return self._activateNextListItem();
  3747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3748. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3749. //>>excludeEnd("ctx");
  3750. }));
  3751. $2=$recv($1)._rebindKeys();
  3752. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3754. return $core.withContext(function($ctx2) {
  3755. //>>excludeEnd("ctx");
  3756. $3=$recv($recv(e)._which()).__eq((13));
  3757. if($core.assert($3)){
  3758. return self._reselectItem_(self._selectedItem());
  3759. };
  3760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3761. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,3)});
  3762. //>>excludeEnd("ctx");
  3763. }));
  3764. return self;
  3765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3766. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLListWidget)});
  3767. //>>excludeEnd("ctx");
  3768. },
  3769. //>>excludeStart("ide", pragmas.excludeIdeData);
  3770. args: [],
  3771. 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 ] ]",
  3772. referencedClasses: ["HLRepeatedKeyDownHandler"],
  3773. //>>excludeEnd("ide");
  3774. messageSends: ["whileKeyDown:do:", "on:", "activatePreviousListItem", "activateNextListItem", "rebindKeys", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "reselectItem:", "selectedItem"]
  3775. }),
  3776. $globals.HLListWidget);
  3777. $core.addClass('HLNavigationListWidget', $globals.HLListWidget, ['previous', 'next'], 'Helios-Core');
  3778. $core.addMethod(
  3779. $core.method({
  3780. selector: "next",
  3781. protocol: 'accessing',
  3782. fn: function (){
  3783. var self=this;
  3784. var $1;
  3785. $1=self["@next"];
  3786. return $1;
  3787. },
  3788. //>>excludeStart("ide", pragmas.excludeIdeData);
  3789. args: [],
  3790. source: "next\x0a\x09^ next",
  3791. referencedClasses: [],
  3792. //>>excludeEnd("ide");
  3793. messageSends: []
  3794. }),
  3795. $globals.HLNavigationListWidget);
  3796. $core.addMethod(
  3797. $core.method({
  3798. selector: "next:",
  3799. protocol: 'accessing',
  3800. fn: function (aWidget){
  3801. var self=this;
  3802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3803. return $core.withContext(function($ctx1) {
  3804. //>>excludeEnd("ctx");
  3805. var $1;
  3806. self["@next"]=aWidget;
  3807. $1=$recv($recv(aWidget)._previous()).__eq(self);
  3808. if(!$core.assert($1)){
  3809. $recv(aWidget)._previous_(self);
  3810. };
  3811. return self;
  3812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3813. }, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3814. //>>excludeEnd("ctx");
  3815. },
  3816. //>>excludeStart("ide", pragmas.excludeIdeData);
  3817. args: ["aWidget"],
  3818. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  3819. referencedClasses: [],
  3820. //>>excludeEnd("ide");
  3821. messageSends: ["ifFalse:", "=", "previous", "previous:"]
  3822. }),
  3823. $globals.HLNavigationListWidget);
  3824. $core.addMethod(
  3825. $core.method({
  3826. selector: "nextFocus",
  3827. protocol: 'actions',
  3828. fn: function (){
  3829. var self=this;
  3830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3831. return $core.withContext(function($ctx1) {
  3832. //>>excludeEnd("ctx");
  3833. var $1,$receiver;
  3834. $1=self._next();
  3835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3836. $ctx1.sendIdx["next"]=1;
  3837. //>>excludeEnd("ctx");
  3838. if(($receiver = $1) == null || $receiver.isNil){
  3839. $1;
  3840. } else {
  3841. $recv(self._next())._focus();
  3842. };
  3843. return self;
  3844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3845. }, function($ctx1) {$ctx1.fill(self,"nextFocus",{},$globals.HLNavigationListWidget)});
  3846. //>>excludeEnd("ctx");
  3847. },
  3848. //>>excludeStart("ide", pragmas.excludeIdeData);
  3849. args: [],
  3850. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  3851. referencedClasses: [],
  3852. //>>excludeEnd("ide");
  3853. messageSends: ["ifNotNil:", "next", "focus"]
  3854. }),
  3855. $globals.HLNavigationListWidget);
  3856. $core.addMethod(
  3857. $core.method({
  3858. selector: "previous",
  3859. protocol: 'accessing',
  3860. fn: function (){
  3861. var self=this;
  3862. var $1;
  3863. $1=self["@previous"];
  3864. return $1;
  3865. },
  3866. //>>excludeStart("ide", pragmas.excludeIdeData);
  3867. args: [],
  3868. source: "previous\x0a\x09^ previous",
  3869. referencedClasses: [],
  3870. //>>excludeEnd("ide");
  3871. messageSends: []
  3872. }),
  3873. $globals.HLNavigationListWidget);
  3874. $core.addMethod(
  3875. $core.method({
  3876. selector: "previous:",
  3877. protocol: 'accessing',
  3878. fn: function (aWidget){
  3879. var self=this;
  3880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3881. return $core.withContext(function($ctx1) {
  3882. //>>excludeEnd("ctx");
  3883. var $1;
  3884. self["@previous"]=aWidget;
  3885. $1=$recv($recv(aWidget)._next()).__eq(self);
  3886. if(!$core.assert($1)){
  3887. $recv(aWidget)._next_(self);
  3888. };
  3889. return self;
  3890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3891. }, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3892. //>>excludeEnd("ctx");
  3893. },
  3894. //>>excludeStart("ide", pragmas.excludeIdeData);
  3895. args: ["aWidget"],
  3896. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  3897. referencedClasses: [],
  3898. //>>excludeEnd("ide");
  3899. messageSends: ["ifFalse:", "=", "next", "next:"]
  3900. }),
  3901. $globals.HLNavigationListWidget);
  3902. $core.addMethod(
  3903. $core.method({
  3904. selector: "previousFocus",
  3905. protocol: 'actions',
  3906. fn: function (){
  3907. var self=this;
  3908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3909. return $core.withContext(function($ctx1) {
  3910. //>>excludeEnd("ctx");
  3911. var $1,$receiver;
  3912. $1=self._previous();
  3913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3914. $ctx1.sendIdx["previous"]=1;
  3915. //>>excludeEnd("ctx");
  3916. if(($receiver = $1) == null || $receiver.isNil){
  3917. $1;
  3918. } else {
  3919. $recv(self._previous())._focus();
  3920. };
  3921. return self;
  3922. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3923. }, function($ctx1) {$ctx1.fill(self,"previousFocus",{},$globals.HLNavigationListWidget)});
  3924. //>>excludeEnd("ctx");
  3925. },
  3926. //>>excludeStart("ide", pragmas.excludeIdeData);
  3927. args: [],
  3928. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  3929. referencedClasses: [],
  3930. //>>excludeEnd("ide");
  3931. messageSends: ["ifNotNil:", "previous", "focus"]
  3932. }),
  3933. $globals.HLNavigationListWidget);
  3934. $core.addMethod(
  3935. $core.method({
  3936. selector: "setupKeyBindings",
  3937. protocol: 'events',
  3938. fn: function (){
  3939. var self=this;
  3940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3941. return $core.withContext(function($ctx1) {
  3942. //>>excludeEnd("ctx");
  3943. var $2,$1,$3;
  3944. (
  3945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3946. $ctx1.supercall = true,
  3947. //>>excludeEnd("ctx");
  3948. $globals.HLNavigationListWidget.superclass.fn.prototype._setupKeyBindings.apply($recv(self), []));
  3949. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3950. $ctx1.supercall = false;
  3951. //>>excludeEnd("ctx");;
  3952. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3954. return $core.withContext(function($ctx2) {
  3955. //>>excludeEnd("ctx");
  3956. $2=$recv(e)._which();
  3957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3958. $ctx2.sendIdx["which"]=1;
  3959. //>>excludeEnd("ctx");
  3960. $1=$recv($2).__eq((39));
  3961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3962. $ctx2.sendIdx["="]=1;
  3963. //>>excludeEnd("ctx");
  3964. if($core.assert($1)){
  3965. self._nextFocus();
  3966. };
  3967. $3=$recv($recv(e)._which()).__eq((37));
  3968. if($core.assert($3)){
  3969. return self._previousFocus();
  3970. };
  3971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3972. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  3973. //>>excludeEnd("ctx");
  3974. }));
  3975. return self;
  3976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3977. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLNavigationListWidget)});
  3978. //>>excludeEnd("ctx");
  3979. },
  3980. //>>excludeStart("ide", pragmas.excludeIdeData);
  3981. args: [],
  3982. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x0a\x09self wrapper asJQuery keydown: [ :e |\x0a e which = 39 ifTrue: [ \x0a \x09self nextFocus ].\x0a\x09\x09e which = 37 ifTrue: [ \x0a \x09self previousFocus ] ]",
  3983. referencedClasses: [],
  3984. //>>excludeEnd("ide");
  3985. messageSends: ["setupKeyBindings", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "nextFocus", "previousFocus"]
  3986. }),
  3987. $globals.HLNavigationListWidget);
  3988. $core.addClass('HLToolListWidget', $globals.HLNavigationListWidget, ['model'], 'Helios-Core');
  3989. $core.addMethod(
  3990. $core.method({
  3991. selector: "activateListItem:",
  3992. protocol: 'actions',
  3993. fn: function (anItem){
  3994. var self=this;
  3995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3996. return $core.withContext(function($ctx1) {
  3997. //>>excludeEnd("ctx");
  3998. $recv(self._model())._withChangesDo_((function(){
  3999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4000. return $core.withContext(function($ctx2) {
  4001. //>>excludeEnd("ctx");
  4002. return (
  4003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4004. $ctx2.supercall = true,
  4005. //>>excludeEnd("ctx");
  4006. $globals.HLToolListWidget.superclass.fn.prototype._activateListItem_.apply($recv(self), [anItem]));
  4007. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4008. $ctx2.supercall = false;
  4009. //>>excludeEnd("ctx");;
  4010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4011. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4012. //>>excludeEnd("ctx");
  4013. }));
  4014. return self;
  4015. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4016. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4017. //>>excludeEnd("ctx");
  4018. },
  4019. //>>excludeStart("ide", pragmas.excludeIdeData);
  4020. args: ["anItem"],
  4021. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  4022. referencedClasses: [],
  4023. //>>excludeEnd("ide");
  4024. messageSends: ["withChangesDo:", "model", "activateListItem:"]
  4025. }),
  4026. $globals.HLToolListWidget);
  4027. $core.addMethod(
  4028. $core.method({
  4029. selector: "activateNextListItem",
  4030. protocol: 'actions',
  4031. fn: function (){
  4032. var self=this;
  4033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4034. return $core.withContext(function($ctx1) {
  4035. //>>excludeEnd("ctx");
  4036. $recv(self._model())._withChangesDo_((function(){
  4037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4038. return $core.withContext(function($ctx2) {
  4039. //>>excludeEnd("ctx");
  4040. return (
  4041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4042. $ctx2.supercall = true,
  4043. //>>excludeEnd("ctx");
  4044. $globals.HLToolListWidget.superclass.fn.prototype._activateNextListItem.apply($recv(self), []));
  4045. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4046. $ctx2.supercall = false;
  4047. //>>excludeEnd("ctx");;
  4048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4049. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4050. //>>excludeEnd("ctx");
  4051. }));
  4052. return self;
  4053. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4054. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLToolListWidget)});
  4055. //>>excludeEnd("ctx");
  4056. },
  4057. //>>excludeStart("ide", pragmas.excludeIdeData);
  4058. args: [],
  4059. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  4060. referencedClasses: [],
  4061. //>>excludeEnd("ide");
  4062. messageSends: ["withChangesDo:", "model", "activateNextListItem"]
  4063. }),
  4064. $globals.HLToolListWidget);
  4065. $core.addMethod(
  4066. $core.method({
  4067. selector: "activatePreviousListItem",
  4068. protocol: 'actions',
  4069. fn: function (){
  4070. var self=this;
  4071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4072. return $core.withContext(function($ctx1) {
  4073. //>>excludeEnd("ctx");
  4074. $recv(self._model())._withChangesDo_((function(){
  4075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4076. return $core.withContext(function($ctx2) {
  4077. //>>excludeEnd("ctx");
  4078. return (
  4079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4080. $ctx2.supercall = true,
  4081. //>>excludeEnd("ctx");
  4082. $globals.HLToolListWidget.superclass.fn.prototype._activatePreviousListItem.apply($recv(self), []));
  4083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4084. $ctx2.supercall = false;
  4085. //>>excludeEnd("ctx");;
  4086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4087. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4088. //>>excludeEnd("ctx");
  4089. }));
  4090. return self;
  4091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4092. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLToolListWidget)});
  4093. //>>excludeEnd("ctx");
  4094. },
  4095. //>>excludeStart("ide", pragmas.excludeIdeData);
  4096. args: [],
  4097. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  4098. referencedClasses: [],
  4099. //>>excludeEnd("ide");
  4100. messageSends: ["withChangesDo:", "model", "activatePreviousListItem"]
  4101. }),
  4102. $globals.HLToolListWidget);
  4103. $core.addMethod(
  4104. $core.method({
  4105. selector: "commandCategory",
  4106. protocol: 'accessing',
  4107. fn: function (){
  4108. var self=this;
  4109. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4110. return $core.withContext(function($ctx1) {
  4111. //>>excludeEnd("ctx");
  4112. var $1;
  4113. $1=self._label();
  4114. return $1;
  4115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4116. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},$globals.HLToolListWidget)});
  4117. //>>excludeEnd("ctx");
  4118. },
  4119. //>>excludeStart("ide", pragmas.excludeIdeData);
  4120. args: [],
  4121. source: "commandCategory\x0a\x09^ self label",
  4122. referencedClasses: [],
  4123. //>>excludeEnd("ide");
  4124. messageSends: ["label"]
  4125. }),
  4126. $globals.HLToolListWidget);
  4127. $core.addMethod(
  4128. $core.method({
  4129. selector: "label",
  4130. protocol: 'accessing',
  4131. fn: function (){
  4132. var self=this;
  4133. return "List";
  4134. },
  4135. //>>excludeStart("ide", pragmas.excludeIdeData);
  4136. args: [],
  4137. source: "label\x0a\x09^ 'List'",
  4138. referencedClasses: [],
  4139. //>>excludeEnd("ide");
  4140. messageSends: []
  4141. }),
  4142. $globals.HLToolListWidget);
  4143. $core.addMethod(
  4144. $core.method({
  4145. selector: "menuCommands",
  4146. protocol: 'accessing',
  4147. fn: function (){
  4148. var self=this;
  4149. function $HLToolCommand(){return $globals.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  4150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4151. return $core.withContext(function($ctx1) {
  4152. //>>excludeEnd("ctx");
  4153. var $2,$1;
  4154. $1=$recv($recv($recv($recv($HLToolCommand())._concreteClasses())._select_((function(each){
  4155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4156. return $core.withContext(function($ctx2) {
  4157. //>>excludeEnd("ctx");
  4158. $2=self._model();
  4159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4160. $ctx2.sendIdx["model"]=1;
  4161. //>>excludeEnd("ctx");
  4162. return $recv(each)._isValidFor_($2);
  4163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4164. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4165. //>>excludeEnd("ctx");
  4166. })))._collect_((function(each){
  4167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4168. return $core.withContext(function($ctx2) {
  4169. //>>excludeEnd("ctx");
  4170. return $recv(each)._for_(self._model());
  4171. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4172. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4173. //>>excludeEnd("ctx");
  4174. })))._select_((function(each){
  4175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4176. return $core.withContext(function($ctx2) {
  4177. //>>excludeEnd("ctx");
  4178. return $recv($recv($recv(each)._category()).__eq(self._commandCategory()))._and_((function(){
  4179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4180. return $core.withContext(function($ctx3) {
  4181. //>>excludeEnd("ctx");
  4182. return $recv($recv(each)._isAction())._and_((function(){
  4183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4184. return $core.withContext(function($ctx4) {
  4185. //>>excludeEnd("ctx");
  4186. return $recv(each)._isActive();
  4187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4188. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4189. //>>excludeEnd("ctx");
  4190. }));
  4191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4192. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4193. //>>excludeEnd("ctx");
  4194. }));
  4195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4196. $ctx2.sendIdx["and:"]=1;
  4197. //>>excludeEnd("ctx");
  4198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4199. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  4200. //>>excludeEnd("ctx");
  4201. }));
  4202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4203. $ctx1.sendIdx["select:"]=1;
  4204. //>>excludeEnd("ctx");
  4205. return $1;
  4206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4207. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},$globals.HLToolListWidget)});
  4208. //>>excludeEnd("ctx");
  4209. },
  4210. //>>excludeStart("ide", pragmas.excludeIdeData);
  4211. args: [],
  4212. 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 ] ] ]",
  4213. referencedClasses: ["HLToolCommand"],
  4214. //>>excludeEnd("ide");
  4215. messageSends: ["select:", "collect:", "concreteClasses", "isValidFor:", "model", "for:", "and:", "=", "category", "commandCategory", "isAction", "isActive"]
  4216. }),
  4217. $globals.HLToolListWidget);
  4218. $core.addMethod(
  4219. $core.method({
  4220. selector: "model",
  4221. protocol: 'accessing',
  4222. fn: function (){
  4223. var self=this;
  4224. var $1;
  4225. $1=self["@model"];
  4226. return $1;
  4227. },
  4228. //>>excludeStart("ide", pragmas.excludeIdeData);
  4229. args: [],
  4230. source: "model\x0a\x09^ model",
  4231. referencedClasses: [],
  4232. //>>excludeEnd("ide");
  4233. messageSends: []
  4234. }),
  4235. $globals.HLToolListWidget);
  4236. $core.addMethod(
  4237. $core.method({
  4238. selector: "model:",
  4239. protocol: 'accessing',
  4240. fn: function (aBrowserModel){
  4241. var self=this;
  4242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4243. return $core.withContext(function($ctx1) {
  4244. //>>excludeEnd("ctx");
  4245. var $1;
  4246. self["@model"]=aBrowserModel;
  4247. self._observeSystem();
  4248. $1=self._observeModel();
  4249. return self;
  4250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4251. }, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},$globals.HLToolListWidget)});
  4252. //>>excludeEnd("ctx");
  4253. },
  4254. //>>excludeStart("ide", pragmas.excludeIdeData);
  4255. args: ["aBrowserModel"],
  4256. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  4257. referencedClasses: [],
  4258. //>>excludeEnd("ide");
  4259. messageSends: ["observeSystem", "observeModel"]
  4260. }),
  4261. $globals.HLToolListWidget);
  4262. $core.addMethod(
  4263. $core.method({
  4264. selector: "observeModel",
  4265. protocol: 'actions',
  4266. fn: function (){
  4267. var self=this;
  4268. return self;
  4269. },
  4270. //>>excludeStart("ide", pragmas.excludeIdeData);
  4271. args: [],
  4272. source: "observeModel",
  4273. referencedClasses: [],
  4274. //>>excludeEnd("ide");
  4275. messageSends: []
  4276. }),
  4277. $globals.HLToolListWidget);
  4278. $core.addMethod(
  4279. $core.method({
  4280. selector: "observeSystem",
  4281. protocol: 'actions',
  4282. fn: function (){
  4283. var self=this;
  4284. return self;
  4285. },
  4286. //>>excludeStart("ide", pragmas.excludeIdeData);
  4287. args: [],
  4288. source: "observeSystem",
  4289. referencedClasses: [],
  4290. //>>excludeEnd("ide");
  4291. messageSends: []
  4292. }),
  4293. $globals.HLToolListWidget);
  4294. $core.addMethod(
  4295. $core.method({
  4296. selector: "reactivateListItem:",
  4297. protocol: 'actions',
  4298. fn: function (anItem){
  4299. var self=this;
  4300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4301. return $core.withContext(function($ctx1) {
  4302. //>>excludeEnd("ctx");
  4303. $recv(self._model())._withChangesDo_((function(){
  4304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4305. return $core.withContext(function($ctx2) {
  4306. //>>excludeEnd("ctx");
  4307. return (
  4308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4309. $ctx2.supercall = true,
  4310. //>>excludeEnd("ctx");
  4311. $globals.HLToolListWidget.superclass.fn.prototype._reactivateListItem_.apply($recv(self), [anItem]));
  4312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4313. $ctx2.supercall = false;
  4314. //>>excludeEnd("ctx");;
  4315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4316. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4317. //>>excludeEnd("ctx");
  4318. }));
  4319. return self;
  4320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4321. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4322. //>>excludeEnd("ctx");
  4323. },
  4324. //>>excludeStart("ide", pragmas.excludeIdeData);
  4325. args: ["anItem"],
  4326. source: "reactivateListItem: anItem\x0a\x09self model withChangesDo: [ super reactivateListItem: anItem ]",
  4327. referencedClasses: [],
  4328. //>>excludeEnd("ide");
  4329. messageSends: ["withChangesDo:", "model", "reactivateListItem:"]
  4330. }),
  4331. $globals.HLToolListWidget);
  4332. $core.addMethod(
  4333. $core.method({
  4334. selector: "renderContentOn:",
  4335. protocol: 'rendering',
  4336. fn: function (html){
  4337. var self=this;
  4338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4339. return $core.withContext(function($ctx1) {
  4340. //>>excludeEnd("ctx");
  4341. self._renderHeadOn_(html);
  4342. (
  4343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4344. $ctx1.supercall = true,
  4345. //>>excludeEnd("ctx");
  4346. $globals.HLToolListWidget.superclass.fn.prototype._renderContentOn_.apply($recv(self), [html]));
  4347. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4348. $ctx1.supercall = false;
  4349. //>>excludeEnd("ctx");;
  4350. return self;
  4351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4352. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLToolListWidget)});
  4353. //>>excludeEnd("ctx");
  4354. },
  4355. //>>excludeStart("ide", pragmas.excludeIdeData);
  4356. args: ["html"],
  4357. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  4358. referencedClasses: [],
  4359. //>>excludeEnd("ide");
  4360. messageSends: ["renderHeadOn:", "renderContentOn:"]
  4361. }),
  4362. $globals.HLToolListWidget);
  4363. $core.addMethod(
  4364. $core.method({
  4365. selector: "renderHeadOn:",
  4366. protocol: 'rendering',
  4367. fn: function (html){
  4368. var self=this;
  4369. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4370. return $core.withContext(function($ctx1) {
  4371. //>>excludeEnd("ctx");
  4372. var $1,$2;
  4373. $1=$recv(html)._div();
  4374. $recv($1)._class_("list-label");
  4375. $2=$recv($1)._with_((function(){
  4376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4377. return $core.withContext(function($ctx2) {
  4378. //>>excludeEnd("ctx");
  4379. $recv(html)._with_(self._label());
  4380. return self._renderMenuOn_(html);
  4381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4382. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4383. //>>excludeEnd("ctx");
  4384. }));
  4385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4386. $ctx1.sendIdx["with:"]=1;
  4387. //>>excludeEnd("ctx");
  4388. return self;
  4389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4390. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},$globals.HLToolListWidget)});
  4391. //>>excludeEnd("ctx");
  4392. },
  4393. //>>excludeStart("ide", pragmas.excludeIdeData);
  4394. args: ["html"],
  4395. 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 ]",
  4396. referencedClasses: [],
  4397. //>>excludeEnd("ide");
  4398. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]
  4399. }),
  4400. $globals.HLToolListWidget);
  4401. $core.addMethod(
  4402. $core.method({
  4403. selector: "renderMenuOn:",
  4404. protocol: 'rendering',
  4405. fn: function (html){
  4406. var self=this;
  4407. var commands;
  4408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4409. return $core.withContext(function($ctx1) {
  4410. //>>excludeEnd("ctx");
  4411. var $1,$2,$4,$5,$6,$8,$9,$7,$3;
  4412. commands=self._menuCommands();
  4413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4414. $ctx1.sendIdx["menuCommands"]=1;
  4415. //>>excludeEnd("ctx");
  4416. $1=$recv(commands)._isEmpty();
  4417. if($core.assert($1)){
  4418. return self;
  4419. };
  4420. $2=$recv(html)._div();
  4421. $recv($2)._class_("btn-group cog");
  4422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4423. $ctx1.sendIdx["class:"]=1;
  4424. //>>excludeEnd("ctx");
  4425. $3=$recv($2)._with_((function(){
  4426. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4427. return $core.withContext(function($ctx2) {
  4428. //>>excludeEnd("ctx");
  4429. $4=$recv(html)._a();
  4430. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4431. $ctx2.sendIdx["a"]=1;
  4432. //>>excludeEnd("ctx");
  4433. $recv($4)._class_("btn dropdown-toggle");
  4434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4435. $ctx2.sendIdx["class:"]=2;
  4436. //>>excludeEnd("ctx");
  4437. $recv($4)._at_put_("data-toggle","dropdown");
  4438. $5=$recv($4)._with_((function(){
  4439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4440. return $core.withContext(function($ctx3) {
  4441. //>>excludeEnd("ctx");
  4442. return $recv($recv(html)._tag_("i"))._class_("icon-chevron-down");
  4443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4444. $ctx3.sendIdx["class:"]=3;
  4445. //>>excludeEnd("ctx");
  4446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4447. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4448. //>>excludeEnd("ctx");
  4449. }));
  4450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4451. $ctx2.sendIdx["with:"]=2;
  4452. //>>excludeEnd("ctx");
  4453. $5;
  4454. $6=$recv(html)._ul();
  4455. $recv($6)._class_("dropdown-menu pull-right");
  4456. $7=$recv($6)._with_((function(){
  4457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4458. return $core.withContext(function($ctx3) {
  4459. //>>excludeEnd("ctx");
  4460. return $recv(self._menuCommands())._do_((function(each){
  4461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4462. return $core.withContext(function($ctx4) {
  4463. //>>excludeEnd("ctx");
  4464. return $recv($recv(html)._li())._with_((function(){
  4465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4466. return $core.withContext(function($ctx5) {
  4467. //>>excludeEnd("ctx");
  4468. $8=$recv(html)._a();
  4469. $recv($8)._with_($recv(each)._menuLabel());
  4470. $9=$recv($8)._onClick_((function(){
  4471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4472. return $core.withContext(function($ctx6) {
  4473. //>>excludeEnd("ctx");
  4474. return self._execute_(each);
  4475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4476. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)});
  4477. //>>excludeEnd("ctx");
  4478. }));
  4479. return $9;
  4480. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4481. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  4482. //>>excludeEnd("ctx");
  4483. }));
  4484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4485. $ctx4.sendIdx["with:"]=4;
  4486. //>>excludeEnd("ctx");
  4487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4488. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)});
  4489. //>>excludeEnd("ctx");
  4490. }));
  4491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4492. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4493. //>>excludeEnd("ctx");
  4494. }));
  4495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4496. $ctx2.sendIdx["with:"]=3;
  4497. //>>excludeEnd("ctx");
  4498. return $7;
  4499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4500. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4501. //>>excludeEnd("ctx");
  4502. }));
  4503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4504. $ctx1.sendIdx["with:"]=1;
  4505. //>>excludeEnd("ctx");
  4506. return self;
  4507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4508. }, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},$globals.HLToolListWidget)});
  4509. //>>excludeEnd("ctx");
  4510. },
  4511. //>>excludeStart("ide", pragmas.excludeIdeData);
  4512. args: ["html"],
  4513. source: "renderMenuOn: html\x0a\x09| commands |\x0a\x09\x0a\x09commands := self menuCommands.\x0a\x09commands isEmpty ifTrue: [ ^ 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 dropdown-toggle';\x0a\x09\x09\x09\x09at: 'data-toggle' put: 'dropdown';\x0a\x09\x09\x09\x09with: [ (html tag: 'i') class: 'icon-chevron-down' ].\x0a\x09\x09html ul \x0a\x09\x09\x09class: 'dropdown-menu pull-right';\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09self menuCommands 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 ] ] ] ] ]",
  4514. referencedClasses: [],
  4515. //>>excludeEnd("ide");
  4516. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "li", "menuLabel", "onClick:", "execute:"]
  4517. }),
  4518. $globals.HLToolListWidget);
  4519. $core.addMethod(
  4520. $core.method({
  4521. selector: "selectedItem:",
  4522. protocol: 'accessing',
  4523. fn: function (anItem){
  4524. var self=this;
  4525. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4526. return $core.withContext(function($ctx1) {
  4527. //>>excludeEnd("ctx");
  4528. (
  4529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4530. $ctx1.supercall = true,
  4531. //>>excludeEnd("ctx");
  4532. $globals.HLToolListWidget.superclass.fn.prototype._selectedItem_.apply($recv(self), [anItem]));
  4533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4534. $ctx1.supercall = false;
  4535. //>>excludeEnd("ctx");;
  4536. self._updateMenu();
  4537. return self;
  4538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4539. }, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4540. //>>excludeEnd("ctx");
  4541. },
  4542. //>>excludeStart("ide", pragmas.excludeIdeData);
  4543. args: ["anItem"],
  4544. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  4545. referencedClasses: [],
  4546. //>>excludeEnd("ide");
  4547. messageSends: ["selectedItem:", "updateMenu"]
  4548. }),
  4549. $globals.HLToolListWidget);
  4550. $core.addMethod(
  4551. $core.method({
  4552. selector: "unregister",
  4553. protocol: 'actions',
  4554. fn: function (){
  4555. var self=this;
  4556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4557. return $core.withContext(function($ctx1) {
  4558. //>>excludeEnd("ctx");
  4559. var $2,$1;
  4560. (
  4561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4562. $ctx1.supercall = true,
  4563. //>>excludeEnd("ctx");
  4564. $globals.HLToolListWidget.superclass.fn.prototype._unregister.apply($recv(self), []));
  4565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4566. $ctx1.supercall = false;
  4567. //>>excludeEnd("ctx");;
  4568. $2=self._model();
  4569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4570. $ctx1.sendIdx["model"]=1;
  4571. //>>excludeEnd("ctx");
  4572. $1=$recv($2)._announcer();
  4573. $recv($1)._unsubscribe_(self);
  4574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4575. $ctx1.sendIdx["unsubscribe:"]=1;
  4576. //>>excludeEnd("ctx");
  4577. $recv($recv(self._model())._systemAnnouncer())._unsubscribe_(self);
  4578. return self;
  4579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4580. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLToolListWidget)});
  4581. //>>excludeEnd("ctx");
  4582. },
  4583. //>>excludeStart("ide", pragmas.excludeIdeData);
  4584. args: [],
  4585. source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
  4586. referencedClasses: [],
  4587. //>>excludeEnd("ide");
  4588. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]
  4589. }),
  4590. $globals.HLToolListWidget);
  4591. $core.addMethod(
  4592. $core.method({
  4593. selector: "updateMenu",
  4594. protocol: 'updating',
  4595. fn: function (){
  4596. var self=this;
  4597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4598. return $core.withContext(function($ctx1) {
  4599. //>>excludeEnd("ctx");
  4600. var $3,$2,$1;
  4601. $3=self._wrapper();
  4602. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4603. $ctx1.sendIdx["wrapper"]=1;
  4604. //>>excludeEnd("ctx");
  4605. $2=$recv($3)._asJQuery();
  4606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4607. $ctx1.sendIdx["asJQuery"]=1;
  4608. //>>excludeEnd("ctx");
  4609. $1=$recv($2)._find_(".cog");
  4610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4611. $ctx1.sendIdx["find:"]=1;
  4612. //>>excludeEnd("ctx");
  4613. $recv($1)._remove();
  4614. $recv((function(html){
  4615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4616. return $core.withContext(function($ctx2) {
  4617. //>>excludeEnd("ctx");
  4618. return self._renderMenuOn_(html);
  4619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4620. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4621. //>>excludeEnd("ctx");
  4622. }))._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".list-label"));
  4623. return self;
  4624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4625. }, function($ctx1) {$ctx1.fill(self,"updateMenu",{},$globals.HLToolListWidget)});
  4626. //>>excludeEnd("ctx");
  4627. },
  4628. //>>excludeStart("ide", pragmas.excludeIdeData);
  4629. args: [],
  4630. 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')",
  4631. referencedClasses: [],
  4632. //>>excludeEnd("ide");
  4633. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]
  4634. }),
  4635. $globals.HLToolListWidget);
  4636. $core.addMethod(
  4637. $core.method({
  4638. selector: "on:",
  4639. protocol: 'instance creation',
  4640. fn: function (aModel){
  4641. var self=this;
  4642. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4643. return $core.withContext(function($ctx1) {
  4644. //>>excludeEnd("ctx");
  4645. var $2,$3,$1;
  4646. $2=self._new();
  4647. $recv($2)._model_(aModel);
  4648. $3=$recv($2)._yourself();
  4649. $1=$3;
  4650. return $1;
  4651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4652. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},$globals.HLToolListWidget.klass)});
  4653. //>>excludeEnd("ctx");
  4654. },
  4655. //>>excludeStart("ide", pragmas.excludeIdeData);
  4656. args: ["aModel"],
  4657. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  4658. referencedClasses: [],
  4659. //>>excludeEnd("ide");
  4660. messageSends: ["model:", "new", "yourself"]
  4661. }),
  4662. $globals.HLToolListWidget.klass);
  4663. $core.addClass('HLTabListWidget', $globals.HLListWidget, ['callback'], 'Helios-Core');
  4664. //>>excludeStart("ide", pragmas.excludeIdeData);
  4665. $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.";
  4666. //>>excludeEnd("ide");
  4667. $core.addMethod(
  4668. $core.method({
  4669. selector: "callback",
  4670. protocol: 'accessing',
  4671. fn: function (){
  4672. var self=this;
  4673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4674. return $core.withContext(function($ctx1) {
  4675. //>>excludeEnd("ctx");
  4676. var $2,$1,$receiver;
  4677. $2=self["@callback"];
  4678. if(($receiver = $2) == null || $receiver.isNil){
  4679. $1=(function(){
  4680. });
  4681. } else {
  4682. $1=$2;
  4683. };
  4684. return $1;
  4685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4686. }, function($ctx1) {$ctx1.fill(self,"callback",{},$globals.HLTabListWidget)});
  4687. //>>excludeEnd("ctx");
  4688. },
  4689. //>>excludeStart("ide", pragmas.excludeIdeData);
  4690. args: [],
  4691. source: "callback\x0a\x09^ callback ifNil: [ [] ]",
  4692. referencedClasses: [],
  4693. //>>excludeEnd("ide");
  4694. messageSends: ["ifNil:"]
  4695. }),
  4696. $globals.HLTabListWidget);
  4697. $core.addMethod(
  4698. $core.method({
  4699. selector: "callback:",
  4700. protocol: 'accessing',
  4701. fn: function (aBlock){
  4702. var self=this;
  4703. self["@callback"]=aBlock;
  4704. return self;
  4705. },
  4706. //>>excludeStart("ide", pragmas.excludeIdeData);
  4707. args: ["aBlock"],
  4708. source: "callback: aBlock\x0a\x09callback := aBlock",
  4709. referencedClasses: [],
  4710. //>>excludeEnd("ide");
  4711. messageSends: []
  4712. }),
  4713. $globals.HLTabListWidget);
  4714. $core.addMethod(
  4715. $core.method({
  4716. selector: "renderItemLabel:on:",
  4717. protocol: 'rendering',
  4718. fn: function (aTab,html){
  4719. var self=this;
  4720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4721. return $core.withContext(function($ctx1) {
  4722. //>>excludeEnd("ctx");
  4723. var $1,$2;
  4724. $1=$recv(html)._span();
  4725. $recv($1)._class_($recv(aTab)._cssClass());
  4726. $2=$recv($1)._with_($recv(aTab)._label());
  4727. return self;
  4728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4729. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aTab:aTab,html:html},$globals.HLTabListWidget)});
  4730. //>>excludeEnd("ctx");
  4731. },
  4732. //>>excludeStart("ide", pragmas.excludeIdeData);
  4733. args: ["aTab", "html"],
  4734. source: "renderItemLabel: aTab on: html\x0a\x09html span\x0a\x09\x09class: aTab cssClass;\x0a\x09\x09with: aTab label",
  4735. referencedClasses: [],
  4736. //>>excludeEnd("ide");
  4737. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  4738. }),
  4739. $globals.HLTabListWidget);
  4740. $core.addMethod(
  4741. $core.method({
  4742. selector: "selectItem:",
  4743. protocol: 'actions',
  4744. fn: function (aTab){
  4745. var self=this;
  4746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4747. return $core.withContext(function($ctx1) {
  4748. //>>excludeEnd("ctx");
  4749. (
  4750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4751. $ctx1.supercall = true,
  4752. //>>excludeEnd("ctx");
  4753. $globals.HLTabListWidget.superclass.fn.prototype._selectItem_.apply($recv(self), [aTab]));
  4754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4755. $ctx1.supercall = false;
  4756. //>>excludeEnd("ctx");;
  4757. $recv(self._callback())._value_(aTab);
  4758. return self;
  4759. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4760. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aTab:aTab},$globals.HLTabListWidget)});
  4761. //>>excludeEnd("ctx");
  4762. },
  4763. //>>excludeStart("ide", pragmas.excludeIdeData);
  4764. args: ["aTab"],
  4765. source: "selectItem: aTab\x0a\x09super selectItem: aTab.\x0a\x09self callback value: aTab",
  4766. referencedClasses: [],
  4767. //>>excludeEnd("ide");
  4768. messageSends: ["selectItem:", "value:", "callback"]
  4769. }),
  4770. $globals.HLTabListWidget);
  4771. $core.addClass('HLInformationWidget', $globals.HLWidget, ['informationString'], 'Helios-Core');
  4772. //>>excludeStart("ide", pragmas.excludeIdeData);
  4773. $globals.HLInformationWidget.comment="I display an information dialog.\x0a\x0a## API\x0a\x0a`HLWidget >> #inform:` is a convenience method for creating information dialogs.";
  4774. //>>excludeEnd("ide");
  4775. $core.addMethod(
  4776. $core.method({
  4777. selector: "informationString",
  4778. protocol: 'accessing',
  4779. fn: function (){
  4780. var self=this;
  4781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4782. return $core.withContext(function($ctx1) {
  4783. //>>excludeEnd("ctx");
  4784. var $2,$1,$receiver;
  4785. $2=self["@informationString"];
  4786. if(($receiver = $2) == null || $receiver.isNil){
  4787. $1="";
  4788. } else {
  4789. $1=$2;
  4790. };
  4791. return $1;
  4792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4793. }, function($ctx1) {$ctx1.fill(self,"informationString",{},$globals.HLInformationWidget)});
  4794. //>>excludeEnd("ctx");
  4795. },
  4796. //>>excludeStart("ide", pragmas.excludeIdeData);
  4797. args: [],
  4798. source: "informationString\x0a\x09^ informationString ifNil: [ '' ]",
  4799. referencedClasses: [],
  4800. //>>excludeEnd("ide");
  4801. messageSends: ["ifNil:"]
  4802. }),
  4803. $globals.HLInformationWidget);
  4804. $core.addMethod(
  4805. $core.method({
  4806. selector: "informationString:",
  4807. protocol: 'accessing',
  4808. fn: function (anObject){
  4809. var self=this;
  4810. self["@informationString"]=anObject;
  4811. return self;
  4812. },
  4813. //>>excludeStart("ide", pragmas.excludeIdeData);
  4814. args: ["anObject"],
  4815. source: "informationString: anObject\x0a\x09informationString := anObject",
  4816. referencedClasses: [],
  4817. //>>excludeEnd("ide");
  4818. messageSends: []
  4819. }),
  4820. $globals.HLInformationWidget);
  4821. $core.addMethod(
  4822. $core.method({
  4823. selector: "remove",
  4824. protocol: 'actions',
  4825. fn: function (){
  4826. var self=this;
  4827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4828. return $core.withContext(function($ctx1) {
  4829. //>>excludeEnd("ctx");
  4830. var $2,$1;
  4831. $recv((function(){
  4832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4833. return $core.withContext(function($ctx2) {
  4834. //>>excludeEnd("ctx");
  4835. $2=self._wrapper();
  4836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4837. $ctx2.sendIdx["wrapper"]=1;
  4838. //>>excludeEnd("ctx");
  4839. $1=$recv($2)._asJQuery();
  4840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4841. $ctx2.sendIdx["asJQuery"]=1;
  4842. //>>excludeEnd("ctx");
  4843. $recv($1)._fadeOut_((100));
  4844. return $recv((function(){
  4845. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4846. return $core.withContext(function($ctx3) {
  4847. //>>excludeEnd("ctx");
  4848. return $recv($recv(self._wrapper())._asJQuery())._remove();
  4849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4850. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4851. //>>excludeEnd("ctx");
  4852. }))._valueWithTimeout_((400));
  4853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4854. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4855. //>>excludeEnd("ctx");
  4856. }))._valueWithTimeout_((1500));
  4857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4858. $ctx1.sendIdx["valueWithTimeout:"]=1;
  4859. //>>excludeEnd("ctx");
  4860. return self;
  4861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4862. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLInformationWidget)});
  4863. //>>excludeEnd("ctx");
  4864. },
  4865. //>>excludeStart("ide", pragmas.excludeIdeData);
  4866. args: [],
  4867. 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",
  4868. referencedClasses: [],
  4869. //>>excludeEnd("ide");
  4870. messageSends: ["valueWithTimeout:", "fadeOut:", "asJQuery", "wrapper", "remove"]
  4871. }),
  4872. $globals.HLInformationWidget);
  4873. $core.addMethod(
  4874. $core.method({
  4875. selector: "renderContentOn:",
  4876. protocol: 'rendering',
  4877. fn: function (html){
  4878. var self=this;
  4879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4880. return $core.withContext(function($ctx1) {
  4881. //>>excludeEnd("ctx");
  4882. var $1,$2;
  4883. $1=$recv(html)._div();
  4884. $recv($1)._class_("growl");
  4885. $2=$recv($1)._with_(self._informationString());
  4886. self._remove();
  4887. return self;
  4888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4889. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLInformationWidget)});
  4890. //>>excludeEnd("ctx");
  4891. },
  4892. //>>excludeStart("ide", pragmas.excludeIdeData);
  4893. args: ["html"],
  4894. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'growl'; \x0a\x09\x09with: self informationString.\x0a\x09\x09\x0a\x09self remove",
  4895. referencedClasses: [],
  4896. //>>excludeEnd("ide");
  4897. messageSends: ["class:", "div", "with:", "informationString", "remove"]
  4898. }),
  4899. $globals.HLInformationWidget);
  4900. $core.addMethod(
  4901. $core.method({
  4902. selector: "show",
  4903. protocol: 'actions',
  4904. fn: function (){
  4905. var self=this;
  4906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4907. return $core.withContext(function($ctx1) {
  4908. //>>excludeEnd("ctx");
  4909. self._appendToJQuery_("body"._asJQuery());
  4910. return self;
  4911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4912. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLInformationWidget)});
  4913. //>>excludeEnd("ctx");
  4914. },
  4915. //>>excludeStart("ide", pragmas.excludeIdeData);
  4916. args: [],
  4917. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  4918. referencedClasses: [],
  4919. //>>excludeEnd("ide");
  4920. messageSends: ["appendToJQuery:", "asJQuery"]
  4921. }),
  4922. $globals.HLInformationWidget);
  4923. $core.addClass('HLManager', $globals.HLWidget, ['topBarWidget', 'tabsWidget', 'environment', 'history', 'announcer'], 'Helios-Core');
  4924. $core.addMethod(
  4925. $core.method({
  4926. selector: "activate:",
  4927. protocol: 'actions',
  4928. fn: function (aTab){
  4929. var self=this;
  4930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4931. return $core.withContext(function($ctx1) {
  4932. //>>excludeEnd("ctx");
  4933. $recv(self._tabsWidget())._activate_(aTab);
  4934. return self;
  4935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4936. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLManager)});
  4937. //>>excludeEnd("ctx");
  4938. },
  4939. //>>excludeStart("ide", pragmas.excludeIdeData);
  4940. args: ["aTab"],
  4941. source: "activate: aTab\x0a\x09self tabsWidget activate: aTab",
  4942. referencedClasses: [],
  4943. //>>excludeEnd("ide");
  4944. messageSends: ["activate:", "tabsWidget"]
  4945. }),
  4946. $globals.HLManager);
  4947. $core.addMethod(
  4948. $core.method({
  4949. selector: "activeTab",
  4950. protocol: 'accessing',
  4951. fn: function (){
  4952. var self=this;
  4953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4954. return $core.withContext(function($ctx1) {
  4955. //>>excludeEnd("ctx");
  4956. var $1;
  4957. $1=$recv(self._tabsWidget())._activeTab();
  4958. return $1;
  4959. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4960. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},$globals.HLManager)});
  4961. //>>excludeEnd("ctx");
  4962. },
  4963. //>>excludeStart("ide", pragmas.excludeIdeData);
  4964. args: [],
  4965. source: "activeTab\x0a\x09^ self tabsWidget activeTab",
  4966. referencedClasses: [],
  4967. //>>excludeEnd("ide");
  4968. messageSends: ["activeTab", "tabsWidget"]
  4969. }),
  4970. $globals.HLManager);
  4971. $core.addMethod(
  4972. $core.method({
  4973. selector: "addTab:",
  4974. protocol: 'actions',
  4975. fn: function (aTab){
  4976. var self=this;
  4977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4978. return $core.withContext(function($ctx1) {
  4979. //>>excludeEnd("ctx");
  4980. $recv(self._tabsWidget())._addTab_(aTab);
  4981. return self;
  4982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4983. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLManager)});
  4984. //>>excludeEnd("ctx");
  4985. },
  4986. //>>excludeStart("ide", pragmas.excludeIdeData);
  4987. args: ["aTab"],
  4988. source: "addTab: aTab\x0a\x09self tabsWidget addTab: aTab",
  4989. referencedClasses: [],
  4990. //>>excludeEnd("ide");
  4991. messageSends: ["addTab:", "tabsWidget"]
  4992. }),
  4993. $globals.HLManager);
  4994. $core.addMethod(
  4995. $core.method({
  4996. selector: "announcer",
  4997. protocol: 'accessing',
  4998. fn: function (){
  4999. var self=this;
  5000. function $Announcer(){return $globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  5001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5002. return $core.withContext(function($ctx1) {
  5003. //>>excludeEnd("ctx");
  5004. var $2,$1,$receiver;
  5005. $2=self["@announcer"];
  5006. if(($receiver = $2) == null || $receiver.isNil){
  5007. self["@announcer"]=$recv($Announcer())._new();
  5008. $1=self["@announcer"];
  5009. } else {
  5010. $1=$2;
  5011. };
  5012. return $1;
  5013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5014. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLManager)});
  5015. //>>excludeEnd("ctx");
  5016. },
  5017. //>>excludeStart("ide", pragmas.excludeIdeData);
  5018. args: [],
  5019. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  5020. referencedClasses: ["Announcer"],
  5021. //>>excludeEnd("ide");
  5022. messageSends: ["ifNil:", "new"]
  5023. }),
  5024. $globals.HLManager);
  5025. $core.addMethod(
  5026. $core.method({
  5027. selector: "confirm:ifFalse:",
  5028. protocol: 'actions',
  5029. fn: function (aString,aBlock){
  5030. var self=this;
  5031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5032. return $core.withContext(function($ctx1) {
  5033. //>>excludeEnd("ctx");
  5034. self._confirm_ifTrue_ifFalse_(aString,(function(){
  5035. }),aBlock);
  5036. return self;
  5037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5038. }, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5039. //>>excludeEnd("ctx");
  5040. },
  5041. //>>excludeStart("ide", pragmas.excludeIdeData);
  5042. args: ["aString", "aBlock"],
  5043. source: "confirm: aString ifFalse: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: []\x0a\x09\x09ifFalse: aBlock",
  5044. referencedClasses: [],
  5045. //>>excludeEnd("ide");
  5046. messageSends: ["confirm:ifTrue:ifFalse:"]
  5047. }),
  5048. $globals.HLManager);
  5049. $core.addMethod(
  5050. $core.method({
  5051. selector: "confirm:ifTrue:",
  5052. protocol: 'actions',
  5053. fn: function (aString,aBlock){
  5054. var self=this;
  5055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5056. return $core.withContext(function($ctx1) {
  5057. //>>excludeEnd("ctx");
  5058. self._confirm_ifTrue_ifFalse_(aString,aBlock,(function(){
  5059. }));
  5060. return self;
  5061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5062. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5063. //>>excludeEnd("ctx");
  5064. },
  5065. //>>excludeStart("ide", pragmas.excludeIdeData);
  5066. args: ["aString", "aBlock"],
  5067. source: "confirm: aString ifTrue: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: []",
  5068. referencedClasses: [],
  5069. //>>excludeEnd("ide");
  5070. messageSends: ["confirm:ifTrue:ifFalse:"]
  5071. }),
  5072. $globals.HLManager);
  5073. $core.addMethod(
  5074. $core.method({
  5075. selector: "confirm:ifTrue:ifFalse:",
  5076. protocol: 'actions',
  5077. fn: function (aString,aBlock,anotherBlock){
  5078. var self=this;
  5079. function $HLConfirmationWidget(){return $globals.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  5080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5081. return $core.withContext(function($ctx1) {
  5082. //>>excludeEnd("ctx");
  5083. var $1,$2;
  5084. $1=$recv($HLConfirmationWidget())._new();
  5085. $recv($1)._confirmationString_(aString);
  5086. $recv($1)._actionBlock_(aBlock);
  5087. $recv($1)._cancelBlock_(anotherBlock);
  5088. $2=$recv($1)._show();
  5089. return self;
  5090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5091. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLManager)});
  5092. //>>excludeEnd("ctx");
  5093. },
  5094. //>>excludeStart("ide", pragmas.excludeIdeData);
  5095. args: ["aString", "aBlock", "anotherBlock"],
  5096. 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",
  5097. referencedClasses: ["HLConfirmationWidget"],
  5098. //>>excludeEnd("ide");
  5099. messageSends: ["confirmationString:", "new", "actionBlock:", "cancelBlock:", "show"]
  5100. }),
  5101. $globals.HLManager);
  5102. $core.addMethod(
  5103. $core.method({
  5104. selector: "defaultEnvironment",
  5105. protocol: 'defaults',
  5106. fn: function (){
  5107. var self=this;
  5108. var parent,parentSmalltalkGlobals;
  5109. function $Environment(){return $globals.Environment||(typeof Environment=="undefined"?nil:Environment)}
  5110. function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
  5111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5112. return $core.withContext(function($ctx1) {
  5113. //>>excludeEnd("ctx");
  5114. var $1,$2,$3,$5,$4,$6,$7,$8,$9,$receiver;
  5115. $1=$recv(window)._opener();
  5116. if(($receiver = $1) == null || $receiver.isNil){
  5117. parent=$recv(window)._parent();
  5118. } else {
  5119. parent=$1;
  5120. };
  5121. $2=parent;
  5122. if(($receiver = $2) == null || $receiver.isNil){
  5123. $3=$recv($Environment())._new();
  5124. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5125. $ctx1.sendIdx["new"]=1;
  5126. //>>excludeEnd("ctx");
  5127. return $3;
  5128. } else {
  5129. $2;
  5130. };
  5131. $recv((function(){
  5132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5133. return $core.withContext(function($ctx2) {
  5134. //>>excludeEnd("ctx");
  5135. $5=$recv(parent)._at_("requirejs");
  5136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5137. $ctx2.sendIdx["at:"]=2;
  5138. //>>excludeEnd("ctx");
  5139. $4=$recv($5)._value_("amber/boot");
  5140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5141. $ctx2.sendIdx["value:"]=1;
  5142. //>>excludeEnd("ctx");
  5143. parentSmalltalkGlobals=$recv($4)._at_("globals");
  5144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5145. $ctx2.sendIdx["at:"]=1;
  5146. //>>excludeEnd("ctx");
  5147. return parentSmalltalkGlobals;
  5148. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5149. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5150. //>>excludeEnd("ctx");
  5151. }))._on_do_($Error(),(function(){
  5152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5153. return $core.withContext(function($ctx2) {
  5154. //>>excludeEnd("ctx");
  5155. $6=$recv(parent)._at_("requirejs");
  5156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5157. $ctx2.sendIdx["at:"]=3;
  5158. //>>excludeEnd("ctx");
  5159. parentSmalltalkGlobals=$recv($6)._value_("amber_vm/globals");
  5160. return parentSmalltalkGlobals;
  5161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5162. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  5163. //>>excludeEnd("ctx");
  5164. }));
  5165. $7=parentSmalltalkGlobals;
  5166. if(($receiver = $7) == null || $receiver.isNil){
  5167. $8=$recv($Environment())._new();
  5168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5169. $ctx1.sendIdx["new"]=2;
  5170. //>>excludeEnd("ctx");
  5171. return $8;
  5172. } else {
  5173. $7;
  5174. };
  5175. $9=$recv($recv(parentSmalltalkGlobals)._at_("Environment"))._new();
  5176. return $9;
  5177. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5178. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalkGlobals:parentSmalltalkGlobals},$globals.HLManager)});
  5179. //>>excludeEnd("ctx");
  5180. },
  5181. //>>excludeStart("ide", pragmas.excludeIdeData);
  5182. args: [],
  5183. 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\x09^ (parentSmalltalkGlobals at: 'Environment') new",
  5184. referencedClasses: ["Environment", "Error"],
  5185. //>>excludeEnd("ide");
  5186. messageSends: ["ifNil:", "opener", "parent", "new", "on:do:", "at:", "value:"]
  5187. }),
  5188. $globals.HLManager);
  5189. $core.addMethod(
  5190. $core.method({
  5191. selector: "environment",
  5192. protocol: 'accessing',
  5193. fn: function (){
  5194. var self=this;
  5195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5196. return $core.withContext(function($ctx1) {
  5197. //>>excludeEnd("ctx");
  5198. var $2,$1,$receiver;
  5199. $2=self["@environment"];
  5200. if(($receiver = $2) == null || $receiver.isNil){
  5201. self["@environment"]=self._defaultEnvironment();
  5202. $1=self["@environment"];
  5203. } else {
  5204. $1=$2;
  5205. };
  5206. return $1;
  5207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5208. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLManager)});
  5209. //>>excludeEnd("ctx");
  5210. },
  5211. //>>excludeStart("ide", pragmas.excludeIdeData);
  5212. args: [],
  5213. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  5214. referencedClasses: [],
  5215. //>>excludeEnd("ide");
  5216. messageSends: ["ifNil:", "defaultEnvironment"]
  5217. }),
  5218. $globals.HLManager);
  5219. $core.addMethod(
  5220. $core.method({
  5221. selector: "environment:",
  5222. protocol: 'accessing',
  5223. fn: function (anEnvironment){
  5224. var self=this;
  5225. self["@environment"]=anEnvironment;
  5226. return self;
  5227. },
  5228. //>>excludeStart("ide", pragmas.excludeIdeData);
  5229. args: ["anEnvironment"],
  5230. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  5231. referencedClasses: [],
  5232. //>>excludeEnd("ide");
  5233. messageSends: []
  5234. }),
  5235. $globals.HLManager);
  5236. $core.addMethod(
  5237. $core.method({
  5238. selector: "history",
  5239. protocol: 'accessing',
  5240. fn: function (){
  5241. var self=this;
  5242. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  5243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5244. return $core.withContext(function($ctx1) {
  5245. //>>excludeEnd("ctx");
  5246. var $2,$1,$receiver;
  5247. $2=self["@history"];
  5248. if(($receiver = $2) == null || $receiver.isNil){
  5249. self["@history"]=$recv($OrderedCollection())._new();
  5250. $1=self["@history"];
  5251. } else {
  5252. $1=$2;
  5253. };
  5254. return $1;
  5255. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5256. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLManager)});
  5257. //>>excludeEnd("ctx");
  5258. },
  5259. //>>excludeStart("ide", pragmas.excludeIdeData);
  5260. args: [],
  5261. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  5262. referencedClasses: ["OrderedCollection"],
  5263. //>>excludeEnd("ide");
  5264. messageSends: ["ifNil:", "new"]
  5265. }),
  5266. $globals.HLManager);
  5267. $core.addMethod(
  5268. $core.method({
  5269. selector: "history:",
  5270. protocol: 'accessing',
  5271. fn: function (aCollection){
  5272. var self=this;
  5273. self["@history"]=aCollection;
  5274. return self;
  5275. },
  5276. //>>excludeStart("ide", pragmas.excludeIdeData);
  5277. args: ["aCollection"],
  5278. source: "history: aCollection\x0a\x09history := aCollection",
  5279. referencedClasses: [],
  5280. //>>excludeEnd("ide");
  5281. messageSends: []
  5282. }),
  5283. $globals.HLManager);
  5284. $core.addMethod(
  5285. $core.method({
  5286. selector: "inform:",
  5287. protocol: 'actions',
  5288. fn: function (aString){
  5289. var self=this;
  5290. function $HLInformationWidget(){return $globals.HLInformationWidget||(typeof HLInformationWidget=="undefined"?nil:HLInformationWidget)}
  5291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5292. return $core.withContext(function($ctx1) {
  5293. //>>excludeEnd("ctx");
  5294. var $1,$2;
  5295. $1=$recv($HLInformationWidget())._new();
  5296. $recv($1)._informationString_(aString);
  5297. $2=$recv($1)._show();
  5298. return self;
  5299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5300. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLManager)});
  5301. //>>excludeEnd("ctx");
  5302. },
  5303. //>>excludeStart("ide", pragmas.excludeIdeData);
  5304. args: ["aString"],
  5305. source: "inform: aString\x0a\x09HLInformationWidget new\x0a\x09\x09informationString: aString;\x0a\x09\x09show",
  5306. referencedClasses: ["HLInformationWidget"],
  5307. //>>excludeEnd("ide");
  5308. messageSends: ["informationString:", "new", "show"]
  5309. }),
  5310. $globals.HLManager);
  5311. $core.addMethod(
  5312. $core.method({
  5313. selector: "keyBinder",
  5314. protocol: 'accessing',
  5315. fn: function (){
  5316. var self=this;
  5317. function $HLKeyBinder(){return $globals.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  5318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5319. return $core.withContext(function($ctx1) {
  5320. //>>excludeEnd("ctx");
  5321. var $1;
  5322. $1=$recv($HLKeyBinder())._current();
  5323. return $1;
  5324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5325. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},$globals.HLManager)});
  5326. //>>excludeEnd("ctx");
  5327. },
  5328. //>>excludeStart("ide", pragmas.excludeIdeData);
  5329. args: [],
  5330. source: "keyBinder\x0a\x09^ HLKeyBinder current",
  5331. referencedClasses: ["HLKeyBinder"],
  5332. //>>excludeEnd("ide");
  5333. messageSends: ["current"]
  5334. }),
  5335. $globals.HLManager);
  5336. $core.addMethod(
  5337. $core.method({
  5338. selector: "registerErrorHandler",
  5339. protocol: 'services',
  5340. fn: function (){
  5341. var self=this;
  5342. function $HLErrorHandler(){return $globals.HLErrorHandler||(typeof HLErrorHandler=="undefined"?nil:HLErrorHandler)}
  5343. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  5344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5345. return $core.withContext(function($ctx1) {
  5346. //>>excludeEnd("ctx");
  5347. var $1,$2;
  5348. $1=self._environment();
  5349. $2=$recv($HLErrorHandler())._new();
  5350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5351. $ctx1.sendIdx["new"]=1;
  5352. //>>excludeEnd("ctx");
  5353. $recv($1)._registerErrorHandler_($2);
  5354. $recv($ErrorHandler())._register_($recv($HLErrorHandler())._new());
  5355. return self;
  5356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5357. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler",{},$globals.HLManager)});
  5358. //>>excludeEnd("ctx");
  5359. },
  5360. //>>excludeStart("ide", pragmas.excludeIdeData);
  5361. args: [],
  5362. source: "registerErrorHandler\x0a\x09self environment registerErrorHandler: HLErrorHandler new.\x0a\x09ErrorHandler register: HLErrorHandler new",
  5363. referencedClasses: ["HLErrorHandler", "ErrorHandler"],
  5364. //>>excludeEnd("ide");
  5365. messageSends: ["registerErrorHandler:", "environment", "new", "register:"]
  5366. }),
  5367. $globals.HLManager);
  5368. $core.addMethod(
  5369. $core.method({
  5370. selector: "registerFinder",
  5371. protocol: 'services',
  5372. fn: function (){
  5373. var self=this;
  5374. function $HLFinder(){return $globals.HLFinder||(typeof HLFinder=="undefined"?nil:HLFinder)}
  5375. function $Finder(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}
  5376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5377. return $core.withContext(function($ctx1) {
  5378. //>>excludeEnd("ctx");
  5379. var $1,$2;
  5380. $1=self._environment();
  5381. $2=$recv($HLFinder())._new();
  5382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5383. $ctx1.sendIdx["new"]=1;
  5384. //>>excludeEnd("ctx");
  5385. $recv($1)._registerFinder_($2);
  5386. $recv($Finder())._register_($recv($HLFinder())._new());
  5387. return self;
  5388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5389. }, function($ctx1) {$ctx1.fill(self,"registerFinder",{},$globals.HLManager)});
  5390. //>>excludeEnd("ctx");
  5391. },
  5392. //>>excludeStart("ide", pragmas.excludeIdeData);
  5393. args: [],
  5394. source: "registerFinder\x0a\x09self environment registerFinder: HLFinder new.\x0a\x09Finder register: HLFinder new",
  5395. referencedClasses: ["HLFinder", "Finder"],
  5396. //>>excludeEnd("ide");
  5397. messageSends: ["registerFinder:", "environment", "new", "register:"]
  5398. }),
  5399. $globals.HLManager);
  5400. $core.addMethod(
  5401. $core.method({
  5402. selector: "registerInspector",
  5403. protocol: 'services',
  5404. fn: function (){
  5405. var self=this;
  5406. function $HLInspector(){return $globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  5407. function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  5408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5409. return $core.withContext(function($ctx1) {
  5410. //>>excludeEnd("ctx");
  5411. $recv(self._environment())._registerInspector_($HLInspector());
  5412. $recv($Inspector())._register_($HLInspector());
  5413. return self;
  5414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5415. }, function($ctx1) {$ctx1.fill(self,"registerInspector",{},$globals.HLManager)});
  5416. //>>excludeEnd("ctx");
  5417. },
  5418. //>>excludeStart("ide", pragmas.excludeIdeData);
  5419. args: [],
  5420. source: "registerInspector\x0a\x09self environment registerInspector: HLInspector.\x0a\x09Inspector register: HLInspector",
  5421. referencedClasses: ["HLInspector", "Inspector"],
  5422. //>>excludeEnd("ide");
  5423. messageSends: ["registerInspector:", "environment", "register:"]
  5424. }),
  5425. $globals.HLManager);
  5426. $core.addMethod(
  5427. $core.method({
  5428. selector: "registerProgressHandler",
  5429. protocol: 'services',
  5430. fn: function (){
  5431. var self=this;
  5432. function $HLProgressHandler(){return $globals.HLProgressHandler||(typeof HLProgressHandler=="undefined"?nil:HLProgressHandler)}
  5433. function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  5434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5435. return $core.withContext(function($ctx1) {
  5436. //>>excludeEnd("ctx");
  5437. var $1,$2;
  5438. $1=self._environment();
  5439. $2=$recv($HLProgressHandler())._new();
  5440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5441. $ctx1.sendIdx["new"]=1;
  5442. //>>excludeEnd("ctx");
  5443. $recv($1)._registerProgressHandler_($2);
  5444. $recv($ProgressHandler())._register_($recv($HLProgressHandler())._new());
  5445. return self;
  5446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5447. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler",{},$globals.HLManager)});
  5448. //>>excludeEnd("ctx");
  5449. },
  5450. //>>excludeStart("ide", pragmas.excludeIdeData);
  5451. args: [],
  5452. source: "registerProgressHandler\x0a\x09self environment registerProgressHandler: HLProgressHandler new.\x0a\x09ProgressHandler register: HLProgressHandler new",
  5453. referencedClasses: ["HLProgressHandler", "ProgressHandler"],
  5454. //>>excludeEnd("ide");
  5455. messageSends: ["registerProgressHandler:", "environment", "new", "register:"]
  5456. }),
  5457. $globals.HLManager);
  5458. $core.addMethod(
  5459. $core.method({
  5460. selector: "registerServices",
  5461. protocol: 'private',
  5462. fn: function (){
  5463. var self=this;
  5464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5465. return $core.withContext(function($ctx1) {
  5466. //>>excludeEnd("ctx");
  5467. var $1;
  5468. self._registerInspector();
  5469. self._registerErrorHandler();
  5470. self._registerProgressHandler();
  5471. self._registerTranscript();
  5472. $1=self._registerFinder();
  5473. return self;
  5474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5475. }, function($ctx1) {$ctx1.fill(self,"registerServices",{},$globals.HLManager)});
  5476. //>>excludeEnd("ctx");
  5477. },
  5478. //>>excludeStart("ide", pragmas.excludeIdeData);
  5479. args: [],
  5480. source: "registerServices\x0a\x09self\x0a\x09\x09registerInspector;\x0a\x09\x09registerErrorHandler;\x0a\x09\x09registerProgressHandler;\x0a\x09\x09registerTranscript;\x0a\x09\x09registerFinder",
  5481. referencedClasses: [],
  5482. //>>excludeEnd("ide");
  5483. messageSends: ["registerInspector", "registerErrorHandler", "registerProgressHandler", "registerTranscript", "registerFinder"]
  5484. }),
  5485. $globals.HLManager);
  5486. $core.addMethod(
  5487. $core.method({
  5488. selector: "registerTranscript",
  5489. protocol: 'services',
  5490. fn: function (){
  5491. var self=this;
  5492. function $HLTranscriptHandler(){return $globals.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
  5493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5494. return $core.withContext(function($ctx1) {
  5495. //>>excludeEnd("ctx");
  5496. $recv(self._environment())._registerTranscript_($HLTranscriptHandler());
  5497. return self;
  5498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5499. }, function($ctx1) {$ctx1.fill(self,"registerTranscript",{},$globals.HLManager)});
  5500. //>>excludeEnd("ctx");
  5501. },
  5502. //>>excludeStart("ide", pragmas.excludeIdeData);
  5503. args: [],
  5504. source: "registerTranscript\x0a\x09self environment registerTranscript: HLTranscriptHandler",
  5505. referencedClasses: ["HLTranscriptHandler"],
  5506. //>>excludeEnd("ide");
  5507. messageSends: ["registerTranscript:", "environment"]
  5508. }),
  5509. $globals.HLManager);
  5510. $core.addMethod(
  5511. $core.method({
  5512. selector: "removeActiveTab",
  5513. protocol: 'actions',
  5514. fn: function (){
  5515. var self=this;
  5516. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5517. return $core.withContext(function($ctx1) {
  5518. //>>excludeEnd("ctx");
  5519. $recv(self._tabsWidget())._removeActiveTab();
  5520. return self;
  5521. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5522. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLManager)});
  5523. //>>excludeEnd("ctx");
  5524. },
  5525. //>>excludeStart("ide", pragmas.excludeIdeData);
  5526. args: [],
  5527. source: "removeActiveTab\x0a\x09self tabsWidget removeActiveTab",
  5528. referencedClasses: [],
  5529. //>>excludeEnd("ide");
  5530. messageSends: ["removeActiveTab", "tabsWidget"]
  5531. }),
  5532. $globals.HLManager);
  5533. $core.addMethod(
  5534. $core.method({
  5535. selector: "removeTabForWidget:",
  5536. protocol: 'actions',
  5537. fn: function (aWidget){
  5538. var self=this;
  5539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5540. return $core.withContext(function($ctx1) {
  5541. //>>excludeEnd("ctx");
  5542. $recv(self._tabsWidget())._removeTabForWidget_(aWidget);
  5543. return self;
  5544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5545. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLManager)});
  5546. //>>excludeEnd("ctx");
  5547. },
  5548. //>>excludeStart("ide", pragmas.excludeIdeData);
  5549. args: ["aWidget"],
  5550. source: "removeTabForWidget: aWidget\x0a\x09self tabsWidget removeTabForWidget: aWidget",
  5551. referencedClasses: [],
  5552. //>>excludeEnd("ide");
  5553. messageSends: ["removeTabForWidget:", "tabsWidget"]
  5554. }),
  5555. $globals.HLManager);
  5556. $core.addMethod(
  5557. $core.method({
  5558. selector: "renderContentOn:",
  5559. protocol: 'rendering',
  5560. fn: function (html){
  5561. var self=this;
  5562. function $HLWelcomeWidget(){return $globals.HLWelcomeWidget||(typeof HLWelcomeWidget=="undefined"?nil:HLWelcomeWidget)}
  5563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5564. return $core.withContext(function($ctx1) {
  5565. //>>excludeEnd("ctx");
  5566. $recv(html)._with_(self._topBarWidget());
  5567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5568. $ctx1.sendIdx["with:"]=1;
  5569. //>>excludeEnd("ctx");
  5570. $recv(html)._with_(self._tabsWidget());
  5571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5572. $ctx1.sendIdx["with:"]=2;
  5573. //>>excludeEnd("ctx");
  5574. $recv(html)._with_($recv($HLWelcomeWidget())._new());
  5575. return self;
  5576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5577. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLManager)});
  5578. //>>excludeEnd("ctx");
  5579. },
  5580. //>>excludeStart("ide", pragmas.excludeIdeData);
  5581. args: ["html"],
  5582. source: "renderContentOn: html\x0a\x09html with: self topBarWidget.\x0a\x09html with: self tabsWidget.\x0a\x09html with: HLWelcomeWidget new",
  5583. referencedClasses: ["HLWelcomeWidget"],
  5584. //>>excludeEnd("ide");
  5585. messageSends: ["with:", "topBarWidget", "tabsWidget", "new"]
  5586. }),
  5587. $globals.HLManager);
  5588. $core.addMethod(
  5589. $core.method({
  5590. selector: "request:do:",
  5591. protocol: 'actions',
  5592. fn: function (aString,aBlock){
  5593. var self=this;
  5594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5595. return $core.withContext(function($ctx1) {
  5596. //>>excludeEnd("ctx");
  5597. self._request_value_do_(aString,"",aBlock);
  5598. return self;
  5599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5600. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5601. //>>excludeEnd("ctx");
  5602. },
  5603. //>>excludeStart("ide", pragmas.excludeIdeData);
  5604. args: ["aString", "aBlock"],
  5605. source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
  5606. referencedClasses: [],
  5607. //>>excludeEnd("ide");
  5608. messageSends: ["request:value:do:"]
  5609. }),
  5610. $globals.HLManager);
  5611. $core.addMethod(
  5612. $core.method({
  5613. selector: "request:value:do:",
  5614. protocol: 'actions',
  5615. fn: function (aString,valueString,aBlock){
  5616. var self=this;
  5617. function $HLRequestWidget(){return $globals.HLRequestWidget||(typeof HLRequestWidget=="undefined"?nil:HLRequestWidget)}
  5618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5619. return $core.withContext(function($ctx1) {
  5620. //>>excludeEnd("ctx");
  5621. var $1,$2;
  5622. $1=$recv($HLRequestWidget())._new();
  5623. $recv($1)._confirmationString_(aString);
  5624. $recv($1)._actionBlock_(aBlock);
  5625. $recv($1)._value_(valueString);
  5626. $2=$recv($1)._show();
  5627. return self;
  5628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5629. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLManager)});
  5630. //>>excludeEnd("ctx");
  5631. },
  5632. //>>excludeStart("ide", pragmas.excludeIdeData);
  5633. args: ["aString", "valueString", "aBlock"],
  5634. 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",
  5635. referencedClasses: ["HLRequestWidget"],
  5636. //>>excludeEnd("ide");
  5637. messageSends: ["confirmationString:", "new", "actionBlock:", "value:", "show"]
  5638. }),
  5639. $globals.HLManager);
  5640. $core.addMethod(
  5641. $core.method({
  5642. selector: "setEditorTheme:",
  5643. protocol: 'accessing',
  5644. fn: function (aTheme){
  5645. var self=this;
  5646. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5647. return $core.withContext(function($ctx1) {
  5648. //>>excludeEnd("ctx");
  5649. $recv("helios.editorTheme"._asSetting())._value_(aTheme);
  5650. return self;
  5651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5652. }, function($ctx1) {$ctx1.fill(self,"setEditorTheme:",{aTheme:aTheme},$globals.HLManager)});
  5653. //>>excludeEnd("ctx");
  5654. },
  5655. //>>excludeStart("ide", pragmas.excludeIdeData);
  5656. args: ["aTheme"],
  5657. source: "setEditorTheme: aTheme\x0a\x0a\x09'helios.editorTheme' asSetting value: aTheme",
  5658. referencedClasses: [],
  5659. //>>excludeEnd("ide");
  5660. messageSends: ["value:", "asSetting"]
  5661. }),
  5662. $globals.HLManager);
  5663. $core.addMethod(
  5664. $core.method({
  5665. selector: "setTheme:",
  5666. protocol: 'accessing',
  5667. fn: function (aTheme){
  5668. var self=this;
  5669. var currentTheme;
  5670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5671. return $core.withContext(function($ctx1) {
  5672. //>>excludeEnd("ctx");
  5673. var $1,$2;
  5674. currentTheme="helios.theme"._asSettingIfAbsent_("default");
  5675. $1="body"._asJQuery();
  5676. $recv($1)._removeClass_($recv(currentTheme)._value());
  5677. $2=$recv($1)._addClass_(aTheme);
  5678. $recv("helios.theme"._asSetting())._value_(aTheme);
  5679. return self;
  5680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5681. }, function($ctx1) {$ctx1.fill(self,"setTheme:",{aTheme:aTheme,currentTheme:currentTheme},$globals.HLManager)});
  5682. //>>excludeEnd("ctx");
  5683. },
  5684. //>>excludeStart("ide", pragmas.excludeIdeData);
  5685. args: ["aTheme"],
  5686. 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",
  5687. referencedClasses: [],
  5688. //>>excludeEnd("ide");
  5689. messageSends: ["asSettingIfAbsent:", "removeClass:", "asJQuery", "value", "addClass:", "value:", "asSetting"]
  5690. }),
  5691. $globals.HLManager);
  5692. $core.addMethod(
  5693. $core.method({
  5694. selector: "setup",
  5695. protocol: 'initialization',
  5696. fn: function (){
  5697. var self=this;
  5698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5699. return $core.withContext(function($ctx1) {
  5700. //>>excludeEnd("ctx");
  5701. var $1;
  5702. self._registerServices();
  5703. $1=self._setupEvents();
  5704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5705. $ctx1.sendIdx["setupEvents"]=1;
  5706. //>>excludeEnd("ctx");
  5707. $recv(self._keyBinder())._setupEvents();
  5708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5709. $ctx1.sendIdx["setupEvents"]=2;
  5710. //>>excludeEnd("ctx");
  5711. $recv(self._tabsWidget())._setupEvents();
  5712. self._setupTheme();
  5713. $recv("#helper"._asJQuery())._fadeOut();
  5714. return self;
  5715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5716. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager)});
  5717. //>>excludeEnd("ctx");
  5718. },
  5719. //>>excludeStart("ide", pragmas.excludeIdeData);
  5720. args: [],
  5721. 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",
  5722. referencedClasses: [],
  5723. //>>excludeEnd("ide");
  5724. messageSends: ["registerServices", "setupEvents", "keyBinder", "tabsWidget", "setupTheme", "fadeOut", "asJQuery"]
  5725. }),
  5726. $globals.HLManager);
  5727. $core.addMethod(
  5728. $core.method({
  5729. selector: "setupEvents",
  5730. protocol: 'private',
  5731. fn: function (){
  5732. var self=this;
  5733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5734. return $core.withContext(function($ctx1) {
  5735. //>>excludeEnd("ctx");
  5736. var $1,$2,$3,$4,$5;
  5737. $1="body"._asJQuery();
  5738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5739. $ctx1.sendIdx["asJQuery"]=1;
  5740. //>>excludeEnd("ctx");
  5741. $recv($1)._keydown_((function(event){
  5742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5743. return $core.withContext(function($ctx2) {
  5744. //>>excludeEnd("ctx");
  5745. $2=$recv(event)._ctrlKey();
  5746. if($core.assert($2)){
  5747. $3="body"._asJQuery();
  5748. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5749. $ctx2.sendIdx["asJQuery"]=2;
  5750. //>>excludeEnd("ctx");
  5751. return $recv($3)._addClass_("navigation");
  5752. };
  5753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5754. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  5755. //>>excludeEnd("ctx");
  5756. }));
  5757. $4="body"._asJQuery();
  5758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5759. $ctx1.sendIdx["asJQuery"]=3;
  5760. //>>excludeEnd("ctx");
  5761. $recv($4)._keyup_((function(event){
  5762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5763. return $core.withContext(function($ctx2) {
  5764. //>>excludeEnd("ctx");
  5765. $5="body"._asJQuery();
  5766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5767. $ctx2.sendIdx["asJQuery"]=4;
  5768. //>>excludeEnd("ctx");
  5769. return $recv($5)._removeClass_("navigation");
  5770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5771. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  5772. //>>excludeEnd("ctx");
  5773. }));
  5774. $recv($recv(window)._asJQuery())._resize_((function(event){
  5775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5776. return $core.withContext(function($ctx2) {
  5777. //>>excludeEnd("ctx");
  5778. return self._refresh();
  5779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5780. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,4)});
  5781. //>>excludeEnd("ctx");
  5782. }));
  5783. return self;
  5784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5785. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLManager)});
  5786. //>>excludeEnd("ctx");
  5787. },
  5788. //>>excludeStart("ide", pragmas.excludeIdeData);
  5789. args: [],
  5790. 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 ]",
  5791. referencedClasses: [],
  5792. //>>excludeEnd("ide");
  5793. messageSends: ["keydown:", "asJQuery", "ifTrue:", "ctrlKey", "addClass:", "keyup:", "removeClass:", "resize:", "refresh"]
  5794. }),
  5795. $globals.HLManager);
  5796. $core.addMethod(
  5797. $core.method({
  5798. selector: "setupTheme",
  5799. protocol: 'private',
  5800. fn: function (){
  5801. var self=this;
  5802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5803. return $core.withContext(function($ctx1) {
  5804. //>>excludeEnd("ctx");
  5805. var $1;
  5806. self._setTheme_("default");
  5807. $1=self._setEditorTheme_("default");
  5808. return self;
  5809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5810. }, function($ctx1) {$ctx1.fill(self,"setupTheme",{},$globals.HLManager)});
  5811. //>>excludeEnd("ctx");
  5812. },
  5813. //>>excludeStart("ide", pragmas.excludeIdeData);
  5814. args: [],
  5815. 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'.",
  5816. referencedClasses: [],
  5817. //>>excludeEnd("ide");
  5818. messageSends: ["setTheme:", "setEditorTheme:"]
  5819. }),
  5820. $globals.HLManager);
  5821. $core.addMethod(
  5822. $core.method({
  5823. selector: "tabWidth",
  5824. protocol: 'accessing',
  5825. fn: function (){
  5826. var self=this;
  5827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5828. return $core.withContext(function($ctx1) {
  5829. //>>excludeEnd("ctx");
  5830. var $1;
  5831. $1=$recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  5832. return $1;
  5833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5834. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLManager)});
  5835. //>>excludeEnd("ctx");
  5836. },
  5837. //>>excludeStart("ide", pragmas.excludeIdeData);
  5838. args: [],
  5839. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  5840. referencedClasses: [],
  5841. //>>excludeEnd("ide");
  5842. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  5843. }),
  5844. $globals.HLManager);
  5845. $core.addMethod(
  5846. $core.method({
  5847. selector: "tabs",
  5848. protocol: 'accessing',
  5849. fn: function (){
  5850. var self=this;
  5851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5852. return $core.withContext(function($ctx1) {
  5853. //>>excludeEnd("ctx");
  5854. var $1;
  5855. $1=$recv(self._tabsWidget())._tabs();
  5856. return $1;
  5857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5858. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLManager)});
  5859. //>>excludeEnd("ctx");
  5860. },
  5861. //>>excludeStart("ide", pragmas.excludeIdeData);
  5862. args: [],
  5863. source: "tabs\x0a\x09^ self tabsWidget tabs",
  5864. referencedClasses: [],
  5865. //>>excludeEnd("ide");
  5866. messageSends: ["tabs", "tabsWidget"]
  5867. }),
  5868. $globals.HLManager);
  5869. $core.addMethod(
  5870. $core.method({
  5871. selector: "tabsWidget",
  5872. protocol: 'accessing',
  5873. fn: function (){
  5874. var self=this;
  5875. function $HLTabsWidget(){return $globals.HLTabsWidget||(typeof HLTabsWidget=="undefined"?nil:HLTabsWidget)}
  5876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5877. return $core.withContext(function($ctx1) {
  5878. //>>excludeEnd("ctx");
  5879. var $2,$1,$receiver;
  5880. $2=self["@tabsWidget"];
  5881. if(($receiver = $2) == null || $receiver.isNil){
  5882. self["@tabsWidget"]=$recv($HLTabsWidget())._new();
  5883. $1=self["@tabsWidget"];
  5884. } else {
  5885. $1=$2;
  5886. };
  5887. return $1;
  5888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5889. }, function($ctx1) {$ctx1.fill(self,"tabsWidget",{},$globals.HLManager)});
  5890. //>>excludeEnd("ctx");
  5891. },
  5892. //>>excludeStart("ide", pragmas.excludeIdeData);
  5893. args: [],
  5894. source: "tabsWidget\x0a\x09^ tabsWidget ifNil: [ tabsWidget := HLTabsWidget new ]",
  5895. referencedClasses: ["HLTabsWidget"],
  5896. //>>excludeEnd("ide");
  5897. messageSends: ["ifNil:", "new"]
  5898. }),
  5899. $globals.HLManager);
  5900. $core.addMethod(
  5901. $core.method({
  5902. selector: "topBarWidget",
  5903. protocol: 'accessing',
  5904. fn: function (){
  5905. var self=this;
  5906. function $HLTopBarWidget(){return $globals.HLTopBarWidget||(typeof HLTopBarWidget=="undefined"?nil:HLTopBarWidget)}
  5907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5908. return $core.withContext(function($ctx1) {
  5909. //>>excludeEnd("ctx");
  5910. var $2,$1,$receiver;
  5911. $2=self["@topBarWidget"];
  5912. if(($receiver = $2) == null || $receiver.isNil){
  5913. self["@topBarWidget"]=$recv($HLTopBarWidget())._new();
  5914. $1=self["@topBarWidget"];
  5915. } else {
  5916. $1=$2;
  5917. };
  5918. return $1;
  5919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5920. }, function($ctx1) {$ctx1.fill(self,"topBarWidget",{},$globals.HLManager)});
  5921. //>>excludeEnd("ctx");
  5922. },
  5923. //>>excludeStart("ide", pragmas.excludeIdeData);
  5924. args: [],
  5925. source: "topBarWidget\x0a\x09^ topBarWidget ifNil: [ topBarWidget := HLTopBarWidget new ]",
  5926. referencedClasses: ["HLTopBarWidget"],
  5927. //>>excludeEnd("ide");
  5928. messageSends: ["ifNil:", "new"]
  5929. }),
  5930. $globals.HLManager);
  5931. $globals.HLManager.klass.iVarNames = ['current'];
  5932. $core.addMethod(
  5933. $core.method({
  5934. selector: "current",
  5935. protocol: 'accessing',
  5936. fn: function (){
  5937. var self=this;
  5938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5939. return $core.withContext(function($ctx1) {
  5940. //>>excludeEnd("ctx");
  5941. var $2,$1,$receiver;
  5942. $2=self["@current"];
  5943. if(($receiver = $2) == null || $receiver.isNil){
  5944. self["@current"]=$recv(self._basicNew())._initialize();
  5945. $1=self["@current"];
  5946. } else {
  5947. $1=$2;
  5948. };
  5949. return $1;
  5950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5951. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.HLManager.klass)});
  5952. //>>excludeEnd("ctx");
  5953. },
  5954. //>>excludeStart("ide", pragmas.excludeIdeData);
  5955. args: [],
  5956. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  5957. referencedClasses: [],
  5958. //>>excludeEnd("ide");
  5959. messageSends: ["ifNil:", "initialize", "basicNew"]
  5960. }),
  5961. $globals.HLManager.klass);
  5962. $core.addMethod(
  5963. $core.method({
  5964. selector: "new",
  5965. protocol: 'instance creation',
  5966. fn: function (){
  5967. var self=this;
  5968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5969. return $core.withContext(function($ctx1) {
  5970. //>>excludeEnd("ctx");
  5971. self._shouldNotImplement();
  5972. return self;
  5973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5974. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.HLManager.klass)});
  5975. //>>excludeEnd("ctx");
  5976. },
  5977. //>>excludeStart("ide", pragmas.excludeIdeData);
  5978. args: [],
  5979. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  5980. referencedClasses: [],
  5981. //>>excludeEnd("ide");
  5982. messageSends: ["shouldNotImplement"]
  5983. }),
  5984. $globals.HLManager.klass);
  5985. $core.addMethod(
  5986. $core.method({
  5987. selector: "setup",
  5988. protocol: 'initialization',
  5989. fn: function (){
  5990. var self=this;
  5991. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5992. return $core.withContext(function($ctx1) {
  5993. //>>excludeEnd("ctx");
  5994. var $1,$2;
  5995. $1=self._current();
  5996. $recv($1)._setup();
  5997. $2=$recv($1)._appendToJQuery_("body"._asJQuery());
  5998. return self;
  5999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6000. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager.klass)});
  6001. //>>excludeEnd("ctx");
  6002. },
  6003. //>>excludeStart("ide", pragmas.excludeIdeData);
  6004. args: [],
  6005. source: "setup\x0a\x09self current \x0a\x09\x09setup;\x0a\x09\x09appendToJQuery: 'body' asJQuery",
  6006. referencedClasses: [],
  6007. //>>excludeEnd("ide");
  6008. messageSends: ["setup", "current", "appendToJQuery:", "asJQuery"]
  6009. }),
  6010. $globals.HLManager.klass);
  6011. $core.addClass('HLModalWidget', $globals.HLWidget, [], 'Helios-Core');
  6012. //>>excludeStart("ide", pragmas.excludeIdeData);
  6013. $globals.HLModalWidget.comment="I implement an abstract modal widget.";
  6014. //>>excludeEnd("ide");
  6015. $core.addMethod(
  6016. $core.method({
  6017. selector: "giveFocusToButton:",
  6018. protocol: 'private',
  6019. fn: function (aButton){
  6020. var self=this;
  6021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6022. return $core.withContext(function($ctx1) {
  6023. //>>excludeEnd("ctx");
  6024. $recv($recv(aButton)._asJQuery())._focus();
  6025. return self;
  6026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6027. }, function($ctx1) {$ctx1.fill(self,"giveFocusToButton:",{aButton:aButton},$globals.HLModalWidget)});
  6028. //>>excludeEnd("ctx");
  6029. },
  6030. //>>excludeStart("ide", pragmas.excludeIdeData);
  6031. args: ["aButton"],
  6032. source: "giveFocusToButton: aButton\x0a\x09aButton asJQuery focus",
  6033. referencedClasses: [],
  6034. //>>excludeEnd("ide");
  6035. messageSends: ["focus", "asJQuery"]
  6036. }),
  6037. $globals.HLModalWidget);
  6038. $core.addMethod(
  6039. $core.method({
  6040. selector: "hasButtons",
  6041. protocol: 'rendering',
  6042. fn: function (){
  6043. var self=this;
  6044. return true;
  6045. },
  6046. //>>excludeStart("ide", pragmas.excludeIdeData);
  6047. args: [],
  6048. source: "hasButtons\x0a\x09^ true",
  6049. referencedClasses: [],
  6050. //>>excludeEnd("ide");
  6051. messageSends: []
  6052. }),
  6053. $globals.HLModalWidget);
  6054. $core.addMethod(
  6055. $core.method({
  6056. selector: "remove",
  6057. protocol: 'actions',
  6058. fn: function (){
  6059. var self=this;
  6060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6061. return $core.withContext(function($ctx1) {
  6062. //>>excludeEnd("ctx");
  6063. var $1,$2;
  6064. $1=".dialog"._asJQuery();
  6065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6066. $ctx1.sendIdx["asJQuery"]=1;
  6067. //>>excludeEnd("ctx");
  6068. $recv($1)._removeClass_("active");
  6069. $recv((function(){
  6070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6071. return $core.withContext(function($ctx2) {
  6072. //>>excludeEnd("ctx");
  6073. $2="#overlay"._asJQuery();
  6074. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6075. $ctx2.sendIdx["asJQuery"]=2;
  6076. //>>excludeEnd("ctx");
  6077. $recv($2)._remove();
  6078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6079. $ctx2.sendIdx["remove"]=1;
  6080. //>>excludeEnd("ctx");
  6081. return $recv($recv(self["@wrapper"])._asJQuery())._remove();
  6082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6083. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6084. //>>excludeEnd("ctx");
  6085. }))._valueWithTimeout_((300));
  6086. return self;
  6087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6088. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLModalWidget)});
  6089. //>>excludeEnd("ctx");
  6090. },
  6091. //>>excludeStart("ide", pragmas.excludeIdeData);
  6092. args: [],
  6093. 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",
  6094. referencedClasses: [],
  6095. //>>excludeEnd("ide");
  6096. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]
  6097. }),
  6098. $globals.HLModalWidget);
  6099. $core.addMethod(
  6100. $core.method({
  6101. selector: "renderButtonsOn:",
  6102. protocol: 'rendering',
  6103. fn: function (html){
  6104. var self=this;
  6105. return self;
  6106. },
  6107. //>>excludeStart("ide", pragmas.excludeIdeData);
  6108. args: ["html"],
  6109. source: "renderButtonsOn: html",
  6110. referencedClasses: [],
  6111. //>>excludeEnd("ide");
  6112. messageSends: []
  6113. }),
  6114. $globals.HLModalWidget);
  6115. $core.addMethod(
  6116. $core.method({
  6117. selector: "renderContentOn:",
  6118. protocol: 'rendering',
  6119. fn: function (html){
  6120. var self=this;
  6121. var confirmButton;
  6122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6123. return $core.withContext(function($ctx1) {
  6124. //>>excludeEnd("ctx");
  6125. var $1,$2,$4,$3;
  6126. $1=$recv(html)._div();
  6127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6128. $ctx1.sendIdx["div"]=1;
  6129. //>>excludeEnd("ctx");
  6130. $recv($1)._id_("overlay");
  6131. $2=$recv(html)._div();
  6132. $recv($2)._class_("dialog ".__comma(self._cssClass()));
  6133. $3=$recv($2)._with_((function(){
  6134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6135. return $core.withContext(function($ctx2) {
  6136. //>>excludeEnd("ctx");
  6137. self._renderMainOn_(html);
  6138. $4=self._hasButtons();
  6139. if($core.assert($4)){
  6140. return self._renderButtonsOn_(html);
  6141. };
  6142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6143. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6144. //>>excludeEnd("ctx");
  6145. }));
  6146. $recv(".dialog"._asJQuery())._addClass_("active");
  6147. self._setupKeyBindings();
  6148. return self;
  6149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6150. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},$globals.HLModalWidget)});
  6151. //>>excludeEnd("ctx");
  6152. },
  6153. //>>excludeStart("ide", pragmas.excludeIdeData);
  6154. args: ["html"],
  6155. source: "renderContentOn: html\x0a\x09| confirmButton |\x0a\x09\x0a\x09html div id: 'overlay'.\x0a\x09\x0a\x09html div \x0a\x09\x09class: 'dialog ', self cssClass;\x0a\x09\x09with: [\x0a\x09\x09\x09self renderMainOn: html.\x0a\x09\x09\x09self hasButtons ifTrue: [ \x0a\x09\x09\x09\x09self renderButtonsOn: html ] ].\x0a\x0a\x09'.dialog' asJQuery addClass: 'active'.\x0a\x09self setupKeyBindings",
  6156. referencedClasses: [],
  6157. //>>excludeEnd("ide");
  6158. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "ifTrue:", "hasButtons", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]
  6159. }),
  6160. $globals.HLModalWidget);
  6161. $core.addMethod(
  6162. $core.method({
  6163. selector: "renderMainOn:",
  6164. protocol: 'rendering',
  6165. fn: function (html){
  6166. var self=this;
  6167. return self;
  6168. },
  6169. //>>excludeStart("ide", pragmas.excludeIdeData);
  6170. args: ["html"],
  6171. source: "renderMainOn: html",
  6172. referencedClasses: [],
  6173. //>>excludeEnd("ide");
  6174. messageSends: []
  6175. }),
  6176. $globals.HLModalWidget);
  6177. $core.addMethod(
  6178. $core.method({
  6179. selector: "setupKeyBindings",
  6180. protocol: 'rendering',
  6181. fn: function (){
  6182. var self=this;
  6183. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  6184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6185. return $core.withContext(function($ctx1) {
  6186. //>>excludeEnd("ctx");
  6187. var $1;
  6188. $recv(".dialog"._asJQuery())._keyup_((function(e){
  6189. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6190. return $core.withContext(function($ctx2) {
  6191. //>>excludeEnd("ctx");
  6192. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($String())._esc())._asciiValue());
  6193. if($core.assert($1)){
  6194. return self._cancel();
  6195. };
  6196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6197. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  6198. //>>excludeEnd("ctx");
  6199. }));
  6200. return self;
  6201. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6202. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLModalWidget)});
  6203. //>>excludeEnd("ctx");
  6204. },
  6205. //>>excludeStart("ide", pragmas.excludeIdeData);
  6206. args: [],
  6207. source: "setupKeyBindings\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String esc asciiValue ifTrue: [ self cancel ] ]",
  6208. referencedClasses: ["String"],
  6209. //>>excludeEnd("ide");
  6210. messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "esc", "cancel"]
  6211. }),
  6212. $globals.HLModalWidget);
  6213. $core.addMethod(
  6214. $core.method({
  6215. selector: "show",
  6216. protocol: 'actions',
  6217. fn: function (){
  6218. var self=this;
  6219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6220. return $core.withContext(function($ctx1) {
  6221. //>>excludeEnd("ctx");
  6222. self._appendToJQuery_("body"._asJQuery());
  6223. return self;
  6224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6225. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLModalWidget)});
  6226. //>>excludeEnd("ctx");
  6227. },
  6228. //>>excludeStart("ide", pragmas.excludeIdeData);
  6229. args: [],
  6230. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  6231. referencedClasses: [],
  6232. //>>excludeEnd("ide");
  6233. messageSends: ["appendToJQuery:", "asJQuery"]
  6234. }),
  6235. $globals.HLModalWidget);
  6236. $core.addClass('HLConfirmationWidget', $globals.HLModalWidget, ['cancelButtonLabel', 'confirmButtonLabel', 'confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  6237. //>>excludeStart("ide", pragmas.excludeIdeData);
  6238. $globals.HLConfirmationWidget.comment="I display confirmation dialog. \x0a\x0a## API\x0a\x0aHLWidget contains convenience methods like `HLWidget >> #confirm:ifTrue:` for creating confirmation dialogs.";
  6239. //>>excludeEnd("ide");
  6240. $core.addMethod(
  6241. $core.method({
  6242. selector: "actionBlock",
  6243. protocol: 'accessing',
  6244. fn: function (){
  6245. var self=this;
  6246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6247. return $core.withContext(function($ctx1) {
  6248. //>>excludeEnd("ctx");
  6249. var $2,$1,$receiver;
  6250. $2=self["@actionBlock"];
  6251. if(($receiver = $2) == null || $receiver.isNil){
  6252. $1=(function(){
  6253. });
  6254. } else {
  6255. $1=$2;
  6256. };
  6257. return $1;
  6258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6259. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},$globals.HLConfirmationWidget)});
  6260. //>>excludeEnd("ctx");
  6261. },
  6262. //>>excludeStart("ide", pragmas.excludeIdeData);
  6263. args: [],
  6264. source: "actionBlock\x0a\x09^ actionBlock ifNil: [ [] ]",
  6265. referencedClasses: [],
  6266. //>>excludeEnd("ide");
  6267. messageSends: ["ifNil:"]
  6268. }),
  6269. $globals.HLConfirmationWidget);
  6270. $core.addMethod(
  6271. $core.method({
  6272. selector: "actionBlock:",
  6273. protocol: 'accessing',
  6274. fn: function (aBlock){
  6275. var self=this;
  6276. self["@actionBlock"]=aBlock;
  6277. return self;
  6278. },
  6279. //>>excludeStart("ide", pragmas.excludeIdeData);
  6280. args: ["aBlock"],
  6281. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  6282. referencedClasses: [],
  6283. //>>excludeEnd("ide");
  6284. messageSends: []
  6285. }),
  6286. $globals.HLConfirmationWidget);
  6287. $core.addMethod(
  6288. $core.method({
  6289. selector: "cancel",
  6290. protocol: 'actions',
  6291. fn: function (){
  6292. var self=this;
  6293. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6294. return $core.withContext(function($ctx1) {
  6295. //>>excludeEnd("ctx");
  6296. $recv(self._cancelBlock())._value();
  6297. self._remove();
  6298. return self;
  6299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6300. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLConfirmationWidget)});
  6301. //>>excludeEnd("ctx");
  6302. },
  6303. //>>excludeStart("ide", pragmas.excludeIdeData);
  6304. args: [],
  6305. source: "cancel\x0a\x09self cancelBlock value.\x0a\x09self remove",
  6306. referencedClasses: [],
  6307. //>>excludeEnd("ide");
  6308. messageSends: ["value", "cancelBlock", "remove"]
  6309. }),
  6310. $globals.HLConfirmationWidget);
  6311. $core.addMethod(
  6312. $core.method({
  6313. selector: "cancelBlock",
  6314. protocol: 'accessing',
  6315. fn: function (){
  6316. var self=this;
  6317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6318. return $core.withContext(function($ctx1) {
  6319. //>>excludeEnd("ctx");
  6320. var $2,$1,$receiver;
  6321. $2=self["@cancelBlock"];
  6322. if(($receiver = $2) == null || $receiver.isNil){
  6323. $1=(function(){
  6324. });
  6325. } else {
  6326. $1=$2;
  6327. };
  6328. return $1;
  6329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6330. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},$globals.HLConfirmationWidget)});
  6331. //>>excludeEnd("ctx");
  6332. },
  6333. //>>excludeStart("ide", pragmas.excludeIdeData);
  6334. args: [],
  6335. source: "cancelBlock\x0a\x09^ cancelBlock ifNil: [ [] ]",
  6336. referencedClasses: [],
  6337. //>>excludeEnd("ide");
  6338. messageSends: ["ifNil:"]
  6339. }),
  6340. $globals.HLConfirmationWidget);
  6341. $core.addMethod(
  6342. $core.method({
  6343. selector: "cancelBlock:",
  6344. protocol: 'accessing',
  6345. fn: function (aBlock){
  6346. var self=this;
  6347. self["@cancelBlock"]=aBlock;
  6348. return self;
  6349. },
  6350. //>>excludeStart("ide", pragmas.excludeIdeData);
  6351. args: ["aBlock"],
  6352. source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
  6353. referencedClasses: [],
  6354. //>>excludeEnd("ide");
  6355. messageSends: []
  6356. }),
  6357. $globals.HLConfirmationWidget);
  6358. $core.addMethod(
  6359. $core.method({
  6360. selector: "cancelButtonLabel",
  6361. protocol: 'accessing',
  6362. fn: function (){
  6363. var self=this;
  6364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6365. return $core.withContext(function($ctx1) {
  6366. //>>excludeEnd("ctx");
  6367. var $2,$1,$receiver;
  6368. $2=self["@cancelButtonLabel"];
  6369. if(($receiver = $2) == null || $receiver.isNil){
  6370. $1="Cancel";
  6371. } else {
  6372. $1=$2;
  6373. };
  6374. return $1;
  6375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6376. }, function($ctx1) {$ctx1.fill(self,"cancelButtonLabel",{},$globals.HLConfirmationWidget)});
  6377. //>>excludeEnd("ctx");
  6378. },
  6379. //>>excludeStart("ide", pragmas.excludeIdeData);
  6380. args: [],
  6381. source: "cancelButtonLabel\x0a\x09^ cancelButtonLabel ifNil: [ 'Cancel' ]",
  6382. referencedClasses: [],
  6383. //>>excludeEnd("ide");
  6384. messageSends: ["ifNil:"]
  6385. }),
  6386. $globals.HLConfirmationWidget);
  6387. $core.addMethod(
  6388. $core.method({
  6389. selector: "cancelButtonLabel:",
  6390. protocol: 'accessing',
  6391. fn: function (aString){
  6392. var self=this;
  6393. var $1;
  6394. self["@cancelButtonLabel"]=aString;
  6395. $1=self["@cancelButtonLabel"];
  6396. return $1;
  6397. },
  6398. //>>excludeStart("ide", pragmas.excludeIdeData);
  6399. args: ["aString"],
  6400. source: "cancelButtonLabel: aString\x0a\x09^ cancelButtonLabel := aString",
  6401. referencedClasses: [],
  6402. //>>excludeEnd("ide");
  6403. messageSends: []
  6404. }),
  6405. $globals.HLConfirmationWidget);
  6406. $core.addMethod(
  6407. $core.method({
  6408. selector: "confirm",
  6409. protocol: 'actions',
  6410. fn: function (){
  6411. var self=this;
  6412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6413. return $core.withContext(function($ctx1) {
  6414. //>>excludeEnd("ctx");
  6415. self._remove();
  6416. $recv(self._actionBlock())._value();
  6417. return self;
  6418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6419. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLConfirmationWidget)});
  6420. //>>excludeEnd("ctx");
  6421. },
  6422. //>>excludeStart("ide", pragmas.excludeIdeData);
  6423. args: [],
  6424. source: "confirm\x0a\x09self remove.\x0a\x09self actionBlock value",
  6425. referencedClasses: [],
  6426. //>>excludeEnd("ide");
  6427. messageSends: ["remove", "value", "actionBlock"]
  6428. }),
  6429. $globals.HLConfirmationWidget);
  6430. $core.addMethod(
  6431. $core.method({
  6432. selector: "confirmButtonLabel",
  6433. protocol: 'accessing',
  6434. fn: function (){
  6435. var self=this;
  6436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6437. return $core.withContext(function($ctx1) {
  6438. //>>excludeEnd("ctx");
  6439. var $2,$1,$receiver;
  6440. $2=self["@confirmButtonLabel"];
  6441. if(($receiver = $2) == null || $receiver.isNil){
  6442. $1="Confirm";
  6443. } else {
  6444. $1=$2;
  6445. };
  6446. return $1;
  6447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6448. }, function($ctx1) {$ctx1.fill(self,"confirmButtonLabel",{},$globals.HLConfirmationWidget)});
  6449. //>>excludeEnd("ctx");
  6450. },
  6451. //>>excludeStart("ide", pragmas.excludeIdeData);
  6452. args: [],
  6453. source: "confirmButtonLabel\x0a\x09^ confirmButtonLabel ifNil: [ 'Confirm' ]",
  6454. referencedClasses: [],
  6455. //>>excludeEnd("ide");
  6456. messageSends: ["ifNil:"]
  6457. }),
  6458. $globals.HLConfirmationWidget);
  6459. $core.addMethod(
  6460. $core.method({
  6461. selector: "confirmButtonLabel:",
  6462. protocol: 'accessing',
  6463. fn: function (aString){
  6464. var self=this;
  6465. var $1;
  6466. self["@confirmButtonLabel"]=aString;
  6467. $1=self["@confirmButtonLabel"];
  6468. return $1;
  6469. },
  6470. //>>excludeStart("ide", pragmas.excludeIdeData);
  6471. args: ["aString"],
  6472. source: "confirmButtonLabel: aString\x0a\x09^ confirmButtonLabel := aString",
  6473. referencedClasses: [],
  6474. //>>excludeEnd("ide");
  6475. messageSends: []
  6476. }),
  6477. $globals.HLConfirmationWidget);
  6478. $core.addMethod(
  6479. $core.method({
  6480. selector: "confirmationString",
  6481. protocol: 'accessing',
  6482. fn: function (){
  6483. var self=this;
  6484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6485. return $core.withContext(function($ctx1) {
  6486. //>>excludeEnd("ctx");
  6487. var $2,$1,$receiver;
  6488. $2=self["@confirmationString"];
  6489. if(($receiver = $2) == null || $receiver.isNil){
  6490. $1="Confirm";
  6491. } else {
  6492. $1=$2;
  6493. };
  6494. return $1;
  6495. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6496. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},$globals.HLConfirmationWidget)});
  6497. //>>excludeEnd("ctx");
  6498. },
  6499. //>>excludeStart("ide", pragmas.excludeIdeData);
  6500. args: [],
  6501. source: "confirmationString\x0a\x09^ confirmationString ifNil: [ 'Confirm' ]",
  6502. referencedClasses: [],
  6503. //>>excludeEnd("ide");
  6504. messageSends: ["ifNil:"]
  6505. }),
  6506. $globals.HLConfirmationWidget);
  6507. $core.addMethod(
  6508. $core.method({
  6509. selector: "confirmationString:",
  6510. protocol: 'accessing',
  6511. fn: function (aString){
  6512. var self=this;
  6513. self["@confirmationString"]=aString;
  6514. return self;
  6515. },
  6516. //>>excludeStart("ide", pragmas.excludeIdeData);
  6517. args: ["aString"],
  6518. source: "confirmationString: aString\x0a\x09confirmationString := aString",
  6519. referencedClasses: [],
  6520. //>>excludeEnd("ide");
  6521. messageSends: []
  6522. }),
  6523. $globals.HLConfirmationWidget);
  6524. $core.addMethod(
  6525. $core.method({
  6526. selector: "renderButtonsOn:",
  6527. protocol: 'rendering',
  6528. fn: function (html){
  6529. var self=this;
  6530. var confirmButton;
  6531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6532. return $core.withContext(function($ctx1) {
  6533. //>>excludeEnd("ctx");
  6534. var $1,$3,$4,$5,$6,$2;
  6535. $1=$recv(html)._div();
  6536. $recv($1)._class_("buttons");
  6537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6538. $ctx1.sendIdx["class:"]=1;
  6539. //>>excludeEnd("ctx");
  6540. $2=$recv($1)._with_((function(){
  6541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6542. return $core.withContext(function($ctx2) {
  6543. //>>excludeEnd("ctx");
  6544. $3=$recv(html)._button();
  6545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6546. $ctx2.sendIdx["button"]=1;
  6547. //>>excludeEnd("ctx");
  6548. $recv($3)._class_("button");
  6549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6550. $ctx2.sendIdx["class:"]=2;
  6551. //>>excludeEnd("ctx");
  6552. $recv($3)._with_(self._cancelButtonLabel());
  6553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6554. $ctx2.sendIdx["with:"]=2;
  6555. //>>excludeEnd("ctx");
  6556. $4=$recv($3)._onClick_((function(){
  6557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6558. return $core.withContext(function($ctx3) {
  6559. //>>excludeEnd("ctx");
  6560. return self._cancel();
  6561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6562. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6563. //>>excludeEnd("ctx");
  6564. }));
  6565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6566. $ctx2.sendIdx["onClick:"]=1;
  6567. //>>excludeEnd("ctx");
  6568. $4;
  6569. $5=$recv(html)._button();
  6570. $recv($5)._class_("button default");
  6571. $recv($5)._with_(self._confirmButtonLabel());
  6572. $6=$recv($5)._onClick_((function(){
  6573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6574. return $core.withContext(function($ctx3) {
  6575. //>>excludeEnd("ctx");
  6576. return self._confirm();
  6577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6578. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  6579. //>>excludeEnd("ctx");
  6580. }));
  6581. confirmButton=$6;
  6582. return confirmButton;
  6583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6584. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6585. //>>excludeEnd("ctx");
  6586. }));
  6587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6588. $ctx1.sendIdx["with:"]=1;
  6589. //>>excludeEnd("ctx");
  6590. self._giveFocusToButton_(confirmButton);
  6591. return self;
  6592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6593. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLConfirmationWidget)});
  6594. //>>excludeEnd("ctx");
  6595. },
  6596. //>>excludeStart("ide", pragmas.excludeIdeData);
  6597. args: ["html"],
  6598. 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",
  6599. referencedClasses: [],
  6600. //>>excludeEnd("ide");
  6601. messageSends: ["class:", "div", "with:", "button", "cancelButtonLabel", "onClick:", "cancel", "confirmButtonLabel", "confirm", "giveFocusToButton:"]
  6602. }),
  6603. $globals.HLConfirmationWidget);
  6604. $core.addMethod(
  6605. $core.method({
  6606. selector: "renderMainOn:",
  6607. protocol: 'rendering',
  6608. fn: function (html){
  6609. var self=this;
  6610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6611. return $core.withContext(function($ctx1) {
  6612. //>>excludeEnd("ctx");
  6613. var $1,$2;
  6614. $1=$recv(html)._span();
  6615. $recv($1)._class_("head");
  6616. $2=$recv($1)._with_(self._confirmationString());
  6617. return self;
  6618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6619. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLConfirmationWidget)});
  6620. //>>excludeEnd("ctx");
  6621. },
  6622. //>>excludeStart("ide", pragmas.excludeIdeData);
  6623. args: ["html"],
  6624. source: "renderMainOn: html\x0a\x09html span \x0a\x09\x09class: 'head'; \x0a\x09\x09with: self confirmationString",
  6625. referencedClasses: [],
  6626. //>>excludeEnd("ide");
  6627. messageSends: ["class:", "span", "with:", "confirmationString"]
  6628. }),
  6629. $globals.HLConfirmationWidget);
  6630. $core.addClass('HLRequestWidget', $globals.HLConfirmationWidget, ['input', 'multiline', 'value'], 'Helios-Core');
  6631. //>>excludeStart("ide", pragmas.excludeIdeData);
  6632. $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.";
  6633. //>>excludeEnd("ide");
  6634. $core.addMethod(
  6635. $core.method({
  6636. selector: "beMultiline",
  6637. protocol: 'accessing',
  6638. fn: function (){
  6639. var self=this;
  6640. self["@multiline"]=true;
  6641. return self;
  6642. },
  6643. //>>excludeStart("ide", pragmas.excludeIdeData);
  6644. args: [],
  6645. source: "beMultiline\x0a\x09multiline := true",
  6646. referencedClasses: [],
  6647. //>>excludeEnd("ide");
  6648. messageSends: []
  6649. }),
  6650. $globals.HLRequestWidget);
  6651. $core.addMethod(
  6652. $core.method({
  6653. selector: "beSingleline",
  6654. protocol: 'accessing',
  6655. fn: function (){
  6656. var self=this;
  6657. self["@multiline"]=false;
  6658. return self;
  6659. },
  6660. //>>excludeStart("ide", pragmas.excludeIdeData);
  6661. args: [],
  6662. source: "beSingleline\x0a\x09multiline := false",
  6663. referencedClasses: [],
  6664. //>>excludeEnd("ide");
  6665. messageSends: []
  6666. }),
  6667. $globals.HLRequestWidget);
  6668. $core.addMethod(
  6669. $core.method({
  6670. selector: "confirm",
  6671. protocol: 'actions',
  6672. fn: function (){
  6673. var self=this;
  6674. var val;
  6675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6676. return $core.withContext(function($ctx1) {
  6677. //>>excludeEnd("ctx");
  6678. val=$recv($recv(self["@input"])._asJQuery())._val();
  6679. self._remove();
  6680. $recv(self._actionBlock())._value_(val);
  6681. return self;
  6682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6683. }, function($ctx1) {$ctx1.fill(self,"confirm",{val:val},$globals.HLRequestWidget)});
  6684. //>>excludeEnd("ctx");
  6685. },
  6686. //>>excludeStart("ide", pragmas.excludeIdeData);
  6687. args: [],
  6688. source: "confirm\x0a\x09| val |\x0a\x09val := input asJQuery val.\x0a\x09self remove.\x0a\x09self actionBlock value: val",
  6689. referencedClasses: [],
  6690. //>>excludeEnd("ide");
  6691. messageSends: ["val", "asJQuery", "remove", "value:", "actionBlock"]
  6692. }),
  6693. $globals.HLRequestWidget);
  6694. $core.addMethod(
  6695. $core.method({
  6696. selector: "cssClass",
  6697. protocol: 'accessing',
  6698. fn: function (){
  6699. var self=this;
  6700. return "large";
  6701. },
  6702. //>>excludeStart("ide", pragmas.excludeIdeData);
  6703. args: [],
  6704. source: "cssClass\x0a\x09^ 'large'",
  6705. referencedClasses: [],
  6706. //>>excludeEnd("ide");
  6707. messageSends: []
  6708. }),
  6709. $globals.HLRequestWidget);
  6710. $core.addMethod(
  6711. $core.method({
  6712. selector: "giveFocusToButton:",
  6713. protocol: 'private',
  6714. fn: function (aButton){
  6715. var self=this;
  6716. return self;
  6717. },
  6718. //>>excludeStart("ide", pragmas.excludeIdeData);
  6719. args: ["aButton"],
  6720. source: "giveFocusToButton: aButton",
  6721. referencedClasses: [],
  6722. //>>excludeEnd("ide");
  6723. messageSends: []
  6724. }),
  6725. $globals.HLRequestWidget);
  6726. $core.addMethod(
  6727. $core.method({
  6728. selector: "isMultiline",
  6729. protocol: 'testing',
  6730. fn: function (){
  6731. var self=this;
  6732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6733. return $core.withContext(function($ctx1) {
  6734. //>>excludeEnd("ctx");
  6735. var $2,$1,$receiver;
  6736. $2=self["@multiline"];
  6737. if(($receiver = $2) == null || $receiver.isNil){
  6738. $1=true;
  6739. } else {
  6740. $1=$2;
  6741. };
  6742. return $1;
  6743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6744. }, function($ctx1) {$ctx1.fill(self,"isMultiline",{},$globals.HLRequestWidget)});
  6745. //>>excludeEnd("ctx");
  6746. },
  6747. //>>excludeStart("ide", pragmas.excludeIdeData);
  6748. args: [],
  6749. source: "isMultiline\x0a\x09^ multiline ifNil: [ true ]",
  6750. referencedClasses: [],
  6751. //>>excludeEnd("ide");
  6752. messageSends: ["ifNil:"]
  6753. }),
  6754. $globals.HLRequestWidget);
  6755. $core.addMethod(
  6756. $core.method({
  6757. selector: "renderMainOn:",
  6758. protocol: 'rendering',
  6759. fn: function (html){
  6760. var self=this;
  6761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6762. return $core.withContext(function($ctx1) {
  6763. //>>excludeEnd("ctx");
  6764. var $1,$2,$3,$4,$5,$6;
  6765. (
  6766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6767. $ctx1.supercall = true,
  6768. //>>excludeEnd("ctx");
  6769. $globals.HLRequestWidget.superclass.fn.prototype._renderMainOn_.apply($recv(self), [html]));
  6770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6771. $ctx1.supercall = false;
  6772. //>>excludeEnd("ctx");;
  6773. $1=self._isMultiline();
  6774. if($core.assert($1)){
  6775. self["@input"]=$recv(html)._textarea();
  6776. self["@input"];
  6777. } else {
  6778. $2=$recv(html)._input();
  6779. $recv($2)._type_("text");
  6780. $recv($2)._onKeyDown_((function(event){
  6781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6782. return $core.withContext(function($ctx2) {
  6783. //>>excludeEnd("ctx");
  6784. $3=$recv($recv(event)._keyCode()).__eq((13));
  6785. if($core.assert($3)){
  6786. return self._confirm();
  6787. };
  6788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6789. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  6790. //>>excludeEnd("ctx");
  6791. }));
  6792. $4=$recv($2)._yourself();
  6793. self["@input"]=$4;
  6794. self["@input"];
  6795. };
  6796. $5=$recv(self["@input"])._asJQuery();
  6797. $recv($5)._val_(self._value());
  6798. $6=$recv($5)._focus();
  6799. return self;
  6800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6801. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLRequestWidget)});
  6802. //>>excludeEnd("ctx");
  6803. },
  6804. //>>excludeStart("ide", pragmas.excludeIdeData);
  6805. args: ["html"],
  6806. 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",
  6807. referencedClasses: [],
  6808. //>>excludeEnd("ide");
  6809. messageSends: ["renderMainOn:", "ifTrue:ifFalse:", "isMultiline", "textarea", "type:", "input", "onKeyDown:", "ifTrue:", "=", "keyCode", "confirm", "yourself", "val:", "asJQuery", "value", "focus"]
  6810. }),
  6811. $globals.HLRequestWidget);
  6812. $core.addMethod(
  6813. $core.method({
  6814. selector: "value",
  6815. protocol: 'accessing',
  6816. fn: function (){
  6817. var self=this;
  6818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6819. return $core.withContext(function($ctx1) {
  6820. //>>excludeEnd("ctx");
  6821. var $2,$1,$receiver;
  6822. $2=self["@value"];
  6823. if(($receiver = $2) == null || $receiver.isNil){
  6824. $1="";
  6825. } else {
  6826. $1=$2;
  6827. };
  6828. return $1;
  6829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6830. }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.HLRequestWidget)});
  6831. //>>excludeEnd("ctx");
  6832. },
  6833. //>>excludeStart("ide", pragmas.excludeIdeData);
  6834. args: [],
  6835. source: "value\x0a\x09^ value ifNil: [ '' ]",
  6836. referencedClasses: [],
  6837. //>>excludeEnd("ide");
  6838. messageSends: ["ifNil:"]
  6839. }),
  6840. $globals.HLRequestWidget);
  6841. $core.addMethod(
  6842. $core.method({
  6843. selector: "value:",
  6844. protocol: 'accessing',
  6845. fn: function (aString){
  6846. var self=this;
  6847. self["@value"]=aString;
  6848. return self;
  6849. },
  6850. //>>excludeStart("ide", pragmas.excludeIdeData);
  6851. args: ["aString"],
  6852. source: "value: aString\x0a\x09value := aString",
  6853. referencedClasses: [],
  6854. //>>excludeEnd("ide");
  6855. messageSends: []
  6856. }),
  6857. $globals.HLRequestWidget);
  6858. $core.addClass('HLProgressWidget', $globals.HLModalWidget, ['progressBars', 'visible'], 'Helios-Core');
  6859. //>>excludeStart("ide", pragmas.excludeIdeData);
  6860. $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.";
  6861. //>>excludeEnd("ide");
  6862. $core.addMethod(
  6863. $core.method({
  6864. selector: "addProgressBar:",
  6865. protocol: 'actions',
  6866. fn: function (aProgressBar){
  6867. var self=this;
  6868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6869. return $core.withContext(function($ctx1) {
  6870. //>>excludeEnd("ctx");
  6871. self._show();
  6872. $recv(self._progressBars())._add_(aProgressBar);
  6873. $recv(aProgressBar)._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".dialog"));
  6874. return self;
  6875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6876. }, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  6877. //>>excludeEnd("ctx");
  6878. },
  6879. //>>excludeStart("ide", pragmas.excludeIdeData);
  6880. args: ["aProgressBar"],
  6881. source: "addProgressBar: aProgressBar\x0a\x09self show.\x0a\x09self progressBars add: aProgressBar.\x0a\x09aProgressBar appendToJQuery: (self wrapper asJQuery find: '.dialog')",
  6882. referencedClasses: [],
  6883. //>>excludeEnd("ide");
  6884. messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]
  6885. }),
  6886. $globals.HLProgressWidget);
  6887. $core.addMethod(
  6888. $core.method({
  6889. selector: "do:on:displaying:",
  6890. protocol: 'actions',
  6891. fn: function (aBlock,aCollection,aString){
  6892. var self=this;
  6893. var progressBar;
  6894. function $HLProgressBarWidget(){return $globals.HLProgressBarWidget||(typeof HLProgressBarWidget=="undefined"?nil:HLProgressBarWidget)}
  6895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6896. return $core.withContext(function($ctx1) {
  6897. //>>excludeEnd("ctx");
  6898. var $1,$2;
  6899. $1=$recv($HLProgressBarWidget())._new();
  6900. $recv($1)._parent_(self);
  6901. $recv($1)._label_(aString);
  6902. $recv($1)._workBlock_(aBlock);
  6903. $recv($1)._collection_(aCollection);
  6904. $2=$recv($1)._yourself();
  6905. progressBar=$2;
  6906. self._addProgressBar_(progressBar);
  6907. $recv(progressBar)._start();
  6908. return self;
  6909. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6910. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},$globals.HLProgressWidget)});
  6911. //>>excludeEnd("ctx");
  6912. },
  6913. //>>excludeStart("ide", pragmas.excludeIdeData);
  6914. args: ["aBlock", "aCollection", "aString"],
  6915. 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",
  6916. referencedClasses: ["HLProgressBarWidget"],
  6917. //>>excludeEnd("ide");
  6918. messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]
  6919. }),
  6920. $globals.HLProgressWidget);
  6921. $core.addMethod(
  6922. $core.method({
  6923. selector: "flush",
  6924. protocol: 'actions',
  6925. fn: function (){
  6926. var self=this;
  6927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6928. return $core.withContext(function($ctx1) {
  6929. //>>excludeEnd("ctx");
  6930. $recv(self._progressBars())._do_((function(each){
  6931. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6932. return $core.withContext(function($ctx2) {
  6933. //>>excludeEnd("ctx");
  6934. return self._removeProgressBar_(each);
  6935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6936. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  6937. //>>excludeEnd("ctx");
  6938. }));
  6939. return self;
  6940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6941. }, function($ctx1) {$ctx1.fill(self,"flush",{},$globals.HLProgressWidget)});
  6942. //>>excludeEnd("ctx");
  6943. },
  6944. //>>excludeStart("ide", pragmas.excludeIdeData);
  6945. args: [],
  6946. source: "flush\x0a\x09self progressBars do: [ :each |\x0a\x09\x09self removeProgressBar: each ]",
  6947. referencedClasses: [],
  6948. //>>excludeEnd("ide");
  6949. messageSends: ["do:", "progressBars", "removeProgressBar:"]
  6950. }),
  6951. $globals.HLProgressWidget);
  6952. $core.addMethod(
  6953. $core.method({
  6954. selector: "hasButtons",
  6955. protocol: 'testing',
  6956. fn: function (){
  6957. var self=this;
  6958. return false;
  6959. },
  6960. //>>excludeStart("ide", pragmas.excludeIdeData);
  6961. args: [],
  6962. source: "hasButtons\x0a\x09^ false",
  6963. referencedClasses: [],
  6964. //>>excludeEnd("ide");
  6965. messageSends: []
  6966. }),
  6967. $globals.HLProgressWidget);
  6968. $core.addMethod(
  6969. $core.method({
  6970. selector: "isVisible",
  6971. protocol: 'testing',
  6972. fn: function (){
  6973. var self=this;
  6974. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6975. return $core.withContext(function($ctx1) {
  6976. //>>excludeEnd("ctx");
  6977. var $2,$1,$receiver;
  6978. $2=self["@visible"];
  6979. if(($receiver = $2) == null || $receiver.isNil){
  6980. $1=false;
  6981. } else {
  6982. $1=$2;
  6983. };
  6984. return $1;
  6985. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6986. }, function($ctx1) {$ctx1.fill(self,"isVisible",{},$globals.HLProgressWidget)});
  6987. //>>excludeEnd("ctx");
  6988. },
  6989. //>>excludeStart("ide", pragmas.excludeIdeData);
  6990. args: [],
  6991. source: "isVisible\x0a\x09^ visible ifNil: [ false ]",
  6992. referencedClasses: [],
  6993. //>>excludeEnd("ide");
  6994. messageSends: ["ifNil:"]
  6995. }),
  6996. $globals.HLProgressWidget);
  6997. $core.addMethod(
  6998. $core.method({
  6999. selector: "progressBars",
  7000. protocol: 'accessing',
  7001. fn: function (){
  7002. var self=this;
  7003. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  7004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7005. return $core.withContext(function($ctx1) {
  7006. //>>excludeEnd("ctx");
  7007. var $2,$1,$receiver;
  7008. $2=self["@progressBars"];
  7009. if(($receiver = $2) == null || $receiver.isNil){
  7010. self["@progressBars"]=$recv($OrderedCollection())._new();
  7011. $1=self["@progressBars"];
  7012. } else {
  7013. $1=$2;
  7014. };
  7015. return $1;
  7016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7017. }, function($ctx1) {$ctx1.fill(self,"progressBars",{},$globals.HLProgressWidget)});
  7018. //>>excludeEnd("ctx");
  7019. },
  7020. //>>excludeStart("ide", pragmas.excludeIdeData);
  7021. args: [],
  7022. source: "progressBars\x0a\x09^ progressBars ifNil: [ progressBars := OrderedCollection new ]",
  7023. referencedClasses: ["OrderedCollection"],
  7024. //>>excludeEnd("ide");
  7025. messageSends: ["ifNil:", "new"]
  7026. }),
  7027. $globals.HLProgressWidget);
  7028. $core.addMethod(
  7029. $core.method({
  7030. selector: "remove",
  7031. protocol: 'actions',
  7032. fn: function (){
  7033. var self=this;
  7034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7035. return $core.withContext(function($ctx1) {
  7036. //>>excludeEnd("ctx");
  7037. var $1;
  7038. $1=self._isVisible();
  7039. if($core.assert($1)){
  7040. self["@visible"]=false;
  7041. self["@visible"];
  7042. (
  7043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7044. $ctx1.supercall = true,
  7045. //>>excludeEnd("ctx");
  7046. $globals.HLProgressWidget.superclass.fn.prototype._remove.apply($recv(self), []));
  7047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7048. $ctx1.supercall = false;
  7049. //>>excludeEnd("ctx");;
  7050. };
  7051. return self;
  7052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7053. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressWidget)});
  7054. //>>excludeEnd("ctx");
  7055. },
  7056. //>>excludeStart("ide", pragmas.excludeIdeData);
  7057. args: [],
  7058. source: "remove\x0a\x09self isVisible ifTrue: [\x0a\x09\x09visible := false.\x0a\x09\x09super remove ]",
  7059. referencedClasses: [],
  7060. //>>excludeEnd("ide");
  7061. messageSends: ["ifTrue:", "isVisible", "remove"]
  7062. }),
  7063. $globals.HLProgressWidget);
  7064. $core.addMethod(
  7065. $core.method({
  7066. selector: "removeProgressBar:",
  7067. protocol: 'actions',
  7068. fn: function (aProgressBar){
  7069. var self=this;
  7070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7071. return $core.withContext(function($ctx1) {
  7072. //>>excludeEnd("ctx");
  7073. var $1;
  7074. $1=self._progressBars();
  7075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7076. $ctx1.sendIdx["progressBars"]=1;
  7077. //>>excludeEnd("ctx");
  7078. $recv($1)._remove_ifAbsent_(aProgressBar,(function(){
  7079. }));
  7080. $recv($recv($recv(aProgressBar)._wrapper())._asJQuery())._remove();
  7081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7082. $ctx1.sendIdx["remove"]=1;
  7083. //>>excludeEnd("ctx");
  7084. $recv(self._progressBars())._ifEmpty_((function(){
  7085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7086. return $core.withContext(function($ctx2) {
  7087. //>>excludeEnd("ctx");
  7088. return self._remove();
  7089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7090. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7091. //>>excludeEnd("ctx");
  7092. }));
  7093. return self;
  7094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7095. }, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  7096. //>>excludeEnd("ctx");
  7097. },
  7098. //>>excludeStart("ide", pragmas.excludeIdeData);
  7099. args: ["aProgressBar"],
  7100. source: "removeProgressBar: aProgressBar\x0a\x09self progressBars remove: aProgressBar ifAbsent: [].\x0a\x09aProgressBar wrapper asJQuery remove.\x0a\x09\x0a\x09self progressBars ifEmpty: [ self remove ]",
  7101. referencedClasses: [],
  7102. //>>excludeEnd("ide");
  7103. messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]
  7104. }),
  7105. $globals.HLProgressWidget);
  7106. $core.addMethod(
  7107. $core.method({
  7108. selector: "renderMainOn:",
  7109. protocol: 'rendering',
  7110. fn: function (html){
  7111. var self=this;
  7112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7113. return $core.withContext(function($ctx1) {
  7114. //>>excludeEnd("ctx");
  7115. $recv(self._progressBars())._do_((function(each){
  7116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7117. return $core.withContext(function($ctx2) {
  7118. //>>excludeEnd("ctx");
  7119. return $recv(html)._with_(each);
  7120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7121. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7122. //>>excludeEnd("ctx");
  7123. }));
  7124. return self;
  7125. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7126. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLProgressWidget)});
  7127. //>>excludeEnd("ctx");
  7128. },
  7129. //>>excludeStart("ide", pragmas.excludeIdeData);
  7130. args: ["html"],
  7131. source: "renderMainOn: html\x0a\x09self progressBars do: [ :each |\x0a\x09\x09html with: each ]",
  7132. referencedClasses: [],
  7133. //>>excludeEnd("ide");
  7134. messageSends: ["do:", "progressBars", "with:"]
  7135. }),
  7136. $globals.HLProgressWidget);
  7137. $core.addMethod(
  7138. $core.method({
  7139. selector: "show",
  7140. protocol: 'actions',
  7141. fn: function (){
  7142. var self=this;
  7143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7144. return $core.withContext(function($ctx1) {
  7145. //>>excludeEnd("ctx");
  7146. var $1;
  7147. $1=self._isVisible();
  7148. if(!$core.assert($1)){
  7149. self["@visible"]=true;
  7150. self["@visible"];
  7151. (
  7152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7153. $ctx1.supercall = true,
  7154. //>>excludeEnd("ctx");
  7155. $globals.HLProgressWidget.superclass.fn.prototype._show.apply($recv(self), []));
  7156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7157. $ctx1.supercall = false;
  7158. //>>excludeEnd("ctx");;
  7159. };
  7160. return self;
  7161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7162. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLProgressWidget)});
  7163. //>>excludeEnd("ctx");
  7164. },
  7165. //>>excludeStart("ide", pragmas.excludeIdeData);
  7166. args: [],
  7167. source: "show\x0a\x09self isVisible ifFalse: [\x0a\x09\x09visible := true.\x0a\x09\x09super show ]",
  7168. referencedClasses: [],
  7169. //>>excludeEnd("ide");
  7170. messageSends: ["ifFalse:", "isVisible", "show"]
  7171. }),
  7172. $globals.HLProgressWidget);
  7173. $globals.HLProgressWidget.klass.iVarNames = ['default'];
  7174. $core.addMethod(
  7175. $core.method({
  7176. selector: "default",
  7177. protocol: 'accessing',
  7178. fn: function (){
  7179. var self=this;
  7180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7181. return $core.withContext(function($ctx1) {
  7182. //>>excludeEnd("ctx");
  7183. var $2,$1,$receiver;
  7184. $2=self["@default"];
  7185. if(($receiver = $2) == null || $receiver.isNil){
  7186. self["@default"]=self._new();
  7187. $1=self["@default"];
  7188. } else {
  7189. $1=$2;
  7190. };
  7191. return $1;
  7192. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7193. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressWidget.klass)});
  7194. //>>excludeEnd("ctx");
  7195. },
  7196. //>>excludeStart("ide", pragmas.excludeIdeData);
  7197. args: [],
  7198. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  7199. referencedClasses: [],
  7200. //>>excludeEnd("ide");
  7201. messageSends: ["ifNil:", "new"]
  7202. }),
  7203. $globals.HLProgressWidget.klass);
  7204. $core.addClass('HLTabSelectionWidget', $globals.HLModalWidget, ['tabs', 'tabList', 'selectedTab', 'selectCallback', 'cancelCallback', 'confirmCallback'], 'Helios-Core');
  7205. //>>excludeStart("ide", pragmas.excludeIdeData);
  7206. $globals.HLTabSelectionWidget.comment="I am a modal window used to select or create tabs.";
  7207. //>>excludeEnd("ide");
  7208. $core.addMethod(
  7209. $core.method({
  7210. selector: "cancel",
  7211. protocol: 'actions',
  7212. fn: function (){
  7213. var self=this;
  7214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7215. return $core.withContext(function($ctx1) {
  7216. //>>excludeEnd("ctx");
  7217. self._remove();
  7218. $recv(self._cancelCallback())._value();
  7219. return self;
  7220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7221. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLTabSelectionWidget)});
  7222. //>>excludeEnd("ctx");
  7223. },
  7224. //>>excludeStart("ide", pragmas.excludeIdeData);
  7225. args: [],
  7226. source: "cancel\x0a\x09self remove.\x0a\x09self cancelCallback value",
  7227. referencedClasses: [],
  7228. //>>excludeEnd("ide");
  7229. messageSends: ["remove", "value", "cancelCallback"]
  7230. }),
  7231. $globals.HLTabSelectionWidget);
  7232. $core.addMethod(
  7233. $core.method({
  7234. selector: "cancelCallback",
  7235. protocol: 'accessing',
  7236. fn: function (){
  7237. var self=this;
  7238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7239. return $core.withContext(function($ctx1) {
  7240. //>>excludeEnd("ctx");
  7241. var $2,$1,$receiver;
  7242. $2=self["@cancelCallback"];
  7243. if(($receiver = $2) == null || $receiver.isNil){
  7244. $1=(function(){
  7245. });
  7246. } else {
  7247. $1=$2;
  7248. };
  7249. return $1;
  7250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7251. }, function($ctx1) {$ctx1.fill(self,"cancelCallback",{},$globals.HLTabSelectionWidget)});
  7252. //>>excludeEnd("ctx");
  7253. },
  7254. //>>excludeStart("ide", pragmas.excludeIdeData);
  7255. args: [],
  7256. source: "cancelCallback\x0a\x09^ cancelCallback ifNil: [ [] ]",
  7257. referencedClasses: [],
  7258. //>>excludeEnd("ide");
  7259. messageSends: ["ifNil:"]
  7260. }),
  7261. $globals.HLTabSelectionWidget);
  7262. $core.addMethod(
  7263. $core.method({
  7264. selector: "cancelCallback:",
  7265. protocol: 'accessing',
  7266. fn: function (aBlock){
  7267. var self=this;
  7268. self["@cancelCallback"]=aBlock;
  7269. return self;
  7270. },
  7271. //>>excludeStart("ide", pragmas.excludeIdeData);
  7272. args: ["aBlock"],
  7273. source: "cancelCallback: aBlock\x0a\x09cancelCallback := aBlock",
  7274. referencedClasses: [],
  7275. //>>excludeEnd("ide");
  7276. messageSends: []
  7277. }),
  7278. $globals.HLTabSelectionWidget);
  7279. $core.addMethod(
  7280. $core.method({
  7281. selector: "confirm",
  7282. protocol: 'actions',
  7283. fn: function (){
  7284. var self=this;
  7285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7286. return $core.withContext(function($ctx1) {
  7287. //>>excludeEnd("ctx");
  7288. self._remove();
  7289. $recv(self._confirmCallback())._value_(self._selectedTab());
  7290. return self;
  7291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7292. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLTabSelectionWidget)});
  7293. //>>excludeEnd("ctx");
  7294. },
  7295. //>>excludeStart("ide", pragmas.excludeIdeData);
  7296. args: [],
  7297. source: "confirm\x0a\x09self remove.\x0a\x09self confirmCallback value: self selectedTab",
  7298. referencedClasses: [],
  7299. //>>excludeEnd("ide");
  7300. messageSends: ["remove", "value:", "confirmCallback", "selectedTab"]
  7301. }),
  7302. $globals.HLTabSelectionWidget);
  7303. $core.addMethod(
  7304. $core.method({
  7305. selector: "confirmCallback",
  7306. protocol: 'accessing',
  7307. fn: function (){
  7308. var self=this;
  7309. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7310. return $core.withContext(function($ctx1) {
  7311. //>>excludeEnd("ctx");
  7312. var $2,$1,$receiver;
  7313. $2=self["@confirmCallback"];
  7314. if(($receiver = $2) == null || $receiver.isNil){
  7315. $1=(function(){
  7316. });
  7317. } else {
  7318. $1=$2;
  7319. };
  7320. return $1;
  7321. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7322. }, function($ctx1) {$ctx1.fill(self,"confirmCallback",{},$globals.HLTabSelectionWidget)});
  7323. //>>excludeEnd("ctx");
  7324. },
  7325. //>>excludeStart("ide", pragmas.excludeIdeData);
  7326. args: [],
  7327. source: "confirmCallback\x0a\x09^ confirmCallback ifNil: [ [] ]",
  7328. referencedClasses: [],
  7329. //>>excludeEnd("ide");
  7330. messageSends: ["ifNil:"]
  7331. }),
  7332. $globals.HLTabSelectionWidget);
  7333. $core.addMethod(
  7334. $core.method({
  7335. selector: "confirmCallback:",
  7336. protocol: 'accessing',
  7337. fn: function (aBlock){
  7338. var self=this;
  7339. self["@confirmCallback"]=aBlock;
  7340. return self;
  7341. },
  7342. //>>excludeStart("ide", pragmas.excludeIdeData);
  7343. args: ["aBlock"],
  7344. source: "confirmCallback: aBlock\x0a\x09confirmCallback := aBlock",
  7345. referencedClasses: [],
  7346. //>>excludeEnd("ide");
  7347. messageSends: []
  7348. }),
  7349. $globals.HLTabSelectionWidget);
  7350. $core.addMethod(
  7351. $core.method({
  7352. selector: "renderButtonsOn:",
  7353. protocol: 'rendering',
  7354. fn: function (html){
  7355. var self=this;
  7356. var confirmButton;
  7357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7358. return $core.withContext(function($ctx1) {
  7359. //>>excludeEnd("ctx");
  7360. var $1,$3,$4,$5,$6,$2;
  7361. $1=$recv(html)._div();
  7362. $recv($1)._class_("buttons");
  7363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7364. $ctx1.sendIdx["class:"]=1;
  7365. //>>excludeEnd("ctx");
  7366. $2=$recv($1)._with_((function(){
  7367. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7368. return $core.withContext(function($ctx2) {
  7369. //>>excludeEnd("ctx");
  7370. $3=$recv(html)._button();
  7371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7372. $ctx2.sendIdx["button"]=1;
  7373. //>>excludeEnd("ctx");
  7374. $recv($3)._class_("button");
  7375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7376. $ctx2.sendIdx["class:"]=2;
  7377. //>>excludeEnd("ctx");
  7378. $recv($3)._with_("Cancel");
  7379. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7380. $ctx2.sendIdx["with:"]=2;
  7381. //>>excludeEnd("ctx");
  7382. $4=$recv($3)._onClick_((function(){
  7383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7384. return $core.withContext(function($ctx3) {
  7385. //>>excludeEnd("ctx");
  7386. return self._cancel();
  7387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7388. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7389. //>>excludeEnd("ctx");
  7390. }));
  7391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7392. $ctx2.sendIdx["onClick:"]=1;
  7393. //>>excludeEnd("ctx");
  7394. $4;
  7395. $5=$recv(html)._button();
  7396. $recv($5)._class_("button default");
  7397. $recv($5)._with_("Select tab");
  7398. $6=$recv($5)._onClick_((function(){
  7399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7400. return $core.withContext(function($ctx3) {
  7401. //>>excludeEnd("ctx");
  7402. return self._confirm();
  7403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7404. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  7405. //>>excludeEnd("ctx");
  7406. }));
  7407. confirmButton=$6;
  7408. return confirmButton;
  7409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7410. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7411. //>>excludeEnd("ctx");
  7412. }));
  7413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7414. $ctx1.sendIdx["with:"]=1;
  7415. //>>excludeEnd("ctx");
  7416. self._giveFocusToButton_(confirmButton);
  7417. return self;
  7418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7419. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLTabSelectionWidget)});
  7420. //>>excludeEnd("ctx");
  7421. },
  7422. //>>excludeStart("ide", pragmas.excludeIdeData);
  7423. args: ["html"],
  7424. 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",
  7425. referencedClasses: [],
  7426. //>>excludeEnd("ide");
  7427. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "giveFocusToButton:"]
  7428. }),
  7429. $globals.HLTabSelectionWidget);
  7430. $core.addMethod(
  7431. $core.method({
  7432. selector: "renderContentOn:",
  7433. protocol: 'rendering',
  7434. fn: function (html){
  7435. var self=this;
  7436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7437. return $core.withContext(function($ctx1) {
  7438. //>>excludeEnd("ctx");
  7439. (
  7440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7441. $ctx1.supercall = true,
  7442. //>>excludeEnd("ctx");
  7443. $globals.HLTabSelectionWidget.superclass.fn.prototype._renderContentOn_.apply($recv(self), [html]));
  7444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7445. $ctx1.supercall = false;
  7446. //>>excludeEnd("ctx");;
  7447. $recv(self._tabList())._focus();
  7448. return self;
  7449. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7450. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabSelectionWidget)});
  7451. //>>excludeEnd("ctx");
  7452. },
  7453. //>>excludeStart("ide", pragmas.excludeIdeData);
  7454. args: ["html"],
  7455. source: "renderContentOn: html\x0a\x09super renderContentOn: html.\x0a\x09self tabList focus",
  7456. referencedClasses: [],
  7457. //>>excludeEnd("ide");
  7458. messageSends: ["renderContentOn:", "focus", "tabList"]
  7459. }),
  7460. $globals.HLTabSelectionWidget);
  7461. $core.addMethod(
  7462. $core.method({
  7463. selector: "renderMainOn:",
  7464. protocol: 'rendering',
  7465. fn: function (html){
  7466. var self=this;
  7467. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7468. return $core.withContext(function($ctx1) {
  7469. //>>excludeEnd("ctx");
  7470. var $1,$2;
  7471. $1=$recv(html)._div();
  7472. $recv($1)._class_("title");
  7473. $2=$recv($1)._with_("Tab selection");
  7474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7475. $ctx1.sendIdx["with:"]=1;
  7476. //>>excludeEnd("ctx");
  7477. $recv(html)._with_(self._tabList());
  7478. return self;
  7479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7480. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLTabSelectionWidget)});
  7481. //>>excludeEnd("ctx");
  7482. },
  7483. //>>excludeStart("ide", pragmas.excludeIdeData);
  7484. args: ["html"],
  7485. source: "renderMainOn: html\x0a\x09html div \x0a\x09\x09class: 'title'; \x0a\x09\x09with: 'Tab selection'.\x0a\x09\x0a\x09html with: self tabList",
  7486. referencedClasses: [],
  7487. //>>excludeEnd("ide");
  7488. messageSends: ["class:", "div", "with:", "tabList"]
  7489. }),
  7490. $globals.HLTabSelectionWidget);
  7491. $core.addMethod(
  7492. $core.method({
  7493. selector: "renderTab:on:",
  7494. protocol: 'rendering',
  7495. fn: function (aTab,html){
  7496. var self=this;
  7497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7498. return $core.withContext(function($ctx1) {
  7499. //>>excludeEnd("ctx");
  7500. var $1,$2;
  7501. $1=$recv(html)._span();
  7502. $recv($1)._class_($recv(aTab)._cssClass());
  7503. $2=$recv($1)._with_($recv(aTab)._label());
  7504. return self;
  7505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7506. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html},$globals.HLTabSelectionWidget)});
  7507. //>>excludeEnd("ctx");
  7508. },
  7509. //>>excludeStart("ide", pragmas.excludeIdeData);
  7510. args: ["aTab", "html"],
  7511. source: "renderTab: aTab on: html\x0a\x09html \x0a\x09\x09span \x0a\x09\x09\x09class: aTab cssClass;\x0a\x09\x09\x09with: aTab label",
  7512. referencedClasses: [],
  7513. //>>excludeEnd("ide");
  7514. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  7515. }),
  7516. $globals.HLTabSelectionWidget);
  7517. $core.addMethod(
  7518. $core.method({
  7519. selector: "renderTabsOn:",
  7520. protocol: 'rendering',
  7521. fn: function (html){
  7522. var self=this;
  7523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7524. return $core.withContext(function($ctx1) {
  7525. //>>excludeEnd("ctx");
  7526. var $1,$2;
  7527. $recv(self._tabs())._do_((function(each){
  7528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7529. return $core.withContext(function($ctx2) {
  7530. //>>excludeEnd("ctx");
  7531. return $recv($recv(html)._li())._with_((function(){
  7532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7533. return $core.withContext(function($ctx3) {
  7534. //>>excludeEnd("ctx");
  7535. $1=$recv(html)._a();
  7536. $recv($1)._with_((function(){
  7537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7538. return $core.withContext(function($ctx4) {
  7539. //>>excludeEnd("ctx");
  7540. return self._renderTab_on_(each,html);
  7541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7542. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7543. //>>excludeEnd("ctx");
  7544. }));
  7545. $2=$recv($1)._onClick_((function(){
  7546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7547. return $core.withContext(function($ctx4) {
  7548. //>>excludeEnd("ctx");
  7549. return self._selectTab_(each);
  7550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7551. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7552. //>>excludeEnd("ctx");
  7553. }));
  7554. return $2;
  7555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7556. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7557. //>>excludeEnd("ctx");
  7558. }));
  7559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7560. $ctx2.sendIdx["with:"]=1;
  7561. //>>excludeEnd("ctx");
  7562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7563. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7564. //>>excludeEnd("ctx");
  7565. }));
  7566. return self;
  7567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7568. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.HLTabSelectionWidget)});
  7569. //>>excludeEnd("ctx");
  7570. },
  7571. //>>excludeStart("ide", pragmas.excludeIdeData);
  7572. args: ["html"],
  7573. 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 ] ] ]",
  7574. referencedClasses: [],
  7575. //>>excludeEnd("ide");
  7576. messageSends: ["do:", "tabs", "with:", "li", "a", "renderTab:on:", "onClick:", "selectTab:"]
  7577. }),
  7578. $globals.HLTabSelectionWidget);
  7579. $core.addMethod(
  7580. $core.method({
  7581. selector: "selectCallback",
  7582. protocol: 'accessing',
  7583. fn: function (){
  7584. var self=this;
  7585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7586. return $core.withContext(function($ctx1) {
  7587. //>>excludeEnd("ctx");
  7588. var $2,$1,$receiver;
  7589. $2=self["@selectCallback"];
  7590. if(($receiver = $2) == null || $receiver.isNil){
  7591. $1=(function(){
  7592. });
  7593. } else {
  7594. $1=$2;
  7595. };
  7596. return $1;
  7597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7598. }, function($ctx1) {$ctx1.fill(self,"selectCallback",{},$globals.HLTabSelectionWidget)});
  7599. //>>excludeEnd("ctx");
  7600. },
  7601. //>>excludeStart("ide", pragmas.excludeIdeData);
  7602. args: [],
  7603. source: "selectCallback\x0a\x09^ selectCallback ifNil: [ [] ]",
  7604. referencedClasses: [],
  7605. //>>excludeEnd("ide");
  7606. messageSends: ["ifNil:"]
  7607. }),
  7608. $globals.HLTabSelectionWidget);
  7609. $core.addMethod(
  7610. $core.method({
  7611. selector: "selectCallback:",
  7612. protocol: 'accessing',
  7613. fn: function (aBlock){
  7614. var self=this;
  7615. self["@selectCallback"]=aBlock;
  7616. return self;
  7617. },
  7618. //>>excludeStart("ide", pragmas.excludeIdeData);
  7619. args: ["aBlock"],
  7620. source: "selectCallback: aBlock\x0a\x09selectCallback := aBlock",
  7621. referencedClasses: [],
  7622. //>>excludeEnd("ide");
  7623. messageSends: []
  7624. }),
  7625. $globals.HLTabSelectionWidget);
  7626. $core.addMethod(
  7627. $core.method({
  7628. selector: "selectTab:",
  7629. protocol: 'actions',
  7630. fn: function (aTab){
  7631. var self=this;
  7632. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7633. return $core.withContext(function($ctx1) {
  7634. //>>excludeEnd("ctx");
  7635. self._selectedTab_(aTab);
  7636. $recv(self._selectCallback())._value_(aTab);
  7637. return self;
  7638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7639. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aTab:aTab},$globals.HLTabSelectionWidget)});
  7640. //>>excludeEnd("ctx");
  7641. },
  7642. //>>excludeStart("ide", pragmas.excludeIdeData);
  7643. args: ["aTab"],
  7644. source: "selectTab: aTab\x0a\x09self selectedTab: aTab.\x0a\x09self selectCallback value: aTab",
  7645. referencedClasses: [],
  7646. //>>excludeEnd("ide");
  7647. messageSends: ["selectedTab:", "value:", "selectCallback"]
  7648. }),
  7649. $globals.HLTabSelectionWidget);
  7650. $core.addMethod(
  7651. $core.method({
  7652. selector: "selectedTab",
  7653. protocol: 'accessing',
  7654. fn: function (){
  7655. var self=this;
  7656. var $1;
  7657. $1=self["@selectedTab"];
  7658. return $1;
  7659. },
  7660. //>>excludeStart("ide", pragmas.excludeIdeData);
  7661. args: [],
  7662. source: "selectedTab\x0a\x09^ selectedTab",
  7663. referencedClasses: [],
  7664. //>>excludeEnd("ide");
  7665. messageSends: []
  7666. }),
  7667. $globals.HLTabSelectionWidget);
  7668. $core.addMethod(
  7669. $core.method({
  7670. selector: "selectedTab:",
  7671. protocol: 'accessing',
  7672. fn: function (aTab){
  7673. var self=this;
  7674. self["@selectedTab"]=aTab;
  7675. return self;
  7676. },
  7677. //>>excludeStart("ide", pragmas.excludeIdeData);
  7678. args: ["aTab"],
  7679. source: "selectedTab: aTab\x0a\x09selectedTab := aTab",
  7680. referencedClasses: [],
  7681. //>>excludeEnd("ide");
  7682. messageSends: []
  7683. }),
  7684. $globals.HLTabSelectionWidget);
  7685. $core.addMethod(
  7686. $core.method({
  7687. selector: "setupKeyBindings",
  7688. protocol: 'actions',
  7689. fn: function (){
  7690. var self=this;
  7691. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  7692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7693. return $core.withContext(function($ctx1) {
  7694. //>>excludeEnd("ctx");
  7695. var $1;
  7696. (
  7697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7698. $ctx1.supercall = true,
  7699. //>>excludeEnd("ctx");
  7700. $globals.HLTabSelectionWidget.superclass.fn.prototype._setupKeyBindings.apply($recv(self), []));
  7701. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7702. $ctx1.supercall = false;
  7703. //>>excludeEnd("ctx");;
  7704. $recv(".dialog"._asJQuery())._keyup_((function(e){
  7705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7706. return $core.withContext(function($ctx2) {
  7707. //>>excludeEnd("ctx");
  7708. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($String())._cr())._asciiValue());
  7709. if($core.assert($1)){
  7710. return self._confirm();
  7711. };
  7712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7713. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  7714. //>>excludeEnd("ctx");
  7715. }));
  7716. return self;
  7717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7718. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLTabSelectionWidget)});
  7719. //>>excludeEnd("ctx");
  7720. },
  7721. //>>excludeStart("ide", pragmas.excludeIdeData);
  7722. args: [],
  7723. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String cr asciiValue ifTrue: [ self confirm ] ]",
  7724. referencedClasses: ["String"],
  7725. //>>excludeEnd("ide");
  7726. messageSends: ["setupKeyBindings", "keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "cr", "confirm"]
  7727. }),
  7728. $globals.HLTabSelectionWidget);
  7729. $core.addMethod(
  7730. $core.method({
  7731. selector: "tabList",
  7732. protocol: 'rendering',
  7733. fn: function (){
  7734. var self=this;
  7735. function $HLTabListWidget(){return $globals.HLTabListWidget||(typeof HLTabListWidget=="undefined"?nil:HLTabListWidget)}
  7736. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7737. return $core.withContext(function($ctx1) {
  7738. //>>excludeEnd("ctx");
  7739. var $1,$2,$3,$4,$receiver;
  7740. $1=self["@tabList"];
  7741. if(($receiver = $1) == null || $receiver.isNil){
  7742. self["@tabList"]=$recv($HLTabListWidget())._new();
  7743. self["@tabList"];
  7744. $2=self["@tabList"];
  7745. $recv($2)._callback_((function(tab){
  7746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7747. return $core.withContext(function($ctx2) {
  7748. //>>excludeEnd("ctx");
  7749. self._selectTab_(tab);
  7750. return $recv(self["@tabList"])._focus();
  7751. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7752. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  7753. //>>excludeEnd("ctx");
  7754. }));
  7755. $recv($2)._selectedItem_(self._selectedTab());
  7756. $3=$recv($2)._items_(self._tabs());
  7757. $3;
  7758. } else {
  7759. $1;
  7760. };
  7761. $4=self["@tabList"];
  7762. return $4;
  7763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7764. }, function($ctx1) {$ctx1.fill(self,"tabList",{},$globals.HLTabSelectionWidget)});
  7765. //>>excludeEnd("ctx");
  7766. },
  7767. //>>excludeStart("ide", pragmas.excludeIdeData);
  7768. args: [],
  7769. 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",
  7770. referencedClasses: ["HLTabListWidget"],
  7771. //>>excludeEnd("ide");
  7772. messageSends: ["ifNil:", "new", "callback:", "selectTab:", "focus", "selectedItem:", "selectedTab", "items:", "tabs"]
  7773. }),
  7774. $globals.HLTabSelectionWidget);
  7775. $core.addMethod(
  7776. $core.method({
  7777. selector: "tabs",
  7778. protocol: 'accessing',
  7779. fn: function (){
  7780. var self=this;
  7781. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7782. return $core.withContext(function($ctx1) {
  7783. //>>excludeEnd("ctx");
  7784. var $2,$1,$receiver;
  7785. $2=self["@tabs"];
  7786. if(($receiver = $2) == null || $receiver.isNil){
  7787. $1=[];
  7788. } else {
  7789. $1=$2;
  7790. };
  7791. return $1;
  7792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7793. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabSelectionWidget)});
  7794. //>>excludeEnd("ctx");
  7795. },
  7796. //>>excludeStart("ide", pragmas.excludeIdeData);
  7797. args: [],
  7798. source: "tabs\x0a\x09^ tabs ifNil: [ #() ]",
  7799. referencedClasses: [],
  7800. //>>excludeEnd("ide");
  7801. messageSends: ["ifNil:"]
  7802. }),
  7803. $globals.HLTabSelectionWidget);
  7804. $core.addMethod(
  7805. $core.method({
  7806. selector: "tabs:",
  7807. protocol: 'accessing',
  7808. fn: function (aCollection){
  7809. var self=this;
  7810. self["@tabs"]=aCollection;
  7811. return self;
  7812. },
  7813. //>>excludeStart("ide", pragmas.excludeIdeData);
  7814. args: ["aCollection"],
  7815. source: "tabs: aCollection\x0a\x09tabs := aCollection",
  7816. referencedClasses: [],
  7817. //>>excludeEnd("ide");
  7818. messageSends: []
  7819. }),
  7820. $globals.HLTabSelectionWidget);
  7821. $core.addClass('HLProgressBarWidget', $globals.HLWidget, ['label', 'parent', 'workBlock', 'collection', 'bar'], 'Helios-Core');
  7822. //>>excludeStart("ide", pragmas.excludeIdeData);
  7823. $globals.HLProgressBarWidget.comment="I am a widget used to display a progress bar while iterating over a collection.";
  7824. //>>excludeEnd("ide");
  7825. $core.addMethod(
  7826. $core.method({
  7827. selector: "collection",
  7828. protocol: 'accessing',
  7829. fn: function (){
  7830. var self=this;
  7831. var $1;
  7832. $1=self["@collection"];
  7833. return $1;
  7834. },
  7835. //>>excludeStart("ide", pragmas.excludeIdeData);
  7836. args: [],
  7837. source: "collection\x0a\x09^ collection",
  7838. referencedClasses: [],
  7839. //>>excludeEnd("ide");
  7840. messageSends: []
  7841. }),
  7842. $globals.HLProgressBarWidget);
  7843. $core.addMethod(
  7844. $core.method({
  7845. selector: "collection:",
  7846. protocol: 'accessing',
  7847. fn: function (aCollection){
  7848. var self=this;
  7849. self["@collection"]=aCollection;
  7850. return self;
  7851. },
  7852. //>>excludeStart("ide", pragmas.excludeIdeData);
  7853. args: ["aCollection"],
  7854. source: "collection: aCollection\x0a\x09collection := aCollection",
  7855. referencedClasses: [],
  7856. //>>excludeEnd("ide");
  7857. messageSends: []
  7858. }),
  7859. $globals.HLProgressBarWidget);
  7860. $core.addMethod(
  7861. $core.method({
  7862. selector: "evaluateAt:",
  7863. protocol: 'actions',
  7864. fn: function (anInteger){
  7865. var self=this;
  7866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7867. return $core.withContext(function($ctx1) {
  7868. //>>excludeEnd("ctx");
  7869. var $4,$3,$2,$1,$7,$6,$5;
  7870. $4=self._collection();
  7871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7872. $ctx1.sendIdx["collection"]=1;
  7873. //>>excludeEnd("ctx");
  7874. $3=$recv($4)._size();
  7875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7876. $ctx1.sendIdx["size"]=1;
  7877. //>>excludeEnd("ctx");
  7878. $2=$recv(anInteger).__slash($3);
  7879. $1=$recv($2).__star((100));
  7880. self._updateProgress_($1);
  7881. $7=self._collection();
  7882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7883. $ctx1.sendIdx["collection"]=2;
  7884. //>>excludeEnd("ctx");
  7885. $6=$recv($7)._size();
  7886. $5=$recv(anInteger).__lt_eq($6);
  7887. if($core.assert($5)){
  7888. $recv((function(){
  7889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7890. return $core.withContext(function($ctx2) {
  7891. //>>excludeEnd("ctx");
  7892. $recv(self._workBlock())._value_($recv(self._collection())._at_(anInteger));
  7893. return self._evaluateAt_($recv(anInteger).__plus((1)));
  7894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7895. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7896. //>>excludeEnd("ctx");
  7897. }))._valueWithTimeout_((10));
  7898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7899. $ctx1.sendIdx["valueWithTimeout:"]=1;
  7900. //>>excludeEnd("ctx");
  7901. } else {
  7902. $recv((function(){
  7903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7904. return $core.withContext(function($ctx2) {
  7905. //>>excludeEnd("ctx");
  7906. return self._remove();
  7907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7908. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  7909. //>>excludeEnd("ctx");
  7910. }))._valueWithTimeout_((500));
  7911. };
  7912. return self;
  7913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7914. }, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  7915. //>>excludeEnd("ctx");
  7916. },
  7917. //>>excludeStart("ide", pragmas.excludeIdeData);
  7918. args: ["anInteger"],
  7919. 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 ] valueWithTimeout: 10 ]\x0a\x09\x09ifFalse: [ [ self remove ] valueWithTimeout: 500 ]",
  7920. referencedClasses: [],
  7921. //>>excludeEnd("ide");
  7922. messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "<=", "valueWithTimeout:", "value:", "workBlock", "at:", "evaluateAt:", "+", "remove"]
  7923. }),
  7924. $globals.HLProgressBarWidget);
  7925. $core.addMethod(
  7926. $core.method({
  7927. selector: "label",
  7928. protocol: 'accessing',
  7929. fn: function (){
  7930. var self=this;
  7931. var $1;
  7932. $1=self["@label"];
  7933. return $1;
  7934. },
  7935. //>>excludeStart("ide", pragmas.excludeIdeData);
  7936. args: [],
  7937. source: "label\x0a\x09^ label",
  7938. referencedClasses: [],
  7939. //>>excludeEnd("ide");
  7940. messageSends: []
  7941. }),
  7942. $globals.HLProgressBarWidget);
  7943. $core.addMethod(
  7944. $core.method({
  7945. selector: "label:",
  7946. protocol: 'accessing',
  7947. fn: function (aString){
  7948. var self=this;
  7949. self["@label"]=aString;
  7950. return self;
  7951. },
  7952. //>>excludeStart("ide", pragmas.excludeIdeData);
  7953. args: ["aString"],
  7954. source: "label: aString\x0a\x09label := aString",
  7955. referencedClasses: [],
  7956. //>>excludeEnd("ide");
  7957. messageSends: []
  7958. }),
  7959. $globals.HLProgressBarWidget);
  7960. $core.addMethod(
  7961. $core.method({
  7962. selector: "parent",
  7963. protocol: 'accessing',
  7964. fn: function (){
  7965. var self=this;
  7966. var $1;
  7967. $1=self["@parent"];
  7968. return $1;
  7969. },
  7970. //>>excludeStart("ide", pragmas.excludeIdeData);
  7971. args: [],
  7972. source: "parent\x0a\x09^ parent",
  7973. referencedClasses: [],
  7974. //>>excludeEnd("ide");
  7975. messageSends: []
  7976. }),
  7977. $globals.HLProgressBarWidget);
  7978. $core.addMethod(
  7979. $core.method({
  7980. selector: "parent:",
  7981. protocol: 'accessing',
  7982. fn: function (aProgress){
  7983. var self=this;
  7984. self["@parent"]=aProgress;
  7985. return self;
  7986. },
  7987. //>>excludeStart("ide", pragmas.excludeIdeData);
  7988. args: ["aProgress"],
  7989. source: "parent: aProgress\x0a\x09parent := aProgress",
  7990. referencedClasses: [],
  7991. //>>excludeEnd("ide");
  7992. messageSends: []
  7993. }),
  7994. $globals.HLProgressBarWidget);
  7995. $core.addMethod(
  7996. $core.method({
  7997. selector: "remove",
  7998. protocol: 'actions',
  7999. fn: function (){
  8000. var self=this;
  8001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8002. return $core.withContext(function($ctx1) {
  8003. //>>excludeEnd("ctx");
  8004. $recv(self._parent())._removeProgressBar_(self);
  8005. return self;
  8006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8007. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressBarWidget)});
  8008. //>>excludeEnd("ctx");
  8009. },
  8010. //>>excludeStart("ide", pragmas.excludeIdeData);
  8011. args: [],
  8012. source: "remove\x0a\x09self parent removeProgressBar: self",
  8013. referencedClasses: [],
  8014. //>>excludeEnd("ide");
  8015. messageSends: ["removeProgressBar:", "parent"]
  8016. }),
  8017. $globals.HLProgressBarWidget);
  8018. $core.addMethod(
  8019. $core.method({
  8020. selector: "renderContentOn:",
  8021. protocol: 'rendering',
  8022. fn: function (html){
  8023. var self=this;
  8024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8025. return $core.withContext(function($ctx1) {
  8026. //>>excludeEnd("ctx");
  8027. var $1,$3,$4,$2;
  8028. $recv($recv(html)._span())._with_(self._label());
  8029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8030. $ctx1.sendIdx["with:"]=1;
  8031. //>>excludeEnd("ctx");
  8032. $1=$recv(html)._div();
  8033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8034. $ctx1.sendIdx["div"]=1;
  8035. //>>excludeEnd("ctx");
  8036. $recv($1)._class_("progress");
  8037. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8038. $ctx1.sendIdx["class:"]=1;
  8039. //>>excludeEnd("ctx");
  8040. $2=$recv($1)._with_((function(){
  8041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8042. return $core.withContext(function($ctx2) {
  8043. //>>excludeEnd("ctx");
  8044. $3=$recv(html)._div();
  8045. $recv($3)._class_("bar");
  8046. $4=$recv($3)._style_("width: 0%");
  8047. self["@bar"]=$4;
  8048. return self["@bar"];
  8049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8050. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8051. //>>excludeEnd("ctx");
  8052. }));
  8053. return self;
  8054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8055. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLProgressBarWidget)});
  8056. //>>excludeEnd("ctx");
  8057. },
  8058. //>>excludeStart("ide", pragmas.excludeIdeData);
  8059. args: ["html"],
  8060. source: "renderContentOn: html\x0a\x09html span with: self label.\x0a\x09html div \x0a\x09\x09class: 'progress';\x0a\x09\x09with: [\x0a\x09\x09\x09bar := html div \x0a\x09\x09\x09\x09class: 'bar';\x0a\x09\x09\x09\x09style: 'width: 0%' ]",
  8061. referencedClasses: [],
  8062. //>>excludeEnd("ide");
  8063. messageSends: ["with:", "span", "label", "class:", "div", "style:"]
  8064. }),
  8065. $globals.HLProgressBarWidget);
  8066. $core.addMethod(
  8067. $core.method({
  8068. selector: "start",
  8069. protocol: 'actions',
  8070. fn: function (){
  8071. var self=this;
  8072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8073. return $core.withContext(function($ctx1) {
  8074. //>>excludeEnd("ctx");
  8075. self._evaluateAt_((1));
  8076. return self;
  8077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8078. }, function($ctx1) {$ctx1.fill(self,"start",{},$globals.HLProgressBarWidget)});
  8079. //>>excludeEnd("ctx");
  8080. },
  8081. //>>excludeStart("ide", pragmas.excludeIdeData);
  8082. args: [],
  8083. source: "start\x0a\x09\x22Make sure the UI has some time to update itself between each iteration\x22\x0a\x09\x0a\x09self evaluateAt: 1",
  8084. referencedClasses: [],
  8085. //>>excludeEnd("ide");
  8086. messageSends: ["evaluateAt:"]
  8087. }),
  8088. $globals.HLProgressBarWidget);
  8089. $core.addMethod(
  8090. $core.method({
  8091. selector: "updateProgress:",
  8092. protocol: 'actions',
  8093. fn: function (anInteger){
  8094. var self=this;
  8095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8096. return $core.withContext(function($ctx1) {
  8097. //>>excludeEnd("ctx");
  8098. $recv($recv(self["@bar"])._asJQuery())._css_put_("width",$recv($recv(anInteger)._asString()).__comma("%"));
  8099. return self;
  8100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8101. }, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  8102. //>>excludeEnd("ctx");
  8103. },
  8104. //>>excludeStart("ide", pragmas.excludeIdeData);
  8105. args: ["anInteger"],
  8106. source: "updateProgress: anInteger\x0a\x09bar asJQuery css: 'width' put: anInteger asString, '%'",
  8107. referencedClasses: [],
  8108. //>>excludeEnd("ide");
  8109. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  8110. }),
  8111. $globals.HLProgressBarWidget);
  8112. $core.addMethod(
  8113. $core.method({
  8114. selector: "workBlock",
  8115. protocol: 'accessing',
  8116. fn: function (){
  8117. var self=this;
  8118. var $1;
  8119. $1=self["@workBlock"];
  8120. return $1;
  8121. },
  8122. //>>excludeStart("ide", pragmas.excludeIdeData);
  8123. args: [],
  8124. source: "workBlock\x0a\x09^ workBlock",
  8125. referencedClasses: [],
  8126. //>>excludeEnd("ide");
  8127. messageSends: []
  8128. }),
  8129. $globals.HLProgressBarWidget);
  8130. $core.addMethod(
  8131. $core.method({
  8132. selector: "workBlock:",
  8133. protocol: 'accessing',
  8134. fn: function (aBlock){
  8135. var self=this;
  8136. self["@workBlock"]=aBlock;
  8137. return self;
  8138. },
  8139. //>>excludeStart("ide", pragmas.excludeIdeData);
  8140. args: ["aBlock"],
  8141. source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
  8142. referencedClasses: [],
  8143. //>>excludeEnd("ide");
  8144. messageSends: []
  8145. }),
  8146. $globals.HLProgressBarWidget);
  8147. $globals.HLProgressBarWidget.klass.iVarNames = ['default'];
  8148. $core.addMethod(
  8149. $core.method({
  8150. selector: "default",
  8151. protocol: 'accessing',
  8152. fn: function (){
  8153. var self=this;
  8154. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8155. return $core.withContext(function($ctx1) {
  8156. //>>excludeEnd("ctx");
  8157. var $2,$1,$receiver;
  8158. $2=self["@default"];
  8159. if(($receiver = $2) == null || $receiver.isNil){
  8160. self["@default"]=self._new();
  8161. $1=self["@default"];
  8162. } else {
  8163. $1=$2;
  8164. };
  8165. return $1;
  8166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8167. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressBarWidget.klass)});
  8168. //>>excludeEnd("ctx");
  8169. },
  8170. //>>excludeStart("ide", pragmas.excludeIdeData);
  8171. args: [],
  8172. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  8173. referencedClasses: [],
  8174. //>>excludeEnd("ide");
  8175. messageSends: ["ifNil:", "new"]
  8176. }),
  8177. $globals.HLProgressBarWidget.klass);
  8178. $core.addClass('HLTabWidget', $globals.HLWidget, ['widget', 'label', 'root'], 'Helios-Core');
  8179. //>>excludeStart("ide", pragmas.excludeIdeData);
  8180. $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";
  8181. //>>excludeEnd("ide");
  8182. $core.addMethod(
  8183. $core.method({
  8184. selector: "activate",
  8185. protocol: 'accessing',
  8186. fn: function (){
  8187. var self=this;
  8188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8189. return $core.withContext(function($ctx1) {
  8190. //>>excludeEnd("ctx");
  8191. $recv(self._manager())._activate_(self);
  8192. return self;
  8193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8194. }, function($ctx1) {$ctx1.fill(self,"activate",{},$globals.HLTabWidget)});
  8195. //>>excludeEnd("ctx");
  8196. },
  8197. //>>excludeStart("ide", pragmas.excludeIdeData);
  8198. args: [],
  8199. source: "activate\x0a\x09self manager activate: self",
  8200. referencedClasses: [],
  8201. //>>excludeEnd("ide");
  8202. messageSends: ["activate:", "manager"]
  8203. }),
  8204. $globals.HLTabWidget);
  8205. $core.addMethod(
  8206. $core.method({
  8207. selector: "add",
  8208. protocol: 'actions',
  8209. fn: function (){
  8210. var self=this;
  8211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8212. return $core.withContext(function($ctx1) {
  8213. //>>excludeEnd("ctx");
  8214. $recv(self._manager())._addTab_(self);
  8215. self._observeManager();
  8216. return self;
  8217. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8218. }, function($ctx1) {$ctx1.fill(self,"add",{},$globals.HLTabWidget)});
  8219. //>>excludeEnd("ctx");
  8220. },
  8221. //>>excludeStart("ide", pragmas.excludeIdeData);
  8222. args: [],
  8223. source: "add\x0a\x09self manager addTab: self.\x0a\x09self observeManager",
  8224. referencedClasses: [],
  8225. //>>excludeEnd("ide");
  8226. messageSends: ["addTab:", "manager", "observeManager"]
  8227. }),
  8228. $globals.HLTabWidget);
  8229. $core.addMethod(
  8230. $core.method({
  8231. selector: "cssClass",
  8232. protocol: 'accessing',
  8233. fn: function (){
  8234. var self=this;
  8235. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8236. return $core.withContext(function($ctx1) {
  8237. //>>excludeEnd("ctx");
  8238. var $1;
  8239. $1=$recv(self._widget())._tabClass();
  8240. return $1;
  8241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8242. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},$globals.HLTabWidget)});
  8243. //>>excludeEnd("ctx");
  8244. },
  8245. //>>excludeStart("ide", pragmas.excludeIdeData);
  8246. args: [],
  8247. source: "cssClass\x0a\x09^ self widget tabClass",
  8248. referencedClasses: [],
  8249. //>>excludeEnd("ide");
  8250. messageSends: ["tabClass", "widget"]
  8251. }),
  8252. $globals.HLTabWidget);
  8253. $core.addMethod(
  8254. $core.method({
  8255. selector: "focus",
  8256. protocol: 'accessing',
  8257. fn: function (){
  8258. var self=this;
  8259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8260. return $core.withContext(function($ctx1) {
  8261. //>>excludeEnd("ctx");
  8262. var $2,$1;
  8263. $2=self._widget();
  8264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8265. $ctx1.sendIdx["widget"]=1;
  8266. //>>excludeEnd("ctx");
  8267. $1=$recv($2)._canHaveFocus();
  8268. if($core.assert($1)){
  8269. $recv(self._widget())._focus();
  8270. };
  8271. return self;
  8272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8273. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLTabWidget)});
  8274. //>>excludeEnd("ctx");
  8275. },
  8276. //>>excludeStart("ide", pragmas.excludeIdeData);
  8277. args: [],
  8278. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  8279. referencedClasses: [],
  8280. //>>excludeEnd("ide");
  8281. messageSends: ["ifTrue:", "canHaveFocus", "widget", "focus"]
  8282. }),
  8283. $globals.HLTabWidget);
  8284. $core.addMethod(
  8285. $core.method({
  8286. selector: "hide",
  8287. protocol: 'actions',
  8288. fn: function (){
  8289. var self=this;
  8290. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8291. return $core.withContext(function($ctx1) {
  8292. //>>excludeEnd("ctx");
  8293. var $1,$receiver;
  8294. $1=self["@root"];
  8295. if(($receiver = $1) == null || $receiver.isNil){
  8296. $1;
  8297. } else {
  8298. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  8299. };
  8300. return self;
  8301. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8302. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.HLTabWidget)});
  8303. //>>excludeEnd("ctx");
  8304. },
  8305. //>>excludeStart("ide", pragmas.excludeIdeData);
  8306. args: [],
  8307. source: "hide\x0a\x09root ifNotNil: [ root asJQuery css: 'visibility' put: 'hidden' ]",
  8308. referencedClasses: [],
  8309. //>>excludeEnd("ide");
  8310. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]
  8311. }),
  8312. $globals.HLTabWidget);
  8313. $core.addMethod(
  8314. $core.method({
  8315. selector: "isActive",
  8316. protocol: 'testing',
  8317. fn: function (){
  8318. var self=this;
  8319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8320. return $core.withContext(function($ctx1) {
  8321. //>>excludeEnd("ctx");
  8322. var $1;
  8323. $1=$recv($recv(self._manager())._activeTab()).__eq(self);
  8324. return $1;
  8325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8326. }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLTabWidget)});
  8327. //>>excludeEnd("ctx");
  8328. },
  8329. //>>excludeStart("ide", pragmas.excludeIdeData);
  8330. args: [],
  8331. source: "isActive\x0a\x09^ self manager activeTab = self",
  8332. referencedClasses: [],
  8333. //>>excludeEnd("ide");
  8334. messageSends: ["=", "activeTab", "manager"]
  8335. }),
  8336. $globals.HLTabWidget);
  8337. $core.addMethod(
  8338. $core.method({
  8339. selector: "label",
  8340. protocol: 'accessing',
  8341. fn: function (){
  8342. var self=this;
  8343. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8344. return $core.withContext(function($ctx1) {
  8345. //>>excludeEnd("ctx");
  8346. var $2,$1,$receiver;
  8347. $2=self["@label"];
  8348. if(($receiver = $2) == null || $receiver.isNil){
  8349. $1="";
  8350. } else {
  8351. $1=$2;
  8352. };
  8353. return $1;
  8354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8355. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.HLTabWidget)});
  8356. //>>excludeEnd("ctx");
  8357. },
  8358. //>>excludeStart("ide", pragmas.excludeIdeData);
  8359. args: [],
  8360. source: "label\x0a\x09^ label ifNil: [ '' ]",
  8361. referencedClasses: [],
  8362. //>>excludeEnd("ide");
  8363. messageSends: ["ifNil:"]
  8364. }),
  8365. $globals.HLTabWidget);
  8366. $core.addMethod(
  8367. $core.method({
  8368. selector: "label:",
  8369. protocol: 'accessing',
  8370. fn: function (aString){
  8371. var self=this;
  8372. self["@label"]=aString;
  8373. return self;
  8374. },
  8375. //>>excludeStart("ide", pragmas.excludeIdeData);
  8376. args: ["aString"],
  8377. source: "label: aString\x0a\x09label := aString",
  8378. referencedClasses: [],
  8379. //>>excludeEnd("ide");
  8380. messageSends: []
  8381. }),
  8382. $globals.HLTabWidget);
  8383. $core.addMethod(
  8384. $core.method({
  8385. selector: "manager",
  8386. protocol: 'accessing',
  8387. fn: function (){
  8388. var self=this;
  8389. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  8390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8391. return $core.withContext(function($ctx1) {
  8392. //>>excludeEnd("ctx");
  8393. var $1;
  8394. $1=$recv($HLManager())._current();
  8395. return $1;
  8396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8397. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLTabWidget)});
  8398. //>>excludeEnd("ctx");
  8399. },
  8400. //>>excludeStart("ide", pragmas.excludeIdeData);
  8401. args: [],
  8402. source: "manager\x0a\x09^ HLManager current",
  8403. referencedClasses: ["HLManager"],
  8404. //>>excludeEnd("ide");
  8405. messageSends: ["current"]
  8406. }),
  8407. $globals.HLTabWidget);
  8408. $core.addMethod(
  8409. $core.method({
  8410. selector: "observeManager",
  8411. protocol: 'actions',
  8412. fn: function (){
  8413. var self=this;
  8414. function $HLTabLabelChanged(){return $globals.HLTabLabelChanged||(typeof HLTabLabelChanged=="undefined"?nil:HLTabLabelChanged)}
  8415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8416. return $core.withContext(function($ctx1) {
  8417. //>>excludeEnd("ctx");
  8418. $recv($recv(self._manager())._announcer())._on_send_to_($HLTabLabelChanged(),"onTabLabelChanged:",self);
  8419. return self;
  8420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8421. }, function($ctx1) {$ctx1.fill(self,"observeManager",{},$globals.HLTabWidget)});
  8422. //>>excludeEnd("ctx");
  8423. },
  8424. //>>excludeStart("ide", pragmas.excludeIdeData);
  8425. args: [],
  8426. source: "observeManager\x0a\x09self manager announcer \x0a\x09\x09on: HLTabLabelChanged\x0a\x09\x09send: #onTabLabelChanged:\x0a\x09\x09to: self",
  8427. referencedClasses: ["HLTabLabelChanged"],
  8428. //>>excludeEnd("ide");
  8429. messageSends: ["on:send:to:", "announcer", "manager"]
  8430. }),
  8431. $globals.HLTabWidget);
  8432. $core.addMethod(
  8433. $core.method({
  8434. selector: "onTabLabelChanged:",
  8435. protocol: 'reactions',
  8436. fn: function (anAnnouncement){
  8437. var self=this;
  8438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8439. return $core.withContext(function($ctx1) {
  8440. //>>excludeEnd("ctx");
  8441. var $2,$1,$4,$5,$3;
  8442. $2=$recv(anAnnouncement)._widget();
  8443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8444. $ctx1.sendIdx["widget"]=1;
  8445. //>>excludeEnd("ctx");
  8446. $1=$recv($2).__eq(self._widget());
  8447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8448. $ctx1.sendIdx["="]=1;
  8449. //>>excludeEnd("ctx");
  8450. if($core.assert($1)){
  8451. $4=self._label();
  8452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8453. $ctx1.sendIdx["label"]=1;
  8454. //>>excludeEnd("ctx");
  8455. $5=$recv(anAnnouncement)._label();
  8456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8457. $ctx1.sendIdx["label"]=2;
  8458. //>>excludeEnd("ctx");
  8459. $3=$recv($4).__eq($5);
  8460. if(!$core.assert($3)){
  8461. self._label_($recv(anAnnouncement)._label());
  8462. $recv(self._manager())._refresh();
  8463. };
  8464. };
  8465. return self;
  8466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8467. }, function($ctx1) {$ctx1.fill(self,"onTabLabelChanged:",{anAnnouncement:anAnnouncement},$globals.HLTabWidget)});
  8468. //>>excludeEnd("ctx");
  8469. },
  8470. //>>excludeStart("ide", pragmas.excludeIdeData);
  8471. args: ["anAnnouncement"],
  8472. 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 ] ]",
  8473. referencedClasses: [],
  8474. //>>excludeEnd("ide");
  8475. messageSends: ["ifTrue:", "=", "widget", "ifFalse:", "label", "label:", "refresh", "manager"]
  8476. }),
  8477. $globals.HLTabWidget);
  8478. $core.addMethod(
  8479. $core.method({
  8480. selector: "registerBindings",
  8481. protocol: 'actions',
  8482. fn: function (){
  8483. var self=this;
  8484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8485. return $core.withContext(function($ctx1) {
  8486. //>>excludeEnd("ctx");
  8487. $recv(self._widget())._registerBindings();
  8488. return self;
  8489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8490. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLTabWidget)});
  8491. //>>excludeEnd("ctx");
  8492. },
  8493. //>>excludeStart("ide", pragmas.excludeIdeData);
  8494. args: [],
  8495. source: "registerBindings\x0a\x09self widget registerBindings",
  8496. referencedClasses: [],
  8497. //>>excludeEnd("ide");
  8498. messageSends: ["registerBindings", "widget"]
  8499. }),
  8500. $globals.HLTabWidget);
  8501. $core.addMethod(
  8502. $core.method({
  8503. selector: "remove",
  8504. protocol: 'actions',
  8505. fn: function (){
  8506. var self=this;
  8507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8508. return $core.withContext(function($ctx1) {
  8509. //>>excludeEnd("ctx");
  8510. var $1,$receiver;
  8511. self._unregister();
  8512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8513. $ctx1.sendIdx["unregister"]=1;
  8514. //>>excludeEnd("ctx");
  8515. $recv(self._widget())._unregister();
  8516. $1=self["@root"];
  8517. if(($receiver = $1) == null || $receiver.isNil){
  8518. $1;
  8519. } else {
  8520. $recv($recv(self["@root"])._asJQuery())._remove();
  8521. };
  8522. return self;
  8523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8524. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLTabWidget)});
  8525. //>>excludeEnd("ctx");
  8526. },
  8527. //>>excludeStart("ide", pragmas.excludeIdeData);
  8528. args: [],
  8529. source: "remove\x0a\x09self unregister.\x0a\x09self widget unregister.\x0a\x09root ifNotNil: [ root asJQuery remove ]",
  8530. referencedClasses: [],
  8531. //>>excludeEnd("ide");
  8532. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"]
  8533. }),
  8534. $globals.HLTabWidget);
  8535. $core.addMethod(
  8536. $core.method({
  8537. selector: "renderOn:",
  8538. protocol: 'rendering',
  8539. fn: function (html){
  8540. var self=this;
  8541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8542. return $core.withContext(function($ctx1) {
  8543. //>>excludeEnd("ctx");
  8544. var $1,$2;
  8545. $1=$recv(html)._div();
  8546. $recv($1)._class_("tab");
  8547. $2=$recv($1)._yourself();
  8548. self["@root"]=$2;
  8549. self._renderTab();
  8550. return self;
  8551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8552. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLTabWidget)});
  8553. //>>excludeEnd("ctx");
  8554. },
  8555. //>>excludeStart("ide", pragmas.excludeIdeData);
  8556. args: ["html"],
  8557. source: "renderOn: html\x0a\x09root := html div\x0a\x09\x09class: 'tab';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  8558. referencedClasses: [],
  8559. //>>excludeEnd("ide");
  8560. messageSends: ["class:", "div", "yourself", "renderTab"]
  8561. }),
  8562. $globals.HLTabWidget);
  8563. $core.addMethod(
  8564. $core.method({
  8565. selector: "renderTab",
  8566. protocol: 'rendering',
  8567. fn: function (){
  8568. var self=this;
  8569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8570. return $core.withContext(function($ctx1) {
  8571. //>>excludeEnd("ctx");
  8572. var $1,$2;
  8573. $recv(self["@root"])._contents_((function(html){
  8574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8575. return $core.withContext(function($ctx2) {
  8576. //>>excludeEnd("ctx");
  8577. $1=$recv(html)._div();
  8578. $recv($1)._class_("amber_box");
  8579. $2=$recv($1)._with_((function(){
  8580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8581. return $core.withContext(function($ctx3) {
  8582. //>>excludeEnd("ctx");
  8583. return $recv(self._widget())._renderOn_(html);
  8584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8585. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8586. //>>excludeEnd("ctx");
  8587. }));
  8588. return $2;
  8589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8590. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8591. //>>excludeEnd("ctx");
  8592. }));
  8593. return self;
  8594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8595. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.HLTabWidget)});
  8596. //>>excludeEnd("ctx");
  8597. },
  8598. //>>excludeStart("ide", pragmas.excludeIdeData);
  8599. args: [],
  8600. source: "renderTab\x0a\x09root contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'amber_box';\x0a\x09\x09\x09with: [ self widget renderOn: html ] ]",
  8601. referencedClasses: [],
  8602. //>>excludeEnd("ide");
  8603. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]
  8604. }),
  8605. $globals.HLTabWidget);
  8606. $core.addMethod(
  8607. $core.method({
  8608. selector: "show",
  8609. protocol: 'actions',
  8610. fn: function (){
  8611. var self=this;
  8612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8613. return $core.withContext(function($ctx1) {
  8614. //>>excludeEnd("ctx");
  8615. var $1,$2,$receiver;
  8616. $1=self["@root"];
  8617. if(($receiver = $1) == null || $receiver.isNil){
  8618. $2="body"._asJQuery();
  8619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8620. $ctx1.sendIdx["asJQuery"]=1;
  8621. //>>excludeEnd("ctx");
  8622. self._appendToJQuery_($2);
  8623. } else {
  8624. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","visible");
  8625. };
  8626. return self;
  8627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8628. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLTabWidget)});
  8629. //>>excludeEnd("ctx");
  8630. },
  8631. //>>excludeStart("ide", pragmas.excludeIdeData);
  8632. args: [],
  8633. source: "show\x0a\x09root\x0a\x09\x09ifNil: [ self appendToJQuery: 'body' asJQuery ]\x0a\x09\x09ifNotNil: [ root asJQuery css: 'visibility' put: 'visible' ]",
  8634. referencedClasses: [],
  8635. //>>excludeEnd("ide");
  8636. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]
  8637. }),
  8638. $globals.HLTabWidget);
  8639. $core.addMethod(
  8640. $core.method({
  8641. selector: "unregister",
  8642. protocol: 'actions',
  8643. fn: function (){
  8644. var self=this;
  8645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8646. return $core.withContext(function($ctx1) {
  8647. //>>excludeEnd("ctx");
  8648. $recv($recv(self._manager())._announcer())._unsubscribe_(self);
  8649. return self;
  8650. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8651. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLTabWidget)});
  8652. //>>excludeEnd("ctx");
  8653. },
  8654. //>>excludeStart("ide", pragmas.excludeIdeData);
  8655. args: [],
  8656. source: "unregister\x0a\x09self manager announcer unsubscribe: self",
  8657. referencedClasses: [],
  8658. //>>excludeEnd("ide");
  8659. messageSends: ["unsubscribe:", "announcer", "manager"]
  8660. }),
  8661. $globals.HLTabWidget);
  8662. $core.addMethod(
  8663. $core.method({
  8664. selector: "widget",
  8665. protocol: 'accessing',
  8666. fn: function (){
  8667. var self=this;
  8668. var $1;
  8669. $1=self["@widget"];
  8670. return $1;
  8671. },
  8672. //>>excludeStart("ide", pragmas.excludeIdeData);
  8673. args: [],
  8674. source: "widget\x0a\x09^ widget",
  8675. referencedClasses: [],
  8676. //>>excludeEnd("ide");
  8677. messageSends: []
  8678. }),
  8679. $globals.HLTabWidget);
  8680. $core.addMethod(
  8681. $core.method({
  8682. selector: "widget:",
  8683. protocol: 'accessing',
  8684. fn: function (aWidget){
  8685. var self=this;
  8686. self["@widget"]=aWidget;
  8687. return self;
  8688. },
  8689. //>>excludeStart("ide", pragmas.excludeIdeData);
  8690. args: ["aWidget"],
  8691. source: "widget: aWidget\x0a\x09widget := aWidget",
  8692. referencedClasses: [],
  8693. //>>excludeEnd("ide");
  8694. messageSends: []
  8695. }),
  8696. $globals.HLTabWidget);
  8697. $core.addMethod(
  8698. $core.method({
  8699. selector: "on:labelled:",
  8700. protocol: 'instance creation',
  8701. fn: function (aWidget,aString){
  8702. var self=this;
  8703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8704. return $core.withContext(function($ctx1) {
  8705. //>>excludeEnd("ctx");
  8706. var $2,$3,$1;
  8707. $2=self._new();
  8708. $recv($2)._widget_(aWidget);
  8709. $recv($2)._label_(aString);
  8710. $3=$recv($2)._yourself();
  8711. $1=$3;
  8712. return $1;
  8713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8714. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},$globals.HLTabWidget.klass)});
  8715. //>>excludeEnd("ctx");
  8716. },
  8717. //>>excludeStart("ide", pragmas.excludeIdeData);
  8718. args: ["aWidget", "aString"],
  8719. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  8720. referencedClasses: [],
  8721. //>>excludeEnd("ide");
  8722. messageSends: ["widget:", "new", "label:", "yourself"]
  8723. }),
  8724. $globals.HLTabWidget.klass);
  8725. $core.addClass('HLTabsWidget', $globals.HLWidget, ['tabs', 'activeTab', 'history', 'selectionDisabled'], 'Helios-Core');
  8726. $core.addMethod(
  8727. $core.method({
  8728. selector: "activate:",
  8729. protocol: 'actions',
  8730. fn: function (aTab){
  8731. var self=this;
  8732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8733. return $core.withContext(function($ctx1) {
  8734. //>>excludeEnd("ctx");
  8735. var $1,$2;
  8736. $1=self._isSelectionDisabled();
  8737. if($core.assert($1)){
  8738. return self;
  8739. };
  8740. $recv($recv(self._manager())._keyBinder())._flushBindings();
  8741. $recv(aTab)._registerBindings();
  8742. self["@activeTab"]=aTab;
  8743. self._refresh();
  8744. self._addToHistory_(aTab);
  8745. $2=self._show_(aTab);
  8746. return self;
  8747. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8748. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLTabsWidget)});
  8749. //>>excludeEnd("ctx");
  8750. },
  8751. //>>excludeStart("ide", pragmas.excludeIdeData);
  8752. args: ["aTab"],
  8753. 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",
  8754. referencedClasses: [],
  8755. //>>excludeEnd("ide");
  8756. messageSends: ["ifTrue:", "isSelectionDisabled", "flushBindings", "keyBinder", "manager", "registerBindings", "refresh", "addToHistory:", "show:"]
  8757. }),
  8758. $globals.HLTabsWidget);
  8759. $core.addMethod(
  8760. $core.method({
  8761. selector: "activateNextTab",
  8762. protocol: 'actions',
  8763. fn: function (){
  8764. var self=this;
  8765. var nextTab;
  8766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8767. return $core.withContext(function($ctx1) {
  8768. //>>excludeEnd("ctx");
  8769. var $1,$2,$5,$4,$3;
  8770. var $early={};
  8771. try {
  8772. $1=self._tabs();
  8773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8774. $ctx1.sendIdx["tabs"]=1;
  8775. //>>excludeEnd("ctx");
  8776. $recv($1)._ifEmpty_((function(){
  8777. throw $early=[self];
  8778. }));
  8779. $2=self._tabs();
  8780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8781. $ctx1.sendIdx["tabs"]=2;
  8782. //>>excludeEnd("ctx");
  8783. $5=self._tabs();
  8784. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8785. $ctx1.sendIdx["tabs"]=3;
  8786. //>>excludeEnd("ctx");
  8787. $4=$recv($5)._indexOf_(self._activeTab());
  8788. $3=$recv($4).__plus((1));
  8789. nextTab=$recv($2)._at_ifAbsent_($3,(function(){
  8790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8791. return $core.withContext(function($ctx2) {
  8792. //>>excludeEnd("ctx");
  8793. return $recv(self._tabs())._first();
  8794. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8795. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8796. //>>excludeEnd("ctx");
  8797. }));
  8798. self._activate_(nextTab);
  8799. return self;
  8800. }
  8801. catch(e) {if(e===$early)return e[0]; throw e}
  8802. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8803. }, function($ctx1) {$ctx1.fill(self,"activateNextTab",{nextTab:nextTab},$globals.HLTabsWidget)});
  8804. //>>excludeEnd("ctx");
  8805. },
  8806. //>>excludeStart("ide", pragmas.excludeIdeData);
  8807. args: [],
  8808. 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",
  8809. referencedClasses: [],
  8810. //>>excludeEnd("ide");
  8811. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "+", "indexOf:", "activeTab", "first", "activate:"]
  8812. }),
  8813. $globals.HLTabsWidget);
  8814. $core.addMethod(
  8815. $core.method({
  8816. selector: "activatePreviousTab",
  8817. protocol: 'actions',
  8818. fn: function (){
  8819. var self=this;
  8820. var previousTab;
  8821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8822. return $core.withContext(function($ctx1) {
  8823. //>>excludeEnd("ctx");
  8824. var $1,$2,$5,$4,$3;
  8825. var $early={};
  8826. try {
  8827. $1=self._tabs();
  8828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8829. $ctx1.sendIdx["tabs"]=1;
  8830. //>>excludeEnd("ctx");
  8831. $recv($1)._ifEmpty_((function(){
  8832. throw $early=[self];
  8833. }));
  8834. $2=self._tabs();
  8835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8836. $ctx1.sendIdx["tabs"]=2;
  8837. //>>excludeEnd("ctx");
  8838. $5=self._tabs();
  8839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8840. $ctx1.sendIdx["tabs"]=3;
  8841. //>>excludeEnd("ctx");
  8842. $4=$recv($5)._indexOf_(self._activeTab());
  8843. $3=$recv($4).__minus((1));
  8844. previousTab=$recv($2)._at_ifAbsent_($3,(function(){
  8845. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8846. return $core.withContext(function($ctx2) {
  8847. //>>excludeEnd("ctx");
  8848. return $recv(self._tabs())._last();
  8849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8850. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8851. //>>excludeEnd("ctx");
  8852. }));
  8853. self._activate_(previousTab);
  8854. return self;
  8855. }
  8856. catch(e) {if(e===$early)return e[0]; throw e}
  8857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8858. }, function($ctx1) {$ctx1.fill(self,"activatePreviousTab",{previousTab:previousTab},$globals.HLTabsWidget)});
  8859. //>>excludeEnd("ctx");
  8860. },
  8861. //>>excludeStart("ide", pragmas.excludeIdeData);
  8862. args: [],
  8863. 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",
  8864. referencedClasses: [],
  8865. //>>excludeEnd("ide");
  8866. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "-", "indexOf:", "activeTab", "last", "activate:"]
  8867. }),
  8868. $globals.HLTabsWidget);
  8869. $core.addMethod(
  8870. $core.method({
  8871. selector: "activeTab",
  8872. protocol: 'accessing',
  8873. fn: function (){
  8874. var self=this;
  8875. var $1;
  8876. $1=self["@activeTab"];
  8877. return $1;
  8878. },
  8879. //>>excludeStart("ide", pragmas.excludeIdeData);
  8880. args: [],
  8881. source: "activeTab\x0a\x09^ activeTab",
  8882. referencedClasses: [],
  8883. //>>excludeEnd("ide");
  8884. messageSends: []
  8885. }),
  8886. $globals.HLTabsWidget);
  8887. $core.addMethod(
  8888. $core.method({
  8889. selector: "addTab:",
  8890. protocol: 'actions',
  8891. fn: function (aTab){
  8892. var self=this;
  8893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8894. return $core.withContext(function($ctx1) {
  8895. //>>excludeEnd("ctx");
  8896. $recv(self._tabs())._add_(aTab);
  8897. self._activate_(aTab);
  8898. return self;
  8899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8900. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLTabsWidget)});
  8901. //>>excludeEnd("ctx");
  8902. },
  8903. //>>excludeStart("ide", pragmas.excludeIdeData);
  8904. args: ["aTab"],
  8905. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  8906. referencedClasses: [],
  8907. //>>excludeEnd("ide");
  8908. messageSends: ["add:", "tabs", "activate:"]
  8909. }),
  8910. $globals.HLTabsWidget);
  8911. $core.addMethod(
  8912. $core.method({
  8913. selector: "addToHistory:",
  8914. protocol: 'actions',
  8915. fn: function (aTab){
  8916. var self=this;
  8917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8918. return $core.withContext(function($ctx1) {
  8919. //>>excludeEnd("ctx");
  8920. self._removeFromHistory_(aTab);
  8921. $recv(self._history())._add_(aTab);
  8922. return self;
  8923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8924. }, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  8925. //>>excludeEnd("ctx");
  8926. },
  8927. //>>excludeStart("ide", pragmas.excludeIdeData);
  8928. args: ["aTab"],
  8929. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  8930. referencedClasses: [],
  8931. //>>excludeEnd("ide");
  8932. messageSends: ["removeFromHistory:", "add:", "history"]
  8933. }),
  8934. $globals.HLTabsWidget);
  8935. $core.addMethod(
  8936. $core.method({
  8937. selector: "disableSelection",
  8938. protocol: 'actions',
  8939. fn: function (){
  8940. var self=this;
  8941. self["@selectionDisabled"]=true;
  8942. return self;
  8943. },
  8944. //>>excludeStart("ide", pragmas.excludeIdeData);
  8945. args: [],
  8946. source: "disableSelection\x0a\x09selectionDisabled := true",
  8947. referencedClasses: [],
  8948. //>>excludeEnd("ide");
  8949. messageSends: []
  8950. }),
  8951. $globals.HLTabsWidget);
  8952. $core.addMethod(
  8953. $core.method({
  8954. selector: "enableSelection",
  8955. protocol: 'actions',
  8956. fn: function (){
  8957. var self=this;
  8958. self["@selectionDisabled"]=false;
  8959. return self;
  8960. },
  8961. //>>excludeStart("ide", pragmas.excludeIdeData);
  8962. args: [],
  8963. source: "enableSelection\x0a\x09selectionDisabled := false",
  8964. referencedClasses: [],
  8965. //>>excludeEnd("ide");
  8966. messageSends: []
  8967. }),
  8968. $globals.HLTabsWidget);
  8969. $core.addMethod(
  8970. $core.method({
  8971. selector: "history",
  8972. protocol: 'accessing',
  8973. fn: function (){
  8974. var self=this;
  8975. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  8976. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8977. return $core.withContext(function($ctx1) {
  8978. //>>excludeEnd("ctx");
  8979. var $2,$1,$receiver;
  8980. $2=self["@history"];
  8981. if(($receiver = $2) == null || $receiver.isNil){
  8982. self["@history"]=$recv($OrderedCollection())._new();
  8983. $1=self["@history"];
  8984. } else {
  8985. $1=$2;
  8986. };
  8987. return $1;
  8988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8989. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLTabsWidget)});
  8990. //>>excludeEnd("ctx");
  8991. },
  8992. //>>excludeStart("ide", pragmas.excludeIdeData);
  8993. args: [],
  8994. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  8995. referencedClasses: ["OrderedCollection"],
  8996. //>>excludeEnd("ide");
  8997. messageSends: ["ifNil:", "new"]
  8998. }),
  8999. $globals.HLTabsWidget);
  9000. $core.addMethod(
  9001. $core.method({
  9002. selector: "history:",
  9003. protocol: 'accessing',
  9004. fn: function (aCollection){
  9005. var self=this;
  9006. self["@history"]=aCollection;
  9007. return self;
  9008. },
  9009. //>>excludeStart("ide", pragmas.excludeIdeData);
  9010. args: ["aCollection"],
  9011. source: "history: aCollection\x0a\x09history := aCollection",
  9012. referencedClasses: [],
  9013. //>>excludeEnd("ide");
  9014. messageSends: []
  9015. }),
  9016. $globals.HLTabsWidget);
  9017. $core.addMethod(
  9018. $core.method({
  9019. selector: "isSelectionDisabled",
  9020. protocol: 'testing',
  9021. fn: function (){
  9022. var self=this;
  9023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9024. return $core.withContext(function($ctx1) {
  9025. //>>excludeEnd("ctx");
  9026. var $2,$1,$receiver;
  9027. $2=self["@selectionDisabled"];
  9028. if(($receiver = $2) == null || $receiver.isNil){
  9029. $1=false;
  9030. } else {
  9031. $1=$2;
  9032. };
  9033. return $1;
  9034. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9035. }, function($ctx1) {$ctx1.fill(self,"isSelectionDisabled",{},$globals.HLTabsWidget)});
  9036. //>>excludeEnd("ctx");
  9037. },
  9038. //>>excludeStart("ide", pragmas.excludeIdeData);
  9039. args: [],
  9040. source: "isSelectionDisabled\x0a\x09^ selectionDisabled ifNil: [ false ]",
  9041. referencedClasses: [],
  9042. //>>excludeEnd("ide");
  9043. messageSends: ["ifNil:"]
  9044. }),
  9045. $globals.HLTabsWidget);
  9046. $core.addMethod(
  9047. $core.method({
  9048. selector: "removeActiveTab",
  9049. protocol: 'actions',
  9050. fn: function (){
  9051. var self=this;
  9052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9053. return $core.withContext(function($ctx1) {
  9054. //>>excludeEnd("ctx");
  9055. self._removeTab_(self._activeTab());
  9056. return self;
  9057. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9058. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLTabsWidget)});
  9059. //>>excludeEnd("ctx");
  9060. },
  9061. //>>excludeStart("ide", pragmas.excludeIdeData);
  9062. args: [],
  9063. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  9064. referencedClasses: [],
  9065. //>>excludeEnd("ide");
  9066. messageSends: ["removeTab:", "activeTab"]
  9067. }),
  9068. $globals.HLTabsWidget);
  9069. $core.addMethod(
  9070. $core.method({
  9071. selector: "removeFromHistory:",
  9072. protocol: 'actions',
  9073. fn: function (aTab){
  9074. var self=this;
  9075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9076. return $core.withContext(function($ctx1) {
  9077. //>>excludeEnd("ctx");
  9078. self._history_($recv(self._history())._reject_((function(each){
  9079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9080. return $core.withContext(function($ctx2) {
  9081. //>>excludeEnd("ctx");
  9082. return $recv(each).__eq_eq(aTab);
  9083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9084. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9085. //>>excludeEnd("ctx");
  9086. })));
  9087. return self;
  9088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9089. }, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9090. //>>excludeEnd("ctx");
  9091. },
  9092. //>>excludeStart("ide", pragmas.excludeIdeData);
  9093. args: ["aTab"],
  9094. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  9095. referencedClasses: [],
  9096. //>>excludeEnd("ide");
  9097. messageSends: ["history:", "reject:", "history", "=="]
  9098. }),
  9099. $globals.HLTabsWidget);
  9100. $core.addMethod(
  9101. $core.method({
  9102. selector: "removeTab:",
  9103. protocol: 'actions',
  9104. fn: function (aTab){
  9105. var self=this;
  9106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9107. return $core.withContext(function($ctx1) {
  9108. //>>excludeEnd("ctx");
  9109. var $2,$1,$3;
  9110. $2=self._tabs();
  9111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9112. $ctx1.sendIdx["tabs"]=1;
  9113. //>>excludeEnd("ctx");
  9114. $1=$recv($2)._includes_(aTab);
  9115. if(!$core.assert($1)){
  9116. return self;
  9117. };
  9118. self._removeFromHistory_(aTab);
  9119. $recv(self._tabs())._remove_(aTab);
  9120. $recv($recv(self._manager())._keyBinder())._flushBindings();
  9121. $recv(aTab)._remove();
  9122. self._refresh();
  9123. $3=self._history();
  9124. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9125. $ctx1.sendIdx["history"]=1;
  9126. //>>excludeEnd("ctx");
  9127. $recv($3)._ifNotEmpty_((function(){
  9128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9129. return $core.withContext(function($ctx2) {
  9130. //>>excludeEnd("ctx");
  9131. return $recv($recv(self._history())._last())._activate();
  9132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9133. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9134. //>>excludeEnd("ctx");
  9135. }));
  9136. return self;
  9137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9138. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9139. //>>excludeEnd("ctx");
  9140. },
  9141. //>>excludeStart("ide", pragmas.excludeIdeData);
  9142. args: ["aTab"],
  9143. 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 ]",
  9144. referencedClasses: [],
  9145. //>>excludeEnd("ide");
  9146. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "manager", "remove", "refresh", "ifNotEmpty:", "history", "activate", "last"]
  9147. }),
  9148. $globals.HLTabsWidget);
  9149. $core.addMethod(
  9150. $core.method({
  9151. selector: "removeTabForWidget:",
  9152. protocol: 'actions',
  9153. fn: function (aWidget){
  9154. var self=this;
  9155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9156. return $core.withContext(function($ctx1) {
  9157. //>>excludeEnd("ctx");
  9158. var $early={};
  9159. try {
  9160. self._removeTab_($recv(self._tabs())._detect_ifNone_((function(each){
  9161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9162. return $core.withContext(function($ctx2) {
  9163. //>>excludeEnd("ctx");
  9164. return $recv($recv(each)._widget()).__eq(aWidget);
  9165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9166. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9167. //>>excludeEnd("ctx");
  9168. }),(function(){
  9169. throw $early=[self];
  9170. })));
  9171. return self;
  9172. }
  9173. catch(e) {if(e===$early)return e[0]; throw e}
  9174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9175. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLTabsWidget)});
  9176. //>>excludeEnd("ctx");
  9177. },
  9178. //>>excludeStart("ide", pragmas.excludeIdeData);
  9179. args: ["aWidget"],
  9180. source: "removeTabForWidget: aWidget\x0a\x09self removeTab: (self tabs \x0a\x09\x09detect: [ :each | each widget = aWidget ]\x0a\x09\x09ifNone: [ ^ self ])",
  9181. referencedClasses: [],
  9182. //>>excludeEnd("ide");
  9183. messageSends: ["removeTab:", "detect:ifNone:", "tabs", "=", "widget"]
  9184. }),
  9185. $globals.HLTabsWidget);
  9186. $core.addMethod(
  9187. $core.method({
  9188. selector: "renderAddOn:",
  9189. protocol: 'rendering',
  9190. fn: function (html){
  9191. var self=this;
  9192. function $HLWidget(){return $globals.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  9193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9194. return $core.withContext(function($ctx1) {
  9195. //>>excludeEnd("ctx");
  9196. var $1,$3,$4,$5,$7,$8,$9,$6,$2;
  9197. $1=$recv(html)._div();
  9198. $recv($1)._class_("dropdown new_tab");
  9199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9200. $ctx1.sendIdx["class:"]=1;
  9201. //>>excludeEnd("ctx");
  9202. $2=$recv($1)._with_((function(){
  9203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9204. return $core.withContext(function($ctx2) {
  9205. //>>excludeEnd("ctx");
  9206. $3=$recv(html)._a();
  9207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9208. $ctx2.sendIdx["a"]=1;
  9209. //>>excludeEnd("ctx");
  9210. $recv($3)._class_("dropdown-toggle");
  9211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9212. $ctx2.sendIdx["class:"]=2;
  9213. //>>excludeEnd("ctx");
  9214. $recv($3)._at_put_("data-toggle","dropdown");
  9215. $4=$recv($3)._with_((function(){
  9216. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9217. return $core.withContext(function($ctx3) {
  9218. //>>excludeEnd("ctx");
  9219. return $recv($recv(html)._tag_("b"))._class_("caret");
  9220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9221. $ctx3.sendIdx["class:"]=3;
  9222. //>>excludeEnd("ctx");
  9223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9224. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9225. //>>excludeEnd("ctx");
  9226. }));
  9227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9228. $ctx2.sendIdx["with:"]=2;
  9229. //>>excludeEnd("ctx");
  9230. $4;
  9231. $5=$recv(html)._ul();
  9232. $recv($5)._class_("dropdown-menu");
  9233. $6=$recv($5)._with_((function(){
  9234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9235. return $core.withContext(function($ctx3) {
  9236. //>>excludeEnd("ctx");
  9237. return $recv($recv($recv($recv($HLWidget())._withAllSubclasses())._select_((function(each){
  9238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9239. return $core.withContext(function($ctx4) {
  9240. //>>excludeEnd("ctx");
  9241. return $recv(each)._canBeOpenAsTab();
  9242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9243. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,4)});
  9244. //>>excludeEnd("ctx");
  9245. })))._sorted_((function(a,b){
  9246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9247. return $core.withContext(function($ctx4) {
  9248. //>>excludeEnd("ctx");
  9249. $7=$recv(a)._tabPriority();
  9250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9251. $ctx4.sendIdx["tabPriority"]=1;
  9252. //>>excludeEnd("ctx");
  9253. return $recv($7).__lt($recv(b)._tabPriority());
  9254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9255. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3,5)});
  9256. //>>excludeEnd("ctx");
  9257. })))._do_((function(each){
  9258. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9259. return $core.withContext(function($ctx4) {
  9260. //>>excludeEnd("ctx");
  9261. return $recv($recv(html)._li())._with_((function(){
  9262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9263. return $core.withContext(function($ctx5) {
  9264. //>>excludeEnd("ctx");
  9265. $8=$recv(html)._a();
  9266. $recv($8)._with_($recv(each)._tabLabel());
  9267. $9=$recv($8)._onClick_((function(){
  9268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9269. return $core.withContext(function($ctx6) {
  9270. //>>excludeEnd("ctx");
  9271. return $recv(each)._openAsTab();
  9272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9273. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,8)});
  9274. //>>excludeEnd("ctx");
  9275. }));
  9276. return $9;
  9277. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9278. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9279. //>>excludeEnd("ctx");
  9280. }));
  9281. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9282. $ctx4.sendIdx["with:"]=4;
  9283. //>>excludeEnd("ctx");
  9284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9285. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)});
  9286. //>>excludeEnd("ctx");
  9287. }));
  9288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9289. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  9290. //>>excludeEnd("ctx");
  9291. }));
  9292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9293. $ctx2.sendIdx["with:"]=3;
  9294. //>>excludeEnd("ctx");
  9295. return $6;
  9296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9297. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9298. //>>excludeEnd("ctx");
  9299. }));
  9300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9301. $ctx1.sendIdx["with:"]=1;
  9302. //>>excludeEnd("ctx");
  9303. return self;
  9304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9305. }, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},$globals.HLTabsWidget)});
  9306. //>>excludeEnd("ctx");
  9307. },
  9308. //>>excludeStart("ide", pragmas.excludeIdeData);
  9309. args: ["html"],
  9310. 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 ] ] ] ] ]",
  9311. referencedClasses: ["HLWidget"],
  9312. //>>excludeEnd("ide");
  9313. messageSends: ["class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "li", "tabLabel", "onClick:", "openAsTab"]
  9314. }),
  9315. $globals.HLTabsWidget);
  9316. $core.addMethod(
  9317. $core.method({
  9318. selector: "renderContentOn:",
  9319. protocol: 'rendering',
  9320. fn: function (html){
  9321. var self=this;
  9322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9323. return $core.withContext(function($ctx1) {
  9324. //>>excludeEnd("ctx");
  9325. var $1,$3,$4,$2;
  9326. $1=$recv(html)._div();
  9327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9328. $ctx1.sendIdx["div"]=1;
  9329. //>>excludeEnd("ctx");
  9330. $recv($1)._class_("navbar navbar-fixed-top");
  9331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9332. $ctx1.sendIdx["class:"]=1;
  9333. //>>excludeEnd("ctx");
  9334. $2=$recv($1)._with_((function(){
  9335. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9336. return $core.withContext(function($ctx2) {
  9337. //>>excludeEnd("ctx");
  9338. $3=$recv(html)._div();
  9339. $recv($3)._class_("navbar-inner");
  9340. $4=$recv($3)._with_((function(){
  9341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9342. return $core.withContext(function($ctx3) {
  9343. //>>excludeEnd("ctx");
  9344. return self._renderTabsOn_(html);
  9345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9346. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9347. //>>excludeEnd("ctx");
  9348. }));
  9349. return $4;
  9350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9351. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9352. //>>excludeEnd("ctx");
  9353. }));
  9354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9355. $ctx1.sendIdx["with:"]=1;
  9356. //>>excludeEnd("ctx");
  9357. return self;
  9358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9359. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabsWidget)});
  9360. //>>excludeEnd("ctx");
  9361. },
  9362. //>>excludeStart("ide", pragmas.excludeIdeData);
  9363. args: ["html"],
  9364. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'navbar navbar-fixed-top';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09class: 'navbar-inner';\x0a\x09\x09\x09with: [ self renderTabsOn: html ] ].\x0a\x09\x09\x09\x0a\x09\x22obsolete\x0a\x09self renderAddOn: html\x22",
  9365. referencedClasses: [],
  9366. //>>excludeEnd("ide");
  9367. messageSends: ["class:", "div", "with:", "renderTabsOn:"]
  9368. }),
  9369. $globals.HLTabsWidget);
  9370. $core.addMethod(
  9371. $core.method({
  9372. selector: "renderTab:on:",
  9373. protocol: 'rendering',
  9374. fn: function (aTab,html){
  9375. var self=this;
  9376. var li;
  9377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9378. return $core.withContext(function($ctx1) {
  9379. //>>excludeEnd("ctx");
  9380. var $1,$2,$3,$4,$6,$5,$7,$8,$9,$10,$11,$12;
  9381. $1=$recv(html)._li();
  9382. $2=$1;
  9383. $3=$recv("width: ".__comma($recv(self._tabWidth())._asString())).__comma("px");
  9384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9385. $ctx1.sendIdx[","]=1;
  9386. //>>excludeEnd("ctx");
  9387. $recv($2)._style_($3);
  9388. $4=$1;
  9389. $6=$recv(aTab)._isActive();
  9390. if($core.assert($6)){
  9391. $5="tab active";
  9392. } else {
  9393. $5="tab inactive";
  9394. };
  9395. $recv($4)._class_($5);
  9396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9397. $ctx1.sendIdx["class:"]=1;
  9398. //>>excludeEnd("ctx");
  9399. $recv($1)._with_((function(){
  9400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9401. return $core.withContext(function($ctx2) {
  9402. //>>excludeEnd("ctx");
  9403. return $recv($recv(html)._a())._with_((function(){
  9404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9405. return $core.withContext(function($ctx3) {
  9406. //>>excludeEnd("ctx");
  9407. $7=$recv($recv(html)._tag_("i"))._class_("close");
  9408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9409. $ctx3.sendIdx["class:"]=2;
  9410. //>>excludeEnd("ctx");
  9411. $recv($7)._onClick_((function(){
  9412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9413. return $core.withContext(function($ctx4) {
  9414. //>>excludeEnd("ctx");
  9415. return self._removeTab_(aTab);
  9416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9417. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9418. //>>excludeEnd("ctx");
  9419. }));
  9420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9421. $ctx3.sendIdx["onClick:"]=1;
  9422. //>>excludeEnd("ctx");
  9423. $8=$recv(html)._span();
  9424. $recv($8)._class_($recv(aTab)._cssClass());
  9425. $9=$8;
  9426. $10=$recv(aTab)._label();
  9427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9428. $ctx3.sendIdx["label"]=1;
  9429. //>>excludeEnd("ctx");
  9430. $recv($9)._title_($10);
  9431. $11=$recv($8)._with_($recv(aTab)._label());
  9432. return $11;
  9433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9434. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9435. //>>excludeEnd("ctx");
  9436. }));
  9437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9438. $ctx2.sendIdx["with:"]=2;
  9439. //>>excludeEnd("ctx");
  9440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9441. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9442. //>>excludeEnd("ctx");
  9443. }));
  9444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9445. $ctx1.sendIdx["with:"]=1;
  9446. //>>excludeEnd("ctx");
  9447. $12=$recv($1)._onClick_((function(){
  9448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9449. return $core.withContext(function($ctx2) {
  9450. //>>excludeEnd("ctx");
  9451. return $recv(aTab)._activate();
  9452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9453. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9454. //>>excludeEnd("ctx");
  9455. }));
  9456. li=$12;
  9457. $recv($recv($recv(li)._asJQuery())._get_((0)))._at_put_("tab-data",aTab);
  9458. return self;
  9459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9460. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html,li:li},$globals.HLTabsWidget)});
  9461. //>>excludeEnd("ctx");
  9462. },
  9463. //>>excludeStart("ide", pragmas.excludeIdeData);
  9464. args: ["aTab", "html"],
  9465. 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\x09onClick: [ aTab activate ].\x0a\x09\x0a\x09(li asJQuery get: 0) at: 'tab-data' put: aTab",
  9466. referencedClasses: [],
  9467. //>>excludeEnd("ide");
  9468. messageSends: ["style:", "li", ",", "asString", "tabWidth", "class:", "ifTrue:ifFalse:", "isActive", "with:", "a", "onClick:", "tag:", "removeTab:", "span", "cssClass", "title:", "label", "activate", "at:put:", "get:", "asJQuery"]
  9469. }),
  9470. $globals.HLTabsWidget);
  9471. $core.addMethod(
  9472. $core.method({
  9473. selector: "renderTabsOn:",
  9474. protocol: 'rendering',
  9475. fn: function (html){
  9476. var self=this;
  9477. var ul;
  9478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9479. return $core.withContext(function($ctx1) {
  9480. //>>excludeEnd("ctx");
  9481. var $1,$2;
  9482. $1=$recv(html)._ul();
  9483. $recv($1)._class_("nav main-tabs");
  9484. $2=$recv($1)._with_((function(){
  9485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9486. return $core.withContext(function($ctx2) {
  9487. //>>excludeEnd("ctx");
  9488. return $recv(self._tabs())._do_((function(each){
  9489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9490. return $core.withContext(function($ctx3) {
  9491. //>>excludeEnd("ctx");
  9492. return self._renderTab_on_(each,html);
  9493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9494. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  9495. //>>excludeEnd("ctx");
  9496. }));
  9497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9498. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9499. //>>excludeEnd("ctx");
  9500. }));
  9501. ul=$2;
  9502. $recv($recv(ul)._asJQuery())._sortable_($globals.HashedCollection._newFromPairs_(["containment","parent","start",(function(){
  9503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9504. return $core.withContext(function($ctx2) {
  9505. //>>excludeEnd("ctx");
  9506. return self._disableSelection();
  9507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9508. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9509. //>>excludeEnd("ctx");
  9510. }),"stop",(function(){
  9511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9512. return $core.withContext(function($ctx2) {
  9513. //>>excludeEnd("ctx");
  9514. return $recv((function(){
  9515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9516. return $core.withContext(function($ctx3) {
  9517. //>>excludeEnd("ctx");
  9518. return self._enableSelection();
  9519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9520. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  9521. //>>excludeEnd("ctx");
  9522. }))._valueWithTimeout_((300));
  9523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9524. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  9525. //>>excludeEnd("ctx");
  9526. }),"update",(function(){
  9527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9528. return $core.withContext(function($ctx2) {
  9529. //>>excludeEnd("ctx");
  9530. return self._updateTabsOrder();
  9531. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9532. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9533. //>>excludeEnd("ctx");
  9534. })]));
  9535. return self;
  9536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9537. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html,ul:ul},$globals.HLTabsWidget)});
  9538. //>>excludeEnd("ctx");
  9539. },
  9540. //>>excludeStart("ide", pragmas.excludeIdeData);
  9541. args: ["html"],
  9542. source: "renderTabsOn: html\x0a\x09| ul |\x0a\x09ul := html ul \x0a\x09\x09class: 'nav main-tabs';\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}",
  9543. referencedClasses: [],
  9544. //>>excludeEnd("ide");
  9545. messageSends: ["class:", "ul", "with:", "do:", "tabs", "renderTab:on:", "sortable:", "asJQuery", "disableSelection", "valueWithTimeout:", "enableSelection", "updateTabsOrder"]
  9546. }),
  9547. $globals.HLTabsWidget);
  9548. $core.addMethod(
  9549. $core.method({
  9550. selector: "setupEvents",
  9551. protocol: 'private',
  9552. fn: function (){
  9553. var self=this;
  9554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9555. return $core.withContext(function($ctx1) {
  9556. //>>excludeEnd("ctx");
  9557. var $2,$3,$1,$4;
  9558. $recv("body"._asJQuery())._keydown_((function(event){
  9559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9560. return $core.withContext(function($ctx2) {
  9561. //>>excludeEnd("ctx");
  9562. $2=$recv(event)._ctrlKey();
  9563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9564. $ctx2.sendIdx["ctrlKey"]=1;
  9565. //>>excludeEnd("ctx");
  9566. $1=$recv($2)._and_((function(){
  9567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9568. return $core.withContext(function($ctx3) {
  9569. //>>excludeEnd("ctx");
  9570. $3=$recv(event)._which();
  9571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9572. $ctx3.sendIdx["which"]=1;
  9573. //>>excludeEnd("ctx");
  9574. return $recv($3).__eq((188));
  9575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9576. $ctx3.sendIdx["="]=1;
  9577. //>>excludeEnd("ctx");
  9578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9579. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9580. //>>excludeEnd("ctx");
  9581. }));
  9582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9583. $ctx2.sendIdx["and:"]=1;
  9584. //>>excludeEnd("ctx");
  9585. if($core.assert($1)){
  9586. self._activatePreviousTab();
  9587. $recv(event)._preventDefault();
  9588. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9589. $ctx2.sendIdx["preventDefault"]=1;
  9590. //>>excludeEnd("ctx");
  9591. };
  9592. $4=$recv($recv(event)._ctrlKey())._and_((function(){
  9593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9594. return $core.withContext(function($ctx3) {
  9595. //>>excludeEnd("ctx");
  9596. return $recv($recv(event)._which()).__eq((190));
  9597. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9598. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9599. //>>excludeEnd("ctx");
  9600. }));
  9601. if($core.assert($4)){
  9602. self._activateNextTab();
  9603. return $recv(event)._preventDefault();
  9604. };
  9605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9606. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  9607. //>>excludeEnd("ctx");
  9608. }));
  9609. return self;
  9610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9611. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLTabsWidget)});
  9612. //>>excludeEnd("ctx");
  9613. },
  9614. //>>excludeStart("ide", pragmas.excludeIdeData);
  9615. args: [],
  9616. 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 ] ]",
  9617. referencedClasses: [],
  9618. //>>excludeEnd("ide");
  9619. messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", "ctrlKey", "=", "which", "activatePreviousTab", "preventDefault", "activateNextTab"]
  9620. }),
  9621. $globals.HLTabsWidget);
  9622. $core.addMethod(
  9623. $core.method({
  9624. selector: "show:",
  9625. protocol: 'rendering',
  9626. fn: function (aTab){
  9627. var self=this;
  9628. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9629. return $core.withContext(function($ctx1) {
  9630. //>>excludeEnd("ctx");
  9631. var $1;
  9632. $recv(self._tabs())._do_((function(each){
  9633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9634. return $core.withContext(function($ctx2) {
  9635. //>>excludeEnd("ctx");
  9636. return $recv(each)._hide();
  9637. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9638. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9639. //>>excludeEnd("ctx");
  9640. }));
  9641. $recv(aTab)._show();
  9642. $1=$recv(aTab)._focus();
  9643. return self;
  9644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9645. }, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},$globals.HLTabsWidget)});
  9646. //>>excludeEnd("ctx");
  9647. },
  9648. //>>excludeStart("ide", pragmas.excludeIdeData);
  9649. args: ["aTab"],
  9650. source: "show: aTab\x0a\x09self tabs do: [ :each | each hide ].\x0a\x09aTab show; focus",
  9651. referencedClasses: [],
  9652. //>>excludeEnd("ide");
  9653. messageSends: ["do:", "tabs", "hide", "show", "focus"]
  9654. }),
  9655. $globals.HLTabsWidget);
  9656. $core.addMethod(
  9657. $core.method({
  9658. selector: "tabWidth",
  9659. protocol: 'accessing',
  9660. fn: function (){
  9661. var self=this;
  9662. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9663. return $core.withContext(function($ctx1) {
  9664. //>>excludeEnd("ctx");
  9665. var $1;
  9666. $1=$recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  9667. return $1;
  9668. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9669. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLTabsWidget)});
  9670. //>>excludeEnd("ctx");
  9671. },
  9672. //>>excludeStart("ide", pragmas.excludeIdeData);
  9673. args: [],
  9674. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  9675. referencedClasses: [],
  9676. //>>excludeEnd("ide");
  9677. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  9678. }),
  9679. $globals.HLTabsWidget);
  9680. $core.addMethod(
  9681. $core.method({
  9682. selector: "tabs",
  9683. protocol: 'accessing',
  9684. fn: function (){
  9685. var self=this;
  9686. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  9687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9688. return $core.withContext(function($ctx1) {
  9689. //>>excludeEnd("ctx");
  9690. var $2,$1,$receiver;
  9691. $2=self["@tabs"];
  9692. if(($receiver = $2) == null || $receiver.isNil){
  9693. self["@tabs"]=$recv($OrderedCollection())._new();
  9694. $1=self["@tabs"];
  9695. } else {
  9696. $1=$2;
  9697. };
  9698. return $1;
  9699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9700. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabsWidget)});
  9701. //>>excludeEnd("ctx");
  9702. },
  9703. //>>excludeStart("ide", pragmas.excludeIdeData);
  9704. args: [],
  9705. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  9706. referencedClasses: ["OrderedCollection"],
  9707. //>>excludeEnd("ide");
  9708. messageSends: ["ifNil:", "new"]
  9709. }),
  9710. $globals.HLTabsWidget);
  9711. $core.addMethod(
  9712. $core.method({
  9713. selector: "updateTabsOrder",
  9714. protocol: 'actions',
  9715. fn: function (){
  9716. var self=this;
  9717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9718. return $core.withContext(function($ctx1) {
  9719. //>>excludeEnd("ctx");
  9720. self["@tabs"]=$recv($recv(".main-tabs li"._asJQuery())._toArray())._collect_((function(each){
  9721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9722. return $core.withContext(function($ctx2) {
  9723. //>>excludeEnd("ctx");
  9724. return $recv(each)._at_("tab-data");
  9725. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9726. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9727. //>>excludeEnd("ctx");
  9728. }));
  9729. return self;
  9730. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9731. }, function($ctx1) {$ctx1.fill(self,"updateTabsOrder",{},$globals.HLTabsWidget)});
  9732. //>>excludeEnd("ctx");
  9733. },
  9734. //>>excludeStart("ide", pragmas.excludeIdeData);
  9735. args: [],
  9736. source: "updateTabsOrder\x0a\x09tabs := '.main-tabs li' asJQuery toArray \x0a\x09\x09collect: [ :each | each at: 'tab-data' ]",
  9737. referencedClasses: [],
  9738. //>>excludeEnd("ide");
  9739. messageSends: ["collect:", "toArray", "asJQuery", "at:"]
  9740. }),
  9741. $globals.HLTabsWidget);
  9742. $globals.HLTabsWidget.klass.iVarNames = ['current'];
  9743. $core.addClass('HLTopBarWidget', $globals.HLWidget, ['inputView'], 'Helios-Core');
  9744. $core.addMethod(
  9745. $core.method({
  9746. selector: "onSearchKeyUp:",
  9747. protocol: 'reactions',
  9748. fn: function (anEvent){
  9749. var self=this;
  9750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9751. return $core.withContext(function($ctx1) {
  9752. //>>excludeEnd("ctx");
  9753. var $1;
  9754. $1=$recv($recv(anEvent)._keyCode()).__eq((13));
  9755. if($core.assert($1)){
  9756. self._search_($recv($recv(self["@inputView"])._asJQuery())._val());
  9757. };
  9758. return self;
  9759. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9760. }, function($ctx1) {$ctx1.fill(self,"onSearchKeyUp:",{anEvent:anEvent},$globals.HLTopBarWidget)});
  9761. //>>excludeEnd("ctx");
  9762. },
  9763. //>>excludeStart("ide", pragmas.excludeIdeData);
  9764. args: ["anEvent"],
  9765. source: "onSearchKeyUp: anEvent\x0a\x0a\x09anEvent keyCode = 13 ifTrue:[\x0a\x09\x09self search: inputView asJQuery val ]",
  9766. referencedClasses: [],
  9767. //>>excludeEnd("ide");
  9768. messageSends: ["ifTrue:", "=", "keyCode", "search:", "val", "asJQuery"]
  9769. }),
  9770. $globals.HLTopBarWidget);
  9771. $core.addMethod(
  9772. $core.method({
  9773. selector: "renderContentOn:",
  9774. protocol: 'rendering',
  9775. fn: function (html){
  9776. var self=this;
  9777. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  9778. function $HLWorkspace(){return $globals.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  9779. function $HLSUnit(){return $globals.HLSUnit||(typeof HLSUnit=="undefined"?nil:HLSUnit)}
  9780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9781. return $core.withContext(function($ctx1) {
  9782. //>>excludeEnd("ctx");
  9783. var $1,$3,$4,$5,$6,$8,$9,$10,$11,$12,$13,$7,$2;
  9784. $1=$recv(html)._div();
  9785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9786. $ctx1.sendIdx["div"]=1;
  9787. //>>excludeEnd("ctx");
  9788. $recv($1)._class_("toolbar");
  9789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9790. $ctx1.sendIdx["class:"]=1;
  9791. //>>excludeEnd("ctx");
  9792. $2=$recv($1)._with_((function(){
  9793. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9794. return $core.withContext(function($ctx2) {
  9795. //>>excludeEnd("ctx");
  9796. $3=$recv(html)._div();
  9797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9798. $ctx2.sendIdx["div"]=2;
  9799. //>>excludeEnd("ctx");
  9800. return $recv($3)._with_((function(){
  9801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9802. return $core.withContext(function($ctx3) {
  9803. //>>excludeEnd("ctx");
  9804. $4=$recv(html)._input();
  9805. $recv($4)._class_("search");
  9806. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9807. $ctx3.sendIdx["class:"]=2;
  9808. //>>excludeEnd("ctx");
  9809. $recv($4)._at_put_("placeholder","Search classes, senders and more..");
  9810. $recv($4)._onKeyUp_((function(ev){
  9811. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9812. return $core.withContext(function($ctx4) {
  9813. //>>excludeEnd("ctx");
  9814. return self._onSearchKeyUp_(ev);
  9815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9816. }, function($ctx4) {$ctx4.fillBlock({ev:ev},$ctx3,3)});
  9817. //>>excludeEnd("ctx");
  9818. }));
  9819. $5=$recv($4)._value_("");
  9820. self["@inputView"]=$5;
  9821. self["@inputView"];
  9822. $6=$recv(html)._div();
  9823. $recv($6)._class_("buttons_bar");
  9824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9825. $ctx3.sendIdx["class:"]=3;
  9826. //>>excludeEnd("ctx");
  9827. $7=$recv($6)._with_((function(){
  9828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9829. return $core.withContext(function($ctx4) {
  9830. //>>excludeEnd("ctx");
  9831. $8=$recv(html)._button();
  9832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9833. $ctx4.sendIdx["button"]=1;
  9834. //>>excludeEnd("ctx");
  9835. $recv($8)._class_("button");
  9836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9837. $ctx4.sendIdx["class:"]=4;
  9838. //>>excludeEnd("ctx");
  9839. $recv($8)._onClick_((function(){
  9840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9841. return $core.withContext(function($ctx5) {
  9842. //>>excludeEnd("ctx");
  9843. return $recv($HLBrowser())._openAsTab();
  9844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9845. $ctx5.sendIdx["openAsTab"]=1;
  9846. //>>excludeEnd("ctx");
  9847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9848. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,5)});
  9849. //>>excludeEnd("ctx");
  9850. }));
  9851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9852. $ctx4.sendIdx["onClick:"]=1;
  9853. //>>excludeEnd("ctx");
  9854. $9=$recv($8)._with_("Browser");
  9855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9856. $ctx4.sendIdx["with:"]=4;
  9857. //>>excludeEnd("ctx");
  9858. $9;
  9859. $10=$recv(html)._button();
  9860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9861. $ctx4.sendIdx["button"]=2;
  9862. //>>excludeEnd("ctx");
  9863. $recv($10)._class_("button");
  9864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9865. $ctx4.sendIdx["class:"]=5;
  9866. //>>excludeEnd("ctx");
  9867. $recv($10)._onClick_((function(){
  9868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9869. return $core.withContext(function($ctx5) {
  9870. //>>excludeEnd("ctx");
  9871. return $recv($HLWorkspace())._openAsTab();
  9872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9873. $ctx5.sendIdx["openAsTab"]=2;
  9874. //>>excludeEnd("ctx");
  9875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9876. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  9877. //>>excludeEnd("ctx");
  9878. }));
  9879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9880. $ctx4.sendIdx["onClick:"]=2;
  9881. //>>excludeEnd("ctx");
  9882. $11=$recv($10)._with_("Workspace");
  9883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9884. $ctx4.sendIdx["with:"]=5;
  9885. //>>excludeEnd("ctx");
  9886. $11;
  9887. $12=$recv(html)._button();
  9888. $recv($12)._class_("button");
  9889. $recv($12)._onClick_((function(){
  9890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9891. return $core.withContext(function($ctx5) {
  9892. //>>excludeEnd("ctx");
  9893. return $recv($HLSUnit())._openAsTab();
  9894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9895. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9896. //>>excludeEnd("ctx");
  9897. }));
  9898. $13=$recv($12)._with_("Tests");
  9899. return $13;
  9900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9901. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  9902. //>>excludeEnd("ctx");
  9903. }));
  9904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9905. $ctx3.sendIdx["with:"]=3;
  9906. //>>excludeEnd("ctx");
  9907. return $7;
  9908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9909. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9910. //>>excludeEnd("ctx");
  9911. }));
  9912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9913. $ctx2.sendIdx["with:"]=2;
  9914. //>>excludeEnd("ctx");
  9915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9916. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9917. //>>excludeEnd("ctx");
  9918. }));
  9919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9920. $ctx1.sendIdx["with:"]=1;
  9921. //>>excludeEnd("ctx");
  9922. return self;
  9923. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9924. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTopBarWidget)});
  9925. //>>excludeEnd("ctx");
  9926. },
  9927. //>>excludeStart("ide", pragmas.excludeIdeData);
  9928. args: ["html"],
  9929. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'toolbar';\x0a\x09\x09with: [ html div \x0a\x09\x09\x09\x22class: 'navbar-inner';\x22\x0a\x09\x09\x09with: [ \x0a\x09\x09\x09\x09inputView := html input\x0a\x09\x09\x09\x09\x09class: 'search';\x0a\x09\x09\x09\x09\x09at: 'placeholder' put: 'Search classes, senders and more..';\x0a\x09\x09\x09\x09\x09onKeyUp: [ :ev | self onSearchKeyUp: ev ];\x0a\x09\x09\x09\x09\x09value: ''.\x0a\x0a\x09\x09\x09\x09html div\x0a\x09\x09\x09\x09\x09class: 'buttons_bar';\x0a\x09\x09\x09\x09\x09with: [\x0a\x09\x09\x09\x09\x09\x09html button class: 'button'; onClick: [ HLBrowser openAsTab ]; with: 'Browser'.\x0a\x09\x09\x09\x09\x09\x09html button class: 'button'; onClick: [ HLWorkspace openAsTab ]; with: 'Workspace'.\x0a\x09\x09\x09\x09\x09\x09html button class: 'button'; onClick: [ HLSUnit openAsTab ]; with: 'Tests' ].\x0a\x09\x09\x09] ].\x0a\x09\x09\x09",
  9930. referencedClasses: ["HLBrowser", "HLWorkspace", "HLSUnit"],
  9931. //>>excludeEnd("ide");
  9932. messageSends: ["class:", "div", "with:", "input", "at:put:", "onKeyUp:", "onSearchKeyUp:", "value:", "button", "onClick:", "openAsTab"]
  9933. }),
  9934. $globals.HLTopBarWidget);
  9935. $core.addMethod(
  9936. $core.method({
  9937. selector: "search:",
  9938. protocol: 'reactions',
  9939. fn: function (aString){
  9940. var self=this;
  9941. function $HLReferences(){return $globals.HLReferences||(typeof HLReferences=="undefined"?nil:HLReferences)}
  9942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9943. return $core.withContext(function($ctx1) {
  9944. //>>excludeEnd("ctx");
  9945. $recv($recv($HLReferences())._openAsTab())._search_(aString);
  9946. return self;
  9947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9948. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.HLTopBarWidget)});
  9949. //>>excludeEnd("ctx");
  9950. },
  9951. //>>excludeStart("ide", pragmas.excludeIdeData);
  9952. args: ["aString"],
  9953. source: "search: aString\x0a\x0a\x09HLReferences openAsTab search: aString",
  9954. referencedClasses: ["HLReferences"],
  9955. //>>excludeEnd("ide");
  9956. messageSends: ["search:", "openAsTab"]
  9957. }),
  9958. $globals.HLTopBarWidget);
  9959. $core.addClass('HLWelcomeWidget', $globals.HLWidget, [], 'Helios-Core');
  9960. $core.addMethod(
  9961. $core.method({
  9962. selector: "cssClass",
  9963. protocol: 'accessing',
  9964. fn: function (){
  9965. var self=this;
  9966. return "welcome";
  9967. },
  9968. //>>excludeStart("ide", pragmas.excludeIdeData);
  9969. args: [],
  9970. source: "cssClass\x0a\x09^ 'welcome'",
  9971. referencedClasses: [],
  9972. //>>excludeEnd("ide");
  9973. messageSends: []
  9974. }),
  9975. $globals.HLWelcomeWidget);
  9976. $core.addMethod(
  9977. $core.method({
  9978. selector: "openClassBrowser",
  9979. protocol: 'actions',
  9980. fn: function (){
  9981. var self=this;
  9982. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  9983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9984. return $core.withContext(function($ctx1) {
  9985. //>>excludeEnd("ctx");
  9986. $recv($HLBrowser())._openAsTab();
  9987. return self;
  9988. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9989. }, function($ctx1) {$ctx1.fill(self,"openClassBrowser",{},$globals.HLWelcomeWidget)});
  9990. //>>excludeEnd("ctx");
  9991. },
  9992. //>>excludeStart("ide", pragmas.excludeIdeData);
  9993. args: [],
  9994. source: "openClassBrowser\x0a\x09HLBrowser openAsTab",
  9995. referencedClasses: ["HLBrowser"],
  9996. //>>excludeEnd("ide");
  9997. messageSends: ["openAsTab"]
  9998. }),
  9999. $globals.HLWelcomeWidget);
  10000. $core.addMethod(
  10001. $core.method({
  10002. selector: "openHelp",
  10003. protocol: 'actions',
  10004. fn: function (){
  10005. var self=this;
  10006. return self;
  10007. },
  10008. //>>excludeStart("ide", pragmas.excludeIdeData);
  10009. args: [],
  10010. source: "openHelp",
  10011. referencedClasses: [],
  10012. //>>excludeEnd("ide");
  10013. messageSends: []
  10014. }),
  10015. $globals.HLWelcomeWidget);
  10016. $core.addMethod(
  10017. $core.method({
  10018. selector: "openTestRunner",
  10019. protocol: 'actions',
  10020. fn: function (){
  10021. var self=this;
  10022. function $HLSUnit(){return $globals.HLSUnit||(typeof HLSUnit=="undefined"?nil:HLSUnit)}
  10023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10024. return $core.withContext(function($ctx1) {
  10025. //>>excludeEnd("ctx");
  10026. $recv($HLSUnit())._openAsTab();
  10027. return self;
  10028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10029. }, function($ctx1) {$ctx1.fill(self,"openTestRunner",{},$globals.HLWelcomeWidget)});
  10030. //>>excludeEnd("ctx");
  10031. },
  10032. //>>excludeStart("ide", pragmas.excludeIdeData);
  10033. args: [],
  10034. source: "openTestRunner\x0a\x09HLSUnit openAsTab",
  10035. referencedClasses: ["HLSUnit"],
  10036. //>>excludeEnd("ide");
  10037. messageSends: ["openAsTab"]
  10038. }),
  10039. $globals.HLWelcomeWidget);
  10040. $core.addMethod(
  10041. $core.method({
  10042. selector: "openWorkspace",
  10043. protocol: 'actions',
  10044. fn: function (){
  10045. var self=this;
  10046. function $HLWorkspace(){return $globals.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  10047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10048. return $core.withContext(function($ctx1) {
  10049. //>>excludeEnd("ctx");
  10050. $recv($HLWorkspace())._openAsTab();
  10051. return self;
  10052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10053. }, function($ctx1) {$ctx1.fill(self,"openWorkspace",{},$globals.HLWelcomeWidget)});
  10054. //>>excludeEnd("ctx");
  10055. },
  10056. //>>excludeStart("ide", pragmas.excludeIdeData);
  10057. args: [],
  10058. source: "openWorkspace\x0a\x09HLWorkspace openAsTab",
  10059. referencedClasses: ["HLWorkspace"],
  10060. //>>excludeEnd("ide");
  10061. messageSends: ["openAsTab"]
  10062. }),
  10063. $globals.HLWelcomeWidget);
  10064. $core.addMethod(
  10065. $core.method({
  10066. selector: "renderButtonsOn:",
  10067. protocol: 'rendering',
  10068. fn: function (html){
  10069. var self=this;
  10070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10071. return $core.withContext(function($ctx1) {
  10072. //>>excludeEnd("ctx");
  10073. var $1,$2,$3,$4,$5,$6;
  10074. $1=$recv(html)._button();
  10075. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10076. $ctx1.sendIdx["button"]=1;
  10077. //>>excludeEnd("ctx");
  10078. $recv($1)._class_("button");
  10079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10080. $ctx1.sendIdx["class:"]=1;
  10081. //>>excludeEnd("ctx");
  10082. $recv($1)._with_("Class Browser");
  10083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10084. $ctx1.sendIdx["with:"]=1;
  10085. //>>excludeEnd("ctx");
  10086. $2=$recv($1)._onClick_((function(){
  10087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10088. return $core.withContext(function($ctx2) {
  10089. //>>excludeEnd("ctx");
  10090. return self._openClassBrowser();
  10091. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10092. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10093. //>>excludeEnd("ctx");
  10094. }));
  10095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10096. $ctx1.sendIdx["onClick:"]=1;
  10097. //>>excludeEnd("ctx");
  10098. $3=$recv(html)._button();
  10099. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10100. $ctx1.sendIdx["button"]=2;
  10101. //>>excludeEnd("ctx");
  10102. $recv($3)._class_("button");
  10103. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10104. $ctx1.sendIdx["class:"]=2;
  10105. //>>excludeEnd("ctx");
  10106. $recv($3)._with_("Workspace");
  10107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10108. $ctx1.sendIdx["with:"]=2;
  10109. //>>excludeEnd("ctx");
  10110. $4=$recv($3)._onClick_((function(){
  10111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10112. return $core.withContext(function($ctx2) {
  10113. //>>excludeEnd("ctx");
  10114. return self._openWorkspace();
  10115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10116. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10117. //>>excludeEnd("ctx");
  10118. }));
  10119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10120. $ctx1.sendIdx["onClick:"]=2;
  10121. //>>excludeEnd("ctx");
  10122. $5=$recv(html)._button();
  10123. $recv($5)._class_("button");
  10124. $recv($5)._with_("Test Runner");
  10125. $6=$recv($5)._onClick_((function(){
  10126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10127. return $core.withContext(function($ctx2) {
  10128. //>>excludeEnd("ctx");
  10129. return self._openTestRunner();
  10130. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10131. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10132. //>>excludeEnd("ctx");
  10133. }));
  10134. return self;
  10135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10136. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLWelcomeWidget)});
  10137. //>>excludeEnd("ctx");
  10138. },
  10139. //>>excludeStart("ide", pragmas.excludeIdeData);
  10140. args: ["html"],
  10141. 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",
  10142. referencedClasses: [],
  10143. //>>excludeEnd("ide");
  10144. messageSends: ["class:", "button", "with:", "onClick:", "openClassBrowser", "openWorkspace", "openTestRunner"]
  10145. }),
  10146. $globals.HLWelcomeWidget);
  10147. $core.addMethod(
  10148. $core.method({
  10149. selector: "renderContentOn:",
  10150. protocol: 'rendering',
  10151. fn: function (html){
  10152. var self=this;
  10153. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10154. return $core.withContext(function($ctx1) {
  10155. //>>excludeEnd("ctx");
  10156. var $1;
  10157. self._renderHelpOn_(html);
  10158. $1=self._renderButtonsOn_(html);
  10159. return self;
  10160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10161. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLWelcomeWidget)});
  10162. //>>excludeEnd("ctx");
  10163. },
  10164. //>>excludeStart("ide", pragmas.excludeIdeData);
  10165. args: ["html"],
  10166. source: "renderContentOn: html\x0a\x09self\x0a\x09\x09renderHelpOn: html;\x0a\x09\x09renderButtonsOn: html",
  10167. referencedClasses: [],
  10168. //>>excludeEnd("ide");
  10169. messageSends: ["renderHelpOn:", "renderButtonsOn:"]
  10170. }),
  10171. $globals.HLWelcomeWidget);
  10172. $core.addMethod(
  10173. $core.method({
  10174. selector: "renderHelpOn:",
  10175. protocol: 'rendering',
  10176. fn: function (html){
  10177. var self=this;
  10178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10179. return $core.withContext(function($ctx1) {
  10180. //>>excludeEnd("ctx");
  10181. var $1;
  10182. $recv($recv(html)._h2())._with_("No tools are open");
  10183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10184. $ctx1.sendIdx["with:"]=1;
  10185. //>>excludeEnd("ctx");
  10186. $recv($recv(html)._ul())._with_((function(){
  10187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10188. return $core.withContext(function($ctx2) {
  10189. //>>excludeEnd("ctx");
  10190. $1=$recv(html)._li();
  10191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10192. $ctx2.sendIdx["li"]=1;
  10193. //>>excludeEnd("ctx");
  10194. $recv($1)._with_("Perform actions with ctrl + space");
  10195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10196. $ctx2.sendIdx["with:"]=3;
  10197. //>>excludeEnd("ctx");
  10198. return $recv($recv(html)._li())._with_("Open one of the common tools:");
  10199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10200. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10201. //>>excludeEnd("ctx");
  10202. }));
  10203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10204. $ctx1.sendIdx["with:"]=2;
  10205. //>>excludeEnd("ctx");
  10206. return self;
  10207. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10208. }, function($ctx1) {$ctx1.fill(self,"renderHelpOn:",{html:html},$globals.HLWelcomeWidget)});
  10209. //>>excludeEnd("ctx");
  10210. },
  10211. //>>excludeStart("ide", pragmas.excludeIdeData);
  10212. args: ["html"],
  10213. 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:' ]",
  10214. referencedClasses: [],
  10215. //>>excludeEnd("ide");
  10216. messageSends: ["with:", "h2", "ul", "li"]
  10217. }),
  10218. $globals.HLWelcomeWidget);
  10219. });