Helios-Core.js 336 KB

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