1
0

Helios-Core.js 347 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462104631046410465104661046710468104691047010471104721047310474104751047610477104781047910480104811048210483104841048510486104871048810489104901049110492104931049410495104961049710498104991050010501105021050310504105051050610507105081050910510105111051210513105141051510516105171051810519105201052110522105231052410525105261052710528105291053010531105321053310534105351053610537105381053910540105411054210543105441054510546105471054810549105501055110552105531055410555105561055710558105591056010561105621056310564105651056610567105681056910570105711057210573105741057510576105771057810579105801058110582105831058410585105861058710588105891059010591105921059310594105951059610597105981059910600106011060210603106041060510606106071060810609106101061110612106131061410615106161061710618106191062010621106221062310624106251062610627106281062910630106311063210633106341063510636106371063810639106401064110642106431064410645106461064710648106491065010651106521065310654106551065610657106581065910660106611066210663106641066510666106671066810669106701067110672106731067410675106761067710678106791068010681106821068310684106851068610687106881068910690106911069210693
  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 $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 environment \x0a\x09\x09\x09copyClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  672. referencedClasses: [],
  673. //>>excludeEnd("ide");
  674. messageSends: ["withChangesDo:", "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\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. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3335. return $core.withContext(function($ctx1) {
  3336. //>>excludeEnd("ctx");
  3337. $recv(console)._log_(anObject);
  3338. return self;
  3339. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3340. }, function($ctx1) {$ctx1.fill(self,"onItemDoubleClicked:on:",{anEvent:anEvent,anObject:anObject},$globals.HLListWidget)});
  3341. //>>excludeEnd("ctx");
  3342. },
  3343. //>>excludeStart("ide", pragmas.excludeIdeData);
  3344. args: ["anEvent", "anObject"],
  3345. 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\x0a\x09console log: anObject",
  3346. referencedClasses: [],
  3347. //>>excludeEnd("ide");
  3348. messageSends: ["log:"]
  3349. }),
  3350. $globals.HLListWidget);
  3351. $core.addMethod(
  3352. $core.method({
  3353. selector: "positionOf:",
  3354. protocol: 'accessing',
  3355. fn: function (aListItem){
  3356. var self=this;
  3357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3358. return $core.withContext(function($ctx1) {
  3359. //>>excludeEnd("ctx");
  3360. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  3361. ;
  3362. return self;
  3363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3364. }, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},$globals.HLListWidget)});
  3365. //>>excludeEnd("ctx");
  3366. },
  3367. //>>excludeStart("ide", pragmas.excludeIdeData);
  3368. args: ["aListItem"],
  3369. source: "positionOf: aListItem\x0a\x09<\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09>",
  3370. referencedClasses: [],
  3371. //>>excludeEnd("ide");
  3372. messageSends: []
  3373. }),
  3374. $globals.HLListWidget);
  3375. $core.addMethod(
  3376. $core.method({
  3377. selector: "reactivateListItem:",
  3378. protocol: 'actions',
  3379. fn: function (aListItem){
  3380. var self=this;
  3381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3382. return $core.withContext(function($ctx1) {
  3383. //>>excludeEnd("ctx");
  3384. self._activateListItem_(aListItem);
  3385. self._reselectItem_(self._selectedItem());
  3386. return self;
  3387. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3388. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{aListItem:aListItem},$globals.HLListWidget)});
  3389. //>>excludeEnd("ctx");
  3390. },
  3391. //>>excludeStart("ide", pragmas.excludeIdeData);
  3392. args: ["aListItem"],
  3393. source: "reactivateListItem: aListItem\x0a\x09self activateListItem: aListItem.\x0a\x09self reselectItem: self selectedItem",
  3394. referencedClasses: [],
  3395. //>>excludeEnd("ide");
  3396. messageSends: ["activateListItem:", "reselectItem:", "selectedItem"]
  3397. }),
  3398. $globals.HLListWidget);
  3399. $core.addMethod(
  3400. $core.method({
  3401. selector: "refresh",
  3402. protocol: 'actions',
  3403. fn: function (){
  3404. var self=this;
  3405. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3406. return $core.withContext(function($ctx1) {
  3407. //>>excludeEnd("ctx");
  3408. var $1,$receiver;
  3409. (
  3410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3411. $ctx1.supercall = true,
  3412. //>>excludeEnd("ctx");
  3413. $globals.HLListWidget.superclass.fn.prototype._refresh.apply($recv(self), []));
  3414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3415. $ctx1.supercall = false;
  3416. //>>excludeEnd("ctx");;
  3417. $1=self._selectedItem();
  3418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3419. $ctx1.sendIdx["selectedItem"]=1;
  3420. //>>excludeEnd("ctx");
  3421. if(($receiver = $1) == null || $receiver.isNil){
  3422. $1;
  3423. } else {
  3424. self._ensureVisible_(self._findListItemFor_(self._selectedItem()));
  3425. };
  3426. return self;
  3427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3428. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLListWidget)});
  3429. //>>excludeEnd("ctx");
  3430. },
  3431. //>>excludeStart("ide", pragmas.excludeIdeData);
  3432. args: [],
  3433. source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
  3434. referencedClasses: [],
  3435. //>>excludeEnd("ide");
  3436. messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"]
  3437. }),
  3438. $globals.HLListWidget);
  3439. $core.addMethod(
  3440. $core.method({
  3441. selector: "renderButtonsOn:",
  3442. protocol: 'rendering',
  3443. fn: function (html){
  3444. var self=this;
  3445. return self;
  3446. },
  3447. //>>excludeStart("ide", pragmas.excludeIdeData);
  3448. args: ["html"],
  3449. source: "renderButtonsOn: html",
  3450. referencedClasses: [],
  3451. //>>excludeEnd("ide");
  3452. messageSends: []
  3453. }),
  3454. $globals.HLListWidget);
  3455. $core.addMethod(
  3456. $core.method({
  3457. selector: "renderContentOn:",
  3458. protocol: 'rendering',
  3459. fn: function (html){
  3460. var self=this;
  3461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3462. return $core.withContext(function($ctx1) {
  3463. //>>excludeEnd("ctx");
  3464. var $1,$2,$3,$4;
  3465. $1=$recv(html)._ul();
  3466. $recv($1)._class_(self._listCssClass());
  3467. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3468. $ctx1.sendIdx["class:"]=1;
  3469. //>>excludeEnd("ctx");
  3470. $recv($1)._with_((function(){
  3471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3472. return $core.withContext(function($ctx2) {
  3473. //>>excludeEnd("ctx");
  3474. return self._renderListOn_(html);
  3475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3476. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3477. //>>excludeEnd("ctx");
  3478. }));
  3479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3480. $ctx1.sendIdx["with:"]=1;
  3481. //>>excludeEnd("ctx");
  3482. $2=$recv($1)._onClick_((function(){
  3483. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3484. return $core.withContext(function($ctx2) {
  3485. //>>excludeEnd("ctx");
  3486. return self._focus();
  3487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3488. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3489. //>>excludeEnd("ctx");
  3490. }));
  3491. $3=$recv(html)._div();
  3492. $recv($3)._class_(self._buttonsDivCssClass());
  3493. $4=$recv($3)._with_((function(){
  3494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3495. return $core.withContext(function($ctx2) {
  3496. //>>excludeEnd("ctx");
  3497. return self._renderButtonsOn_(html);
  3498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3499. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3500. //>>excludeEnd("ctx");
  3501. }));
  3502. self._setupKeyBindings();
  3503. return self;
  3504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3505. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLListWidget)});
  3506. //>>excludeEnd("ctx");
  3507. },
  3508. //>>excludeStart("ide", pragmas.excludeIdeData);
  3509. args: ["html"],
  3510. 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",
  3511. referencedClasses: [],
  3512. //>>excludeEnd("ide");
  3513. messageSends: ["class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "focus", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
  3514. }),
  3515. $globals.HLListWidget);
  3516. $core.addMethod(
  3517. $core.method({
  3518. selector: "renderItem:on:",
  3519. protocol: 'rendering',
  3520. fn: function (anObject,html){
  3521. var self=this;
  3522. var li,a;
  3523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3524. return $core.withContext(function($ctx1) {
  3525. //>>excludeEnd("ctx");
  3526. var $1,$2,$4,$6,$5,$3;
  3527. li=$recv(html)._li();
  3528. $1=$recv(li)._asJQuery();
  3529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3530. $ctx1.sendIdx["asJQuery"]=1;
  3531. //>>excludeEnd("ctx");
  3532. $recv($1)._data_put_("item",anObject);
  3533. $2=li;
  3534. $recv($2)._class_(self._listCssClassForItem_(anObject));
  3535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3536. $ctx1.sendIdx["class:"]=1;
  3537. //>>excludeEnd("ctx");
  3538. $3=$recv($2)._with_((function(){
  3539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3540. return $core.withContext(function($ctx2) {
  3541. //>>excludeEnd("ctx");
  3542. $4=$recv(html)._a();
  3543. $recv($4)._with_((function(){
  3544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3545. return $core.withContext(function($ctx3) {
  3546. //>>excludeEnd("ctx");
  3547. $recv($recv(html)._tag_("i"))._class_(self._cssClassForItem_(anObject));
  3548. return self._renderItemLabel_on_(anObject,html);
  3549. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3550. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3551. //>>excludeEnd("ctx");
  3552. }));
  3553. $5=$recv($4)._onClick_((function(){
  3554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3555. return $core.withContext(function($ctx3) {
  3556. //>>excludeEnd("ctx");
  3557. $6=$recv(li)._asJQuery();
  3558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3559. $ctx3.sendIdx["asJQuery"]=2;
  3560. //>>excludeEnd("ctx");
  3561. return self._reactivateListItem_($6);
  3562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3563. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3564. //>>excludeEnd("ctx");
  3565. }));
  3566. a=$5;
  3567. a;
  3568. return $recv($recv(a)._asJQuery())._dblclick_((function(ev){
  3569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3570. return $core.withContext(function($ctx3) {
  3571. //>>excludeEnd("ctx");
  3572. return self._onItemDoubleClicked_on_(ev,anObject);
  3573. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3574. }, function($ctx3) {$ctx3.fillBlock({ev:ev},$ctx2,4)});
  3575. //>>excludeEnd("ctx");
  3576. }));
  3577. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3578. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3579. //>>excludeEnd("ctx");
  3580. }));
  3581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3582. $ctx1.sendIdx["with:"]=1;
  3583. //>>excludeEnd("ctx");
  3584. return self;
  3585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3586. }, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li,a:a},$globals.HLListWidget)});
  3587. //>>excludeEnd("ctx");
  3588. },
  3589. //>>excludeStart("ide", pragmas.excludeIdeData);
  3590. args: ["anObject", "html"],
  3591. 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]",
  3592. referencedClasses: [],
  3593. //>>excludeEnd("ide");
  3594. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:on:", "onClick:", "reactivateListItem:", "dblclick:", "onItemDoubleClicked:on:"]
  3595. }),
  3596. $globals.HLListWidget);
  3597. $core.addMethod(
  3598. $core.method({
  3599. selector: "renderItemLabel:on:",
  3600. protocol: 'rendering',
  3601. fn: function (anObject,html){
  3602. var self=this;
  3603. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3604. return $core.withContext(function($ctx1) {
  3605. //>>excludeEnd("ctx");
  3606. $recv(html)._with_($recv(anObject)._asString());
  3607. return self;
  3608. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3609. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},$globals.HLListWidget)});
  3610. //>>excludeEnd("ctx");
  3611. },
  3612. //>>excludeStart("ide", pragmas.excludeIdeData);
  3613. args: ["anObject", "html"],
  3614. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  3615. referencedClasses: [],
  3616. //>>excludeEnd("ide");
  3617. messageSends: ["with:", "asString"]
  3618. }),
  3619. $globals.HLListWidget);
  3620. $core.addMethod(
  3621. $core.method({
  3622. selector: "renderListOn:",
  3623. protocol: 'rendering',
  3624. fn: function (html){
  3625. var self=this;
  3626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3627. return $core.withContext(function($ctx1) {
  3628. //>>excludeEnd("ctx");
  3629. $recv(self._items())._do_((function(each){
  3630. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3631. return $core.withContext(function($ctx2) {
  3632. //>>excludeEnd("ctx");
  3633. return self._renderItem_on_(each,html);
  3634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3635. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3636. //>>excludeEnd("ctx");
  3637. }));
  3638. return self;
  3639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3640. }, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},$globals.HLListWidget)});
  3641. //>>excludeEnd("ctx");
  3642. },
  3643. //>>excludeStart("ide", pragmas.excludeIdeData);
  3644. args: ["html"],
  3645. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  3646. referencedClasses: [],
  3647. //>>excludeEnd("ide");
  3648. messageSends: ["do:", "items", "renderItem:on:"]
  3649. }),
  3650. $globals.HLListWidget);
  3651. $core.addMethod(
  3652. $core.method({
  3653. selector: "reselectItem:",
  3654. protocol: 'actions',
  3655. fn: function (anObject){
  3656. var self=this;
  3657. return self;
  3658. },
  3659. //>>excludeStart("ide", pragmas.excludeIdeData);
  3660. args: ["anObject"],
  3661. source: "reselectItem: anObject",
  3662. referencedClasses: [],
  3663. //>>excludeEnd("ide");
  3664. messageSends: []
  3665. }),
  3666. $globals.HLListWidget);
  3667. $core.addMethod(
  3668. $core.method({
  3669. selector: "selectItem:",
  3670. protocol: 'actions',
  3671. fn: function (anObject){
  3672. var self=this;
  3673. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3674. return $core.withContext(function($ctx1) {
  3675. //>>excludeEnd("ctx");
  3676. self._selectedItem_(anObject);
  3677. return self;
  3678. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3679. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},$globals.HLListWidget)});
  3680. //>>excludeEnd("ctx");
  3681. },
  3682. //>>excludeStart("ide", pragmas.excludeIdeData);
  3683. args: ["anObject"],
  3684. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  3685. referencedClasses: [],
  3686. //>>excludeEnd("ide");
  3687. messageSends: ["selectedItem:"]
  3688. }),
  3689. $globals.HLListWidget);
  3690. $core.addMethod(
  3691. $core.method({
  3692. selector: "selectedItem",
  3693. protocol: 'accessing',
  3694. fn: function (){
  3695. var self=this;
  3696. var $1;
  3697. $1=self["@selectedItem"];
  3698. return $1;
  3699. },
  3700. //>>excludeStart("ide", pragmas.excludeIdeData);
  3701. args: [],
  3702. source: "selectedItem\x0a\x09^ selectedItem",
  3703. referencedClasses: [],
  3704. //>>excludeEnd("ide");
  3705. messageSends: []
  3706. }),
  3707. $globals.HLListWidget);
  3708. $core.addMethod(
  3709. $core.method({
  3710. selector: "selectedItem:",
  3711. protocol: 'accessing',
  3712. fn: function (anObject){
  3713. var self=this;
  3714. self["@selectedItem"]=anObject;
  3715. return self;
  3716. },
  3717. //>>excludeStart("ide", pragmas.excludeIdeData);
  3718. args: ["anObject"],
  3719. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  3720. referencedClasses: [],
  3721. //>>excludeEnd("ide");
  3722. messageSends: []
  3723. }),
  3724. $globals.HLListWidget);
  3725. $core.addMethod(
  3726. $core.method({
  3727. selector: "setupKeyBindings",
  3728. protocol: 'events',
  3729. fn: function (){
  3730. var self=this;
  3731. function $HLRepeatedKeyDownHandler(){return $globals.HLRepeatedKeyDownHandler||(typeof HLRepeatedKeyDownHandler=="undefined"?nil:HLRepeatedKeyDownHandler)}
  3732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3733. return $core.withContext(function($ctx1) {
  3734. //>>excludeEnd("ctx");
  3735. var $1,$2,$3;
  3736. $1=$recv($HLRepeatedKeyDownHandler())._on_(self);
  3737. $recv($1)._whileKeyDown_do_((38),(function(){
  3738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3739. return $core.withContext(function($ctx2) {
  3740. //>>excludeEnd("ctx");
  3741. return self._activatePreviousListItem();
  3742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3743. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3744. //>>excludeEnd("ctx");
  3745. }));
  3746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3747. $ctx1.sendIdx["whileKeyDown:do:"]=1;
  3748. //>>excludeEnd("ctx");
  3749. $recv($1)._whileKeyDown_do_((40),(function(){
  3750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3751. return $core.withContext(function($ctx2) {
  3752. //>>excludeEnd("ctx");
  3753. return self._activateNextListItem();
  3754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3755. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3756. //>>excludeEnd("ctx");
  3757. }));
  3758. $2=$recv($1)._rebindKeys();
  3759. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3761. return $core.withContext(function($ctx2) {
  3762. //>>excludeEnd("ctx");
  3763. $3=$recv($recv(e)._which()).__eq((13));
  3764. if($core.assert($3)){
  3765. return self._reselectItem_(self._selectedItem());
  3766. };
  3767. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3768. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,3)});
  3769. //>>excludeEnd("ctx");
  3770. }));
  3771. return self;
  3772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3773. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLListWidget)});
  3774. //>>excludeEnd("ctx");
  3775. },
  3776. //>>excludeStart("ide", pragmas.excludeIdeData);
  3777. args: [],
  3778. 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 ] ]",
  3779. referencedClasses: ["HLRepeatedKeyDownHandler"],
  3780. //>>excludeEnd("ide");
  3781. messageSends: ["whileKeyDown:do:", "on:", "activatePreviousListItem", "activateNextListItem", "rebindKeys", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "reselectItem:", "selectedItem"]
  3782. }),
  3783. $globals.HLListWidget);
  3784. $core.addClass('HLNavigationListWidget', $globals.HLListWidget, ['previous', 'next'], 'Helios-Core');
  3785. $core.addMethod(
  3786. $core.method({
  3787. selector: "next",
  3788. protocol: 'accessing',
  3789. fn: function (){
  3790. var self=this;
  3791. var $1;
  3792. $1=self["@next"];
  3793. return $1;
  3794. },
  3795. //>>excludeStart("ide", pragmas.excludeIdeData);
  3796. args: [],
  3797. source: "next\x0a\x09^ next",
  3798. referencedClasses: [],
  3799. //>>excludeEnd("ide");
  3800. messageSends: []
  3801. }),
  3802. $globals.HLNavigationListWidget);
  3803. $core.addMethod(
  3804. $core.method({
  3805. selector: "next:",
  3806. protocol: 'accessing',
  3807. fn: function (aWidget){
  3808. var self=this;
  3809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3810. return $core.withContext(function($ctx1) {
  3811. //>>excludeEnd("ctx");
  3812. var $1;
  3813. self["@next"]=aWidget;
  3814. $1=$recv($recv(aWidget)._previous()).__eq(self);
  3815. if(!$core.assert($1)){
  3816. $recv(aWidget)._previous_(self);
  3817. };
  3818. return self;
  3819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3820. }, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3821. //>>excludeEnd("ctx");
  3822. },
  3823. //>>excludeStart("ide", pragmas.excludeIdeData);
  3824. args: ["aWidget"],
  3825. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  3826. referencedClasses: [],
  3827. //>>excludeEnd("ide");
  3828. messageSends: ["ifFalse:", "=", "previous", "previous:"]
  3829. }),
  3830. $globals.HLNavigationListWidget);
  3831. $core.addMethod(
  3832. $core.method({
  3833. selector: "nextFocus",
  3834. protocol: 'actions',
  3835. fn: function (){
  3836. var self=this;
  3837. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3838. return $core.withContext(function($ctx1) {
  3839. //>>excludeEnd("ctx");
  3840. var $1,$receiver;
  3841. $1=self._next();
  3842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3843. $ctx1.sendIdx["next"]=1;
  3844. //>>excludeEnd("ctx");
  3845. if(($receiver = $1) == null || $receiver.isNil){
  3846. $1;
  3847. } else {
  3848. $recv(self._next())._focus();
  3849. };
  3850. return self;
  3851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3852. }, function($ctx1) {$ctx1.fill(self,"nextFocus",{},$globals.HLNavigationListWidget)});
  3853. //>>excludeEnd("ctx");
  3854. },
  3855. //>>excludeStart("ide", pragmas.excludeIdeData);
  3856. args: [],
  3857. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  3858. referencedClasses: [],
  3859. //>>excludeEnd("ide");
  3860. messageSends: ["ifNotNil:", "next", "focus"]
  3861. }),
  3862. $globals.HLNavigationListWidget);
  3863. $core.addMethod(
  3864. $core.method({
  3865. selector: "previous",
  3866. protocol: 'accessing',
  3867. fn: function (){
  3868. var self=this;
  3869. var $1;
  3870. $1=self["@previous"];
  3871. return $1;
  3872. },
  3873. //>>excludeStart("ide", pragmas.excludeIdeData);
  3874. args: [],
  3875. source: "previous\x0a\x09^ previous",
  3876. referencedClasses: [],
  3877. //>>excludeEnd("ide");
  3878. messageSends: []
  3879. }),
  3880. $globals.HLNavigationListWidget);
  3881. $core.addMethod(
  3882. $core.method({
  3883. selector: "previous:",
  3884. protocol: 'accessing',
  3885. fn: function (aWidget){
  3886. var self=this;
  3887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3888. return $core.withContext(function($ctx1) {
  3889. //>>excludeEnd("ctx");
  3890. var $1;
  3891. self["@previous"]=aWidget;
  3892. $1=$recv($recv(aWidget)._next()).__eq(self);
  3893. if(!$core.assert($1)){
  3894. $recv(aWidget)._next_(self);
  3895. };
  3896. return self;
  3897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3898. }, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3899. //>>excludeEnd("ctx");
  3900. },
  3901. //>>excludeStart("ide", pragmas.excludeIdeData);
  3902. args: ["aWidget"],
  3903. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  3904. referencedClasses: [],
  3905. //>>excludeEnd("ide");
  3906. messageSends: ["ifFalse:", "=", "next", "next:"]
  3907. }),
  3908. $globals.HLNavigationListWidget);
  3909. $core.addMethod(
  3910. $core.method({
  3911. selector: "previousFocus",
  3912. protocol: 'actions',
  3913. fn: function (){
  3914. var self=this;
  3915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3916. return $core.withContext(function($ctx1) {
  3917. //>>excludeEnd("ctx");
  3918. var $1,$receiver;
  3919. $1=self._previous();
  3920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3921. $ctx1.sendIdx["previous"]=1;
  3922. //>>excludeEnd("ctx");
  3923. if(($receiver = $1) == null || $receiver.isNil){
  3924. $1;
  3925. } else {
  3926. $recv(self._previous())._focus();
  3927. };
  3928. return self;
  3929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3930. }, function($ctx1) {$ctx1.fill(self,"previousFocus",{},$globals.HLNavigationListWidget)});
  3931. //>>excludeEnd("ctx");
  3932. },
  3933. //>>excludeStart("ide", pragmas.excludeIdeData);
  3934. args: [],
  3935. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  3936. referencedClasses: [],
  3937. //>>excludeEnd("ide");
  3938. messageSends: ["ifNotNil:", "previous", "focus"]
  3939. }),
  3940. $globals.HLNavigationListWidget);
  3941. $core.addMethod(
  3942. $core.method({
  3943. selector: "setupKeyBindings",
  3944. protocol: 'events',
  3945. fn: function (){
  3946. var self=this;
  3947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3948. return $core.withContext(function($ctx1) {
  3949. //>>excludeEnd("ctx");
  3950. var $2,$1,$3;
  3951. (
  3952. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3953. $ctx1.supercall = true,
  3954. //>>excludeEnd("ctx");
  3955. $globals.HLNavigationListWidget.superclass.fn.prototype._setupKeyBindings.apply($recv(self), []));
  3956. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3957. $ctx1.supercall = false;
  3958. //>>excludeEnd("ctx");;
  3959. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3961. return $core.withContext(function($ctx2) {
  3962. //>>excludeEnd("ctx");
  3963. $2=$recv(e)._which();
  3964. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3965. $ctx2.sendIdx["which"]=1;
  3966. //>>excludeEnd("ctx");
  3967. $1=$recv($2).__eq((39));
  3968. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3969. $ctx2.sendIdx["="]=1;
  3970. //>>excludeEnd("ctx");
  3971. if($core.assert($1)){
  3972. self._nextFocus();
  3973. };
  3974. $3=$recv($recv(e)._which()).__eq((37));
  3975. if($core.assert($3)){
  3976. return self._previousFocus();
  3977. };
  3978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3979. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  3980. //>>excludeEnd("ctx");
  3981. }));
  3982. return self;
  3983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3984. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLNavigationListWidget)});
  3985. //>>excludeEnd("ctx");
  3986. },
  3987. //>>excludeStart("ide", pragmas.excludeIdeData);
  3988. args: [],
  3989. 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 ] ]",
  3990. referencedClasses: [],
  3991. //>>excludeEnd("ide");
  3992. messageSends: ["setupKeyBindings", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "nextFocus", "previousFocus"]
  3993. }),
  3994. $globals.HLNavigationListWidget);
  3995. $core.addClass('HLToolListWidget', $globals.HLNavigationListWidget, ['model'], 'Helios-Core');
  3996. $core.addMethod(
  3997. $core.method({
  3998. selector: "activateListItem:",
  3999. protocol: 'actions',
  4000. fn: function (anItem){
  4001. var self=this;
  4002. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4003. return $core.withContext(function($ctx1) {
  4004. //>>excludeEnd("ctx");
  4005. $recv(self._model())._withChangesDo_((function(){
  4006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4007. return $core.withContext(function($ctx2) {
  4008. //>>excludeEnd("ctx");
  4009. return (
  4010. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4011. $ctx2.supercall = true,
  4012. //>>excludeEnd("ctx");
  4013. $globals.HLToolListWidget.superclass.fn.prototype._activateListItem_.apply($recv(self), [anItem]));
  4014. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4015. $ctx2.supercall = false;
  4016. //>>excludeEnd("ctx");;
  4017. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4018. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4019. //>>excludeEnd("ctx");
  4020. }));
  4021. return self;
  4022. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4023. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4024. //>>excludeEnd("ctx");
  4025. },
  4026. //>>excludeStart("ide", pragmas.excludeIdeData);
  4027. args: ["anItem"],
  4028. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  4029. referencedClasses: [],
  4030. //>>excludeEnd("ide");
  4031. messageSends: ["withChangesDo:", "model", "activateListItem:"]
  4032. }),
  4033. $globals.HLToolListWidget);
  4034. $core.addMethod(
  4035. $core.method({
  4036. selector: "activateNextListItem",
  4037. protocol: 'actions',
  4038. fn: function (){
  4039. var self=this;
  4040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4041. return $core.withContext(function($ctx1) {
  4042. //>>excludeEnd("ctx");
  4043. $recv(self._model())._withChangesDo_((function(){
  4044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4045. return $core.withContext(function($ctx2) {
  4046. //>>excludeEnd("ctx");
  4047. return (
  4048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4049. $ctx2.supercall = true,
  4050. //>>excludeEnd("ctx");
  4051. $globals.HLToolListWidget.superclass.fn.prototype._activateNextListItem.apply($recv(self), []));
  4052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4053. $ctx2.supercall = false;
  4054. //>>excludeEnd("ctx");;
  4055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4056. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4057. //>>excludeEnd("ctx");
  4058. }));
  4059. return self;
  4060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4061. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLToolListWidget)});
  4062. //>>excludeEnd("ctx");
  4063. },
  4064. //>>excludeStart("ide", pragmas.excludeIdeData);
  4065. args: [],
  4066. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  4067. referencedClasses: [],
  4068. //>>excludeEnd("ide");
  4069. messageSends: ["withChangesDo:", "model", "activateNextListItem"]
  4070. }),
  4071. $globals.HLToolListWidget);
  4072. $core.addMethod(
  4073. $core.method({
  4074. selector: "activatePreviousListItem",
  4075. protocol: 'actions',
  4076. fn: function (){
  4077. var self=this;
  4078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4079. return $core.withContext(function($ctx1) {
  4080. //>>excludeEnd("ctx");
  4081. $recv(self._model())._withChangesDo_((function(){
  4082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4083. return $core.withContext(function($ctx2) {
  4084. //>>excludeEnd("ctx");
  4085. return (
  4086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4087. $ctx2.supercall = true,
  4088. //>>excludeEnd("ctx");
  4089. $globals.HLToolListWidget.superclass.fn.prototype._activatePreviousListItem.apply($recv(self), []));
  4090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4091. $ctx2.supercall = false;
  4092. //>>excludeEnd("ctx");;
  4093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4094. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4095. //>>excludeEnd("ctx");
  4096. }));
  4097. return self;
  4098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4099. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLToolListWidget)});
  4100. //>>excludeEnd("ctx");
  4101. },
  4102. //>>excludeStart("ide", pragmas.excludeIdeData);
  4103. args: [],
  4104. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  4105. referencedClasses: [],
  4106. //>>excludeEnd("ide");
  4107. messageSends: ["withChangesDo:", "model", "activatePreviousListItem"]
  4108. }),
  4109. $globals.HLToolListWidget);
  4110. $core.addMethod(
  4111. $core.method({
  4112. selector: "commandCategory",
  4113. protocol: 'accessing',
  4114. fn: function (){
  4115. var self=this;
  4116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4117. return $core.withContext(function($ctx1) {
  4118. //>>excludeEnd("ctx");
  4119. var $1;
  4120. $1=self._label();
  4121. return $1;
  4122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4123. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},$globals.HLToolListWidget)});
  4124. //>>excludeEnd("ctx");
  4125. },
  4126. //>>excludeStart("ide", pragmas.excludeIdeData);
  4127. args: [],
  4128. source: "commandCategory\x0a\x09^ self label",
  4129. referencedClasses: [],
  4130. //>>excludeEnd("ide");
  4131. messageSends: ["label"]
  4132. }),
  4133. $globals.HLToolListWidget);
  4134. $core.addMethod(
  4135. $core.method({
  4136. selector: "label",
  4137. protocol: 'accessing',
  4138. fn: function (){
  4139. var self=this;
  4140. return "List";
  4141. },
  4142. //>>excludeStart("ide", pragmas.excludeIdeData);
  4143. args: [],
  4144. source: "label\x0a\x09^ 'List'",
  4145. referencedClasses: [],
  4146. //>>excludeEnd("ide");
  4147. messageSends: []
  4148. }),
  4149. $globals.HLToolListWidget);
  4150. $core.addMethod(
  4151. $core.method({
  4152. selector: "menuCommands",
  4153. protocol: 'accessing',
  4154. fn: function (){
  4155. var self=this;
  4156. function $HLToolCommand(){return $globals.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  4157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4158. return $core.withContext(function($ctx1) {
  4159. //>>excludeEnd("ctx");
  4160. var $2,$1;
  4161. $1=$recv($recv($recv($recv($HLToolCommand())._concreteClasses())._select_((function(each){
  4162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4163. return $core.withContext(function($ctx2) {
  4164. //>>excludeEnd("ctx");
  4165. $2=self._model();
  4166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4167. $ctx2.sendIdx["model"]=1;
  4168. //>>excludeEnd("ctx");
  4169. return $recv(each)._isValidFor_($2);
  4170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4171. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4172. //>>excludeEnd("ctx");
  4173. })))._collect_((function(each){
  4174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4175. return $core.withContext(function($ctx2) {
  4176. //>>excludeEnd("ctx");
  4177. return $recv(each)._for_(self._model());
  4178. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4179. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4180. //>>excludeEnd("ctx");
  4181. })))._select_((function(each){
  4182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4183. return $core.withContext(function($ctx2) {
  4184. //>>excludeEnd("ctx");
  4185. return $recv($recv($recv(each)._category()).__eq(self._commandCategory()))._and_((function(){
  4186. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4187. return $core.withContext(function($ctx3) {
  4188. //>>excludeEnd("ctx");
  4189. return $recv($recv(each)._isAction())._and_((function(){
  4190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4191. return $core.withContext(function($ctx4) {
  4192. //>>excludeEnd("ctx");
  4193. return $recv(each)._isActive();
  4194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4195. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4196. //>>excludeEnd("ctx");
  4197. }));
  4198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4199. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4200. //>>excludeEnd("ctx");
  4201. }));
  4202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4203. $ctx2.sendIdx["and:"]=1;
  4204. //>>excludeEnd("ctx");
  4205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4206. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  4207. //>>excludeEnd("ctx");
  4208. }));
  4209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4210. $ctx1.sendIdx["select:"]=1;
  4211. //>>excludeEnd("ctx");
  4212. return $1;
  4213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4214. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},$globals.HLToolListWidget)});
  4215. //>>excludeEnd("ctx");
  4216. },
  4217. //>>excludeStart("ide", pragmas.excludeIdeData);
  4218. args: [],
  4219. 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 ] ] ]",
  4220. referencedClasses: ["HLToolCommand"],
  4221. //>>excludeEnd("ide");
  4222. messageSends: ["select:", "collect:", "concreteClasses", "isValidFor:", "model", "for:", "and:", "=", "category", "commandCategory", "isAction", "isActive"]
  4223. }),
  4224. $globals.HLToolListWidget);
  4225. $core.addMethod(
  4226. $core.method({
  4227. selector: "model",
  4228. protocol: 'accessing',
  4229. fn: function (){
  4230. var self=this;
  4231. var $1;
  4232. $1=self["@model"];
  4233. return $1;
  4234. },
  4235. //>>excludeStart("ide", pragmas.excludeIdeData);
  4236. args: [],
  4237. source: "model\x0a\x09^ model",
  4238. referencedClasses: [],
  4239. //>>excludeEnd("ide");
  4240. messageSends: []
  4241. }),
  4242. $globals.HLToolListWidget);
  4243. $core.addMethod(
  4244. $core.method({
  4245. selector: "model:",
  4246. protocol: 'accessing',
  4247. fn: function (aBrowserModel){
  4248. var self=this;
  4249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4250. return $core.withContext(function($ctx1) {
  4251. //>>excludeEnd("ctx");
  4252. var $1;
  4253. self["@model"]=aBrowserModel;
  4254. self._observeSystem();
  4255. $1=self._observeModel();
  4256. return self;
  4257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4258. }, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},$globals.HLToolListWidget)});
  4259. //>>excludeEnd("ctx");
  4260. },
  4261. //>>excludeStart("ide", pragmas.excludeIdeData);
  4262. args: ["aBrowserModel"],
  4263. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  4264. referencedClasses: [],
  4265. //>>excludeEnd("ide");
  4266. messageSends: ["observeSystem", "observeModel"]
  4267. }),
  4268. $globals.HLToolListWidget);
  4269. $core.addMethod(
  4270. $core.method({
  4271. selector: "observeModel",
  4272. protocol: 'actions',
  4273. fn: function (){
  4274. var self=this;
  4275. return self;
  4276. },
  4277. //>>excludeStart("ide", pragmas.excludeIdeData);
  4278. args: [],
  4279. source: "observeModel",
  4280. referencedClasses: [],
  4281. //>>excludeEnd("ide");
  4282. messageSends: []
  4283. }),
  4284. $globals.HLToolListWidget);
  4285. $core.addMethod(
  4286. $core.method({
  4287. selector: "observeSystem",
  4288. protocol: 'actions',
  4289. fn: function (){
  4290. var self=this;
  4291. return self;
  4292. },
  4293. //>>excludeStart("ide", pragmas.excludeIdeData);
  4294. args: [],
  4295. source: "observeSystem",
  4296. referencedClasses: [],
  4297. //>>excludeEnd("ide");
  4298. messageSends: []
  4299. }),
  4300. $globals.HLToolListWidget);
  4301. $core.addMethod(
  4302. $core.method({
  4303. selector: "reactivateListItem:",
  4304. protocol: 'actions',
  4305. fn: function (anItem){
  4306. var self=this;
  4307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4308. return $core.withContext(function($ctx1) {
  4309. //>>excludeEnd("ctx");
  4310. $recv(self._model())._withChangesDo_((function(){
  4311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4312. return $core.withContext(function($ctx2) {
  4313. //>>excludeEnd("ctx");
  4314. return (
  4315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4316. $ctx2.supercall = true,
  4317. //>>excludeEnd("ctx");
  4318. $globals.HLToolListWidget.superclass.fn.prototype._reactivateListItem_.apply($recv(self), [anItem]));
  4319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4320. $ctx2.supercall = false;
  4321. //>>excludeEnd("ctx");;
  4322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4323. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4324. //>>excludeEnd("ctx");
  4325. }));
  4326. return self;
  4327. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4328. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4329. //>>excludeEnd("ctx");
  4330. },
  4331. //>>excludeStart("ide", pragmas.excludeIdeData);
  4332. args: ["anItem"],
  4333. source: "reactivateListItem: anItem\x0a\x09self model withChangesDo: [ super reactivateListItem: anItem ]",
  4334. referencedClasses: [],
  4335. //>>excludeEnd("ide");
  4336. messageSends: ["withChangesDo:", "model", "reactivateListItem:"]
  4337. }),
  4338. $globals.HLToolListWidget);
  4339. $core.addMethod(
  4340. $core.method({
  4341. selector: "renderContentOn:",
  4342. protocol: 'rendering',
  4343. fn: function (html){
  4344. var self=this;
  4345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4346. return $core.withContext(function($ctx1) {
  4347. //>>excludeEnd("ctx");
  4348. self._renderHeadOn_(html);
  4349. (
  4350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4351. $ctx1.supercall = true,
  4352. //>>excludeEnd("ctx");
  4353. $globals.HLToolListWidget.superclass.fn.prototype._renderContentOn_.apply($recv(self), [html]));
  4354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4355. $ctx1.supercall = false;
  4356. //>>excludeEnd("ctx");;
  4357. return self;
  4358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4359. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLToolListWidget)});
  4360. //>>excludeEnd("ctx");
  4361. },
  4362. //>>excludeStart("ide", pragmas.excludeIdeData);
  4363. args: ["html"],
  4364. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  4365. referencedClasses: [],
  4366. //>>excludeEnd("ide");
  4367. messageSends: ["renderHeadOn:", "renderContentOn:"]
  4368. }),
  4369. $globals.HLToolListWidget);
  4370. $core.addMethod(
  4371. $core.method({
  4372. selector: "renderHeadOn:",
  4373. protocol: 'rendering',
  4374. fn: function (html){
  4375. var self=this;
  4376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4377. return $core.withContext(function($ctx1) {
  4378. //>>excludeEnd("ctx");
  4379. var $1,$2;
  4380. $1=$recv(html)._div();
  4381. $recv($1)._class_("list-label");
  4382. $2=$recv($1)._with_((function(){
  4383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4384. return $core.withContext(function($ctx2) {
  4385. //>>excludeEnd("ctx");
  4386. $recv(html)._with_(self._label());
  4387. return self._renderMenuOn_(html);
  4388. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4389. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4390. //>>excludeEnd("ctx");
  4391. }));
  4392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4393. $ctx1.sendIdx["with:"]=1;
  4394. //>>excludeEnd("ctx");
  4395. return self;
  4396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4397. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},$globals.HLToolListWidget)});
  4398. //>>excludeEnd("ctx");
  4399. },
  4400. //>>excludeStart("ide", pragmas.excludeIdeData);
  4401. args: ["html"],
  4402. 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 ]",
  4403. referencedClasses: [],
  4404. //>>excludeEnd("ide");
  4405. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]
  4406. }),
  4407. $globals.HLToolListWidget);
  4408. $core.addMethod(
  4409. $core.method({
  4410. selector: "renderMenuOn:",
  4411. protocol: 'rendering',
  4412. fn: function (html){
  4413. var self=this;
  4414. var commands;
  4415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4416. return $core.withContext(function($ctx1) {
  4417. //>>excludeEnd("ctx");
  4418. var $1,$2,$4,$5,$6,$8,$9,$7,$3;
  4419. commands=self._menuCommands();
  4420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4421. $ctx1.sendIdx["menuCommands"]=1;
  4422. //>>excludeEnd("ctx");
  4423. $1=$recv(commands)._isEmpty();
  4424. if($core.assert($1)){
  4425. return self;
  4426. };
  4427. $2=$recv(html)._div();
  4428. $recv($2)._class_("btn-group cog");
  4429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4430. $ctx1.sendIdx["class:"]=1;
  4431. //>>excludeEnd("ctx");
  4432. $3=$recv($2)._with_((function(){
  4433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4434. return $core.withContext(function($ctx2) {
  4435. //>>excludeEnd("ctx");
  4436. $4=$recv(html)._a();
  4437. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4438. $ctx2.sendIdx["a"]=1;
  4439. //>>excludeEnd("ctx");
  4440. $recv($4)._class_("btn dropdown-toggle");
  4441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4442. $ctx2.sendIdx["class:"]=2;
  4443. //>>excludeEnd("ctx");
  4444. $recv($4)._at_put_("data-toggle","dropdown");
  4445. $5=$recv($4)._with_((function(){
  4446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4447. return $core.withContext(function($ctx3) {
  4448. //>>excludeEnd("ctx");
  4449. return $recv($recv(html)._tag_("i"))._class_("icon-chevron-down");
  4450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4451. $ctx3.sendIdx["class:"]=3;
  4452. //>>excludeEnd("ctx");
  4453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4454. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4455. //>>excludeEnd("ctx");
  4456. }));
  4457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4458. $ctx2.sendIdx["with:"]=2;
  4459. //>>excludeEnd("ctx");
  4460. $5;
  4461. $6=$recv(html)._ul();
  4462. $recv($6)._class_("dropdown-menu pull-right");
  4463. $7=$recv($6)._with_((function(){
  4464. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4465. return $core.withContext(function($ctx3) {
  4466. //>>excludeEnd("ctx");
  4467. return $recv(self._menuCommands())._do_((function(each){
  4468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4469. return $core.withContext(function($ctx4) {
  4470. //>>excludeEnd("ctx");
  4471. return $recv($recv(html)._li())._with_((function(){
  4472. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4473. return $core.withContext(function($ctx5) {
  4474. //>>excludeEnd("ctx");
  4475. $8=$recv(html)._a();
  4476. $recv($8)._with_($recv(each)._menuLabel());
  4477. $9=$recv($8)._onClick_((function(){
  4478. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4479. return $core.withContext(function($ctx6) {
  4480. //>>excludeEnd("ctx");
  4481. return self._execute_(each);
  4482. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4483. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)});
  4484. //>>excludeEnd("ctx");
  4485. }));
  4486. return $9;
  4487. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4488. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  4489. //>>excludeEnd("ctx");
  4490. }));
  4491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4492. $ctx4.sendIdx["with:"]=4;
  4493. //>>excludeEnd("ctx");
  4494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4495. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)});
  4496. //>>excludeEnd("ctx");
  4497. }));
  4498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4499. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4500. //>>excludeEnd("ctx");
  4501. }));
  4502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4503. $ctx2.sendIdx["with:"]=3;
  4504. //>>excludeEnd("ctx");
  4505. return $7;
  4506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4507. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4508. //>>excludeEnd("ctx");
  4509. }));
  4510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4511. $ctx1.sendIdx["with:"]=1;
  4512. //>>excludeEnd("ctx");
  4513. return self;
  4514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4515. }, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},$globals.HLToolListWidget)});
  4516. //>>excludeEnd("ctx");
  4517. },
  4518. //>>excludeStart("ide", pragmas.excludeIdeData);
  4519. args: ["html"],
  4520. 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 ] ] ] ] ]",
  4521. referencedClasses: [],
  4522. //>>excludeEnd("ide");
  4523. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "li", "menuLabel", "onClick:", "execute:"]
  4524. }),
  4525. $globals.HLToolListWidget);
  4526. $core.addMethod(
  4527. $core.method({
  4528. selector: "selectedItem:",
  4529. protocol: 'accessing',
  4530. fn: function (anItem){
  4531. var self=this;
  4532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4533. return $core.withContext(function($ctx1) {
  4534. //>>excludeEnd("ctx");
  4535. (
  4536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4537. $ctx1.supercall = true,
  4538. //>>excludeEnd("ctx");
  4539. $globals.HLToolListWidget.superclass.fn.prototype._selectedItem_.apply($recv(self), [anItem]));
  4540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4541. $ctx1.supercall = false;
  4542. //>>excludeEnd("ctx");;
  4543. self._updateMenu();
  4544. return self;
  4545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4546. }, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4547. //>>excludeEnd("ctx");
  4548. },
  4549. //>>excludeStart("ide", pragmas.excludeIdeData);
  4550. args: ["anItem"],
  4551. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  4552. referencedClasses: [],
  4553. //>>excludeEnd("ide");
  4554. messageSends: ["selectedItem:", "updateMenu"]
  4555. }),
  4556. $globals.HLToolListWidget);
  4557. $core.addMethod(
  4558. $core.method({
  4559. selector: "unregister",
  4560. protocol: 'actions',
  4561. fn: function (){
  4562. var self=this;
  4563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4564. return $core.withContext(function($ctx1) {
  4565. //>>excludeEnd("ctx");
  4566. var $2,$1;
  4567. (
  4568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4569. $ctx1.supercall = true,
  4570. //>>excludeEnd("ctx");
  4571. $globals.HLToolListWidget.superclass.fn.prototype._unregister.apply($recv(self), []));
  4572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4573. $ctx1.supercall = false;
  4574. //>>excludeEnd("ctx");;
  4575. $2=self._model();
  4576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4577. $ctx1.sendIdx["model"]=1;
  4578. //>>excludeEnd("ctx");
  4579. $1=$recv($2)._announcer();
  4580. $recv($1)._unsubscribe_(self);
  4581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4582. $ctx1.sendIdx["unsubscribe:"]=1;
  4583. //>>excludeEnd("ctx");
  4584. $recv($recv(self._model())._systemAnnouncer())._unsubscribe_(self);
  4585. return self;
  4586. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4587. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLToolListWidget)});
  4588. //>>excludeEnd("ctx");
  4589. },
  4590. //>>excludeStart("ide", pragmas.excludeIdeData);
  4591. args: [],
  4592. source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
  4593. referencedClasses: [],
  4594. //>>excludeEnd("ide");
  4595. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]
  4596. }),
  4597. $globals.HLToolListWidget);
  4598. $core.addMethod(
  4599. $core.method({
  4600. selector: "updateMenu",
  4601. protocol: 'updating',
  4602. fn: function (){
  4603. var self=this;
  4604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4605. return $core.withContext(function($ctx1) {
  4606. //>>excludeEnd("ctx");
  4607. var $3,$2,$1;
  4608. $3=self._wrapper();
  4609. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4610. $ctx1.sendIdx["wrapper"]=1;
  4611. //>>excludeEnd("ctx");
  4612. $2=$recv($3)._asJQuery();
  4613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4614. $ctx1.sendIdx["asJQuery"]=1;
  4615. //>>excludeEnd("ctx");
  4616. $1=$recv($2)._find_(".cog");
  4617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4618. $ctx1.sendIdx["find:"]=1;
  4619. //>>excludeEnd("ctx");
  4620. $recv($1)._remove();
  4621. $recv((function(html){
  4622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4623. return $core.withContext(function($ctx2) {
  4624. //>>excludeEnd("ctx");
  4625. return self._renderMenuOn_(html);
  4626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4627. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4628. //>>excludeEnd("ctx");
  4629. }))._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".list-label"));
  4630. return self;
  4631. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4632. }, function($ctx1) {$ctx1.fill(self,"updateMenu",{},$globals.HLToolListWidget)});
  4633. //>>excludeEnd("ctx");
  4634. },
  4635. //>>excludeStart("ide", pragmas.excludeIdeData);
  4636. args: [],
  4637. 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')",
  4638. referencedClasses: [],
  4639. //>>excludeEnd("ide");
  4640. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]
  4641. }),
  4642. $globals.HLToolListWidget);
  4643. $core.addMethod(
  4644. $core.method({
  4645. selector: "on:",
  4646. protocol: 'instance creation',
  4647. fn: function (aModel){
  4648. var self=this;
  4649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4650. return $core.withContext(function($ctx1) {
  4651. //>>excludeEnd("ctx");
  4652. var $2,$3,$1;
  4653. $2=self._new();
  4654. $recv($2)._model_(aModel);
  4655. $3=$recv($2)._yourself();
  4656. $1=$3;
  4657. return $1;
  4658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4659. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},$globals.HLToolListWidget.klass)});
  4660. //>>excludeEnd("ctx");
  4661. },
  4662. //>>excludeStart("ide", pragmas.excludeIdeData);
  4663. args: ["aModel"],
  4664. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  4665. referencedClasses: [],
  4666. //>>excludeEnd("ide");
  4667. messageSends: ["model:", "new", "yourself"]
  4668. }),
  4669. $globals.HLToolListWidget.klass);
  4670. $core.addClass('HLTabListWidget', $globals.HLListWidget, ['callback'], 'Helios-Core');
  4671. //>>excludeStart("ide", pragmas.excludeIdeData);
  4672. $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.";
  4673. //>>excludeEnd("ide");
  4674. $core.addMethod(
  4675. $core.method({
  4676. selector: "callback",
  4677. protocol: 'accessing',
  4678. fn: function (){
  4679. var self=this;
  4680. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4681. return $core.withContext(function($ctx1) {
  4682. //>>excludeEnd("ctx");
  4683. var $2,$1,$receiver;
  4684. $2=self["@callback"];
  4685. if(($receiver = $2) == null || $receiver.isNil){
  4686. $1=(function(){
  4687. });
  4688. } else {
  4689. $1=$2;
  4690. };
  4691. return $1;
  4692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4693. }, function($ctx1) {$ctx1.fill(self,"callback",{},$globals.HLTabListWidget)});
  4694. //>>excludeEnd("ctx");
  4695. },
  4696. //>>excludeStart("ide", pragmas.excludeIdeData);
  4697. args: [],
  4698. source: "callback\x0a\x09^ callback ifNil: [ [] ]",
  4699. referencedClasses: [],
  4700. //>>excludeEnd("ide");
  4701. messageSends: ["ifNil:"]
  4702. }),
  4703. $globals.HLTabListWidget);
  4704. $core.addMethod(
  4705. $core.method({
  4706. selector: "callback:",
  4707. protocol: 'accessing',
  4708. fn: function (aBlock){
  4709. var self=this;
  4710. self["@callback"]=aBlock;
  4711. return self;
  4712. },
  4713. //>>excludeStart("ide", pragmas.excludeIdeData);
  4714. args: ["aBlock"],
  4715. source: "callback: aBlock\x0a\x09callback := aBlock",
  4716. referencedClasses: [],
  4717. //>>excludeEnd("ide");
  4718. messageSends: []
  4719. }),
  4720. $globals.HLTabListWidget);
  4721. $core.addMethod(
  4722. $core.method({
  4723. selector: "renderItemLabel:on:",
  4724. protocol: 'rendering',
  4725. fn: function (aTab,html){
  4726. var self=this;
  4727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4728. return $core.withContext(function($ctx1) {
  4729. //>>excludeEnd("ctx");
  4730. var $1,$2;
  4731. $1=$recv(html)._span();
  4732. $recv($1)._class_($recv(aTab)._cssClass());
  4733. $2=$recv($1)._with_($recv(aTab)._label());
  4734. return self;
  4735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4736. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aTab:aTab,html:html},$globals.HLTabListWidget)});
  4737. //>>excludeEnd("ctx");
  4738. },
  4739. //>>excludeStart("ide", pragmas.excludeIdeData);
  4740. args: ["aTab", "html"],
  4741. source: "renderItemLabel: aTab on: html\x0a\x09html span\x0a\x09\x09class: aTab cssClass;\x0a\x09\x09with: aTab label",
  4742. referencedClasses: [],
  4743. //>>excludeEnd("ide");
  4744. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  4745. }),
  4746. $globals.HLTabListWidget);
  4747. $core.addMethod(
  4748. $core.method({
  4749. selector: "selectItem:",
  4750. protocol: 'actions',
  4751. fn: function (aTab){
  4752. var self=this;
  4753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4754. return $core.withContext(function($ctx1) {
  4755. //>>excludeEnd("ctx");
  4756. (
  4757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4758. $ctx1.supercall = true,
  4759. //>>excludeEnd("ctx");
  4760. $globals.HLTabListWidget.superclass.fn.prototype._selectItem_.apply($recv(self), [aTab]));
  4761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4762. $ctx1.supercall = false;
  4763. //>>excludeEnd("ctx");;
  4764. $recv(self._callback())._value_(aTab);
  4765. return self;
  4766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4767. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aTab:aTab},$globals.HLTabListWidget)});
  4768. //>>excludeEnd("ctx");
  4769. },
  4770. //>>excludeStart("ide", pragmas.excludeIdeData);
  4771. args: ["aTab"],
  4772. source: "selectItem: aTab\x0a\x09super selectItem: aTab.\x0a\x09self callback value: aTab",
  4773. referencedClasses: [],
  4774. //>>excludeEnd("ide");
  4775. messageSends: ["selectItem:", "value:", "callback"]
  4776. }),
  4777. $globals.HLTabListWidget);
  4778. $core.addClass('HLInformationWidget', $globals.HLWidget, ['informationString'], 'Helios-Core');
  4779. //>>excludeStart("ide", pragmas.excludeIdeData);
  4780. $globals.HLInformationWidget.comment="I display an information dialog.\x0a\x0a## API\x0a\x0a`HLWidget >> #inform:` is a convenience method for creating information dialogs.";
  4781. //>>excludeEnd("ide");
  4782. $core.addMethod(
  4783. $core.method({
  4784. selector: "informationString",
  4785. protocol: 'accessing',
  4786. fn: function (){
  4787. var self=this;
  4788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4789. return $core.withContext(function($ctx1) {
  4790. //>>excludeEnd("ctx");
  4791. var $2,$1,$receiver;
  4792. $2=self["@informationString"];
  4793. if(($receiver = $2) == null || $receiver.isNil){
  4794. $1="";
  4795. } else {
  4796. $1=$2;
  4797. };
  4798. return $1;
  4799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4800. }, function($ctx1) {$ctx1.fill(self,"informationString",{},$globals.HLInformationWidget)});
  4801. //>>excludeEnd("ctx");
  4802. },
  4803. //>>excludeStart("ide", pragmas.excludeIdeData);
  4804. args: [],
  4805. source: "informationString\x0a\x09^ informationString ifNil: [ '' ]",
  4806. referencedClasses: [],
  4807. //>>excludeEnd("ide");
  4808. messageSends: ["ifNil:"]
  4809. }),
  4810. $globals.HLInformationWidget);
  4811. $core.addMethod(
  4812. $core.method({
  4813. selector: "informationString:",
  4814. protocol: 'accessing',
  4815. fn: function (anObject){
  4816. var self=this;
  4817. self["@informationString"]=anObject;
  4818. return self;
  4819. },
  4820. //>>excludeStart("ide", pragmas.excludeIdeData);
  4821. args: ["anObject"],
  4822. source: "informationString: anObject\x0a\x09informationString := anObject",
  4823. referencedClasses: [],
  4824. //>>excludeEnd("ide");
  4825. messageSends: []
  4826. }),
  4827. $globals.HLInformationWidget);
  4828. $core.addMethod(
  4829. $core.method({
  4830. selector: "remove",
  4831. protocol: 'actions',
  4832. fn: function (){
  4833. var self=this;
  4834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4835. return $core.withContext(function($ctx1) {
  4836. //>>excludeEnd("ctx");
  4837. var $2,$1;
  4838. $recv((function(){
  4839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4840. return $core.withContext(function($ctx2) {
  4841. //>>excludeEnd("ctx");
  4842. $2=self._wrapper();
  4843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4844. $ctx2.sendIdx["wrapper"]=1;
  4845. //>>excludeEnd("ctx");
  4846. $1=$recv($2)._asJQuery();
  4847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4848. $ctx2.sendIdx["asJQuery"]=1;
  4849. //>>excludeEnd("ctx");
  4850. $recv($1)._fadeOut_((100));
  4851. return $recv((function(){
  4852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4853. return $core.withContext(function($ctx3) {
  4854. //>>excludeEnd("ctx");
  4855. return $recv($recv(self._wrapper())._asJQuery())._remove();
  4856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4857. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4858. //>>excludeEnd("ctx");
  4859. }))._valueWithTimeout_((400));
  4860. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4861. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4862. //>>excludeEnd("ctx");
  4863. }))._valueWithTimeout_((1500));
  4864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4865. $ctx1.sendIdx["valueWithTimeout:"]=1;
  4866. //>>excludeEnd("ctx");
  4867. return self;
  4868. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4869. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLInformationWidget)});
  4870. //>>excludeEnd("ctx");
  4871. },
  4872. //>>excludeStart("ide", pragmas.excludeIdeData);
  4873. args: [],
  4874. 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",
  4875. referencedClasses: [],
  4876. //>>excludeEnd("ide");
  4877. messageSends: ["valueWithTimeout:", "fadeOut:", "asJQuery", "wrapper", "remove"]
  4878. }),
  4879. $globals.HLInformationWidget);
  4880. $core.addMethod(
  4881. $core.method({
  4882. selector: "renderContentOn:",
  4883. protocol: 'rendering',
  4884. fn: function (html){
  4885. var self=this;
  4886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4887. return $core.withContext(function($ctx1) {
  4888. //>>excludeEnd("ctx");
  4889. var $1,$2;
  4890. $1=$recv(html)._div();
  4891. $recv($1)._class_("growl");
  4892. $2=$recv($1)._with_(self._informationString());
  4893. self._remove();
  4894. return self;
  4895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4896. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLInformationWidget)});
  4897. //>>excludeEnd("ctx");
  4898. },
  4899. //>>excludeStart("ide", pragmas.excludeIdeData);
  4900. args: ["html"],
  4901. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'growl'; \x0a\x09\x09with: self informationString.\x0a\x09\x09\x0a\x09self remove",
  4902. referencedClasses: [],
  4903. //>>excludeEnd("ide");
  4904. messageSends: ["class:", "div", "with:", "informationString", "remove"]
  4905. }),
  4906. $globals.HLInformationWidget);
  4907. $core.addMethod(
  4908. $core.method({
  4909. selector: "show",
  4910. protocol: 'actions',
  4911. fn: function (){
  4912. var self=this;
  4913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4914. return $core.withContext(function($ctx1) {
  4915. //>>excludeEnd("ctx");
  4916. self._appendToJQuery_("body"._asJQuery());
  4917. return self;
  4918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4919. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLInformationWidget)});
  4920. //>>excludeEnd("ctx");
  4921. },
  4922. //>>excludeStart("ide", pragmas.excludeIdeData);
  4923. args: [],
  4924. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  4925. referencedClasses: [],
  4926. //>>excludeEnd("ide");
  4927. messageSends: ["appendToJQuery:", "asJQuery"]
  4928. }),
  4929. $globals.HLInformationWidget);
  4930. $core.addClass('HLManager', $globals.HLWidget, ['topBarWidget', 'tabsWidget', 'environment', 'history', 'announcer'], 'Helios-Core');
  4931. $core.addMethod(
  4932. $core.method({
  4933. selector: "activate:",
  4934. protocol: 'actions',
  4935. fn: function (aTab){
  4936. var self=this;
  4937. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4938. return $core.withContext(function($ctx1) {
  4939. //>>excludeEnd("ctx");
  4940. $recv(self._tabsWidget())._activate_(aTab);
  4941. return self;
  4942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4943. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLManager)});
  4944. //>>excludeEnd("ctx");
  4945. },
  4946. //>>excludeStart("ide", pragmas.excludeIdeData);
  4947. args: ["aTab"],
  4948. source: "activate: aTab\x0a\x09self tabsWidget activate: aTab",
  4949. referencedClasses: [],
  4950. //>>excludeEnd("ide");
  4951. messageSends: ["activate:", "tabsWidget"]
  4952. }),
  4953. $globals.HLManager);
  4954. $core.addMethod(
  4955. $core.method({
  4956. selector: "activeTab",
  4957. protocol: 'accessing',
  4958. fn: function (){
  4959. var self=this;
  4960. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4961. return $core.withContext(function($ctx1) {
  4962. //>>excludeEnd("ctx");
  4963. var $1;
  4964. $1=$recv(self._tabsWidget())._activeTab();
  4965. return $1;
  4966. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4967. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},$globals.HLManager)});
  4968. //>>excludeEnd("ctx");
  4969. },
  4970. //>>excludeStart("ide", pragmas.excludeIdeData);
  4971. args: [],
  4972. source: "activeTab\x0a\x09^ self tabsWidget activeTab",
  4973. referencedClasses: [],
  4974. //>>excludeEnd("ide");
  4975. messageSends: ["activeTab", "tabsWidget"]
  4976. }),
  4977. $globals.HLManager);
  4978. $core.addMethod(
  4979. $core.method({
  4980. selector: "addTab:",
  4981. protocol: 'actions',
  4982. fn: function (aTab){
  4983. var self=this;
  4984. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4985. return $core.withContext(function($ctx1) {
  4986. //>>excludeEnd("ctx");
  4987. $recv(self._tabsWidget())._addTab_(aTab);
  4988. return self;
  4989. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4990. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLManager)});
  4991. //>>excludeEnd("ctx");
  4992. },
  4993. //>>excludeStart("ide", pragmas.excludeIdeData);
  4994. args: ["aTab"],
  4995. source: "addTab: aTab\x0a\x09self tabsWidget addTab: aTab",
  4996. referencedClasses: [],
  4997. //>>excludeEnd("ide");
  4998. messageSends: ["addTab:", "tabsWidget"]
  4999. }),
  5000. $globals.HLManager);
  5001. $core.addMethod(
  5002. $core.method({
  5003. selector: "announcer",
  5004. protocol: 'accessing',
  5005. fn: function (){
  5006. var self=this;
  5007. function $Announcer(){return $globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  5008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5009. return $core.withContext(function($ctx1) {
  5010. //>>excludeEnd("ctx");
  5011. var $2,$1,$receiver;
  5012. $2=self["@announcer"];
  5013. if(($receiver = $2) == null || $receiver.isNil){
  5014. self["@announcer"]=$recv($Announcer())._new();
  5015. $1=self["@announcer"];
  5016. } else {
  5017. $1=$2;
  5018. };
  5019. return $1;
  5020. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5021. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLManager)});
  5022. //>>excludeEnd("ctx");
  5023. },
  5024. //>>excludeStart("ide", pragmas.excludeIdeData);
  5025. args: [],
  5026. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  5027. referencedClasses: ["Announcer"],
  5028. //>>excludeEnd("ide");
  5029. messageSends: ["ifNil:", "new"]
  5030. }),
  5031. $globals.HLManager);
  5032. $core.addMethod(
  5033. $core.method({
  5034. selector: "confirm:ifFalse:",
  5035. protocol: 'actions',
  5036. fn: function (aString,aBlock){
  5037. var self=this;
  5038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5039. return $core.withContext(function($ctx1) {
  5040. //>>excludeEnd("ctx");
  5041. self._confirm_ifTrue_ifFalse_(aString,(function(){
  5042. }),aBlock);
  5043. return self;
  5044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5045. }, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5046. //>>excludeEnd("ctx");
  5047. },
  5048. //>>excludeStart("ide", pragmas.excludeIdeData);
  5049. args: ["aString", "aBlock"],
  5050. source: "confirm: aString ifFalse: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: []\x0a\x09\x09ifFalse: aBlock",
  5051. referencedClasses: [],
  5052. //>>excludeEnd("ide");
  5053. messageSends: ["confirm:ifTrue:ifFalse:"]
  5054. }),
  5055. $globals.HLManager);
  5056. $core.addMethod(
  5057. $core.method({
  5058. selector: "confirm:ifTrue:",
  5059. protocol: 'actions',
  5060. fn: function (aString,aBlock){
  5061. var self=this;
  5062. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5063. return $core.withContext(function($ctx1) {
  5064. //>>excludeEnd("ctx");
  5065. self._confirm_ifTrue_ifFalse_(aString,aBlock,(function(){
  5066. }));
  5067. return self;
  5068. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5069. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5070. //>>excludeEnd("ctx");
  5071. },
  5072. //>>excludeStart("ide", pragmas.excludeIdeData);
  5073. args: ["aString", "aBlock"],
  5074. source: "confirm: aString ifTrue: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: []",
  5075. referencedClasses: [],
  5076. //>>excludeEnd("ide");
  5077. messageSends: ["confirm:ifTrue:ifFalse:"]
  5078. }),
  5079. $globals.HLManager);
  5080. $core.addMethod(
  5081. $core.method({
  5082. selector: "confirm:ifTrue:ifFalse:",
  5083. protocol: 'actions',
  5084. fn: function (aString,aBlock,anotherBlock){
  5085. var self=this;
  5086. function $HLConfirmationWidget(){return $globals.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  5087. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5088. return $core.withContext(function($ctx1) {
  5089. //>>excludeEnd("ctx");
  5090. var $1,$2;
  5091. $1=$recv($HLConfirmationWidget())._new();
  5092. $recv($1)._confirmationString_(aString);
  5093. $recv($1)._actionBlock_(aBlock);
  5094. $recv($1)._cancelBlock_(anotherBlock);
  5095. $2=$recv($1)._show();
  5096. return self;
  5097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5098. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLManager)});
  5099. //>>excludeEnd("ctx");
  5100. },
  5101. //>>excludeStart("ide", pragmas.excludeIdeData);
  5102. args: ["aString", "aBlock", "anotherBlock"],
  5103. 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",
  5104. referencedClasses: ["HLConfirmationWidget"],
  5105. //>>excludeEnd("ide");
  5106. messageSends: ["confirmationString:", "new", "actionBlock:", "cancelBlock:", "show"]
  5107. }),
  5108. $globals.HLManager);
  5109. $core.addMethod(
  5110. $core.method({
  5111. selector: "defaultEnvironment",
  5112. protocol: 'defaults',
  5113. fn: function (){
  5114. var self=this;
  5115. var parent,parentSmalltalkGlobals;
  5116. function $Environment(){return $globals.Environment||(typeof Environment=="undefined"?nil:Environment)}
  5117. function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
  5118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5119. return $core.withContext(function($ctx1) {
  5120. //>>excludeEnd("ctx");
  5121. var $1,$2,$3,$5,$4,$6,$7,$8,$9,$receiver;
  5122. $1=$recv(window)._opener();
  5123. if(($receiver = $1) == null || $receiver.isNil){
  5124. parent=$recv(window)._parent();
  5125. } else {
  5126. parent=$1;
  5127. };
  5128. $2=parent;
  5129. if(($receiver = $2) == null || $receiver.isNil){
  5130. $3=$recv($Environment())._new();
  5131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5132. $ctx1.sendIdx["new"]=1;
  5133. //>>excludeEnd("ctx");
  5134. return $3;
  5135. } else {
  5136. $2;
  5137. };
  5138. $recv((function(){
  5139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5140. return $core.withContext(function($ctx2) {
  5141. //>>excludeEnd("ctx");
  5142. $5=$recv(parent)._at_("requirejs");
  5143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5144. $ctx2.sendIdx["at:"]=2;
  5145. //>>excludeEnd("ctx");
  5146. $4=$recv($5)._value_("amber/boot");
  5147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5148. $ctx2.sendIdx["value:"]=1;
  5149. //>>excludeEnd("ctx");
  5150. parentSmalltalkGlobals=$recv($4)._at_("globals");
  5151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5152. $ctx2.sendIdx["at:"]=1;
  5153. //>>excludeEnd("ctx");
  5154. return parentSmalltalkGlobals;
  5155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5156. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5157. //>>excludeEnd("ctx");
  5158. }))._on_do_($Error(),(function(){
  5159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5160. return $core.withContext(function($ctx2) {
  5161. //>>excludeEnd("ctx");
  5162. $6=$recv(parent)._at_("requirejs");
  5163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5164. $ctx2.sendIdx["at:"]=3;
  5165. //>>excludeEnd("ctx");
  5166. parentSmalltalkGlobals=$recv($6)._value_("amber_vm/globals");
  5167. return parentSmalltalkGlobals;
  5168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5169. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  5170. //>>excludeEnd("ctx");
  5171. }));
  5172. $7=parentSmalltalkGlobals;
  5173. if(($receiver = $7) == null || $receiver.isNil){
  5174. $8=$recv($Environment())._new();
  5175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5176. $ctx1.sendIdx["new"]=2;
  5177. //>>excludeEnd("ctx");
  5178. return $8;
  5179. } else {
  5180. $7;
  5181. };
  5182. $9=$recv($recv(parentSmalltalkGlobals)._at_("Environment"))._new();
  5183. return $9;
  5184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5185. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalkGlobals:parentSmalltalkGlobals},$globals.HLManager)});
  5186. //>>excludeEnd("ctx");
  5187. },
  5188. //>>excludeStart("ide", pragmas.excludeIdeData);
  5189. args: [],
  5190. 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",
  5191. referencedClasses: ["Environment", "Error"],
  5192. //>>excludeEnd("ide");
  5193. messageSends: ["ifNil:", "opener", "parent", "new", "on:do:", "at:", "value:"]
  5194. }),
  5195. $globals.HLManager);
  5196. $core.addMethod(
  5197. $core.method({
  5198. selector: "environment",
  5199. protocol: 'accessing',
  5200. fn: function (){
  5201. var self=this;
  5202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5203. return $core.withContext(function($ctx1) {
  5204. //>>excludeEnd("ctx");
  5205. var $2,$1,$receiver;
  5206. $2=self["@environment"];
  5207. if(($receiver = $2) == null || $receiver.isNil){
  5208. self["@environment"]=self._defaultEnvironment();
  5209. $1=self["@environment"];
  5210. } else {
  5211. $1=$2;
  5212. };
  5213. return $1;
  5214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5215. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLManager)});
  5216. //>>excludeEnd("ctx");
  5217. },
  5218. //>>excludeStart("ide", pragmas.excludeIdeData);
  5219. args: [],
  5220. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  5221. referencedClasses: [],
  5222. //>>excludeEnd("ide");
  5223. messageSends: ["ifNil:", "defaultEnvironment"]
  5224. }),
  5225. $globals.HLManager);
  5226. $core.addMethod(
  5227. $core.method({
  5228. selector: "environment:",
  5229. protocol: 'accessing',
  5230. fn: function (anEnvironment){
  5231. var self=this;
  5232. self["@environment"]=anEnvironment;
  5233. return self;
  5234. },
  5235. //>>excludeStart("ide", pragmas.excludeIdeData);
  5236. args: ["anEnvironment"],
  5237. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  5238. referencedClasses: [],
  5239. //>>excludeEnd("ide");
  5240. messageSends: []
  5241. }),
  5242. $globals.HLManager);
  5243. $core.addMethod(
  5244. $core.method({
  5245. selector: "history",
  5246. protocol: 'accessing',
  5247. fn: function (){
  5248. var self=this;
  5249. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  5250. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5251. return $core.withContext(function($ctx1) {
  5252. //>>excludeEnd("ctx");
  5253. var $2,$1,$receiver;
  5254. $2=self["@history"];
  5255. if(($receiver = $2) == null || $receiver.isNil){
  5256. self["@history"]=$recv($OrderedCollection())._new();
  5257. $1=self["@history"];
  5258. } else {
  5259. $1=$2;
  5260. };
  5261. return $1;
  5262. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5263. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLManager)});
  5264. //>>excludeEnd("ctx");
  5265. },
  5266. //>>excludeStart("ide", pragmas.excludeIdeData);
  5267. args: [],
  5268. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  5269. referencedClasses: ["OrderedCollection"],
  5270. //>>excludeEnd("ide");
  5271. messageSends: ["ifNil:", "new"]
  5272. }),
  5273. $globals.HLManager);
  5274. $core.addMethod(
  5275. $core.method({
  5276. selector: "history:",
  5277. protocol: 'accessing',
  5278. fn: function (aCollection){
  5279. var self=this;
  5280. self["@history"]=aCollection;
  5281. return self;
  5282. },
  5283. //>>excludeStart("ide", pragmas.excludeIdeData);
  5284. args: ["aCollection"],
  5285. source: "history: aCollection\x0a\x09history := aCollection",
  5286. referencedClasses: [],
  5287. //>>excludeEnd("ide");
  5288. messageSends: []
  5289. }),
  5290. $globals.HLManager);
  5291. $core.addMethod(
  5292. $core.method({
  5293. selector: "inform:",
  5294. protocol: 'actions',
  5295. fn: function (aString){
  5296. var self=this;
  5297. function $HLInformationWidget(){return $globals.HLInformationWidget||(typeof HLInformationWidget=="undefined"?nil:HLInformationWidget)}
  5298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5299. return $core.withContext(function($ctx1) {
  5300. //>>excludeEnd("ctx");
  5301. var $1,$2;
  5302. $1=$recv($HLInformationWidget())._new();
  5303. $recv($1)._informationString_(aString);
  5304. $2=$recv($1)._show();
  5305. return self;
  5306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5307. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLManager)});
  5308. //>>excludeEnd("ctx");
  5309. },
  5310. //>>excludeStart("ide", pragmas.excludeIdeData);
  5311. args: ["aString"],
  5312. source: "inform: aString\x0a\x09HLInformationWidget new\x0a\x09\x09informationString: aString;\x0a\x09\x09show",
  5313. referencedClasses: ["HLInformationWidget"],
  5314. //>>excludeEnd("ide");
  5315. messageSends: ["informationString:", "new", "show"]
  5316. }),
  5317. $globals.HLManager);
  5318. $core.addMethod(
  5319. $core.method({
  5320. selector: "keyBinder",
  5321. protocol: 'accessing',
  5322. fn: function (){
  5323. var self=this;
  5324. function $HLKeyBinder(){return $globals.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  5325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5326. return $core.withContext(function($ctx1) {
  5327. //>>excludeEnd("ctx");
  5328. var $1;
  5329. $1=$recv($HLKeyBinder())._current();
  5330. return $1;
  5331. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5332. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},$globals.HLManager)});
  5333. //>>excludeEnd("ctx");
  5334. },
  5335. //>>excludeStart("ide", pragmas.excludeIdeData);
  5336. args: [],
  5337. source: "keyBinder\x0a\x09^ HLKeyBinder current",
  5338. referencedClasses: ["HLKeyBinder"],
  5339. //>>excludeEnd("ide");
  5340. messageSends: ["current"]
  5341. }),
  5342. $globals.HLManager);
  5343. $core.addMethod(
  5344. $core.method({
  5345. selector: "registerErrorHandler",
  5346. protocol: 'services',
  5347. fn: function (){
  5348. var self=this;
  5349. function $HLErrorHandler(){return $globals.HLErrorHandler||(typeof HLErrorHandler=="undefined"?nil:HLErrorHandler)}
  5350. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  5351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5352. return $core.withContext(function($ctx1) {
  5353. //>>excludeEnd("ctx");
  5354. var $1,$2;
  5355. $1=self._environment();
  5356. $2=$recv($HLErrorHandler())._new();
  5357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5358. $ctx1.sendIdx["new"]=1;
  5359. //>>excludeEnd("ctx");
  5360. $recv($1)._registerErrorHandler_($2);
  5361. $recv($ErrorHandler())._register_($recv($HLErrorHandler())._new());
  5362. return self;
  5363. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5364. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler",{},$globals.HLManager)});
  5365. //>>excludeEnd("ctx");
  5366. },
  5367. //>>excludeStart("ide", pragmas.excludeIdeData);
  5368. args: [],
  5369. source: "registerErrorHandler\x0a\x09self environment registerErrorHandler: HLErrorHandler new.\x0a\x09ErrorHandler register: HLErrorHandler new",
  5370. referencedClasses: ["HLErrorHandler", "ErrorHandler"],
  5371. //>>excludeEnd("ide");
  5372. messageSends: ["registerErrorHandler:", "environment", "new", "register:"]
  5373. }),
  5374. $globals.HLManager);
  5375. $core.addMethod(
  5376. $core.method({
  5377. selector: "registerFinder",
  5378. protocol: 'services',
  5379. fn: function (){
  5380. var self=this;
  5381. function $HLFinder(){return $globals.HLFinder||(typeof HLFinder=="undefined"?nil:HLFinder)}
  5382. function $Finder(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}
  5383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5384. return $core.withContext(function($ctx1) {
  5385. //>>excludeEnd("ctx");
  5386. var $1,$2;
  5387. $1=self._environment();
  5388. $2=$recv($HLFinder())._new();
  5389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5390. $ctx1.sendIdx["new"]=1;
  5391. //>>excludeEnd("ctx");
  5392. $recv($1)._registerFinder_($2);
  5393. $recv($Finder())._register_($recv($HLFinder())._new());
  5394. return self;
  5395. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5396. }, function($ctx1) {$ctx1.fill(self,"registerFinder",{},$globals.HLManager)});
  5397. //>>excludeEnd("ctx");
  5398. },
  5399. //>>excludeStart("ide", pragmas.excludeIdeData);
  5400. args: [],
  5401. source: "registerFinder\x0a\x09self environment registerFinder: HLFinder new.\x0a\x09Finder register: HLFinder new",
  5402. referencedClasses: ["HLFinder", "Finder"],
  5403. //>>excludeEnd("ide");
  5404. messageSends: ["registerFinder:", "environment", "new", "register:"]
  5405. }),
  5406. $globals.HLManager);
  5407. $core.addMethod(
  5408. $core.method({
  5409. selector: "registerInspector",
  5410. protocol: 'services',
  5411. fn: function (){
  5412. var self=this;
  5413. function $HLInspector(){return $globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  5414. function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  5415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5416. return $core.withContext(function($ctx1) {
  5417. //>>excludeEnd("ctx");
  5418. $recv(self._environment())._registerInspector_($HLInspector());
  5419. $recv($Inspector())._register_($HLInspector());
  5420. return self;
  5421. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5422. }, function($ctx1) {$ctx1.fill(self,"registerInspector",{},$globals.HLManager)});
  5423. //>>excludeEnd("ctx");
  5424. },
  5425. //>>excludeStart("ide", pragmas.excludeIdeData);
  5426. args: [],
  5427. source: "registerInspector\x0a\x09self environment registerInspector: HLInspector.\x0a\x09Inspector register: HLInspector",
  5428. referencedClasses: ["HLInspector", "Inspector"],
  5429. //>>excludeEnd("ide");
  5430. messageSends: ["registerInspector:", "environment", "register:"]
  5431. }),
  5432. $globals.HLManager);
  5433. $core.addMethod(
  5434. $core.method({
  5435. selector: "registerProgressHandler",
  5436. protocol: 'services',
  5437. fn: function (){
  5438. var self=this;
  5439. function $HLProgressHandler(){return $globals.HLProgressHandler||(typeof HLProgressHandler=="undefined"?nil:HLProgressHandler)}
  5440. function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  5441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5442. return $core.withContext(function($ctx1) {
  5443. //>>excludeEnd("ctx");
  5444. var $1,$2;
  5445. $1=self._environment();
  5446. $2=$recv($HLProgressHandler())._new();
  5447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5448. $ctx1.sendIdx["new"]=1;
  5449. //>>excludeEnd("ctx");
  5450. $recv($1)._registerProgressHandler_($2);
  5451. $recv($ProgressHandler())._register_($recv($HLProgressHandler())._new());
  5452. return self;
  5453. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5454. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler",{},$globals.HLManager)});
  5455. //>>excludeEnd("ctx");
  5456. },
  5457. //>>excludeStart("ide", pragmas.excludeIdeData);
  5458. args: [],
  5459. source: "registerProgressHandler\x0a\x09self environment registerProgressHandler: HLProgressHandler new.\x0a\x09ProgressHandler register: HLProgressHandler new",
  5460. referencedClasses: ["HLProgressHandler", "ProgressHandler"],
  5461. //>>excludeEnd("ide");
  5462. messageSends: ["registerProgressHandler:", "environment", "new", "register:"]
  5463. }),
  5464. $globals.HLManager);
  5465. $core.addMethod(
  5466. $core.method({
  5467. selector: "registerServices",
  5468. protocol: 'private',
  5469. fn: function (){
  5470. var self=this;
  5471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5472. return $core.withContext(function($ctx1) {
  5473. //>>excludeEnd("ctx");
  5474. var $1;
  5475. self._registerInspector();
  5476. self._registerErrorHandler();
  5477. self._registerProgressHandler();
  5478. self._registerTranscript();
  5479. $1=self._registerFinder();
  5480. return self;
  5481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5482. }, function($ctx1) {$ctx1.fill(self,"registerServices",{},$globals.HLManager)});
  5483. //>>excludeEnd("ctx");
  5484. },
  5485. //>>excludeStart("ide", pragmas.excludeIdeData);
  5486. args: [],
  5487. source: "registerServices\x0a\x09self\x0a\x09\x09registerInspector;\x0a\x09\x09registerErrorHandler;\x0a\x09\x09registerProgressHandler;\x0a\x09\x09registerTranscript;\x0a\x09\x09registerFinder",
  5488. referencedClasses: [],
  5489. //>>excludeEnd("ide");
  5490. messageSends: ["registerInspector", "registerErrorHandler", "registerProgressHandler", "registerTranscript", "registerFinder"]
  5491. }),
  5492. $globals.HLManager);
  5493. $core.addMethod(
  5494. $core.method({
  5495. selector: "registerTranscript",
  5496. protocol: 'services',
  5497. fn: function (){
  5498. var self=this;
  5499. function $HLTranscriptHandler(){return $globals.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
  5500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5501. return $core.withContext(function($ctx1) {
  5502. //>>excludeEnd("ctx");
  5503. $recv(self._environment())._registerTranscript_($HLTranscriptHandler());
  5504. return self;
  5505. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5506. }, function($ctx1) {$ctx1.fill(self,"registerTranscript",{},$globals.HLManager)});
  5507. //>>excludeEnd("ctx");
  5508. },
  5509. //>>excludeStart("ide", pragmas.excludeIdeData);
  5510. args: [],
  5511. source: "registerTranscript\x0a\x09self environment registerTranscript: HLTranscriptHandler",
  5512. referencedClasses: ["HLTranscriptHandler"],
  5513. //>>excludeEnd("ide");
  5514. messageSends: ["registerTranscript:", "environment"]
  5515. }),
  5516. $globals.HLManager);
  5517. $core.addMethod(
  5518. $core.method({
  5519. selector: "removeActiveTab",
  5520. protocol: 'actions',
  5521. fn: function (){
  5522. var self=this;
  5523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5524. return $core.withContext(function($ctx1) {
  5525. //>>excludeEnd("ctx");
  5526. $recv(self._tabsWidget())._removeActiveTab();
  5527. return self;
  5528. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5529. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLManager)});
  5530. //>>excludeEnd("ctx");
  5531. },
  5532. //>>excludeStart("ide", pragmas.excludeIdeData);
  5533. args: [],
  5534. source: "removeActiveTab\x0a\x09self tabsWidget removeActiveTab",
  5535. referencedClasses: [],
  5536. //>>excludeEnd("ide");
  5537. messageSends: ["removeActiveTab", "tabsWidget"]
  5538. }),
  5539. $globals.HLManager);
  5540. $core.addMethod(
  5541. $core.method({
  5542. selector: "removeTabForWidget:",
  5543. protocol: 'actions',
  5544. fn: function (aWidget){
  5545. var self=this;
  5546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5547. return $core.withContext(function($ctx1) {
  5548. //>>excludeEnd("ctx");
  5549. $recv(self._tabsWidget())._removeTabForWidget_(aWidget);
  5550. return self;
  5551. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5552. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLManager)});
  5553. //>>excludeEnd("ctx");
  5554. },
  5555. //>>excludeStart("ide", pragmas.excludeIdeData);
  5556. args: ["aWidget"],
  5557. source: "removeTabForWidget: aWidget\x0a\x09self tabsWidget removeTabForWidget: aWidget",
  5558. referencedClasses: [],
  5559. //>>excludeEnd("ide");
  5560. messageSends: ["removeTabForWidget:", "tabsWidget"]
  5561. }),
  5562. $globals.HLManager);
  5563. $core.addMethod(
  5564. $core.method({
  5565. selector: "renderContentOn:",
  5566. protocol: 'rendering',
  5567. fn: function (html){
  5568. var self=this;
  5569. function $HLWelcomeWidget(){return $globals.HLWelcomeWidget||(typeof HLWelcomeWidget=="undefined"?nil:HLWelcomeWidget)}
  5570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5571. return $core.withContext(function($ctx1) {
  5572. //>>excludeEnd("ctx");
  5573. $recv(html)._with_(self._topBarWidget());
  5574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5575. $ctx1.sendIdx["with:"]=1;
  5576. //>>excludeEnd("ctx");
  5577. $recv(html)._with_(self._tabsWidget());
  5578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5579. $ctx1.sendIdx["with:"]=2;
  5580. //>>excludeEnd("ctx");
  5581. $recv(html)._with_($recv($HLWelcomeWidget())._new());
  5582. return self;
  5583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5584. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLManager)});
  5585. //>>excludeEnd("ctx");
  5586. },
  5587. //>>excludeStart("ide", pragmas.excludeIdeData);
  5588. args: ["html"],
  5589. source: "renderContentOn: html\x0a\x09html with: self topBarWidget.\x0a\x09html with: self tabsWidget.\x0a\x09html with: HLWelcomeWidget new",
  5590. referencedClasses: ["HLWelcomeWidget"],
  5591. //>>excludeEnd("ide");
  5592. messageSends: ["with:", "topBarWidget", "tabsWidget", "new"]
  5593. }),
  5594. $globals.HLManager);
  5595. $core.addMethod(
  5596. $core.method({
  5597. selector: "request:do:",
  5598. protocol: 'actions',
  5599. fn: function (aString,aBlock){
  5600. var self=this;
  5601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5602. return $core.withContext(function($ctx1) {
  5603. //>>excludeEnd("ctx");
  5604. self._request_value_do_(aString,"",aBlock);
  5605. return self;
  5606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5607. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5608. //>>excludeEnd("ctx");
  5609. },
  5610. //>>excludeStart("ide", pragmas.excludeIdeData);
  5611. args: ["aString", "aBlock"],
  5612. source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
  5613. referencedClasses: [],
  5614. //>>excludeEnd("ide");
  5615. messageSends: ["request:value:do:"]
  5616. }),
  5617. $globals.HLManager);
  5618. $core.addMethod(
  5619. $core.method({
  5620. selector: "request:value:do:",
  5621. protocol: 'actions',
  5622. fn: function (aString,valueString,aBlock){
  5623. var self=this;
  5624. function $HLRequestWidget(){return $globals.HLRequestWidget||(typeof HLRequestWidget=="undefined"?nil:HLRequestWidget)}
  5625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5626. return $core.withContext(function($ctx1) {
  5627. //>>excludeEnd("ctx");
  5628. var $1,$2;
  5629. $1=$recv($HLRequestWidget())._new();
  5630. $recv($1)._confirmationString_(aString);
  5631. $recv($1)._actionBlock_(aBlock);
  5632. $recv($1)._value_(valueString);
  5633. $2=$recv($1)._show();
  5634. return self;
  5635. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5636. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLManager)});
  5637. //>>excludeEnd("ctx");
  5638. },
  5639. //>>excludeStart("ide", pragmas.excludeIdeData);
  5640. args: ["aString", "valueString", "aBlock"],
  5641. source: "request: aString value: valueString do: aBlock\x0a\x09HLRequestWidget new\x0a\x09\x09confirmationString: aString;\x0a\x09\x09actionBlock: aBlock;\x0a\x09\x09value: valueString;\x0a\x09\x09show",
  5642. referencedClasses: ["HLRequestWidget"],
  5643. //>>excludeEnd("ide");
  5644. messageSends: ["confirmationString:", "new", "actionBlock:", "value:", "show"]
  5645. }),
  5646. $globals.HLManager);
  5647. $core.addMethod(
  5648. $core.method({
  5649. selector: "setEditorTheme:",
  5650. protocol: 'accessing',
  5651. fn: function (aTheme){
  5652. var self=this;
  5653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5654. return $core.withContext(function($ctx1) {
  5655. //>>excludeEnd("ctx");
  5656. $recv("helios.editorTheme"._asSetting())._value_(aTheme);
  5657. return self;
  5658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5659. }, function($ctx1) {$ctx1.fill(self,"setEditorTheme:",{aTheme:aTheme},$globals.HLManager)});
  5660. //>>excludeEnd("ctx");
  5661. },
  5662. //>>excludeStart("ide", pragmas.excludeIdeData);
  5663. args: ["aTheme"],
  5664. source: "setEditorTheme: aTheme\x0a\x0a\x09'helios.editorTheme' asSetting value: aTheme",
  5665. referencedClasses: [],
  5666. //>>excludeEnd("ide");
  5667. messageSends: ["value:", "asSetting"]
  5668. }),
  5669. $globals.HLManager);
  5670. $core.addMethod(
  5671. $core.method({
  5672. selector: "setTheme:",
  5673. protocol: 'accessing',
  5674. fn: function (aTheme){
  5675. var self=this;
  5676. var currentTheme;
  5677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5678. return $core.withContext(function($ctx1) {
  5679. //>>excludeEnd("ctx");
  5680. var $1,$2;
  5681. currentTheme="helios.theme"._asSettingIfAbsent_("default");
  5682. $1="body"._asJQuery();
  5683. $recv($1)._removeClass_($recv(currentTheme)._value());
  5684. $2=$recv($1)._addClass_(aTheme);
  5685. $recv("helios.theme"._asSetting())._value_(aTheme);
  5686. return self;
  5687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5688. }, function($ctx1) {$ctx1.fill(self,"setTheme:",{aTheme:aTheme,currentTheme:currentTheme},$globals.HLManager)});
  5689. //>>excludeEnd("ctx");
  5690. },
  5691. //>>excludeStart("ide", pragmas.excludeIdeData);
  5692. args: ["aTheme"],
  5693. source: "setTheme: aTheme\x0a\x09| currentTheme |\x0a\x0a\x09currentTheme := 'helios.theme' asSettingIfAbsent: 'default'.\x0a\x09\x0a\x09'body' asJQuery\x0a\x09\x09removeClass: currentTheme value;\x0a\x09\x09addClass: aTheme.\x0a\x09\x09\x0a\x09\x0a\x09'helios.theme' asSetting value: aTheme",
  5694. referencedClasses: [],
  5695. //>>excludeEnd("ide");
  5696. messageSends: ["asSettingIfAbsent:", "removeClass:", "asJQuery", "value", "addClass:", "value:", "asSetting"]
  5697. }),
  5698. $globals.HLManager);
  5699. $core.addMethod(
  5700. $core.method({
  5701. selector: "setup",
  5702. protocol: 'initialization',
  5703. fn: function (){
  5704. var self=this;
  5705. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5706. return $core.withContext(function($ctx1) {
  5707. //>>excludeEnd("ctx");
  5708. var $1;
  5709. self._registerServices();
  5710. $1=self._setupEvents();
  5711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5712. $ctx1.sendIdx["setupEvents"]=1;
  5713. //>>excludeEnd("ctx");
  5714. $recv(self._keyBinder())._setupEvents();
  5715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5716. $ctx1.sendIdx["setupEvents"]=2;
  5717. //>>excludeEnd("ctx");
  5718. $recv(self._tabsWidget())._setupEvents();
  5719. self._setupTheme();
  5720. $recv("#helper"._asJQuery())._fadeOut();
  5721. return self;
  5722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5723. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager)});
  5724. //>>excludeEnd("ctx");
  5725. },
  5726. //>>excludeStart("ide", pragmas.excludeIdeData);
  5727. args: [],
  5728. source: "setup\x0a\x09self \x0a\x09\x09registerServices;\x0a\x09\x09setupEvents.\x0a self keyBinder setupEvents.\x0a\x09self tabsWidget setupEvents.\x0a\x09self setupTheme.\x0a\x09\x0a\x09\x0a\x09'#helper' asJQuery fadeOut",
  5729. referencedClasses: [],
  5730. //>>excludeEnd("ide");
  5731. messageSends: ["registerServices", "setupEvents", "keyBinder", "tabsWidget", "setupTheme", "fadeOut", "asJQuery"]
  5732. }),
  5733. $globals.HLManager);
  5734. $core.addMethod(
  5735. $core.method({
  5736. selector: "setupEvents",
  5737. protocol: 'private',
  5738. fn: function (){
  5739. var self=this;
  5740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5741. return $core.withContext(function($ctx1) {
  5742. //>>excludeEnd("ctx");
  5743. var $1,$2,$3,$4,$5;
  5744. $1="body"._asJQuery();
  5745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5746. $ctx1.sendIdx["asJQuery"]=1;
  5747. //>>excludeEnd("ctx");
  5748. $recv($1)._keydown_((function(event){
  5749. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5750. return $core.withContext(function($ctx2) {
  5751. //>>excludeEnd("ctx");
  5752. $2=$recv(event)._ctrlKey();
  5753. if($core.assert($2)){
  5754. $3="body"._asJQuery();
  5755. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5756. $ctx2.sendIdx["asJQuery"]=2;
  5757. //>>excludeEnd("ctx");
  5758. return $recv($3)._addClass_("navigation");
  5759. };
  5760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5761. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  5762. //>>excludeEnd("ctx");
  5763. }));
  5764. $4="body"._asJQuery();
  5765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5766. $ctx1.sendIdx["asJQuery"]=3;
  5767. //>>excludeEnd("ctx");
  5768. $recv($4)._keyup_((function(event){
  5769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5770. return $core.withContext(function($ctx2) {
  5771. //>>excludeEnd("ctx");
  5772. $5="body"._asJQuery();
  5773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5774. $ctx2.sendIdx["asJQuery"]=4;
  5775. //>>excludeEnd("ctx");
  5776. return $recv($5)._removeClass_("navigation");
  5777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5778. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  5779. //>>excludeEnd("ctx");
  5780. }));
  5781. $recv($recv(window)._asJQuery())._resize_((function(event){
  5782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5783. return $core.withContext(function($ctx2) {
  5784. //>>excludeEnd("ctx");
  5785. return self._refresh();
  5786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5787. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,4)});
  5788. //>>excludeEnd("ctx");
  5789. }));
  5790. return self;
  5791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5792. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLManager)});
  5793. //>>excludeEnd("ctx");
  5794. },
  5795. //>>excludeStart("ide", pragmas.excludeIdeData);
  5796. args: [],
  5797. source: "setupEvents\x0a\x09'body' asJQuery keydown: [ :event |\x0a\x09\x09\x09\x0a\x09\x09\x22On ctrl keydown, adds a 'navigation' css class to <body>\x0a\x09\x09for the CodeMirror navigation links. See `HLCodeWidget`.\x22\x0a\x09\x09event ctrlKey ifTrue: [\x0a\x09\x09\x09'body' asJQuery addClass: 'navigation' ] ].\x0a\x09\x09\x09\x0a\x09'body' asJQuery keyup: [ :event |\x0a\x09\x09'body' asJQuery removeClass: 'navigation' ].\x0a\x09\x09\x0a\x09window asJQuery resize: [ :event |\x0a\x09\x09self refresh ]",
  5798. referencedClasses: [],
  5799. //>>excludeEnd("ide");
  5800. messageSends: ["keydown:", "asJQuery", "ifTrue:", "ctrlKey", "addClass:", "keyup:", "removeClass:", "resize:", "refresh"]
  5801. }),
  5802. $globals.HLManager);
  5803. $core.addMethod(
  5804. $core.method({
  5805. selector: "setupTheme",
  5806. protocol: 'private',
  5807. fn: function (){
  5808. var self=this;
  5809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5810. return $core.withContext(function($ctx1) {
  5811. //>>excludeEnd("ctx");
  5812. var $1;
  5813. self._setTheme_("default");
  5814. $1=self._setEditorTheme_("default");
  5815. return self;
  5816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5817. }, function($ctx1) {$ctx1.fill(self,"setupTheme",{},$globals.HLManager)});
  5818. //>>excludeEnd("ctx");
  5819. },
  5820. //>>excludeStart("ide", pragmas.excludeIdeData);
  5821. args: [],
  5822. 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'.",
  5823. referencedClasses: [],
  5824. //>>excludeEnd("ide");
  5825. messageSends: ["setTheme:", "setEditorTheme:"]
  5826. }),
  5827. $globals.HLManager);
  5828. $core.addMethod(
  5829. $core.method({
  5830. selector: "tabWidth",
  5831. protocol: 'accessing',
  5832. fn: function (){
  5833. var self=this;
  5834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5835. return $core.withContext(function($ctx1) {
  5836. //>>excludeEnd("ctx");
  5837. var $1;
  5838. $1=$recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  5839. return $1;
  5840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5841. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLManager)});
  5842. //>>excludeEnd("ctx");
  5843. },
  5844. //>>excludeStart("ide", pragmas.excludeIdeData);
  5845. args: [],
  5846. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  5847. referencedClasses: [],
  5848. //>>excludeEnd("ide");
  5849. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  5850. }),
  5851. $globals.HLManager);
  5852. $core.addMethod(
  5853. $core.method({
  5854. selector: "tabs",
  5855. protocol: 'accessing',
  5856. fn: function (){
  5857. var self=this;
  5858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5859. return $core.withContext(function($ctx1) {
  5860. //>>excludeEnd("ctx");
  5861. var $1;
  5862. $1=$recv(self._tabsWidget())._tabs();
  5863. return $1;
  5864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5865. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLManager)});
  5866. //>>excludeEnd("ctx");
  5867. },
  5868. //>>excludeStart("ide", pragmas.excludeIdeData);
  5869. args: [],
  5870. source: "tabs\x0a\x09^ self tabsWidget tabs",
  5871. referencedClasses: [],
  5872. //>>excludeEnd("ide");
  5873. messageSends: ["tabs", "tabsWidget"]
  5874. }),
  5875. $globals.HLManager);
  5876. $core.addMethod(
  5877. $core.method({
  5878. selector: "tabsWidget",
  5879. protocol: 'accessing',
  5880. fn: function (){
  5881. var self=this;
  5882. function $HLTabsWidget(){return $globals.HLTabsWidget||(typeof HLTabsWidget=="undefined"?nil:HLTabsWidget)}
  5883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5884. return $core.withContext(function($ctx1) {
  5885. //>>excludeEnd("ctx");
  5886. var $2,$1,$receiver;
  5887. $2=self["@tabsWidget"];
  5888. if(($receiver = $2) == null || $receiver.isNil){
  5889. self["@tabsWidget"]=$recv($HLTabsWidget())._new();
  5890. $1=self["@tabsWidget"];
  5891. } else {
  5892. $1=$2;
  5893. };
  5894. return $1;
  5895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5896. }, function($ctx1) {$ctx1.fill(self,"tabsWidget",{},$globals.HLManager)});
  5897. //>>excludeEnd("ctx");
  5898. },
  5899. //>>excludeStart("ide", pragmas.excludeIdeData);
  5900. args: [],
  5901. source: "tabsWidget\x0a\x09^ tabsWidget ifNil: [ tabsWidget := HLTabsWidget new ]",
  5902. referencedClasses: ["HLTabsWidget"],
  5903. //>>excludeEnd("ide");
  5904. messageSends: ["ifNil:", "new"]
  5905. }),
  5906. $globals.HLManager);
  5907. $core.addMethod(
  5908. $core.method({
  5909. selector: "topBarWidget",
  5910. protocol: 'accessing',
  5911. fn: function (){
  5912. var self=this;
  5913. function $HLTopBarWidget(){return $globals.HLTopBarWidget||(typeof HLTopBarWidget=="undefined"?nil:HLTopBarWidget)}
  5914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5915. return $core.withContext(function($ctx1) {
  5916. //>>excludeEnd("ctx");
  5917. var $2,$1,$receiver;
  5918. $2=self["@topBarWidget"];
  5919. if(($receiver = $2) == null || $receiver.isNil){
  5920. self["@topBarWidget"]=$recv($HLTopBarWidget())._new();
  5921. $1=self["@topBarWidget"];
  5922. } else {
  5923. $1=$2;
  5924. };
  5925. return $1;
  5926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5927. }, function($ctx1) {$ctx1.fill(self,"topBarWidget",{},$globals.HLManager)});
  5928. //>>excludeEnd("ctx");
  5929. },
  5930. //>>excludeStart("ide", pragmas.excludeIdeData);
  5931. args: [],
  5932. source: "topBarWidget\x0a\x09^ topBarWidget ifNil: [ topBarWidget := HLTopBarWidget new ]",
  5933. referencedClasses: ["HLTopBarWidget"],
  5934. //>>excludeEnd("ide");
  5935. messageSends: ["ifNil:", "new"]
  5936. }),
  5937. $globals.HLManager);
  5938. $globals.HLManager.klass.iVarNames = ['current'];
  5939. $core.addMethod(
  5940. $core.method({
  5941. selector: "current",
  5942. protocol: 'accessing',
  5943. fn: function (){
  5944. var self=this;
  5945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5946. return $core.withContext(function($ctx1) {
  5947. //>>excludeEnd("ctx");
  5948. var $2,$1,$receiver;
  5949. $2=self["@current"];
  5950. if(($receiver = $2) == null || $receiver.isNil){
  5951. self["@current"]=$recv(self._basicNew())._initialize();
  5952. $1=self["@current"];
  5953. } else {
  5954. $1=$2;
  5955. };
  5956. return $1;
  5957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5958. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.HLManager.klass)});
  5959. //>>excludeEnd("ctx");
  5960. },
  5961. //>>excludeStart("ide", pragmas.excludeIdeData);
  5962. args: [],
  5963. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  5964. referencedClasses: [],
  5965. //>>excludeEnd("ide");
  5966. messageSends: ["ifNil:", "initialize", "basicNew"]
  5967. }),
  5968. $globals.HLManager.klass);
  5969. $core.addMethod(
  5970. $core.method({
  5971. selector: "new",
  5972. protocol: 'instance creation',
  5973. fn: function (){
  5974. var self=this;
  5975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5976. return $core.withContext(function($ctx1) {
  5977. //>>excludeEnd("ctx");
  5978. self._shouldNotImplement();
  5979. return self;
  5980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5981. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.HLManager.klass)});
  5982. //>>excludeEnd("ctx");
  5983. },
  5984. //>>excludeStart("ide", pragmas.excludeIdeData);
  5985. args: [],
  5986. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  5987. referencedClasses: [],
  5988. //>>excludeEnd("ide");
  5989. messageSends: ["shouldNotImplement"]
  5990. }),
  5991. $globals.HLManager.klass);
  5992. $core.addMethod(
  5993. $core.method({
  5994. selector: "setup",
  5995. protocol: 'initialization',
  5996. fn: function (){
  5997. var self=this;
  5998. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5999. return $core.withContext(function($ctx1) {
  6000. //>>excludeEnd("ctx");
  6001. var $1,$2;
  6002. $1=self._current();
  6003. $recv($1)._setup();
  6004. $2=$recv($1)._appendToJQuery_("body"._asJQuery());
  6005. return self;
  6006. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6007. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager.klass)});
  6008. //>>excludeEnd("ctx");
  6009. },
  6010. //>>excludeStart("ide", pragmas.excludeIdeData);
  6011. args: [],
  6012. source: "setup\x0a\x09self current \x0a\x09\x09setup;\x0a\x09\x09appendToJQuery: 'body' asJQuery",
  6013. referencedClasses: [],
  6014. //>>excludeEnd("ide");
  6015. messageSends: ["setup", "current", "appendToJQuery:", "asJQuery"]
  6016. }),
  6017. $globals.HLManager.klass);
  6018. $core.addClass('HLModalWidget', $globals.HLWidget, [], 'Helios-Core');
  6019. //>>excludeStart("ide", pragmas.excludeIdeData);
  6020. $globals.HLModalWidget.comment="I implement an abstract modal widget.";
  6021. //>>excludeEnd("ide");
  6022. $core.addMethod(
  6023. $core.method({
  6024. selector: "giveFocusToButton:",
  6025. protocol: 'private',
  6026. fn: function (aButton){
  6027. var self=this;
  6028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6029. return $core.withContext(function($ctx1) {
  6030. //>>excludeEnd("ctx");
  6031. $recv($recv(aButton)._asJQuery())._focus();
  6032. return self;
  6033. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6034. }, function($ctx1) {$ctx1.fill(self,"giveFocusToButton:",{aButton:aButton},$globals.HLModalWidget)});
  6035. //>>excludeEnd("ctx");
  6036. },
  6037. //>>excludeStart("ide", pragmas.excludeIdeData);
  6038. args: ["aButton"],
  6039. source: "giveFocusToButton: aButton\x0a\x09aButton asJQuery focus",
  6040. referencedClasses: [],
  6041. //>>excludeEnd("ide");
  6042. messageSends: ["focus", "asJQuery"]
  6043. }),
  6044. $globals.HLModalWidget);
  6045. $core.addMethod(
  6046. $core.method({
  6047. selector: "hasButtons",
  6048. protocol: 'rendering',
  6049. fn: function (){
  6050. var self=this;
  6051. return true;
  6052. },
  6053. //>>excludeStart("ide", pragmas.excludeIdeData);
  6054. args: [],
  6055. source: "hasButtons\x0a\x09^ true",
  6056. referencedClasses: [],
  6057. //>>excludeEnd("ide");
  6058. messageSends: []
  6059. }),
  6060. $globals.HLModalWidget);
  6061. $core.addMethod(
  6062. $core.method({
  6063. selector: "remove",
  6064. protocol: 'actions',
  6065. fn: function (){
  6066. var self=this;
  6067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6068. return $core.withContext(function($ctx1) {
  6069. //>>excludeEnd("ctx");
  6070. var $1,$2;
  6071. $1=".dialog"._asJQuery();
  6072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6073. $ctx1.sendIdx["asJQuery"]=1;
  6074. //>>excludeEnd("ctx");
  6075. $recv($1)._removeClass_("active");
  6076. $recv((function(){
  6077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6078. return $core.withContext(function($ctx2) {
  6079. //>>excludeEnd("ctx");
  6080. $2="#overlay"._asJQuery();
  6081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6082. $ctx2.sendIdx["asJQuery"]=2;
  6083. //>>excludeEnd("ctx");
  6084. $recv($2)._remove();
  6085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6086. $ctx2.sendIdx["remove"]=1;
  6087. //>>excludeEnd("ctx");
  6088. return $recv($recv(self["@wrapper"])._asJQuery())._remove();
  6089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6090. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6091. //>>excludeEnd("ctx");
  6092. }))._valueWithTimeout_((300));
  6093. return self;
  6094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6095. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLModalWidget)});
  6096. //>>excludeEnd("ctx");
  6097. },
  6098. //>>excludeStart("ide", pragmas.excludeIdeData);
  6099. args: [],
  6100. 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",
  6101. referencedClasses: [],
  6102. //>>excludeEnd("ide");
  6103. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]
  6104. }),
  6105. $globals.HLModalWidget);
  6106. $core.addMethod(
  6107. $core.method({
  6108. selector: "renderButtonsOn:",
  6109. protocol: 'rendering',
  6110. fn: function (html){
  6111. var self=this;
  6112. return self;
  6113. },
  6114. //>>excludeStart("ide", pragmas.excludeIdeData);
  6115. args: ["html"],
  6116. source: "renderButtonsOn: html",
  6117. referencedClasses: [],
  6118. //>>excludeEnd("ide");
  6119. messageSends: []
  6120. }),
  6121. $globals.HLModalWidget);
  6122. $core.addMethod(
  6123. $core.method({
  6124. selector: "renderContentOn:",
  6125. protocol: 'rendering',
  6126. fn: function (html){
  6127. var self=this;
  6128. var confirmButton;
  6129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6130. return $core.withContext(function($ctx1) {
  6131. //>>excludeEnd("ctx");
  6132. var $1,$2,$4,$3;
  6133. $1=$recv(html)._div();
  6134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6135. $ctx1.sendIdx["div"]=1;
  6136. //>>excludeEnd("ctx");
  6137. $recv($1)._id_("overlay");
  6138. $2=$recv(html)._div();
  6139. $recv($2)._class_("dialog ".__comma(self._cssClass()));
  6140. $3=$recv($2)._with_((function(){
  6141. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6142. return $core.withContext(function($ctx2) {
  6143. //>>excludeEnd("ctx");
  6144. self._renderMainOn_(html);
  6145. $4=self._hasButtons();
  6146. if($core.assert($4)){
  6147. return self._renderButtonsOn_(html);
  6148. };
  6149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6150. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6151. //>>excludeEnd("ctx");
  6152. }));
  6153. $recv(".dialog"._asJQuery())._addClass_("active");
  6154. self._setupKeyBindings();
  6155. return self;
  6156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6157. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},$globals.HLModalWidget)});
  6158. //>>excludeEnd("ctx");
  6159. },
  6160. //>>excludeStart("ide", pragmas.excludeIdeData);
  6161. args: ["html"],
  6162. 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",
  6163. referencedClasses: [],
  6164. //>>excludeEnd("ide");
  6165. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "ifTrue:", "hasButtons", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]
  6166. }),
  6167. $globals.HLModalWidget);
  6168. $core.addMethod(
  6169. $core.method({
  6170. selector: "renderMainOn:",
  6171. protocol: 'rendering',
  6172. fn: function (html){
  6173. var self=this;
  6174. return self;
  6175. },
  6176. //>>excludeStart("ide", pragmas.excludeIdeData);
  6177. args: ["html"],
  6178. source: "renderMainOn: html",
  6179. referencedClasses: [],
  6180. //>>excludeEnd("ide");
  6181. messageSends: []
  6182. }),
  6183. $globals.HLModalWidget);
  6184. $core.addMethod(
  6185. $core.method({
  6186. selector: "setupKeyBindings",
  6187. protocol: 'rendering',
  6188. fn: function (){
  6189. var self=this;
  6190. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  6191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6192. return $core.withContext(function($ctx1) {
  6193. //>>excludeEnd("ctx");
  6194. var $1;
  6195. $recv(".dialog"._asJQuery())._keyup_((function(e){
  6196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6197. return $core.withContext(function($ctx2) {
  6198. //>>excludeEnd("ctx");
  6199. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($String())._esc())._asciiValue());
  6200. if($core.assert($1)){
  6201. return self._cancel();
  6202. };
  6203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6204. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  6205. //>>excludeEnd("ctx");
  6206. }));
  6207. return self;
  6208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6209. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLModalWidget)});
  6210. //>>excludeEnd("ctx");
  6211. },
  6212. //>>excludeStart("ide", pragmas.excludeIdeData);
  6213. args: [],
  6214. source: "setupKeyBindings\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String esc asciiValue ifTrue: [ self cancel ] ]",
  6215. referencedClasses: ["String"],
  6216. //>>excludeEnd("ide");
  6217. messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "esc", "cancel"]
  6218. }),
  6219. $globals.HLModalWidget);
  6220. $core.addMethod(
  6221. $core.method({
  6222. selector: "show",
  6223. protocol: 'actions',
  6224. fn: function (){
  6225. var self=this;
  6226. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6227. return $core.withContext(function($ctx1) {
  6228. //>>excludeEnd("ctx");
  6229. self._appendToJQuery_("body"._asJQuery());
  6230. return self;
  6231. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6232. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLModalWidget)});
  6233. //>>excludeEnd("ctx");
  6234. },
  6235. //>>excludeStart("ide", pragmas.excludeIdeData);
  6236. args: [],
  6237. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  6238. referencedClasses: [],
  6239. //>>excludeEnd("ide");
  6240. messageSends: ["appendToJQuery:", "asJQuery"]
  6241. }),
  6242. $globals.HLModalWidget);
  6243. $core.addClass('HLConfirmationWidget', $globals.HLModalWidget, ['cancelButtonLabel', 'confirmButtonLabel', 'confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  6244. //>>excludeStart("ide", pragmas.excludeIdeData);
  6245. $globals.HLConfirmationWidget.comment="I display confirmation dialog. \x0a\x0a## API\x0a\x0aHLWidget contains convenience methods like `HLWidget >> #confirm:ifTrue:` for creating confirmation dialogs.";
  6246. //>>excludeEnd("ide");
  6247. $core.addMethod(
  6248. $core.method({
  6249. selector: "actionBlock",
  6250. protocol: 'accessing',
  6251. fn: function (){
  6252. var self=this;
  6253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6254. return $core.withContext(function($ctx1) {
  6255. //>>excludeEnd("ctx");
  6256. var $2,$1,$receiver;
  6257. $2=self["@actionBlock"];
  6258. if(($receiver = $2) == null || $receiver.isNil){
  6259. $1=(function(){
  6260. });
  6261. } else {
  6262. $1=$2;
  6263. };
  6264. return $1;
  6265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6266. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},$globals.HLConfirmationWidget)});
  6267. //>>excludeEnd("ctx");
  6268. },
  6269. //>>excludeStart("ide", pragmas.excludeIdeData);
  6270. args: [],
  6271. source: "actionBlock\x0a\x09^ actionBlock ifNil: [ [] ]",
  6272. referencedClasses: [],
  6273. //>>excludeEnd("ide");
  6274. messageSends: ["ifNil:"]
  6275. }),
  6276. $globals.HLConfirmationWidget);
  6277. $core.addMethod(
  6278. $core.method({
  6279. selector: "actionBlock:",
  6280. protocol: 'accessing',
  6281. fn: function (aBlock){
  6282. var self=this;
  6283. self["@actionBlock"]=aBlock;
  6284. return self;
  6285. },
  6286. //>>excludeStart("ide", pragmas.excludeIdeData);
  6287. args: ["aBlock"],
  6288. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  6289. referencedClasses: [],
  6290. //>>excludeEnd("ide");
  6291. messageSends: []
  6292. }),
  6293. $globals.HLConfirmationWidget);
  6294. $core.addMethod(
  6295. $core.method({
  6296. selector: "cancel",
  6297. protocol: 'actions',
  6298. fn: function (){
  6299. var self=this;
  6300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6301. return $core.withContext(function($ctx1) {
  6302. //>>excludeEnd("ctx");
  6303. $recv(self._cancelBlock())._value();
  6304. self._remove();
  6305. return self;
  6306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6307. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLConfirmationWidget)});
  6308. //>>excludeEnd("ctx");
  6309. },
  6310. //>>excludeStart("ide", pragmas.excludeIdeData);
  6311. args: [],
  6312. source: "cancel\x0a\x09self cancelBlock value.\x0a\x09self remove",
  6313. referencedClasses: [],
  6314. //>>excludeEnd("ide");
  6315. messageSends: ["value", "cancelBlock", "remove"]
  6316. }),
  6317. $globals.HLConfirmationWidget);
  6318. $core.addMethod(
  6319. $core.method({
  6320. selector: "cancelBlock",
  6321. protocol: 'accessing',
  6322. fn: function (){
  6323. var self=this;
  6324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6325. return $core.withContext(function($ctx1) {
  6326. //>>excludeEnd("ctx");
  6327. var $2,$1,$receiver;
  6328. $2=self["@cancelBlock"];
  6329. if(($receiver = $2) == null || $receiver.isNil){
  6330. $1=(function(){
  6331. });
  6332. } else {
  6333. $1=$2;
  6334. };
  6335. return $1;
  6336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6337. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},$globals.HLConfirmationWidget)});
  6338. //>>excludeEnd("ctx");
  6339. },
  6340. //>>excludeStart("ide", pragmas.excludeIdeData);
  6341. args: [],
  6342. source: "cancelBlock\x0a\x09^ cancelBlock ifNil: [ [] ]",
  6343. referencedClasses: [],
  6344. //>>excludeEnd("ide");
  6345. messageSends: ["ifNil:"]
  6346. }),
  6347. $globals.HLConfirmationWidget);
  6348. $core.addMethod(
  6349. $core.method({
  6350. selector: "cancelBlock:",
  6351. protocol: 'accessing',
  6352. fn: function (aBlock){
  6353. var self=this;
  6354. self["@cancelBlock"]=aBlock;
  6355. return self;
  6356. },
  6357. //>>excludeStart("ide", pragmas.excludeIdeData);
  6358. args: ["aBlock"],
  6359. source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
  6360. referencedClasses: [],
  6361. //>>excludeEnd("ide");
  6362. messageSends: []
  6363. }),
  6364. $globals.HLConfirmationWidget);
  6365. $core.addMethod(
  6366. $core.method({
  6367. selector: "cancelButtonLabel",
  6368. protocol: 'accessing',
  6369. fn: function (){
  6370. var self=this;
  6371. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6372. return $core.withContext(function($ctx1) {
  6373. //>>excludeEnd("ctx");
  6374. var $2,$1,$receiver;
  6375. $2=self["@cancelButtonLabel"];
  6376. if(($receiver = $2) == null || $receiver.isNil){
  6377. $1="Cancel";
  6378. } else {
  6379. $1=$2;
  6380. };
  6381. return $1;
  6382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6383. }, function($ctx1) {$ctx1.fill(self,"cancelButtonLabel",{},$globals.HLConfirmationWidget)});
  6384. //>>excludeEnd("ctx");
  6385. },
  6386. //>>excludeStart("ide", pragmas.excludeIdeData);
  6387. args: [],
  6388. source: "cancelButtonLabel\x0a\x09^ cancelButtonLabel ifNil: [ 'Cancel' ]",
  6389. referencedClasses: [],
  6390. //>>excludeEnd("ide");
  6391. messageSends: ["ifNil:"]
  6392. }),
  6393. $globals.HLConfirmationWidget);
  6394. $core.addMethod(
  6395. $core.method({
  6396. selector: "cancelButtonLabel:",
  6397. protocol: 'accessing',
  6398. fn: function (aString){
  6399. var self=this;
  6400. var $1;
  6401. self["@cancelButtonLabel"]=aString;
  6402. $1=self["@cancelButtonLabel"];
  6403. return $1;
  6404. },
  6405. //>>excludeStart("ide", pragmas.excludeIdeData);
  6406. args: ["aString"],
  6407. source: "cancelButtonLabel: aString\x0a\x09^ cancelButtonLabel := aString",
  6408. referencedClasses: [],
  6409. //>>excludeEnd("ide");
  6410. messageSends: []
  6411. }),
  6412. $globals.HLConfirmationWidget);
  6413. $core.addMethod(
  6414. $core.method({
  6415. selector: "confirm",
  6416. protocol: 'actions',
  6417. fn: function (){
  6418. var self=this;
  6419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6420. return $core.withContext(function($ctx1) {
  6421. //>>excludeEnd("ctx");
  6422. self._remove();
  6423. $recv(self._actionBlock())._value();
  6424. return self;
  6425. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6426. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLConfirmationWidget)});
  6427. //>>excludeEnd("ctx");
  6428. },
  6429. //>>excludeStart("ide", pragmas.excludeIdeData);
  6430. args: [],
  6431. source: "confirm\x0a\x09self remove.\x0a\x09self actionBlock value",
  6432. referencedClasses: [],
  6433. //>>excludeEnd("ide");
  6434. messageSends: ["remove", "value", "actionBlock"]
  6435. }),
  6436. $globals.HLConfirmationWidget);
  6437. $core.addMethod(
  6438. $core.method({
  6439. selector: "confirmButtonLabel",
  6440. protocol: 'accessing',
  6441. fn: function (){
  6442. var self=this;
  6443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6444. return $core.withContext(function($ctx1) {
  6445. //>>excludeEnd("ctx");
  6446. var $2,$1,$receiver;
  6447. $2=self["@confirmButtonLabel"];
  6448. if(($receiver = $2) == null || $receiver.isNil){
  6449. $1="Confirm";
  6450. } else {
  6451. $1=$2;
  6452. };
  6453. return $1;
  6454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6455. }, function($ctx1) {$ctx1.fill(self,"confirmButtonLabel",{},$globals.HLConfirmationWidget)});
  6456. //>>excludeEnd("ctx");
  6457. },
  6458. //>>excludeStart("ide", pragmas.excludeIdeData);
  6459. args: [],
  6460. source: "confirmButtonLabel\x0a\x09^ confirmButtonLabel ifNil: [ 'Confirm' ]",
  6461. referencedClasses: [],
  6462. //>>excludeEnd("ide");
  6463. messageSends: ["ifNil:"]
  6464. }),
  6465. $globals.HLConfirmationWidget);
  6466. $core.addMethod(
  6467. $core.method({
  6468. selector: "confirmButtonLabel:",
  6469. protocol: 'accessing',
  6470. fn: function (aString){
  6471. var self=this;
  6472. var $1;
  6473. self["@confirmButtonLabel"]=aString;
  6474. $1=self["@confirmButtonLabel"];
  6475. return $1;
  6476. },
  6477. //>>excludeStart("ide", pragmas.excludeIdeData);
  6478. args: ["aString"],
  6479. source: "confirmButtonLabel: aString\x0a\x09^ confirmButtonLabel := aString",
  6480. referencedClasses: [],
  6481. //>>excludeEnd("ide");
  6482. messageSends: []
  6483. }),
  6484. $globals.HLConfirmationWidget);
  6485. $core.addMethod(
  6486. $core.method({
  6487. selector: "confirmationString",
  6488. protocol: 'accessing',
  6489. fn: function (){
  6490. var self=this;
  6491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6492. return $core.withContext(function($ctx1) {
  6493. //>>excludeEnd("ctx");
  6494. var $2,$1,$receiver;
  6495. $2=self["@confirmationString"];
  6496. if(($receiver = $2) == null || $receiver.isNil){
  6497. $1="Confirm";
  6498. } else {
  6499. $1=$2;
  6500. };
  6501. return $1;
  6502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6503. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},$globals.HLConfirmationWidget)});
  6504. //>>excludeEnd("ctx");
  6505. },
  6506. //>>excludeStart("ide", pragmas.excludeIdeData);
  6507. args: [],
  6508. source: "confirmationString\x0a\x09^ confirmationString ifNil: [ 'Confirm' ]",
  6509. referencedClasses: [],
  6510. //>>excludeEnd("ide");
  6511. messageSends: ["ifNil:"]
  6512. }),
  6513. $globals.HLConfirmationWidget);
  6514. $core.addMethod(
  6515. $core.method({
  6516. selector: "confirmationString:",
  6517. protocol: 'accessing',
  6518. fn: function (aString){
  6519. var self=this;
  6520. self["@confirmationString"]=aString;
  6521. return self;
  6522. },
  6523. //>>excludeStart("ide", pragmas.excludeIdeData);
  6524. args: ["aString"],
  6525. source: "confirmationString: aString\x0a\x09confirmationString := aString",
  6526. referencedClasses: [],
  6527. //>>excludeEnd("ide");
  6528. messageSends: []
  6529. }),
  6530. $globals.HLConfirmationWidget);
  6531. $core.addMethod(
  6532. $core.method({
  6533. selector: "renderButtonsOn:",
  6534. protocol: 'rendering',
  6535. fn: function (html){
  6536. var self=this;
  6537. var confirmButton;
  6538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6539. return $core.withContext(function($ctx1) {
  6540. //>>excludeEnd("ctx");
  6541. var $1,$3,$4,$5,$6,$2;
  6542. $1=$recv(html)._div();
  6543. $recv($1)._class_("buttons");
  6544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6545. $ctx1.sendIdx["class:"]=1;
  6546. //>>excludeEnd("ctx");
  6547. $2=$recv($1)._with_((function(){
  6548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6549. return $core.withContext(function($ctx2) {
  6550. //>>excludeEnd("ctx");
  6551. $3=$recv(html)._button();
  6552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6553. $ctx2.sendIdx["button"]=1;
  6554. //>>excludeEnd("ctx");
  6555. $recv($3)._class_("button");
  6556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6557. $ctx2.sendIdx["class:"]=2;
  6558. //>>excludeEnd("ctx");
  6559. $recv($3)._with_(self._cancelButtonLabel());
  6560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6561. $ctx2.sendIdx["with:"]=2;
  6562. //>>excludeEnd("ctx");
  6563. $4=$recv($3)._onClick_((function(){
  6564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6565. return $core.withContext(function($ctx3) {
  6566. //>>excludeEnd("ctx");
  6567. return self._cancel();
  6568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6569. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6570. //>>excludeEnd("ctx");
  6571. }));
  6572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6573. $ctx2.sendIdx["onClick:"]=1;
  6574. //>>excludeEnd("ctx");
  6575. $4;
  6576. $5=$recv(html)._button();
  6577. $recv($5)._class_("button default");
  6578. $recv($5)._with_(self._confirmButtonLabel());
  6579. $6=$recv($5)._onClick_((function(){
  6580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6581. return $core.withContext(function($ctx3) {
  6582. //>>excludeEnd("ctx");
  6583. return self._confirm();
  6584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6585. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  6586. //>>excludeEnd("ctx");
  6587. }));
  6588. confirmButton=$6;
  6589. return confirmButton;
  6590. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6591. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6592. //>>excludeEnd("ctx");
  6593. }));
  6594. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6595. $ctx1.sendIdx["with:"]=1;
  6596. //>>excludeEnd("ctx");
  6597. self._giveFocusToButton_(confirmButton);
  6598. return self;
  6599. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6600. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLConfirmationWidget)});
  6601. //>>excludeEnd("ctx");
  6602. },
  6603. //>>excludeStart("ide", pragmas.excludeIdeData);
  6604. args: ["html"],
  6605. 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",
  6606. referencedClasses: [],
  6607. //>>excludeEnd("ide");
  6608. messageSends: ["class:", "div", "with:", "button", "cancelButtonLabel", "onClick:", "cancel", "confirmButtonLabel", "confirm", "giveFocusToButton:"]
  6609. }),
  6610. $globals.HLConfirmationWidget);
  6611. $core.addMethod(
  6612. $core.method({
  6613. selector: "renderMainOn:",
  6614. protocol: 'rendering',
  6615. fn: function (html){
  6616. var self=this;
  6617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6618. return $core.withContext(function($ctx1) {
  6619. //>>excludeEnd("ctx");
  6620. var $1,$2;
  6621. $1=$recv(html)._span();
  6622. $recv($1)._class_("head");
  6623. $2=$recv($1)._with_(self._confirmationString());
  6624. return self;
  6625. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6626. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLConfirmationWidget)});
  6627. //>>excludeEnd("ctx");
  6628. },
  6629. //>>excludeStart("ide", pragmas.excludeIdeData);
  6630. args: ["html"],
  6631. source: "renderMainOn: html\x0a\x09html span \x0a\x09\x09class: 'head'; \x0a\x09\x09with: self confirmationString",
  6632. referencedClasses: [],
  6633. //>>excludeEnd("ide");
  6634. messageSends: ["class:", "span", "with:", "confirmationString"]
  6635. }),
  6636. $globals.HLConfirmationWidget);
  6637. $core.addClass('HLRequestWidget', $globals.HLConfirmationWidget, ['input', 'multiline', 'value'], 'Helios-Core');
  6638. //>>excludeStart("ide", pragmas.excludeIdeData);
  6639. $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.";
  6640. //>>excludeEnd("ide");
  6641. $core.addMethod(
  6642. $core.method({
  6643. selector: "beMultiline",
  6644. protocol: 'accessing',
  6645. fn: function (){
  6646. var self=this;
  6647. self["@multiline"]=true;
  6648. return self;
  6649. },
  6650. //>>excludeStart("ide", pragmas.excludeIdeData);
  6651. args: [],
  6652. source: "beMultiline\x0a\x09multiline := true",
  6653. referencedClasses: [],
  6654. //>>excludeEnd("ide");
  6655. messageSends: []
  6656. }),
  6657. $globals.HLRequestWidget);
  6658. $core.addMethod(
  6659. $core.method({
  6660. selector: "beSingleline",
  6661. protocol: 'accessing',
  6662. fn: function (){
  6663. var self=this;
  6664. self["@multiline"]=false;
  6665. return self;
  6666. },
  6667. //>>excludeStart("ide", pragmas.excludeIdeData);
  6668. args: [],
  6669. source: "beSingleline\x0a\x09multiline := false",
  6670. referencedClasses: [],
  6671. //>>excludeEnd("ide");
  6672. messageSends: []
  6673. }),
  6674. $globals.HLRequestWidget);
  6675. $core.addMethod(
  6676. $core.method({
  6677. selector: "confirm",
  6678. protocol: 'actions',
  6679. fn: function (){
  6680. var self=this;
  6681. var val;
  6682. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6683. return $core.withContext(function($ctx1) {
  6684. //>>excludeEnd("ctx");
  6685. val=$recv($recv(self["@input"])._asJQuery())._val();
  6686. self._remove();
  6687. $recv(self._actionBlock())._value_(val);
  6688. return self;
  6689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6690. }, function($ctx1) {$ctx1.fill(self,"confirm",{val:val},$globals.HLRequestWidget)});
  6691. //>>excludeEnd("ctx");
  6692. },
  6693. //>>excludeStart("ide", pragmas.excludeIdeData);
  6694. args: [],
  6695. source: "confirm\x0a\x09| val |\x0a\x09val := input asJQuery val.\x0a\x09self remove.\x0a\x09self actionBlock value: val",
  6696. referencedClasses: [],
  6697. //>>excludeEnd("ide");
  6698. messageSends: ["val", "asJQuery", "remove", "value:", "actionBlock"]
  6699. }),
  6700. $globals.HLRequestWidget);
  6701. $core.addMethod(
  6702. $core.method({
  6703. selector: "cssClass",
  6704. protocol: 'accessing',
  6705. fn: function (){
  6706. var self=this;
  6707. return "large";
  6708. },
  6709. //>>excludeStart("ide", pragmas.excludeIdeData);
  6710. args: [],
  6711. source: "cssClass\x0a\x09^ 'large'",
  6712. referencedClasses: [],
  6713. //>>excludeEnd("ide");
  6714. messageSends: []
  6715. }),
  6716. $globals.HLRequestWidget);
  6717. $core.addMethod(
  6718. $core.method({
  6719. selector: "giveFocusToButton:",
  6720. protocol: 'private',
  6721. fn: function (aButton){
  6722. var self=this;
  6723. return self;
  6724. },
  6725. //>>excludeStart("ide", pragmas.excludeIdeData);
  6726. args: ["aButton"],
  6727. source: "giveFocusToButton: aButton",
  6728. referencedClasses: [],
  6729. //>>excludeEnd("ide");
  6730. messageSends: []
  6731. }),
  6732. $globals.HLRequestWidget);
  6733. $core.addMethod(
  6734. $core.method({
  6735. selector: "isMultiline",
  6736. protocol: 'testing',
  6737. fn: function (){
  6738. var self=this;
  6739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6740. return $core.withContext(function($ctx1) {
  6741. //>>excludeEnd("ctx");
  6742. var $2,$1,$receiver;
  6743. $2=self["@multiline"];
  6744. if(($receiver = $2) == null || $receiver.isNil){
  6745. $1=true;
  6746. } else {
  6747. $1=$2;
  6748. };
  6749. return $1;
  6750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6751. }, function($ctx1) {$ctx1.fill(self,"isMultiline",{},$globals.HLRequestWidget)});
  6752. //>>excludeEnd("ctx");
  6753. },
  6754. //>>excludeStart("ide", pragmas.excludeIdeData);
  6755. args: [],
  6756. source: "isMultiline\x0a\x09^ multiline ifNil: [ true ]",
  6757. referencedClasses: [],
  6758. //>>excludeEnd("ide");
  6759. messageSends: ["ifNil:"]
  6760. }),
  6761. $globals.HLRequestWidget);
  6762. $core.addMethod(
  6763. $core.method({
  6764. selector: "renderMainOn:",
  6765. protocol: 'rendering',
  6766. fn: function (html){
  6767. var self=this;
  6768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6769. return $core.withContext(function($ctx1) {
  6770. //>>excludeEnd("ctx");
  6771. var $1,$2,$3,$4,$5,$6;
  6772. (
  6773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6774. $ctx1.supercall = true,
  6775. //>>excludeEnd("ctx");
  6776. $globals.HLRequestWidget.superclass.fn.prototype._renderMainOn_.apply($recv(self), [html]));
  6777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6778. $ctx1.supercall = false;
  6779. //>>excludeEnd("ctx");;
  6780. $1=self._isMultiline();
  6781. if($core.assert($1)){
  6782. self["@input"]=$recv(html)._textarea();
  6783. self["@input"];
  6784. } else {
  6785. $2=$recv(html)._input();
  6786. $recv($2)._type_("text");
  6787. $recv($2)._onKeyDown_((function(event){
  6788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6789. return $core.withContext(function($ctx2) {
  6790. //>>excludeEnd("ctx");
  6791. $3=$recv($recv(event)._keyCode()).__eq((13));
  6792. if($core.assert($3)){
  6793. return self._confirm();
  6794. };
  6795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6796. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  6797. //>>excludeEnd("ctx");
  6798. }));
  6799. $4=$recv($2)._yourself();
  6800. self["@input"]=$4;
  6801. self["@input"];
  6802. };
  6803. $5=$recv(self["@input"])._asJQuery();
  6804. $recv($5)._val_(self._value());
  6805. $6=$recv($5)._focus();
  6806. return self;
  6807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6808. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLRequestWidget)});
  6809. //>>excludeEnd("ctx");
  6810. },
  6811. //>>excludeStart("ide", pragmas.excludeIdeData);
  6812. args: ["html"],
  6813. 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",
  6814. referencedClasses: [],
  6815. //>>excludeEnd("ide");
  6816. messageSends: ["renderMainOn:", "ifTrue:ifFalse:", "isMultiline", "textarea", "type:", "input", "onKeyDown:", "ifTrue:", "=", "keyCode", "confirm", "yourself", "val:", "asJQuery", "value", "focus"]
  6817. }),
  6818. $globals.HLRequestWidget);
  6819. $core.addMethod(
  6820. $core.method({
  6821. selector: "value",
  6822. protocol: 'accessing',
  6823. fn: function (){
  6824. var self=this;
  6825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6826. return $core.withContext(function($ctx1) {
  6827. //>>excludeEnd("ctx");
  6828. var $2,$1,$receiver;
  6829. $2=self["@value"];
  6830. if(($receiver = $2) == null || $receiver.isNil){
  6831. $1="";
  6832. } else {
  6833. $1=$2;
  6834. };
  6835. return $1;
  6836. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6837. }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.HLRequestWidget)});
  6838. //>>excludeEnd("ctx");
  6839. },
  6840. //>>excludeStart("ide", pragmas.excludeIdeData);
  6841. args: [],
  6842. source: "value\x0a\x09^ value ifNil: [ '' ]",
  6843. referencedClasses: [],
  6844. //>>excludeEnd("ide");
  6845. messageSends: ["ifNil:"]
  6846. }),
  6847. $globals.HLRequestWidget);
  6848. $core.addMethod(
  6849. $core.method({
  6850. selector: "value:",
  6851. protocol: 'accessing',
  6852. fn: function (aString){
  6853. var self=this;
  6854. self["@value"]=aString;
  6855. return self;
  6856. },
  6857. //>>excludeStart("ide", pragmas.excludeIdeData);
  6858. args: ["aString"],
  6859. source: "value: aString\x0a\x09value := aString",
  6860. referencedClasses: [],
  6861. //>>excludeEnd("ide");
  6862. messageSends: []
  6863. }),
  6864. $globals.HLRequestWidget);
  6865. $core.addClass('HLProgressWidget', $globals.HLModalWidget, ['progressBars', 'visible'], 'Helios-Core');
  6866. //>>excludeStart("ide", pragmas.excludeIdeData);
  6867. $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.";
  6868. //>>excludeEnd("ide");
  6869. $core.addMethod(
  6870. $core.method({
  6871. selector: "addProgressBar:",
  6872. protocol: 'actions',
  6873. fn: function (aProgressBar){
  6874. var self=this;
  6875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6876. return $core.withContext(function($ctx1) {
  6877. //>>excludeEnd("ctx");
  6878. self._show();
  6879. $recv(self._progressBars())._add_(aProgressBar);
  6880. $recv(aProgressBar)._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".dialog"));
  6881. return self;
  6882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6883. }, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  6884. //>>excludeEnd("ctx");
  6885. },
  6886. //>>excludeStart("ide", pragmas.excludeIdeData);
  6887. args: ["aProgressBar"],
  6888. source: "addProgressBar: aProgressBar\x0a\x09self show.\x0a\x09self progressBars add: aProgressBar.\x0a\x09aProgressBar appendToJQuery: (self wrapper asJQuery find: '.dialog')",
  6889. referencedClasses: [],
  6890. //>>excludeEnd("ide");
  6891. messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]
  6892. }),
  6893. $globals.HLProgressWidget);
  6894. $core.addMethod(
  6895. $core.method({
  6896. selector: "do:on:displaying:",
  6897. protocol: 'actions',
  6898. fn: function (aBlock,aCollection,aString){
  6899. var self=this;
  6900. var progressBar;
  6901. function $HLProgressBarWidget(){return $globals.HLProgressBarWidget||(typeof HLProgressBarWidget=="undefined"?nil:HLProgressBarWidget)}
  6902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6903. return $core.withContext(function($ctx1) {
  6904. //>>excludeEnd("ctx");
  6905. var $1,$2;
  6906. $1=$recv($HLProgressBarWidget())._new();
  6907. $recv($1)._parent_(self);
  6908. $recv($1)._label_(aString);
  6909. $recv($1)._workBlock_(aBlock);
  6910. $recv($1)._collection_(aCollection);
  6911. $2=$recv($1)._yourself();
  6912. progressBar=$2;
  6913. self._addProgressBar_(progressBar);
  6914. $recv(progressBar)._start();
  6915. return self;
  6916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6917. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},$globals.HLProgressWidget)});
  6918. //>>excludeEnd("ctx");
  6919. },
  6920. //>>excludeStart("ide", pragmas.excludeIdeData);
  6921. args: ["aBlock", "aCollection", "aString"],
  6922. 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",
  6923. referencedClasses: ["HLProgressBarWidget"],
  6924. //>>excludeEnd("ide");
  6925. messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]
  6926. }),
  6927. $globals.HLProgressWidget);
  6928. $core.addMethod(
  6929. $core.method({
  6930. selector: "flush",
  6931. protocol: 'actions',
  6932. fn: function (){
  6933. var self=this;
  6934. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6935. return $core.withContext(function($ctx1) {
  6936. //>>excludeEnd("ctx");
  6937. $recv(self._progressBars())._do_((function(each){
  6938. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6939. return $core.withContext(function($ctx2) {
  6940. //>>excludeEnd("ctx");
  6941. return self._removeProgressBar_(each);
  6942. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6943. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  6944. //>>excludeEnd("ctx");
  6945. }));
  6946. return self;
  6947. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6948. }, function($ctx1) {$ctx1.fill(self,"flush",{},$globals.HLProgressWidget)});
  6949. //>>excludeEnd("ctx");
  6950. },
  6951. //>>excludeStart("ide", pragmas.excludeIdeData);
  6952. args: [],
  6953. source: "flush\x0a\x09self progressBars do: [ :each |\x0a\x09\x09self removeProgressBar: each ]",
  6954. referencedClasses: [],
  6955. //>>excludeEnd("ide");
  6956. messageSends: ["do:", "progressBars", "removeProgressBar:"]
  6957. }),
  6958. $globals.HLProgressWidget);
  6959. $core.addMethod(
  6960. $core.method({
  6961. selector: "hasButtons",
  6962. protocol: 'testing',
  6963. fn: function (){
  6964. var self=this;
  6965. return false;
  6966. },
  6967. //>>excludeStart("ide", pragmas.excludeIdeData);
  6968. args: [],
  6969. source: "hasButtons\x0a\x09^ false",
  6970. referencedClasses: [],
  6971. //>>excludeEnd("ide");
  6972. messageSends: []
  6973. }),
  6974. $globals.HLProgressWidget);
  6975. $core.addMethod(
  6976. $core.method({
  6977. selector: "isVisible",
  6978. protocol: 'testing',
  6979. fn: function (){
  6980. var self=this;
  6981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6982. return $core.withContext(function($ctx1) {
  6983. //>>excludeEnd("ctx");
  6984. var $2,$1,$receiver;
  6985. $2=self["@visible"];
  6986. if(($receiver = $2) == null || $receiver.isNil){
  6987. $1=false;
  6988. } else {
  6989. $1=$2;
  6990. };
  6991. return $1;
  6992. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6993. }, function($ctx1) {$ctx1.fill(self,"isVisible",{},$globals.HLProgressWidget)});
  6994. //>>excludeEnd("ctx");
  6995. },
  6996. //>>excludeStart("ide", pragmas.excludeIdeData);
  6997. args: [],
  6998. source: "isVisible\x0a\x09^ visible ifNil: [ false ]",
  6999. referencedClasses: [],
  7000. //>>excludeEnd("ide");
  7001. messageSends: ["ifNil:"]
  7002. }),
  7003. $globals.HLProgressWidget);
  7004. $core.addMethod(
  7005. $core.method({
  7006. selector: "progressBars",
  7007. protocol: 'accessing',
  7008. fn: function (){
  7009. var self=this;
  7010. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  7011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7012. return $core.withContext(function($ctx1) {
  7013. //>>excludeEnd("ctx");
  7014. var $2,$1,$receiver;
  7015. $2=self["@progressBars"];
  7016. if(($receiver = $2) == null || $receiver.isNil){
  7017. self["@progressBars"]=$recv($OrderedCollection())._new();
  7018. $1=self["@progressBars"];
  7019. } else {
  7020. $1=$2;
  7021. };
  7022. return $1;
  7023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7024. }, function($ctx1) {$ctx1.fill(self,"progressBars",{},$globals.HLProgressWidget)});
  7025. //>>excludeEnd("ctx");
  7026. },
  7027. //>>excludeStart("ide", pragmas.excludeIdeData);
  7028. args: [],
  7029. source: "progressBars\x0a\x09^ progressBars ifNil: [ progressBars := OrderedCollection new ]",
  7030. referencedClasses: ["OrderedCollection"],
  7031. //>>excludeEnd("ide");
  7032. messageSends: ["ifNil:", "new"]
  7033. }),
  7034. $globals.HLProgressWidget);
  7035. $core.addMethod(
  7036. $core.method({
  7037. selector: "remove",
  7038. protocol: 'actions',
  7039. fn: function (){
  7040. var self=this;
  7041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7042. return $core.withContext(function($ctx1) {
  7043. //>>excludeEnd("ctx");
  7044. var $1;
  7045. $1=self._isVisible();
  7046. if($core.assert($1)){
  7047. self["@visible"]=false;
  7048. self["@visible"];
  7049. (
  7050. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7051. $ctx1.supercall = true,
  7052. //>>excludeEnd("ctx");
  7053. $globals.HLProgressWidget.superclass.fn.prototype._remove.apply($recv(self), []));
  7054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7055. $ctx1.supercall = false;
  7056. //>>excludeEnd("ctx");;
  7057. };
  7058. return self;
  7059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7060. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressWidget)});
  7061. //>>excludeEnd("ctx");
  7062. },
  7063. //>>excludeStart("ide", pragmas.excludeIdeData);
  7064. args: [],
  7065. source: "remove\x0a\x09self isVisible ifTrue: [\x0a\x09\x09visible := false.\x0a\x09\x09super remove ]",
  7066. referencedClasses: [],
  7067. //>>excludeEnd("ide");
  7068. messageSends: ["ifTrue:", "isVisible", "remove"]
  7069. }),
  7070. $globals.HLProgressWidget);
  7071. $core.addMethod(
  7072. $core.method({
  7073. selector: "removeProgressBar:",
  7074. protocol: 'actions',
  7075. fn: function (aProgressBar){
  7076. var self=this;
  7077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7078. return $core.withContext(function($ctx1) {
  7079. //>>excludeEnd("ctx");
  7080. var $1;
  7081. $1=self._progressBars();
  7082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7083. $ctx1.sendIdx["progressBars"]=1;
  7084. //>>excludeEnd("ctx");
  7085. $recv($1)._remove_ifAbsent_(aProgressBar,(function(){
  7086. }));
  7087. $recv($recv($recv(aProgressBar)._wrapper())._asJQuery())._remove();
  7088. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7089. $ctx1.sendIdx["remove"]=1;
  7090. //>>excludeEnd("ctx");
  7091. $recv(self._progressBars())._ifEmpty_((function(){
  7092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7093. return $core.withContext(function($ctx2) {
  7094. //>>excludeEnd("ctx");
  7095. return self._remove();
  7096. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7097. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7098. //>>excludeEnd("ctx");
  7099. }));
  7100. return self;
  7101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7102. }, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  7103. //>>excludeEnd("ctx");
  7104. },
  7105. //>>excludeStart("ide", pragmas.excludeIdeData);
  7106. args: ["aProgressBar"],
  7107. source: "removeProgressBar: aProgressBar\x0a\x09self progressBars remove: aProgressBar ifAbsent: [].\x0a\x09aProgressBar wrapper asJQuery remove.\x0a\x09\x0a\x09self progressBars ifEmpty: [ self remove ]",
  7108. referencedClasses: [],
  7109. //>>excludeEnd("ide");
  7110. messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]
  7111. }),
  7112. $globals.HLProgressWidget);
  7113. $core.addMethod(
  7114. $core.method({
  7115. selector: "renderMainOn:",
  7116. protocol: 'rendering',
  7117. fn: function (html){
  7118. var self=this;
  7119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7120. return $core.withContext(function($ctx1) {
  7121. //>>excludeEnd("ctx");
  7122. $recv(self._progressBars())._do_((function(each){
  7123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7124. return $core.withContext(function($ctx2) {
  7125. //>>excludeEnd("ctx");
  7126. return $recv(html)._with_(each);
  7127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7128. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7129. //>>excludeEnd("ctx");
  7130. }));
  7131. return self;
  7132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7133. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLProgressWidget)});
  7134. //>>excludeEnd("ctx");
  7135. },
  7136. //>>excludeStart("ide", pragmas.excludeIdeData);
  7137. args: ["html"],
  7138. source: "renderMainOn: html\x0a\x09self progressBars do: [ :each |\x0a\x09\x09html with: each ]",
  7139. referencedClasses: [],
  7140. //>>excludeEnd("ide");
  7141. messageSends: ["do:", "progressBars", "with:"]
  7142. }),
  7143. $globals.HLProgressWidget);
  7144. $core.addMethod(
  7145. $core.method({
  7146. selector: "show",
  7147. protocol: 'actions',
  7148. fn: function (){
  7149. var self=this;
  7150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7151. return $core.withContext(function($ctx1) {
  7152. //>>excludeEnd("ctx");
  7153. var $1;
  7154. $1=self._isVisible();
  7155. if(!$core.assert($1)){
  7156. self["@visible"]=true;
  7157. self["@visible"];
  7158. (
  7159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7160. $ctx1.supercall = true,
  7161. //>>excludeEnd("ctx");
  7162. $globals.HLProgressWidget.superclass.fn.prototype._show.apply($recv(self), []));
  7163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7164. $ctx1.supercall = false;
  7165. //>>excludeEnd("ctx");;
  7166. };
  7167. return self;
  7168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7169. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLProgressWidget)});
  7170. //>>excludeEnd("ctx");
  7171. },
  7172. //>>excludeStart("ide", pragmas.excludeIdeData);
  7173. args: [],
  7174. source: "show\x0a\x09self isVisible ifFalse: [\x0a\x09\x09visible := true.\x0a\x09\x09super show ]",
  7175. referencedClasses: [],
  7176. //>>excludeEnd("ide");
  7177. messageSends: ["ifFalse:", "isVisible", "show"]
  7178. }),
  7179. $globals.HLProgressWidget);
  7180. $globals.HLProgressWidget.klass.iVarNames = ['default'];
  7181. $core.addMethod(
  7182. $core.method({
  7183. selector: "default",
  7184. protocol: 'accessing',
  7185. fn: function (){
  7186. var self=this;
  7187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7188. return $core.withContext(function($ctx1) {
  7189. //>>excludeEnd("ctx");
  7190. var $2,$1,$receiver;
  7191. $2=self["@default"];
  7192. if(($receiver = $2) == null || $receiver.isNil){
  7193. self["@default"]=self._new();
  7194. $1=self["@default"];
  7195. } else {
  7196. $1=$2;
  7197. };
  7198. return $1;
  7199. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7200. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressWidget.klass)});
  7201. //>>excludeEnd("ctx");
  7202. },
  7203. //>>excludeStart("ide", pragmas.excludeIdeData);
  7204. args: [],
  7205. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  7206. referencedClasses: [],
  7207. //>>excludeEnd("ide");
  7208. messageSends: ["ifNil:", "new"]
  7209. }),
  7210. $globals.HLProgressWidget.klass);
  7211. $core.addClass('HLTabSelectionWidget', $globals.HLModalWidget, ['tabs', 'tabList', 'selectedTab', 'selectCallback', 'cancelCallback', 'confirmCallback'], 'Helios-Core');
  7212. //>>excludeStart("ide", pragmas.excludeIdeData);
  7213. $globals.HLTabSelectionWidget.comment="I am a modal window used to select or create tabs.";
  7214. //>>excludeEnd("ide");
  7215. $core.addMethod(
  7216. $core.method({
  7217. selector: "cancel",
  7218. protocol: 'actions',
  7219. fn: function (){
  7220. var self=this;
  7221. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7222. return $core.withContext(function($ctx1) {
  7223. //>>excludeEnd("ctx");
  7224. self._remove();
  7225. $recv(self._cancelCallback())._value();
  7226. return self;
  7227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7228. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLTabSelectionWidget)});
  7229. //>>excludeEnd("ctx");
  7230. },
  7231. //>>excludeStart("ide", pragmas.excludeIdeData);
  7232. args: [],
  7233. source: "cancel\x0a\x09self remove.\x0a\x09self cancelCallback value",
  7234. referencedClasses: [],
  7235. //>>excludeEnd("ide");
  7236. messageSends: ["remove", "value", "cancelCallback"]
  7237. }),
  7238. $globals.HLTabSelectionWidget);
  7239. $core.addMethod(
  7240. $core.method({
  7241. selector: "cancelCallback",
  7242. protocol: 'accessing',
  7243. fn: function (){
  7244. var self=this;
  7245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7246. return $core.withContext(function($ctx1) {
  7247. //>>excludeEnd("ctx");
  7248. var $2,$1,$receiver;
  7249. $2=self["@cancelCallback"];
  7250. if(($receiver = $2) == null || $receiver.isNil){
  7251. $1=(function(){
  7252. });
  7253. } else {
  7254. $1=$2;
  7255. };
  7256. return $1;
  7257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7258. }, function($ctx1) {$ctx1.fill(self,"cancelCallback",{},$globals.HLTabSelectionWidget)});
  7259. //>>excludeEnd("ctx");
  7260. },
  7261. //>>excludeStart("ide", pragmas.excludeIdeData);
  7262. args: [],
  7263. source: "cancelCallback\x0a\x09^ cancelCallback ifNil: [ [] ]",
  7264. referencedClasses: [],
  7265. //>>excludeEnd("ide");
  7266. messageSends: ["ifNil:"]
  7267. }),
  7268. $globals.HLTabSelectionWidget);
  7269. $core.addMethod(
  7270. $core.method({
  7271. selector: "cancelCallback:",
  7272. protocol: 'accessing',
  7273. fn: function (aBlock){
  7274. var self=this;
  7275. self["@cancelCallback"]=aBlock;
  7276. return self;
  7277. },
  7278. //>>excludeStart("ide", pragmas.excludeIdeData);
  7279. args: ["aBlock"],
  7280. source: "cancelCallback: aBlock\x0a\x09cancelCallback := aBlock",
  7281. referencedClasses: [],
  7282. //>>excludeEnd("ide");
  7283. messageSends: []
  7284. }),
  7285. $globals.HLTabSelectionWidget);
  7286. $core.addMethod(
  7287. $core.method({
  7288. selector: "confirm",
  7289. protocol: 'actions',
  7290. fn: function (){
  7291. var self=this;
  7292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7293. return $core.withContext(function($ctx1) {
  7294. //>>excludeEnd("ctx");
  7295. self._remove();
  7296. $recv(self._confirmCallback())._value_(self._selectedTab());
  7297. return self;
  7298. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7299. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLTabSelectionWidget)});
  7300. //>>excludeEnd("ctx");
  7301. },
  7302. //>>excludeStart("ide", pragmas.excludeIdeData);
  7303. args: [],
  7304. source: "confirm\x0a\x09self remove.\x0a\x09self confirmCallback value: self selectedTab",
  7305. referencedClasses: [],
  7306. //>>excludeEnd("ide");
  7307. messageSends: ["remove", "value:", "confirmCallback", "selectedTab"]
  7308. }),
  7309. $globals.HLTabSelectionWidget);
  7310. $core.addMethod(
  7311. $core.method({
  7312. selector: "confirmCallback",
  7313. protocol: 'accessing',
  7314. fn: function (){
  7315. var self=this;
  7316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7317. return $core.withContext(function($ctx1) {
  7318. //>>excludeEnd("ctx");
  7319. var $2,$1,$receiver;
  7320. $2=self["@confirmCallback"];
  7321. if(($receiver = $2) == null || $receiver.isNil){
  7322. $1=(function(){
  7323. });
  7324. } else {
  7325. $1=$2;
  7326. };
  7327. return $1;
  7328. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7329. }, function($ctx1) {$ctx1.fill(self,"confirmCallback",{},$globals.HLTabSelectionWidget)});
  7330. //>>excludeEnd("ctx");
  7331. },
  7332. //>>excludeStart("ide", pragmas.excludeIdeData);
  7333. args: [],
  7334. source: "confirmCallback\x0a\x09^ confirmCallback ifNil: [ [] ]",
  7335. referencedClasses: [],
  7336. //>>excludeEnd("ide");
  7337. messageSends: ["ifNil:"]
  7338. }),
  7339. $globals.HLTabSelectionWidget);
  7340. $core.addMethod(
  7341. $core.method({
  7342. selector: "confirmCallback:",
  7343. protocol: 'accessing',
  7344. fn: function (aBlock){
  7345. var self=this;
  7346. self["@confirmCallback"]=aBlock;
  7347. return self;
  7348. },
  7349. //>>excludeStart("ide", pragmas.excludeIdeData);
  7350. args: ["aBlock"],
  7351. source: "confirmCallback: aBlock\x0a\x09confirmCallback := aBlock",
  7352. referencedClasses: [],
  7353. //>>excludeEnd("ide");
  7354. messageSends: []
  7355. }),
  7356. $globals.HLTabSelectionWidget);
  7357. $core.addMethod(
  7358. $core.method({
  7359. selector: "renderButtonsOn:",
  7360. protocol: 'rendering',
  7361. fn: function (html){
  7362. var self=this;
  7363. var confirmButton;
  7364. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7365. return $core.withContext(function($ctx1) {
  7366. //>>excludeEnd("ctx");
  7367. var $1,$3,$4,$5,$6,$2;
  7368. $1=$recv(html)._div();
  7369. $recv($1)._class_("buttons");
  7370. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7371. $ctx1.sendIdx["class:"]=1;
  7372. //>>excludeEnd("ctx");
  7373. $2=$recv($1)._with_((function(){
  7374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7375. return $core.withContext(function($ctx2) {
  7376. //>>excludeEnd("ctx");
  7377. $3=$recv(html)._button();
  7378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7379. $ctx2.sendIdx["button"]=1;
  7380. //>>excludeEnd("ctx");
  7381. $recv($3)._class_("button");
  7382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7383. $ctx2.sendIdx["class:"]=2;
  7384. //>>excludeEnd("ctx");
  7385. $recv($3)._with_("Cancel");
  7386. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7387. $ctx2.sendIdx["with:"]=2;
  7388. //>>excludeEnd("ctx");
  7389. $4=$recv($3)._onClick_((function(){
  7390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7391. return $core.withContext(function($ctx3) {
  7392. //>>excludeEnd("ctx");
  7393. return self._cancel();
  7394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7395. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7396. //>>excludeEnd("ctx");
  7397. }));
  7398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7399. $ctx2.sendIdx["onClick:"]=1;
  7400. //>>excludeEnd("ctx");
  7401. $4;
  7402. $5=$recv(html)._button();
  7403. $recv($5)._class_("button default");
  7404. $recv($5)._with_("Select tab");
  7405. $6=$recv($5)._onClick_((function(){
  7406. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7407. return $core.withContext(function($ctx3) {
  7408. //>>excludeEnd("ctx");
  7409. return self._confirm();
  7410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7411. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  7412. //>>excludeEnd("ctx");
  7413. }));
  7414. confirmButton=$6;
  7415. return confirmButton;
  7416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7417. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7418. //>>excludeEnd("ctx");
  7419. }));
  7420. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7421. $ctx1.sendIdx["with:"]=1;
  7422. //>>excludeEnd("ctx");
  7423. self._giveFocusToButton_(confirmButton);
  7424. return self;
  7425. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7426. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLTabSelectionWidget)});
  7427. //>>excludeEnd("ctx");
  7428. },
  7429. //>>excludeStart("ide", pragmas.excludeIdeData);
  7430. args: ["html"],
  7431. 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",
  7432. referencedClasses: [],
  7433. //>>excludeEnd("ide");
  7434. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "giveFocusToButton:"]
  7435. }),
  7436. $globals.HLTabSelectionWidget);
  7437. $core.addMethod(
  7438. $core.method({
  7439. selector: "renderContentOn:",
  7440. protocol: 'rendering',
  7441. fn: function (html){
  7442. var self=this;
  7443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7444. return $core.withContext(function($ctx1) {
  7445. //>>excludeEnd("ctx");
  7446. (
  7447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7448. $ctx1.supercall = true,
  7449. //>>excludeEnd("ctx");
  7450. $globals.HLTabSelectionWidget.superclass.fn.prototype._renderContentOn_.apply($recv(self), [html]));
  7451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7452. $ctx1.supercall = false;
  7453. //>>excludeEnd("ctx");;
  7454. $recv(self._tabList())._focus();
  7455. return self;
  7456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7457. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabSelectionWidget)});
  7458. //>>excludeEnd("ctx");
  7459. },
  7460. //>>excludeStart("ide", pragmas.excludeIdeData);
  7461. args: ["html"],
  7462. source: "renderContentOn: html\x0a\x09super renderContentOn: html.\x0a\x09self tabList focus",
  7463. referencedClasses: [],
  7464. //>>excludeEnd("ide");
  7465. messageSends: ["renderContentOn:", "focus", "tabList"]
  7466. }),
  7467. $globals.HLTabSelectionWidget);
  7468. $core.addMethod(
  7469. $core.method({
  7470. selector: "renderMainOn:",
  7471. protocol: 'rendering',
  7472. fn: function (html){
  7473. var self=this;
  7474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7475. return $core.withContext(function($ctx1) {
  7476. //>>excludeEnd("ctx");
  7477. var $1,$2;
  7478. $1=$recv(html)._div();
  7479. $recv($1)._class_("title");
  7480. $2=$recv($1)._with_("Tab selection");
  7481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7482. $ctx1.sendIdx["with:"]=1;
  7483. //>>excludeEnd("ctx");
  7484. $recv(html)._with_(self._tabList());
  7485. return self;
  7486. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7487. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLTabSelectionWidget)});
  7488. //>>excludeEnd("ctx");
  7489. },
  7490. //>>excludeStart("ide", pragmas.excludeIdeData);
  7491. args: ["html"],
  7492. source: "renderMainOn: html\x0a\x09html div \x0a\x09\x09class: 'title'; \x0a\x09\x09with: 'Tab selection'.\x0a\x09\x0a\x09html with: self tabList",
  7493. referencedClasses: [],
  7494. //>>excludeEnd("ide");
  7495. messageSends: ["class:", "div", "with:", "tabList"]
  7496. }),
  7497. $globals.HLTabSelectionWidget);
  7498. $core.addMethod(
  7499. $core.method({
  7500. selector: "renderTab:on:",
  7501. protocol: 'rendering',
  7502. fn: function (aTab,html){
  7503. var self=this;
  7504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7505. return $core.withContext(function($ctx1) {
  7506. //>>excludeEnd("ctx");
  7507. var $1,$2;
  7508. $1=$recv(html)._span();
  7509. $recv($1)._class_($recv(aTab)._cssClass());
  7510. $2=$recv($1)._with_($recv(aTab)._label());
  7511. return self;
  7512. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7513. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html},$globals.HLTabSelectionWidget)});
  7514. //>>excludeEnd("ctx");
  7515. },
  7516. //>>excludeStart("ide", pragmas.excludeIdeData);
  7517. args: ["aTab", "html"],
  7518. source: "renderTab: aTab on: html\x0a\x09html \x0a\x09\x09span \x0a\x09\x09\x09class: aTab cssClass;\x0a\x09\x09\x09with: aTab label",
  7519. referencedClasses: [],
  7520. //>>excludeEnd("ide");
  7521. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  7522. }),
  7523. $globals.HLTabSelectionWidget);
  7524. $core.addMethod(
  7525. $core.method({
  7526. selector: "renderTabsOn:",
  7527. protocol: 'rendering',
  7528. fn: function (html){
  7529. var self=this;
  7530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7531. return $core.withContext(function($ctx1) {
  7532. //>>excludeEnd("ctx");
  7533. var $1,$2;
  7534. $recv(self._tabs())._do_((function(each){
  7535. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7536. return $core.withContext(function($ctx2) {
  7537. //>>excludeEnd("ctx");
  7538. return $recv($recv(html)._li())._with_((function(){
  7539. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7540. return $core.withContext(function($ctx3) {
  7541. //>>excludeEnd("ctx");
  7542. $1=$recv(html)._a();
  7543. $recv($1)._with_((function(){
  7544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7545. return $core.withContext(function($ctx4) {
  7546. //>>excludeEnd("ctx");
  7547. return self._renderTab_on_(each,html);
  7548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7549. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7550. //>>excludeEnd("ctx");
  7551. }));
  7552. $2=$recv($1)._onClick_((function(){
  7553. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7554. return $core.withContext(function($ctx4) {
  7555. //>>excludeEnd("ctx");
  7556. return self._selectTab_(each);
  7557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7558. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7559. //>>excludeEnd("ctx");
  7560. }));
  7561. return $2;
  7562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7563. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7564. //>>excludeEnd("ctx");
  7565. }));
  7566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7567. $ctx2.sendIdx["with:"]=1;
  7568. //>>excludeEnd("ctx");
  7569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7570. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7571. //>>excludeEnd("ctx");
  7572. }));
  7573. return self;
  7574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7575. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.HLTabSelectionWidget)});
  7576. //>>excludeEnd("ctx");
  7577. },
  7578. //>>excludeStart("ide", pragmas.excludeIdeData);
  7579. args: ["html"],
  7580. 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 ] ] ]",
  7581. referencedClasses: [],
  7582. //>>excludeEnd("ide");
  7583. messageSends: ["do:", "tabs", "with:", "li", "a", "renderTab:on:", "onClick:", "selectTab:"]
  7584. }),
  7585. $globals.HLTabSelectionWidget);
  7586. $core.addMethod(
  7587. $core.method({
  7588. selector: "selectCallback",
  7589. protocol: 'accessing',
  7590. fn: function (){
  7591. var self=this;
  7592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7593. return $core.withContext(function($ctx1) {
  7594. //>>excludeEnd("ctx");
  7595. var $2,$1,$receiver;
  7596. $2=self["@selectCallback"];
  7597. if(($receiver = $2) == null || $receiver.isNil){
  7598. $1=(function(){
  7599. });
  7600. } else {
  7601. $1=$2;
  7602. };
  7603. return $1;
  7604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7605. }, function($ctx1) {$ctx1.fill(self,"selectCallback",{},$globals.HLTabSelectionWidget)});
  7606. //>>excludeEnd("ctx");
  7607. },
  7608. //>>excludeStart("ide", pragmas.excludeIdeData);
  7609. args: [],
  7610. source: "selectCallback\x0a\x09^ selectCallback ifNil: [ [] ]",
  7611. referencedClasses: [],
  7612. //>>excludeEnd("ide");
  7613. messageSends: ["ifNil:"]
  7614. }),
  7615. $globals.HLTabSelectionWidget);
  7616. $core.addMethod(
  7617. $core.method({
  7618. selector: "selectCallback:",
  7619. protocol: 'accessing',
  7620. fn: function (aBlock){
  7621. var self=this;
  7622. self["@selectCallback"]=aBlock;
  7623. return self;
  7624. },
  7625. //>>excludeStart("ide", pragmas.excludeIdeData);
  7626. args: ["aBlock"],
  7627. source: "selectCallback: aBlock\x0a\x09selectCallback := aBlock",
  7628. referencedClasses: [],
  7629. //>>excludeEnd("ide");
  7630. messageSends: []
  7631. }),
  7632. $globals.HLTabSelectionWidget);
  7633. $core.addMethod(
  7634. $core.method({
  7635. selector: "selectTab:",
  7636. protocol: 'actions',
  7637. fn: function (aTab){
  7638. var self=this;
  7639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7640. return $core.withContext(function($ctx1) {
  7641. //>>excludeEnd("ctx");
  7642. self._selectedTab_(aTab);
  7643. $recv(self._selectCallback())._value_(aTab);
  7644. return self;
  7645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7646. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aTab:aTab},$globals.HLTabSelectionWidget)});
  7647. //>>excludeEnd("ctx");
  7648. },
  7649. //>>excludeStart("ide", pragmas.excludeIdeData);
  7650. args: ["aTab"],
  7651. source: "selectTab: aTab\x0a\x09self selectedTab: aTab.\x0a\x09self selectCallback value: aTab",
  7652. referencedClasses: [],
  7653. //>>excludeEnd("ide");
  7654. messageSends: ["selectedTab:", "value:", "selectCallback"]
  7655. }),
  7656. $globals.HLTabSelectionWidget);
  7657. $core.addMethod(
  7658. $core.method({
  7659. selector: "selectedTab",
  7660. protocol: 'accessing',
  7661. fn: function (){
  7662. var self=this;
  7663. var $1;
  7664. $1=self["@selectedTab"];
  7665. return $1;
  7666. },
  7667. //>>excludeStart("ide", pragmas.excludeIdeData);
  7668. args: [],
  7669. source: "selectedTab\x0a\x09^ selectedTab",
  7670. referencedClasses: [],
  7671. //>>excludeEnd("ide");
  7672. messageSends: []
  7673. }),
  7674. $globals.HLTabSelectionWidget);
  7675. $core.addMethod(
  7676. $core.method({
  7677. selector: "selectedTab:",
  7678. protocol: 'accessing',
  7679. fn: function (aTab){
  7680. var self=this;
  7681. self["@selectedTab"]=aTab;
  7682. return self;
  7683. },
  7684. //>>excludeStart("ide", pragmas.excludeIdeData);
  7685. args: ["aTab"],
  7686. source: "selectedTab: aTab\x0a\x09selectedTab := aTab",
  7687. referencedClasses: [],
  7688. //>>excludeEnd("ide");
  7689. messageSends: []
  7690. }),
  7691. $globals.HLTabSelectionWidget);
  7692. $core.addMethod(
  7693. $core.method({
  7694. selector: "setupKeyBindings",
  7695. protocol: 'actions',
  7696. fn: function (){
  7697. var self=this;
  7698. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  7699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7700. return $core.withContext(function($ctx1) {
  7701. //>>excludeEnd("ctx");
  7702. var $1;
  7703. (
  7704. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7705. $ctx1.supercall = true,
  7706. //>>excludeEnd("ctx");
  7707. $globals.HLTabSelectionWidget.superclass.fn.prototype._setupKeyBindings.apply($recv(self), []));
  7708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7709. $ctx1.supercall = false;
  7710. //>>excludeEnd("ctx");;
  7711. $recv(".dialog"._asJQuery())._keyup_((function(e){
  7712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7713. return $core.withContext(function($ctx2) {
  7714. //>>excludeEnd("ctx");
  7715. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($String())._cr())._asciiValue());
  7716. if($core.assert($1)){
  7717. return self._confirm();
  7718. };
  7719. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7720. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  7721. //>>excludeEnd("ctx");
  7722. }));
  7723. return self;
  7724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7725. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLTabSelectionWidget)});
  7726. //>>excludeEnd("ctx");
  7727. },
  7728. //>>excludeStart("ide", pragmas.excludeIdeData);
  7729. args: [],
  7730. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String cr asciiValue ifTrue: [ self confirm ] ]",
  7731. referencedClasses: ["String"],
  7732. //>>excludeEnd("ide");
  7733. messageSends: ["setupKeyBindings", "keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "cr", "confirm"]
  7734. }),
  7735. $globals.HLTabSelectionWidget);
  7736. $core.addMethod(
  7737. $core.method({
  7738. selector: "tabList",
  7739. protocol: 'rendering',
  7740. fn: function (){
  7741. var self=this;
  7742. function $HLTabListWidget(){return $globals.HLTabListWidget||(typeof HLTabListWidget=="undefined"?nil:HLTabListWidget)}
  7743. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7744. return $core.withContext(function($ctx1) {
  7745. //>>excludeEnd("ctx");
  7746. var $1,$2,$3,$4,$receiver;
  7747. $1=self["@tabList"];
  7748. if(($receiver = $1) == null || $receiver.isNil){
  7749. self["@tabList"]=$recv($HLTabListWidget())._new();
  7750. self["@tabList"];
  7751. $2=self["@tabList"];
  7752. $recv($2)._callback_((function(tab){
  7753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7754. return $core.withContext(function($ctx2) {
  7755. //>>excludeEnd("ctx");
  7756. self._selectTab_(tab);
  7757. return $recv(self["@tabList"])._focus();
  7758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7759. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  7760. //>>excludeEnd("ctx");
  7761. }));
  7762. $recv($2)._selectedItem_(self._selectedTab());
  7763. $3=$recv($2)._items_(self._tabs());
  7764. $3;
  7765. } else {
  7766. $1;
  7767. };
  7768. $4=self["@tabList"];
  7769. return $4;
  7770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7771. }, function($ctx1) {$ctx1.fill(self,"tabList",{},$globals.HLTabSelectionWidget)});
  7772. //>>excludeEnd("ctx");
  7773. },
  7774. //>>excludeStart("ide", pragmas.excludeIdeData);
  7775. args: [],
  7776. 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",
  7777. referencedClasses: ["HLTabListWidget"],
  7778. //>>excludeEnd("ide");
  7779. messageSends: ["ifNil:", "new", "callback:", "selectTab:", "focus", "selectedItem:", "selectedTab", "items:", "tabs"]
  7780. }),
  7781. $globals.HLTabSelectionWidget);
  7782. $core.addMethod(
  7783. $core.method({
  7784. selector: "tabs",
  7785. protocol: 'accessing',
  7786. fn: function (){
  7787. var self=this;
  7788. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7789. return $core.withContext(function($ctx1) {
  7790. //>>excludeEnd("ctx");
  7791. var $2,$1,$receiver;
  7792. $2=self["@tabs"];
  7793. if(($receiver = $2) == null || $receiver.isNil){
  7794. $1=[];
  7795. } else {
  7796. $1=$2;
  7797. };
  7798. return $1;
  7799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7800. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabSelectionWidget)});
  7801. //>>excludeEnd("ctx");
  7802. },
  7803. //>>excludeStart("ide", pragmas.excludeIdeData);
  7804. args: [],
  7805. source: "tabs\x0a\x09^ tabs ifNil: [ #() ]",
  7806. referencedClasses: [],
  7807. //>>excludeEnd("ide");
  7808. messageSends: ["ifNil:"]
  7809. }),
  7810. $globals.HLTabSelectionWidget);
  7811. $core.addMethod(
  7812. $core.method({
  7813. selector: "tabs:",
  7814. protocol: 'accessing',
  7815. fn: function (aCollection){
  7816. var self=this;
  7817. self["@tabs"]=aCollection;
  7818. return self;
  7819. },
  7820. //>>excludeStart("ide", pragmas.excludeIdeData);
  7821. args: ["aCollection"],
  7822. source: "tabs: aCollection\x0a\x09tabs := aCollection",
  7823. referencedClasses: [],
  7824. //>>excludeEnd("ide");
  7825. messageSends: []
  7826. }),
  7827. $globals.HLTabSelectionWidget);
  7828. $core.addClass('HLProgressBarWidget', $globals.HLWidget, ['label', 'parent', 'workBlock', 'collection', 'bar'], 'Helios-Core');
  7829. //>>excludeStart("ide", pragmas.excludeIdeData);
  7830. $globals.HLProgressBarWidget.comment="I am a widget used to display a progress bar while iterating over a collection.";
  7831. //>>excludeEnd("ide");
  7832. $core.addMethod(
  7833. $core.method({
  7834. selector: "collection",
  7835. protocol: 'accessing',
  7836. fn: function (){
  7837. var self=this;
  7838. var $1;
  7839. $1=self["@collection"];
  7840. return $1;
  7841. },
  7842. //>>excludeStart("ide", pragmas.excludeIdeData);
  7843. args: [],
  7844. source: "collection\x0a\x09^ collection",
  7845. referencedClasses: [],
  7846. //>>excludeEnd("ide");
  7847. messageSends: []
  7848. }),
  7849. $globals.HLProgressBarWidget);
  7850. $core.addMethod(
  7851. $core.method({
  7852. selector: "collection:",
  7853. protocol: 'accessing',
  7854. fn: function (aCollection){
  7855. var self=this;
  7856. self["@collection"]=aCollection;
  7857. return self;
  7858. },
  7859. //>>excludeStart("ide", pragmas.excludeIdeData);
  7860. args: ["aCollection"],
  7861. source: "collection: aCollection\x0a\x09collection := aCollection",
  7862. referencedClasses: [],
  7863. //>>excludeEnd("ide");
  7864. messageSends: []
  7865. }),
  7866. $globals.HLProgressBarWidget);
  7867. $core.addMethod(
  7868. $core.method({
  7869. selector: "evaluateAt:",
  7870. protocol: 'actions',
  7871. fn: function (anInteger){
  7872. var self=this;
  7873. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7874. return $core.withContext(function($ctx1) {
  7875. //>>excludeEnd("ctx");
  7876. var $4,$3,$2,$1,$7,$6,$5;
  7877. $4=self._collection();
  7878. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7879. $ctx1.sendIdx["collection"]=1;
  7880. //>>excludeEnd("ctx");
  7881. $3=$recv($4)._size();
  7882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7883. $ctx1.sendIdx["size"]=1;
  7884. //>>excludeEnd("ctx");
  7885. $2=$recv(anInteger).__slash($3);
  7886. $1=$recv($2).__star((100));
  7887. self._updateProgress_($1);
  7888. $7=self._collection();
  7889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7890. $ctx1.sendIdx["collection"]=2;
  7891. //>>excludeEnd("ctx");
  7892. $6=$recv($7)._size();
  7893. $5=$recv(anInteger).__lt_eq($6);
  7894. if($core.assert($5)){
  7895. $recv((function(){
  7896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7897. return $core.withContext(function($ctx2) {
  7898. //>>excludeEnd("ctx");
  7899. $recv(self._workBlock())._value_($recv(self._collection())._at_(anInteger));
  7900. return self._evaluateAt_($recv(anInteger).__plus((1)));
  7901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7902. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7903. //>>excludeEnd("ctx");
  7904. }))._valueWithTimeout_((10));
  7905. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7906. $ctx1.sendIdx["valueWithTimeout:"]=1;
  7907. //>>excludeEnd("ctx");
  7908. } else {
  7909. $recv((function(){
  7910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7911. return $core.withContext(function($ctx2) {
  7912. //>>excludeEnd("ctx");
  7913. return self._remove();
  7914. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7915. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  7916. //>>excludeEnd("ctx");
  7917. }))._valueWithTimeout_((500));
  7918. };
  7919. return self;
  7920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7921. }, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  7922. //>>excludeEnd("ctx");
  7923. },
  7924. //>>excludeStart("ide", pragmas.excludeIdeData);
  7925. args: ["anInteger"],
  7926. 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 ]",
  7927. referencedClasses: [],
  7928. //>>excludeEnd("ide");
  7929. messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "<=", "valueWithTimeout:", "value:", "workBlock", "at:", "evaluateAt:", "+", "remove"]
  7930. }),
  7931. $globals.HLProgressBarWidget);
  7932. $core.addMethod(
  7933. $core.method({
  7934. selector: "label",
  7935. protocol: 'accessing',
  7936. fn: function (){
  7937. var self=this;
  7938. var $1;
  7939. $1=self["@label"];
  7940. return $1;
  7941. },
  7942. //>>excludeStart("ide", pragmas.excludeIdeData);
  7943. args: [],
  7944. source: "label\x0a\x09^ label",
  7945. referencedClasses: [],
  7946. //>>excludeEnd("ide");
  7947. messageSends: []
  7948. }),
  7949. $globals.HLProgressBarWidget);
  7950. $core.addMethod(
  7951. $core.method({
  7952. selector: "label:",
  7953. protocol: 'accessing',
  7954. fn: function (aString){
  7955. var self=this;
  7956. self["@label"]=aString;
  7957. return self;
  7958. },
  7959. //>>excludeStart("ide", pragmas.excludeIdeData);
  7960. args: ["aString"],
  7961. source: "label: aString\x0a\x09label := aString",
  7962. referencedClasses: [],
  7963. //>>excludeEnd("ide");
  7964. messageSends: []
  7965. }),
  7966. $globals.HLProgressBarWidget);
  7967. $core.addMethod(
  7968. $core.method({
  7969. selector: "parent",
  7970. protocol: 'accessing',
  7971. fn: function (){
  7972. var self=this;
  7973. var $1;
  7974. $1=self["@parent"];
  7975. return $1;
  7976. },
  7977. //>>excludeStart("ide", pragmas.excludeIdeData);
  7978. args: [],
  7979. source: "parent\x0a\x09^ parent",
  7980. referencedClasses: [],
  7981. //>>excludeEnd("ide");
  7982. messageSends: []
  7983. }),
  7984. $globals.HLProgressBarWidget);
  7985. $core.addMethod(
  7986. $core.method({
  7987. selector: "parent:",
  7988. protocol: 'accessing',
  7989. fn: function (aProgress){
  7990. var self=this;
  7991. self["@parent"]=aProgress;
  7992. return self;
  7993. },
  7994. //>>excludeStart("ide", pragmas.excludeIdeData);
  7995. args: ["aProgress"],
  7996. source: "parent: aProgress\x0a\x09parent := aProgress",
  7997. referencedClasses: [],
  7998. //>>excludeEnd("ide");
  7999. messageSends: []
  8000. }),
  8001. $globals.HLProgressBarWidget);
  8002. $core.addMethod(
  8003. $core.method({
  8004. selector: "remove",
  8005. protocol: 'actions',
  8006. fn: function (){
  8007. var self=this;
  8008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8009. return $core.withContext(function($ctx1) {
  8010. //>>excludeEnd("ctx");
  8011. $recv(self._parent())._removeProgressBar_(self);
  8012. return self;
  8013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8014. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressBarWidget)});
  8015. //>>excludeEnd("ctx");
  8016. },
  8017. //>>excludeStart("ide", pragmas.excludeIdeData);
  8018. args: [],
  8019. source: "remove\x0a\x09self parent removeProgressBar: self",
  8020. referencedClasses: [],
  8021. //>>excludeEnd("ide");
  8022. messageSends: ["removeProgressBar:", "parent"]
  8023. }),
  8024. $globals.HLProgressBarWidget);
  8025. $core.addMethod(
  8026. $core.method({
  8027. selector: "renderContentOn:",
  8028. protocol: 'rendering',
  8029. fn: function (html){
  8030. var self=this;
  8031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8032. return $core.withContext(function($ctx1) {
  8033. //>>excludeEnd("ctx");
  8034. var $1,$3,$4,$2;
  8035. $recv($recv(html)._span())._with_(self._label());
  8036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8037. $ctx1.sendIdx["with:"]=1;
  8038. //>>excludeEnd("ctx");
  8039. $1=$recv(html)._div();
  8040. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8041. $ctx1.sendIdx["div"]=1;
  8042. //>>excludeEnd("ctx");
  8043. $recv($1)._class_("progress");
  8044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8045. $ctx1.sendIdx["class:"]=1;
  8046. //>>excludeEnd("ctx");
  8047. $2=$recv($1)._with_((function(){
  8048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8049. return $core.withContext(function($ctx2) {
  8050. //>>excludeEnd("ctx");
  8051. $3=$recv(html)._div();
  8052. $recv($3)._class_("bar");
  8053. $4=$recv($3)._style_("width: 0%");
  8054. self["@bar"]=$4;
  8055. return self["@bar"];
  8056. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8057. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8058. //>>excludeEnd("ctx");
  8059. }));
  8060. return self;
  8061. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8062. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLProgressBarWidget)});
  8063. //>>excludeEnd("ctx");
  8064. },
  8065. //>>excludeStart("ide", pragmas.excludeIdeData);
  8066. args: ["html"],
  8067. 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%' ]",
  8068. referencedClasses: [],
  8069. //>>excludeEnd("ide");
  8070. messageSends: ["with:", "span", "label", "class:", "div", "style:"]
  8071. }),
  8072. $globals.HLProgressBarWidget);
  8073. $core.addMethod(
  8074. $core.method({
  8075. selector: "start",
  8076. protocol: 'actions',
  8077. fn: function (){
  8078. var self=this;
  8079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8080. return $core.withContext(function($ctx1) {
  8081. //>>excludeEnd("ctx");
  8082. self._evaluateAt_((1));
  8083. return self;
  8084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8085. }, function($ctx1) {$ctx1.fill(self,"start",{},$globals.HLProgressBarWidget)});
  8086. //>>excludeEnd("ctx");
  8087. },
  8088. //>>excludeStart("ide", pragmas.excludeIdeData);
  8089. args: [],
  8090. source: "start\x0a\x09\x22Make sure the UI has some time to update itself between each iteration\x22\x0a\x09\x0a\x09self evaluateAt: 1",
  8091. referencedClasses: [],
  8092. //>>excludeEnd("ide");
  8093. messageSends: ["evaluateAt:"]
  8094. }),
  8095. $globals.HLProgressBarWidget);
  8096. $core.addMethod(
  8097. $core.method({
  8098. selector: "updateProgress:",
  8099. protocol: 'actions',
  8100. fn: function (anInteger){
  8101. var self=this;
  8102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8103. return $core.withContext(function($ctx1) {
  8104. //>>excludeEnd("ctx");
  8105. $recv($recv(self["@bar"])._asJQuery())._css_put_("width",$recv($recv(anInteger)._asString()).__comma("%"));
  8106. return self;
  8107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8108. }, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  8109. //>>excludeEnd("ctx");
  8110. },
  8111. //>>excludeStart("ide", pragmas.excludeIdeData);
  8112. args: ["anInteger"],
  8113. source: "updateProgress: anInteger\x0a\x09bar asJQuery css: 'width' put: anInteger asString, '%'",
  8114. referencedClasses: [],
  8115. //>>excludeEnd("ide");
  8116. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  8117. }),
  8118. $globals.HLProgressBarWidget);
  8119. $core.addMethod(
  8120. $core.method({
  8121. selector: "workBlock",
  8122. protocol: 'accessing',
  8123. fn: function (){
  8124. var self=this;
  8125. var $1;
  8126. $1=self["@workBlock"];
  8127. return $1;
  8128. },
  8129. //>>excludeStart("ide", pragmas.excludeIdeData);
  8130. args: [],
  8131. source: "workBlock\x0a\x09^ workBlock",
  8132. referencedClasses: [],
  8133. //>>excludeEnd("ide");
  8134. messageSends: []
  8135. }),
  8136. $globals.HLProgressBarWidget);
  8137. $core.addMethod(
  8138. $core.method({
  8139. selector: "workBlock:",
  8140. protocol: 'accessing',
  8141. fn: function (aBlock){
  8142. var self=this;
  8143. self["@workBlock"]=aBlock;
  8144. return self;
  8145. },
  8146. //>>excludeStart("ide", pragmas.excludeIdeData);
  8147. args: ["aBlock"],
  8148. source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
  8149. referencedClasses: [],
  8150. //>>excludeEnd("ide");
  8151. messageSends: []
  8152. }),
  8153. $globals.HLProgressBarWidget);
  8154. $globals.HLProgressBarWidget.klass.iVarNames = ['default'];
  8155. $core.addMethod(
  8156. $core.method({
  8157. selector: "default",
  8158. protocol: 'accessing',
  8159. fn: function (){
  8160. var self=this;
  8161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8162. return $core.withContext(function($ctx1) {
  8163. //>>excludeEnd("ctx");
  8164. var $2,$1,$receiver;
  8165. $2=self["@default"];
  8166. if(($receiver = $2) == null || $receiver.isNil){
  8167. self["@default"]=self._new();
  8168. $1=self["@default"];
  8169. } else {
  8170. $1=$2;
  8171. };
  8172. return $1;
  8173. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8174. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressBarWidget.klass)});
  8175. //>>excludeEnd("ctx");
  8176. },
  8177. //>>excludeStart("ide", pragmas.excludeIdeData);
  8178. args: [],
  8179. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  8180. referencedClasses: [],
  8181. //>>excludeEnd("ide");
  8182. messageSends: ["ifNil:", "new"]
  8183. }),
  8184. $globals.HLProgressBarWidget.klass);
  8185. $core.addClass('HLTabWidget', $globals.HLWidget, ['widget', 'label', 'root'], 'Helios-Core');
  8186. //>>excludeStart("ide", pragmas.excludeIdeData);
  8187. $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";
  8188. //>>excludeEnd("ide");
  8189. $core.addMethod(
  8190. $core.method({
  8191. selector: "activate",
  8192. protocol: 'accessing',
  8193. fn: function (){
  8194. var self=this;
  8195. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8196. return $core.withContext(function($ctx1) {
  8197. //>>excludeEnd("ctx");
  8198. $recv(self._manager())._activate_(self);
  8199. return self;
  8200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8201. }, function($ctx1) {$ctx1.fill(self,"activate",{},$globals.HLTabWidget)});
  8202. //>>excludeEnd("ctx");
  8203. },
  8204. //>>excludeStart("ide", pragmas.excludeIdeData);
  8205. args: [],
  8206. source: "activate\x0a\x09self manager activate: self",
  8207. referencedClasses: [],
  8208. //>>excludeEnd("ide");
  8209. messageSends: ["activate:", "manager"]
  8210. }),
  8211. $globals.HLTabWidget);
  8212. $core.addMethod(
  8213. $core.method({
  8214. selector: "add",
  8215. protocol: 'actions',
  8216. fn: function (){
  8217. var self=this;
  8218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8219. return $core.withContext(function($ctx1) {
  8220. //>>excludeEnd("ctx");
  8221. $recv(self._manager())._addTab_(self);
  8222. self._observeManager();
  8223. return self;
  8224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8225. }, function($ctx1) {$ctx1.fill(self,"add",{},$globals.HLTabWidget)});
  8226. //>>excludeEnd("ctx");
  8227. },
  8228. //>>excludeStart("ide", pragmas.excludeIdeData);
  8229. args: [],
  8230. source: "add\x0a\x09self manager addTab: self.\x0a\x09self observeManager",
  8231. referencedClasses: [],
  8232. //>>excludeEnd("ide");
  8233. messageSends: ["addTab:", "manager", "observeManager"]
  8234. }),
  8235. $globals.HLTabWidget);
  8236. $core.addMethod(
  8237. $core.method({
  8238. selector: "cssClass",
  8239. protocol: 'accessing',
  8240. fn: function (){
  8241. var self=this;
  8242. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8243. return $core.withContext(function($ctx1) {
  8244. //>>excludeEnd("ctx");
  8245. var $1;
  8246. $1=$recv(self._widget())._tabClass();
  8247. return $1;
  8248. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8249. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},$globals.HLTabWidget)});
  8250. //>>excludeEnd("ctx");
  8251. },
  8252. //>>excludeStart("ide", pragmas.excludeIdeData);
  8253. args: [],
  8254. source: "cssClass\x0a\x09^ self widget tabClass",
  8255. referencedClasses: [],
  8256. //>>excludeEnd("ide");
  8257. messageSends: ["tabClass", "widget"]
  8258. }),
  8259. $globals.HLTabWidget);
  8260. $core.addMethod(
  8261. $core.method({
  8262. selector: "focus",
  8263. protocol: 'accessing',
  8264. fn: function (){
  8265. var self=this;
  8266. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8267. return $core.withContext(function($ctx1) {
  8268. //>>excludeEnd("ctx");
  8269. var $2,$1;
  8270. $2=self._widget();
  8271. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8272. $ctx1.sendIdx["widget"]=1;
  8273. //>>excludeEnd("ctx");
  8274. $1=$recv($2)._canHaveFocus();
  8275. if($core.assert($1)){
  8276. $recv(self._widget())._focus();
  8277. };
  8278. return self;
  8279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8280. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLTabWidget)});
  8281. //>>excludeEnd("ctx");
  8282. },
  8283. //>>excludeStart("ide", pragmas.excludeIdeData);
  8284. args: [],
  8285. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  8286. referencedClasses: [],
  8287. //>>excludeEnd("ide");
  8288. messageSends: ["ifTrue:", "canHaveFocus", "widget", "focus"]
  8289. }),
  8290. $globals.HLTabWidget);
  8291. $core.addMethod(
  8292. $core.method({
  8293. selector: "hide",
  8294. protocol: 'actions',
  8295. fn: function (){
  8296. var self=this;
  8297. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8298. return $core.withContext(function($ctx1) {
  8299. //>>excludeEnd("ctx");
  8300. var $1,$receiver;
  8301. $1=self["@root"];
  8302. if(($receiver = $1) == null || $receiver.isNil){
  8303. $1;
  8304. } else {
  8305. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  8306. };
  8307. return self;
  8308. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8309. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.HLTabWidget)});
  8310. //>>excludeEnd("ctx");
  8311. },
  8312. //>>excludeStart("ide", pragmas.excludeIdeData);
  8313. args: [],
  8314. source: "hide\x0a\x09root ifNotNil: [ root asJQuery css: 'visibility' put: 'hidden' ]",
  8315. referencedClasses: [],
  8316. //>>excludeEnd("ide");
  8317. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]
  8318. }),
  8319. $globals.HLTabWidget);
  8320. $core.addMethod(
  8321. $core.method({
  8322. selector: "isActive",
  8323. protocol: 'testing',
  8324. fn: function (){
  8325. var self=this;
  8326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8327. return $core.withContext(function($ctx1) {
  8328. //>>excludeEnd("ctx");
  8329. var $1;
  8330. $1=$recv($recv(self._manager())._activeTab()).__eq(self);
  8331. return $1;
  8332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8333. }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLTabWidget)});
  8334. //>>excludeEnd("ctx");
  8335. },
  8336. //>>excludeStart("ide", pragmas.excludeIdeData);
  8337. args: [],
  8338. source: "isActive\x0a\x09^ self manager activeTab = self",
  8339. referencedClasses: [],
  8340. //>>excludeEnd("ide");
  8341. messageSends: ["=", "activeTab", "manager"]
  8342. }),
  8343. $globals.HLTabWidget);
  8344. $core.addMethod(
  8345. $core.method({
  8346. selector: "label",
  8347. protocol: 'accessing',
  8348. fn: function (){
  8349. var self=this;
  8350. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8351. return $core.withContext(function($ctx1) {
  8352. //>>excludeEnd("ctx");
  8353. var $2,$1,$receiver;
  8354. $2=self["@label"];
  8355. if(($receiver = $2) == null || $receiver.isNil){
  8356. $1="";
  8357. } else {
  8358. $1=$2;
  8359. };
  8360. return $1;
  8361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8362. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.HLTabWidget)});
  8363. //>>excludeEnd("ctx");
  8364. },
  8365. //>>excludeStart("ide", pragmas.excludeIdeData);
  8366. args: [],
  8367. source: "label\x0a\x09^ label ifNil: [ '' ]",
  8368. referencedClasses: [],
  8369. //>>excludeEnd("ide");
  8370. messageSends: ["ifNil:"]
  8371. }),
  8372. $globals.HLTabWidget);
  8373. $core.addMethod(
  8374. $core.method({
  8375. selector: "label:",
  8376. protocol: 'accessing',
  8377. fn: function (aString){
  8378. var self=this;
  8379. self["@label"]=aString;
  8380. return self;
  8381. },
  8382. //>>excludeStart("ide", pragmas.excludeIdeData);
  8383. args: ["aString"],
  8384. source: "label: aString\x0a\x09label := aString",
  8385. referencedClasses: [],
  8386. //>>excludeEnd("ide");
  8387. messageSends: []
  8388. }),
  8389. $globals.HLTabWidget);
  8390. $core.addMethod(
  8391. $core.method({
  8392. selector: "manager",
  8393. protocol: 'accessing',
  8394. fn: function (){
  8395. var self=this;
  8396. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  8397. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8398. return $core.withContext(function($ctx1) {
  8399. //>>excludeEnd("ctx");
  8400. var $1;
  8401. $1=$recv($HLManager())._current();
  8402. return $1;
  8403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8404. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLTabWidget)});
  8405. //>>excludeEnd("ctx");
  8406. },
  8407. //>>excludeStart("ide", pragmas.excludeIdeData);
  8408. args: [],
  8409. source: "manager\x0a\x09^ HLManager current",
  8410. referencedClasses: ["HLManager"],
  8411. //>>excludeEnd("ide");
  8412. messageSends: ["current"]
  8413. }),
  8414. $globals.HLTabWidget);
  8415. $core.addMethod(
  8416. $core.method({
  8417. selector: "observeManager",
  8418. protocol: 'actions',
  8419. fn: function (){
  8420. var self=this;
  8421. function $HLTabLabelChanged(){return $globals.HLTabLabelChanged||(typeof HLTabLabelChanged=="undefined"?nil:HLTabLabelChanged)}
  8422. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8423. return $core.withContext(function($ctx1) {
  8424. //>>excludeEnd("ctx");
  8425. $recv($recv(self._manager())._announcer())._on_send_to_($HLTabLabelChanged(),"onTabLabelChanged:",self);
  8426. return self;
  8427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8428. }, function($ctx1) {$ctx1.fill(self,"observeManager",{},$globals.HLTabWidget)});
  8429. //>>excludeEnd("ctx");
  8430. },
  8431. //>>excludeStart("ide", pragmas.excludeIdeData);
  8432. args: [],
  8433. source: "observeManager\x0a\x09self manager announcer \x0a\x09\x09on: HLTabLabelChanged\x0a\x09\x09send: #onTabLabelChanged:\x0a\x09\x09to: self",
  8434. referencedClasses: ["HLTabLabelChanged"],
  8435. //>>excludeEnd("ide");
  8436. messageSends: ["on:send:to:", "announcer", "manager"]
  8437. }),
  8438. $globals.HLTabWidget);
  8439. $core.addMethod(
  8440. $core.method({
  8441. selector: "onTabLabelChanged:",
  8442. protocol: 'reactions',
  8443. fn: function (anAnnouncement){
  8444. var self=this;
  8445. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8446. return $core.withContext(function($ctx1) {
  8447. //>>excludeEnd("ctx");
  8448. var $2,$1,$4,$5,$3;
  8449. $2=$recv(anAnnouncement)._widget();
  8450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8451. $ctx1.sendIdx["widget"]=1;
  8452. //>>excludeEnd("ctx");
  8453. $1=$recv($2).__eq(self._widget());
  8454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8455. $ctx1.sendIdx["="]=1;
  8456. //>>excludeEnd("ctx");
  8457. if($core.assert($1)){
  8458. $4=self._label();
  8459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8460. $ctx1.sendIdx["label"]=1;
  8461. //>>excludeEnd("ctx");
  8462. $5=$recv(anAnnouncement)._label();
  8463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8464. $ctx1.sendIdx["label"]=2;
  8465. //>>excludeEnd("ctx");
  8466. $3=$recv($4).__eq($5);
  8467. if(!$core.assert($3)){
  8468. self._label_($recv(anAnnouncement)._label());
  8469. $recv(self._manager())._refresh();
  8470. };
  8471. };
  8472. return self;
  8473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8474. }, function($ctx1) {$ctx1.fill(self,"onTabLabelChanged:",{anAnnouncement:anAnnouncement},$globals.HLTabWidget)});
  8475. //>>excludeEnd("ctx");
  8476. },
  8477. //>>excludeStart("ide", pragmas.excludeIdeData);
  8478. args: ["anAnnouncement"],
  8479. 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 ] ]",
  8480. referencedClasses: [],
  8481. //>>excludeEnd("ide");
  8482. messageSends: ["ifTrue:", "=", "widget", "ifFalse:", "label", "label:", "refresh", "manager"]
  8483. }),
  8484. $globals.HLTabWidget);
  8485. $core.addMethod(
  8486. $core.method({
  8487. selector: "registerBindings",
  8488. protocol: 'actions',
  8489. fn: function (){
  8490. var self=this;
  8491. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8492. return $core.withContext(function($ctx1) {
  8493. //>>excludeEnd("ctx");
  8494. $recv(self._widget())._registerBindings();
  8495. return self;
  8496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8497. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLTabWidget)});
  8498. //>>excludeEnd("ctx");
  8499. },
  8500. //>>excludeStart("ide", pragmas.excludeIdeData);
  8501. args: [],
  8502. source: "registerBindings\x0a\x09self widget registerBindings",
  8503. referencedClasses: [],
  8504. //>>excludeEnd("ide");
  8505. messageSends: ["registerBindings", "widget"]
  8506. }),
  8507. $globals.HLTabWidget);
  8508. $core.addMethod(
  8509. $core.method({
  8510. selector: "remove",
  8511. protocol: 'actions',
  8512. fn: function (){
  8513. var self=this;
  8514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8515. return $core.withContext(function($ctx1) {
  8516. //>>excludeEnd("ctx");
  8517. var $1,$receiver;
  8518. self._unregister();
  8519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8520. $ctx1.sendIdx["unregister"]=1;
  8521. //>>excludeEnd("ctx");
  8522. $recv(self._widget())._unregister();
  8523. $1=self["@root"];
  8524. if(($receiver = $1) == null || $receiver.isNil){
  8525. $1;
  8526. } else {
  8527. $recv($recv(self["@root"])._asJQuery())._remove();
  8528. };
  8529. return self;
  8530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8531. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLTabWidget)});
  8532. //>>excludeEnd("ctx");
  8533. },
  8534. //>>excludeStart("ide", pragmas.excludeIdeData);
  8535. args: [],
  8536. source: "remove\x0a\x09self unregister.\x0a\x09self widget unregister.\x0a\x09root ifNotNil: [ root asJQuery remove ]",
  8537. referencedClasses: [],
  8538. //>>excludeEnd("ide");
  8539. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"]
  8540. }),
  8541. $globals.HLTabWidget);
  8542. $core.addMethod(
  8543. $core.method({
  8544. selector: "renderOn:",
  8545. protocol: 'rendering',
  8546. fn: function (html){
  8547. var self=this;
  8548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8549. return $core.withContext(function($ctx1) {
  8550. //>>excludeEnd("ctx");
  8551. var $1,$2;
  8552. $1=$recv(html)._div();
  8553. $recv($1)._class_("tab");
  8554. $2=$recv($1)._yourself();
  8555. self["@root"]=$2;
  8556. self._renderTab();
  8557. return self;
  8558. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8559. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLTabWidget)});
  8560. //>>excludeEnd("ctx");
  8561. },
  8562. //>>excludeStart("ide", pragmas.excludeIdeData);
  8563. args: ["html"],
  8564. source: "renderOn: html\x0a\x09root := html div\x0a\x09\x09class: 'tab';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  8565. referencedClasses: [],
  8566. //>>excludeEnd("ide");
  8567. messageSends: ["class:", "div", "yourself", "renderTab"]
  8568. }),
  8569. $globals.HLTabWidget);
  8570. $core.addMethod(
  8571. $core.method({
  8572. selector: "renderTab",
  8573. protocol: 'rendering',
  8574. fn: function (){
  8575. var self=this;
  8576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8577. return $core.withContext(function($ctx1) {
  8578. //>>excludeEnd("ctx");
  8579. var $1,$2;
  8580. $recv(self["@root"])._contents_((function(html){
  8581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8582. return $core.withContext(function($ctx2) {
  8583. //>>excludeEnd("ctx");
  8584. $1=$recv(html)._div();
  8585. $recv($1)._class_("amber_box");
  8586. $2=$recv($1)._with_((function(){
  8587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8588. return $core.withContext(function($ctx3) {
  8589. //>>excludeEnd("ctx");
  8590. return $recv(self._widget())._renderOn_(html);
  8591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8592. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8593. //>>excludeEnd("ctx");
  8594. }));
  8595. return $2;
  8596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8597. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8598. //>>excludeEnd("ctx");
  8599. }));
  8600. return self;
  8601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8602. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.HLTabWidget)});
  8603. //>>excludeEnd("ctx");
  8604. },
  8605. //>>excludeStart("ide", pragmas.excludeIdeData);
  8606. args: [],
  8607. source: "renderTab\x0a\x09root contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'amber_box';\x0a\x09\x09\x09with: [ self widget renderOn: html ] ]",
  8608. referencedClasses: [],
  8609. //>>excludeEnd("ide");
  8610. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]
  8611. }),
  8612. $globals.HLTabWidget);
  8613. $core.addMethod(
  8614. $core.method({
  8615. selector: "show",
  8616. protocol: 'actions',
  8617. fn: function (){
  8618. var self=this;
  8619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8620. return $core.withContext(function($ctx1) {
  8621. //>>excludeEnd("ctx");
  8622. var $1,$2,$receiver;
  8623. $1=self["@root"];
  8624. if(($receiver = $1) == null || $receiver.isNil){
  8625. $2="body"._asJQuery();
  8626. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8627. $ctx1.sendIdx["asJQuery"]=1;
  8628. //>>excludeEnd("ctx");
  8629. self._appendToJQuery_($2);
  8630. } else {
  8631. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","visible");
  8632. };
  8633. return self;
  8634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8635. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLTabWidget)});
  8636. //>>excludeEnd("ctx");
  8637. },
  8638. //>>excludeStart("ide", pragmas.excludeIdeData);
  8639. args: [],
  8640. source: "show\x0a\x09root\x0a\x09\x09ifNil: [ self appendToJQuery: 'body' asJQuery ]\x0a\x09\x09ifNotNil: [ root asJQuery css: 'visibility' put: 'visible' ]",
  8641. referencedClasses: [],
  8642. //>>excludeEnd("ide");
  8643. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]
  8644. }),
  8645. $globals.HLTabWidget);
  8646. $core.addMethod(
  8647. $core.method({
  8648. selector: "unregister",
  8649. protocol: 'actions',
  8650. fn: function (){
  8651. var self=this;
  8652. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8653. return $core.withContext(function($ctx1) {
  8654. //>>excludeEnd("ctx");
  8655. $recv($recv(self._manager())._announcer())._unsubscribe_(self);
  8656. return self;
  8657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8658. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLTabWidget)});
  8659. //>>excludeEnd("ctx");
  8660. },
  8661. //>>excludeStart("ide", pragmas.excludeIdeData);
  8662. args: [],
  8663. source: "unregister\x0a\x09self manager announcer unsubscribe: self",
  8664. referencedClasses: [],
  8665. //>>excludeEnd("ide");
  8666. messageSends: ["unsubscribe:", "announcer", "manager"]
  8667. }),
  8668. $globals.HLTabWidget);
  8669. $core.addMethod(
  8670. $core.method({
  8671. selector: "widget",
  8672. protocol: 'accessing',
  8673. fn: function (){
  8674. var self=this;
  8675. var $1;
  8676. $1=self["@widget"];
  8677. return $1;
  8678. },
  8679. //>>excludeStart("ide", pragmas.excludeIdeData);
  8680. args: [],
  8681. source: "widget\x0a\x09^ widget",
  8682. referencedClasses: [],
  8683. //>>excludeEnd("ide");
  8684. messageSends: []
  8685. }),
  8686. $globals.HLTabWidget);
  8687. $core.addMethod(
  8688. $core.method({
  8689. selector: "widget:",
  8690. protocol: 'accessing',
  8691. fn: function (aWidget){
  8692. var self=this;
  8693. self["@widget"]=aWidget;
  8694. return self;
  8695. },
  8696. //>>excludeStart("ide", pragmas.excludeIdeData);
  8697. args: ["aWidget"],
  8698. source: "widget: aWidget\x0a\x09widget := aWidget",
  8699. referencedClasses: [],
  8700. //>>excludeEnd("ide");
  8701. messageSends: []
  8702. }),
  8703. $globals.HLTabWidget);
  8704. $core.addMethod(
  8705. $core.method({
  8706. selector: "on:labelled:",
  8707. protocol: 'instance creation',
  8708. fn: function (aWidget,aString){
  8709. var self=this;
  8710. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8711. return $core.withContext(function($ctx1) {
  8712. //>>excludeEnd("ctx");
  8713. var $2,$3,$1;
  8714. $2=self._new();
  8715. $recv($2)._widget_(aWidget);
  8716. $recv($2)._label_(aString);
  8717. $3=$recv($2)._yourself();
  8718. $1=$3;
  8719. return $1;
  8720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8721. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},$globals.HLTabWidget.klass)});
  8722. //>>excludeEnd("ctx");
  8723. },
  8724. //>>excludeStart("ide", pragmas.excludeIdeData);
  8725. args: ["aWidget", "aString"],
  8726. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  8727. referencedClasses: [],
  8728. //>>excludeEnd("ide");
  8729. messageSends: ["widget:", "new", "label:", "yourself"]
  8730. }),
  8731. $globals.HLTabWidget.klass);
  8732. $core.addClass('HLTabsWidget', $globals.HLWidget, ['tabs', 'activeTab', 'history', 'selectionDisabled'], 'Helios-Core');
  8733. $core.addMethod(
  8734. $core.method({
  8735. selector: "activate:",
  8736. protocol: 'actions',
  8737. fn: function (aTab){
  8738. var self=this;
  8739. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8740. return $core.withContext(function($ctx1) {
  8741. //>>excludeEnd("ctx");
  8742. var $1,$2;
  8743. $1=self._isSelectionDisabled();
  8744. if($core.assert($1)){
  8745. return self;
  8746. };
  8747. $recv($recv(self._manager())._keyBinder())._flushBindings();
  8748. $recv(aTab)._registerBindings();
  8749. self["@activeTab"]=aTab;
  8750. self._refresh();
  8751. self._addToHistory_(aTab);
  8752. $2=self._show_(aTab);
  8753. return self;
  8754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8755. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLTabsWidget)});
  8756. //>>excludeEnd("ctx");
  8757. },
  8758. //>>excludeStart("ide", pragmas.excludeIdeData);
  8759. args: ["aTab"],
  8760. 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",
  8761. referencedClasses: [],
  8762. //>>excludeEnd("ide");
  8763. messageSends: ["ifTrue:", "isSelectionDisabled", "flushBindings", "keyBinder", "manager", "registerBindings", "refresh", "addToHistory:", "show:"]
  8764. }),
  8765. $globals.HLTabsWidget);
  8766. $core.addMethod(
  8767. $core.method({
  8768. selector: "activateNextTab",
  8769. protocol: 'actions',
  8770. fn: function (){
  8771. var self=this;
  8772. var nextTab;
  8773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8774. return $core.withContext(function($ctx1) {
  8775. //>>excludeEnd("ctx");
  8776. var $1,$2,$5,$4,$3;
  8777. var $early={};
  8778. try {
  8779. $1=self._tabs();
  8780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8781. $ctx1.sendIdx["tabs"]=1;
  8782. //>>excludeEnd("ctx");
  8783. $recv($1)._ifEmpty_((function(){
  8784. throw $early=[self];
  8785. }));
  8786. $2=self._tabs();
  8787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8788. $ctx1.sendIdx["tabs"]=2;
  8789. //>>excludeEnd("ctx");
  8790. $5=self._tabs();
  8791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8792. $ctx1.sendIdx["tabs"]=3;
  8793. //>>excludeEnd("ctx");
  8794. $4=$recv($5)._indexOf_(self._activeTab());
  8795. $3=$recv($4).__plus((1));
  8796. nextTab=$recv($2)._at_ifAbsent_($3,(function(){
  8797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8798. return $core.withContext(function($ctx2) {
  8799. //>>excludeEnd("ctx");
  8800. return $recv(self._tabs())._first();
  8801. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8802. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8803. //>>excludeEnd("ctx");
  8804. }));
  8805. self._activate_(nextTab);
  8806. return self;
  8807. }
  8808. catch(e) {if(e===$early)return e[0]; throw e}
  8809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8810. }, function($ctx1) {$ctx1.fill(self,"activateNextTab",{nextTab:nextTab},$globals.HLTabsWidget)});
  8811. //>>excludeEnd("ctx");
  8812. },
  8813. //>>excludeStart("ide", pragmas.excludeIdeData);
  8814. args: [],
  8815. 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",
  8816. referencedClasses: [],
  8817. //>>excludeEnd("ide");
  8818. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "+", "indexOf:", "activeTab", "first", "activate:"]
  8819. }),
  8820. $globals.HLTabsWidget);
  8821. $core.addMethod(
  8822. $core.method({
  8823. selector: "activatePreviousTab",
  8824. protocol: 'actions',
  8825. fn: function (){
  8826. var self=this;
  8827. var previousTab;
  8828. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8829. return $core.withContext(function($ctx1) {
  8830. //>>excludeEnd("ctx");
  8831. var $1,$2,$5,$4,$3;
  8832. var $early={};
  8833. try {
  8834. $1=self._tabs();
  8835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8836. $ctx1.sendIdx["tabs"]=1;
  8837. //>>excludeEnd("ctx");
  8838. $recv($1)._ifEmpty_((function(){
  8839. throw $early=[self];
  8840. }));
  8841. $2=self._tabs();
  8842. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8843. $ctx1.sendIdx["tabs"]=2;
  8844. //>>excludeEnd("ctx");
  8845. $5=self._tabs();
  8846. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8847. $ctx1.sendIdx["tabs"]=3;
  8848. //>>excludeEnd("ctx");
  8849. $4=$recv($5)._indexOf_(self._activeTab());
  8850. $3=$recv($4).__minus((1));
  8851. previousTab=$recv($2)._at_ifAbsent_($3,(function(){
  8852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8853. return $core.withContext(function($ctx2) {
  8854. //>>excludeEnd("ctx");
  8855. return $recv(self._tabs())._last();
  8856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8857. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8858. //>>excludeEnd("ctx");
  8859. }));
  8860. self._activate_(previousTab);
  8861. return self;
  8862. }
  8863. catch(e) {if(e===$early)return e[0]; throw e}
  8864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8865. }, function($ctx1) {$ctx1.fill(self,"activatePreviousTab",{previousTab:previousTab},$globals.HLTabsWidget)});
  8866. //>>excludeEnd("ctx");
  8867. },
  8868. //>>excludeStart("ide", pragmas.excludeIdeData);
  8869. args: [],
  8870. 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",
  8871. referencedClasses: [],
  8872. //>>excludeEnd("ide");
  8873. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "-", "indexOf:", "activeTab", "last", "activate:"]
  8874. }),
  8875. $globals.HLTabsWidget);
  8876. $core.addMethod(
  8877. $core.method({
  8878. selector: "activeTab",
  8879. protocol: 'accessing',
  8880. fn: function (){
  8881. var self=this;
  8882. var $1;
  8883. $1=self["@activeTab"];
  8884. return $1;
  8885. },
  8886. //>>excludeStart("ide", pragmas.excludeIdeData);
  8887. args: [],
  8888. source: "activeTab\x0a\x09^ activeTab",
  8889. referencedClasses: [],
  8890. //>>excludeEnd("ide");
  8891. messageSends: []
  8892. }),
  8893. $globals.HLTabsWidget);
  8894. $core.addMethod(
  8895. $core.method({
  8896. selector: "addTab:",
  8897. protocol: 'actions',
  8898. fn: function (aTab){
  8899. var self=this;
  8900. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8901. return $core.withContext(function($ctx1) {
  8902. //>>excludeEnd("ctx");
  8903. $recv(self._tabs())._add_(aTab);
  8904. self._activate_(aTab);
  8905. return self;
  8906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8907. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLTabsWidget)});
  8908. //>>excludeEnd("ctx");
  8909. },
  8910. //>>excludeStart("ide", pragmas.excludeIdeData);
  8911. args: ["aTab"],
  8912. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  8913. referencedClasses: [],
  8914. //>>excludeEnd("ide");
  8915. messageSends: ["add:", "tabs", "activate:"]
  8916. }),
  8917. $globals.HLTabsWidget);
  8918. $core.addMethod(
  8919. $core.method({
  8920. selector: "addToHistory:",
  8921. protocol: 'actions',
  8922. fn: function (aTab){
  8923. var self=this;
  8924. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8925. return $core.withContext(function($ctx1) {
  8926. //>>excludeEnd("ctx");
  8927. self._removeFromHistory_(aTab);
  8928. $recv(self._history())._add_(aTab);
  8929. return self;
  8930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8931. }, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  8932. //>>excludeEnd("ctx");
  8933. },
  8934. //>>excludeStart("ide", pragmas.excludeIdeData);
  8935. args: ["aTab"],
  8936. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  8937. referencedClasses: [],
  8938. //>>excludeEnd("ide");
  8939. messageSends: ["removeFromHistory:", "add:", "history"]
  8940. }),
  8941. $globals.HLTabsWidget);
  8942. $core.addMethod(
  8943. $core.method({
  8944. selector: "disableSelection",
  8945. protocol: 'actions',
  8946. fn: function (){
  8947. var self=this;
  8948. self["@selectionDisabled"]=true;
  8949. return self;
  8950. },
  8951. //>>excludeStart("ide", pragmas.excludeIdeData);
  8952. args: [],
  8953. source: "disableSelection\x0a\x09selectionDisabled := true",
  8954. referencedClasses: [],
  8955. //>>excludeEnd("ide");
  8956. messageSends: []
  8957. }),
  8958. $globals.HLTabsWidget);
  8959. $core.addMethod(
  8960. $core.method({
  8961. selector: "enableSelection",
  8962. protocol: 'actions',
  8963. fn: function (){
  8964. var self=this;
  8965. self["@selectionDisabled"]=false;
  8966. return self;
  8967. },
  8968. //>>excludeStart("ide", pragmas.excludeIdeData);
  8969. args: [],
  8970. source: "enableSelection\x0a\x09selectionDisabled := false",
  8971. referencedClasses: [],
  8972. //>>excludeEnd("ide");
  8973. messageSends: []
  8974. }),
  8975. $globals.HLTabsWidget);
  8976. $core.addMethod(
  8977. $core.method({
  8978. selector: "history",
  8979. protocol: 'accessing',
  8980. fn: function (){
  8981. var self=this;
  8982. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  8983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8984. return $core.withContext(function($ctx1) {
  8985. //>>excludeEnd("ctx");
  8986. var $2,$1,$receiver;
  8987. $2=self["@history"];
  8988. if(($receiver = $2) == null || $receiver.isNil){
  8989. self["@history"]=$recv($OrderedCollection())._new();
  8990. $1=self["@history"];
  8991. } else {
  8992. $1=$2;
  8993. };
  8994. return $1;
  8995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8996. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLTabsWidget)});
  8997. //>>excludeEnd("ctx");
  8998. },
  8999. //>>excludeStart("ide", pragmas.excludeIdeData);
  9000. args: [],
  9001. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  9002. referencedClasses: ["OrderedCollection"],
  9003. //>>excludeEnd("ide");
  9004. messageSends: ["ifNil:", "new"]
  9005. }),
  9006. $globals.HLTabsWidget);
  9007. $core.addMethod(
  9008. $core.method({
  9009. selector: "history:",
  9010. protocol: 'accessing',
  9011. fn: function (aCollection){
  9012. var self=this;
  9013. self["@history"]=aCollection;
  9014. return self;
  9015. },
  9016. //>>excludeStart("ide", pragmas.excludeIdeData);
  9017. args: ["aCollection"],
  9018. source: "history: aCollection\x0a\x09history := aCollection",
  9019. referencedClasses: [],
  9020. //>>excludeEnd("ide");
  9021. messageSends: []
  9022. }),
  9023. $globals.HLTabsWidget);
  9024. $core.addMethod(
  9025. $core.method({
  9026. selector: "isSelectionDisabled",
  9027. protocol: 'testing',
  9028. fn: function (){
  9029. var self=this;
  9030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9031. return $core.withContext(function($ctx1) {
  9032. //>>excludeEnd("ctx");
  9033. var $2,$1,$receiver;
  9034. $2=self["@selectionDisabled"];
  9035. if(($receiver = $2) == null || $receiver.isNil){
  9036. $1=false;
  9037. } else {
  9038. $1=$2;
  9039. };
  9040. return $1;
  9041. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9042. }, function($ctx1) {$ctx1.fill(self,"isSelectionDisabled",{},$globals.HLTabsWidget)});
  9043. //>>excludeEnd("ctx");
  9044. },
  9045. //>>excludeStart("ide", pragmas.excludeIdeData);
  9046. args: [],
  9047. source: "isSelectionDisabled\x0a\x09^ selectionDisabled ifNil: [ false ]",
  9048. referencedClasses: [],
  9049. //>>excludeEnd("ide");
  9050. messageSends: ["ifNil:"]
  9051. }),
  9052. $globals.HLTabsWidget);
  9053. $core.addMethod(
  9054. $core.method({
  9055. selector: "removeActiveTab",
  9056. protocol: 'actions',
  9057. fn: function (){
  9058. var self=this;
  9059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9060. return $core.withContext(function($ctx1) {
  9061. //>>excludeEnd("ctx");
  9062. self._removeTab_(self._activeTab());
  9063. return self;
  9064. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9065. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLTabsWidget)});
  9066. //>>excludeEnd("ctx");
  9067. },
  9068. //>>excludeStart("ide", pragmas.excludeIdeData);
  9069. args: [],
  9070. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  9071. referencedClasses: [],
  9072. //>>excludeEnd("ide");
  9073. messageSends: ["removeTab:", "activeTab"]
  9074. }),
  9075. $globals.HLTabsWidget);
  9076. $core.addMethod(
  9077. $core.method({
  9078. selector: "removeFromHistory:",
  9079. protocol: 'actions',
  9080. fn: function (aTab){
  9081. var self=this;
  9082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9083. return $core.withContext(function($ctx1) {
  9084. //>>excludeEnd("ctx");
  9085. self._history_($recv(self._history())._reject_((function(each){
  9086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9087. return $core.withContext(function($ctx2) {
  9088. //>>excludeEnd("ctx");
  9089. return $recv(each).__eq_eq(aTab);
  9090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9091. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9092. //>>excludeEnd("ctx");
  9093. })));
  9094. return self;
  9095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9096. }, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9097. //>>excludeEnd("ctx");
  9098. },
  9099. //>>excludeStart("ide", pragmas.excludeIdeData);
  9100. args: ["aTab"],
  9101. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  9102. referencedClasses: [],
  9103. //>>excludeEnd("ide");
  9104. messageSends: ["history:", "reject:", "history", "=="]
  9105. }),
  9106. $globals.HLTabsWidget);
  9107. $core.addMethod(
  9108. $core.method({
  9109. selector: "removeTab:",
  9110. protocol: 'actions',
  9111. fn: function (aTab){
  9112. var self=this;
  9113. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9114. return $core.withContext(function($ctx1) {
  9115. //>>excludeEnd("ctx");
  9116. var $2,$1,$3;
  9117. $2=self._tabs();
  9118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9119. $ctx1.sendIdx["tabs"]=1;
  9120. //>>excludeEnd("ctx");
  9121. $1=$recv($2)._includes_(aTab);
  9122. if(!$core.assert($1)){
  9123. return self;
  9124. };
  9125. self._removeFromHistory_(aTab);
  9126. $recv(self._tabs())._remove_(aTab);
  9127. $recv($recv(self._manager())._keyBinder())._flushBindings();
  9128. $recv(aTab)._remove();
  9129. self._refresh();
  9130. $3=self._history();
  9131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9132. $ctx1.sendIdx["history"]=1;
  9133. //>>excludeEnd("ctx");
  9134. $recv($3)._ifNotEmpty_((function(){
  9135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9136. return $core.withContext(function($ctx2) {
  9137. //>>excludeEnd("ctx");
  9138. return $recv($recv(self._history())._last())._activate();
  9139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9140. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9141. //>>excludeEnd("ctx");
  9142. }));
  9143. return self;
  9144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9145. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9146. //>>excludeEnd("ctx");
  9147. },
  9148. //>>excludeStart("ide", pragmas.excludeIdeData);
  9149. args: ["aTab"],
  9150. 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 ]",
  9151. referencedClasses: [],
  9152. //>>excludeEnd("ide");
  9153. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "manager", "remove", "refresh", "ifNotEmpty:", "history", "activate", "last"]
  9154. }),
  9155. $globals.HLTabsWidget);
  9156. $core.addMethod(
  9157. $core.method({
  9158. selector: "removeTabForWidget:",
  9159. protocol: 'actions',
  9160. fn: function (aWidget){
  9161. var self=this;
  9162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9163. return $core.withContext(function($ctx1) {
  9164. //>>excludeEnd("ctx");
  9165. var $early={};
  9166. try {
  9167. self._removeTab_($recv(self._tabs())._detect_ifNone_((function(each){
  9168. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9169. return $core.withContext(function($ctx2) {
  9170. //>>excludeEnd("ctx");
  9171. return $recv($recv(each)._widget()).__eq(aWidget);
  9172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9173. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9174. //>>excludeEnd("ctx");
  9175. }),(function(){
  9176. throw $early=[self];
  9177. })));
  9178. return self;
  9179. }
  9180. catch(e) {if(e===$early)return e[0]; throw e}
  9181. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9182. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLTabsWidget)});
  9183. //>>excludeEnd("ctx");
  9184. },
  9185. //>>excludeStart("ide", pragmas.excludeIdeData);
  9186. args: ["aWidget"],
  9187. source: "removeTabForWidget: aWidget\x0a\x09self removeTab: (self tabs \x0a\x09\x09detect: [ :each | each widget = aWidget ]\x0a\x09\x09ifNone: [ ^ self ])",
  9188. referencedClasses: [],
  9189. //>>excludeEnd("ide");
  9190. messageSends: ["removeTab:", "detect:ifNone:", "tabs", "=", "widget"]
  9191. }),
  9192. $globals.HLTabsWidget);
  9193. $core.addMethod(
  9194. $core.method({
  9195. selector: "renderAddOn:",
  9196. protocol: 'rendering',
  9197. fn: function (html){
  9198. var self=this;
  9199. function $HLWidget(){return $globals.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  9200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9201. return $core.withContext(function($ctx1) {
  9202. //>>excludeEnd("ctx");
  9203. var $1,$3,$4,$5,$7,$8,$9,$6,$2;
  9204. $1=$recv(html)._div();
  9205. $recv($1)._class_("dropdown new_tab");
  9206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9207. $ctx1.sendIdx["class:"]=1;
  9208. //>>excludeEnd("ctx");
  9209. $2=$recv($1)._with_((function(){
  9210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9211. return $core.withContext(function($ctx2) {
  9212. //>>excludeEnd("ctx");
  9213. $3=$recv(html)._a();
  9214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9215. $ctx2.sendIdx["a"]=1;
  9216. //>>excludeEnd("ctx");
  9217. $recv($3)._class_("dropdown-toggle");
  9218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9219. $ctx2.sendIdx["class:"]=2;
  9220. //>>excludeEnd("ctx");
  9221. $recv($3)._at_put_("data-toggle","dropdown");
  9222. $4=$recv($3)._with_((function(){
  9223. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9224. return $core.withContext(function($ctx3) {
  9225. //>>excludeEnd("ctx");
  9226. return $recv($recv(html)._tag_("b"))._class_("caret");
  9227. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9228. $ctx3.sendIdx["class:"]=3;
  9229. //>>excludeEnd("ctx");
  9230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9231. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9232. //>>excludeEnd("ctx");
  9233. }));
  9234. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9235. $ctx2.sendIdx["with:"]=2;
  9236. //>>excludeEnd("ctx");
  9237. $4;
  9238. $5=$recv(html)._ul();
  9239. $recv($5)._class_("dropdown-menu");
  9240. $6=$recv($5)._with_((function(){
  9241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9242. return $core.withContext(function($ctx3) {
  9243. //>>excludeEnd("ctx");
  9244. return $recv($recv($recv($recv($HLWidget())._withAllSubclasses())._select_((function(each){
  9245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9246. return $core.withContext(function($ctx4) {
  9247. //>>excludeEnd("ctx");
  9248. return $recv(each)._canBeOpenAsTab();
  9249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9250. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,4)});
  9251. //>>excludeEnd("ctx");
  9252. })))._sorted_((function(a,b){
  9253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9254. return $core.withContext(function($ctx4) {
  9255. //>>excludeEnd("ctx");
  9256. $7=$recv(a)._tabPriority();
  9257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9258. $ctx4.sendIdx["tabPriority"]=1;
  9259. //>>excludeEnd("ctx");
  9260. return $recv($7).__lt($recv(b)._tabPriority());
  9261. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9262. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3,5)});
  9263. //>>excludeEnd("ctx");
  9264. })))._do_((function(each){
  9265. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9266. return $core.withContext(function($ctx4) {
  9267. //>>excludeEnd("ctx");
  9268. return $recv($recv(html)._li())._with_((function(){
  9269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9270. return $core.withContext(function($ctx5) {
  9271. //>>excludeEnd("ctx");
  9272. $8=$recv(html)._a();
  9273. $recv($8)._with_($recv(each)._tabLabel());
  9274. $9=$recv($8)._onClick_((function(){
  9275. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9276. return $core.withContext(function($ctx6) {
  9277. //>>excludeEnd("ctx");
  9278. return $recv(each)._openAsTab();
  9279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9280. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,8)});
  9281. //>>excludeEnd("ctx");
  9282. }));
  9283. return $9;
  9284. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9285. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9286. //>>excludeEnd("ctx");
  9287. }));
  9288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9289. $ctx4.sendIdx["with:"]=4;
  9290. //>>excludeEnd("ctx");
  9291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9292. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)});
  9293. //>>excludeEnd("ctx");
  9294. }));
  9295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9296. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  9297. //>>excludeEnd("ctx");
  9298. }));
  9299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9300. $ctx2.sendIdx["with:"]=3;
  9301. //>>excludeEnd("ctx");
  9302. return $6;
  9303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9304. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9305. //>>excludeEnd("ctx");
  9306. }));
  9307. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9308. $ctx1.sendIdx["with:"]=1;
  9309. //>>excludeEnd("ctx");
  9310. return self;
  9311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9312. }, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},$globals.HLTabsWidget)});
  9313. //>>excludeEnd("ctx");
  9314. },
  9315. //>>excludeStart("ide", pragmas.excludeIdeData);
  9316. args: ["html"],
  9317. 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 ] ] ] ] ]",
  9318. referencedClasses: ["HLWidget"],
  9319. //>>excludeEnd("ide");
  9320. messageSends: ["class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "li", "tabLabel", "onClick:", "openAsTab"]
  9321. }),
  9322. $globals.HLTabsWidget);
  9323. $core.addMethod(
  9324. $core.method({
  9325. selector: "renderContentOn:",
  9326. protocol: 'rendering',
  9327. fn: function (html){
  9328. var self=this;
  9329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9330. return $core.withContext(function($ctx1) {
  9331. //>>excludeEnd("ctx");
  9332. var $1,$3,$4,$2;
  9333. $1=$recv(html)._div();
  9334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9335. $ctx1.sendIdx["div"]=1;
  9336. //>>excludeEnd("ctx");
  9337. $recv($1)._class_("navbar navbar-fixed-top");
  9338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9339. $ctx1.sendIdx["class:"]=1;
  9340. //>>excludeEnd("ctx");
  9341. $2=$recv($1)._with_((function(){
  9342. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9343. return $core.withContext(function($ctx2) {
  9344. //>>excludeEnd("ctx");
  9345. $3=$recv(html)._div();
  9346. $recv($3)._class_("navbar-inner");
  9347. $4=$recv($3)._with_((function(){
  9348. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9349. return $core.withContext(function($ctx3) {
  9350. //>>excludeEnd("ctx");
  9351. return self._renderTabsOn_(html);
  9352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9353. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9354. //>>excludeEnd("ctx");
  9355. }));
  9356. return $4;
  9357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9358. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9359. //>>excludeEnd("ctx");
  9360. }));
  9361. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9362. $ctx1.sendIdx["with:"]=1;
  9363. //>>excludeEnd("ctx");
  9364. return self;
  9365. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9366. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabsWidget)});
  9367. //>>excludeEnd("ctx");
  9368. },
  9369. //>>excludeStart("ide", pragmas.excludeIdeData);
  9370. args: ["html"],
  9371. 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",
  9372. referencedClasses: [],
  9373. //>>excludeEnd("ide");
  9374. messageSends: ["class:", "div", "with:", "renderTabsOn:"]
  9375. }),
  9376. $globals.HLTabsWidget);
  9377. $core.addMethod(
  9378. $core.method({
  9379. selector: "renderTab:on:",
  9380. protocol: 'rendering',
  9381. fn: function (aTab,html){
  9382. var self=this;
  9383. var li;
  9384. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9385. return $core.withContext(function($ctx1) {
  9386. //>>excludeEnd("ctx");
  9387. var $1,$2,$3,$4,$6,$5,$7,$8,$9,$10,$11,$12;
  9388. $1=$recv(html)._li();
  9389. $2=$1;
  9390. $3=$recv("width: ".__comma($recv(self._tabWidth())._asString())).__comma("px");
  9391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9392. $ctx1.sendIdx[","]=1;
  9393. //>>excludeEnd("ctx");
  9394. $recv($2)._style_($3);
  9395. $4=$1;
  9396. $6=$recv(aTab)._isActive();
  9397. if($core.assert($6)){
  9398. $5="tab active";
  9399. } else {
  9400. $5="tab inactive";
  9401. };
  9402. $recv($4)._class_($5);
  9403. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9404. $ctx1.sendIdx["class:"]=1;
  9405. //>>excludeEnd("ctx");
  9406. $recv($1)._with_((function(){
  9407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9408. return $core.withContext(function($ctx2) {
  9409. //>>excludeEnd("ctx");
  9410. return $recv($recv(html)._a())._with_((function(){
  9411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9412. return $core.withContext(function($ctx3) {
  9413. //>>excludeEnd("ctx");
  9414. $7=$recv($recv(html)._tag_("i"))._class_("close");
  9415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9416. $ctx3.sendIdx["class:"]=2;
  9417. //>>excludeEnd("ctx");
  9418. $recv($7)._onClick_((function(){
  9419. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9420. return $core.withContext(function($ctx4) {
  9421. //>>excludeEnd("ctx");
  9422. return self._removeTab_(aTab);
  9423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9424. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9425. //>>excludeEnd("ctx");
  9426. }));
  9427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9428. $ctx3.sendIdx["onClick:"]=1;
  9429. //>>excludeEnd("ctx");
  9430. $8=$recv(html)._span();
  9431. $recv($8)._class_($recv(aTab)._cssClass());
  9432. $9=$8;
  9433. $10=$recv(aTab)._label();
  9434. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9435. $ctx3.sendIdx["label"]=1;
  9436. //>>excludeEnd("ctx");
  9437. $recv($9)._title_($10);
  9438. $11=$recv($8)._with_($recv(aTab)._label());
  9439. return $11;
  9440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9441. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9442. //>>excludeEnd("ctx");
  9443. }));
  9444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9445. $ctx2.sendIdx["with:"]=2;
  9446. //>>excludeEnd("ctx");
  9447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9448. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9449. //>>excludeEnd("ctx");
  9450. }));
  9451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9452. $ctx1.sendIdx["with:"]=1;
  9453. //>>excludeEnd("ctx");
  9454. $12=$recv($1)._onClick_((function(){
  9455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9456. return $core.withContext(function($ctx2) {
  9457. //>>excludeEnd("ctx");
  9458. return $recv(aTab)._activate();
  9459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9460. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9461. //>>excludeEnd("ctx");
  9462. }));
  9463. li=$12;
  9464. $recv($recv($recv(li)._asJQuery())._get_((0)))._at_put_("tab-data",aTab);
  9465. return self;
  9466. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9467. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html,li:li},$globals.HLTabsWidget)});
  9468. //>>excludeEnd("ctx");
  9469. },
  9470. //>>excludeStart("ide", pragmas.excludeIdeData);
  9471. args: ["aTab", "html"],
  9472. 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",
  9473. referencedClasses: [],
  9474. //>>excludeEnd("ide");
  9475. messageSends: ["style:", "li", ",", "asString", "tabWidth", "class:", "ifTrue:ifFalse:", "isActive", "with:", "a", "onClick:", "tag:", "removeTab:", "span", "cssClass", "title:", "label", "activate", "at:put:", "get:", "asJQuery"]
  9476. }),
  9477. $globals.HLTabsWidget);
  9478. $core.addMethod(
  9479. $core.method({
  9480. selector: "renderTabsOn:",
  9481. protocol: 'rendering',
  9482. fn: function (html){
  9483. var self=this;
  9484. var ul;
  9485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9486. return $core.withContext(function($ctx1) {
  9487. //>>excludeEnd("ctx");
  9488. var $1,$2;
  9489. $1=$recv(html)._ul();
  9490. $recv($1)._class_("nav main-tabs");
  9491. $2=$recv($1)._with_((function(){
  9492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9493. return $core.withContext(function($ctx2) {
  9494. //>>excludeEnd("ctx");
  9495. return $recv(self._tabs())._do_((function(each){
  9496. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9497. return $core.withContext(function($ctx3) {
  9498. //>>excludeEnd("ctx");
  9499. return self._renderTab_on_(each,html);
  9500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9501. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  9502. //>>excludeEnd("ctx");
  9503. }));
  9504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9505. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9506. //>>excludeEnd("ctx");
  9507. }));
  9508. ul=$2;
  9509. $recv($recv(ul)._asJQuery())._sortable_($globals.HashedCollection._newFromPairs_(["containment","parent","start",(function(){
  9510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9511. return $core.withContext(function($ctx2) {
  9512. //>>excludeEnd("ctx");
  9513. return self._disableSelection();
  9514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9515. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9516. //>>excludeEnd("ctx");
  9517. }),"stop",(function(){
  9518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9519. return $core.withContext(function($ctx2) {
  9520. //>>excludeEnd("ctx");
  9521. return $recv((function(){
  9522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9523. return $core.withContext(function($ctx3) {
  9524. //>>excludeEnd("ctx");
  9525. return self._enableSelection();
  9526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9527. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  9528. //>>excludeEnd("ctx");
  9529. }))._valueWithTimeout_((300));
  9530. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9531. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  9532. //>>excludeEnd("ctx");
  9533. }),"update",(function(){
  9534. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9535. return $core.withContext(function($ctx2) {
  9536. //>>excludeEnd("ctx");
  9537. return self._updateTabsOrder();
  9538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9539. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9540. //>>excludeEnd("ctx");
  9541. })]));
  9542. return self;
  9543. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9544. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html,ul:ul},$globals.HLTabsWidget)});
  9545. //>>excludeEnd("ctx");
  9546. },
  9547. //>>excludeStart("ide", pragmas.excludeIdeData);
  9548. args: ["html"],
  9549. 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}",
  9550. referencedClasses: [],
  9551. //>>excludeEnd("ide");
  9552. messageSends: ["class:", "ul", "with:", "do:", "tabs", "renderTab:on:", "sortable:", "asJQuery", "disableSelection", "valueWithTimeout:", "enableSelection", "updateTabsOrder"]
  9553. }),
  9554. $globals.HLTabsWidget);
  9555. $core.addMethod(
  9556. $core.method({
  9557. selector: "setupEvents",
  9558. protocol: 'private',
  9559. fn: function (){
  9560. var self=this;
  9561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9562. return $core.withContext(function($ctx1) {
  9563. //>>excludeEnd("ctx");
  9564. var $2,$3,$1,$4;
  9565. $recv("body"._asJQuery())._keydown_((function(event){
  9566. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9567. return $core.withContext(function($ctx2) {
  9568. //>>excludeEnd("ctx");
  9569. $2=$recv(event)._ctrlKey();
  9570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9571. $ctx2.sendIdx["ctrlKey"]=1;
  9572. //>>excludeEnd("ctx");
  9573. $1=$recv($2)._and_((function(){
  9574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9575. return $core.withContext(function($ctx3) {
  9576. //>>excludeEnd("ctx");
  9577. $3=$recv(event)._which();
  9578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9579. $ctx3.sendIdx["which"]=1;
  9580. //>>excludeEnd("ctx");
  9581. return $recv($3).__eq((188));
  9582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9583. $ctx3.sendIdx["="]=1;
  9584. //>>excludeEnd("ctx");
  9585. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9586. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9587. //>>excludeEnd("ctx");
  9588. }));
  9589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9590. $ctx2.sendIdx["and:"]=1;
  9591. //>>excludeEnd("ctx");
  9592. if($core.assert($1)){
  9593. self._activatePreviousTab();
  9594. $recv(event)._preventDefault();
  9595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9596. $ctx2.sendIdx["preventDefault"]=1;
  9597. //>>excludeEnd("ctx");
  9598. };
  9599. $4=$recv($recv(event)._ctrlKey())._and_((function(){
  9600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9601. return $core.withContext(function($ctx3) {
  9602. //>>excludeEnd("ctx");
  9603. return $recv($recv(event)._which()).__eq((190));
  9604. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9605. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9606. //>>excludeEnd("ctx");
  9607. }));
  9608. if($core.assert($4)){
  9609. self._activateNextTab();
  9610. return $recv(event)._preventDefault();
  9611. };
  9612. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9613. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  9614. //>>excludeEnd("ctx");
  9615. }));
  9616. return self;
  9617. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9618. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLTabsWidget)});
  9619. //>>excludeEnd("ctx");
  9620. },
  9621. //>>excludeStart("ide", pragmas.excludeIdeData);
  9622. args: [],
  9623. 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 ] ]",
  9624. referencedClasses: [],
  9625. //>>excludeEnd("ide");
  9626. messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", "ctrlKey", "=", "which", "activatePreviousTab", "preventDefault", "activateNextTab"]
  9627. }),
  9628. $globals.HLTabsWidget);
  9629. $core.addMethod(
  9630. $core.method({
  9631. selector: "show:",
  9632. protocol: 'rendering',
  9633. fn: function (aTab){
  9634. var self=this;
  9635. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9636. return $core.withContext(function($ctx1) {
  9637. //>>excludeEnd("ctx");
  9638. var $1;
  9639. $recv(self._tabs())._do_((function(each){
  9640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9641. return $core.withContext(function($ctx2) {
  9642. //>>excludeEnd("ctx");
  9643. return $recv(each)._hide();
  9644. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9645. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9646. //>>excludeEnd("ctx");
  9647. }));
  9648. $recv(aTab)._show();
  9649. $1=$recv(aTab)._focus();
  9650. return self;
  9651. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9652. }, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},$globals.HLTabsWidget)});
  9653. //>>excludeEnd("ctx");
  9654. },
  9655. //>>excludeStart("ide", pragmas.excludeIdeData);
  9656. args: ["aTab"],
  9657. source: "show: aTab\x0a\x09self tabs do: [ :each | each hide ].\x0a\x09aTab show; focus",
  9658. referencedClasses: [],
  9659. //>>excludeEnd("ide");
  9660. messageSends: ["do:", "tabs", "hide", "show", "focus"]
  9661. }),
  9662. $globals.HLTabsWidget);
  9663. $core.addMethod(
  9664. $core.method({
  9665. selector: "tabWidth",
  9666. protocol: 'accessing',
  9667. fn: function (){
  9668. var self=this;
  9669. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9670. return $core.withContext(function($ctx1) {
  9671. //>>excludeEnd("ctx");
  9672. var $1;
  9673. $1=$recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  9674. return $1;
  9675. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9676. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLTabsWidget)});
  9677. //>>excludeEnd("ctx");
  9678. },
  9679. //>>excludeStart("ide", pragmas.excludeIdeData);
  9680. args: [],
  9681. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  9682. referencedClasses: [],
  9683. //>>excludeEnd("ide");
  9684. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  9685. }),
  9686. $globals.HLTabsWidget);
  9687. $core.addMethod(
  9688. $core.method({
  9689. selector: "tabs",
  9690. protocol: 'accessing',
  9691. fn: function (){
  9692. var self=this;
  9693. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  9694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9695. return $core.withContext(function($ctx1) {
  9696. //>>excludeEnd("ctx");
  9697. var $2,$1,$receiver;
  9698. $2=self["@tabs"];
  9699. if(($receiver = $2) == null || $receiver.isNil){
  9700. self["@tabs"]=$recv($OrderedCollection())._new();
  9701. $1=self["@tabs"];
  9702. } else {
  9703. $1=$2;
  9704. };
  9705. return $1;
  9706. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9707. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabsWidget)});
  9708. //>>excludeEnd("ctx");
  9709. },
  9710. //>>excludeStart("ide", pragmas.excludeIdeData);
  9711. args: [],
  9712. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  9713. referencedClasses: ["OrderedCollection"],
  9714. //>>excludeEnd("ide");
  9715. messageSends: ["ifNil:", "new"]
  9716. }),
  9717. $globals.HLTabsWidget);
  9718. $core.addMethod(
  9719. $core.method({
  9720. selector: "updateTabsOrder",
  9721. protocol: 'actions',
  9722. fn: function (){
  9723. var self=this;
  9724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9725. return $core.withContext(function($ctx1) {
  9726. //>>excludeEnd("ctx");
  9727. self["@tabs"]=$recv($recv(".main-tabs li"._asJQuery())._toArray())._collect_((function(each){
  9728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9729. return $core.withContext(function($ctx2) {
  9730. //>>excludeEnd("ctx");
  9731. return $recv(each)._at_("tab-data");
  9732. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9733. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9734. //>>excludeEnd("ctx");
  9735. }));
  9736. return self;
  9737. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9738. }, function($ctx1) {$ctx1.fill(self,"updateTabsOrder",{},$globals.HLTabsWidget)});
  9739. //>>excludeEnd("ctx");
  9740. },
  9741. //>>excludeStart("ide", pragmas.excludeIdeData);
  9742. args: [],
  9743. source: "updateTabsOrder\x0a\x09tabs := '.main-tabs li' asJQuery toArray \x0a\x09\x09collect: [ :each | each at: 'tab-data' ]",
  9744. referencedClasses: [],
  9745. //>>excludeEnd("ide");
  9746. messageSends: ["collect:", "toArray", "asJQuery", "at:"]
  9747. }),
  9748. $globals.HLTabsWidget);
  9749. $globals.HLTabsWidget.klass.iVarNames = ['current'];
  9750. $core.addClass('HLTopBarWidget', $globals.HLWidget, ['inputView'], 'Helios-Core');
  9751. $core.addMethod(
  9752. $core.method({
  9753. selector: "onSearchKeyUp:",
  9754. protocol: 'reactions',
  9755. fn: function (anEvent){
  9756. var self=this;
  9757. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9758. return $core.withContext(function($ctx1) {
  9759. //>>excludeEnd("ctx");
  9760. var $1;
  9761. $1=$recv($recv(anEvent)._keyCode()).__eq((13));
  9762. if($core.assert($1)){
  9763. self._search_($recv($recv(self["@inputView"])._asJQuery())._val());
  9764. };
  9765. return self;
  9766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9767. }, function($ctx1) {$ctx1.fill(self,"onSearchKeyUp:",{anEvent:anEvent},$globals.HLTopBarWidget)});
  9768. //>>excludeEnd("ctx");
  9769. },
  9770. //>>excludeStart("ide", pragmas.excludeIdeData);
  9771. args: ["anEvent"],
  9772. source: "onSearchKeyUp: anEvent\x0a\x0a\x09anEvent keyCode = 13 ifTrue:[\x0a\x09\x09self search: inputView asJQuery val ]",
  9773. referencedClasses: [],
  9774. //>>excludeEnd("ide");
  9775. messageSends: ["ifTrue:", "=", "keyCode", "search:", "val", "asJQuery"]
  9776. }),
  9777. $globals.HLTopBarWidget);
  9778. $core.addMethod(
  9779. $core.method({
  9780. selector: "renderContentOn:",
  9781. protocol: 'rendering',
  9782. fn: function (html){
  9783. var self=this;
  9784. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  9785. function $HLWorkspace(){return $globals.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  9786. function $HLSUnit(){return $globals.HLSUnit||(typeof HLSUnit=="undefined"?nil:HLSUnit)}
  9787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9788. return $core.withContext(function($ctx1) {
  9789. //>>excludeEnd("ctx");
  9790. var $1,$3,$4,$5,$6,$8,$9,$10,$11,$12,$13,$7,$2;
  9791. $1=$recv(html)._div();
  9792. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9793. $ctx1.sendIdx["div"]=1;
  9794. //>>excludeEnd("ctx");
  9795. $recv($1)._class_("toolbar");
  9796. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9797. $ctx1.sendIdx["class:"]=1;
  9798. //>>excludeEnd("ctx");
  9799. $2=$recv($1)._with_((function(){
  9800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9801. return $core.withContext(function($ctx2) {
  9802. //>>excludeEnd("ctx");
  9803. $3=$recv(html)._div();
  9804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9805. $ctx2.sendIdx["div"]=2;
  9806. //>>excludeEnd("ctx");
  9807. return $recv($3)._with_((function(){
  9808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9809. return $core.withContext(function($ctx3) {
  9810. //>>excludeEnd("ctx");
  9811. $4=$recv(html)._input();
  9812. $recv($4)._class_("search");
  9813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9814. $ctx3.sendIdx["class:"]=2;
  9815. //>>excludeEnd("ctx");
  9816. $recv($4)._at_put_("placeholder","Search classes, senders and more..");
  9817. $recv($4)._onKeyUp_((function(ev){
  9818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9819. return $core.withContext(function($ctx4) {
  9820. //>>excludeEnd("ctx");
  9821. return self._onSearchKeyUp_(ev);
  9822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9823. }, function($ctx4) {$ctx4.fillBlock({ev:ev},$ctx3,3)});
  9824. //>>excludeEnd("ctx");
  9825. }));
  9826. $5=$recv($4)._value_("");
  9827. self["@inputView"]=$5;
  9828. self["@inputView"];
  9829. $6=$recv(html)._div();
  9830. $recv($6)._class_("buttons_bar");
  9831. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9832. $ctx3.sendIdx["class:"]=3;
  9833. //>>excludeEnd("ctx");
  9834. $7=$recv($6)._with_((function(){
  9835. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9836. return $core.withContext(function($ctx4) {
  9837. //>>excludeEnd("ctx");
  9838. $8=$recv(html)._button();
  9839. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9840. $ctx4.sendIdx["button"]=1;
  9841. //>>excludeEnd("ctx");
  9842. $recv($8)._class_("button");
  9843. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9844. $ctx4.sendIdx["class:"]=4;
  9845. //>>excludeEnd("ctx");
  9846. $recv($8)._onClick_((function(){
  9847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9848. return $core.withContext(function($ctx5) {
  9849. //>>excludeEnd("ctx");
  9850. return $recv($HLBrowser())._openAsTab();
  9851. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9852. $ctx5.sendIdx["openAsTab"]=1;
  9853. //>>excludeEnd("ctx");
  9854. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9855. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,5)});
  9856. //>>excludeEnd("ctx");
  9857. }));
  9858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9859. $ctx4.sendIdx["onClick:"]=1;
  9860. //>>excludeEnd("ctx");
  9861. $9=$recv($8)._with_("Browser");
  9862. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9863. $ctx4.sendIdx["with:"]=4;
  9864. //>>excludeEnd("ctx");
  9865. $9;
  9866. $10=$recv(html)._button();
  9867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9868. $ctx4.sendIdx["button"]=2;
  9869. //>>excludeEnd("ctx");
  9870. $recv($10)._class_("button");
  9871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9872. $ctx4.sendIdx["class:"]=5;
  9873. //>>excludeEnd("ctx");
  9874. $recv($10)._onClick_((function(){
  9875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9876. return $core.withContext(function($ctx5) {
  9877. //>>excludeEnd("ctx");
  9878. return $recv($HLWorkspace())._openAsTab();
  9879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9880. $ctx5.sendIdx["openAsTab"]=2;
  9881. //>>excludeEnd("ctx");
  9882. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9883. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  9884. //>>excludeEnd("ctx");
  9885. }));
  9886. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9887. $ctx4.sendIdx["onClick:"]=2;
  9888. //>>excludeEnd("ctx");
  9889. $11=$recv($10)._with_("Workspace");
  9890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9891. $ctx4.sendIdx["with:"]=5;
  9892. //>>excludeEnd("ctx");
  9893. $11;
  9894. $12=$recv(html)._button();
  9895. $recv($12)._class_("button");
  9896. $recv($12)._onClick_((function(){
  9897. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9898. return $core.withContext(function($ctx5) {
  9899. //>>excludeEnd("ctx");
  9900. return $recv($HLSUnit())._openAsTab();
  9901. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9902. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9903. //>>excludeEnd("ctx");
  9904. }));
  9905. $13=$recv($12)._with_("Tests");
  9906. return $13;
  9907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9908. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  9909. //>>excludeEnd("ctx");
  9910. }));
  9911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9912. $ctx3.sendIdx["with:"]=3;
  9913. //>>excludeEnd("ctx");
  9914. return $7;
  9915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9916. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9917. //>>excludeEnd("ctx");
  9918. }));
  9919. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9920. $ctx2.sendIdx["with:"]=2;
  9921. //>>excludeEnd("ctx");
  9922. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9923. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9924. //>>excludeEnd("ctx");
  9925. }));
  9926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9927. $ctx1.sendIdx["with:"]=1;
  9928. //>>excludeEnd("ctx");
  9929. return self;
  9930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9931. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTopBarWidget)});
  9932. //>>excludeEnd("ctx");
  9933. },
  9934. //>>excludeStart("ide", pragmas.excludeIdeData);
  9935. args: ["html"],
  9936. 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",
  9937. referencedClasses: ["HLBrowser", "HLWorkspace", "HLSUnit"],
  9938. //>>excludeEnd("ide");
  9939. messageSends: ["class:", "div", "with:", "input", "at:put:", "onKeyUp:", "onSearchKeyUp:", "value:", "button", "onClick:", "openAsTab"]
  9940. }),
  9941. $globals.HLTopBarWidget);
  9942. $core.addMethod(
  9943. $core.method({
  9944. selector: "search:",
  9945. protocol: 'reactions',
  9946. fn: function (aString){
  9947. var self=this;
  9948. function $HLReferences(){return $globals.HLReferences||(typeof HLReferences=="undefined"?nil:HLReferences)}
  9949. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9950. return $core.withContext(function($ctx1) {
  9951. //>>excludeEnd("ctx");
  9952. $recv($recv($HLReferences())._openAsTab())._search_(aString);
  9953. return self;
  9954. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9955. }, function($ctx1) {$ctx1.fill(self,"search:",{aString:aString},$globals.HLTopBarWidget)});
  9956. //>>excludeEnd("ctx");
  9957. },
  9958. //>>excludeStart("ide", pragmas.excludeIdeData);
  9959. args: ["aString"],
  9960. source: "search: aString\x0a\x0a\x09HLReferences openAsTab search: aString",
  9961. referencedClasses: ["HLReferences"],
  9962. //>>excludeEnd("ide");
  9963. messageSends: ["search:", "openAsTab"]
  9964. }),
  9965. $globals.HLTopBarWidget);
  9966. $core.addClass('HLWelcomeWidget', $globals.HLWidget, [], 'Helios-Core');
  9967. $core.addMethod(
  9968. $core.method({
  9969. selector: "cssClass",
  9970. protocol: 'accessing',
  9971. fn: function (){
  9972. var self=this;
  9973. return "welcome";
  9974. },
  9975. //>>excludeStart("ide", pragmas.excludeIdeData);
  9976. args: [],
  9977. source: "cssClass\x0a\x09^ 'welcome'",
  9978. referencedClasses: [],
  9979. //>>excludeEnd("ide");
  9980. messageSends: []
  9981. }),
  9982. $globals.HLWelcomeWidget);
  9983. $core.addMethod(
  9984. $core.method({
  9985. selector: "openClassBrowser",
  9986. protocol: 'actions',
  9987. fn: function (){
  9988. var self=this;
  9989. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  9990. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9991. return $core.withContext(function($ctx1) {
  9992. //>>excludeEnd("ctx");
  9993. $recv($HLBrowser())._openAsTab();
  9994. return self;
  9995. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9996. }, function($ctx1) {$ctx1.fill(self,"openClassBrowser",{},$globals.HLWelcomeWidget)});
  9997. //>>excludeEnd("ctx");
  9998. },
  9999. //>>excludeStart("ide", pragmas.excludeIdeData);
  10000. args: [],
  10001. source: "openClassBrowser\x0a\x09HLBrowser openAsTab",
  10002. referencedClasses: ["HLBrowser"],
  10003. //>>excludeEnd("ide");
  10004. messageSends: ["openAsTab"]
  10005. }),
  10006. $globals.HLWelcomeWidget);
  10007. $core.addMethod(
  10008. $core.method({
  10009. selector: "openHelp",
  10010. protocol: 'actions',
  10011. fn: function (){
  10012. var self=this;
  10013. return self;
  10014. },
  10015. //>>excludeStart("ide", pragmas.excludeIdeData);
  10016. args: [],
  10017. source: "openHelp",
  10018. referencedClasses: [],
  10019. //>>excludeEnd("ide");
  10020. messageSends: []
  10021. }),
  10022. $globals.HLWelcomeWidget);
  10023. $core.addMethod(
  10024. $core.method({
  10025. selector: "openTestRunner",
  10026. protocol: 'actions',
  10027. fn: function (){
  10028. var self=this;
  10029. function $HLSUnit(){return $globals.HLSUnit||(typeof HLSUnit=="undefined"?nil:HLSUnit)}
  10030. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10031. return $core.withContext(function($ctx1) {
  10032. //>>excludeEnd("ctx");
  10033. $recv($HLSUnit())._openAsTab();
  10034. return self;
  10035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10036. }, function($ctx1) {$ctx1.fill(self,"openTestRunner",{},$globals.HLWelcomeWidget)});
  10037. //>>excludeEnd("ctx");
  10038. },
  10039. //>>excludeStart("ide", pragmas.excludeIdeData);
  10040. args: [],
  10041. source: "openTestRunner\x0a\x09HLSUnit openAsTab",
  10042. referencedClasses: ["HLSUnit"],
  10043. //>>excludeEnd("ide");
  10044. messageSends: ["openAsTab"]
  10045. }),
  10046. $globals.HLWelcomeWidget);
  10047. $core.addMethod(
  10048. $core.method({
  10049. selector: "openWorkspace",
  10050. protocol: 'actions',
  10051. fn: function (){
  10052. var self=this;
  10053. function $HLWorkspace(){return $globals.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  10054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10055. return $core.withContext(function($ctx1) {
  10056. //>>excludeEnd("ctx");
  10057. $recv($HLWorkspace())._openAsTab();
  10058. return self;
  10059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10060. }, function($ctx1) {$ctx1.fill(self,"openWorkspace",{},$globals.HLWelcomeWidget)});
  10061. //>>excludeEnd("ctx");
  10062. },
  10063. //>>excludeStart("ide", pragmas.excludeIdeData);
  10064. args: [],
  10065. source: "openWorkspace\x0a\x09HLWorkspace openAsTab",
  10066. referencedClasses: ["HLWorkspace"],
  10067. //>>excludeEnd("ide");
  10068. messageSends: ["openAsTab"]
  10069. }),
  10070. $globals.HLWelcomeWidget);
  10071. $core.addMethod(
  10072. $core.method({
  10073. selector: "renderButtonsOn:",
  10074. protocol: 'rendering',
  10075. fn: function (html){
  10076. var self=this;
  10077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10078. return $core.withContext(function($ctx1) {
  10079. //>>excludeEnd("ctx");
  10080. var $1,$2,$3,$4,$5,$6;
  10081. $1=$recv(html)._button();
  10082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10083. $ctx1.sendIdx["button"]=1;
  10084. //>>excludeEnd("ctx");
  10085. $recv($1)._class_("button");
  10086. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10087. $ctx1.sendIdx["class:"]=1;
  10088. //>>excludeEnd("ctx");
  10089. $recv($1)._with_("Class Browser");
  10090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10091. $ctx1.sendIdx["with:"]=1;
  10092. //>>excludeEnd("ctx");
  10093. $2=$recv($1)._onClick_((function(){
  10094. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10095. return $core.withContext(function($ctx2) {
  10096. //>>excludeEnd("ctx");
  10097. return self._openClassBrowser();
  10098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10099. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10100. //>>excludeEnd("ctx");
  10101. }));
  10102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10103. $ctx1.sendIdx["onClick:"]=1;
  10104. //>>excludeEnd("ctx");
  10105. $3=$recv(html)._button();
  10106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10107. $ctx1.sendIdx["button"]=2;
  10108. //>>excludeEnd("ctx");
  10109. $recv($3)._class_("button");
  10110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10111. $ctx1.sendIdx["class:"]=2;
  10112. //>>excludeEnd("ctx");
  10113. $recv($3)._with_("Workspace");
  10114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10115. $ctx1.sendIdx["with:"]=2;
  10116. //>>excludeEnd("ctx");
  10117. $4=$recv($3)._onClick_((function(){
  10118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10119. return $core.withContext(function($ctx2) {
  10120. //>>excludeEnd("ctx");
  10121. return self._openWorkspace();
  10122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10123. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  10124. //>>excludeEnd("ctx");
  10125. }));
  10126. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10127. $ctx1.sendIdx["onClick:"]=2;
  10128. //>>excludeEnd("ctx");
  10129. $5=$recv(html)._button();
  10130. $recv($5)._class_("button");
  10131. $recv($5)._with_("Test Runner");
  10132. $6=$recv($5)._onClick_((function(){
  10133. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10134. return $core.withContext(function($ctx2) {
  10135. //>>excludeEnd("ctx");
  10136. return self._openTestRunner();
  10137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10138. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  10139. //>>excludeEnd("ctx");
  10140. }));
  10141. return self;
  10142. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10143. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLWelcomeWidget)});
  10144. //>>excludeEnd("ctx");
  10145. },
  10146. //>>excludeStart("ide", pragmas.excludeIdeData);
  10147. args: ["html"],
  10148. 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",
  10149. referencedClasses: [],
  10150. //>>excludeEnd("ide");
  10151. messageSends: ["class:", "button", "with:", "onClick:", "openClassBrowser", "openWorkspace", "openTestRunner"]
  10152. }),
  10153. $globals.HLWelcomeWidget);
  10154. $core.addMethod(
  10155. $core.method({
  10156. selector: "renderContentOn:",
  10157. protocol: 'rendering',
  10158. fn: function (html){
  10159. var self=this;
  10160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10161. return $core.withContext(function($ctx1) {
  10162. //>>excludeEnd("ctx");
  10163. var $1;
  10164. self._renderHelpOn_(html);
  10165. $1=self._renderButtonsOn_(html);
  10166. return self;
  10167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10168. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLWelcomeWidget)});
  10169. //>>excludeEnd("ctx");
  10170. },
  10171. //>>excludeStart("ide", pragmas.excludeIdeData);
  10172. args: ["html"],
  10173. source: "renderContentOn: html\x0a\x09self\x0a\x09\x09renderHelpOn: html;\x0a\x09\x09renderButtonsOn: html",
  10174. referencedClasses: [],
  10175. //>>excludeEnd("ide");
  10176. messageSends: ["renderHelpOn:", "renderButtonsOn:"]
  10177. }),
  10178. $globals.HLWelcomeWidget);
  10179. $core.addMethod(
  10180. $core.method({
  10181. selector: "renderHelpOn:",
  10182. protocol: 'rendering',
  10183. fn: function (html){
  10184. var self=this;
  10185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10186. return $core.withContext(function($ctx1) {
  10187. //>>excludeEnd("ctx");
  10188. var $1;
  10189. $recv($recv(html)._h2())._with_("No tools are open");
  10190. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10191. $ctx1.sendIdx["with:"]=1;
  10192. //>>excludeEnd("ctx");
  10193. $recv($recv(html)._ul())._with_((function(){
  10194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10195. return $core.withContext(function($ctx2) {
  10196. //>>excludeEnd("ctx");
  10197. $1=$recv(html)._li();
  10198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10199. $ctx2.sendIdx["li"]=1;
  10200. //>>excludeEnd("ctx");
  10201. $recv($1)._with_("Perform actions with ctrl + space");
  10202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10203. $ctx2.sendIdx["with:"]=3;
  10204. //>>excludeEnd("ctx");
  10205. return $recv($recv(html)._li())._with_("Open one of the common tools:");
  10206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10207. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  10208. //>>excludeEnd("ctx");
  10209. }));
  10210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10211. $ctx1.sendIdx["with:"]=2;
  10212. //>>excludeEnd("ctx");
  10213. return self;
  10214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  10215. }, function($ctx1) {$ctx1.fill(self,"renderHelpOn:",{html:html},$globals.HLWelcomeWidget)});
  10216. //>>excludeEnd("ctx");
  10217. },
  10218. //>>excludeStart("ide", pragmas.excludeIdeData);
  10219. args: ["html"],
  10220. 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:' ]",
  10221. referencedClasses: [],
  10222. //>>excludeEnd("ide");
  10223. messageSends: ["with:", "h2", "ul", "li"]
  10224. }),
  10225. $globals.HLWelcomeWidget);
  10226. });