Helios-Core.js 338 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000100011000210003100041000510006100071000810009100101001110012100131001410015100161001710018100191002010021100221002310024100251002610027100281002910030100311003210033100341003510036100371003810039100401004110042100431004410045100461004710048100491005010051100521005310054100551005610057100581005910060100611006210063100641006510066100671006810069100701007110072100731007410075100761007710078100791008010081100821008310084100851008610087100881008910090100911009210093100941009510096100971009810099101001010110102101031010410105101061010710108101091011010111101121011310114101151011610117101181011910120101211012210123101241012510126101271012810129101301013110132101331013410135101361013710138101391014010141101421014310144101451014610147101481014910150101511015210153101541015510156101571015810159101601016110162101631016410165101661016710168101691017010171101721017310174101751017610177101781017910180101811018210183101841018510186101871018810189101901019110192101931019410195101961019710198101991020010201102021020310204102051020610207102081020910210102111021210213102141021510216102171021810219102201022110222102231022410225102261022710228102291023010231102321023310234102351023610237102381023910240102411024210243102441024510246102471024810249102501025110252102531025410255102561025710258102591026010261102621026310264102651026610267102681026910270102711027210273102741027510276102771027810279102801028110282102831028410285102861028710288102891029010291102921029310294102951029610297102981029910300103011030210303103041030510306103071030810309103101031110312103131031410315103161031710318103191032010321103221032310324103251032610327103281032910330103311033210333103341033510336103371033810339103401034110342103431034410345103461034710348103491035010351103521035310354103551035610357103581035910360103611036210363103641036510366103671036810369103701037110372103731037410375103761037710378103791038010381103821038310384103851038610387103881038910390103911039210393103941039510396103971039810399104001040110402104031040410405104061040710408104091041010411104121041310414104151041610417104181041910420104211042210423104241042510426104271042810429104301043110432104331043410435104361043710438104391044010441104421044310444104451044610447104481044910450104511045210453104541045510456104571045810459104601046110462
  1. define("helios/Helios-Core", ["amber/boot", "amber_core/Platform-Services", "amber_core/Kernel-Objects", "amber-contrib-web/Web"], function($boot){
  2. var $core=$boot.api,nil=$boot.nil,$recv=$boot.asReceiver,$globals=$boot.globals;
  3. $core.addPackage('Helios-Core');
  4. $core.packages["Helios-Core"].innerEval = function (expr) { return eval(expr); };
  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. var $1;
  656. self._withChangesDo_((function(){
  657. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  658. return $core.withContext(function($ctx2) {
  659. //>>excludeEnd("ctx");
  660. $1=self._environment();
  661. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  662. $ctx2.sendIdx["environment"]=1;
  663. //>>excludeEnd("ctx");
  664. $recv($1)._copyClass_to_($recv(self._selectedClass())._theNonMetaClass(),aClassName);
  665. return self._selectedClass_($recv(self._environment())._classNamed_(aClassName));
  666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  667. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  668. //>>excludeEnd("ctx");
  669. }));
  670. return self;
  671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  672. }, function($ctx1) {$ctx1.fill(self,"copyClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  673. //>>excludeEnd("ctx");
  674. },
  675. //>>excludeStart("ide", pragmas.excludeIdeData);
  676. args: ["aClassName"],
  677. source: "copyClassTo: aClassName\x0a\x09self withChangesDo: [ \x0a\x09\x09self environment \x0a\x09\x09\x09copyClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName.\x0a\x09\x09self selectedClass: (self environment classNamed: aClassName) ]",
  678. referencedClasses: [],
  679. //>>excludeEnd("ide");
  680. messageSends: ["withChangesDo:", "copyClass:to:", "environment", "theNonMetaClass", "selectedClass", "selectedClass:", "classNamed:"]
  681. }),
  682. $globals.HLToolModel);
  683. $core.addMethod(
  684. $core.method({
  685. selector: "forceSelectedClass:",
  686. protocol: 'accessing',
  687. fn: function (aClass){
  688. var self=this;
  689. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  690. return $core.withContext(function($ctx1) {
  691. //>>excludeEnd("ctx");
  692. var $1;
  693. self._withChangesDo_((function(){
  694. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  695. return $core.withContext(function($ctx2) {
  696. //>>excludeEnd("ctx");
  697. self._selectedClass_(nil);
  698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  699. $ctx2.sendIdx["selectedClass:"]=1;
  700. //>>excludeEnd("ctx");
  701. $1=self._selectedClass_(aClass);
  702. return $1;
  703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  704. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  705. //>>excludeEnd("ctx");
  706. }));
  707. return self;
  708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  709. }, function($ctx1) {$ctx1.fill(self,"forceSelectedClass:",{aClass:aClass},$globals.HLToolModel)});
  710. //>>excludeEnd("ctx");
  711. },
  712. //>>excludeStart("ide", pragmas.excludeIdeData);
  713. args: ["aClass"],
  714. source: "forceSelectedClass: aClass\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedClass: nil;\x0a\x09\x09\x09selectedClass: aClass ]",
  715. referencedClasses: [],
  716. //>>excludeEnd("ide");
  717. messageSends: ["withChangesDo:", "selectedClass:"]
  718. }),
  719. $globals.HLToolModel);
  720. $core.addMethod(
  721. $core.method({
  722. selector: "forceSelectedMethod:",
  723. protocol: 'accessing',
  724. fn: function (aMethod){
  725. var self=this;
  726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  727. return $core.withContext(function($ctx1) {
  728. //>>excludeEnd("ctx");
  729. var $1;
  730. self._withChangesDo_((function(){
  731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  732. return $core.withContext(function($ctx2) {
  733. //>>excludeEnd("ctx");
  734. self._selectedMethod_(nil);
  735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  736. $ctx2.sendIdx["selectedMethod:"]=1;
  737. //>>excludeEnd("ctx");
  738. $1=self._selectedMethod_(aMethod);
  739. return $1;
  740. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  741. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  742. //>>excludeEnd("ctx");
  743. }));
  744. return self;
  745. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  746. }, function($ctx1) {$ctx1.fill(self,"forceSelectedMethod:",{aMethod:aMethod},$globals.HLToolModel)});
  747. //>>excludeEnd("ctx");
  748. },
  749. //>>excludeStart("ide", pragmas.excludeIdeData);
  750. args: ["aMethod"],
  751. source: "forceSelectedMethod: aMethod\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedMethod: nil;\x0a\x09\x09\x09selectedMethod: aMethod ]",
  752. referencedClasses: [],
  753. //>>excludeEnd("ide");
  754. messageSends: ["withChangesDo:", "selectedMethod:"]
  755. }),
  756. $globals.HLToolModel);
  757. $core.addMethod(
  758. $core.method({
  759. selector: "forceSelectedPackage:",
  760. protocol: 'accessing',
  761. fn: function (aPackage){
  762. var self=this;
  763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  764. return $core.withContext(function($ctx1) {
  765. //>>excludeEnd("ctx");
  766. var $1;
  767. self._withChangesDo_((function(){
  768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  769. return $core.withContext(function($ctx2) {
  770. //>>excludeEnd("ctx");
  771. self._selectedPackage_(nil);
  772. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  773. $ctx2.sendIdx["selectedPackage:"]=1;
  774. //>>excludeEnd("ctx");
  775. $1=self._selectedPackage_(aPackage);
  776. return $1;
  777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  778. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  779. //>>excludeEnd("ctx");
  780. }));
  781. return self;
  782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  783. }, function($ctx1) {$ctx1.fill(self,"forceSelectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  784. //>>excludeEnd("ctx");
  785. },
  786. //>>excludeStart("ide", pragmas.excludeIdeData);
  787. args: ["aPackage"],
  788. source: "forceSelectedPackage: aPackage\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedPackage: nil;\x0a\x09\x09\x09selectedPackage: aPackage ]",
  789. referencedClasses: [],
  790. //>>excludeEnd("ide");
  791. messageSends: ["withChangesDo:", "selectedPackage:"]
  792. }),
  793. $globals.HLToolModel);
  794. $core.addMethod(
  795. $core.method({
  796. selector: "forceSelectedProtocol:",
  797. protocol: 'accessing',
  798. fn: function (aProtocol){
  799. var self=this;
  800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  801. return $core.withContext(function($ctx1) {
  802. //>>excludeEnd("ctx");
  803. var $1;
  804. self._withChangesDo_((function(){
  805. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  806. return $core.withContext(function($ctx2) {
  807. //>>excludeEnd("ctx");
  808. self._selectedProtocol_(nil);
  809. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  810. $ctx2.sendIdx["selectedProtocol:"]=1;
  811. //>>excludeEnd("ctx");
  812. $1=self._selectedProtocol_(aProtocol);
  813. return $1;
  814. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  815. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  816. //>>excludeEnd("ctx");
  817. }));
  818. return self;
  819. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  820. }, function($ctx1) {$ctx1.fill(self,"forceSelectedProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  821. //>>excludeEnd("ctx");
  822. },
  823. //>>excludeStart("ide", pragmas.excludeIdeData);
  824. args: ["aProtocol"],
  825. source: "forceSelectedProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self \x09\x0a\x09\x09\x09selectedProtocol: nil;\x0a\x09\x09\x09selectedProtocol: aProtocol ]",
  826. referencedClasses: [],
  827. //>>excludeEnd("ide");
  828. messageSends: ["withChangesDo:", "selectedProtocol:"]
  829. }),
  830. $globals.HLToolModel);
  831. $core.addMethod(
  832. $core.method({
  833. selector: "handleCompileError:",
  834. protocol: 'error handling',
  835. fn: function (anError){
  836. var self=this;
  837. function $HLCompileErrorRaised(){return $globals.HLCompileErrorRaised||(typeof HLCompileErrorRaised=="undefined"?nil:HLCompileErrorRaised)}
  838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  839. return $core.withContext(function($ctx1) {
  840. //>>excludeEnd("ctx");
  841. var $1,$2;
  842. $1=$recv($HLCompileErrorRaised())._new();
  843. $recv($1)._error_(anError);
  844. $2=$recv($1)._yourself();
  845. $recv(self._announcer())._announce_($2);
  846. return self;
  847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  848. }, function($ctx1) {$ctx1.fill(self,"handleCompileError:",{anError:anError},$globals.HLToolModel)});
  849. //>>excludeEnd("ctx");
  850. },
  851. //>>excludeStart("ide", pragmas.excludeIdeData);
  852. args: ["anError"],
  853. source: "handleCompileError: anError\x0a\x09self announcer announce: (HLCompileErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  854. referencedClasses: ["HLCompileErrorRaised"],
  855. //>>excludeEnd("ide");
  856. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  857. }),
  858. $globals.HLToolModel);
  859. $core.addMethod(
  860. $core.method({
  861. selector: "handleParseError:",
  862. protocol: 'error handling',
  863. fn: function (anError){
  864. var self=this;
  865. var split,line,column,messageToInsert;
  866. function $HLParseErrorRaised(){return $globals.HLParseErrorRaised||(typeof HLParseErrorRaised=="undefined"?nil:HLParseErrorRaised)}
  867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  868. return $core.withContext(function($ctx1) {
  869. //>>excludeEnd("ctx");
  870. var $1,$3,$2,$4,$6,$7,$8,$9,$5;
  871. split=$recv($recv(anError)._messageText())._tokenize_(" : ");
  872. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  873. $ctx1.sendIdx["tokenize:"]=1;
  874. //>>excludeEnd("ctx");
  875. messageToInsert=$recv(split)._second();
  876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  877. $ctx1.sendIdx["second"]=1;
  878. //>>excludeEnd("ctx");
  879. $1=$recv(split)._first();
  880. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  881. $ctx1.sendIdx["first"]=1;
  882. //>>excludeEnd("ctx");
  883. $3=$recv(split)._first();
  884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  885. $ctx1.sendIdx["first"]=2;
  886. //>>excludeEnd("ctx");
  887. $2=$recv($3)._size();
  888. split=$recv($1)._copyFrom_to_((21),$2);
  889. split=$recv(split)._tokenize_(" column ");
  890. line=$recv(split)._first();
  891. column=$recv(split)._second();
  892. $4=self._announcer();
  893. $6=$recv($HLParseErrorRaised())._new();
  894. $7=$6;
  895. $8=$recv(line)._asNumber();
  896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  897. $ctx1.sendIdx["asNumber"]=1;
  898. //>>excludeEnd("ctx");
  899. $recv($7)._line_($8);
  900. $recv($6)._column_($recv(column)._asNumber());
  901. $recv($6)._message_(messageToInsert);
  902. $recv($6)._error_(anError);
  903. $9=$recv($6)._yourself();
  904. $5=$9;
  905. $recv($4)._announce_($5);
  906. return self;
  907. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  908. }, function($ctx1) {$ctx1.fill(self,"handleParseError:",{anError:anError,split:split,line:line,column:column,messageToInsert:messageToInsert},$globals.HLToolModel)});
  909. //>>excludeEnd("ctx");
  910. },
  911. //>>excludeStart("ide", pragmas.excludeIdeData);
  912. args: ["anError"],
  913. 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)",
  914. referencedClasses: ["HLParseErrorRaised"],
  915. //>>excludeEnd("ide");
  916. messageSends: ["tokenize:", "messageText", "second", "copyFrom:to:", "first", "size", "announce:", "announcer", "line:", "new", "asNumber", "column:", "message:", "error:", "yourself"]
  917. }),
  918. $globals.HLToolModel);
  919. $core.addMethod(
  920. $core.method({
  921. selector: "handleUnkownVariableError:",
  922. protocol: 'error handling',
  923. fn: function (anError){
  924. var self=this;
  925. function $HLUnknownVariableErrorRaised(){return $globals.HLUnknownVariableErrorRaised||(typeof HLUnknownVariableErrorRaised=="undefined"?nil:HLUnknownVariableErrorRaised)}
  926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  927. return $core.withContext(function($ctx1) {
  928. //>>excludeEnd("ctx");
  929. var $1,$2;
  930. $1=$recv($HLUnknownVariableErrorRaised())._new();
  931. $recv($1)._error_(anError);
  932. $2=$recv($1)._yourself();
  933. $recv(self._announcer())._announce_($2);
  934. return self;
  935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  936. }, function($ctx1) {$ctx1.fill(self,"handleUnkownVariableError:",{anError:anError},$globals.HLToolModel)});
  937. //>>excludeEnd("ctx");
  938. },
  939. //>>excludeStart("ide", pragmas.excludeIdeData);
  940. args: ["anError"],
  941. source: "handleUnkownVariableError: anError\x0a\x09self announcer announce: (HLUnknownVariableErrorRaised new\x0a\x09\x09error: anError;\x0a\x09\x09yourself)",
  942. referencedClasses: ["HLUnknownVariableErrorRaised"],
  943. //>>excludeEnd("ide");
  944. messageSends: ["announce:", "announcer", "error:", "new", "yourself"]
  945. }),
  946. $globals.HLToolModel);
  947. $core.addMethod(
  948. $core.method({
  949. selector: "isToolModel",
  950. protocol: 'testing',
  951. fn: function (){
  952. var self=this;
  953. return true;
  954. },
  955. //>>excludeStart("ide", pragmas.excludeIdeData);
  956. args: [],
  957. source: "isToolModel\x0a\x09^ true",
  958. referencedClasses: [],
  959. //>>excludeEnd("ide");
  960. messageSends: []
  961. }),
  962. $globals.HLToolModel);
  963. $core.addMethod(
  964. $core.method({
  965. selector: "moveClassToPackage:",
  966. protocol: 'commands actions',
  967. fn: function (aPackageName){
  968. var self=this;
  969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  970. return $core.withContext(function($ctx1) {
  971. //>>excludeEnd("ctx");
  972. self._withChangesDo_((function(){
  973. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  974. return $core.withContext(function($ctx2) {
  975. //>>excludeEnd("ctx");
  976. return $recv(self._environment())._moveClass_toPackage_($recv(self._selectedClass())._theNonMetaClass(),aPackageName);
  977. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  978. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  979. //>>excludeEnd("ctx");
  980. }));
  981. return self;
  982. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  983. }, function($ctx1) {$ctx1.fill(self,"moveClassToPackage:",{aPackageName:aPackageName},$globals.HLToolModel)});
  984. //>>excludeEnd("ctx");
  985. },
  986. //>>excludeStart("ide", pragmas.excludeIdeData);
  987. args: ["aPackageName"],
  988. source: "moveClassToPackage: aPackageName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09toPackage: aPackageName ]",
  989. referencedClasses: [],
  990. //>>excludeEnd("ide");
  991. messageSends: ["withChangesDo:", "moveClass:toPackage:", "environment", "theNonMetaClass", "selectedClass"]
  992. }),
  993. $globals.HLToolModel);
  994. $core.addMethod(
  995. $core.method({
  996. selector: "moveMethodToClass:",
  997. protocol: 'commands actions',
  998. fn: function (aClassName){
  999. var self=this;
  1000. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1001. return $core.withContext(function($ctx1) {
  1002. //>>excludeEnd("ctx");
  1003. self._withChangesDo_((function(){
  1004. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1005. return $core.withContext(function($ctx2) {
  1006. //>>excludeEnd("ctx");
  1007. return $recv(self._environment())._moveMethod_toClass_(self._selectedMethod(),aClassName);
  1008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1009. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1010. //>>excludeEnd("ctx");
  1011. }));
  1012. return self;
  1013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1014. }, function($ctx1) {$ctx1.fill(self,"moveMethodToClass:",{aClassName:aClassName},$globals.HLToolModel)});
  1015. //>>excludeEnd("ctx");
  1016. },
  1017. //>>excludeStart("ide", pragmas.excludeIdeData);
  1018. args: ["aClassName"],
  1019. source: "moveMethodToClass: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toClass: aClassName ]",
  1020. referencedClasses: [],
  1021. //>>excludeEnd("ide");
  1022. messageSends: ["withChangesDo:", "moveMethod:toClass:", "environment", "selectedMethod"]
  1023. }),
  1024. $globals.HLToolModel);
  1025. $core.addMethod(
  1026. $core.method({
  1027. selector: "moveMethodToProtocol:",
  1028. protocol: 'commands actions',
  1029. fn: function (aProtocol){
  1030. var self=this;
  1031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1032. return $core.withContext(function($ctx1) {
  1033. //>>excludeEnd("ctx");
  1034. self._withChangesDo_((function(){
  1035. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1036. return $core.withContext(function($ctx2) {
  1037. //>>excludeEnd("ctx");
  1038. return $recv(self._environment())._moveMethod_toProtocol_(self._selectedMethod(),aProtocol);
  1039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1040. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1041. //>>excludeEnd("ctx");
  1042. }));
  1043. return self;
  1044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1045. }, function($ctx1) {$ctx1.fill(self,"moveMethodToProtocol:",{aProtocol:aProtocol},$globals.HLToolModel)});
  1046. //>>excludeEnd("ctx");
  1047. },
  1048. //>>excludeStart("ide", pragmas.excludeIdeData);
  1049. args: ["aProtocol"],
  1050. source: "moveMethodToProtocol: aProtocol\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09moveMethod: self selectedMethod \x0a\x09\x09\x09toProtocol: aProtocol ]",
  1051. referencedClasses: [],
  1052. //>>excludeEnd("ide");
  1053. messageSends: ["withChangesDo:", "moveMethod:toProtocol:", "environment", "selectedMethod"]
  1054. }),
  1055. $globals.HLToolModel);
  1056. $core.addMethod(
  1057. $core.method({
  1058. selector: "openClassNamed:",
  1059. protocol: 'commands actions',
  1060. fn: function (aString){
  1061. var self=this;
  1062. var class_;
  1063. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1064. return $core.withContext(function($ctx1) {
  1065. //>>excludeEnd("ctx");
  1066. self._withChangesDo_((function(){
  1067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1068. return $core.withContext(function($ctx2) {
  1069. //>>excludeEnd("ctx");
  1070. class_=$recv(self._environment())._classNamed_(aString);
  1071. class_;
  1072. self._selectedPackage_($recv(class_)._package());
  1073. return self._selectedClass_(class_);
  1074. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1075. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1076. //>>excludeEnd("ctx");
  1077. }));
  1078. return self;
  1079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1080. }, function($ctx1) {$ctx1.fill(self,"openClassNamed:",{aString:aString,class_:class_},$globals.HLToolModel)});
  1081. //>>excludeEnd("ctx");
  1082. },
  1083. //>>excludeStart("ide", pragmas.excludeIdeData);
  1084. args: ["aString"],
  1085. 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 ]",
  1086. referencedClasses: [],
  1087. //>>excludeEnd("ide");
  1088. messageSends: ["withChangesDo:", "classNamed:", "environment", "selectedPackage:", "package", "selectedClass:"]
  1089. }),
  1090. $globals.HLToolModel);
  1091. $core.addMethod(
  1092. $core.method({
  1093. selector: "packageToCommit",
  1094. protocol: 'accessing',
  1095. fn: function (){
  1096. var self=this;
  1097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1098. return $core.withContext(function($ctx1) {
  1099. //>>excludeEnd("ctx");
  1100. var $2,$1,$receiver;
  1101. $2=self._selectedMethod();
  1102. if(($receiver = $2) == null || $receiver.isNil){
  1103. $1=self._selectedPackage();
  1104. } else {
  1105. var method;
  1106. method=$receiver;
  1107. $1=$recv(method)._package();
  1108. };
  1109. return $1;
  1110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1111. }, function($ctx1) {$ctx1.fill(self,"packageToCommit",{},$globals.HLToolModel)});
  1112. //>>excludeEnd("ctx");
  1113. },
  1114. //>>excludeStart("ide", pragmas.excludeIdeData);
  1115. args: [],
  1116. 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 ]",
  1117. referencedClasses: [],
  1118. //>>excludeEnd("ide");
  1119. messageSends: ["ifNil:ifNotNil:", "selectedMethod", "selectedPackage", "package"]
  1120. }),
  1121. $globals.HLToolModel);
  1122. $core.addMethod(
  1123. $core.method({
  1124. selector: "packages",
  1125. protocol: 'accessing',
  1126. fn: function (){
  1127. var self=this;
  1128. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1129. return $core.withContext(function($ctx1) {
  1130. //>>excludeEnd("ctx");
  1131. var $1;
  1132. $1=$recv(self._environment())._packages();
  1133. return $1;
  1134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1135. }, function($ctx1) {$ctx1.fill(self,"packages",{},$globals.HLToolModel)});
  1136. //>>excludeEnd("ctx");
  1137. },
  1138. //>>excludeStart("ide", pragmas.excludeIdeData);
  1139. args: [],
  1140. source: "packages\x0a\x09^ self environment packages",
  1141. referencedClasses: [],
  1142. //>>excludeEnd("ide");
  1143. messageSends: ["packages", "environment"]
  1144. }),
  1145. $globals.HLToolModel);
  1146. $core.addMethod(
  1147. $core.method({
  1148. selector: "removeClass",
  1149. protocol: 'commands actions',
  1150. fn: function (){
  1151. var self=this;
  1152. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1153. return $core.withContext(function($ctx1) {
  1154. //>>excludeEnd("ctx");
  1155. var $1,$5,$4,$3,$2;
  1156. self._withChangesDo_((function(){
  1157. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1158. return $core.withContext(function($ctx2) {
  1159. //>>excludeEnd("ctx");
  1160. $1=self._manager();
  1161. $5=self._selectedClass();
  1162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1163. $ctx2.sendIdx["selectedClass"]=1;
  1164. //>>excludeEnd("ctx");
  1165. $4=$recv($5)._theNonMetaClass();
  1166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1167. $ctx2.sendIdx["theNonMetaClass"]=1;
  1168. //>>excludeEnd("ctx");
  1169. $3=$recv($4)._name();
  1170. $2="Do you REALLY want to remove class ".__comma($3);
  1171. return $recv($1)._confirm_ifTrue_($2,(function(){
  1172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1173. return $core.withContext(function($ctx3) {
  1174. //>>excludeEnd("ctx");
  1175. return $recv(self._environment())._removeClass_($recv(self._selectedClass())._theNonMetaClass());
  1176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1177. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1178. //>>excludeEnd("ctx");
  1179. }));
  1180. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1181. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1182. //>>excludeEnd("ctx");
  1183. }));
  1184. return self;
  1185. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1186. }, function($ctx1) {$ctx1.fill(self,"removeClass",{},$globals.HLToolModel)});
  1187. //>>excludeEnd("ctx");
  1188. },
  1189. //>>excludeStart("ide", pragmas.excludeIdeData);
  1190. args: [],
  1191. 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 ] ]",
  1192. referencedClasses: [],
  1193. //>>excludeEnd("ide");
  1194. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "theNonMetaClass", "selectedClass", "removeClass:", "environment"]
  1195. }),
  1196. $globals.HLToolModel);
  1197. $core.addMethod(
  1198. $core.method({
  1199. selector: "removeMethod",
  1200. protocol: 'commands actions',
  1201. fn: function (){
  1202. var self=this;
  1203. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1204. return $core.withContext(function($ctx1) {
  1205. //>>excludeEnd("ctx");
  1206. var $1,$7,$6,$5,$4,$3,$9,$8,$2;
  1207. self._withChangesDo_((function(){
  1208. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1209. return $core.withContext(function($ctx2) {
  1210. //>>excludeEnd("ctx");
  1211. $1=self._manager();
  1212. $7=self._selectedMethod();
  1213. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1214. $ctx2.sendIdx["selectedMethod"]=1;
  1215. //>>excludeEnd("ctx");
  1216. $6=$recv($7)._methodClass();
  1217. $5=$recv($6)._name();
  1218. $4="Do you REALLY want to remove method ".__comma($5);
  1219. $3=$recv($4).__comma(" >> #");
  1220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1221. $ctx2.sendIdx[","]=2;
  1222. //>>excludeEnd("ctx");
  1223. $9=self._selectedMethod();
  1224. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1225. $ctx2.sendIdx["selectedMethod"]=2;
  1226. //>>excludeEnd("ctx");
  1227. $8=$recv($9)._selector();
  1228. $2=$recv($3).__comma($8);
  1229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1230. $ctx2.sendIdx[","]=1;
  1231. //>>excludeEnd("ctx");
  1232. return $recv($1)._confirm_ifTrue_($2,(function(){
  1233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1234. return $core.withContext(function($ctx3) {
  1235. //>>excludeEnd("ctx");
  1236. return $recv(self._environment())._removeMethod_(self._selectedMethod());
  1237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1238. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1239. //>>excludeEnd("ctx");
  1240. }));
  1241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1242. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1243. //>>excludeEnd("ctx");
  1244. }));
  1245. return self;
  1246. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1247. }, function($ctx1) {$ctx1.fill(self,"removeMethod",{},$globals.HLToolModel)});
  1248. //>>excludeEnd("ctx");
  1249. },
  1250. //>>excludeStart("ide", pragmas.excludeIdeData);
  1251. args: [],
  1252. 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 ] ]",
  1253. referencedClasses: [],
  1254. //>>excludeEnd("ide");
  1255. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "name", "methodClass", "selectedMethod", "selector", "removeMethod:", "environment"]
  1256. }),
  1257. $globals.HLToolModel);
  1258. $core.addMethod(
  1259. $core.method({
  1260. selector: "removeProtocol",
  1261. protocol: 'commands actions',
  1262. fn: function (){
  1263. var self=this;
  1264. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1265. return $core.withContext(function($ctx1) {
  1266. //>>excludeEnd("ctx");
  1267. var $1,$3,$2;
  1268. self._withChangesDo_((function(){
  1269. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1270. return $core.withContext(function($ctx2) {
  1271. //>>excludeEnd("ctx");
  1272. $1=self._manager();
  1273. $3=self._selectedProtocol();
  1274. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1275. $ctx2.sendIdx["selectedProtocol"]=1;
  1276. //>>excludeEnd("ctx");
  1277. $2="Do you REALLY want to remove protocol ".__comma($3);
  1278. return $recv($1)._confirm_ifTrue_($2,(function(){
  1279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1280. return $core.withContext(function($ctx3) {
  1281. //>>excludeEnd("ctx");
  1282. return $recv(self._environment())._removeProtocol_from_(self._selectedProtocol(),self._selectedClass());
  1283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1284. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1285. //>>excludeEnd("ctx");
  1286. }));
  1287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1288. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1289. //>>excludeEnd("ctx");
  1290. }));
  1291. return self;
  1292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1293. }, function($ctx1) {$ctx1.fill(self,"removeProtocol",{},$globals.HLToolModel)});
  1294. //>>excludeEnd("ctx");
  1295. },
  1296. //>>excludeStart("ide", pragmas.excludeIdeData);
  1297. args: [],
  1298. 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 ] ]",
  1299. referencedClasses: [],
  1300. //>>excludeEnd("ide");
  1301. messageSends: ["withChangesDo:", "confirm:ifTrue:", "manager", ",", "selectedProtocol", "removeProtocol:from:", "environment", "selectedClass"]
  1302. }),
  1303. $globals.HLToolModel);
  1304. $core.addMethod(
  1305. $core.method({
  1306. selector: "renameClassTo:",
  1307. protocol: 'commands actions',
  1308. fn: function (aClassName){
  1309. var self=this;
  1310. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1311. return $core.withContext(function($ctx1) {
  1312. //>>excludeEnd("ctx");
  1313. self._withChangesDo_((function(){
  1314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1315. return $core.withContext(function($ctx2) {
  1316. //>>excludeEnd("ctx");
  1317. return $recv(self._environment())._renameClass_to_($recv(self._selectedClass())._theNonMetaClass(),aClassName);
  1318. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1319. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1320. //>>excludeEnd("ctx");
  1321. }));
  1322. return self;
  1323. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1324. }, function($ctx1) {$ctx1.fill(self,"renameClassTo:",{aClassName:aClassName},$globals.HLToolModel)});
  1325. //>>excludeEnd("ctx");
  1326. },
  1327. //>>excludeStart("ide", pragmas.excludeIdeData);
  1328. args: ["aClassName"],
  1329. source: "renameClassTo: aClassName\x0a\x09self withChangesDo: [\x0a\x09\x09self environment \x0a\x09\x09\x09renameClass: self selectedClass theNonMetaClass\x0a\x09\x09\x09to: aClassName ]",
  1330. referencedClasses: [],
  1331. //>>excludeEnd("ide");
  1332. messageSends: ["withChangesDo:", "renameClass:to:", "environment", "theNonMetaClass", "selectedClass"]
  1333. }),
  1334. $globals.HLToolModel);
  1335. $core.addMethod(
  1336. $core.method({
  1337. selector: "renameProtocolTo:",
  1338. protocol: 'commands actions',
  1339. fn: function (aString){
  1340. var self=this;
  1341. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1342. return $core.withContext(function($ctx1) {
  1343. //>>excludeEnd("ctx");
  1344. self._withChangesDo_((function(){
  1345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1346. return $core.withContext(function($ctx2) {
  1347. //>>excludeEnd("ctx");
  1348. return $recv(self._environment())._renameProtocol_to_in_(self._selectedProtocol(),aString,self._selectedClass());
  1349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1350. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1351. //>>excludeEnd("ctx");
  1352. }));
  1353. return self;
  1354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1355. }, function($ctx1) {$ctx1.fill(self,"renameProtocolTo:",{aString:aString},$globals.HLToolModel)});
  1356. //>>excludeEnd("ctx");
  1357. },
  1358. //>>excludeStart("ide", pragmas.excludeIdeData);
  1359. args: ["aString"],
  1360. 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 ]",
  1361. referencedClasses: [],
  1362. //>>excludeEnd("ide");
  1363. messageSends: ["withChangesDo:", "renameProtocol:to:in:", "environment", "selectedProtocol", "selectedClass"]
  1364. }),
  1365. $globals.HLToolModel);
  1366. $core.addMethod(
  1367. $core.method({
  1368. selector: "save:",
  1369. protocol: 'actions',
  1370. fn: function (aString){
  1371. var self=this;
  1372. function $HLSourceCodeSaved(){return $globals.HLSourceCodeSaved||(typeof HLSourceCodeSaved=="undefined"?nil:HLSourceCodeSaved)}
  1373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1374. return $core.withContext(function($ctx1) {
  1375. //>>excludeEnd("ctx");
  1376. var $1;
  1377. $recv(self._announcer())._announce_($recv($HLSourceCodeSaved())._new());
  1378. $1=self._shouldCompileDefinition_(aString);
  1379. if($core.assert($1)){
  1380. self._compileClassDefinition_(aString);
  1381. } else {
  1382. self._compileMethod_(aString);
  1383. };
  1384. return self;
  1385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1386. }, function($ctx1) {$ctx1.fill(self,"save:",{aString:aString},$globals.HLToolModel)});
  1387. //>>excludeEnd("ctx");
  1388. },
  1389. //>>excludeStart("ide", pragmas.excludeIdeData);
  1390. args: ["aString"],
  1391. source: "save: aString\x0a\x09self announcer announce: HLSourceCodeSaved new.\x0a\x09\x0a\x09(self shouldCompileDefinition: aString)\x0a\x09\x09ifTrue: [ self compileClassDefinition: aString ]\x0a\x09\x09ifFalse: [ self compileMethod: aString ]",
  1392. referencedClasses: ["HLSourceCodeSaved"],
  1393. //>>excludeEnd("ide");
  1394. messageSends: ["announce:", "announcer", "new", "ifTrue:ifFalse:", "shouldCompileDefinition:", "compileClassDefinition:", "compileMethod:"]
  1395. }),
  1396. $globals.HLToolModel);
  1397. $core.addMethod(
  1398. $core.method({
  1399. selector: "saveSourceCode",
  1400. protocol: 'actions',
  1401. fn: function (){
  1402. var self=this;
  1403. function $HLSaveSourceCode(){return $globals.HLSaveSourceCode||(typeof HLSaveSourceCode=="undefined"?nil:HLSaveSourceCode)}
  1404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1405. return $core.withContext(function($ctx1) {
  1406. //>>excludeEnd("ctx");
  1407. $recv(self._announcer())._announce_($recv($HLSaveSourceCode())._new());
  1408. return self;
  1409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1410. }, function($ctx1) {$ctx1.fill(self,"saveSourceCode",{},$globals.HLToolModel)});
  1411. //>>excludeEnd("ctx");
  1412. },
  1413. //>>excludeStart("ide", pragmas.excludeIdeData);
  1414. args: [],
  1415. source: "saveSourceCode\x0a\x09self announcer announce: HLSaveSourceCode new",
  1416. referencedClasses: ["HLSaveSourceCode"],
  1417. //>>excludeEnd("ide");
  1418. messageSends: ["announce:", "announcer", "new"]
  1419. }),
  1420. $globals.HLToolModel);
  1421. $core.addMethod(
  1422. $core.method({
  1423. selector: "selectedClass",
  1424. protocol: 'accessing',
  1425. fn: function (){
  1426. var self=this;
  1427. var $1;
  1428. $1=self["@selectedClass"];
  1429. return $1;
  1430. },
  1431. //>>excludeStart("ide", pragmas.excludeIdeData);
  1432. args: [],
  1433. source: "selectedClass\x0a\x09^ selectedClass",
  1434. referencedClasses: [],
  1435. //>>excludeEnd("ide");
  1436. messageSends: []
  1437. }),
  1438. $globals.HLToolModel);
  1439. $core.addMethod(
  1440. $core.method({
  1441. selector: "selectedClass:",
  1442. protocol: 'accessing',
  1443. fn: function (aClass){
  1444. var self=this;
  1445. function $HLClassSelected(){return $globals.HLClassSelected||(typeof HLClassSelected=="undefined"?nil:HLClassSelected)}
  1446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1447. return $core.withContext(function($ctx1) {
  1448. //>>excludeEnd("ctx");
  1449. var $3,$2,$1,$5,$4,$6,$receiver;
  1450. $3=self._selectedClass();
  1451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1452. $ctx1.sendIdx["selectedClass"]=1;
  1453. //>>excludeEnd("ctx");
  1454. $2=$recv($3).__eq(aClass);
  1455. $1=$recv($2)._and_((function(){
  1456. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1457. return $core.withContext(function($ctx2) {
  1458. //>>excludeEnd("ctx");
  1459. return $recv(aClass)._isNil();
  1460. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1461. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1462. //>>excludeEnd("ctx");
  1463. }));
  1464. if($core.assert($1)){
  1465. return self;
  1466. };
  1467. self._withChangesDo_((function(){
  1468. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1469. return $core.withContext(function($ctx2) {
  1470. //>>excludeEnd("ctx");
  1471. if(($receiver = aClass) == null || $receiver.isNil){
  1472. self["@selectedClass"]=nil;
  1473. self["@selectedClass"];
  1474. } else {
  1475. $5=$recv(aClass)._theNonMetaClass();
  1476. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1477. $ctx2.sendIdx["theNonMetaClass"]=1;
  1478. //>>excludeEnd("ctx");
  1479. $4=$recv($5)._package();
  1480. self._selectedPackage_($4);
  1481. $6=self._showInstance();
  1482. if($core.assert($6)){
  1483. self["@selectedClass"]=$recv(aClass)._theNonMetaClass();
  1484. self["@selectedClass"];
  1485. } else {
  1486. self["@selectedClass"]=$recv(aClass)._theMetaClass();
  1487. self["@selectedClass"];
  1488. };
  1489. };
  1490. self["@selectedProtocol"]=nil;
  1491. self["@selectedProtocol"];
  1492. self._selectedProtocol_(self._allProtocol());
  1493. return $recv(self._announcer())._announce_($recv($HLClassSelected())._on_(self._selectedClass()));
  1494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1495. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  1496. //>>excludeEnd("ctx");
  1497. }));
  1498. return self;
  1499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1500. }, function($ctx1) {$ctx1.fill(self,"selectedClass:",{aClass:aClass},$globals.HLToolModel)});
  1501. //>>excludeEnd("ctx");
  1502. },
  1503. //>>excludeStart("ide", pragmas.excludeIdeData);
  1504. args: ["aClass"],
  1505. source: "selectedClass: aClass\x0a\x09(self selectedClass = aClass and: [ aClass isNil ]) \x0a\x09\x09ifTrue: [ ^ self ].\x0a\x09\x0a\x09self withChangesDo: [\x0a\x09\x09aClass \x0a \x09\x09\x09ifNil: [ selectedClass := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\x09self selectedPackage: aClass theNonMetaClass package.\x0a\x09\x09\x09\x09self showInstance \x0a \x09\x09\x09\x09\x09ifTrue: [ selectedClass := aClass theNonMetaClass ]\x0a \x09\x09\x09\x09ifFalse: [ selectedClass := aClass theMetaClass ] ].\x0a\x09\x09selectedProtocol := nil.\x0a\x09\x09self selectedProtocol: self allProtocol.\x0a\x09\x09self announcer announce: (HLClassSelected on: self selectedClass) ]",
  1506. referencedClasses: ["HLClassSelected"],
  1507. //>>excludeEnd("ide");
  1508. messageSends: ["ifTrue:", "and:", "=", "selectedClass", "isNil", "withChangesDo:", "ifNil:ifNotNil:", "selectedPackage:", "package", "theNonMetaClass", "ifTrue:ifFalse:", "showInstance", "theMetaClass", "selectedProtocol:", "allProtocol", "announce:", "announcer", "on:"]
  1509. }),
  1510. $globals.HLToolModel);
  1511. $core.addMethod(
  1512. $core.method({
  1513. selector: "selectedMethod",
  1514. protocol: 'accessing',
  1515. fn: function (){
  1516. var self=this;
  1517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1518. return $core.withContext(function($ctx1) {
  1519. //>>excludeEnd("ctx");
  1520. var $2,$1,$receiver;
  1521. $2=self._selectedClass();
  1522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1523. $ctx1.sendIdx["selectedClass"]=1;
  1524. //>>excludeEnd("ctx");
  1525. if(($receiver = $2) == null || $receiver.isNil){
  1526. $1=$2;
  1527. } else {
  1528. $1=$recv($recv(self._selectedClass())._methodDictionary())._at_ifAbsent_(self["@selectedSelector"],(function(){
  1529. return nil;
  1530. }));
  1531. };
  1532. return $1;
  1533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1534. }, function($ctx1) {$ctx1.fill(self,"selectedMethod",{},$globals.HLToolModel)});
  1535. //>>excludeEnd("ctx");
  1536. },
  1537. //>>excludeStart("ide", pragmas.excludeIdeData);
  1538. args: [],
  1539. source: "selectedMethod\x0a\x09^ self selectedClass ifNotNil: [ \x0a\x09\x09self selectedClass methodDictionary \x0a\x09\x09\x09at: selectedSelector \x0a\x09\x09\x09ifAbsent: [ nil ] ]",
  1540. referencedClasses: [],
  1541. //>>excludeEnd("ide");
  1542. messageSends: ["ifNotNil:", "selectedClass", "at:ifAbsent:", "methodDictionary"]
  1543. }),
  1544. $globals.HLToolModel);
  1545. $core.addMethod(
  1546. $core.method({
  1547. selector: "selectedMethod:",
  1548. protocol: 'accessing',
  1549. fn: function (aCompiledMethod){
  1550. var self=this;
  1551. function $HLMethodSelected(){return $globals.HLMethodSelected||(typeof HLMethodSelected=="undefined"?nil:HLMethodSelected)}
  1552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1553. return $core.withContext(function($ctx1) {
  1554. //>>excludeEnd("ctx");
  1555. var $1,$receiver;
  1556. $1=$recv(self["@selectedSelector"]).__eq(aCompiledMethod);
  1557. if($core.assert($1)){
  1558. return self;
  1559. };
  1560. self._withChangesDo_((function(){
  1561. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1562. return $core.withContext(function($ctx2) {
  1563. //>>excludeEnd("ctx");
  1564. if(($receiver = aCompiledMethod) == null || $receiver.isNil){
  1565. self["@selectedSelector"]=nil;
  1566. self["@selectedSelector"];
  1567. } else {
  1568. self["@selectedClass"]=$recv(aCompiledMethod)._methodClass();
  1569. self["@selectedClass"];
  1570. self["@selectedPackage"]=$recv($recv(self["@selectedClass"])._theNonMetaClass())._package();
  1571. self["@selectedPackage"];
  1572. self["@selectedSelector"]=$recv(aCompiledMethod)._selector();
  1573. self["@selectedSelector"];
  1574. };
  1575. return $recv(self._announcer())._announce_($recv($HLMethodSelected())._on_(aCompiledMethod));
  1576. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1577. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1578. //>>excludeEnd("ctx");
  1579. }));
  1580. return self;
  1581. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1582. }, function($ctx1) {$ctx1.fill(self,"selectedMethod:",{aCompiledMethod:aCompiledMethod},$globals.HLToolModel)});
  1583. //>>excludeEnd("ctx");
  1584. },
  1585. //>>excludeStart("ide", pragmas.excludeIdeData);
  1586. args: ["aCompiledMethod"],
  1587. source: "selectedMethod: aCompiledMethod\x0a\x09selectedSelector = aCompiledMethod ifTrue: [ ^ self ].\x0a \x0a self withChangesDo: [\x0a\x09\x09aCompiledMethod\x0a \x09\x09ifNil: [ selectedSelector := nil ]\x0a \x09\x09ifNotNil: [\x0a\x09\x09\x09\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) ]",
  1588. referencedClasses: ["HLMethodSelected"],
  1589. //>>excludeEnd("ide");
  1590. messageSends: ["ifTrue:", "=", "withChangesDo:", "ifNil:ifNotNil:", "methodClass", "package", "theNonMetaClass", "selector", "announce:", "announcer", "on:"]
  1591. }),
  1592. $globals.HLToolModel);
  1593. $core.addMethod(
  1594. $core.method({
  1595. selector: "selectedPackage",
  1596. protocol: 'accessing',
  1597. fn: function (){
  1598. var self=this;
  1599. var $1;
  1600. $1=self["@selectedPackage"];
  1601. return $1;
  1602. },
  1603. //>>excludeStart("ide", pragmas.excludeIdeData);
  1604. args: [],
  1605. source: "selectedPackage\x0a\x09^ selectedPackage",
  1606. referencedClasses: [],
  1607. //>>excludeEnd("ide");
  1608. messageSends: []
  1609. }),
  1610. $globals.HLToolModel);
  1611. $core.addMethod(
  1612. $core.method({
  1613. selector: "selectedPackage:",
  1614. protocol: 'accessing',
  1615. fn: function (aPackage){
  1616. var self=this;
  1617. function $HLPackageSelected(){return $globals.HLPackageSelected||(typeof HLPackageSelected=="undefined"?nil:HLPackageSelected)}
  1618. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1619. return $core.withContext(function($ctx1) {
  1620. //>>excludeEnd("ctx");
  1621. var $1;
  1622. $1=$recv(self["@selectedPackage"]).__eq(aPackage);
  1623. if($core.assert($1)){
  1624. return self;
  1625. };
  1626. self._withChangesDo_((function(){
  1627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1628. return $core.withContext(function($ctx2) {
  1629. //>>excludeEnd("ctx");
  1630. self["@selectedPackage"]=aPackage;
  1631. self["@selectedPackage"];
  1632. self._selectedClass_(nil);
  1633. return $recv(self._announcer())._announce_($recv($HLPackageSelected())._on_(aPackage));
  1634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1635. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1636. //>>excludeEnd("ctx");
  1637. }));
  1638. return self;
  1639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1640. }, function($ctx1) {$ctx1.fill(self,"selectedPackage:",{aPackage:aPackage},$globals.HLToolModel)});
  1641. //>>excludeEnd("ctx");
  1642. },
  1643. //>>excludeStart("ide", pragmas.excludeIdeData);
  1644. args: ["aPackage"],
  1645. 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) ]",
  1646. referencedClasses: ["HLPackageSelected"],
  1647. //>>excludeEnd("ide");
  1648. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedClass:", "announce:", "announcer", "on:"]
  1649. }),
  1650. $globals.HLToolModel);
  1651. $core.addMethod(
  1652. $core.method({
  1653. selector: "selectedProtocol",
  1654. protocol: 'accessing',
  1655. fn: function (){
  1656. var self=this;
  1657. var $1;
  1658. $1=self["@selectedProtocol"];
  1659. return $1;
  1660. },
  1661. //>>excludeStart("ide", pragmas.excludeIdeData);
  1662. args: [],
  1663. source: "selectedProtocol\x0a\x09^ selectedProtocol",
  1664. referencedClasses: [],
  1665. //>>excludeEnd("ide");
  1666. messageSends: []
  1667. }),
  1668. $globals.HLToolModel);
  1669. $core.addMethod(
  1670. $core.method({
  1671. selector: "selectedProtocol:",
  1672. protocol: 'accessing',
  1673. fn: function (aString){
  1674. var self=this;
  1675. function $HLProtocolSelected(){return $globals.HLProtocolSelected||(typeof HLProtocolSelected=="undefined"?nil:HLProtocolSelected)}
  1676. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1677. return $core.withContext(function($ctx1) {
  1678. //>>excludeEnd("ctx");
  1679. var $1;
  1680. $1=$recv(self["@selectedProtocol"]).__eq(aString);
  1681. if($core.assert($1)){
  1682. return self;
  1683. };
  1684. self._withChangesDo_((function(){
  1685. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1686. return $core.withContext(function($ctx2) {
  1687. //>>excludeEnd("ctx");
  1688. self["@selectedProtocol"]=aString;
  1689. self["@selectedProtocol"];
  1690. self._selectedMethod_(nil);
  1691. return $recv(self._announcer())._announce_($recv($HLProtocolSelected())._on_(aString));
  1692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1693. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1694. //>>excludeEnd("ctx");
  1695. }));
  1696. return self;
  1697. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1698. }, function($ctx1) {$ctx1.fill(self,"selectedProtocol:",{aString:aString},$globals.HLToolModel)});
  1699. //>>excludeEnd("ctx");
  1700. },
  1701. //>>excludeStart("ide", pragmas.excludeIdeData);
  1702. args: ["aString"],
  1703. 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) ]",
  1704. referencedClasses: ["HLProtocolSelected"],
  1705. //>>excludeEnd("ide");
  1706. messageSends: ["ifTrue:", "=", "withChangesDo:", "selectedMethod:", "announce:", "announcer", "on:"]
  1707. }),
  1708. $globals.HLToolModel);
  1709. $core.addMethod(
  1710. $core.method({
  1711. selector: "shouldCompileDefinition:",
  1712. protocol: 'testing',
  1713. fn: function (aString){
  1714. var self=this;
  1715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1716. return $core.withContext(function($ctx1) {
  1717. //>>excludeEnd("ctx");
  1718. var $1;
  1719. $1=$recv($recv(self._selectedClass())._isNil())._or_((function(){
  1720. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1721. return $core.withContext(function($ctx2) {
  1722. //>>excludeEnd("ctx");
  1723. return $recv(aString)._match_("^\x5cs*[A-Z]");
  1724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1725. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1726. //>>excludeEnd("ctx");
  1727. }));
  1728. return $1;
  1729. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1730. }, function($ctx1) {$ctx1.fill(self,"shouldCompileDefinition:",{aString:aString},$globals.HLToolModel)});
  1731. //>>excludeEnd("ctx");
  1732. },
  1733. //>>excludeStart("ide", pragmas.excludeIdeData);
  1734. args: ["aString"],
  1735. source: "shouldCompileDefinition: aString\x0a\x09^ self selectedClass isNil or: [\x0a\x09\x09aString match: '^\x5cs*[A-Z]' ]",
  1736. referencedClasses: [],
  1737. //>>excludeEnd("ide");
  1738. messageSends: ["or:", "isNil", "selectedClass", "match:"]
  1739. }),
  1740. $globals.HLToolModel);
  1741. $core.addMethod(
  1742. $core.method({
  1743. selector: "unclassifiedProtocol",
  1744. protocol: 'defaults',
  1745. fn: function (){
  1746. var self=this;
  1747. return "as yet unclassified";
  1748. },
  1749. //>>excludeStart("ide", pragmas.excludeIdeData);
  1750. args: [],
  1751. source: "unclassifiedProtocol\x0a\x09^ 'as yet unclassified'",
  1752. referencedClasses: [],
  1753. //>>excludeEnd("ide");
  1754. messageSends: []
  1755. }),
  1756. $globals.HLToolModel);
  1757. $core.addMethod(
  1758. $core.method({
  1759. selector: "withCompileErrorHandling:",
  1760. protocol: 'error handling',
  1761. fn: function (aBlock){
  1762. var self=this;
  1763. function $ParseError(){return $globals.ParseError||(typeof ParseError=="undefined"?nil:ParseError)}
  1764. function $UnknownVariableError(){return $globals.UnknownVariableError||(typeof UnknownVariableError=="undefined"?nil:UnknownVariableError)}
  1765. function $CompilerError(){return $globals.CompilerError||(typeof CompilerError=="undefined"?nil:CompilerError)}
  1766. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1767. return $core.withContext(function($ctx1) {
  1768. //>>excludeEnd("ctx");
  1769. var $1,$2;
  1770. $1=self._environment();
  1771. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1772. $ctx1.sendIdx["environment"]=1;
  1773. //>>excludeEnd("ctx");
  1774. $recv($1)._evaluate_on_do_((function(){
  1775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1776. return $core.withContext(function($ctx2) {
  1777. //>>excludeEnd("ctx");
  1778. $2=self._environment();
  1779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1780. $ctx2.sendIdx["environment"]=2;
  1781. //>>excludeEnd("ctx");
  1782. return $recv($2)._evaluate_on_do_((function(){
  1783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1784. return $core.withContext(function($ctx3) {
  1785. //>>excludeEnd("ctx");
  1786. return $recv(self._environment())._evaluate_on_do_(aBlock,$ParseError(),(function(ex){
  1787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1788. return $core.withContext(function($ctx4) {
  1789. //>>excludeEnd("ctx");
  1790. return self._handleParseError_(ex);
  1791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1792. }, function($ctx4) {$ctx4.fillBlock({ex:ex},$ctx3,3)});
  1793. //>>excludeEnd("ctx");
  1794. }));
  1795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1796. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  1797. //>>excludeEnd("ctx");
  1798. }),$UnknownVariableError(),(function(ex){
  1799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1800. return $core.withContext(function($ctx3) {
  1801. //>>excludeEnd("ctx");
  1802. return self._handleUnkownVariableError_(ex);
  1803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1804. }, function($ctx3) {$ctx3.fillBlock({ex:ex},$ctx2,4)});
  1805. //>>excludeEnd("ctx");
  1806. }));
  1807. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1808. $ctx2.sendIdx["evaluate:on:do:"]=2;
  1809. //>>excludeEnd("ctx");
  1810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1811. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  1812. //>>excludeEnd("ctx");
  1813. }),$CompilerError(),(function(ex){
  1814. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1815. return $core.withContext(function($ctx2) {
  1816. //>>excludeEnd("ctx");
  1817. return self._handleCompileError_(ex);
  1818. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1819. }, function($ctx2) {$ctx2.fillBlock({ex:ex},$ctx1,5)});
  1820. //>>excludeEnd("ctx");
  1821. }));
  1822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1823. $ctx1.sendIdx["evaluate:on:do:"]=1;
  1824. //>>excludeEnd("ctx");
  1825. return self;
  1826. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1827. }, function($ctx1) {$ctx1.fill(self,"withCompileErrorHandling:",{aBlock:aBlock},$globals.HLToolModel)});
  1828. //>>excludeEnd("ctx");
  1829. },
  1830. //>>excludeStart("ide", pragmas.excludeIdeData);
  1831. args: ["aBlock"],
  1832. 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 ]",
  1833. referencedClasses: ["ParseError", "UnknownVariableError", "CompilerError"],
  1834. //>>excludeEnd("ide");
  1835. messageSends: ["evaluate:on:do:", "environment", "handleParseError:", "handleUnkownVariableError:", "handleCompileError:"]
  1836. }),
  1837. $globals.HLToolModel);
  1838. $core.addMethod(
  1839. $core.method({
  1840. selector: "withHelperLabelled:do:",
  1841. protocol: 'private',
  1842. fn: function (aString,aBlock){
  1843. var self=this;
  1844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1845. return $core.withContext(function($ctx1) {
  1846. //>>excludeEnd("ctx");
  1847. var $1,$3,$4,$2,$5;
  1848. $1="#helper"._asJQuery();
  1849. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1850. $ctx1.sendIdx["asJQuery"]=1;
  1851. //>>excludeEnd("ctx");
  1852. $recv($1)._remove();
  1853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1854. $ctx1.sendIdx["remove"]=1;
  1855. //>>excludeEnd("ctx");
  1856. $2=(function(html){
  1857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1858. return $core.withContext(function($ctx2) {
  1859. //>>excludeEnd("ctx");
  1860. $3=$recv(html)._div();
  1861. $recv($3)._id_("helper");
  1862. $4=$recv($3)._with_(aString);
  1863. return $4;
  1864. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1865. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  1866. //>>excludeEnd("ctx");
  1867. });
  1868. $5="body"._asJQuery();
  1869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1870. $ctx1.sendIdx["asJQuery"]=2;
  1871. //>>excludeEnd("ctx");
  1872. $recv($2)._appendToJQuery_($5);
  1873. $recv((function(){
  1874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1875. return $core.withContext(function($ctx2) {
  1876. //>>excludeEnd("ctx");
  1877. $recv(aBlock)._value();
  1878. return $recv("#helper"._asJQuery())._remove();
  1879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1880. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  1881. //>>excludeEnd("ctx");
  1882. }))._valueWithTimeout_((10));
  1883. return self;
  1884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1885. }, function($ctx1) {$ctx1.fill(self,"withHelperLabelled:do:",{aString:aString,aBlock:aBlock},$globals.HLToolModel)});
  1886. //>>excludeEnd("ctx");
  1887. },
  1888. //>>excludeStart("ide", pragmas.excludeIdeData);
  1889. args: ["aString", "aBlock"],
  1890. 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",
  1891. referencedClasses: [],
  1892. //>>excludeEnd("ide");
  1893. messageSends: ["remove", "asJQuery", "appendToJQuery:", "id:", "div", "with:", "valueWithTimeout:", "value"]
  1894. }),
  1895. $globals.HLToolModel);
  1896. $core.addMethod(
  1897. $core.method({
  1898. selector: "on:",
  1899. protocol: 'actions',
  1900. fn: function (anEnvironment){
  1901. var self=this;
  1902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1903. return $core.withContext(function($ctx1) {
  1904. //>>excludeEnd("ctx");
  1905. var $2,$3,$1;
  1906. $2=self._new();
  1907. $recv($2)._environment_(anEnvironment);
  1908. $3=$recv($2)._yourself();
  1909. $1=$3;
  1910. return $1;
  1911. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1912. }, function($ctx1) {$ctx1.fill(self,"on:",{anEnvironment:anEnvironment},$globals.HLToolModel.klass)});
  1913. //>>excludeEnd("ctx");
  1914. },
  1915. //>>excludeStart("ide", pragmas.excludeIdeData);
  1916. args: ["anEnvironment"],
  1917. source: "on: anEnvironment\x0a\x0a\x09^ self new\x0a \x09environment: anEnvironment;\x0a yourself",
  1918. referencedClasses: [],
  1919. //>>excludeEnd("ide");
  1920. messageSends: ["environment:", "new", "yourself"]
  1921. }),
  1922. $globals.HLToolModel.klass);
  1923. $core.addClass('HLProgressHandler', $globals.Object, [], 'Helios-Core');
  1924. //>>excludeStart("ide", pragmas.excludeIdeData);
  1925. $globals.HLProgressHandler.comment="I am a specific progress handler for Helios, displaying progresses in a modal window.";
  1926. //>>excludeEnd("ide");
  1927. $core.addMethod(
  1928. $core.method({
  1929. selector: "do:on:displaying:",
  1930. protocol: 'progress handling',
  1931. fn: function (aBlock,aCollection,aString){
  1932. var self=this;
  1933. function $HLProgressWidget(){return $globals.HLProgressWidget||(typeof HLProgressWidget=="undefined"?nil:HLProgressWidget)}
  1934. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1935. return $core.withContext(function($ctx1) {
  1936. //>>excludeEnd("ctx");
  1937. $recv($recv($HLProgressWidget())._default())._do_on_displaying_(aBlock,aCollection,aString);
  1938. return self;
  1939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1940. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString},$globals.HLProgressHandler)});
  1941. //>>excludeEnd("ctx");
  1942. },
  1943. //>>excludeStart("ide", pragmas.excludeIdeData);
  1944. args: ["aBlock", "aCollection", "aString"],
  1945. source: "do: aBlock on: aCollection displaying: aString\x0a\x09HLProgressWidget default\x0a\x09\x09do: aBlock \x0a\x09\x09on: aCollection \x0a\x09\x09displaying: aString",
  1946. referencedClasses: ["HLProgressWidget"],
  1947. //>>excludeEnd("ide");
  1948. messageSends: ["do:on:displaying:", "default"]
  1949. }),
  1950. $globals.HLProgressHandler);
  1951. $core.addClass('HLWidget', $globals.Widget, ['wrapper'], 'Helios-Core');
  1952. //>>excludeStart("ide", pragmas.excludeIdeData);
  1953. $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:`.";
  1954. //>>excludeEnd("ide");
  1955. $core.addMethod(
  1956. $core.method({
  1957. selector: "bindKeyDown:keyUp:",
  1958. protocol: 'keybindings',
  1959. fn: function (keyDownBlock,keyUpBlock){
  1960. var self=this;
  1961. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1962. return $core.withContext(function($ctx1) {
  1963. //>>excludeEnd("ctx");
  1964. var $1,$2;
  1965. $1=$recv(self._wrapper())._asJQuery();
  1966. $recv($1)._keydown_(keyDownBlock);
  1967. $2=$recv($1)._keyup_(keyUpBlock);
  1968. return self;
  1969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  1970. }, function($ctx1) {$ctx1.fill(self,"bindKeyDown:keyUp:",{keyDownBlock:keyDownBlock,keyUpBlock:keyUpBlock},$globals.HLWidget)});
  1971. //>>excludeEnd("ctx");
  1972. },
  1973. //>>excludeStart("ide", pragmas.excludeIdeData);
  1974. args: ["keyDownBlock", "keyUpBlock"],
  1975. source: "bindKeyDown: keyDownBlock keyUp: keyUpBlock\x0a\x09self wrapper asJQuery\x0a\x09\x09keydown: keyDownBlock;\x0a\x09\x09keyup: keyUpBlock",
  1976. referencedClasses: [],
  1977. //>>excludeEnd("ide");
  1978. messageSends: ["keydown:", "asJQuery", "wrapper", "keyup:"]
  1979. }),
  1980. $globals.HLWidget);
  1981. $core.addMethod(
  1982. $core.method({
  1983. selector: "canHaveFocus",
  1984. protocol: 'testing',
  1985. fn: function (){
  1986. var self=this;
  1987. return false;
  1988. },
  1989. //>>excludeStart("ide", pragmas.excludeIdeData);
  1990. args: [],
  1991. source: "canHaveFocus\x0a\x09^ false",
  1992. referencedClasses: [],
  1993. //>>excludeEnd("ide");
  1994. messageSends: []
  1995. }),
  1996. $globals.HLWidget);
  1997. $core.addMethod(
  1998. $core.method({
  1999. selector: "confirm:ifTrue:",
  2000. protocol: 'actions',
  2001. fn: function (aString,aBlock){
  2002. var self=this;
  2003. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2004. return $core.withContext(function($ctx1) {
  2005. //>>excludeEnd("ctx");
  2006. $recv(self._manager())._confirm_ifTrue_(aString,aBlock);
  2007. return self;
  2008. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2009. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2010. //>>excludeEnd("ctx");
  2011. },
  2012. //>>excludeStart("ide", pragmas.excludeIdeData);
  2013. args: ["aString", "aBlock"],
  2014. source: "confirm: aString ifTrue: aBlock\x0a\x09self manager confirm: aString ifTrue: aBlock",
  2015. referencedClasses: [],
  2016. //>>excludeEnd("ide");
  2017. messageSends: ["confirm:ifTrue:", "manager"]
  2018. }),
  2019. $globals.HLWidget);
  2020. $core.addMethod(
  2021. $core.method({
  2022. selector: "confirm:ifTrue:ifFalse:",
  2023. protocol: 'actions',
  2024. fn: function (aString,aBlock,anotherBlock){
  2025. var self=this;
  2026. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2027. return $core.withContext(function($ctx1) {
  2028. //>>excludeEnd("ctx");
  2029. $recv(self._manager())._confirm_ifTrue_ifFalse_(aString,aBlock,anotherBlock);
  2030. return self;
  2031. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2032. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLWidget)});
  2033. //>>excludeEnd("ctx");
  2034. },
  2035. //>>excludeStart("ide", pragmas.excludeIdeData);
  2036. args: ["aString", "aBlock", "anotherBlock"],
  2037. source: "confirm: aString ifTrue: aBlock ifFalse: anotherBlock\x0a\x09self manager \x0a\x09\x09confirm: aString \x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: anotherBlock",
  2038. referencedClasses: [],
  2039. //>>excludeEnd("ide");
  2040. messageSends: ["confirm:ifTrue:ifFalse:", "manager"]
  2041. }),
  2042. $globals.HLWidget);
  2043. $core.addMethod(
  2044. $core.method({
  2045. selector: "cssClass",
  2046. protocol: 'accessing',
  2047. fn: function (){
  2048. var self=this;
  2049. return "hl_widget";
  2050. },
  2051. //>>excludeStart("ide", pragmas.excludeIdeData);
  2052. args: [],
  2053. source: "cssClass\x0a\x09^ 'hl_widget'",
  2054. referencedClasses: [],
  2055. //>>excludeEnd("ide");
  2056. messageSends: []
  2057. }),
  2058. $globals.HLWidget);
  2059. $core.addMethod(
  2060. $core.method({
  2061. selector: "defaultTabLabel",
  2062. protocol: 'defaults',
  2063. fn: function (){
  2064. var self=this;
  2065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2066. return $core.withContext(function($ctx1) {
  2067. //>>excludeEnd("ctx");
  2068. var $1;
  2069. $1=$recv(self._class())._tabLabel();
  2070. return $1;
  2071. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2072. }, function($ctx1) {$ctx1.fill(self,"defaultTabLabel",{},$globals.HLWidget)});
  2073. //>>excludeEnd("ctx");
  2074. },
  2075. //>>excludeStart("ide", pragmas.excludeIdeData);
  2076. args: [],
  2077. source: "defaultTabLabel\x0a\x09^ self class tabLabel",
  2078. referencedClasses: [],
  2079. //>>excludeEnd("ide");
  2080. messageSends: ["tabLabel", "class"]
  2081. }),
  2082. $globals.HLWidget);
  2083. $core.addMethod(
  2084. $core.method({
  2085. selector: "execute:",
  2086. protocol: 'actions',
  2087. fn: function (aCommand){
  2088. var self=this;
  2089. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  2090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2091. return $core.withContext(function($ctx1) {
  2092. //>>excludeEnd("ctx");
  2093. var $1,$2;
  2094. $1=$recv($recv($HLManager())._current())._keyBinder();
  2095. $recv($1)._activate();
  2096. $2=$recv($1)._applyBinding_($recv(aCommand)._asBinding());
  2097. return self;
  2098. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2099. }, function($ctx1) {$ctx1.fill(self,"execute:",{aCommand:aCommand},$globals.HLWidget)});
  2100. //>>excludeEnd("ctx");
  2101. },
  2102. //>>excludeStart("ide", pragmas.excludeIdeData);
  2103. args: ["aCommand"],
  2104. source: "execute: aCommand\x0a\x09HLManager current keyBinder\x0a\x09\x09activate;\x0a\x09\x09applyBinding: aCommand asBinding",
  2105. referencedClasses: ["HLManager"],
  2106. //>>excludeEnd("ide");
  2107. messageSends: ["activate", "keyBinder", "current", "applyBinding:", "asBinding"]
  2108. }),
  2109. $globals.HLWidget);
  2110. $core.addMethod(
  2111. $core.method({
  2112. selector: "inform:",
  2113. protocol: 'actions',
  2114. fn: function (aString){
  2115. var self=this;
  2116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2117. return $core.withContext(function($ctx1) {
  2118. //>>excludeEnd("ctx");
  2119. $recv(self._manager())._inform_(aString);
  2120. return self;
  2121. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2122. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLWidget)});
  2123. //>>excludeEnd("ctx");
  2124. },
  2125. //>>excludeStart("ide", pragmas.excludeIdeData);
  2126. args: ["aString"],
  2127. source: "inform: aString\x0a\x09self manager inform: aString",
  2128. referencedClasses: [],
  2129. //>>excludeEnd("ide");
  2130. messageSends: ["inform:", "manager"]
  2131. }),
  2132. $globals.HLWidget);
  2133. $core.addMethod(
  2134. $core.method({
  2135. selector: "manager",
  2136. protocol: 'accessing',
  2137. fn: function (){
  2138. var self=this;
  2139. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  2140. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2141. return $core.withContext(function($ctx1) {
  2142. //>>excludeEnd("ctx");
  2143. var $1;
  2144. $1=$recv($HLManager())._current();
  2145. return $1;
  2146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2147. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLWidget)});
  2148. //>>excludeEnd("ctx");
  2149. },
  2150. //>>excludeStart("ide", pragmas.excludeIdeData);
  2151. args: [],
  2152. source: "manager\x0a\x09^ HLManager current",
  2153. referencedClasses: ["HLManager"],
  2154. //>>excludeEnd("ide");
  2155. messageSends: ["current"]
  2156. }),
  2157. $globals.HLWidget);
  2158. $core.addMethod(
  2159. $core.method({
  2160. selector: "openAsTab",
  2161. protocol: 'actions',
  2162. fn: function (){
  2163. var self=this;
  2164. function $HLTabWidget(){return $globals.HLTabWidget||(typeof HLTabWidget=="undefined"?nil:HLTabWidget)}
  2165. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2166. return $core.withContext(function($ctx1) {
  2167. //>>excludeEnd("ctx");
  2168. $recv($recv($HLTabWidget())._on_labelled_(self,self._defaultTabLabel()))._add();
  2169. return self;
  2170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2171. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{},$globals.HLWidget)});
  2172. //>>excludeEnd("ctx");
  2173. },
  2174. //>>excludeStart("ide", pragmas.excludeIdeData);
  2175. args: [],
  2176. source: "openAsTab\x0a\x09(HLTabWidget on: self labelled: self defaultTabLabel)\x0a\x09\x09add",
  2177. referencedClasses: ["HLTabWidget"],
  2178. //>>excludeEnd("ide");
  2179. messageSends: ["add", "on:labelled:", "defaultTabLabel"]
  2180. }),
  2181. $globals.HLWidget);
  2182. $core.addMethod(
  2183. $core.method({
  2184. selector: "refresh",
  2185. protocol: 'updating',
  2186. fn: function (){
  2187. var self=this;
  2188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2189. return $core.withContext(function($ctx1) {
  2190. //>>excludeEnd("ctx");
  2191. var $1,$3,$2,$receiver;
  2192. $1=self._wrapper();
  2193. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2194. $ctx1.sendIdx["wrapper"]=1;
  2195. //>>excludeEnd("ctx");
  2196. if(($receiver = $1) == null || $receiver.isNil){
  2197. return self;
  2198. } else {
  2199. $1;
  2200. };
  2201. $3=self._wrapper();
  2202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2203. $ctx1.sendIdx["wrapper"]=2;
  2204. //>>excludeEnd("ctx");
  2205. $2=$recv($3)._asJQuery();
  2206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2207. $ctx1.sendIdx["asJQuery"]=1;
  2208. //>>excludeEnd("ctx");
  2209. $recv($2)._empty();
  2210. $recv((function(html){
  2211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2212. return $core.withContext(function($ctx2) {
  2213. //>>excludeEnd("ctx");
  2214. return self._renderContentOn_(html);
  2215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2216. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,2)});
  2217. //>>excludeEnd("ctx");
  2218. }))._appendToJQuery_($recv(self._wrapper())._asJQuery());
  2219. return self;
  2220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2221. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLWidget)});
  2222. //>>excludeEnd("ctx");
  2223. },
  2224. //>>excludeStart("ide", pragmas.excludeIdeData);
  2225. args: [],
  2226. source: "refresh\x0a\x09self wrapper ifNil: [ ^ self ].\x0a \x0a\x09self wrapper asJQuery empty.\x0a [ :html | self renderContentOn: html ] appendToJQuery: self wrapper asJQuery",
  2227. referencedClasses: [],
  2228. //>>excludeEnd("ide");
  2229. messageSends: ["ifNil:", "wrapper", "empty", "asJQuery", "appendToJQuery:", "renderContentOn:"]
  2230. }),
  2231. $globals.HLWidget);
  2232. $core.addMethod(
  2233. $core.method({
  2234. selector: "registerBindings",
  2235. protocol: 'keybindings',
  2236. fn: function (){
  2237. var self=this;
  2238. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2239. return $core.withContext(function($ctx1) {
  2240. //>>excludeEnd("ctx");
  2241. self._registerBindingsOn_($recv($recv(self._manager())._keyBinder())._bindings());
  2242. return self;
  2243. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2244. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLWidget)});
  2245. //>>excludeEnd("ctx");
  2246. },
  2247. //>>excludeStart("ide", pragmas.excludeIdeData);
  2248. args: [],
  2249. source: "registerBindings\x0a\x09self registerBindingsOn: self manager keyBinder bindings",
  2250. referencedClasses: [],
  2251. //>>excludeEnd("ide");
  2252. messageSends: ["registerBindingsOn:", "bindings", "keyBinder", "manager"]
  2253. }),
  2254. $globals.HLWidget);
  2255. $core.addMethod(
  2256. $core.method({
  2257. selector: "registerBindingsOn:",
  2258. protocol: 'keybindings',
  2259. fn: function (aBindingGroup){
  2260. var self=this;
  2261. return self;
  2262. },
  2263. //>>excludeStart("ide", pragmas.excludeIdeData);
  2264. args: ["aBindingGroup"],
  2265. source: "registerBindingsOn: aBindingGroup",
  2266. referencedClasses: [],
  2267. //>>excludeEnd("ide");
  2268. messageSends: []
  2269. }),
  2270. $globals.HLWidget);
  2271. $core.addMethod(
  2272. $core.method({
  2273. selector: "removeTab",
  2274. protocol: 'accessing',
  2275. fn: function (){
  2276. var self=this;
  2277. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2278. return $core.withContext(function($ctx1) {
  2279. //>>excludeEnd("ctx");
  2280. $recv(self._manager())._removeTabForWidget_(self);
  2281. return self;
  2282. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2283. }, function($ctx1) {$ctx1.fill(self,"removeTab",{},$globals.HLWidget)});
  2284. //>>excludeEnd("ctx");
  2285. },
  2286. //>>excludeStart("ide", pragmas.excludeIdeData);
  2287. args: [],
  2288. source: "removeTab\x0a\x09self manager removeTabForWidget: self",
  2289. referencedClasses: [],
  2290. //>>excludeEnd("ide");
  2291. messageSends: ["removeTabForWidget:", "manager"]
  2292. }),
  2293. $globals.HLWidget);
  2294. $core.addMethod(
  2295. $core.method({
  2296. selector: "renderContentOn:",
  2297. protocol: 'rendering',
  2298. fn: function (html){
  2299. var self=this;
  2300. return self;
  2301. },
  2302. //>>excludeStart("ide", pragmas.excludeIdeData);
  2303. args: ["html"],
  2304. source: "renderContentOn: html",
  2305. referencedClasses: [],
  2306. //>>excludeEnd("ide");
  2307. messageSends: []
  2308. }),
  2309. $globals.HLWidget);
  2310. $core.addMethod(
  2311. $core.method({
  2312. selector: "renderOn:",
  2313. protocol: 'rendering',
  2314. fn: function (html){
  2315. var self=this;
  2316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2317. return $core.withContext(function($ctx1) {
  2318. //>>excludeEnd("ctx");
  2319. var $1,$2;
  2320. $1=$recv(html)._div();
  2321. $recv($1)._class_(self._cssClass());
  2322. $2=$recv($1)._yourself();
  2323. self["@wrapper"]=$2;
  2324. $recv((function(renderer){
  2325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2326. return $core.withContext(function($ctx2) {
  2327. //>>excludeEnd("ctx");
  2328. return self._renderContentOn_(renderer);
  2329. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2330. }, function($ctx2) {$ctx2.fillBlock({renderer:renderer},$ctx1,1)});
  2331. //>>excludeEnd("ctx");
  2332. }))._appendToJQuery_($recv(self["@wrapper"])._asJQuery());
  2333. return self;
  2334. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2335. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLWidget)});
  2336. //>>excludeEnd("ctx");
  2337. },
  2338. //>>excludeStart("ide", pragmas.excludeIdeData);
  2339. args: ["html"],
  2340. source: "renderOn: html\x0a\x09wrapper := html div\x0a\x09\x09class: self cssClass;\x0a\x09\x09yourself.\x0a [ :renderer | self renderContentOn: renderer ] appendToJQuery: wrapper asJQuery",
  2341. referencedClasses: [],
  2342. //>>excludeEnd("ide");
  2343. messageSends: ["class:", "div", "cssClass", "yourself", "appendToJQuery:", "renderContentOn:", "asJQuery"]
  2344. }),
  2345. $globals.HLWidget);
  2346. $core.addMethod(
  2347. $core.method({
  2348. selector: "request:do:",
  2349. protocol: 'actions',
  2350. fn: function (aString,aBlock){
  2351. var self=this;
  2352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2353. return $core.withContext(function($ctx1) {
  2354. //>>excludeEnd("ctx");
  2355. $recv(self._manager())._request_do_(aString,aBlock);
  2356. return self;
  2357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2358. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLWidget)});
  2359. //>>excludeEnd("ctx");
  2360. },
  2361. //>>excludeStart("ide", pragmas.excludeIdeData);
  2362. args: ["aString", "aBlock"],
  2363. source: "request: aString do: aBlock\x0a\x09self manager request: aString do: aBlock",
  2364. referencedClasses: [],
  2365. //>>excludeEnd("ide");
  2366. messageSends: ["request:do:", "manager"]
  2367. }),
  2368. $globals.HLWidget);
  2369. $core.addMethod(
  2370. $core.method({
  2371. selector: "request:value:do:",
  2372. protocol: 'actions',
  2373. fn: function (aString,valueString,aBlock){
  2374. var self=this;
  2375. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2376. return $core.withContext(function($ctx1) {
  2377. //>>excludeEnd("ctx");
  2378. $recv(self._manager())._request_value_do_(aString,valueString,aBlock);
  2379. return self;
  2380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2381. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLWidget)});
  2382. //>>excludeEnd("ctx");
  2383. },
  2384. //>>excludeStart("ide", pragmas.excludeIdeData);
  2385. args: ["aString", "valueString", "aBlock"],
  2386. source: "request: aString value: valueString do: aBlock\x0a\x09self manager \x0a\x09\x09request: aString \x0a\x09\x09value: valueString\x0a\x09\x09do: aBlock",
  2387. referencedClasses: [],
  2388. //>>excludeEnd("ide");
  2389. messageSends: ["request:value:do:", "manager"]
  2390. }),
  2391. $globals.HLWidget);
  2392. $core.addMethod(
  2393. $core.method({
  2394. selector: "setTabLabel:",
  2395. protocol: 'accessing',
  2396. fn: function (aString){
  2397. var self=this;
  2398. function $HLTabLabelChanged(){return $globals.HLTabLabelChanged||(typeof HLTabLabelChanged=="undefined"?nil:HLTabLabelChanged)}
  2399. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2400. return $core.withContext(function($ctx1) {
  2401. //>>excludeEnd("ctx");
  2402. var $1,$2;
  2403. $1=$recv($HLTabLabelChanged())._new();
  2404. $recv($1)._widget_(self);
  2405. $recv($1)._label_(aString);
  2406. $2=$recv($1)._yourself();
  2407. $recv($recv(self._manager())._announcer())._announce_($2);
  2408. return self;
  2409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2410. }, function($ctx1) {$ctx1.fill(self,"setTabLabel:",{aString:aString},$globals.HLWidget)});
  2411. //>>excludeEnd("ctx");
  2412. },
  2413. //>>excludeStart("ide", pragmas.excludeIdeData);
  2414. args: ["aString"],
  2415. source: "setTabLabel: aString\x0a\x09self manager announcer announce: (HLTabLabelChanged new\x0a\x09\x09widget: self;\x0a\x09\x09label: aString;\x0a\x09\x09yourself)",
  2416. referencedClasses: ["HLTabLabelChanged"],
  2417. //>>excludeEnd("ide");
  2418. messageSends: ["announce:", "announcer", "manager", "widget:", "new", "label:", "yourself"]
  2419. }),
  2420. $globals.HLWidget);
  2421. $core.addMethod(
  2422. $core.method({
  2423. selector: "tabClass",
  2424. protocol: 'accessing',
  2425. fn: function (){
  2426. var self=this;
  2427. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2428. return $core.withContext(function($ctx1) {
  2429. //>>excludeEnd("ctx");
  2430. var $1;
  2431. $1=$recv(self._class())._tabClass();
  2432. return $1;
  2433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2434. }, function($ctx1) {$ctx1.fill(self,"tabClass",{},$globals.HLWidget)});
  2435. //>>excludeEnd("ctx");
  2436. },
  2437. //>>excludeStart("ide", pragmas.excludeIdeData);
  2438. args: [],
  2439. source: "tabClass\x0a\x09^ self class tabClass",
  2440. referencedClasses: [],
  2441. //>>excludeEnd("ide");
  2442. messageSends: ["tabClass", "class"]
  2443. }),
  2444. $globals.HLWidget);
  2445. $core.addMethod(
  2446. $core.method({
  2447. selector: "unbindKeyDownKeyUp",
  2448. protocol: 'keybindings',
  2449. fn: function (){
  2450. var self=this;
  2451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2452. return $core.withContext(function($ctx1) {
  2453. //>>excludeEnd("ctx");
  2454. var $1,$2;
  2455. $1=$recv(self._wrapper())._asJQuery();
  2456. $recv($1)._unbind_("keydown");
  2457. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2458. $ctx1.sendIdx["unbind:"]=1;
  2459. //>>excludeEnd("ctx");
  2460. $2=$recv($1)._unbind_("keyup");
  2461. return self;
  2462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2463. }, function($ctx1) {$ctx1.fill(self,"unbindKeyDownKeyUp",{},$globals.HLWidget)});
  2464. //>>excludeEnd("ctx");
  2465. },
  2466. //>>excludeStart("ide", pragmas.excludeIdeData);
  2467. args: [],
  2468. source: "unbindKeyDownKeyUp\x0a\x09self wrapper asJQuery\x0a\x09\x09unbind: 'keydown';\x0a\x09\x09unbind: 'keyup'",
  2469. referencedClasses: [],
  2470. //>>excludeEnd("ide");
  2471. messageSends: ["unbind:", "asJQuery", "wrapper"]
  2472. }),
  2473. $globals.HLWidget);
  2474. $core.addMethod(
  2475. $core.method({
  2476. selector: "unregister",
  2477. protocol: 'actions',
  2478. fn: function (){
  2479. var self=this;
  2480. return self;
  2481. },
  2482. //>>excludeStart("ide", pragmas.excludeIdeData);
  2483. args: [],
  2484. 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",
  2485. referencedClasses: [],
  2486. //>>excludeEnd("ide");
  2487. messageSends: []
  2488. }),
  2489. $globals.HLWidget);
  2490. $core.addMethod(
  2491. $core.method({
  2492. selector: "wrapper",
  2493. protocol: 'accessing',
  2494. fn: function (){
  2495. var self=this;
  2496. var $1;
  2497. $1=self["@wrapper"];
  2498. return $1;
  2499. },
  2500. //>>excludeStart("ide", pragmas.excludeIdeData);
  2501. args: [],
  2502. source: "wrapper\x0a\x09^ wrapper",
  2503. referencedClasses: [],
  2504. //>>excludeEnd("ide");
  2505. messageSends: []
  2506. }),
  2507. $globals.HLWidget);
  2508. $core.addMethod(
  2509. $core.method({
  2510. selector: "canBeOpenAsTab",
  2511. protocol: 'testing',
  2512. fn: function (){
  2513. var self=this;
  2514. return false;
  2515. },
  2516. //>>excludeStart("ide", pragmas.excludeIdeData);
  2517. args: [],
  2518. source: "canBeOpenAsTab\x0a\x09^ false",
  2519. referencedClasses: [],
  2520. //>>excludeEnd("ide");
  2521. messageSends: []
  2522. }),
  2523. $globals.HLWidget.klass);
  2524. $core.addMethod(
  2525. $core.method({
  2526. selector: "openAsTab",
  2527. protocol: 'accessing',
  2528. fn: function (){
  2529. var self=this;
  2530. var instance;
  2531. function $HLTabWidget(){return $globals.HLTabWidget||(typeof HLTabWidget=="undefined"?nil:HLTabWidget)}
  2532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2533. return $core.withContext(function($ctx1) {
  2534. //>>excludeEnd("ctx");
  2535. var $1;
  2536. instance=self._new();
  2537. $recv($recv($HLTabWidget())._on_labelled_(instance,$recv(instance)._defaultTabLabel()))._add();
  2538. $1=instance;
  2539. return $1;
  2540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2541. }, function($ctx1) {$ctx1.fill(self,"openAsTab",{instance:instance},$globals.HLWidget.klass)});
  2542. //>>excludeEnd("ctx");
  2543. },
  2544. //>>excludeStart("ide", pragmas.excludeIdeData);
  2545. args: [],
  2546. 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",
  2547. referencedClasses: ["HLTabWidget"],
  2548. //>>excludeEnd("ide");
  2549. messageSends: ["new", "add", "on:labelled:", "defaultTabLabel"]
  2550. }),
  2551. $globals.HLWidget.klass);
  2552. $core.addMethod(
  2553. $core.method({
  2554. selector: "tabClass",
  2555. protocol: 'accessing',
  2556. fn: function (){
  2557. var self=this;
  2558. return "";
  2559. },
  2560. //>>excludeStart("ide", pragmas.excludeIdeData);
  2561. args: [],
  2562. source: "tabClass\x0a\x09^ ''",
  2563. referencedClasses: [],
  2564. //>>excludeEnd("ide");
  2565. messageSends: []
  2566. }),
  2567. $globals.HLWidget.klass);
  2568. $core.addMethod(
  2569. $core.method({
  2570. selector: "tabLabel",
  2571. protocol: 'accessing',
  2572. fn: function (){
  2573. var self=this;
  2574. return "Tab";
  2575. },
  2576. //>>excludeStart("ide", pragmas.excludeIdeData);
  2577. args: [],
  2578. source: "tabLabel\x0a\x09^ 'Tab'",
  2579. referencedClasses: [],
  2580. //>>excludeEnd("ide");
  2581. messageSends: []
  2582. }),
  2583. $globals.HLWidget.klass);
  2584. $core.addMethod(
  2585. $core.method({
  2586. selector: "tabPriority",
  2587. protocol: 'accessing',
  2588. fn: function (){
  2589. var self=this;
  2590. return (500);
  2591. },
  2592. //>>excludeStart("ide", pragmas.excludeIdeData);
  2593. args: [],
  2594. source: "tabPriority\x0a\x09^ 500",
  2595. referencedClasses: [],
  2596. //>>excludeEnd("ide");
  2597. messageSends: []
  2598. }),
  2599. $globals.HLWidget.klass);
  2600. $core.addClass('HLFocusableWidget', $globals.HLWidget, [], 'Helios-Core');
  2601. //>>excludeStart("ide", pragmas.excludeIdeData);
  2602. $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.";
  2603. //>>excludeEnd("ide");
  2604. $core.addMethod(
  2605. $core.method({
  2606. selector: "blur",
  2607. protocol: 'events',
  2608. fn: function (){
  2609. var self=this;
  2610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2611. return $core.withContext(function($ctx1) {
  2612. //>>excludeEnd("ctx");
  2613. $recv($recv(self._wrapper())._asJQuery())._blur();
  2614. return self;
  2615. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2616. }, function($ctx1) {$ctx1.fill(self,"blur",{},$globals.HLFocusableWidget)});
  2617. //>>excludeEnd("ctx");
  2618. },
  2619. //>>excludeStart("ide", pragmas.excludeIdeData);
  2620. args: [],
  2621. source: "blur\x0a\x09self wrapper asJQuery blur",
  2622. referencedClasses: [],
  2623. //>>excludeEnd("ide");
  2624. messageSends: ["blur", "asJQuery", "wrapper"]
  2625. }),
  2626. $globals.HLFocusableWidget);
  2627. $core.addMethod(
  2628. $core.method({
  2629. selector: "canHaveFocus",
  2630. protocol: 'testing',
  2631. fn: function (){
  2632. var self=this;
  2633. return true;
  2634. },
  2635. //>>excludeStart("ide", pragmas.excludeIdeData);
  2636. args: [],
  2637. source: "canHaveFocus\x0a\x09^ true",
  2638. referencedClasses: [],
  2639. //>>excludeEnd("ide");
  2640. messageSends: []
  2641. }),
  2642. $globals.HLFocusableWidget);
  2643. $core.addMethod(
  2644. $core.method({
  2645. selector: "focus",
  2646. protocol: 'events',
  2647. fn: function (){
  2648. var self=this;
  2649. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2650. return $core.withContext(function($ctx1) {
  2651. //>>excludeEnd("ctx");
  2652. $recv($recv(self._wrapper())._asJQuery())._focus();
  2653. return self;
  2654. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2655. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLFocusableWidget)});
  2656. //>>excludeEnd("ctx");
  2657. },
  2658. //>>excludeStart("ide", pragmas.excludeIdeData);
  2659. args: [],
  2660. source: "focus\x0a\x09self wrapper asJQuery focus",
  2661. referencedClasses: [],
  2662. //>>excludeEnd("ide");
  2663. messageSends: ["focus", "asJQuery", "wrapper"]
  2664. }),
  2665. $globals.HLFocusableWidget);
  2666. $core.addMethod(
  2667. $core.method({
  2668. selector: "focusClass",
  2669. protocol: 'accessing',
  2670. fn: function (){
  2671. var self=this;
  2672. return "focused";
  2673. },
  2674. //>>excludeStart("ide", pragmas.excludeIdeData);
  2675. args: [],
  2676. source: "focusClass\x0a\x09^ 'focused'",
  2677. referencedClasses: [],
  2678. //>>excludeEnd("ide");
  2679. messageSends: []
  2680. }),
  2681. $globals.HLFocusableWidget);
  2682. $core.addMethod(
  2683. $core.method({
  2684. selector: "hasFocus",
  2685. protocol: 'testing',
  2686. fn: function (){
  2687. var self=this;
  2688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2689. return $core.withContext(function($ctx1) {
  2690. //>>excludeEnd("ctx");
  2691. var $3,$2,$1;
  2692. $3=self._wrapper();
  2693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2694. $ctx1.sendIdx["wrapper"]=1;
  2695. //>>excludeEnd("ctx");
  2696. $2=$recv($3)._notNil();
  2697. $1=$recv($2)._and_((function(){
  2698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2699. return $core.withContext(function($ctx2) {
  2700. //>>excludeEnd("ctx");
  2701. return $recv($recv(self._wrapper())._asJQuery())._hasClass_(self._focusClass());
  2702. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2703. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2704. //>>excludeEnd("ctx");
  2705. }));
  2706. return $1;
  2707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2708. }, function($ctx1) {$ctx1.fill(self,"hasFocus",{},$globals.HLFocusableWidget)});
  2709. //>>excludeEnd("ctx");
  2710. },
  2711. //>>excludeStart("ide", pragmas.excludeIdeData);
  2712. args: [],
  2713. source: "hasFocus\x0a\x09^ self wrapper notNil and: [ self wrapper asJQuery hasClass: self focusClass ]",
  2714. referencedClasses: [],
  2715. //>>excludeEnd("ide");
  2716. messageSends: ["and:", "notNil", "wrapper", "hasClass:", "asJQuery", "focusClass"]
  2717. }),
  2718. $globals.HLFocusableWidget);
  2719. $core.addMethod(
  2720. $core.method({
  2721. selector: "renderContentOn:",
  2722. protocol: 'rendering',
  2723. fn: function (html){
  2724. var self=this;
  2725. return self;
  2726. },
  2727. //>>excludeStart("ide", pragmas.excludeIdeData);
  2728. args: ["html"],
  2729. source: "renderContentOn: html",
  2730. referencedClasses: [],
  2731. //>>excludeEnd("ide");
  2732. messageSends: []
  2733. }),
  2734. $globals.HLFocusableWidget);
  2735. $core.addMethod(
  2736. $core.method({
  2737. selector: "renderOn:",
  2738. protocol: 'rendering',
  2739. fn: function (html){
  2740. var self=this;
  2741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2742. return $core.withContext(function($ctx1) {
  2743. //>>excludeEnd("ctx");
  2744. var $1,$2,$3,$5,$4,$6,$7;
  2745. $1=$recv(html)._div();
  2746. $recv($1)._class_(self._cssClass());
  2747. $2=$recv($1)._yourself();
  2748. self["@wrapper"]=$2;
  2749. $recv(self["@wrapper"])._with_((function(){
  2750. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2751. return $core.withContext(function($ctx2) {
  2752. //>>excludeEnd("ctx");
  2753. return self._renderContentOn_(html);
  2754. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2755. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2756. //>>excludeEnd("ctx");
  2757. }));
  2758. $3=self["@wrapper"];
  2759. $recv($3)._at_put_("tabindex","0");
  2760. $recv($3)._onBlur_((function(){
  2761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2762. return $core.withContext(function($ctx2) {
  2763. //>>excludeEnd("ctx");
  2764. $5=self._wrapper();
  2765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2766. $ctx2.sendIdx["wrapper"]=1;
  2767. //>>excludeEnd("ctx");
  2768. $4=$recv($5)._asJQuery();
  2769. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2770. $ctx2.sendIdx["asJQuery"]=1;
  2771. //>>excludeEnd("ctx");
  2772. $6=self._focusClass();
  2773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2774. $ctx2.sendIdx["focusClass"]=1;
  2775. //>>excludeEnd("ctx");
  2776. return $recv($4)._removeClass_($6);
  2777. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2778. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  2779. //>>excludeEnd("ctx");
  2780. }));
  2781. $7=$recv($3)._onFocus_((function(){
  2782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2783. return $core.withContext(function($ctx2) {
  2784. //>>excludeEnd("ctx");
  2785. return $recv($recv(self._wrapper())._asJQuery())._addClass_(self._focusClass());
  2786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2787. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  2788. //>>excludeEnd("ctx");
  2789. }));
  2790. return self;
  2791. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2792. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLFocusableWidget)});
  2793. //>>excludeEnd("ctx");
  2794. },
  2795. //>>excludeStart("ide", pragmas.excludeIdeData);
  2796. args: ["html"],
  2797. 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 ]",
  2798. referencedClasses: [],
  2799. //>>excludeEnd("ide");
  2800. messageSends: ["class:", "div", "cssClass", "yourself", "with:", "renderContentOn:", "at:put:", "onBlur:", "removeClass:", "asJQuery", "wrapper", "focusClass", "onFocus:", "addClass:"]
  2801. }),
  2802. $globals.HLFocusableWidget);
  2803. $core.addClass('HLListWidget', $globals.HLFocusableWidget, ['items', 'selectedItem'], 'Helios-Core');
  2804. $core.addMethod(
  2805. $core.method({
  2806. selector: "activateFirstListItem",
  2807. protocol: 'actions',
  2808. fn: function (){
  2809. var self=this;
  2810. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2811. return $core.withContext(function($ctx1) {
  2812. //>>excludeEnd("ctx");
  2813. self._activateListItem_($recv($recv($recv(self["@wrapper"])._asJQuery())._find_("li.inactive"))._eq_((0)));
  2814. return self;
  2815. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2816. }, function($ctx1) {$ctx1.fill(self,"activateFirstListItem",{},$globals.HLListWidget)});
  2817. //>>excludeEnd("ctx");
  2818. },
  2819. //>>excludeStart("ide", pragmas.excludeIdeData);
  2820. args: [],
  2821. source: "activateFirstListItem\x0a\x09self activateListItem: ((wrapper asJQuery find: 'li.inactive') eq: 0)",
  2822. referencedClasses: [],
  2823. //>>excludeEnd("ide");
  2824. messageSends: ["activateListItem:", "eq:", "find:", "asJQuery"]
  2825. }),
  2826. $globals.HLListWidget);
  2827. $core.addMethod(
  2828. $core.method({
  2829. selector: "activateItem:",
  2830. protocol: 'actions',
  2831. fn: function (anObject){
  2832. var self=this;
  2833. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2834. return $core.withContext(function($ctx1) {
  2835. //>>excludeEnd("ctx");
  2836. self._activateListItem_(self._findListItemFor_(anObject));
  2837. return self;
  2838. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2839. }, function($ctx1) {$ctx1.fill(self,"activateItem:",{anObject:anObject},$globals.HLListWidget)});
  2840. //>>excludeEnd("ctx");
  2841. },
  2842. //>>excludeStart("ide", pragmas.excludeIdeData);
  2843. args: ["anObject"],
  2844. source: "activateItem: anObject\x0a\x09self activateListItem: (self findListItemFor: anObject)",
  2845. referencedClasses: [],
  2846. //>>excludeEnd("ide");
  2847. messageSends: ["activateListItem:", "findListItemFor:"]
  2848. }),
  2849. $globals.HLListWidget);
  2850. $core.addMethod(
  2851. $core.method({
  2852. selector: "activateListItem:",
  2853. protocol: 'actions',
  2854. fn: function (aListItem){
  2855. var self=this;
  2856. var item;
  2857. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2858. return $core.withContext(function($ctx1) {
  2859. //>>excludeEnd("ctx");
  2860. var $1,$2,$3,$4,$receiver;
  2861. $1=$recv(aListItem)._get_((0));
  2862. if(($receiver = $1) == null || $receiver.isNil){
  2863. return self;
  2864. } else {
  2865. $1;
  2866. };
  2867. $2=$recv($recv(aListItem)._parent())._children();
  2868. $3=self._activeItemCssClass();
  2869. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2870. $ctx1.sendIdx["activeItemCssClass"]=1;
  2871. //>>excludeEnd("ctx");
  2872. $recv($2)._removeClass_($3);
  2873. $recv(aListItem)._addClass_(self._activeItemCssClass());
  2874. self._ensureVisible_(aListItem);
  2875. item=$recv(aListItem)._data_("item");
  2876. $4=$recv(self._selectedItem()).__eq_eq(item);
  2877. if(!$core.assert($4)){
  2878. self._selectItem_(item);
  2879. };
  2880. return self;
  2881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2882. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{aListItem:aListItem,item:item},$globals.HLListWidget)});
  2883. //>>excludeEnd("ctx");
  2884. },
  2885. //>>excludeStart("ide", pragmas.excludeIdeData);
  2886. args: ["aListItem"],
  2887. 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 ]",
  2888. referencedClasses: [],
  2889. //>>excludeEnd("ide");
  2890. messageSends: ["ifNil:", "get:", "removeClass:", "children", "parent", "activeItemCssClass", "addClass:", "ensureVisible:", "data:", "ifFalse:", "==", "selectedItem", "selectItem:"]
  2891. }),
  2892. $globals.HLListWidget);
  2893. $core.addMethod(
  2894. $core.method({
  2895. selector: "activateNextListItem",
  2896. protocol: 'actions',
  2897. fn: function (){
  2898. var self=this;
  2899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2900. return $core.withContext(function($ctx1) {
  2901. //>>excludeEnd("ctx");
  2902. var $4,$3,$6,$5,$2,$1;
  2903. $4=self._wrapper();
  2904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2905. $ctx1.sendIdx["wrapper"]=1;
  2906. //>>excludeEnd("ctx");
  2907. $3=$recv($4)._asJQuery();
  2908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2909. $ctx1.sendIdx["asJQuery"]=1;
  2910. //>>excludeEnd("ctx");
  2911. $6=self._activeItemCssClass();
  2912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2913. $ctx1.sendIdx["activeItemCssClass"]=1;
  2914. //>>excludeEnd("ctx");
  2915. $5="li.".__comma($6);
  2916. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2917. $ctx1.sendIdx[","]=1;
  2918. //>>excludeEnd("ctx");
  2919. $2=$recv($3)._find_($5);
  2920. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2921. $ctx1.sendIdx["find:"]=1;
  2922. //>>excludeEnd("ctx");
  2923. $1=$recv($2)._next();
  2924. self._activateListItem_($1);
  2925. $recv($recv($recv($recv(self._wrapper())._asJQuery())._find_(" .".__comma(self._activeItemCssClass())))._get())._ifEmpty_((function(){
  2926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2927. return $core.withContext(function($ctx2) {
  2928. //>>excludeEnd("ctx");
  2929. return self._activateFirstListItem();
  2930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2931. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  2932. //>>excludeEnd("ctx");
  2933. }));
  2934. return self;
  2935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2936. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLListWidget)});
  2937. //>>excludeEnd("ctx");
  2938. },
  2939. //>>excludeStart("ide", pragmas.excludeIdeData);
  2940. args: [],
  2941. 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 ]",
  2942. referencedClasses: [],
  2943. //>>excludeEnd("ide");
  2944. messageSends: ["activateListItem:", "next", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass", "ifEmpty:", "get", "activateFirstListItem"]
  2945. }),
  2946. $globals.HLListWidget);
  2947. $core.addMethod(
  2948. $core.method({
  2949. selector: "activatePreviousListItem",
  2950. protocol: 'actions',
  2951. fn: function (){
  2952. var self=this;
  2953. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2954. return $core.withContext(function($ctx1) {
  2955. //>>excludeEnd("ctx");
  2956. self._activateListItem_($recv($recv($recv(self._wrapper())._asJQuery())._find_("li.".__comma(self._activeItemCssClass())))._prev());
  2957. return self;
  2958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  2959. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLListWidget)});
  2960. //>>excludeEnd("ctx");
  2961. },
  2962. //>>excludeStart("ide", pragmas.excludeIdeData);
  2963. args: [],
  2964. source: "activatePreviousListItem\x0a\x09self activateListItem: (self wrapper asJQuery find: ('li.', self activeItemCssClass)) prev",
  2965. referencedClasses: [],
  2966. //>>excludeEnd("ide");
  2967. messageSends: ["activateListItem:", "prev", "find:", "asJQuery", "wrapper", ",", "activeItemCssClass"]
  2968. }),
  2969. $globals.HLListWidget);
  2970. $core.addMethod(
  2971. $core.method({
  2972. selector: "activeItemCssClass",
  2973. protocol: 'accessing',
  2974. fn: function (){
  2975. var self=this;
  2976. return "active";
  2977. },
  2978. //>>excludeStart("ide", pragmas.excludeIdeData);
  2979. args: [],
  2980. source: "activeItemCssClass\x0a\x09^'active'",
  2981. referencedClasses: [],
  2982. //>>excludeEnd("ide");
  2983. messageSends: []
  2984. }),
  2985. $globals.HLListWidget);
  2986. $core.addMethod(
  2987. $core.method({
  2988. selector: "buttonsDivCssClass",
  2989. protocol: 'accessing',
  2990. fn: function (){
  2991. var self=this;
  2992. return "pane_actions form-actions";
  2993. },
  2994. //>>excludeStart("ide", pragmas.excludeIdeData);
  2995. args: [],
  2996. source: "buttonsDivCssClass\x0a\x09^ 'pane_actions form-actions'",
  2997. referencedClasses: [],
  2998. //>>excludeEnd("ide");
  2999. messageSends: []
  3000. }),
  3001. $globals.HLListWidget);
  3002. $core.addMethod(
  3003. $core.method({
  3004. selector: "cssClassForItem:",
  3005. protocol: 'accessing',
  3006. fn: function (anObject){
  3007. var self=this;
  3008. return "";
  3009. },
  3010. //>>excludeStart("ide", pragmas.excludeIdeData);
  3011. args: ["anObject"],
  3012. source: "cssClassForItem: anObject\x0a\x09^ ''",
  3013. referencedClasses: [],
  3014. //>>excludeEnd("ide");
  3015. messageSends: []
  3016. }),
  3017. $globals.HLListWidget);
  3018. $core.addMethod(
  3019. $core.method({
  3020. selector: "defaultItems",
  3021. protocol: 'defaults',
  3022. fn: function (){
  3023. var self=this;
  3024. var $1;
  3025. $1=[];
  3026. return $1;
  3027. },
  3028. //>>excludeStart("ide", pragmas.excludeIdeData);
  3029. args: [],
  3030. source: "defaultItems\x0a\x09^ #()",
  3031. referencedClasses: [],
  3032. //>>excludeEnd("ide");
  3033. messageSends: []
  3034. }),
  3035. $globals.HLListWidget);
  3036. $core.addMethod(
  3037. $core.method({
  3038. selector: "ensureVisible:",
  3039. protocol: 'actions',
  3040. fn: function (aListItem){
  3041. var self=this;
  3042. var parent,position;
  3043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3044. return $core.withContext(function($ctx1) {
  3045. //>>excludeEnd("ctx");
  3046. 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;
  3047. $1=$recv(aListItem)._get_((0));
  3048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3049. $ctx1.sendIdx["get:"]=1;
  3050. //>>excludeEnd("ctx");
  3051. if(($receiver = $1) == null || $receiver.isNil){
  3052. return self;
  3053. } else {
  3054. $1;
  3055. };
  3056. position=self._positionOf_(aListItem);
  3057. parent=$recv(aListItem)._parent();
  3058. $4=$recv(aListItem)._position();
  3059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3060. $ctx1.sendIdx["position"]=1;
  3061. //>>excludeEnd("ctx");
  3062. $3=$recv($4)._top();
  3063. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3064. $ctx1.sendIdx["top"]=1;
  3065. //>>excludeEnd("ctx");
  3066. $2=$recv($3).__lt((0));
  3067. if($core.assert($2)){
  3068. $5=$recv(parent)._get_((0));
  3069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3070. $ctx1.sendIdx["get:"]=2;
  3071. //>>excludeEnd("ctx");
  3072. $9=$recv(parent)._get_((0));
  3073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3074. $ctx1.sendIdx["get:"]=3;
  3075. //>>excludeEnd("ctx");
  3076. $8=$recv($9)._scrollTop();
  3077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3078. $ctx1.sendIdx["scrollTop"]=1;
  3079. //>>excludeEnd("ctx");
  3080. $11=$recv(aListItem)._position();
  3081. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3082. $ctx1.sendIdx["position"]=2;
  3083. //>>excludeEnd("ctx");
  3084. $10=$recv($11)._top();
  3085. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3086. $ctx1.sendIdx["top"]=2;
  3087. //>>excludeEnd("ctx");
  3088. $7=$recv($8).__plus($10);
  3089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3090. $ctx1.sendIdx["+"]=1;
  3091. //>>excludeEnd("ctx");
  3092. $6=$recv($7).__minus((10));
  3093. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3094. $ctx1.sendIdx["-"]=1;
  3095. //>>excludeEnd("ctx");
  3096. $recv($5)._scrollTop_($6);
  3097. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3098. $ctx1.sendIdx["scrollTop:"]=1;
  3099. //>>excludeEnd("ctx");
  3100. };
  3101. $15=$recv(aListItem)._position();
  3102. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3103. $ctx1.sendIdx["position"]=3;
  3104. //>>excludeEnd("ctx");
  3105. $14=$recv($15)._top();
  3106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3107. $ctx1.sendIdx["top"]=3;
  3108. //>>excludeEnd("ctx");
  3109. $16=$recv(aListItem)._height();
  3110. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3111. $ctx1.sendIdx["height"]=1;
  3112. //>>excludeEnd("ctx");
  3113. $13=$recv($14).__plus($16);
  3114. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3115. $ctx1.sendIdx["+"]=2;
  3116. //>>excludeEnd("ctx");
  3117. $17=$recv(parent)._height();
  3118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3119. $ctx1.sendIdx["height"]=2;
  3120. //>>excludeEnd("ctx");
  3121. $12=$recv($13).__gt($17);
  3122. if($core.assert($12)){
  3123. $18=$recv(parent)._get_((0));
  3124. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3125. $ctx1.sendIdx["get:"]=4;
  3126. //>>excludeEnd("ctx");
  3127. $22=$recv($recv(parent)._get_((0)))._scrollTop();
  3128. $23=$recv(aListItem)._height();
  3129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3130. $ctx1.sendIdx["height"]=3;
  3131. //>>excludeEnd("ctx");
  3132. $21=$recv($22).__plus($23);
  3133. $20=$recv($21).__minus($recv($recv(parent)._height()).__minus($recv($recv(aListItem)._position())._top()));
  3134. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3135. $ctx1.sendIdx["-"]=2;
  3136. //>>excludeEnd("ctx");
  3137. $19=$recv($20).__plus((10));
  3138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3139. $ctx1.sendIdx["+"]=3;
  3140. //>>excludeEnd("ctx");
  3141. $recv($18)._scrollTop_($19);
  3142. };
  3143. return self;
  3144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3145. }, function($ctx1) {$ctx1.fill(self,"ensureVisible:",{aListItem:aListItem,parent:parent,position:position},$globals.HLListWidget)});
  3146. //>>excludeEnd("ctx");
  3147. },
  3148. //>>excludeStart("ide", pragmas.excludeIdeData);
  3149. args: ["aListItem"],
  3150. 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 ]",
  3151. referencedClasses: [],
  3152. //>>excludeEnd("ide");
  3153. messageSends: ["ifNil:", "get:", "positionOf:", "parent", "ifTrue:", "<", "top", "position", "scrollTop:", "-", "+", "scrollTop", ">", "height"]
  3154. }),
  3155. $globals.HLListWidget);
  3156. $core.addMethod(
  3157. $core.method({
  3158. selector: "findListItemFor:",
  3159. protocol: 'accessing',
  3160. fn: function (anObject){
  3161. var self=this;
  3162. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3163. return $core.withContext(function($ctx1) {
  3164. //>>excludeEnd("ctx");
  3165. var $4,$3,$2,$1;
  3166. $4=$recv(self["@wrapper"])._asJQuery();
  3167. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3168. $ctx1.sendIdx["asJQuery"]=1;
  3169. //>>excludeEnd("ctx");
  3170. $3=$recv($4)._find_("li");
  3171. $2=$recv($3)._filter_($recv((function(thisArg,otherArg){
  3172. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3173. return $core.withContext(function($ctx2) {
  3174. //>>excludeEnd("ctx");
  3175. return $recv($recv($recv(thisArg)._asJQuery())._data_("item")).__eq(anObject);
  3176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3177. }, function($ctx2) {$ctx2.fillBlock({thisArg:thisArg,otherArg:otherArg},$ctx1,1)});
  3178. //>>excludeEnd("ctx");
  3179. }))._currySelf());
  3180. $1=$recv($2)._eq_((0));
  3181. return $1;
  3182. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3183. }, function($ctx1) {$ctx1.fill(self,"findListItemFor:",{anObject:anObject},$globals.HLListWidget)});
  3184. //>>excludeEnd("ctx");
  3185. },
  3186. //>>excludeStart("ide", pragmas.excludeIdeData);
  3187. args: ["anObject"],
  3188. source: "findListItemFor: anObject\x0a\x09^ (((wrapper asJQuery find: 'li') \x0a\x09\x09filter: [ :thisArg :otherArg | (thisArg asJQuery data: 'item') = anObject ] currySelf) eq: 0)",
  3189. referencedClasses: [],
  3190. //>>excludeEnd("ide");
  3191. messageSends: ["eq:", "filter:", "find:", "asJQuery", "currySelf", "=", "data:"]
  3192. }),
  3193. $globals.HLListWidget);
  3194. $core.addMethod(
  3195. $core.method({
  3196. selector: "focus",
  3197. protocol: 'actions',
  3198. fn: function (){
  3199. var self=this;
  3200. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3201. return $core.withContext(function($ctx1) {
  3202. //>>excludeEnd("ctx");
  3203. var $1,$2,$receiver;
  3204. (
  3205. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3206. $ctx1.supercall = true,
  3207. //>>excludeEnd("ctx");
  3208. $globals.HLListWidget.superclass.fn.prototype._focus.apply($recv(self), []));
  3209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3210. $ctx1.supercall = false;
  3211. //>>excludeEnd("ctx");;
  3212. $1=$recv(self._items())._isEmpty();
  3213. if(!$core.assert($1)){
  3214. $2=self._selectedItem();
  3215. if(($receiver = $2) == null || $receiver.isNil){
  3216. self._activateFirstListItem();
  3217. } else {
  3218. $2;
  3219. };
  3220. };
  3221. return self;
  3222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3223. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLListWidget)});
  3224. //>>excludeEnd("ctx");
  3225. },
  3226. //>>excludeStart("ide", pragmas.excludeIdeData);
  3227. args: [],
  3228. source: "focus\x0a\x09super focus.\x0a self items isEmpty ifFalse: [ \x0a\x09\x09self selectedItem ifNil: [ self activateFirstListItem ] ]",
  3229. referencedClasses: [],
  3230. //>>excludeEnd("ide");
  3231. messageSends: ["focus", "ifFalse:", "isEmpty", "items", "ifNil:", "selectedItem", "activateFirstListItem"]
  3232. }),
  3233. $globals.HLListWidget);
  3234. $core.addMethod(
  3235. $core.method({
  3236. selector: "items",
  3237. protocol: 'accessing',
  3238. fn: function (){
  3239. var self=this;
  3240. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3241. return $core.withContext(function($ctx1) {
  3242. //>>excludeEnd("ctx");
  3243. var $2,$1,$receiver;
  3244. $2=self["@items"];
  3245. if(($receiver = $2) == null || $receiver.isNil){
  3246. self["@items"]=self._defaultItems();
  3247. $1=self["@items"];
  3248. } else {
  3249. $1=$2;
  3250. };
  3251. return $1;
  3252. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3253. }, function($ctx1) {$ctx1.fill(self,"items",{},$globals.HLListWidget)});
  3254. //>>excludeEnd("ctx");
  3255. },
  3256. //>>excludeStart("ide", pragmas.excludeIdeData);
  3257. args: [],
  3258. source: "items\x0a\x09^ items ifNil: [ items := self defaultItems ]",
  3259. referencedClasses: [],
  3260. //>>excludeEnd("ide");
  3261. messageSends: ["ifNil:", "defaultItems"]
  3262. }),
  3263. $globals.HLListWidget);
  3264. $core.addMethod(
  3265. $core.method({
  3266. selector: "items:",
  3267. protocol: 'accessing',
  3268. fn: function (aCollection){
  3269. var self=this;
  3270. self["@items"]=aCollection;
  3271. return self;
  3272. },
  3273. //>>excludeStart("ide", pragmas.excludeIdeData);
  3274. args: ["aCollection"],
  3275. source: "items: aCollection\x0a\x09items := aCollection",
  3276. referencedClasses: [],
  3277. //>>excludeEnd("ide");
  3278. messageSends: []
  3279. }),
  3280. $globals.HLListWidget);
  3281. $core.addMethod(
  3282. $core.method({
  3283. selector: "listCssClass",
  3284. protocol: 'accessing',
  3285. fn: function (){
  3286. var self=this;
  3287. return "nav nav-pills nav-stacked";
  3288. },
  3289. //>>excludeStart("ide", pragmas.excludeIdeData);
  3290. args: [],
  3291. source: "listCssClass \x0a\x09^'nav nav-pills nav-stacked'",
  3292. referencedClasses: [],
  3293. //>>excludeEnd("ide");
  3294. messageSends: []
  3295. }),
  3296. $globals.HLListWidget);
  3297. $core.addMethod(
  3298. $core.method({
  3299. selector: "listCssClassForItem:",
  3300. protocol: 'accessing',
  3301. fn: function (anObject){
  3302. var self=this;
  3303. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3304. return $core.withContext(function($ctx1) {
  3305. //>>excludeEnd("ctx");
  3306. var $2,$1;
  3307. $2=$recv(self._selectedItem()).__eq(anObject);
  3308. if($core.assert($2)){
  3309. $1=self._activeItemCssClass();
  3310. } else {
  3311. $1="inactive";
  3312. };
  3313. return $1;
  3314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3315. }, function($ctx1) {$ctx1.fill(self,"listCssClassForItem:",{anObject:anObject},$globals.HLListWidget)});
  3316. //>>excludeEnd("ctx");
  3317. },
  3318. //>>excludeStart("ide", pragmas.excludeIdeData);
  3319. args: ["anObject"],
  3320. source: "listCssClassForItem: anObject\x0a\x09^ self selectedItem = anObject\x0a\x09\x09ifTrue: [ self activeItemCssClass ]\x0a\x09\x09ifFalse: [ 'inactive' ]",
  3321. referencedClasses: [],
  3322. //>>excludeEnd("ide");
  3323. messageSends: ["ifTrue:ifFalse:", "=", "selectedItem", "activeItemCssClass"]
  3324. }),
  3325. $globals.HLListWidget);
  3326. $core.addMethod(
  3327. $core.method({
  3328. selector: "positionOf:",
  3329. protocol: 'accessing',
  3330. fn: function (aListItem){
  3331. var self=this;
  3332. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3333. return $core.withContext(function($ctx1) {
  3334. //>>excludeEnd("ctx");
  3335. return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1
  3336. ;
  3337. return self;
  3338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3339. }, function($ctx1) {$ctx1.fill(self,"positionOf:",{aListItem:aListItem},$globals.HLListWidget)});
  3340. //>>excludeEnd("ctx");
  3341. },
  3342. //>>excludeStart("ide", pragmas.excludeIdeData);
  3343. args: ["aListItem"],
  3344. source: "positionOf: aListItem\x0a\x09<\x0a \x09return aListItem.parent().children().get().indexOf(aListItem.get(0)) + 1\x0a\x09>",
  3345. referencedClasses: [],
  3346. //>>excludeEnd("ide");
  3347. messageSends: []
  3348. }),
  3349. $globals.HLListWidget);
  3350. $core.addMethod(
  3351. $core.method({
  3352. selector: "reactivateListItem:",
  3353. protocol: 'actions',
  3354. fn: function (aListItem){
  3355. var self=this;
  3356. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3357. return $core.withContext(function($ctx1) {
  3358. //>>excludeEnd("ctx");
  3359. self._activateListItem_(aListItem);
  3360. self._reselectItem_(self._selectedItem());
  3361. return self;
  3362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3363. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{aListItem:aListItem},$globals.HLListWidget)});
  3364. //>>excludeEnd("ctx");
  3365. },
  3366. //>>excludeStart("ide", pragmas.excludeIdeData);
  3367. args: ["aListItem"],
  3368. source: "reactivateListItem: aListItem\x0a\x09self activateListItem: aListItem.\x0a\x09self reselectItem: self selectedItem",
  3369. referencedClasses: [],
  3370. //>>excludeEnd("ide");
  3371. messageSends: ["activateListItem:", "reselectItem:", "selectedItem"]
  3372. }),
  3373. $globals.HLListWidget);
  3374. $core.addMethod(
  3375. $core.method({
  3376. selector: "refresh",
  3377. protocol: 'actions',
  3378. fn: function (){
  3379. var self=this;
  3380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3381. return $core.withContext(function($ctx1) {
  3382. //>>excludeEnd("ctx");
  3383. var $1,$receiver;
  3384. (
  3385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3386. $ctx1.supercall = true,
  3387. //>>excludeEnd("ctx");
  3388. $globals.HLListWidget.superclass.fn.prototype._refresh.apply($recv(self), []));
  3389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3390. $ctx1.supercall = false;
  3391. //>>excludeEnd("ctx");;
  3392. $1=self._selectedItem();
  3393. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3394. $ctx1.sendIdx["selectedItem"]=1;
  3395. //>>excludeEnd("ctx");
  3396. if(($receiver = $1) == null || $receiver.isNil){
  3397. $1;
  3398. } else {
  3399. self._ensureVisible_(self._findListItemFor_(self._selectedItem()));
  3400. };
  3401. return self;
  3402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3403. }, function($ctx1) {$ctx1.fill(self,"refresh",{},$globals.HLListWidget)});
  3404. //>>excludeEnd("ctx");
  3405. },
  3406. //>>excludeStart("ide", pragmas.excludeIdeData);
  3407. args: [],
  3408. source: "refresh\x0a\x09super refresh.\x0a\x09self selectedItem ifNotNil: [self ensureVisible: (self findListItemFor: self selectedItem)].",
  3409. referencedClasses: [],
  3410. //>>excludeEnd("ide");
  3411. messageSends: ["refresh", "ifNotNil:", "selectedItem", "ensureVisible:", "findListItemFor:"]
  3412. }),
  3413. $globals.HLListWidget);
  3414. $core.addMethod(
  3415. $core.method({
  3416. selector: "renderButtonsOn:",
  3417. protocol: 'rendering',
  3418. fn: function (html){
  3419. var self=this;
  3420. return self;
  3421. },
  3422. //>>excludeStart("ide", pragmas.excludeIdeData);
  3423. args: ["html"],
  3424. source: "renderButtonsOn: html",
  3425. referencedClasses: [],
  3426. //>>excludeEnd("ide");
  3427. messageSends: []
  3428. }),
  3429. $globals.HLListWidget);
  3430. $core.addMethod(
  3431. $core.method({
  3432. selector: "renderContentOn:",
  3433. protocol: 'rendering',
  3434. fn: function (html){
  3435. var self=this;
  3436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3437. return $core.withContext(function($ctx1) {
  3438. //>>excludeEnd("ctx");
  3439. var $1,$2,$3,$4;
  3440. $1=$recv(html)._ul();
  3441. $recv($1)._class_(self._listCssClass());
  3442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3443. $ctx1.sendIdx["class:"]=1;
  3444. //>>excludeEnd("ctx");
  3445. $recv($1)._with_((function(){
  3446. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3447. return $core.withContext(function($ctx2) {
  3448. //>>excludeEnd("ctx");
  3449. return self._renderListOn_(html);
  3450. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3451. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3452. //>>excludeEnd("ctx");
  3453. }));
  3454. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3455. $ctx1.sendIdx["with:"]=1;
  3456. //>>excludeEnd("ctx");
  3457. $2=$recv($1)._onClick_((function(){
  3458. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3459. return $core.withContext(function($ctx2) {
  3460. //>>excludeEnd("ctx");
  3461. return self._focus();
  3462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3463. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3464. //>>excludeEnd("ctx");
  3465. }));
  3466. $3=$recv(html)._div();
  3467. $recv($3)._class_(self._buttonsDivCssClass());
  3468. $4=$recv($3)._with_((function(){
  3469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3470. return $core.withContext(function($ctx2) {
  3471. //>>excludeEnd("ctx");
  3472. return self._renderButtonsOn_(html);
  3473. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3474. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  3475. //>>excludeEnd("ctx");
  3476. }));
  3477. self._setupKeyBindings();
  3478. return self;
  3479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3480. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLListWidget)});
  3481. //>>excludeEnd("ctx");
  3482. },
  3483. //>>excludeStart("ide", pragmas.excludeIdeData);
  3484. args: ["html"],
  3485. 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",
  3486. referencedClasses: [],
  3487. //>>excludeEnd("ide");
  3488. messageSends: ["class:", "ul", "listCssClass", "with:", "renderListOn:", "onClick:", "focus", "div", "buttonsDivCssClass", "renderButtonsOn:", "setupKeyBindings"]
  3489. }),
  3490. $globals.HLListWidget);
  3491. $core.addMethod(
  3492. $core.method({
  3493. selector: "renderItem:on:",
  3494. protocol: 'rendering',
  3495. fn: function (anObject,html){
  3496. var self=this;
  3497. var li;
  3498. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3499. return $core.withContext(function($ctx1) {
  3500. //>>excludeEnd("ctx");
  3501. var $1,$2,$4,$5,$3;
  3502. li=$recv(html)._li();
  3503. $1=$recv(li)._asJQuery();
  3504. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3505. $ctx1.sendIdx["asJQuery"]=1;
  3506. //>>excludeEnd("ctx");
  3507. $recv($1)._data_put_("item",anObject);
  3508. $2=li;
  3509. $recv($2)._class_(self._listCssClassForItem_(anObject));
  3510. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3511. $ctx1.sendIdx["class:"]=1;
  3512. //>>excludeEnd("ctx");
  3513. $3=$recv($2)._with_((function(){
  3514. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3515. return $core.withContext(function($ctx2) {
  3516. //>>excludeEnd("ctx");
  3517. $4=$recv(html)._a();
  3518. $recv($4)._with_((function(){
  3519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3520. return $core.withContext(function($ctx3) {
  3521. //>>excludeEnd("ctx");
  3522. $recv($recv(html)._tag_("i"))._class_(self._cssClassForItem_(anObject));
  3523. return self._renderItemLabel_on_(anObject,html);
  3524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3525. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  3526. //>>excludeEnd("ctx");
  3527. }));
  3528. $5=$recv($4)._onClick_((function(){
  3529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3530. return $core.withContext(function($ctx3) {
  3531. //>>excludeEnd("ctx");
  3532. return self._reactivateListItem_($recv(li)._asJQuery());
  3533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3534. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  3535. //>>excludeEnd("ctx");
  3536. }));
  3537. return $5;
  3538. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3539. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3540. //>>excludeEnd("ctx");
  3541. }));
  3542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3543. $ctx1.sendIdx["with:"]=1;
  3544. //>>excludeEnd("ctx");
  3545. return self;
  3546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3547. }, function($ctx1) {$ctx1.fill(self,"renderItem:on:",{anObject:anObject,html:html,li:li},$globals.HLListWidget)});
  3548. //>>excludeEnd("ctx");
  3549. },
  3550. //>>excludeStart("ide", pragmas.excludeIdeData);
  3551. args: ["anObject", "html"],
  3552. 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 ] ]",
  3553. referencedClasses: [],
  3554. //>>excludeEnd("ide");
  3555. messageSends: ["li", "data:put:", "asJQuery", "class:", "listCssClassForItem:", "with:", "a", "tag:", "cssClassForItem:", "renderItemLabel:on:", "onClick:", "reactivateListItem:"]
  3556. }),
  3557. $globals.HLListWidget);
  3558. $core.addMethod(
  3559. $core.method({
  3560. selector: "renderItemLabel:on:",
  3561. protocol: 'rendering',
  3562. fn: function (anObject,html){
  3563. var self=this;
  3564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3565. return $core.withContext(function($ctx1) {
  3566. //>>excludeEnd("ctx");
  3567. $recv(html)._with_($recv(anObject)._asString());
  3568. return self;
  3569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3570. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{anObject:anObject,html:html},$globals.HLListWidget)});
  3571. //>>excludeEnd("ctx");
  3572. },
  3573. //>>excludeStart("ide", pragmas.excludeIdeData);
  3574. args: ["anObject", "html"],
  3575. source: "renderItemLabel: anObject on: html\x0a\x09html with: anObject asString",
  3576. referencedClasses: [],
  3577. //>>excludeEnd("ide");
  3578. messageSends: ["with:", "asString"]
  3579. }),
  3580. $globals.HLListWidget);
  3581. $core.addMethod(
  3582. $core.method({
  3583. selector: "renderListOn:",
  3584. protocol: 'rendering',
  3585. fn: function (html){
  3586. var self=this;
  3587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3588. return $core.withContext(function($ctx1) {
  3589. //>>excludeEnd("ctx");
  3590. $recv(self._items())._do_((function(each){
  3591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3592. return $core.withContext(function($ctx2) {
  3593. //>>excludeEnd("ctx");
  3594. return self._renderItem_on_(each,html);
  3595. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3596. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  3597. //>>excludeEnd("ctx");
  3598. }));
  3599. return self;
  3600. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3601. }, function($ctx1) {$ctx1.fill(self,"renderListOn:",{html:html},$globals.HLListWidget)});
  3602. //>>excludeEnd("ctx");
  3603. },
  3604. //>>excludeStart("ide", pragmas.excludeIdeData);
  3605. args: ["html"],
  3606. source: "renderListOn: html\x0a\x09self items do: [ :each | \x0a \x09self renderItem: each on: html ]",
  3607. referencedClasses: [],
  3608. //>>excludeEnd("ide");
  3609. messageSends: ["do:", "items", "renderItem:on:"]
  3610. }),
  3611. $globals.HLListWidget);
  3612. $core.addMethod(
  3613. $core.method({
  3614. selector: "reselectItem:",
  3615. protocol: 'actions',
  3616. fn: function (anObject){
  3617. var self=this;
  3618. return self;
  3619. },
  3620. //>>excludeStart("ide", pragmas.excludeIdeData);
  3621. args: ["anObject"],
  3622. source: "reselectItem: anObject",
  3623. referencedClasses: [],
  3624. //>>excludeEnd("ide");
  3625. messageSends: []
  3626. }),
  3627. $globals.HLListWidget);
  3628. $core.addMethod(
  3629. $core.method({
  3630. selector: "selectItem:",
  3631. protocol: 'actions',
  3632. fn: function (anObject){
  3633. var self=this;
  3634. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3635. return $core.withContext(function($ctx1) {
  3636. //>>excludeEnd("ctx");
  3637. self._selectedItem_(anObject);
  3638. return self;
  3639. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3640. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{anObject:anObject},$globals.HLListWidget)});
  3641. //>>excludeEnd("ctx");
  3642. },
  3643. //>>excludeStart("ide", pragmas.excludeIdeData);
  3644. args: ["anObject"],
  3645. source: "selectItem: anObject\x0a\x09self selectedItem: anObject",
  3646. referencedClasses: [],
  3647. //>>excludeEnd("ide");
  3648. messageSends: ["selectedItem:"]
  3649. }),
  3650. $globals.HLListWidget);
  3651. $core.addMethod(
  3652. $core.method({
  3653. selector: "selectedItem",
  3654. protocol: 'accessing',
  3655. fn: function (){
  3656. var self=this;
  3657. var $1;
  3658. $1=self["@selectedItem"];
  3659. return $1;
  3660. },
  3661. //>>excludeStart("ide", pragmas.excludeIdeData);
  3662. args: [],
  3663. source: "selectedItem\x0a\x09^ selectedItem",
  3664. referencedClasses: [],
  3665. //>>excludeEnd("ide");
  3666. messageSends: []
  3667. }),
  3668. $globals.HLListWidget);
  3669. $core.addMethod(
  3670. $core.method({
  3671. selector: "selectedItem:",
  3672. protocol: 'accessing',
  3673. fn: function (anObject){
  3674. var self=this;
  3675. self["@selectedItem"]=anObject;
  3676. return self;
  3677. },
  3678. //>>excludeStart("ide", pragmas.excludeIdeData);
  3679. args: ["anObject"],
  3680. source: "selectedItem: anObject\x0a\x09selectedItem := anObject",
  3681. referencedClasses: [],
  3682. //>>excludeEnd("ide");
  3683. messageSends: []
  3684. }),
  3685. $globals.HLListWidget);
  3686. $core.addMethod(
  3687. $core.method({
  3688. selector: "setupKeyBindings",
  3689. protocol: 'events',
  3690. fn: function (){
  3691. var self=this;
  3692. function $HLRepeatedKeyDownHandler(){return $globals.HLRepeatedKeyDownHandler||(typeof HLRepeatedKeyDownHandler=="undefined"?nil:HLRepeatedKeyDownHandler)}
  3693. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3694. return $core.withContext(function($ctx1) {
  3695. //>>excludeEnd("ctx");
  3696. var $1,$2,$3;
  3697. $1=$recv($HLRepeatedKeyDownHandler())._on_(self);
  3698. $recv($1)._whileKeyDown_do_((38),(function(){
  3699. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3700. return $core.withContext(function($ctx2) {
  3701. //>>excludeEnd("ctx");
  3702. return self._activatePreviousListItem();
  3703. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3704. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3705. //>>excludeEnd("ctx");
  3706. }));
  3707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3708. $ctx1.sendIdx["whileKeyDown:do:"]=1;
  3709. //>>excludeEnd("ctx");
  3710. $recv($1)._whileKeyDown_do_((40),(function(){
  3711. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3712. return $core.withContext(function($ctx2) {
  3713. //>>excludeEnd("ctx");
  3714. return self._activateNextListItem();
  3715. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3716. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  3717. //>>excludeEnd("ctx");
  3718. }));
  3719. $2=$recv($1)._rebindKeys();
  3720. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3722. return $core.withContext(function($ctx2) {
  3723. //>>excludeEnd("ctx");
  3724. $3=$recv($recv(e)._which()).__eq((13));
  3725. if($core.assert($3)){
  3726. return self._reselectItem_(self._selectedItem());
  3727. };
  3728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3729. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,3)});
  3730. //>>excludeEnd("ctx");
  3731. }));
  3732. return self;
  3733. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3734. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLListWidget)});
  3735. //>>excludeEnd("ctx");
  3736. },
  3737. //>>excludeStart("ide", pragmas.excludeIdeData);
  3738. args: [],
  3739. 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 ] ]",
  3740. referencedClasses: ["HLRepeatedKeyDownHandler"],
  3741. //>>excludeEnd("ide");
  3742. messageSends: ["whileKeyDown:do:", "on:", "activatePreviousListItem", "activateNextListItem", "rebindKeys", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "reselectItem:", "selectedItem"]
  3743. }),
  3744. $globals.HLListWidget);
  3745. $core.addClass('HLNavigationListWidget', $globals.HLListWidget, ['previous', 'next'], 'Helios-Core');
  3746. $core.addMethod(
  3747. $core.method({
  3748. selector: "next",
  3749. protocol: 'accessing',
  3750. fn: function (){
  3751. var self=this;
  3752. var $1;
  3753. $1=self["@next"];
  3754. return $1;
  3755. },
  3756. //>>excludeStart("ide", pragmas.excludeIdeData);
  3757. args: [],
  3758. source: "next\x0a\x09^ next",
  3759. referencedClasses: [],
  3760. //>>excludeEnd("ide");
  3761. messageSends: []
  3762. }),
  3763. $globals.HLNavigationListWidget);
  3764. $core.addMethod(
  3765. $core.method({
  3766. selector: "next:",
  3767. protocol: 'accessing',
  3768. fn: function (aWidget){
  3769. var self=this;
  3770. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3771. return $core.withContext(function($ctx1) {
  3772. //>>excludeEnd("ctx");
  3773. var $1;
  3774. self["@next"]=aWidget;
  3775. $1=$recv($recv(aWidget)._previous()).__eq(self);
  3776. if(!$core.assert($1)){
  3777. $recv(aWidget)._previous_(self);
  3778. };
  3779. return self;
  3780. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3781. }, function($ctx1) {$ctx1.fill(self,"next:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3782. //>>excludeEnd("ctx");
  3783. },
  3784. //>>excludeStart("ide", pragmas.excludeIdeData);
  3785. args: ["aWidget"],
  3786. source: "next: aWidget\x0a\x09next := aWidget.\x0a aWidget previous = self ifFalse: [ aWidget previous: self ]",
  3787. referencedClasses: [],
  3788. //>>excludeEnd("ide");
  3789. messageSends: ["ifFalse:", "=", "previous", "previous:"]
  3790. }),
  3791. $globals.HLNavigationListWidget);
  3792. $core.addMethod(
  3793. $core.method({
  3794. selector: "nextFocus",
  3795. protocol: 'actions',
  3796. fn: function (){
  3797. var self=this;
  3798. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3799. return $core.withContext(function($ctx1) {
  3800. //>>excludeEnd("ctx");
  3801. var $1,$receiver;
  3802. $1=self._next();
  3803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3804. $ctx1.sendIdx["next"]=1;
  3805. //>>excludeEnd("ctx");
  3806. if(($receiver = $1) == null || $receiver.isNil){
  3807. $1;
  3808. } else {
  3809. $recv(self._next())._focus();
  3810. };
  3811. return self;
  3812. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3813. }, function($ctx1) {$ctx1.fill(self,"nextFocus",{},$globals.HLNavigationListWidget)});
  3814. //>>excludeEnd("ctx");
  3815. },
  3816. //>>excludeStart("ide", pragmas.excludeIdeData);
  3817. args: [],
  3818. source: "nextFocus\x0a\x09self next ifNotNil: [ self next focus ]",
  3819. referencedClasses: [],
  3820. //>>excludeEnd("ide");
  3821. messageSends: ["ifNotNil:", "next", "focus"]
  3822. }),
  3823. $globals.HLNavigationListWidget);
  3824. $core.addMethod(
  3825. $core.method({
  3826. selector: "previous",
  3827. protocol: 'accessing',
  3828. fn: function (){
  3829. var self=this;
  3830. var $1;
  3831. $1=self["@previous"];
  3832. return $1;
  3833. },
  3834. //>>excludeStart("ide", pragmas.excludeIdeData);
  3835. args: [],
  3836. source: "previous\x0a\x09^ previous",
  3837. referencedClasses: [],
  3838. //>>excludeEnd("ide");
  3839. messageSends: []
  3840. }),
  3841. $globals.HLNavigationListWidget);
  3842. $core.addMethod(
  3843. $core.method({
  3844. selector: "previous:",
  3845. protocol: 'accessing',
  3846. fn: function (aWidget){
  3847. var self=this;
  3848. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3849. return $core.withContext(function($ctx1) {
  3850. //>>excludeEnd("ctx");
  3851. var $1;
  3852. self["@previous"]=aWidget;
  3853. $1=$recv($recv(aWidget)._next()).__eq(self);
  3854. if(!$core.assert($1)){
  3855. $recv(aWidget)._next_(self);
  3856. };
  3857. return self;
  3858. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3859. }, function($ctx1) {$ctx1.fill(self,"previous:",{aWidget:aWidget},$globals.HLNavigationListWidget)});
  3860. //>>excludeEnd("ctx");
  3861. },
  3862. //>>excludeStart("ide", pragmas.excludeIdeData);
  3863. args: ["aWidget"],
  3864. source: "previous: aWidget\x0a\x09previous := aWidget.\x0a aWidget next = self ifFalse: [ aWidget next: self ]",
  3865. referencedClasses: [],
  3866. //>>excludeEnd("ide");
  3867. messageSends: ["ifFalse:", "=", "next", "next:"]
  3868. }),
  3869. $globals.HLNavigationListWidget);
  3870. $core.addMethod(
  3871. $core.method({
  3872. selector: "previousFocus",
  3873. protocol: 'actions',
  3874. fn: function (){
  3875. var self=this;
  3876. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3877. return $core.withContext(function($ctx1) {
  3878. //>>excludeEnd("ctx");
  3879. var $1,$receiver;
  3880. $1=self._previous();
  3881. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3882. $ctx1.sendIdx["previous"]=1;
  3883. //>>excludeEnd("ctx");
  3884. if(($receiver = $1) == null || $receiver.isNil){
  3885. $1;
  3886. } else {
  3887. $recv(self._previous())._focus();
  3888. };
  3889. return self;
  3890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3891. }, function($ctx1) {$ctx1.fill(self,"previousFocus",{},$globals.HLNavigationListWidget)});
  3892. //>>excludeEnd("ctx");
  3893. },
  3894. //>>excludeStart("ide", pragmas.excludeIdeData);
  3895. args: [],
  3896. source: "previousFocus\x0a\x09self previous ifNotNil: [ self previous focus ]",
  3897. referencedClasses: [],
  3898. //>>excludeEnd("ide");
  3899. messageSends: ["ifNotNil:", "previous", "focus"]
  3900. }),
  3901. $globals.HLNavigationListWidget);
  3902. $core.addMethod(
  3903. $core.method({
  3904. selector: "setupKeyBindings",
  3905. protocol: 'events',
  3906. fn: function (){
  3907. var self=this;
  3908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3909. return $core.withContext(function($ctx1) {
  3910. //>>excludeEnd("ctx");
  3911. var $2,$1,$3;
  3912. (
  3913. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3914. $ctx1.supercall = true,
  3915. //>>excludeEnd("ctx");
  3916. $globals.HLNavigationListWidget.superclass.fn.prototype._setupKeyBindings.apply($recv(self), []));
  3917. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3918. $ctx1.supercall = false;
  3919. //>>excludeEnd("ctx");;
  3920. $recv($recv(self._wrapper())._asJQuery())._keydown_((function(e){
  3921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3922. return $core.withContext(function($ctx2) {
  3923. //>>excludeEnd("ctx");
  3924. $2=$recv(e)._which();
  3925. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3926. $ctx2.sendIdx["which"]=1;
  3927. //>>excludeEnd("ctx");
  3928. $1=$recv($2).__eq((39));
  3929. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3930. $ctx2.sendIdx["="]=1;
  3931. //>>excludeEnd("ctx");
  3932. if($core.assert($1)){
  3933. self._nextFocus();
  3934. };
  3935. $3=$recv($recv(e)._which()).__eq((37));
  3936. if($core.assert($3)){
  3937. return self._previousFocus();
  3938. };
  3939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3940. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  3941. //>>excludeEnd("ctx");
  3942. }));
  3943. return self;
  3944. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3945. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLNavigationListWidget)});
  3946. //>>excludeEnd("ctx");
  3947. },
  3948. //>>excludeStart("ide", pragmas.excludeIdeData);
  3949. args: [],
  3950. 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 ] ]",
  3951. referencedClasses: [],
  3952. //>>excludeEnd("ide");
  3953. messageSends: ["setupKeyBindings", "keydown:", "asJQuery", "wrapper", "ifTrue:", "=", "which", "nextFocus", "previousFocus"]
  3954. }),
  3955. $globals.HLNavigationListWidget);
  3956. $core.addClass('HLToolListWidget', $globals.HLNavigationListWidget, ['model'], 'Helios-Core');
  3957. $core.addMethod(
  3958. $core.method({
  3959. selector: "activateListItem:",
  3960. protocol: 'actions',
  3961. fn: function (anItem){
  3962. var self=this;
  3963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3964. return $core.withContext(function($ctx1) {
  3965. //>>excludeEnd("ctx");
  3966. $recv(self._model())._withChangesDo_((function(){
  3967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3968. return $core.withContext(function($ctx2) {
  3969. //>>excludeEnd("ctx");
  3970. return (
  3971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3972. $ctx2.supercall = true,
  3973. //>>excludeEnd("ctx");
  3974. $globals.HLToolListWidget.superclass.fn.prototype._activateListItem_.apply($recv(self), [anItem]));
  3975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3976. $ctx2.supercall = false;
  3977. //>>excludeEnd("ctx");;
  3978. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3979. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  3980. //>>excludeEnd("ctx");
  3981. }));
  3982. return self;
  3983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  3984. }, function($ctx1) {$ctx1.fill(self,"activateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  3985. //>>excludeEnd("ctx");
  3986. },
  3987. //>>excludeStart("ide", pragmas.excludeIdeData);
  3988. args: ["anItem"],
  3989. source: "activateListItem: anItem\x0a\x09self model withChangesDo: [ super activateListItem: anItem ]",
  3990. referencedClasses: [],
  3991. //>>excludeEnd("ide");
  3992. messageSends: ["withChangesDo:", "model", "activateListItem:"]
  3993. }),
  3994. $globals.HLToolListWidget);
  3995. $core.addMethod(
  3996. $core.method({
  3997. selector: "activateNextListItem",
  3998. protocol: 'actions',
  3999. fn: function (){
  4000. var self=this;
  4001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4002. return $core.withContext(function($ctx1) {
  4003. //>>excludeEnd("ctx");
  4004. $recv(self._model())._withChangesDo_((function(){
  4005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4006. return $core.withContext(function($ctx2) {
  4007. //>>excludeEnd("ctx");
  4008. return (
  4009. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4010. $ctx2.supercall = true,
  4011. //>>excludeEnd("ctx");
  4012. $globals.HLToolListWidget.superclass.fn.prototype._activateNextListItem.apply($recv(self), []));
  4013. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4014. $ctx2.supercall = false;
  4015. //>>excludeEnd("ctx");;
  4016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4017. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4018. //>>excludeEnd("ctx");
  4019. }));
  4020. return self;
  4021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4022. }, function($ctx1) {$ctx1.fill(self,"activateNextListItem",{},$globals.HLToolListWidget)});
  4023. //>>excludeEnd("ctx");
  4024. },
  4025. //>>excludeStart("ide", pragmas.excludeIdeData);
  4026. args: [],
  4027. source: "activateNextListItem\x0a\x09self model withChangesDo: [ super activateNextListItem ]",
  4028. referencedClasses: [],
  4029. //>>excludeEnd("ide");
  4030. messageSends: ["withChangesDo:", "model", "activateNextListItem"]
  4031. }),
  4032. $globals.HLToolListWidget);
  4033. $core.addMethod(
  4034. $core.method({
  4035. selector: "activatePreviousListItem",
  4036. protocol: 'actions',
  4037. fn: function (){
  4038. var self=this;
  4039. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4040. return $core.withContext(function($ctx1) {
  4041. //>>excludeEnd("ctx");
  4042. $recv(self._model())._withChangesDo_((function(){
  4043. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4044. return $core.withContext(function($ctx2) {
  4045. //>>excludeEnd("ctx");
  4046. return (
  4047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4048. $ctx2.supercall = true,
  4049. //>>excludeEnd("ctx");
  4050. $globals.HLToolListWidget.superclass.fn.prototype._activatePreviousListItem.apply($recv(self), []));
  4051. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4052. $ctx2.supercall = false;
  4053. //>>excludeEnd("ctx");;
  4054. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4055. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4056. //>>excludeEnd("ctx");
  4057. }));
  4058. return self;
  4059. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4060. }, function($ctx1) {$ctx1.fill(self,"activatePreviousListItem",{},$globals.HLToolListWidget)});
  4061. //>>excludeEnd("ctx");
  4062. },
  4063. //>>excludeStart("ide", pragmas.excludeIdeData);
  4064. args: [],
  4065. source: "activatePreviousListItem\x0a\x09self model withChangesDo: [ super activatePreviousListItem ]",
  4066. referencedClasses: [],
  4067. //>>excludeEnd("ide");
  4068. messageSends: ["withChangesDo:", "model", "activatePreviousListItem"]
  4069. }),
  4070. $globals.HLToolListWidget);
  4071. $core.addMethod(
  4072. $core.method({
  4073. selector: "commandCategory",
  4074. protocol: 'accessing',
  4075. fn: function (){
  4076. var self=this;
  4077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4078. return $core.withContext(function($ctx1) {
  4079. //>>excludeEnd("ctx");
  4080. var $1;
  4081. $1=self._label();
  4082. return $1;
  4083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4084. }, function($ctx1) {$ctx1.fill(self,"commandCategory",{},$globals.HLToolListWidget)});
  4085. //>>excludeEnd("ctx");
  4086. },
  4087. //>>excludeStart("ide", pragmas.excludeIdeData);
  4088. args: [],
  4089. source: "commandCategory\x0a\x09^ self label",
  4090. referencedClasses: [],
  4091. //>>excludeEnd("ide");
  4092. messageSends: ["label"]
  4093. }),
  4094. $globals.HLToolListWidget);
  4095. $core.addMethod(
  4096. $core.method({
  4097. selector: "label",
  4098. protocol: 'accessing',
  4099. fn: function (){
  4100. var self=this;
  4101. return "List";
  4102. },
  4103. //>>excludeStart("ide", pragmas.excludeIdeData);
  4104. args: [],
  4105. source: "label\x0a\x09^ 'List'",
  4106. referencedClasses: [],
  4107. //>>excludeEnd("ide");
  4108. messageSends: []
  4109. }),
  4110. $globals.HLToolListWidget);
  4111. $core.addMethod(
  4112. $core.method({
  4113. selector: "menuCommands",
  4114. protocol: 'accessing',
  4115. fn: function (){
  4116. var self=this;
  4117. function $HLToolCommand(){return $globals.HLToolCommand||(typeof HLToolCommand=="undefined"?nil:HLToolCommand)}
  4118. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4119. return $core.withContext(function($ctx1) {
  4120. //>>excludeEnd("ctx");
  4121. var $2,$1;
  4122. $1=$recv($recv($recv($recv($HLToolCommand())._concreteClasses())._select_((function(each){
  4123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4124. return $core.withContext(function($ctx2) {
  4125. //>>excludeEnd("ctx");
  4126. $2=self._model();
  4127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4128. $ctx2.sendIdx["model"]=1;
  4129. //>>excludeEnd("ctx");
  4130. return $recv(each)._isValidFor_($2);
  4131. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4132. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  4133. //>>excludeEnd("ctx");
  4134. })))._collect_((function(each){
  4135. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4136. return $core.withContext(function($ctx2) {
  4137. //>>excludeEnd("ctx");
  4138. return $recv(each)._for_(self._model());
  4139. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4140. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,2)});
  4141. //>>excludeEnd("ctx");
  4142. })))._select_((function(each){
  4143. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4144. return $core.withContext(function($ctx2) {
  4145. //>>excludeEnd("ctx");
  4146. return $recv($recv($recv(each)._category()).__eq(self._commandCategory()))._and_((function(){
  4147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4148. return $core.withContext(function($ctx3) {
  4149. //>>excludeEnd("ctx");
  4150. return $recv($recv(each)._isAction())._and_((function(){
  4151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4152. return $core.withContext(function($ctx4) {
  4153. //>>excludeEnd("ctx");
  4154. return $recv(each)._isActive();
  4155. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4156. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  4157. //>>excludeEnd("ctx");
  4158. }));
  4159. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4160. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4161. //>>excludeEnd("ctx");
  4162. }));
  4163. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4164. $ctx2.sendIdx["and:"]=1;
  4165. //>>excludeEnd("ctx");
  4166. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4167. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,3)});
  4168. //>>excludeEnd("ctx");
  4169. }));
  4170. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4171. $ctx1.sendIdx["select:"]=1;
  4172. //>>excludeEnd("ctx");
  4173. return $1;
  4174. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4175. }, function($ctx1) {$ctx1.fill(self,"menuCommands",{},$globals.HLToolListWidget)});
  4176. //>>excludeEnd("ctx");
  4177. },
  4178. //>>excludeStart("ide", pragmas.excludeIdeData);
  4179. args: [],
  4180. 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 ] ] ]",
  4181. referencedClasses: ["HLToolCommand"],
  4182. //>>excludeEnd("ide");
  4183. messageSends: ["select:", "collect:", "concreteClasses", "isValidFor:", "model", "for:", "and:", "=", "category", "commandCategory", "isAction", "isActive"]
  4184. }),
  4185. $globals.HLToolListWidget);
  4186. $core.addMethod(
  4187. $core.method({
  4188. selector: "model",
  4189. protocol: 'accessing',
  4190. fn: function (){
  4191. var self=this;
  4192. var $1;
  4193. $1=self["@model"];
  4194. return $1;
  4195. },
  4196. //>>excludeStart("ide", pragmas.excludeIdeData);
  4197. args: [],
  4198. source: "model\x0a\x09^ model",
  4199. referencedClasses: [],
  4200. //>>excludeEnd("ide");
  4201. messageSends: []
  4202. }),
  4203. $globals.HLToolListWidget);
  4204. $core.addMethod(
  4205. $core.method({
  4206. selector: "model:",
  4207. protocol: 'accessing',
  4208. fn: function (aBrowserModel){
  4209. var self=this;
  4210. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4211. return $core.withContext(function($ctx1) {
  4212. //>>excludeEnd("ctx");
  4213. var $1;
  4214. self["@model"]=aBrowserModel;
  4215. self._observeSystem();
  4216. $1=self._observeModel();
  4217. return self;
  4218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4219. }, function($ctx1) {$ctx1.fill(self,"model:",{aBrowserModel:aBrowserModel},$globals.HLToolListWidget)});
  4220. //>>excludeEnd("ctx");
  4221. },
  4222. //>>excludeStart("ide", pragmas.excludeIdeData);
  4223. args: ["aBrowserModel"],
  4224. source: "model: aBrowserModel\x0a\x09model := aBrowserModel.\x0a \x0a self \x0a\x09\x09observeSystem;\x0a\x09\x09observeModel",
  4225. referencedClasses: [],
  4226. //>>excludeEnd("ide");
  4227. messageSends: ["observeSystem", "observeModel"]
  4228. }),
  4229. $globals.HLToolListWidget);
  4230. $core.addMethod(
  4231. $core.method({
  4232. selector: "observeModel",
  4233. protocol: 'actions',
  4234. fn: function (){
  4235. var self=this;
  4236. return self;
  4237. },
  4238. //>>excludeStart("ide", pragmas.excludeIdeData);
  4239. args: [],
  4240. source: "observeModel",
  4241. referencedClasses: [],
  4242. //>>excludeEnd("ide");
  4243. messageSends: []
  4244. }),
  4245. $globals.HLToolListWidget);
  4246. $core.addMethod(
  4247. $core.method({
  4248. selector: "observeSystem",
  4249. protocol: 'actions',
  4250. fn: function (){
  4251. var self=this;
  4252. return self;
  4253. },
  4254. //>>excludeStart("ide", pragmas.excludeIdeData);
  4255. args: [],
  4256. source: "observeSystem",
  4257. referencedClasses: [],
  4258. //>>excludeEnd("ide");
  4259. messageSends: []
  4260. }),
  4261. $globals.HLToolListWidget);
  4262. $core.addMethod(
  4263. $core.method({
  4264. selector: "reactivateListItem:",
  4265. protocol: 'actions',
  4266. fn: function (anItem){
  4267. var self=this;
  4268. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4269. return $core.withContext(function($ctx1) {
  4270. //>>excludeEnd("ctx");
  4271. $recv(self._model())._withChangesDo_((function(){
  4272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4273. return $core.withContext(function($ctx2) {
  4274. //>>excludeEnd("ctx");
  4275. return (
  4276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4277. $ctx2.supercall = true,
  4278. //>>excludeEnd("ctx");
  4279. $globals.HLToolListWidget.superclass.fn.prototype._reactivateListItem_.apply($recv(self), [anItem]));
  4280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4281. $ctx2.supercall = false;
  4282. //>>excludeEnd("ctx");;
  4283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4284. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4285. //>>excludeEnd("ctx");
  4286. }));
  4287. return self;
  4288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4289. }, function($ctx1) {$ctx1.fill(self,"reactivateListItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4290. //>>excludeEnd("ctx");
  4291. },
  4292. //>>excludeStart("ide", pragmas.excludeIdeData);
  4293. args: ["anItem"],
  4294. source: "reactivateListItem: anItem\x0a\x09self model withChangesDo: [ super reactivateListItem: anItem ]",
  4295. referencedClasses: [],
  4296. //>>excludeEnd("ide");
  4297. messageSends: ["withChangesDo:", "model", "reactivateListItem:"]
  4298. }),
  4299. $globals.HLToolListWidget);
  4300. $core.addMethod(
  4301. $core.method({
  4302. selector: "renderContentOn:",
  4303. protocol: 'rendering',
  4304. fn: function (html){
  4305. var self=this;
  4306. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4307. return $core.withContext(function($ctx1) {
  4308. //>>excludeEnd("ctx");
  4309. self._renderHeadOn_(html);
  4310. (
  4311. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4312. $ctx1.supercall = true,
  4313. //>>excludeEnd("ctx");
  4314. $globals.HLToolListWidget.superclass.fn.prototype._renderContentOn_.apply($recv(self), [html]));
  4315. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4316. $ctx1.supercall = false;
  4317. //>>excludeEnd("ctx");;
  4318. return self;
  4319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4320. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLToolListWidget)});
  4321. //>>excludeEnd("ctx");
  4322. },
  4323. //>>excludeStart("ide", pragmas.excludeIdeData);
  4324. args: ["html"],
  4325. source: "renderContentOn: html\x0a\x09self renderHeadOn: html.\x09\x0a\x09super renderContentOn: html",
  4326. referencedClasses: [],
  4327. //>>excludeEnd("ide");
  4328. messageSends: ["renderHeadOn:", "renderContentOn:"]
  4329. }),
  4330. $globals.HLToolListWidget);
  4331. $core.addMethod(
  4332. $core.method({
  4333. selector: "renderHeadOn:",
  4334. protocol: 'rendering',
  4335. fn: function (html){
  4336. var self=this;
  4337. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4338. return $core.withContext(function($ctx1) {
  4339. //>>excludeEnd("ctx");
  4340. var $1,$2;
  4341. $1=$recv(html)._div();
  4342. $recv($1)._class_("list-label");
  4343. $2=$recv($1)._with_((function(){
  4344. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4345. return $core.withContext(function($ctx2) {
  4346. //>>excludeEnd("ctx");
  4347. $recv(html)._with_(self._label());
  4348. return self._renderMenuOn_(html);
  4349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4350. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4351. //>>excludeEnd("ctx");
  4352. }));
  4353. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4354. $ctx1.sendIdx["with:"]=1;
  4355. //>>excludeEnd("ctx");
  4356. return self;
  4357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4358. }, function($ctx1) {$ctx1.fill(self,"renderHeadOn:",{html:html},$globals.HLToolListWidget)});
  4359. //>>excludeEnd("ctx");
  4360. },
  4361. //>>excludeStart("ide", pragmas.excludeIdeData);
  4362. args: ["html"],
  4363. 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 ]",
  4364. referencedClasses: [],
  4365. //>>excludeEnd("ide");
  4366. messageSends: ["class:", "div", "with:", "label", "renderMenuOn:"]
  4367. }),
  4368. $globals.HLToolListWidget);
  4369. $core.addMethod(
  4370. $core.method({
  4371. selector: "renderMenuOn:",
  4372. protocol: 'rendering',
  4373. fn: function (html){
  4374. var self=this;
  4375. var commands;
  4376. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4377. return $core.withContext(function($ctx1) {
  4378. //>>excludeEnd("ctx");
  4379. var $1,$2,$4,$5,$6,$8,$9,$7,$3;
  4380. commands=self._menuCommands();
  4381. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4382. $ctx1.sendIdx["menuCommands"]=1;
  4383. //>>excludeEnd("ctx");
  4384. $1=$recv(commands)._isEmpty();
  4385. if($core.assert($1)){
  4386. return self;
  4387. };
  4388. $2=$recv(html)._div();
  4389. $recv($2)._class_("btn-group cog");
  4390. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4391. $ctx1.sendIdx["class:"]=1;
  4392. //>>excludeEnd("ctx");
  4393. $3=$recv($2)._with_((function(){
  4394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4395. return $core.withContext(function($ctx2) {
  4396. //>>excludeEnd("ctx");
  4397. $4=$recv(html)._a();
  4398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4399. $ctx2.sendIdx["a"]=1;
  4400. //>>excludeEnd("ctx");
  4401. $recv($4)._class_("btn dropdown-toggle");
  4402. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4403. $ctx2.sendIdx["class:"]=2;
  4404. //>>excludeEnd("ctx");
  4405. $recv($4)._at_put_("data-toggle","dropdown");
  4406. $5=$recv($4)._with_((function(){
  4407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4408. return $core.withContext(function($ctx3) {
  4409. //>>excludeEnd("ctx");
  4410. return $recv($recv(html)._tag_("i"))._class_("icon-chevron-down");
  4411. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4412. $ctx3.sendIdx["class:"]=3;
  4413. //>>excludeEnd("ctx");
  4414. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4415. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  4416. //>>excludeEnd("ctx");
  4417. }));
  4418. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4419. $ctx2.sendIdx["with:"]=2;
  4420. //>>excludeEnd("ctx");
  4421. $5;
  4422. $6=$recv(html)._ul();
  4423. $recv($6)._class_("dropdown-menu pull-right");
  4424. $7=$recv($6)._with_((function(){
  4425. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4426. return $core.withContext(function($ctx3) {
  4427. //>>excludeEnd("ctx");
  4428. return $recv(self._menuCommands())._do_((function(each){
  4429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4430. return $core.withContext(function($ctx4) {
  4431. //>>excludeEnd("ctx");
  4432. return $recv($recv(html)._li())._with_((function(){
  4433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4434. return $core.withContext(function($ctx5) {
  4435. //>>excludeEnd("ctx");
  4436. $8=$recv(html)._a();
  4437. $recv($8)._with_($recv(each)._menuLabel());
  4438. $9=$recv($8)._onClick_((function(){
  4439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4440. return $core.withContext(function($ctx6) {
  4441. //>>excludeEnd("ctx");
  4442. return self._execute_(each);
  4443. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4444. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,7)});
  4445. //>>excludeEnd("ctx");
  4446. }));
  4447. return $9;
  4448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4449. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,6)});
  4450. //>>excludeEnd("ctx");
  4451. }));
  4452. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4453. $ctx4.sendIdx["with:"]=4;
  4454. //>>excludeEnd("ctx");
  4455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4456. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,5)});
  4457. //>>excludeEnd("ctx");
  4458. }));
  4459. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4460. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  4461. //>>excludeEnd("ctx");
  4462. }));
  4463. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4464. $ctx2.sendIdx["with:"]=3;
  4465. //>>excludeEnd("ctx");
  4466. return $7;
  4467. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4468. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  4469. //>>excludeEnd("ctx");
  4470. }));
  4471. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4472. $ctx1.sendIdx["with:"]=1;
  4473. //>>excludeEnd("ctx");
  4474. return self;
  4475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4476. }, function($ctx1) {$ctx1.fill(self,"renderMenuOn:",{html:html,commands:commands},$globals.HLToolListWidget)});
  4477. //>>excludeEnd("ctx");
  4478. },
  4479. //>>excludeStart("ide", pragmas.excludeIdeData);
  4480. args: ["html"],
  4481. 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 ] ] ] ] ]",
  4482. referencedClasses: [],
  4483. //>>excludeEnd("ide");
  4484. messageSends: ["menuCommands", "ifTrue:", "isEmpty", "class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "li", "menuLabel", "onClick:", "execute:"]
  4485. }),
  4486. $globals.HLToolListWidget);
  4487. $core.addMethod(
  4488. $core.method({
  4489. selector: "selectedItem:",
  4490. protocol: 'accessing',
  4491. fn: function (anItem){
  4492. var self=this;
  4493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4494. return $core.withContext(function($ctx1) {
  4495. //>>excludeEnd("ctx");
  4496. (
  4497. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4498. $ctx1.supercall = true,
  4499. //>>excludeEnd("ctx");
  4500. $globals.HLToolListWidget.superclass.fn.prototype._selectedItem_.apply($recv(self), [anItem]));
  4501. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4502. $ctx1.supercall = false;
  4503. //>>excludeEnd("ctx");;
  4504. self._updateMenu();
  4505. return self;
  4506. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4507. }, function($ctx1) {$ctx1.fill(self,"selectedItem:",{anItem:anItem},$globals.HLToolListWidget)});
  4508. //>>excludeEnd("ctx");
  4509. },
  4510. //>>excludeStart("ide", pragmas.excludeIdeData);
  4511. args: ["anItem"],
  4512. source: "selectedItem: anItem\x0a\x09\x22Selection changed, update the cog menu\x22\x0a\x09\x0a\x09super selectedItem: anItem.\x0a\x09self updateMenu",
  4513. referencedClasses: [],
  4514. //>>excludeEnd("ide");
  4515. messageSends: ["selectedItem:", "updateMenu"]
  4516. }),
  4517. $globals.HLToolListWidget);
  4518. $core.addMethod(
  4519. $core.method({
  4520. selector: "unregister",
  4521. protocol: 'actions',
  4522. fn: function (){
  4523. var self=this;
  4524. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4525. return $core.withContext(function($ctx1) {
  4526. //>>excludeEnd("ctx");
  4527. var $2,$1;
  4528. (
  4529. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4530. $ctx1.supercall = true,
  4531. //>>excludeEnd("ctx");
  4532. $globals.HLToolListWidget.superclass.fn.prototype._unregister.apply($recv(self), []));
  4533. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4534. $ctx1.supercall = false;
  4535. //>>excludeEnd("ctx");;
  4536. $2=self._model();
  4537. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4538. $ctx1.sendIdx["model"]=1;
  4539. //>>excludeEnd("ctx");
  4540. $1=$recv($2)._announcer();
  4541. $recv($1)._unsubscribe_(self);
  4542. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4543. $ctx1.sendIdx["unsubscribe:"]=1;
  4544. //>>excludeEnd("ctx");
  4545. $recv($recv(self._model())._systemAnnouncer())._unsubscribe_(self);
  4546. return self;
  4547. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4548. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLToolListWidget)});
  4549. //>>excludeEnd("ctx");
  4550. },
  4551. //>>excludeStart("ide", pragmas.excludeIdeData);
  4552. args: [],
  4553. source: "unregister\x0a\x09super unregister.\x0a\x09\x0a\x09self model announcer unsubscribe: self.\x0a\x09self model systemAnnouncer unsubscribe: self",
  4554. referencedClasses: [],
  4555. //>>excludeEnd("ide");
  4556. messageSends: ["unregister", "unsubscribe:", "announcer", "model", "systemAnnouncer"]
  4557. }),
  4558. $globals.HLToolListWidget);
  4559. $core.addMethod(
  4560. $core.method({
  4561. selector: "updateMenu",
  4562. protocol: 'updating',
  4563. fn: function (){
  4564. var self=this;
  4565. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4566. return $core.withContext(function($ctx1) {
  4567. //>>excludeEnd("ctx");
  4568. var $3,$2,$1;
  4569. $3=self._wrapper();
  4570. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4571. $ctx1.sendIdx["wrapper"]=1;
  4572. //>>excludeEnd("ctx");
  4573. $2=$recv($3)._asJQuery();
  4574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4575. $ctx1.sendIdx["asJQuery"]=1;
  4576. //>>excludeEnd("ctx");
  4577. $1=$recv($2)._find_(".cog");
  4578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4579. $ctx1.sendIdx["find:"]=1;
  4580. //>>excludeEnd("ctx");
  4581. $recv($1)._remove();
  4582. $recv((function(html){
  4583. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4584. return $core.withContext(function($ctx2) {
  4585. //>>excludeEnd("ctx");
  4586. return self._renderMenuOn_(html);
  4587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4588. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  4589. //>>excludeEnd("ctx");
  4590. }))._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".list-label"));
  4591. return self;
  4592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4593. }, function($ctx1) {$ctx1.fill(self,"updateMenu",{},$globals.HLToolListWidget)});
  4594. //>>excludeEnd("ctx");
  4595. },
  4596. //>>excludeStart("ide", pragmas.excludeIdeData);
  4597. args: [],
  4598. 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')",
  4599. referencedClasses: [],
  4600. //>>excludeEnd("ide");
  4601. messageSends: ["remove", "find:", "asJQuery", "wrapper", "appendToJQuery:", "renderMenuOn:"]
  4602. }),
  4603. $globals.HLToolListWidget);
  4604. $core.addMethod(
  4605. $core.method({
  4606. selector: "on:",
  4607. protocol: 'instance creation',
  4608. fn: function (aModel){
  4609. var self=this;
  4610. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4611. return $core.withContext(function($ctx1) {
  4612. //>>excludeEnd("ctx");
  4613. var $2,$3,$1;
  4614. $2=self._new();
  4615. $recv($2)._model_(aModel);
  4616. $3=$recv($2)._yourself();
  4617. $1=$3;
  4618. return $1;
  4619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4620. }, function($ctx1) {$ctx1.fill(self,"on:",{aModel:aModel},$globals.HLToolListWidget.klass)});
  4621. //>>excludeEnd("ctx");
  4622. },
  4623. //>>excludeStart("ide", pragmas.excludeIdeData);
  4624. args: ["aModel"],
  4625. source: "on: aModel\x0a\x09^ self new \x0a \x09model: aModel;\x0a yourself",
  4626. referencedClasses: [],
  4627. //>>excludeEnd("ide");
  4628. messageSends: ["model:", "new", "yourself"]
  4629. }),
  4630. $globals.HLToolListWidget.klass);
  4631. $core.addClass('HLTabListWidget', $globals.HLListWidget, ['callback'], 'Helios-Core');
  4632. //>>excludeStart("ide", pragmas.excludeIdeData);
  4633. $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.";
  4634. //>>excludeEnd("ide");
  4635. $core.addMethod(
  4636. $core.method({
  4637. selector: "callback",
  4638. protocol: 'accessing',
  4639. fn: function (){
  4640. var self=this;
  4641. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4642. return $core.withContext(function($ctx1) {
  4643. //>>excludeEnd("ctx");
  4644. var $2,$1,$receiver;
  4645. $2=self["@callback"];
  4646. if(($receiver = $2) == null || $receiver.isNil){
  4647. $1=(function(){
  4648. });
  4649. } else {
  4650. $1=$2;
  4651. };
  4652. return $1;
  4653. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4654. }, function($ctx1) {$ctx1.fill(self,"callback",{},$globals.HLTabListWidget)});
  4655. //>>excludeEnd("ctx");
  4656. },
  4657. //>>excludeStart("ide", pragmas.excludeIdeData);
  4658. args: [],
  4659. source: "callback\x0a\x09^ callback ifNil: [ [] ]",
  4660. referencedClasses: [],
  4661. //>>excludeEnd("ide");
  4662. messageSends: ["ifNil:"]
  4663. }),
  4664. $globals.HLTabListWidget);
  4665. $core.addMethod(
  4666. $core.method({
  4667. selector: "callback:",
  4668. protocol: 'accessing',
  4669. fn: function (aBlock){
  4670. var self=this;
  4671. self["@callback"]=aBlock;
  4672. return self;
  4673. },
  4674. //>>excludeStart("ide", pragmas.excludeIdeData);
  4675. args: ["aBlock"],
  4676. source: "callback: aBlock\x0a\x09callback := aBlock",
  4677. referencedClasses: [],
  4678. //>>excludeEnd("ide");
  4679. messageSends: []
  4680. }),
  4681. $globals.HLTabListWidget);
  4682. $core.addMethod(
  4683. $core.method({
  4684. selector: "renderItemLabel:on:",
  4685. protocol: 'rendering',
  4686. fn: function (aTab,html){
  4687. var self=this;
  4688. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4689. return $core.withContext(function($ctx1) {
  4690. //>>excludeEnd("ctx");
  4691. var $1,$2;
  4692. $1=$recv(html)._span();
  4693. $recv($1)._class_($recv(aTab)._cssClass());
  4694. $2=$recv($1)._with_($recv(aTab)._label());
  4695. return self;
  4696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4697. }, function($ctx1) {$ctx1.fill(self,"renderItemLabel:on:",{aTab:aTab,html:html},$globals.HLTabListWidget)});
  4698. //>>excludeEnd("ctx");
  4699. },
  4700. //>>excludeStart("ide", pragmas.excludeIdeData);
  4701. args: ["aTab", "html"],
  4702. source: "renderItemLabel: aTab on: html\x0a\x09html span\x0a\x09\x09class: aTab cssClass;\x0a\x09\x09with: aTab label",
  4703. referencedClasses: [],
  4704. //>>excludeEnd("ide");
  4705. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  4706. }),
  4707. $globals.HLTabListWidget);
  4708. $core.addMethod(
  4709. $core.method({
  4710. selector: "selectItem:",
  4711. protocol: 'actions',
  4712. fn: function (aTab){
  4713. var self=this;
  4714. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4715. return $core.withContext(function($ctx1) {
  4716. //>>excludeEnd("ctx");
  4717. (
  4718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4719. $ctx1.supercall = true,
  4720. //>>excludeEnd("ctx");
  4721. $globals.HLTabListWidget.superclass.fn.prototype._selectItem_.apply($recv(self), [aTab]));
  4722. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4723. $ctx1.supercall = false;
  4724. //>>excludeEnd("ctx");;
  4725. $recv(self._callback())._value_(aTab);
  4726. return self;
  4727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4728. }, function($ctx1) {$ctx1.fill(self,"selectItem:",{aTab:aTab},$globals.HLTabListWidget)});
  4729. //>>excludeEnd("ctx");
  4730. },
  4731. //>>excludeStart("ide", pragmas.excludeIdeData);
  4732. args: ["aTab"],
  4733. source: "selectItem: aTab\x0a\x09super selectItem: aTab.\x0a\x09self callback value: aTab",
  4734. referencedClasses: [],
  4735. //>>excludeEnd("ide");
  4736. messageSends: ["selectItem:", "value:", "callback"]
  4737. }),
  4738. $globals.HLTabListWidget);
  4739. $core.addClass('HLInformationWidget', $globals.HLWidget, ['informationString'], 'Helios-Core');
  4740. //>>excludeStart("ide", pragmas.excludeIdeData);
  4741. $globals.HLInformationWidget.comment="I display an information dialog.\x0a\x0a## API\x0a\x0a`HLWidget >> #inform:` is a convenience method for creating information dialogs.";
  4742. //>>excludeEnd("ide");
  4743. $core.addMethod(
  4744. $core.method({
  4745. selector: "informationString",
  4746. protocol: 'accessing',
  4747. fn: function (){
  4748. var self=this;
  4749. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4750. return $core.withContext(function($ctx1) {
  4751. //>>excludeEnd("ctx");
  4752. var $2,$1,$receiver;
  4753. $2=self["@informationString"];
  4754. if(($receiver = $2) == null || $receiver.isNil){
  4755. $1="";
  4756. } else {
  4757. $1=$2;
  4758. };
  4759. return $1;
  4760. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4761. }, function($ctx1) {$ctx1.fill(self,"informationString",{},$globals.HLInformationWidget)});
  4762. //>>excludeEnd("ctx");
  4763. },
  4764. //>>excludeStart("ide", pragmas.excludeIdeData);
  4765. args: [],
  4766. source: "informationString\x0a\x09^ informationString ifNil: [ '' ]",
  4767. referencedClasses: [],
  4768. //>>excludeEnd("ide");
  4769. messageSends: ["ifNil:"]
  4770. }),
  4771. $globals.HLInformationWidget);
  4772. $core.addMethod(
  4773. $core.method({
  4774. selector: "informationString:",
  4775. protocol: 'accessing',
  4776. fn: function (anObject){
  4777. var self=this;
  4778. self["@informationString"]=anObject;
  4779. return self;
  4780. },
  4781. //>>excludeStart("ide", pragmas.excludeIdeData);
  4782. args: ["anObject"],
  4783. source: "informationString: anObject\x0a\x09informationString := anObject",
  4784. referencedClasses: [],
  4785. //>>excludeEnd("ide");
  4786. messageSends: []
  4787. }),
  4788. $globals.HLInformationWidget);
  4789. $core.addMethod(
  4790. $core.method({
  4791. selector: "remove",
  4792. protocol: 'actions',
  4793. fn: function (){
  4794. var self=this;
  4795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4796. return $core.withContext(function($ctx1) {
  4797. //>>excludeEnd("ctx");
  4798. var $2,$1;
  4799. $recv((function(){
  4800. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4801. return $core.withContext(function($ctx2) {
  4802. //>>excludeEnd("ctx");
  4803. $2=self._wrapper();
  4804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4805. $ctx2.sendIdx["wrapper"]=1;
  4806. //>>excludeEnd("ctx");
  4807. $1=$recv($2)._asJQuery();
  4808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4809. $ctx2.sendIdx["asJQuery"]=1;
  4810. //>>excludeEnd("ctx");
  4811. $recv($1)._fadeOut_((100));
  4812. return $recv((function(){
  4813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4814. return $core.withContext(function($ctx3) {
  4815. //>>excludeEnd("ctx");
  4816. return $recv($recv(self._wrapper())._asJQuery())._remove();
  4817. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4818. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  4819. //>>excludeEnd("ctx");
  4820. }))._valueWithTimeout_((400));
  4821. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4822. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  4823. //>>excludeEnd("ctx");
  4824. }))._valueWithTimeout_((1500));
  4825. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4826. $ctx1.sendIdx["valueWithTimeout:"]=1;
  4827. //>>excludeEnd("ctx");
  4828. return self;
  4829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4830. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLInformationWidget)});
  4831. //>>excludeEnd("ctx");
  4832. },
  4833. //>>excludeStart("ide", pragmas.excludeIdeData);
  4834. args: [],
  4835. 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",
  4836. referencedClasses: [],
  4837. //>>excludeEnd("ide");
  4838. messageSends: ["valueWithTimeout:", "fadeOut:", "asJQuery", "wrapper", "remove"]
  4839. }),
  4840. $globals.HLInformationWidget);
  4841. $core.addMethod(
  4842. $core.method({
  4843. selector: "renderContentOn:",
  4844. protocol: 'rendering',
  4845. fn: function (html){
  4846. var self=this;
  4847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4848. return $core.withContext(function($ctx1) {
  4849. //>>excludeEnd("ctx");
  4850. var $1,$2;
  4851. $1=$recv(html)._div();
  4852. $recv($1)._class_("growl");
  4853. $2=$recv($1)._with_(self._informationString());
  4854. self._remove();
  4855. return self;
  4856. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4857. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLInformationWidget)});
  4858. //>>excludeEnd("ctx");
  4859. },
  4860. //>>excludeStart("ide", pragmas.excludeIdeData);
  4861. args: ["html"],
  4862. source: "renderContentOn: html\x0a\x09html div \x0a\x09\x09class: 'growl'; \x0a\x09\x09with: self informationString.\x0a\x09\x09\x0a\x09self remove",
  4863. referencedClasses: [],
  4864. //>>excludeEnd("ide");
  4865. messageSends: ["class:", "div", "with:", "informationString", "remove"]
  4866. }),
  4867. $globals.HLInformationWidget);
  4868. $core.addMethod(
  4869. $core.method({
  4870. selector: "show",
  4871. protocol: 'actions',
  4872. fn: function (){
  4873. var self=this;
  4874. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4875. return $core.withContext(function($ctx1) {
  4876. //>>excludeEnd("ctx");
  4877. self._appendToJQuery_("body"._asJQuery());
  4878. return self;
  4879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4880. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLInformationWidget)});
  4881. //>>excludeEnd("ctx");
  4882. },
  4883. //>>excludeStart("ide", pragmas.excludeIdeData);
  4884. args: [],
  4885. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  4886. referencedClasses: [],
  4887. //>>excludeEnd("ide");
  4888. messageSends: ["appendToJQuery:", "asJQuery"]
  4889. }),
  4890. $globals.HLInformationWidget);
  4891. $core.addClass('HLManager', $globals.HLWidget, ['tabsWidget', 'environment', 'history', 'announcer'], 'Helios-Core');
  4892. $core.addMethod(
  4893. $core.method({
  4894. selector: "activate:",
  4895. protocol: 'actions',
  4896. fn: function (aTab){
  4897. var self=this;
  4898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4899. return $core.withContext(function($ctx1) {
  4900. //>>excludeEnd("ctx");
  4901. $recv(self._tabsWidget())._activate_(aTab);
  4902. return self;
  4903. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4904. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLManager)});
  4905. //>>excludeEnd("ctx");
  4906. },
  4907. //>>excludeStart("ide", pragmas.excludeIdeData);
  4908. args: ["aTab"],
  4909. source: "activate: aTab\x0a\x09self tabsWidget activate: aTab",
  4910. referencedClasses: [],
  4911. //>>excludeEnd("ide");
  4912. messageSends: ["activate:", "tabsWidget"]
  4913. }),
  4914. $globals.HLManager);
  4915. $core.addMethod(
  4916. $core.method({
  4917. selector: "activeTab",
  4918. protocol: 'accessing',
  4919. fn: function (){
  4920. var self=this;
  4921. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4922. return $core.withContext(function($ctx1) {
  4923. //>>excludeEnd("ctx");
  4924. var $1;
  4925. $1=$recv(self._tabsWidget())._activeTab();
  4926. return $1;
  4927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4928. }, function($ctx1) {$ctx1.fill(self,"activeTab",{},$globals.HLManager)});
  4929. //>>excludeEnd("ctx");
  4930. },
  4931. //>>excludeStart("ide", pragmas.excludeIdeData);
  4932. args: [],
  4933. source: "activeTab\x0a\x09^ self tabsWidget activeTab",
  4934. referencedClasses: [],
  4935. //>>excludeEnd("ide");
  4936. messageSends: ["activeTab", "tabsWidget"]
  4937. }),
  4938. $globals.HLManager);
  4939. $core.addMethod(
  4940. $core.method({
  4941. selector: "addTab:",
  4942. protocol: 'actions',
  4943. fn: function (aTab){
  4944. var self=this;
  4945. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4946. return $core.withContext(function($ctx1) {
  4947. //>>excludeEnd("ctx");
  4948. $recv(self._tabsWidget())._addTab_(aTab);
  4949. return self;
  4950. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4951. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLManager)});
  4952. //>>excludeEnd("ctx");
  4953. },
  4954. //>>excludeStart("ide", pragmas.excludeIdeData);
  4955. args: ["aTab"],
  4956. source: "addTab: aTab\x0a\x09self tabsWidget addTab: aTab",
  4957. referencedClasses: [],
  4958. //>>excludeEnd("ide");
  4959. messageSends: ["addTab:", "tabsWidget"]
  4960. }),
  4961. $globals.HLManager);
  4962. $core.addMethod(
  4963. $core.method({
  4964. selector: "announcer",
  4965. protocol: 'accessing',
  4966. fn: function (){
  4967. var self=this;
  4968. function $Announcer(){return $globals.Announcer||(typeof Announcer=="undefined"?nil:Announcer)}
  4969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4970. return $core.withContext(function($ctx1) {
  4971. //>>excludeEnd("ctx");
  4972. var $2,$1,$receiver;
  4973. $2=self["@announcer"];
  4974. if(($receiver = $2) == null || $receiver.isNil){
  4975. self["@announcer"]=$recv($Announcer())._new();
  4976. $1=self["@announcer"];
  4977. } else {
  4978. $1=$2;
  4979. };
  4980. return $1;
  4981. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  4982. }, function($ctx1) {$ctx1.fill(self,"announcer",{},$globals.HLManager)});
  4983. //>>excludeEnd("ctx");
  4984. },
  4985. //>>excludeStart("ide", pragmas.excludeIdeData);
  4986. args: [],
  4987. source: "announcer\x0a\x09^ announcer ifNil: [ announcer := Announcer new ]",
  4988. referencedClasses: ["Announcer"],
  4989. //>>excludeEnd("ide");
  4990. messageSends: ["ifNil:", "new"]
  4991. }),
  4992. $globals.HLManager);
  4993. $core.addMethod(
  4994. $core.method({
  4995. selector: "confirm:ifFalse:",
  4996. protocol: 'actions',
  4997. fn: function (aString,aBlock){
  4998. var self=this;
  4999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5000. return $core.withContext(function($ctx1) {
  5001. //>>excludeEnd("ctx");
  5002. self._confirm_ifTrue_ifFalse_(aString,(function(){
  5003. }),aBlock);
  5004. return self;
  5005. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5006. }, function($ctx1) {$ctx1.fill(self,"confirm:ifFalse:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5007. //>>excludeEnd("ctx");
  5008. },
  5009. //>>excludeStart("ide", pragmas.excludeIdeData);
  5010. args: ["aString", "aBlock"],
  5011. source: "confirm: aString ifFalse: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: []\x0a\x09\x09ifFalse: aBlock",
  5012. referencedClasses: [],
  5013. //>>excludeEnd("ide");
  5014. messageSends: ["confirm:ifTrue:ifFalse:"]
  5015. }),
  5016. $globals.HLManager);
  5017. $core.addMethod(
  5018. $core.method({
  5019. selector: "confirm:ifTrue:",
  5020. protocol: 'actions',
  5021. fn: function (aString,aBlock){
  5022. var self=this;
  5023. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5024. return $core.withContext(function($ctx1) {
  5025. //>>excludeEnd("ctx");
  5026. self._confirm_ifTrue_ifFalse_(aString,aBlock,(function(){
  5027. }));
  5028. return self;
  5029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5030. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5031. //>>excludeEnd("ctx");
  5032. },
  5033. //>>excludeStart("ide", pragmas.excludeIdeData);
  5034. args: ["aString", "aBlock"],
  5035. source: "confirm: aString ifTrue: aBlock\x0a\x09self \x0a\x09\x09confirm: aString\x0a\x09\x09ifTrue: aBlock\x0a\x09\x09ifFalse: []",
  5036. referencedClasses: [],
  5037. //>>excludeEnd("ide");
  5038. messageSends: ["confirm:ifTrue:ifFalse:"]
  5039. }),
  5040. $globals.HLManager);
  5041. $core.addMethod(
  5042. $core.method({
  5043. selector: "confirm:ifTrue:ifFalse:",
  5044. protocol: 'actions',
  5045. fn: function (aString,aBlock,anotherBlock){
  5046. var self=this;
  5047. function $HLConfirmationWidget(){return $globals.HLConfirmationWidget||(typeof HLConfirmationWidget=="undefined"?nil:HLConfirmationWidget)}
  5048. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5049. return $core.withContext(function($ctx1) {
  5050. //>>excludeEnd("ctx");
  5051. var $1,$2;
  5052. $1=$recv($HLConfirmationWidget())._new();
  5053. $recv($1)._confirmationString_(aString);
  5054. $recv($1)._actionBlock_(aBlock);
  5055. $recv($1)._cancelBlock_(anotherBlock);
  5056. $2=$recv($1)._show();
  5057. return self;
  5058. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5059. }, function($ctx1) {$ctx1.fill(self,"confirm:ifTrue:ifFalse:",{aString:aString,aBlock:aBlock,anotherBlock:anotherBlock},$globals.HLManager)});
  5060. //>>excludeEnd("ctx");
  5061. },
  5062. //>>excludeStart("ide", pragmas.excludeIdeData);
  5063. args: ["aString", "aBlock", "anotherBlock"],
  5064. 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",
  5065. referencedClasses: ["HLConfirmationWidget"],
  5066. //>>excludeEnd("ide");
  5067. messageSends: ["confirmationString:", "new", "actionBlock:", "cancelBlock:", "show"]
  5068. }),
  5069. $globals.HLManager);
  5070. $core.addMethod(
  5071. $core.method({
  5072. selector: "defaultEnvironment",
  5073. protocol: 'defaults',
  5074. fn: function (){
  5075. var self=this;
  5076. var parent,parentSmalltalkGlobals;
  5077. function $Environment(){return $globals.Environment||(typeof Environment=="undefined"?nil:Environment)}
  5078. function $Error(){return $globals.Error||(typeof Error=="undefined"?nil:Error)}
  5079. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5080. return $core.withContext(function($ctx1) {
  5081. //>>excludeEnd("ctx");
  5082. var $1,$2,$3,$5,$4,$6,$7,$8,$9,$receiver;
  5083. $1=$recv(window)._opener();
  5084. if(($receiver = $1) == null || $receiver.isNil){
  5085. parent=$recv(window)._parent();
  5086. } else {
  5087. parent=$1;
  5088. };
  5089. $2=parent;
  5090. if(($receiver = $2) == null || $receiver.isNil){
  5091. $3=$recv($Environment())._new();
  5092. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5093. $ctx1.sendIdx["new"]=1;
  5094. //>>excludeEnd("ctx");
  5095. return $3;
  5096. } else {
  5097. $2;
  5098. };
  5099. $recv((function(){
  5100. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5101. return $core.withContext(function($ctx2) {
  5102. //>>excludeEnd("ctx");
  5103. $5=$recv(parent)._at_("requirejs");
  5104. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5105. $ctx2.sendIdx["at:"]=2;
  5106. //>>excludeEnd("ctx");
  5107. $4=$recv($5)._value_("amber/boot");
  5108. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5109. $ctx2.sendIdx["value:"]=1;
  5110. //>>excludeEnd("ctx");
  5111. parentSmalltalkGlobals=$recv($4)._at_("globals");
  5112. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5113. $ctx2.sendIdx["at:"]=1;
  5114. //>>excludeEnd("ctx");
  5115. return parentSmalltalkGlobals;
  5116. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5117. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  5118. //>>excludeEnd("ctx");
  5119. }))._on_do_($Error(),(function(){
  5120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5121. return $core.withContext(function($ctx2) {
  5122. //>>excludeEnd("ctx");
  5123. $6=$recv(parent)._at_("requirejs");
  5124. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5125. $ctx2.sendIdx["at:"]=3;
  5126. //>>excludeEnd("ctx");
  5127. parentSmalltalkGlobals=$recv($6)._value_("amber_vm/globals");
  5128. return parentSmalltalkGlobals;
  5129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5130. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  5131. //>>excludeEnd("ctx");
  5132. }));
  5133. $7=parentSmalltalkGlobals;
  5134. if(($receiver = $7) == null || $receiver.isNil){
  5135. $8=$recv($Environment())._new();
  5136. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5137. $ctx1.sendIdx["new"]=2;
  5138. //>>excludeEnd("ctx");
  5139. return $8;
  5140. } else {
  5141. $7;
  5142. };
  5143. self._handleLossOfEnvironmentWithParent_(parent);
  5144. $9=$recv($recv(parentSmalltalkGlobals)._at_("Environment"))._new();
  5145. return $9;
  5146. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5147. }, function($ctx1) {$ctx1.fill(self,"defaultEnvironment",{parent:parent,parentSmalltalkGlobals:parentSmalltalkGlobals},$globals.HLManager)});
  5148. //>>excludeEnd("ctx");
  5149. },
  5150. //>>excludeStart("ide", pragmas.excludeIdeData);
  5151. args: [],
  5152. source: "defaultEnvironment\x0a\x09\x22If helios is loaded from within a frame, answer the parent window environment\x22\x0a\x09\x0a\x09| parent parentSmalltalkGlobals |\x0a\x09\x0a\x09parent := window opener ifNil: [ window parent ].\x0a\x09parent ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09[ parentSmalltalkGlobals := ((parent at: 'requirejs') value: 'amber/boot') at: 'globals' ]\x0a\x09on: Error do: [ parentSmalltalkGlobals := (parent at: 'requirejs') value: 'amber_vm/globals' ].\x0a\x09parentSmalltalkGlobals ifNil: [ ^ Environment new ].\x0a\x09\x0a\x09self handleLossOfEnvironmentWithParent: parent.\x0a\x09\x0a\x09^ (parentSmalltalkGlobals at: 'Environment') new",
  5153. referencedClasses: ["Environment", "Error"],
  5154. //>>excludeEnd("ide");
  5155. messageSends: ["ifNil:", "opener", "parent", "new", "on:do:", "at:", "value:", "handleLossOfEnvironmentWithParent:"]
  5156. }),
  5157. $globals.HLManager);
  5158. $core.addMethod(
  5159. $core.method({
  5160. selector: "environment",
  5161. protocol: 'accessing',
  5162. fn: function (){
  5163. var self=this;
  5164. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5165. return $core.withContext(function($ctx1) {
  5166. //>>excludeEnd("ctx");
  5167. var $2,$1,$receiver;
  5168. $2=self["@environment"];
  5169. if(($receiver = $2) == null || $receiver.isNil){
  5170. self["@environment"]=self._defaultEnvironment();
  5171. $1=self["@environment"];
  5172. } else {
  5173. $1=$2;
  5174. };
  5175. return $1;
  5176. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5177. }, function($ctx1) {$ctx1.fill(self,"environment",{},$globals.HLManager)});
  5178. //>>excludeEnd("ctx");
  5179. },
  5180. //>>excludeStart("ide", pragmas.excludeIdeData);
  5181. args: [],
  5182. source: "environment\x0a\x09\x22The default environment used by all Helios objects\x22\x0a \x0a\x09^ environment ifNil: [ environment := self defaultEnvironment ]",
  5183. referencedClasses: [],
  5184. //>>excludeEnd("ide");
  5185. messageSends: ["ifNil:", "defaultEnvironment"]
  5186. }),
  5187. $globals.HLManager);
  5188. $core.addMethod(
  5189. $core.method({
  5190. selector: "environment:",
  5191. protocol: 'accessing',
  5192. fn: function (anEnvironment){
  5193. var self=this;
  5194. self["@environment"]=anEnvironment;
  5195. return self;
  5196. },
  5197. //>>excludeStart("ide", pragmas.excludeIdeData);
  5198. args: ["anEnvironment"],
  5199. source: "environment: anEnvironment\x0a\x09environment := anEnvironment",
  5200. referencedClasses: [],
  5201. //>>excludeEnd("ide");
  5202. messageSends: []
  5203. }),
  5204. $globals.HLManager);
  5205. $core.addMethod(
  5206. $core.method({
  5207. selector: "handleLossOfEnvironmentWithParent:",
  5208. protocol: 'actions',
  5209. fn: function (parent){
  5210. var self=this;
  5211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5212. return $core.withContext(function($ctx1) {
  5213. //>>excludeEnd("ctx");
  5214. $recv(parent)._onunload_((function(){
  5215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5216. return $core.withContext(function($ctx2) {
  5217. //>>excludeEnd("ctx");
  5218. self._removeBeforeUnloadMessage();
  5219. return $recv(window)._close();
  5220. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5221. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  5222. //>>excludeEnd("ctx");
  5223. }));
  5224. return self;
  5225. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5226. }, function($ctx1) {$ctx1.fill(self,"handleLossOfEnvironmentWithParent:",{parent:parent},$globals.HLManager)});
  5227. //>>excludeEnd("ctx");
  5228. },
  5229. //>>excludeStart("ide", pragmas.excludeIdeData);
  5230. args: ["parent"],
  5231. source: "handleLossOfEnvironmentWithParent: parent\x0a\x09parent onunload: [ \x0a\x09\x09self removeBeforeUnloadMessage.\x0a\x09\x09window close ]",
  5232. referencedClasses: [],
  5233. //>>excludeEnd("ide");
  5234. messageSends: ["onunload:", "removeBeforeUnloadMessage", "close"]
  5235. }),
  5236. $globals.HLManager);
  5237. $core.addMethod(
  5238. $core.method({
  5239. selector: "history",
  5240. protocol: 'accessing',
  5241. fn: function (){
  5242. var self=this;
  5243. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  5244. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5245. return $core.withContext(function($ctx1) {
  5246. //>>excludeEnd("ctx");
  5247. var $2,$1,$receiver;
  5248. $2=self["@history"];
  5249. if(($receiver = $2) == null || $receiver.isNil){
  5250. self["@history"]=$recv($OrderedCollection())._new();
  5251. $1=self["@history"];
  5252. } else {
  5253. $1=$2;
  5254. };
  5255. return $1;
  5256. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5257. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLManager)});
  5258. //>>excludeEnd("ctx");
  5259. },
  5260. //>>excludeStart("ide", pragmas.excludeIdeData);
  5261. args: [],
  5262. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  5263. referencedClasses: ["OrderedCollection"],
  5264. //>>excludeEnd("ide");
  5265. messageSends: ["ifNil:", "new"]
  5266. }),
  5267. $globals.HLManager);
  5268. $core.addMethod(
  5269. $core.method({
  5270. selector: "history:",
  5271. protocol: 'accessing',
  5272. fn: function (aCollection){
  5273. var self=this;
  5274. self["@history"]=aCollection;
  5275. return self;
  5276. },
  5277. //>>excludeStart("ide", pragmas.excludeIdeData);
  5278. args: ["aCollection"],
  5279. source: "history: aCollection\x0a\x09history := aCollection",
  5280. referencedClasses: [],
  5281. //>>excludeEnd("ide");
  5282. messageSends: []
  5283. }),
  5284. $globals.HLManager);
  5285. $core.addMethod(
  5286. $core.method({
  5287. selector: "inform:",
  5288. protocol: 'actions',
  5289. fn: function (aString){
  5290. var self=this;
  5291. function $HLInformationWidget(){return $globals.HLInformationWidget||(typeof HLInformationWidget=="undefined"?nil:HLInformationWidget)}
  5292. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5293. return $core.withContext(function($ctx1) {
  5294. //>>excludeEnd("ctx");
  5295. var $1,$2;
  5296. $1=$recv($HLInformationWidget())._new();
  5297. $recv($1)._informationString_(aString);
  5298. $2=$recv($1)._show();
  5299. return self;
  5300. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5301. }, function($ctx1) {$ctx1.fill(self,"inform:",{aString:aString},$globals.HLManager)});
  5302. //>>excludeEnd("ctx");
  5303. },
  5304. //>>excludeStart("ide", pragmas.excludeIdeData);
  5305. args: ["aString"],
  5306. source: "inform: aString\x0a\x09HLInformationWidget new\x0a\x09\x09informationString: aString;\x0a\x09\x09show",
  5307. referencedClasses: ["HLInformationWidget"],
  5308. //>>excludeEnd("ide");
  5309. messageSends: ["informationString:", "new", "show"]
  5310. }),
  5311. $globals.HLManager);
  5312. $core.addMethod(
  5313. $core.method({
  5314. selector: "keyBinder",
  5315. protocol: 'accessing',
  5316. fn: function (){
  5317. var self=this;
  5318. function $HLKeyBinder(){return $globals.HLKeyBinder||(typeof HLKeyBinder=="undefined"?nil:HLKeyBinder)}
  5319. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5320. return $core.withContext(function($ctx1) {
  5321. //>>excludeEnd("ctx");
  5322. var $1;
  5323. $1=$recv($HLKeyBinder())._current();
  5324. return $1;
  5325. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5326. }, function($ctx1) {$ctx1.fill(self,"keyBinder",{},$globals.HLManager)});
  5327. //>>excludeEnd("ctx");
  5328. },
  5329. //>>excludeStart("ide", pragmas.excludeIdeData);
  5330. args: [],
  5331. source: "keyBinder\x0a\x09^ HLKeyBinder current",
  5332. referencedClasses: ["HLKeyBinder"],
  5333. //>>excludeEnd("ide");
  5334. messageSends: ["current"]
  5335. }),
  5336. $globals.HLManager);
  5337. $core.addMethod(
  5338. $core.method({
  5339. selector: "registerErrorHandler",
  5340. protocol: 'services',
  5341. fn: function (){
  5342. var self=this;
  5343. function $HLErrorHandler(){return $globals.HLErrorHandler||(typeof HLErrorHandler=="undefined"?nil:HLErrorHandler)}
  5344. function $ErrorHandler(){return $globals.ErrorHandler||(typeof ErrorHandler=="undefined"?nil:ErrorHandler)}
  5345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5346. return $core.withContext(function($ctx1) {
  5347. //>>excludeEnd("ctx");
  5348. var $1,$2;
  5349. $1=self._environment();
  5350. $2=$recv($HLErrorHandler())._new();
  5351. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5352. $ctx1.sendIdx["new"]=1;
  5353. //>>excludeEnd("ctx");
  5354. $recv($1)._registerErrorHandler_($2);
  5355. $recv($ErrorHandler())._register_($recv($HLErrorHandler())._new());
  5356. return self;
  5357. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5358. }, function($ctx1) {$ctx1.fill(self,"registerErrorHandler",{},$globals.HLManager)});
  5359. //>>excludeEnd("ctx");
  5360. },
  5361. //>>excludeStart("ide", pragmas.excludeIdeData);
  5362. args: [],
  5363. source: "registerErrorHandler\x0a\x09self environment registerErrorHandler: HLErrorHandler new.\x0a\x09ErrorHandler register: HLErrorHandler new",
  5364. referencedClasses: ["HLErrorHandler", "ErrorHandler"],
  5365. //>>excludeEnd("ide");
  5366. messageSends: ["registerErrorHandler:", "environment", "new", "register:"]
  5367. }),
  5368. $globals.HLManager);
  5369. $core.addMethod(
  5370. $core.method({
  5371. selector: "registerFinder",
  5372. protocol: 'services',
  5373. fn: function (){
  5374. var self=this;
  5375. function $HLFinder(){return $globals.HLFinder||(typeof HLFinder=="undefined"?nil:HLFinder)}
  5376. function $Finder(){return $globals.Finder||(typeof Finder=="undefined"?nil:Finder)}
  5377. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5378. return $core.withContext(function($ctx1) {
  5379. //>>excludeEnd("ctx");
  5380. var $1,$2;
  5381. $1=self._environment();
  5382. $2=$recv($HLFinder())._new();
  5383. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5384. $ctx1.sendIdx["new"]=1;
  5385. //>>excludeEnd("ctx");
  5386. $recv($1)._registerFinder_($2);
  5387. $recv($Finder())._register_($recv($HLFinder())._new());
  5388. return self;
  5389. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5390. }, function($ctx1) {$ctx1.fill(self,"registerFinder",{},$globals.HLManager)});
  5391. //>>excludeEnd("ctx");
  5392. },
  5393. //>>excludeStart("ide", pragmas.excludeIdeData);
  5394. args: [],
  5395. source: "registerFinder\x0a\x09self environment registerFinder: HLFinder new.\x0a\x09Finder register: HLFinder new",
  5396. referencedClasses: ["HLFinder", "Finder"],
  5397. //>>excludeEnd("ide");
  5398. messageSends: ["registerFinder:", "environment", "new", "register:"]
  5399. }),
  5400. $globals.HLManager);
  5401. $core.addMethod(
  5402. $core.method({
  5403. selector: "registerInspector",
  5404. protocol: 'services',
  5405. fn: function (){
  5406. var self=this;
  5407. function $HLInspector(){return $globals.HLInspector||(typeof HLInspector=="undefined"?nil:HLInspector)}
  5408. function $Inspector(){return $globals.Inspector||(typeof Inspector=="undefined"?nil:Inspector)}
  5409. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5410. return $core.withContext(function($ctx1) {
  5411. //>>excludeEnd("ctx");
  5412. $recv(self._environment())._registerInspector_($HLInspector());
  5413. $recv($Inspector())._register_($HLInspector());
  5414. return self;
  5415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5416. }, function($ctx1) {$ctx1.fill(self,"registerInspector",{},$globals.HLManager)});
  5417. //>>excludeEnd("ctx");
  5418. },
  5419. //>>excludeStart("ide", pragmas.excludeIdeData);
  5420. args: [],
  5421. source: "registerInspector\x0a\x09self environment registerInspector: HLInspector.\x0a\x09Inspector register: HLInspector",
  5422. referencedClasses: ["HLInspector", "Inspector"],
  5423. //>>excludeEnd("ide");
  5424. messageSends: ["registerInspector:", "environment", "register:"]
  5425. }),
  5426. $globals.HLManager);
  5427. $core.addMethod(
  5428. $core.method({
  5429. selector: "registerProgressHandler",
  5430. protocol: 'services',
  5431. fn: function (){
  5432. var self=this;
  5433. function $HLProgressHandler(){return $globals.HLProgressHandler||(typeof HLProgressHandler=="undefined"?nil:HLProgressHandler)}
  5434. function $ProgressHandler(){return $globals.ProgressHandler||(typeof ProgressHandler=="undefined"?nil:ProgressHandler)}
  5435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5436. return $core.withContext(function($ctx1) {
  5437. //>>excludeEnd("ctx");
  5438. var $1,$2;
  5439. $1=self._environment();
  5440. $2=$recv($HLProgressHandler())._new();
  5441. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5442. $ctx1.sendIdx["new"]=1;
  5443. //>>excludeEnd("ctx");
  5444. $recv($1)._registerProgressHandler_($2);
  5445. $recv($ProgressHandler())._register_($recv($HLProgressHandler())._new());
  5446. return self;
  5447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5448. }, function($ctx1) {$ctx1.fill(self,"registerProgressHandler",{},$globals.HLManager)});
  5449. //>>excludeEnd("ctx");
  5450. },
  5451. //>>excludeStart("ide", pragmas.excludeIdeData);
  5452. args: [],
  5453. source: "registerProgressHandler\x0a\x09self environment registerProgressHandler: HLProgressHandler new.\x0a\x09ProgressHandler register: HLProgressHandler new",
  5454. referencedClasses: ["HLProgressHandler", "ProgressHandler"],
  5455. //>>excludeEnd("ide");
  5456. messageSends: ["registerProgressHandler:", "environment", "new", "register:"]
  5457. }),
  5458. $globals.HLManager);
  5459. $core.addMethod(
  5460. $core.method({
  5461. selector: "registerServices",
  5462. protocol: 'private',
  5463. fn: function (){
  5464. var self=this;
  5465. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5466. return $core.withContext(function($ctx1) {
  5467. //>>excludeEnd("ctx");
  5468. var $1;
  5469. self._registerInspector();
  5470. self._registerErrorHandler();
  5471. self._registerProgressHandler();
  5472. self._registerTranscript();
  5473. $1=self._registerFinder();
  5474. return self;
  5475. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5476. }, function($ctx1) {$ctx1.fill(self,"registerServices",{},$globals.HLManager)});
  5477. //>>excludeEnd("ctx");
  5478. },
  5479. //>>excludeStart("ide", pragmas.excludeIdeData);
  5480. args: [],
  5481. source: "registerServices\x0a\x09self\x0a\x09\x09registerInspector;\x0a\x09\x09registerErrorHandler;\x0a\x09\x09registerProgressHandler;\x0a\x09\x09registerTranscript;\x0a\x09\x09registerFinder",
  5482. referencedClasses: [],
  5483. //>>excludeEnd("ide");
  5484. messageSends: ["registerInspector", "registerErrorHandler", "registerProgressHandler", "registerTranscript", "registerFinder"]
  5485. }),
  5486. $globals.HLManager);
  5487. $core.addMethod(
  5488. $core.method({
  5489. selector: "registerTranscript",
  5490. protocol: 'services',
  5491. fn: function (){
  5492. var self=this;
  5493. function $HLTranscriptHandler(){return $globals.HLTranscriptHandler||(typeof HLTranscriptHandler=="undefined"?nil:HLTranscriptHandler)}
  5494. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5495. return $core.withContext(function($ctx1) {
  5496. //>>excludeEnd("ctx");
  5497. $recv(self._environment())._registerTranscript_($HLTranscriptHandler());
  5498. return self;
  5499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5500. }, function($ctx1) {$ctx1.fill(self,"registerTranscript",{},$globals.HLManager)});
  5501. //>>excludeEnd("ctx");
  5502. },
  5503. //>>excludeStart("ide", pragmas.excludeIdeData);
  5504. args: [],
  5505. source: "registerTranscript\x0a\x09self environment registerTranscript: HLTranscriptHandler",
  5506. referencedClasses: ["HLTranscriptHandler"],
  5507. //>>excludeEnd("ide");
  5508. messageSends: ["registerTranscript:", "environment"]
  5509. }),
  5510. $globals.HLManager);
  5511. $core.addMethod(
  5512. $core.method({
  5513. selector: "removeActiveTab",
  5514. protocol: 'actions',
  5515. fn: function (){
  5516. var self=this;
  5517. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5518. return $core.withContext(function($ctx1) {
  5519. //>>excludeEnd("ctx");
  5520. $recv(self._tabsWidget())._removeActiveTab();
  5521. return self;
  5522. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5523. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLManager)});
  5524. //>>excludeEnd("ctx");
  5525. },
  5526. //>>excludeStart("ide", pragmas.excludeIdeData);
  5527. args: [],
  5528. source: "removeActiveTab\x0a\x09self tabsWidget removeActiveTab",
  5529. referencedClasses: [],
  5530. //>>excludeEnd("ide");
  5531. messageSends: ["removeActiveTab", "tabsWidget"]
  5532. }),
  5533. $globals.HLManager);
  5534. $core.addMethod(
  5535. $core.method({
  5536. selector: "removeBeforeUnloadMessage",
  5537. protocol: 'actions',
  5538. fn: function (){
  5539. var self=this;
  5540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5541. return $core.withContext(function($ctx1) {
  5542. //>>excludeEnd("ctx");
  5543. window.onbeforeunload = null;
  5544. return self;
  5545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5546. }, function($ctx1) {$ctx1.fill(self,"removeBeforeUnloadMessage",{},$globals.HLManager)});
  5547. //>>excludeEnd("ctx");
  5548. },
  5549. //>>excludeStart("ide", pragmas.excludeIdeData);
  5550. args: [],
  5551. source: "removeBeforeUnloadMessage\x0a\x09<window.onbeforeunload = null>",
  5552. referencedClasses: [],
  5553. //>>excludeEnd("ide");
  5554. messageSends: []
  5555. }),
  5556. $globals.HLManager);
  5557. $core.addMethod(
  5558. $core.method({
  5559. selector: "removeTabForWidget:",
  5560. protocol: 'actions',
  5561. fn: function (aWidget){
  5562. var self=this;
  5563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5564. return $core.withContext(function($ctx1) {
  5565. //>>excludeEnd("ctx");
  5566. $recv(self._tabsWidget())._removeTabForWidget_(aWidget);
  5567. return self;
  5568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5569. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLManager)});
  5570. //>>excludeEnd("ctx");
  5571. },
  5572. //>>excludeStart("ide", pragmas.excludeIdeData);
  5573. args: ["aWidget"],
  5574. source: "removeTabForWidget: aWidget\x0a\x09self tabsWidget removeTabForWidget: aWidget",
  5575. referencedClasses: [],
  5576. //>>excludeEnd("ide");
  5577. messageSends: ["removeTabForWidget:", "tabsWidget"]
  5578. }),
  5579. $globals.HLManager);
  5580. $core.addMethod(
  5581. $core.method({
  5582. selector: "renderContentOn:",
  5583. protocol: 'rendering',
  5584. fn: function (html){
  5585. var self=this;
  5586. function $HLWelcomeWidget(){return $globals.HLWelcomeWidget||(typeof HLWelcomeWidget=="undefined"?nil:HLWelcomeWidget)}
  5587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5588. return $core.withContext(function($ctx1) {
  5589. //>>excludeEnd("ctx");
  5590. $recv(html)._with_(self._tabsWidget());
  5591. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5592. $ctx1.sendIdx["with:"]=1;
  5593. //>>excludeEnd("ctx");
  5594. $recv(html)._with_($recv($HLWelcomeWidget())._new());
  5595. return self;
  5596. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5597. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLManager)});
  5598. //>>excludeEnd("ctx");
  5599. },
  5600. //>>excludeStart("ide", pragmas.excludeIdeData);
  5601. args: ["html"],
  5602. source: "renderContentOn: html\x0a\x09html with: self tabsWidget.\x0a\x09html with: HLWelcomeWidget new",
  5603. referencedClasses: ["HLWelcomeWidget"],
  5604. //>>excludeEnd("ide");
  5605. messageSends: ["with:", "tabsWidget", "new"]
  5606. }),
  5607. $globals.HLManager);
  5608. $core.addMethod(
  5609. $core.method({
  5610. selector: "request:do:",
  5611. protocol: 'actions',
  5612. fn: function (aString,aBlock){
  5613. var self=this;
  5614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5615. return $core.withContext(function($ctx1) {
  5616. //>>excludeEnd("ctx");
  5617. self._request_value_do_(aString,"",aBlock);
  5618. return self;
  5619. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5620. }, function($ctx1) {$ctx1.fill(self,"request:do:",{aString:aString,aBlock:aBlock},$globals.HLManager)});
  5621. //>>excludeEnd("ctx");
  5622. },
  5623. //>>excludeStart("ide", pragmas.excludeIdeData);
  5624. args: ["aString", "aBlock"],
  5625. source: "request: aString do: aBlock\x0a\x09self \x0a\x09\x09request: aString\x0a\x09\x09value: ''\x0a\x09\x09do: aBlock",
  5626. referencedClasses: [],
  5627. //>>excludeEnd("ide");
  5628. messageSends: ["request:value:do:"]
  5629. }),
  5630. $globals.HLManager);
  5631. $core.addMethod(
  5632. $core.method({
  5633. selector: "request:value:do:",
  5634. protocol: 'actions',
  5635. fn: function (aString,valueString,aBlock){
  5636. var self=this;
  5637. function $HLRequestWidget(){return $globals.HLRequestWidget||(typeof HLRequestWidget=="undefined"?nil:HLRequestWidget)}
  5638. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5639. return $core.withContext(function($ctx1) {
  5640. //>>excludeEnd("ctx");
  5641. var $1,$2;
  5642. $1=$recv($HLRequestWidget())._new();
  5643. $recv($1)._confirmationString_(aString);
  5644. $recv($1)._actionBlock_(aBlock);
  5645. $recv($1)._value_(valueString);
  5646. $2=$recv($1)._show();
  5647. return self;
  5648. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5649. }, function($ctx1) {$ctx1.fill(self,"request:value:do:",{aString:aString,valueString:valueString,aBlock:aBlock},$globals.HLManager)});
  5650. //>>excludeEnd("ctx");
  5651. },
  5652. //>>excludeStart("ide", pragmas.excludeIdeData);
  5653. args: ["aString", "valueString", "aBlock"],
  5654. 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",
  5655. referencedClasses: ["HLRequestWidget"],
  5656. //>>excludeEnd("ide");
  5657. messageSends: ["confirmationString:", "new", "actionBlock:", "value:", "show"]
  5658. }),
  5659. $globals.HLManager);
  5660. $core.addMethod(
  5661. $core.method({
  5662. selector: "setEditorTheme:",
  5663. protocol: 'accessing',
  5664. fn: function (aTheme){
  5665. var self=this;
  5666. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5667. return $core.withContext(function($ctx1) {
  5668. //>>excludeEnd("ctx");
  5669. $recv("helios.editorTheme"._asSetting())._value_(aTheme);
  5670. return self;
  5671. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5672. }, function($ctx1) {$ctx1.fill(self,"setEditorTheme:",{aTheme:aTheme},$globals.HLManager)});
  5673. //>>excludeEnd("ctx");
  5674. },
  5675. //>>excludeStart("ide", pragmas.excludeIdeData);
  5676. args: ["aTheme"],
  5677. source: "setEditorTheme: aTheme\x0a\x0a\x09'helios.editorTheme' asSetting value: aTheme",
  5678. referencedClasses: [],
  5679. //>>excludeEnd("ide");
  5680. messageSends: ["value:", "asSetting"]
  5681. }),
  5682. $globals.HLManager);
  5683. $core.addMethod(
  5684. $core.method({
  5685. selector: "setTheme:",
  5686. protocol: 'accessing',
  5687. fn: function (aTheme){
  5688. var self=this;
  5689. var currentTheme;
  5690. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5691. return $core.withContext(function($ctx1) {
  5692. //>>excludeEnd("ctx");
  5693. var $1,$2;
  5694. currentTheme="helios.theme"._asSettingIfAbsent_("default");
  5695. $1="body"._asJQuery();
  5696. $recv($1)._removeClass_($recv(currentTheme)._value());
  5697. $2=$recv($1)._addClass_(aTheme);
  5698. $recv("helios.theme"._asSetting())._value_(aTheme);
  5699. return self;
  5700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5701. }, function($ctx1) {$ctx1.fill(self,"setTheme:",{aTheme:aTheme,currentTheme:currentTheme},$globals.HLManager)});
  5702. //>>excludeEnd("ctx");
  5703. },
  5704. //>>excludeStart("ide", pragmas.excludeIdeData);
  5705. args: ["aTheme"],
  5706. 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",
  5707. referencedClasses: [],
  5708. //>>excludeEnd("ide");
  5709. messageSends: ["asSettingIfAbsent:", "removeClass:", "asJQuery", "value", "addClass:", "value:", "asSetting"]
  5710. }),
  5711. $globals.HLManager);
  5712. $core.addMethod(
  5713. $core.method({
  5714. selector: "setup",
  5715. protocol: 'initialization',
  5716. fn: function (){
  5717. var self=this;
  5718. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5719. return $core.withContext(function($ctx1) {
  5720. //>>excludeEnd("ctx");
  5721. var $1;
  5722. self._registerServices();
  5723. $1=self._setupEvents();
  5724. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5725. $ctx1.sendIdx["setupEvents"]=1;
  5726. //>>excludeEnd("ctx");
  5727. $recv(self._keyBinder())._setupEvents();
  5728. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5729. $ctx1.sendIdx["setupEvents"]=2;
  5730. //>>excludeEnd("ctx");
  5731. $recv(self._tabsWidget())._setupEvents();
  5732. self._setupTheme();
  5733. $recv("#helper"._asJQuery())._fadeOut();
  5734. return self;
  5735. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5736. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager)});
  5737. //>>excludeEnd("ctx");
  5738. },
  5739. //>>excludeStart("ide", pragmas.excludeIdeData);
  5740. args: [],
  5741. 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",
  5742. referencedClasses: [],
  5743. //>>excludeEnd("ide");
  5744. messageSends: ["registerServices", "setupEvents", "keyBinder", "tabsWidget", "setupTheme", "fadeOut", "asJQuery"]
  5745. }),
  5746. $globals.HLManager);
  5747. $core.addMethod(
  5748. $core.method({
  5749. selector: "setupEvents",
  5750. protocol: 'private',
  5751. fn: function (){
  5752. var self=this;
  5753. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5754. return $core.withContext(function($ctx1) {
  5755. //>>excludeEnd("ctx");
  5756. var $1,$2,$3,$4,$5;
  5757. $1="body"._asJQuery();
  5758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5759. $ctx1.sendIdx["asJQuery"]=1;
  5760. //>>excludeEnd("ctx");
  5761. $recv($1)._keydown_((function(event){
  5762. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5763. return $core.withContext(function($ctx2) {
  5764. //>>excludeEnd("ctx");
  5765. $2=$recv(event)._ctrlKey();
  5766. if($core.assert($2)){
  5767. $3="body"._asJQuery();
  5768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5769. $ctx2.sendIdx["asJQuery"]=2;
  5770. //>>excludeEnd("ctx");
  5771. return $recv($3)._addClass_("navigation");
  5772. };
  5773. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5774. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  5775. //>>excludeEnd("ctx");
  5776. }));
  5777. $4="body"._asJQuery();
  5778. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5779. $ctx1.sendIdx["asJQuery"]=3;
  5780. //>>excludeEnd("ctx");
  5781. $recv($4)._keyup_((function(event){
  5782. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5783. return $core.withContext(function($ctx2) {
  5784. //>>excludeEnd("ctx");
  5785. $5="body"._asJQuery();
  5786. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5787. $ctx2.sendIdx["asJQuery"]=4;
  5788. //>>excludeEnd("ctx");
  5789. return $recv($5)._removeClass_("navigation");
  5790. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5791. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  5792. //>>excludeEnd("ctx");
  5793. }));
  5794. $recv($recv(window)._asJQuery())._resize_((function(event){
  5795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5796. return $core.withContext(function($ctx2) {
  5797. //>>excludeEnd("ctx");
  5798. return self._refresh();
  5799. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5800. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,4)});
  5801. //>>excludeEnd("ctx");
  5802. }));
  5803. return self;
  5804. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5805. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLManager)});
  5806. //>>excludeEnd("ctx");
  5807. },
  5808. //>>excludeStart("ide", pragmas.excludeIdeData);
  5809. args: [],
  5810. 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 ]",
  5811. referencedClasses: [],
  5812. //>>excludeEnd("ide");
  5813. messageSends: ["keydown:", "asJQuery", "ifTrue:", "ctrlKey", "addClass:", "keyup:", "removeClass:", "resize:", "refresh"]
  5814. }),
  5815. $globals.HLManager);
  5816. $core.addMethod(
  5817. $core.method({
  5818. selector: "setupTheme",
  5819. protocol: 'private',
  5820. fn: function (){
  5821. var self=this;
  5822. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5823. return $core.withContext(function($ctx1) {
  5824. //>>excludeEnd("ctx");
  5825. var $1;
  5826. self._setTheme_("default");
  5827. $1=self._setEditorTheme_("default");
  5828. return self;
  5829. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5830. }, function($ctx1) {$ctx1.fill(self,"setupTheme",{},$globals.HLManager)});
  5831. //>>excludeEnd("ctx");
  5832. },
  5833. //>>excludeStart("ide", pragmas.excludeIdeData);
  5834. args: [],
  5835. 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'.",
  5836. referencedClasses: [],
  5837. //>>excludeEnd("ide");
  5838. messageSends: ["setTheme:", "setEditorTheme:"]
  5839. }),
  5840. $globals.HLManager);
  5841. $core.addMethod(
  5842. $core.method({
  5843. selector: "tabWidth",
  5844. protocol: 'accessing',
  5845. fn: function (){
  5846. var self=this;
  5847. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5848. return $core.withContext(function($ctx1) {
  5849. //>>excludeEnd("ctx");
  5850. var $1;
  5851. $1=$recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  5852. return $1;
  5853. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5854. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLManager)});
  5855. //>>excludeEnd("ctx");
  5856. },
  5857. //>>excludeStart("ide", pragmas.excludeIdeData);
  5858. args: [],
  5859. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  5860. referencedClasses: [],
  5861. //>>excludeEnd("ide");
  5862. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  5863. }),
  5864. $globals.HLManager);
  5865. $core.addMethod(
  5866. $core.method({
  5867. selector: "tabs",
  5868. protocol: 'accessing',
  5869. fn: function (){
  5870. var self=this;
  5871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5872. return $core.withContext(function($ctx1) {
  5873. //>>excludeEnd("ctx");
  5874. var $1;
  5875. $1=$recv(self._tabsWidget())._tabs();
  5876. return $1;
  5877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5878. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLManager)});
  5879. //>>excludeEnd("ctx");
  5880. },
  5881. //>>excludeStart("ide", pragmas.excludeIdeData);
  5882. args: [],
  5883. source: "tabs\x0a\x09^ self tabsWidget tabs",
  5884. referencedClasses: [],
  5885. //>>excludeEnd("ide");
  5886. messageSends: ["tabs", "tabsWidget"]
  5887. }),
  5888. $globals.HLManager);
  5889. $core.addMethod(
  5890. $core.method({
  5891. selector: "tabsWidget",
  5892. protocol: 'accessing',
  5893. fn: function (){
  5894. var self=this;
  5895. function $HLTabsWidget(){return $globals.HLTabsWidget||(typeof HLTabsWidget=="undefined"?nil:HLTabsWidget)}
  5896. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5897. return $core.withContext(function($ctx1) {
  5898. //>>excludeEnd("ctx");
  5899. var $2,$1,$receiver;
  5900. $2=self["@tabsWidget"];
  5901. if(($receiver = $2) == null || $receiver.isNil){
  5902. self["@tabsWidget"]=$recv($HLTabsWidget())._new();
  5903. $1=self["@tabsWidget"];
  5904. } else {
  5905. $1=$2;
  5906. };
  5907. return $1;
  5908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5909. }, function($ctx1) {$ctx1.fill(self,"tabsWidget",{},$globals.HLManager)});
  5910. //>>excludeEnd("ctx");
  5911. },
  5912. //>>excludeStart("ide", pragmas.excludeIdeData);
  5913. args: [],
  5914. source: "tabsWidget\x0a\x09^ tabsWidget ifNil: [ tabsWidget := HLTabsWidget new ]",
  5915. referencedClasses: ["HLTabsWidget"],
  5916. //>>excludeEnd("ide");
  5917. messageSends: ["ifNil:", "new"]
  5918. }),
  5919. $globals.HLManager);
  5920. $globals.HLManager.klass.iVarNames = ['current'];
  5921. $core.addMethod(
  5922. $core.method({
  5923. selector: "current",
  5924. protocol: 'accessing',
  5925. fn: function (){
  5926. var self=this;
  5927. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5928. return $core.withContext(function($ctx1) {
  5929. //>>excludeEnd("ctx");
  5930. var $2,$1,$receiver;
  5931. $2=self["@current"];
  5932. if(($receiver = $2) == null || $receiver.isNil){
  5933. self["@current"]=$recv(self._basicNew())._initialize();
  5934. $1=self["@current"];
  5935. } else {
  5936. $1=$2;
  5937. };
  5938. return $1;
  5939. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5940. }, function($ctx1) {$ctx1.fill(self,"current",{},$globals.HLManager.klass)});
  5941. //>>excludeEnd("ctx");
  5942. },
  5943. //>>excludeStart("ide", pragmas.excludeIdeData);
  5944. args: [],
  5945. source: "current\x0a\x09^ current ifNil: [ current := self basicNew initialize ]",
  5946. referencedClasses: [],
  5947. //>>excludeEnd("ide");
  5948. messageSends: ["ifNil:", "initialize", "basicNew"]
  5949. }),
  5950. $globals.HLManager.klass);
  5951. $core.addMethod(
  5952. $core.method({
  5953. selector: "new",
  5954. protocol: 'instance creation',
  5955. fn: function (){
  5956. var self=this;
  5957. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5958. return $core.withContext(function($ctx1) {
  5959. //>>excludeEnd("ctx");
  5960. self._shouldNotImplement();
  5961. return self;
  5962. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5963. }, function($ctx1) {$ctx1.fill(self,"new",{},$globals.HLManager.klass)});
  5964. //>>excludeEnd("ctx");
  5965. },
  5966. //>>excludeStart("ide", pragmas.excludeIdeData);
  5967. args: [],
  5968. source: "new\x0a\x09\x22Use current instead\x22\x0a\x0a\x09self shouldNotImplement",
  5969. referencedClasses: [],
  5970. //>>excludeEnd("ide");
  5971. messageSends: ["shouldNotImplement"]
  5972. }),
  5973. $globals.HLManager.klass);
  5974. $core.addMethod(
  5975. $core.method({
  5976. selector: "setup",
  5977. protocol: 'initialization',
  5978. fn: function (){
  5979. var self=this;
  5980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5981. return $core.withContext(function($ctx1) {
  5982. //>>excludeEnd("ctx");
  5983. var $1,$2,$3;
  5984. $1=self._current();
  5985. $recv($1)._setup();
  5986. $2=$recv($1)._appendToJQuery_("body"._asJQuery());
  5987. $3="helios.confirmOnExit"._settingValueIfAbsent_(true);
  5988. if($core.assert($3)){
  5989. $recv(window)._onbeforeunload_((function(){
  5990. return "Do you want to close Amber? All uncommitted changes will be lost.";
  5991. }));
  5992. };
  5993. return self;
  5994. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  5995. }, function($ctx1) {$ctx1.fill(self,"setup",{},$globals.HLManager.klass)});
  5996. //>>excludeEnd("ctx");
  5997. },
  5998. //>>excludeStart("ide", pragmas.excludeIdeData);
  5999. args: [],
  6000. source: "setup\x0a\x09self current \x0a\x09\x09setup;\x0a\x09\x09appendToJQuery: 'body' asJQuery.\x0a\x09\x0a\x09('helios.confirmOnExit' settingValueIfAbsent: true) ifTrue: [\x0a\x09\x09window onbeforeunload: [ 'Do you want to close Amber? All uncommitted changes will be lost.' ] ]",
  6001. referencedClasses: [],
  6002. //>>excludeEnd("ide");
  6003. messageSends: ["setup", "current", "appendToJQuery:", "asJQuery", "ifTrue:", "settingValueIfAbsent:", "onbeforeunload:"]
  6004. }),
  6005. $globals.HLManager.klass);
  6006. $core.addClass('HLModalWidget', $globals.HLWidget, [], 'Helios-Core');
  6007. //>>excludeStart("ide", pragmas.excludeIdeData);
  6008. $globals.HLModalWidget.comment="I implement an abstract modal widget.";
  6009. //>>excludeEnd("ide");
  6010. $core.addMethod(
  6011. $core.method({
  6012. selector: "giveFocusToButton:",
  6013. protocol: 'private',
  6014. fn: function (aButton){
  6015. var self=this;
  6016. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6017. return $core.withContext(function($ctx1) {
  6018. //>>excludeEnd("ctx");
  6019. $recv($recv(aButton)._asJQuery())._focus();
  6020. return self;
  6021. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6022. }, function($ctx1) {$ctx1.fill(self,"giveFocusToButton:",{aButton:aButton},$globals.HLModalWidget)});
  6023. //>>excludeEnd("ctx");
  6024. },
  6025. //>>excludeStart("ide", pragmas.excludeIdeData);
  6026. args: ["aButton"],
  6027. source: "giveFocusToButton: aButton\x0a\x09aButton asJQuery focus",
  6028. referencedClasses: [],
  6029. //>>excludeEnd("ide");
  6030. messageSends: ["focus", "asJQuery"]
  6031. }),
  6032. $globals.HLModalWidget);
  6033. $core.addMethod(
  6034. $core.method({
  6035. selector: "hasButtons",
  6036. protocol: 'rendering',
  6037. fn: function (){
  6038. var self=this;
  6039. return true;
  6040. },
  6041. //>>excludeStart("ide", pragmas.excludeIdeData);
  6042. args: [],
  6043. source: "hasButtons\x0a\x09^ true",
  6044. referencedClasses: [],
  6045. //>>excludeEnd("ide");
  6046. messageSends: []
  6047. }),
  6048. $globals.HLModalWidget);
  6049. $core.addMethod(
  6050. $core.method({
  6051. selector: "remove",
  6052. protocol: 'actions',
  6053. fn: function (){
  6054. var self=this;
  6055. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6056. return $core.withContext(function($ctx1) {
  6057. //>>excludeEnd("ctx");
  6058. var $1,$2;
  6059. $1=".dialog"._asJQuery();
  6060. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6061. $ctx1.sendIdx["asJQuery"]=1;
  6062. //>>excludeEnd("ctx");
  6063. $recv($1)._removeClass_("active");
  6064. $recv((function(){
  6065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6066. return $core.withContext(function($ctx2) {
  6067. //>>excludeEnd("ctx");
  6068. $2="#overlay"._asJQuery();
  6069. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6070. $ctx2.sendIdx["asJQuery"]=2;
  6071. //>>excludeEnd("ctx");
  6072. $recv($2)._remove();
  6073. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6074. $ctx2.sendIdx["remove"]=1;
  6075. //>>excludeEnd("ctx");
  6076. return $recv($recv(self["@wrapper"])._asJQuery())._remove();
  6077. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6078. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6079. //>>excludeEnd("ctx");
  6080. }))._valueWithTimeout_((300));
  6081. return self;
  6082. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6083. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLModalWidget)});
  6084. //>>excludeEnd("ctx");
  6085. },
  6086. //>>excludeStart("ide", pragmas.excludeIdeData);
  6087. args: [],
  6088. 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",
  6089. referencedClasses: [],
  6090. //>>excludeEnd("ide");
  6091. messageSends: ["removeClass:", "asJQuery", "valueWithTimeout:", "remove"]
  6092. }),
  6093. $globals.HLModalWidget);
  6094. $core.addMethod(
  6095. $core.method({
  6096. selector: "renderButtonsOn:",
  6097. protocol: 'rendering',
  6098. fn: function (html){
  6099. var self=this;
  6100. return self;
  6101. },
  6102. //>>excludeStart("ide", pragmas.excludeIdeData);
  6103. args: ["html"],
  6104. source: "renderButtonsOn: html",
  6105. referencedClasses: [],
  6106. //>>excludeEnd("ide");
  6107. messageSends: []
  6108. }),
  6109. $globals.HLModalWidget);
  6110. $core.addMethod(
  6111. $core.method({
  6112. selector: "renderContentOn:",
  6113. protocol: 'rendering',
  6114. fn: function (html){
  6115. var self=this;
  6116. var confirmButton;
  6117. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6118. return $core.withContext(function($ctx1) {
  6119. //>>excludeEnd("ctx");
  6120. var $1,$2,$4,$3;
  6121. $1=$recv(html)._div();
  6122. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6123. $ctx1.sendIdx["div"]=1;
  6124. //>>excludeEnd("ctx");
  6125. $recv($1)._id_("overlay");
  6126. $2=$recv(html)._div();
  6127. $recv($2)._class_("dialog ".__comma(self._cssClass()));
  6128. $3=$recv($2)._with_((function(){
  6129. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6130. return $core.withContext(function($ctx2) {
  6131. //>>excludeEnd("ctx");
  6132. self._renderMainOn_(html);
  6133. $4=self._hasButtons();
  6134. if($core.assert($4)){
  6135. return self._renderButtonsOn_(html);
  6136. };
  6137. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6138. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6139. //>>excludeEnd("ctx");
  6140. }));
  6141. $recv(".dialog"._asJQuery())._addClass_("active");
  6142. self._setupKeyBindings();
  6143. return self;
  6144. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6145. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html,confirmButton:confirmButton},$globals.HLModalWidget)});
  6146. //>>excludeEnd("ctx");
  6147. },
  6148. //>>excludeStart("ide", pragmas.excludeIdeData);
  6149. args: ["html"],
  6150. 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",
  6151. referencedClasses: [],
  6152. //>>excludeEnd("ide");
  6153. messageSends: ["id:", "div", "class:", ",", "cssClass", "with:", "renderMainOn:", "ifTrue:", "hasButtons", "renderButtonsOn:", "addClass:", "asJQuery", "setupKeyBindings"]
  6154. }),
  6155. $globals.HLModalWidget);
  6156. $core.addMethod(
  6157. $core.method({
  6158. selector: "renderMainOn:",
  6159. protocol: 'rendering',
  6160. fn: function (html){
  6161. var self=this;
  6162. return self;
  6163. },
  6164. //>>excludeStart("ide", pragmas.excludeIdeData);
  6165. args: ["html"],
  6166. source: "renderMainOn: html",
  6167. referencedClasses: [],
  6168. //>>excludeEnd("ide");
  6169. messageSends: []
  6170. }),
  6171. $globals.HLModalWidget);
  6172. $core.addMethod(
  6173. $core.method({
  6174. selector: "setupKeyBindings",
  6175. protocol: 'rendering',
  6176. fn: function (){
  6177. var self=this;
  6178. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  6179. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6180. return $core.withContext(function($ctx1) {
  6181. //>>excludeEnd("ctx");
  6182. var $1;
  6183. $recv(".dialog"._asJQuery())._keyup_((function(e){
  6184. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6185. return $core.withContext(function($ctx2) {
  6186. //>>excludeEnd("ctx");
  6187. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($String())._esc())._asciiValue());
  6188. if($core.assert($1)){
  6189. return self._cancel();
  6190. };
  6191. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6192. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  6193. //>>excludeEnd("ctx");
  6194. }));
  6195. return self;
  6196. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6197. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLModalWidget)});
  6198. //>>excludeEnd("ctx");
  6199. },
  6200. //>>excludeStart("ide", pragmas.excludeIdeData);
  6201. args: [],
  6202. source: "setupKeyBindings\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String esc asciiValue ifTrue: [ self cancel ] ]",
  6203. referencedClasses: ["String"],
  6204. //>>excludeEnd("ide");
  6205. messageSends: ["keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "esc", "cancel"]
  6206. }),
  6207. $globals.HLModalWidget);
  6208. $core.addMethod(
  6209. $core.method({
  6210. selector: "show",
  6211. protocol: 'actions',
  6212. fn: function (){
  6213. var self=this;
  6214. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6215. return $core.withContext(function($ctx1) {
  6216. //>>excludeEnd("ctx");
  6217. self._appendToJQuery_("body"._asJQuery());
  6218. return self;
  6219. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6220. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLModalWidget)});
  6221. //>>excludeEnd("ctx");
  6222. },
  6223. //>>excludeStart("ide", pragmas.excludeIdeData);
  6224. args: [],
  6225. source: "show\x0a\x09self appendToJQuery: 'body' asJQuery",
  6226. referencedClasses: [],
  6227. //>>excludeEnd("ide");
  6228. messageSends: ["appendToJQuery:", "asJQuery"]
  6229. }),
  6230. $globals.HLModalWidget);
  6231. $core.addClass('HLConfirmationWidget', $globals.HLModalWidget, ['cancelButtonLabel', 'confirmButtonLabel', 'confirmationString', 'actionBlock', 'cancelBlock'], 'Helios-Core');
  6232. //>>excludeStart("ide", pragmas.excludeIdeData);
  6233. $globals.HLConfirmationWidget.comment="I display confirmation dialog. \x0a\x0a## API\x0a\x0aHLWidget contains convenience methods like `HLWidget >> #confirm:ifTrue:` for creating confirmation dialogs.";
  6234. //>>excludeEnd("ide");
  6235. $core.addMethod(
  6236. $core.method({
  6237. selector: "actionBlock",
  6238. protocol: 'accessing',
  6239. fn: function (){
  6240. var self=this;
  6241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6242. return $core.withContext(function($ctx1) {
  6243. //>>excludeEnd("ctx");
  6244. var $2,$1,$receiver;
  6245. $2=self["@actionBlock"];
  6246. if(($receiver = $2) == null || $receiver.isNil){
  6247. $1=(function(){
  6248. });
  6249. } else {
  6250. $1=$2;
  6251. };
  6252. return $1;
  6253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6254. }, function($ctx1) {$ctx1.fill(self,"actionBlock",{},$globals.HLConfirmationWidget)});
  6255. //>>excludeEnd("ctx");
  6256. },
  6257. //>>excludeStart("ide", pragmas.excludeIdeData);
  6258. args: [],
  6259. source: "actionBlock\x0a\x09^ actionBlock ifNil: [ [] ]",
  6260. referencedClasses: [],
  6261. //>>excludeEnd("ide");
  6262. messageSends: ["ifNil:"]
  6263. }),
  6264. $globals.HLConfirmationWidget);
  6265. $core.addMethod(
  6266. $core.method({
  6267. selector: "actionBlock:",
  6268. protocol: 'accessing',
  6269. fn: function (aBlock){
  6270. var self=this;
  6271. self["@actionBlock"]=aBlock;
  6272. return self;
  6273. },
  6274. //>>excludeStart("ide", pragmas.excludeIdeData);
  6275. args: ["aBlock"],
  6276. source: "actionBlock: aBlock\x0a\x09actionBlock := aBlock",
  6277. referencedClasses: [],
  6278. //>>excludeEnd("ide");
  6279. messageSends: []
  6280. }),
  6281. $globals.HLConfirmationWidget);
  6282. $core.addMethod(
  6283. $core.method({
  6284. selector: "cancel",
  6285. protocol: 'actions',
  6286. fn: function (){
  6287. var self=this;
  6288. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6289. return $core.withContext(function($ctx1) {
  6290. //>>excludeEnd("ctx");
  6291. $recv(self._cancelBlock())._value();
  6292. self._remove();
  6293. return self;
  6294. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6295. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLConfirmationWidget)});
  6296. //>>excludeEnd("ctx");
  6297. },
  6298. //>>excludeStart("ide", pragmas.excludeIdeData);
  6299. args: [],
  6300. source: "cancel\x0a\x09self cancelBlock value.\x0a\x09self remove",
  6301. referencedClasses: [],
  6302. //>>excludeEnd("ide");
  6303. messageSends: ["value", "cancelBlock", "remove"]
  6304. }),
  6305. $globals.HLConfirmationWidget);
  6306. $core.addMethod(
  6307. $core.method({
  6308. selector: "cancelBlock",
  6309. protocol: 'accessing',
  6310. fn: function (){
  6311. var self=this;
  6312. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6313. return $core.withContext(function($ctx1) {
  6314. //>>excludeEnd("ctx");
  6315. var $2,$1,$receiver;
  6316. $2=self["@cancelBlock"];
  6317. if(($receiver = $2) == null || $receiver.isNil){
  6318. $1=(function(){
  6319. });
  6320. } else {
  6321. $1=$2;
  6322. };
  6323. return $1;
  6324. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6325. }, function($ctx1) {$ctx1.fill(self,"cancelBlock",{},$globals.HLConfirmationWidget)});
  6326. //>>excludeEnd("ctx");
  6327. },
  6328. //>>excludeStart("ide", pragmas.excludeIdeData);
  6329. args: [],
  6330. source: "cancelBlock\x0a\x09^ cancelBlock ifNil: [ [] ]",
  6331. referencedClasses: [],
  6332. //>>excludeEnd("ide");
  6333. messageSends: ["ifNil:"]
  6334. }),
  6335. $globals.HLConfirmationWidget);
  6336. $core.addMethod(
  6337. $core.method({
  6338. selector: "cancelBlock:",
  6339. protocol: 'accessing',
  6340. fn: function (aBlock){
  6341. var self=this;
  6342. self["@cancelBlock"]=aBlock;
  6343. return self;
  6344. },
  6345. //>>excludeStart("ide", pragmas.excludeIdeData);
  6346. args: ["aBlock"],
  6347. source: "cancelBlock: aBlock\x0a\x09cancelBlock := aBlock",
  6348. referencedClasses: [],
  6349. //>>excludeEnd("ide");
  6350. messageSends: []
  6351. }),
  6352. $globals.HLConfirmationWidget);
  6353. $core.addMethod(
  6354. $core.method({
  6355. selector: "cancelButtonLabel",
  6356. protocol: 'accessing',
  6357. fn: function (){
  6358. var self=this;
  6359. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6360. return $core.withContext(function($ctx1) {
  6361. //>>excludeEnd("ctx");
  6362. var $2,$1,$receiver;
  6363. $2=self["@cancelButtonLabel"];
  6364. if(($receiver = $2) == null || $receiver.isNil){
  6365. $1="Cancel";
  6366. } else {
  6367. $1=$2;
  6368. };
  6369. return $1;
  6370. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6371. }, function($ctx1) {$ctx1.fill(self,"cancelButtonLabel",{},$globals.HLConfirmationWidget)});
  6372. //>>excludeEnd("ctx");
  6373. },
  6374. //>>excludeStart("ide", pragmas.excludeIdeData);
  6375. args: [],
  6376. source: "cancelButtonLabel\x0a\x09^ cancelButtonLabel ifNil: [ 'Cancel' ]",
  6377. referencedClasses: [],
  6378. //>>excludeEnd("ide");
  6379. messageSends: ["ifNil:"]
  6380. }),
  6381. $globals.HLConfirmationWidget);
  6382. $core.addMethod(
  6383. $core.method({
  6384. selector: "cancelButtonLabel:",
  6385. protocol: 'accessing',
  6386. fn: function (aString){
  6387. var self=this;
  6388. var $1;
  6389. self["@cancelButtonLabel"]=aString;
  6390. $1=self["@cancelButtonLabel"];
  6391. return $1;
  6392. },
  6393. //>>excludeStart("ide", pragmas.excludeIdeData);
  6394. args: ["aString"],
  6395. source: "cancelButtonLabel: aString\x0a\x09^ cancelButtonLabel := aString",
  6396. referencedClasses: [],
  6397. //>>excludeEnd("ide");
  6398. messageSends: []
  6399. }),
  6400. $globals.HLConfirmationWidget);
  6401. $core.addMethod(
  6402. $core.method({
  6403. selector: "confirm",
  6404. protocol: 'actions',
  6405. fn: function (){
  6406. var self=this;
  6407. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6408. return $core.withContext(function($ctx1) {
  6409. //>>excludeEnd("ctx");
  6410. self._remove();
  6411. $recv(self._actionBlock())._value();
  6412. return self;
  6413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6414. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLConfirmationWidget)});
  6415. //>>excludeEnd("ctx");
  6416. },
  6417. //>>excludeStart("ide", pragmas.excludeIdeData);
  6418. args: [],
  6419. source: "confirm\x0a\x09self remove.\x0a\x09self actionBlock value",
  6420. referencedClasses: [],
  6421. //>>excludeEnd("ide");
  6422. messageSends: ["remove", "value", "actionBlock"]
  6423. }),
  6424. $globals.HLConfirmationWidget);
  6425. $core.addMethod(
  6426. $core.method({
  6427. selector: "confirmButtonLabel",
  6428. protocol: 'accessing',
  6429. fn: function (){
  6430. var self=this;
  6431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6432. return $core.withContext(function($ctx1) {
  6433. //>>excludeEnd("ctx");
  6434. var $2,$1,$receiver;
  6435. $2=self["@confirmButtonLabel"];
  6436. if(($receiver = $2) == null || $receiver.isNil){
  6437. $1="Confirm";
  6438. } else {
  6439. $1=$2;
  6440. };
  6441. return $1;
  6442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6443. }, function($ctx1) {$ctx1.fill(self,"confirmButtonLabel",{},$globals.HLConfirmationWidget)});
  6444. //>>excludeEnd("ctx");
  6445. },
  6446. //>>excludeStart("ide", pragmas.excludeIdeData);
  6447. args: [],
  6448. source: "confirmButtonLabel\x0a\x09^ confirmButtonLabel ifNil: [ 'Confirm' ]",
  6449. referencedClasses: [],
  6450. //>>excludeEnd("ide");
  6451. messageSends: ["ifNil:"]
  6452. }),
  6453. $globals.HLConfirmationWidget);
  6454. $core.addMethod(
  6455. $core.method({
  6456. selector: "confirmButtonLabel:",
  6457. protocol: 'accessing',
  6458. fn: function (aString){
  6459. var self=this;
  6460. var $1;
  6461. self["@confirmButtonLabel"]=aString;
  6462. $1=self["@confirmButtonLabel"];
  6463. return $1;
  6464. },
  6465. //>>excludeStart("ide", pragmas.excludeIdeData);
  6466. args: ["aString"],
  6467. source: "confirmButtonLabel: aString\x0a\x09^ confirmButtonLabel := aString",
  6468. referencedClasses: [],
  6469. //>>excludeEnd("ide");
  6470. messageSends: []
  6471. }),
  6472. $globals.HLConfirmationWidget);
  6473. $core.addMethod(
  6474. $core.method({
  6475. selector: "confirmationString",
  6476. protocol: 'accessing',
  6477. fn: function (){
  6478. var self=this;
  6479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6480. return $core.withContext(function($ctx1) {
  6481. //>>excludeEnd("ctx");
  6482. var $2,$1,$receiver;
  6483. $2=self["@confirmationString"];
  6484. if(($receiver = $2) == null || $receiver.isNil){
  6485. $1="Confirm";
  6486. } else {
  6487. $1=$2;
  6488. };
  6489. return $1;
  6490. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6491. }, function($ctx1) {$ctx1.fill(self,"confirmationString",{},$globals.HLConfirmationWidget)});
  6492. //>>excludeEnd("ctx");
  6493. },
  6494. //>>excludeStart("ide", pragmas.excludeIdeData);
  6495. args: [],
  6496. source: "confirmationString\x0a\x09^ confirmationString ifNil: [ 'Confirm' ]",
  6497. referencedClasses: [],
  6498. //>>excludeEnd("ide");
  6499. messageSends: ["ifNil:"]
  6500. }),
  6501. $globals.HLConfirmationWidget);
  6502. $core.addMethod(
  6503. $core.method({
  6504. selector: "confirmationString:",
  6505. protocol: 'accessing',
  6506. fn: function (aString){
  6507. var self=this;
  6508. self["@confirmationString"]=aString;
  6509. return self;
  6510. },
  6511. //>>excludeStart("ide", pragmas.excludeIdeData);
  6512. args: ["aString"],
  6513. source: "confirmationString: aString\x0a\x09confirmationString := aString",
  6514. referencedClasses: [],
  6515. //>>excludeEnd("ide");
  6516. messageSends: []
  6517. }),
  6518. $globals.HLConfirmationWidget);
  6519. $core.addMethod(
  6520. $core.method({
  6521. selector: "renderButtonsOn:",
  6522. protocol: 'rendering',
  6523. fn: function (html){
  6524. var self=this;
  6525. var confirmButton;
  6526. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6527. return $core.withContext(function($ctx1) {
  6528. //>>excludeEnd("ctx");
  6529. var $1,$3,$4,$5,$6,$2;
  6530. $1=$recv(html)._div();
  6531. $recv($1)._class_("buttons");
  6532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6533. $ctx1.sendIdx["class:"]=1;
  6534. //>>excludeEnd("ctx");
  6535. $2=$recv($1)._with_((function(){
  6536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6537. return $core.withContext(function($ctx2) {
  6538. //>>excludeEnd("ctx");
  6539. $3=$recv(html)._button();
  6540. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6541. $ctx2.sendIdx["button"]=1;
  6542. //>>excludeEnd("ctx");
  6543. $recv($3)._class_("button");
  6544. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6545. $ctx2.sendIdx["class:"]=2;
  6546. //>>excludeEnd("ctx");
  6547. $recv($3)._with_(self._cancelButtonLabel());
  6548. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6549. $ctx2.sendIdx["with:"]=2;
  6550. //>>excludeEnd("ctx");
  6551. $4=$recv($3)._onClick_((function(){
  6552. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6553. return $core.withContext(function($ctx3) {
  6554. //>>excludeEnd("ctx");
  6555. return self._cancel();
  6556. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6557. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  6558. //>>excludeEnd("ctx");
  6559. }));
  6560. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6561. $ctx2.sendIdx["onClick:"]=1;
  6562. //>>excludeEnd("ctx");
  6563. $4;
  6564. $5=$recv(html)._button();
  6565. $recv($5)._class_("button default");
  6566. $recv($5)._with_(self._confirmButtonLabel());
  6567. $6=$recv($5)._onClick_((function(){
  6568. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6569. return $core.withContext(function($ctx3) {
  6570. //>>excludeEnd("ctx");
  6571. return self._confirm();
  6572. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6573. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  6574. //>>excludeEnd("ctx");
  6575. }));
  6576. confirmButton=$6;
  6577. return confirmButton;
  6578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6579. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  6580. //>>excludeEnd("ctx");
  6581. }));
  6582. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6583. $ctx1.sendIdx["with:"]=1;
  6584. //>>excludeEnd("ctx");
  6585. self._giveFocusToButton_(confirmButton);
  6586. return self;
  6587. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6588. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLConfirmationWidget)});
  6589. //>>excludeEnd("ctx");
  6590. },
  6591. //>>excludeStart("ide", pragmas.excludeIdeData);
  6592. args: ["html"],
  6593. 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",
  6594. referencedClasses: [],
  6595. //>>excludeEnd("ide");
  6596. messageSends: ["class:", "div", "with:", "button", "cancelButtonLabel", "onClick:", "cancel", "confirmButtonLabel", "confirm", "giveFocusToButton:"]
  6597. }),
  6598. $globals.HLConfirmationWidget);
  6599. $core.addMethod(
  6600. $core.method({
  6601. selector: "renderMainOn:",
  6602. protocol: 'rendering',
  6603. fn: function (html){
  6604. var self=this;
  6605. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6606. return $core.withContext(function($ctx1) {
  6607. //>>excludeEnd("ctx");
  6608. var $1,$2;
  6609. $1=$recv(html)._span();
  6610. $recv($1)._class_("head");
  6611. $2=$recv($1)._with_(self._confirmationString());
  6612. return self;
  6613. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6614. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLConfirmationWidget)});
  6615. //>>excludeEnd("ctx");
  6616. },
  6617. //>>excludeStart("ide", pragmas.excludeIdeData);
  6618. args: ["html"],
  6619. source: "renderMainOn: html\x0a\x09html span \x0a\x09\x09class: 'head'; \x0a\x09\x09with: self confirmationString",
  6620. referencedClasses: [],
  6621. //>>excludeEnd("ide");
  6622. messageSends: ["class:", "span", "with:", "confirmationString"]
  6623. }),
  6624. $globals.HLConfirmationWidget);
  6625. $core.addClass('HLRequestWidget', $globals.HLConfirmationWidget, ['input', 'multiline', 'value'], 'Helios-Core');
  6626. //>>excludeStart("ide", pragmas.excludeIdeData);
  6627. $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.";
  6628. //>>excludeEnd("ide");
  6629. $core.addMethod(
  6630. $core.method({
  6631. selector: "beMultiline",
  6632. protocol: 'accessing',
  6633. fn: function (){
  6634. var self=this;
  6635. self["@multiline"]=true;
  6636. return self;
  6637. },
  6638. //>>excludeStart("ide", pragmas.excludeIdeData);
  6639. args: [],
  6640. source: "beMultiline\x0a\x09multiline := true",
  6641. referencedClasses: [],
  6642. //>>excludeEnd("ide");
  6643. messageSends: []
  6644. }),
  6645. $globals.HLRequestWidget);
  6646. $core.addMethod(
  6647. $core.method({
  6648. selector: "beSingleline",
  6649. protocol: 'accessing',
  6650. fn: function (){
  6651. var self=this;
  6652. self["@multiline"]=false;
  6653. return self;
  6654. },
  6655. //>>excludeStart("ide", pragmas.excludeIdeData);
  6656. args: [],
  6657. source: "beSingleline\x0a\x09multiline := false",
  6658. referencedClasses: [],
  6659. //>>excludeEnd("ide");
  6660. messageSends: []
  6661. }),
  6662. $globals.HLRequestWidget);
  6663. $core.addMethod(
  6664. $core.method({
  6665. selector: "confirm",
  6666. protocol: 'actions',
  6667. fn: function (){
  6668. var self=this;
  6669. var val;
  6670. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6671. return $core.withContext(function($ctx1) {
  6672. //>>excludeEnd("ctx");
  6673. val=$recv($recv(self["@input"])._asJQuery())._val();
  6674. self._remove();
  6675. $recv(self._actionBlock())._value_(val);
  6676. return self;
  6677. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6678. }, function($ctx1) {$ctx1.fill(self,"confirm",{val:val},$globals.HLRequestWidget)});
  6679. //>>excludeEnd("ctx");
  6680. },
  6681. //>>excludeStart("ide", pragmas.excludeIdeData);
  6682. args: [],
  6683. source: "confirm\x0a\x09| val |\x0a\x09val := input asJQuery val.\x0a\x09self remove.\x0a\x09self actionBlock value: val",
  6684. referencedClasses: [],
  6685. //>>excludeEnd("ide");
  6686. messageSends: ["val", "asJQuery", "remove", "value:", "actionBlock"]
  6687. }),
  6688. $globals.HLRequestWidget);
  6689. $core.addMethod(
  6690. $core.method({
  6691. selector: "cssClass",
  6692. protocol: 'accessing',
  6693. fn: function (){
  6694. var self=this;
  6695. return "large";
  6696. },
  6697. //>>excludeStart("ide", pragmas.excludeIdeData);
  6698. args: [],
  6699. source: "cssClass\x0a\x09^ 'large'",
  6700. referencedClasses: [],
  6701. //>>excludeEnd("ide");
  6702. messageSends: []
  6703. }),
  6704. $globals.HLRequestWidget);
  6705. $core.addMethod(
  6706. $core.method({
  6707. selector: "giveFocusToButton:",
  6708. protocol: 'private',
  6709. fn: function (aButton){
  6710. var self=this;
  6711. return self;
  6712. },
  6713. //>>excludeStart("ide", pragmas.excludeIdeData);
  6714. args: ["aButton"],
  6715. source: "giveFocusToButton: aButton",
  6716. referencedClasses: [],
  6717. //>>excludeEnd("ide");
  6718. messageSends: []
  6719. }),
  6720. $globals.HLRequestWidget);
  6721. $core.addMethod(
  6722. $core.method({
  6723. selector: "isMultiline",
  6724. protocol: 'testing',
  6725. fn: function (){
  6726. var self=this;
  6727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6728. return $core.withContext(function($ctx1) {
  6729. //>>excludeEnd("ctx");
  6730. var $2,$1,$receiver;
  6731. $2=self["@multiline"];
  6732. if(($receiver = $2) == null || $receiver.isNil){
  6733. $1=true;
  6734. } else {
  6735. $1=$2;
  6736. };
  6737. return $1;
  6738. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6739. }, function($ctx1) {$ctx1.fill(self,"isMultiline",{},$globals.HLRequestWidget)});
  6740. //>>excludeEnd("ctx");
  6741. },
  6742. //>>excludeStart("ide", pragmas.excludeIdeData);
  6743. args: [],
  6744. source: "isMultiline\x0a\x09^ multiline ifNil: [ true ]",
  6745. referencedClasses: [],
  6746. //>>excludeEnd("ide");
  6747. messageSends: ["ifNil:"]
  6748. }),
  6749. $globals.HLRequestWidget);
  6750. $core.addMethod(
  6751. $core.method({
  6752. selector: "renderMainOn:",
  6753. protocol: 'rendering',
  6754. fn: function (html){
  6755. var self=this;
  6756. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6757. return $core.withContext(function($ctx1) {
  6758. //>>excludeEnd("ctx");
  6759. var $1,$2,$3,$4,$5,$6;
  6760. (
  6761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6762. $ctx1.supercall = true,
  6763. //>>excludeEnd("ctx");
  6764. $globals.HLRequestWidget.superclass.fn.prototype._renderMainOn_.apply($recv(self), [html]));
  6765. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6766. $ctx1.supercall = false;
  6767. //>>excludeEnd("ctx");;
  6768. $1=self._isMultiline();
  6769. if($core.assert($1)){
  6770. self["@input"]=$recv(html)._textarea();
  6771. self["@input"];
  6772. } else {
  6773. $2=$recv(html)._input();
  6774. $recv($2)._type_("text");
  6775. $recv($2)._onKeyDown_((function(event){
  6776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6777. return $core.withContext(function($ctx2) {
  6778. //>>excludeEnd("ctx");
  6779. $3=$recv($recv(event)._keyCode()).__eq((13));
  6780. if($core.assert($3)){
  6781. return self._confirm();
  6782. };
  6783. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6784. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,3)});
  6785. //>>excludeEnd("ctx");
  6786. }));
  6787. $4=$recv($2)._yourself();
  6788. self["@input"]=$4;
  6789. self["@input"];
  6790. };
  6791. $5=$recv(self["@input"])._asJQuery();
  6792. $recv($5)._val_(self._value());
  6793. $6=$recv($5)._focus();
  6794. return self;
  6795. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6796. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLRequestWidget)});
  6797. //>>excludeEnd("ctx");
  6798. },
  6799. //>>excludeStart("ide", pragmas.excludeIdeData);
  6800. args: ["html"],
  6801. 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",
  6802. referencedClasses: [],
  6803. //>>excludeEnd("ide");
  6804. messageSends: ["renderMainOn:", "ifTrue:ifFalse:", "isMultiline", "textarea", "type:", "input", "onKeyDown:", "ifTrue:", "=", "keyCode", "confirm", "yourself", "val:", "asJQuery", "value", "focus"]
  6805. }),
  6806. $globals.HLRequestWidget);
  6807. $core.addMethod(
  6808. $core.method({
  6809. selector: "value",
  6810. protocol: 'accessing',
  6811. fn: function (){
  6812. var self=this;
  6813. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6814. return $core.withContext(function($ctx1) {
  6815. //>>excludeEnd("ctx");
  6816. var $2,$1,$receiver;
  6817. $2=self["@value"];
  6818. if(($receiver = $2) == null || $receiver.isNil){
  6819. $1="";
  6820. } else {
  6821. $1=$2;
  6822. };
  6823. return $1;
  6824. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6825. }, function($ctx1) {$ctx1.fill(self,"value",{},$globals.HLRequestWidget)});
  6826. //>>excludeEnd("ctx");
  6827. },
  6828. //>>excludeStart("ide", pragmas.excludeIdeData);
  6829. args: [],
  6830. source: "value\x0a\x09^ value ifNil: [ '' ]",
  6831. referencedClasses: [],
  6832. //>>excludeEnd("ide");
  6833. messageSends: ["ifNil:"]
  6834. }),
  6835. $globals.HLRequestWidget);
  6836. $core.addMethod(
  6837. $core.method({
  6838. selector: "value:",
  6839. protocol: 'accessing',
  6840. fn: function (aString){
  6841. var self=this;
  6842. self["@value"]=aString;
  6843. return self;
  6844. },
  6845. //>>excludeStart("ide", pragmas.excludeIdeData);
  6846. args: ["aString"],
  6847. source: "value: aString\x0a\x09value := aString",
  6848. referencedClasses: [],
  6849. //>>excludeEnd("ide");
  6850. messageSends: []
  6851. }),
  6852. $globals.HLRequestWidget);
  6853. $core.addClass('HLProgressWidget', $globals.HLModalWidget, ['progressBars', 'visible'], 'Helios-Core');
  6854. //>>excludeStart("ide", pragmas.excludeIdeData);
  6855. $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.";
  6856. //>>excludeEnd("ide");
  6857. $core.addMethod(
  6858. $core.method({
  6859. selector: "addProgressBar:",
  6860. protocol: 'actions',
  6861. fn: function (aProgressBar){
  6862. var self=this;
  6863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6864. return $core.withContext(function($ctx1) {
  6865. //>>excludeEnd("ctx");
  6866. self._show();
  6867. $recv(self._progressBars())._add_(aProgressBar);
  6868. $recv(aProgressBar)._appendToJQuery_($recv($recv(self._wrapper())._asJQuery())._find_(".dialog"));
  6869. return self;
  6870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6871. }, function($ctx1) {$ctx1.fill(self,"addProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  6872. //>>excludeEnd("ctx");
  6873. },
  6874. //>>excludeStart("ide", pragmas.excludeIdeData);
  6875. args: ["aProgressBar"],
  6876. source: "addProgressBar: aProgressBar\x0a\x09self show.\x0a\x09self progressBars add: aProgressBar.\x0a\x09aProgressBar appendToJQuery: (self wrapper asJQuery find: '.dialog')",
  6877. referencedClasses: [],
  6878. //>>excludeEnd("ide");
  6879. messageSends: ["show", "add:", "progressBars", "appendToJQuery:", "find:", "asJQuery", "wrapper"]
  6880. }),
  6881. $globals.HLProgressWidget);
  6882. $core.addMethod(
  6883. $core.method({
  6884. selector: "do:on:displaying:",
  6885. protocol: 'actions',
  6886. fn: function (aBlock,aCollection,aString){
  6887. var self=this;
  6888. var progressBar;
  6889. function $HLProgressBarWidget(){return $globals.HLProgressBarWidget||(typeof HLProgressBarWidget=="undefined"?nil:HLProgressBarWidget)}
  6890. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6891. return $core.withContext(function($ctx1) {
  6892. //>>excludeEnd("ctx");
  6893. var $1,$2;
  6894. $1=$recv($HLProgressBarWidget())._new();
  6895. $recv($1)._parent_(self);
  6896. $recv($1)._label_(aString);
  6897. $recv($1)._workBlock_(aBlock);
  6898. $recv($1)._collection_(aCollection);
  6899. $2=$recv($1)._yourself();
  6900. progressBar=$2;
  6901. self._addProgressBar_(progressBar);
  6902. $recv(progressBar)._start();
  6903. return self;
  6904. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6905. }, function($ctx1) {$ctx1.fill(self,"do:on:displaying:",{aBlock:aBlock,aCollection:aCollection,aString:aString,progressBar:progressBar},$globals.HLProgressWidget)});
  6906. //>>excludeEnd("ctx");
  6907. },
  6908. //>>excludeStart("ide", pragmas.excludeIdeData);
  6909. args: ["aBlock", "aCollection", "aString"],
  6910. 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",
  6911. referencedClasses: ["HLProgressBarWidget"],
  6912. //>>excludeEnd("ide");
  6913. messageSends: ["parent:", "new", "label:", "workBlock:", "collection:", "yourself", "addProgressBar:", "start"]
  6914. }),
  6915. $globals.HLProgressWidget);
  6916. $core.addMethod(
  6917. $core.method({
  6918. selector: "flush",
  6919. protocol: 'actions',
  6920. fn: function (){
  6921. var self=this;
  6922. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6923. return $core.withContext(function($ctx1) {
  6924. //>>excludeEnd("ctx");
  6925. $recv(self._progressBars())._do_((function(each){
  6926. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6927. return $core.withContext(function($ctx2) {
  6928. //>>excludeEnd("ctx");
  6929. return self._removeProgressBar_(each);
  6930. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6931. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  6932. //>>excludeEnd("ctx");
  6933. }));
  6934. return self;
  6935. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6936. }, function($ctx1) {$ctx1.fill(self,"flush",{},$globals.HLProgressWidget)});
  6937. //>>excludeEnd("ctx");
  6938. },
  6939. //>>excludeStart("ide", pragmas.excludeIdeData);
  6940. args: [],
  6941. source: "flush\x0a\x09self progressBars do: [ :each |\x0a\x09\x09self removeProgressBar: each ]",
  6942. referencedClasses: [],
  6943. //>>excludeEnd("ide");
  6944. messageSends: ["do:", "progressBars", "removeProgressBar:"]
  6945. }),
  6946. $globals.HLProgressWidget);
  6947. $core.addMethod(
  6948. $core.method({
  6949. selector: "hasButtons",
  6950. protocol: 'testing',
  6951. fn: function (){
  6952. var self=this;
  6953. return false;
  6954. },
  6955. //>>excludeStart("ide", pragmas.excludeIdeData);
  6956. args: [],
  6957. source: "hasButtons\x0a\x09^ false",
  6958. referencedClasses: [],
  6959. //>>excludeEnd("ide");
  6960. messageSends: []
  6961. }),
  6962. $globals.HLProgressWidget);
  6963. $core.addMethod(
  6964. $core.method({
  6965. selector: "isVisible",
  6966. protocol: 'testing',
  6967. fn: function (){
  6968. var self=this;
  6969. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6970. return $core.withContext(function($ctx1) {
  6971. //>>excludeEnd("ctx");
  6972. var $2,$1,$receiver;
  6973. $2=self["@visible"];
  6974. if(($receiver = $2) == null || $receiver.isNil){
  6975. $1=false;
  6976. } else {
  6977. $1=$2;
  6978. };
  6979. return $1;
  6980. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  6981. }, function($ctx1) {$ctx1.fill(self,"isVisible",{},$globals.HLProgressWidget)});
  6982. //>>excludeEnd("ctx");
  6983. },
  6984. //>>excludeStart("ide", pragmas.excludeIdeData);
  6985. args: [],
  6986. source: "isVisible\x0a\x09^ visible ifNil: [ false ]",
  6987. referencedClasses: [],
  6988. //>>excludeEnd("ide");
  6989. messageSends: ["ifNil:"]
  6990. }),
  6991. $globals.HLProgressWidget);
  6992. $core.addMethod(
  6993. $core.method({
  6994. selector: "progressBars",
  6995. protocol: 'accessing',
  6996. fn: function (){
  6997. var self=this;
  6998. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  6999. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7000. return $core.withContext(function($ctx1) {
  7001. //>>excludeEnd("ctx");
  7002. var $2,$1,$receiver;
  7003. $2=self["@progressBars"];
  7004. if(($receiver = $2) == null || $receiver.isNil){
  7005. self["@progressBars"]=$recv($OrderedCollection())._new();
  7006. $1=self["@progressBars"];
  7007. } else {
  7008. $1=$2;
  7009. };
  7010. return $1;
  7011. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7012. }, function($ctx1) {$ctx1.fill(self,"progressBars",{},$globals.HLProgressWidget)});
  7013. //>>excludeEnd("ctx");
  7014. },
  7015. //>>excludeStart("ide", pragmas.excludeIdeData);
  7016. args: [],
  7017. source: "progressBars\x0a\x09^ progressBars ifNil: [ progressBars := OrderedCollection new ]",
  7018. referencedClasses: ["OrderedCollection"],
  7019. //>>excludeEnd("ide");
  7020. messageSends: ["ifNil:", "new"]
  7021. }),
  7022. $globals.HLProgressWidget);
  7023. $core.addMethod(
  7024. $core.method({
  7025. selector: "remove",
  7026. protocol: 'actions',
  7027. fn: function (){
  7028. var self=this;
  7029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7030. return $core.withContext(function($ctx1) {
  7031. //>>excludeEnd("ctx");
  7032. var $1;
  7033. $1=self._isVisible();
  7034. if($core.assert($1)){
  7035. self["@visible"]=false;
  7036. self["@visible"];
  7037. (
  7038. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7039. $ctx1.supercall = true,
  7040. //>>excludeEnd("ctx");
  7041. $globals.HLProgressWidget.superclass.fn.prototype._remove.apply($recv(self), []));
  7042. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7043. $ctx1.supercall = false;
  7044. //>>excludeEnd("ctx");;
  7045. };
  7046. return self;
  7047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7048. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressWidget)});
  7049. //>>excludeEnd("ctx");
  7050. },
  7051. //>>excludeStart("ide", pragmas.excludeIdeData);
  7052. args: [],
  7053. source: "remove\x0a\x09self isVisible ifTrue: [\x0a\x09\x09visible := false.\x0a\x09\x09super remove ]",
  7054. referencedClasses: [],
  7055. //>>excludeEnd("ide");
  7056. messageSends: ["ifTrue:", "isVisible", "remove"]
  7057. }),
  7058. $globals.HLProgressWidget);
  7059. $core.addMethod(
  7060. $core.method({
  7061. selector: "removeProgressBar:",
  7062. protocol: 'actions',
  7063. fn: function (aProgressBar){
  7064. var self=this;
  7065. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7066. return $core.withContext(function($ctx1) {
  7067. //>>excludeEnd("ctx");
  7068. var $1;
  7069. $1=self._progressBars();
  7070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7071. $ctx1.sendIdx["progressBars"]=1;
  7072. //>>excludeEnd("ctx");
  7073. $recv($1)._remove_ifAbsent_(aProgressBar,(function(){
  7074. }));
  7075. $recv($recv($recv(aProgressBar)._wrapper())._asJQuery())._remove();
  7076. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7077. $ctx1.sendIdx["remove"]=1;
  7078. //>>excludeEnd("ctx");
  7079. $recv(self._progressBars())._ifEmpty_((function(){
  7080. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7081. return $core.withContext(function($ctx2) {
  7082. //>>excludeEnd("ctx");
  7083. return self._remove();
  7084. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7085. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7086. //>>excludeEnd("ctx");
  7087. }));
  7088. return self;
  7089. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7090. }, function($ctx1) {$ctx1.fill(self,"removeProgressBar:",{aProgressBar:aProgressBar},$globals.HLProgressWidget)});
  7091. //>>excludeEnd("ctx");
  7092. },
  7093. //>>excludeStart("ide", pragmas.excludeIdeData);
  7094. args: ["aProgressBar"],
  7095. source: "removeProgressBar: aProgressBar\x0a\x09self progressBars remove: aProgressBar ifAbsent: [].\x0a\x09aProgressBar wrapper asJQuery remove.\x0a\x09\x0a\x09self progressBars ifEmpty: [ self remove ]",
  7096. referencedClasses: [],
  7097. //>>excludeEnd("ide");
  7098. messageSends: ["remove:ifAbsent:", "progressBars", "remove", "asJQuery", "wrapper", "ifEmpty:"]
  7099. }),
  7100. $globals.HLProgressWidget);
  7101. $core.addMethod(
  7102. $core.method({
  7103. selector: "renderMainOn:",
  7104. protocol: 'rendering',
  7105. fn: function (html){
  7106. var self=this;
  7107. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7108. return $core.withContext(function($ctx1) {
  7109. //>>excludeEnd("ctx");
  7110. $recv(self._progressBars())._do_((function(each){
  7111. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7112. return $core.withContext(function($ctx2) {
  7113. //>>excludeEnd("ctx");
  7114. return $recv(html)._with_(each);
  7115. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7116. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7117. //>>excludeEnd("ctx");
  7118. }));
  7119. return self;
  7120. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7121. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLProgressWidget)});
  7122. //>>excludeEnd("ctx");
  7123. },
  7124. //>>excludeStart("ide", pragmas.excludeIdeData);
  7125. args: ["html"],
  7126. source: "renderMainOn: html\x0a\x09self progressBars do: [ :each |\x0a\x09\x09html with: each ]",
  7127. referencedClasses: [],
  7128. //>>excludeEnd("ide");
  7129. messageSends: ["do:", "progressBars", "with:"]
  7130. }),
  7131. $globals.HLProgressWidget);
  7132. $core.addMethod(
  7133. $core.method({
  7134. selector: "show",
  7135. protocol: 'actions',
  7136. fn: function (){
  7137. var self=this;
  7138. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7139. return $core.withContext(function($ctx1) {
  7140. //>>excludeEnd("ctx");
  7141. var $1;
  7142. $1=self._isVisible();
  7143. if(!$core.assert($1)){
  7144. self["@visible"]=true;
  7145. self["@visible"];
  7146. (
  7147. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7148. $ctx1.supercall = true,
  7149. //>>excludeEnd("ctx");
  7150. $globals.HLProgressWidget.superclass.fn.prototype._show.apply($recv(self), []));
  7151. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7152. $ctx1.supercall = false;
  7153. //>>excludeEnd("ctx");;
  7154. };
  7155. return self;
  7156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7157. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLProgressWidget)});
  7158. //>>excludeEnd("ctx");
  7159. },
  7160. //>>excludeStart("ide", pragmas.excludeIdeData);
  7161. args: [],
  7162. source: "show\x0a\x09self isVisible ifFalse: [\x0a\x09\x09visible := true.\x0a\x09\x09super show ]",
  7163. referencedClasses: [],
  7164. //>>excludeEnd("ide");
  7165. messageSends: ["ifFalse:", "isVisible", "show"]
  7166. }),
  7167. $globals.HLProgressWidget);
  7168. $globals.HLProgressWidget.klass.iVarNames = ['default'];
  7169. $core.addMethod(
  7170. $core.method({
  7171. selector: "default",
  7172. protocol: 'accessing',
  7173. fn: function (){
  7174. var self=this;
  7175. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7176. return $core.withContext(function($ctx1) {
  7177. //>>excludeEnd("ctx");
  7178. var $2,$1,$receiver;
  7179. $2=self["@default"];
  7180. if(($receiver = $2) == null || $receiver.isNil){
  7181. self["@default"]=self._new();
  7182. $1=self["@default"];
  7183. } else {
  7184. $1=$2;
  7185. };
  7186. return $1;
  7187. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7188. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressWidget.klass)});
  7189. //>>excludeEnd("ctx");
  7190. },
  7191. //>>excludeStart("ide", pragmas.excludeIdeData);
  7192. args: [],
  7193. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  7194. referencedClasses: [],
  7195. //>>excludeEnd("ide");
  7196. messageSends: ["ifNil:", "new"]
  7197. }),
  7198. $globals.HLProgressWidget.klass);
  7199. $core.addClass('HLTabSelectionWidget', $globals.HLModalWidget, ['tabs', 'tabList', 'selectedTab', 'selectCallback', 'cancelCallback', 'confirmCallback'], 'Helios-Core');
  7200. //>>excludeStart("ide", pragmas.excludeIdeData);
  7201. $globals.HLTabSelectionWidget.comment="I am a modal window used to select or create tabs.";
  7202. //>>excludeEnd("ide");
  7203. $core.addMethod(
  7204. $core.method({
  7205. selector: "cancel",
  7206. protocol: 'actions',
  7207. fn: function (){
  7208. var self=this;
  7209. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7210. return $core.withContext(function($ctx1) {
  7211. //>>excludeEnd("ctx");
  7212. self._remove();
  7213. $recv(self._cancelCallback())._value();
  7214. return self;
  7215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7216. }, function($ctx1) {$ctx1.fill(self,"cancel",{},$globals.HLTabSelectionWidget)});
  7217. //>>excludeEnd("ctx");
  7218. },
  7219. //>>excludeStart("ide", pragmas.excludeIdeData);
  7220. args: [],
  7221. source: "cancel\x0a\x09self remove.\x0a\x09self cancelCallback value",
  7222. referencedClasses: [],
  7223. //>>excludeEnd("ide");
  7224. messageSends: ["remove", "value", "cancelCallback"]
  7225. }),
  7226. $globals.HLTabSelectionWidget);
  7227. $core.addMethod(
  7228. $core.method({
  7229. selector: "cancelCallback",
  7230. protocol: 'accessing',
  7231. fn: function (){
  7232. var self=this;
  7233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7234. return $core.withContext(function($ctx1) {
  7235. //>>excludeEnd("ctx");
  7236. var $2,$1,$receiver;
  7237. $2=self["@cancelCallback"];
  7238. if(($receiver = $2) == null || $receiver.isNil){
  7239. $1=(function(){
  7240. });
  7241. } else {
  7242. $1=$2;
  7243. };
  7244. return $1;
  7245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7246. }, function($ctx1) {$ctx1.fill(self,"cancelCallback",{},$globals.HLTabSelectionWidget)});
  7247. //>>excludeEnd("ctx");
  7248. },
  7249. //>>excludeStart("ide", pragmas.excludeIdeData);
  7250. args: [],
  7251. source: "cancelCallback\x0a\x09^ cancelCallback ifNil: [ [] ]",
  7252. referencedClasses: [],
  7253. //>>excludeEnd("ide");
  7254. messageSends: ["ifNil:"]
  7255. }),
  7256. $globals.HLTabSelectionWidget);
  7257. $core.addMethod(
  7258. $core.method({
  7259. selector: "cancelCallback:",
  7260. protocol: 'accessing',
  7261. fn: function (aBlock){
  7262. var self=this;
  7263. self["@cancelCallback"]=aBlock;
  7264. return self;
  7265. },
  7266. //>>excludeStart("ide", pragmas.excludeIdeData);
  7267. args: ["aBlock"],
  7268. source: "cancelCallback: aBlock\x0a\x09cancelCallback := aBlock",
  7269. referencedClasses: [],
  7270. //>>excludeEnd("ide");
  7271. messageSends: []
  7272. }),
  7273. $globals.HLTabSelectionWidget);
  7274. $core.addMethod(
  7275. $core.method({
  7276. selector: "confirm",
  7277. protocol: 'actions',
  7278. fn: function (){
  7279. var self=this;
  7280. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7281. return $core.withContext(function($ctx1) {
  7282. //>>excludeEnd("ctx");
  7283. self._remove();
  7284. $recv(self._confirmCallback())._value_(self._selectedTab());
  7285. return self;
  7286. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7287. }, function($ctx1) {$ctx1.fill(self,"confirm",{},$globals.HLTabSelectionWidget)});
  7288. //>>excludeEnd("ctx");
  7289. },
  7290. //>>excludeStart("ide", pragmas.excludeIdeData);
  7291. args: [],
  7292. source: "confirm\x0a\x09self remove.\x0a\x09self confirmCallback value: self selectedTab",
  7293. referencedClasses: [],
  7294. //>>excludeEnd("ide");
  7295. messageSends: ["remove", "value:", "confirmCallback", "selectedTab"]
  7296. }),
  7297. $globals.HLTabSelectionWidget);
  7298. $core.addMethod(
  7299. $core.method({
  7300. selector: "confirmCallback",
  7301. protocol: 'accessing',
  7302. fn: function (){
  7303. var self=this;
  7304. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7305. return $core.withContext(function($ctx1) {
  7306. //>>excludeEnd("ctx");
  7307. var $2,$1,$receiver;
  7308. $2=self["@confirmCallback"];
  7309. if(($receiver = $2) == null || $receiver.isNil){
  7310. $1=(function(){
  7311. });
  7312. } else {
  7313. $1=$2;
  7314. };
  7315. return $1;
  7316. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7317. }, function($ctx1) {$ctx1.fill(self,"confirmCallback",{},$globals.HLTabSelectionWidget)});
  7318. //>>excludeEnd("ctx");
  7319. },
  7320. //>>excludeStart("ide", pragmas.excludeIdeData);
  7321. args: [],
  7322. source: "confirmCallback\x0a\x09^ confirmCallback ifNil: [ [] ]",
  7323. referencedClasses: [],
  7324. //>>excludeEnd("ide");
  7325. messageSends: ["ifNil:"]
  7326. }),
  7327. $globals.HLTabSelectionWidget);
  7328. $core.addMethod(
  7329. $core.method({
  7330. selector: "confirmCallback:",
  7331. protocol: 'accessing',
  7332. fn: function (aBlock){
  7333. var self=this;
  7334. self["@confirmCallback"]=aBlock;
  7335. return self;
  7336. },
  7337. //>>excludeStart("ide", pragmas.excludeIdeData);
  7338. args: ["aBlock"],
  7339. source: "confirmCallback: aBlock\x0a\x09confirmCallback := aBlock",
  7340. referencedClasses: [],
  7341. //>>excludeEnd("ide");
  7342. messageSends: []
  7343. }),
  7344. $globals.HLTabSelectionWidget);
  7345. $core.addMethod(
  7346. $core.method({
  7347. selector: "renderButtonsOn:",
  7348. protocol: 'rendering',
  7349. fn: function (html){
  7350. var self=this;
  7351. var confirmButton;
  7352. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7353. return $core.withContext(function($ctx1) {
  7354. //>>excludeEnd("ctx");
  7355. var $1,$3,$4,$5,$6,$2;
  7356. $1=$recv(html)._div();
  7357. $recv($1)._class_("buttons");
  7358. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7359. $ctx1.sendIdx["class:"]=1;
  7360. //>>excludeEnd("ctx");
  7361. $2=$recv($1)._with_((function(){
  7362. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7363. return $core.withContext(function($ctx2) {
  7364. //>>excludeEnd("ctx");
  7365. $3=$recv(html)._button();
  7366. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7367. $ctx2.sendIdx["button"]=1;
  7368. //>>excludeEnd("ctx");
  7369. $recv($3)._class_("button");
  7370. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7371. $ctx2.sendIdx["class:"]=2;
  7372. //>>excludeEnd("ctx");
  7373. $recv($3)._with_("Cancel");
  7374. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7375. $ctx2.sendIdx["with:"]=2;
  7376. //>>excludeEnd("ctx");
  7377. $4=$recv($3)._onClick_((function(){
  7378. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7379. return $core.withContext(function($ctx3) {
  7380. //>>excludeEnd("ctx");
  7381. return self._cancel();
  7382. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7383. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7384. //>>excludeEnd("ctx");
  7385. }));
  7386. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7387. $ctx2.sendIdx["onClick:"]=1;
  7388. //>>excludeEnd("ctx");
  7389. $4;
  7390. $5=$recv(html)._button();
  7391. $recv($5)._class_("button default");
  7392. $recv($5)._with_("Select tab");
  7393. $6=$recv($5)._onClick_((function(){
  7394. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7395. return $core.withContext(function($ctx3) {
  7396. //>>excludeEnd("ctx");
  7397. return self._confirm();
  7398. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7399. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  7400. //>>excludeEnd("ctx");
  7401. }));
  7402. confirmButton=$6;
  7403. return confirmButton;
  7404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7405. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  7406. //>>excludeEnd("ctx");
  7407. }));
  7408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7409. $ctx1.sendIdx["with:"]=1;
  7410. //>>excludeEnd("ctx");
  7411. self._giveFocusToButton_(confirmButton);
  7412. return self;
  7413. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7414. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html,confirmButton:confirmButton},$globals.HLTabSelectionWidget)});
  7415. //>>excludeEnd("ctx");
  7416. },
  7417. //>>excludeStart("ide", pragmas.excludeIdeData);
  7418. args: ["html"],
  7419. 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",
  7420. referencedClasses: [],
  7421. //>>excludeEnd("ide");
  7422. messageSends: ["class:", "div", "with:", "button", "onClick:", "cancel", "confirm", "giveFocusToButton:"]
  7423. }),
  7424. $globals.HLTabSelectionWidget);
  7425. $core.addMethod(
  7426. $core.method({
  7427. selector: "renderContentOn:",
  7428. protocol: 'rendering',
  7429. fn: function (html){
  7430. var self=this;
  7431. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7432. return $core.withContext(function($ctx1) {
  7433. //>>excludeEnd("ctx");
  7434. (
  7435. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7436. $ctx1.supercall = true,
  7437. //>>excludeEnd("ctx");
  7438. $globals.HLTabSelectionWidget.superclass.fn.prototype._renderContentOn_.apply($recv(self), [html]));
  7439. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7440. $ctx1.supercall = false;
  7441. //>>excludeEnd("ctx");;
  7442. $recv(self._tabList())._focus();
  7443. return self;
  7444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7445. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabSelectionWidget)});
  7446. //>>excludeEnd("ctx");
  7447. },
  7448. //>>excludeStart("ide", pragmas.excludeIdeData);
  7449. args: ["html"],
  7450. source: "renderContentOn: html\x0a\x09super renderContentOn: html.\x0a\x09self tabList focus",
  7451. referencedClasses: [],
  7452. //>>excludeEnd("ide");
  7453. messageSends: ["renderContentOn:", "focus", "tabList"]
  7454. }),
  7455. $globals.HLTabSelectionWidget);
  7456. $core.addMethod(
  7457. $core.method({
  7458. selector: "renderMainOn:",
  7459. protocol: 'rendering',
  7460. fn: function (html){
  7461. var self=this;
  7462. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7463. return $core.withContext(function($ctx1) {
  7464. //>>excludeEnd("ctx");
  7465. var $1,$2;
  7466. $1=$recv(html)._div();
  7467. $recv($1)._class_("title");
  7468. $2=$recv($1)._with_("Tab selection");
  7469. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7470. $ctx1.sendIdx["with:"]=1;
  7471. //>>excludeEnd("ctx");
  7472. $recv(html)._with_(self._tabList());
  7473. return self;
  7474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7475. }, function($ctx1) {$ctx1.fill(self,"renderMainOn:",{html:html},$globals.HLTabSelectionWidget)});
  7476. //>>excludeEnd("ctx");
  7477. },
  7478. //>>excludeStart("ide", pragmas.excludeIdeData);
  7479. args: ["html"],
  7480. source: "renderMainOn: html\x0a\x09html div \x0a\x09\x09class: 'title'; \x0a\x09\x09with: 'Tab selection'.\x0a\x09\x0a\x09html with: self tabList",
  7481. referencedClasses: [],
  7482. //>>excludeEnd("ide");
  7483. messageSends: ["class:", "div", "with:", "tabList"]
  7484. }),
  7485. $globals.HLTabSelectionWidget);
  7486. $core.addMethod(
  7487. $core.method({
  7488. selector: "renderTab:on:",
  7489. protocol: 'rendering',
  7490. fn: function (aTab,html){
  7491. var self=this;
  7492. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7493. return $core.withContext(function($ctx1) {
  7494. //>>excludeEnd("ctx");
  7495. var $1,$2;
  7496. $1=$recv(html)._span();
  7497. $recv($1)._class_($recv(aTab)._cssClass());
  7498. $2=$recv($1)._with_($recv(aTab)._label());
  7499. return self;
  7500. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7501. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html},$globals.HLTabSelectionWidget)});
  7502. //>>excludeEnd("ctx");
  7503. },
  7504. //>>excludeStart("ide", pragmas.excludeIdeData);
  7505. args: ["aTab", "html"],
  7506. source: "renderTab: aTab on: html\x0a\x09html \x0a\x09\x09span \x0a\x09\x09\x09class: aTab cssClass;\x0a\x09\x09\x09with: aTab label",
  7507. referencedClasses: [],
  7508. //>>excludeEnd("ide");
  7509. messageSends: ["class:", "span", "cssClass", "with:", "label"]
  7510. }),
  7511. $globals.HLTabSelectionWidget);
  7512. $core.addMethod(
  7513. $core.method({
  7514. selector: "renderTabsOn:",
  7515. protocol: 'rendering',
  7516. fn: function (html){
  7517. var self=this;
  7518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7519. return $core.withContext(function($ctx1) {
  7520. //>>excludeEnd("ctx");
  7521. var $1,$2;
  7522. $recv(self._tabs())._do_((function(each){
  7523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7524. return $core.withContext(function($ctx2) {
  7525. //>>excludeEnd("ctx");
  7526. return $recv($recv(html)._li())._with_((function(){
  7527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7528. return $core.withContext(function($ctx3) {
  7529. //>>excludeEnd("ctx");
  7530. $1=$recv(html)._a();
  7531. $recv($1)._with_((function(){
  7532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7533. return $core.withContext(function($ctx4) {
  7534. //>>excludeEnd("ctx");
  7535. return self._renderTab_on_(each,html);
  7536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7537. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,3)});
  7538. //>>excludeEnd("ctx");
  7539. }));
  7540. $2=$recv($1)._onClick_((function(){
  7541. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7542. return $core.withContext(function($ctx4) {
  7543. //>>excludeEnd("ctx");
  7544. return self._selectTab_(each);
  7545. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7546. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,4)});
  7547. //>>excludeEnd("ctx");
  7548. }));
  7549. return $2;
  7550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7551. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  7552. //>>excludeEnd("ctx");
  7553. }));
  7554. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7555. $ctx2.sendIdx["with:"]=1;
  7556. //>>excludeEnd("ctx");
  7557. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7558. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  7559. //>>excludeEnd("ctx");
  7560. }));
  7561. return self;
  7562. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7563. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html},$globals.HLTabSelectionWidget)});
  7564. //>>excludeEnd("ctx");
  7565. },
  7566. //>>excludeStart("ide", pragmas.excludeIdeData);
  7567. args: ["html"],
  7568. 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 ] ] ]",
  7569. referencedClasses: [],
  7570. //>>excludeEnd("ide");
  7571. messageSends: ["do:", "tabs", "with:", "li", "a", "renderTab:on:", "onClick:", "selectTab:"]
  7572. }),
  7573. $globals.HLTabSelectionWidget);
  7574. $core.addMethod(
  7575. $core.method({
  7576. selector: "selectCallback",
  7577. protocol: 'accessing',
  7578. fn: function (){
  7579. var self=this;
  7580. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7581. return $core.withContext(function($ctx1) {
  7582. //>>excludeEnd("ctx");
  7583. var $2,$1,$receiver;
  7584. $2=self["@selectCallback"];
  7585. if(($receiver = $2) == null || $receiver.isNil){
  7586. $1=(function(){
  7587. });
  7588. } else {
  7589. $1=$2;
  7590. };
  7591. return $1;
  7592. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7593. }, function($ctx1) {$ctx1.fill(self,"selectCallback",{},$globals.HLTabSelectionWidget)});
  7594. //>>excludeEnd("ctx");
  7595. },
  7596. //>>excludeStart("ide", pragmas.excludeIdeData);
  7597. args: [],
  7598. source: "selectCallback\x0a\x09^ selectCallback ifNil: [ [] ]",
  7599. referencedClasses: [],
  7600. //>>excludeEnd("ide");
  7601. messageSends: ["ifNil:"]
  7602. }),
  7603. $globals.HLTabSelectionWidget);
  7604. $core.addMethod(
  7605. $core.method({
  7606. selector: "selectCallback:",
  7607. protocol: 'accessing',
  7608. fn: function (aBlock){
  7609. var self=this;
  7610. self["@selectCallback"]=aBlock;
  7611. return self;
  7612. },
  7613. //>>excludeStart("ide", pragmas.excludeIdeData);
  7614. args: ["aBlock"],
  7615. source: "selectCallback: aBlock\x0a\x09selectCallback := aBlock",
  7616. referencedClasses: [],
  7617. //>>excludeEnd("ide");
  7618. messageSends: []
  7619. }),
  7620. $globals.HLTabSelectionWidget);
  7621. $core.addMethod(
  7622. $core.method({
  7623. selector: "selectTab:",
  7624. protocol: 'actions',
  7625. fn: function (aTab){
  7626. var self=this;
  7627. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7628. return $core.withContext(function($ctx1) {
  7629. //>>excludeEnd("ctx");
  7630. self._selectedTab_(aTab);
  7631. $recv(self._selectCallback())._value_(aTab);
  7632. return self;
  7633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7634. }, function($ctx1) {$ctx1.fill(self,"selectTab:",{aTab:aTab},$globals.HLTabSelectionWidget)});
  7635. //>>excludeEnd("ctx");
  7636. },
  7637. //>>excludeStart("ide", pragmas.excludeIdeData);
  7638. args: ["aTab"],
  7639. source: "selectTab: aTab\x0a\x09self selectedTab: aTab.\x0a\x09self selectCallback value: aTab",
  7640. referencedClasses: [],
  7641. //>>excludeEnd("ide");
  7642. messageSends: ["selectedTab:", "value:", "selectCallback"]
  7643. }),
  7644. $globals.HLTabSelectionWidget);
  7645. $core.addMethod(
  7646. $core.method({
  7647. selector: "selectedTab",
  7648. protocol: 'accessing',
  7649. fn: function (){
  7650. var self=this;
  7651. var $1;
  7652. $1=self["@selectedTab"];
  7653. return $1;
  7654. },
  7655. //>>excludeStart("ide", pragmas.excludeIdeData);
  7656. args: [],
  7657. source: "selectedTab\x0a\x09^ selectedTab",
  7658. referencedClasses: [],
  7659. //>>excludeEnd("ide");
  7660. messageSends: []
  7661. }),
  7662. $globals.HLTabSelectionWidget);
  7663. $core.addMethod(
  7664. $core.method({
  7665. selector: "selectedTab:",
  7666. protocol: 'accessing',
  7667. fn: function (aTab){
  7668. var self=this;
  7669. self["@selectedTab"]=aTab;
  7670. return self;
  7671. },
  7672. //>>excludeStart("ide", pragmas.excludeIdeData);
  7673. args: ["aTab"],
  7674. source: "selectedTab: aTab\x0a\x09selectedTab := aTab",
  7675. referencedClasses: [],
  7676. //>>excludeEnd("ide");
  7677. messageSends: []
  7678. }),
  7679. $globals.HLTabSelectionWidget);
  7680. $core.addMethod(
  7681. $core.method({
  7682. selector: "setupKeyBindings",
  7683. protocol: 'actions',
  7684. fn: function (){
  7685. var self=this;
  7686. function $String(){return $globals.String||(typeof String=="undefined"?nil:String)}
  7687. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7688. return $core.withContext(function($ctx1) {
  7689. //>>excludeEnd("ctx");
  7690. var $1;
  7691. (
  7692. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7693. $ctx1.supercall = true,
  7694. //>>excludeEnd("ctx");
  7695. $globals.HLTabSelectionWidget.superclass.fn.prototype._setupKeyBindings.apply($recv(self), []));
  7696. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7697. $ctx1.supercall = false;
  7698. //>>excludeEnd("ctx");;
  7699. $recv(".dialog"._asJQuery())._keyup_((function(e){
  7700. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7701. return $core.withContext(function($ctx2) {
  7702. //>>excludeEnd("ctx");
  7703. $1=$recv($recv(e)._keyCode()).__eq($recv($recv($String())._cr())._asciiValue());
  7704. if($core.assert($1)){
  7705. return self._confirm();
  7706. };
  7707. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7708. }, function($ctx2) {$ctx2.fillBlock({e:e},$ctx1,1)});
  7709. //>>excludeEnd("ctx");
  7710. }));
  7711. return self;
  7712. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7713. }, function($ctx1) {$ctx1.fill(self,"setupKeyBindings",{},$globals.HLTabSelectionWidget)});
  7714. //>>excludeEnd("ctx");
  7715. },
  7716. //>>excludeStart("ide", pragmas.excludeIdeData);
  7717. args: [],
  7718. source: "setupKeyBindings\x0a\x09super setupKeyBindings.\x0a\x09'.dialog' asJQuery keyup: [ :e |\x0a\x09\x09e keyCode = String cr asciiValue ifTrue: [ self confirm ] ]",
  7719. referencedClasses: ["String"],
  7720. //>>excludeEnd("ide");
  7721. messageSends: ["setupKeyBindings", "keyup:", "asJQuery", "ifTrue:", "=", "keyCode", "asciiValue", "cr", "confirm"]
  7722. }),
  7723. $globals.HLTabSelectionWidget);
  7724. $core.addMethod(
  7725. $core.method({
  7726. selector: "tabList",
  7727. protocol: 'rendering',
  7728. fn: function (){
  7729. var self=this;
  7730. function $HLTabListWidget(){return $globals.HLTabListWidget||(typeof HLTabListWidget=="undefined"?nil:HLTabListWidget)}
  7731. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7732. return $core.withContext(function($ctx1) {
  7733. //>>excludeEnd("ctx");
  7734. var $1,$2,$3,$4,$receiver;
  7735. $1=self["@tabList"];
  7736. if(($receiver = $1) == null || $receiver.isNil){
  7737. self["@tabList"]=$recv($HLTabListWidget())._new();
  7738. self["@tabList"];
  7739. $2=self["@tabList"];
  7740. $recv($2)._callback_((function(tab){
  7741. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7742. return $core.withContext(function($ctx2) {
  7743. //>>excludeEnd("ctx");
  7744. self._selectTab_(tab);
  7745. return $recv(self["@tabList"])._focus();
  7746. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7747. }, function($ctx2) {$ctx2.fillBlock({tab:tab},$ctx1,2)});
  7748. //>>excludeEnd("ctx");
  7749. }));
  7750. $recv($2)._selectedItem_(self._selectedTab());
  7751. $3=$recv($2)._items_(self._tabs());
  7752. $3;
  7753. } else {
  7754. $1;
  7755. };
  7756. $4=self["@tabList"];
  7757. return $4;
  7758. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7759. }, function($ctx1) {$ctx1.fill(self,"tabList",{},$globals.HLTabSelectionWidget)});
  7760. //>>excludeEnd("ctx");
  7761. },
  7762. //>>excludeStart("ide", pragmas.excludeIdeData);
  7763. args: [],
  7764. 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",
  7765. referencedClasses: ["HLTabListWidget"],
  7766. //>>excludeEnd("ide");
  7767. messageSends: ["ifNil:", "new", "callback:", "selectTab:", "focus", "selectedItem:", "selectedTab", "items:", "tabs"]
  7768. }),
  7769. $globals.HLTabSelectionWidget);
  7770. $core.addMethod(
  7771. $core.method({
  7772. selector: "tabs",
  7773. protocol: 'accessing',
  7774. fn: function (){
  7775. var self=this;
  7776. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7777. return $core.withContext(function($ctx1) {
  7778. //>>excludeEnd("ctx");
  7779. var $2,$1,$receiver;
  7780. $2=self["@tabs"];
  7781. if(($receiver = $2) == null || $receiver.isNil){
  7782. $1=[];
  7783. } else {
  7784. $1=$2;
  7785. };
  7786. return $1;
  7787. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7788. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabSelectionWidget)});
  7789. //>>excludeEnd("ctx");
  7790. },
  7791. //>>excludeStart("ide", pragmas.excludeIdeData);
  7792. args: [],
  7793. source: "tabs\x0a\x09^ tabs ifNil: [ #() ]",
  7794. referencedClasses: [],
  7795. //>>excludeEnd("ide");
  7796. messageSends: ["ifNil:"]
  7797. }),
  7798. $globals.HLTabSelectionWidget);
  7799. $core.addMethod(
  7800. $core.method({
  7801. selector: "tabs:",
  7802. protocol: 'accessing',
  7803. fn: function (aCollection){
  7804. var self=this;
  7805. self["@tabs"]=aCollection;
  7806. return self;
  7807. },
  7808. //>>excludeStart("ide", pragmas.excludeIdeData);
  7809. args: ["aCollection"],
  7810. source: "tabs: aCollection\x0a\x09tabs := aCollection",
  7811. referencedClasses: [],
  7812. //>>excludeEnd("ide");
  7813. messageSends: []
  7814. }),
  7815. $globals.HLTabSelectionWidget);
  7816. $core.addClass('HLProgressBarWidget', $globals.HLWidget, ['label', 'parent', 'workBlock', 'collection', 'bar'], 'Helios-Core');
  7817. //>>excludeStart("ide", pragmas.excludeIdeData);
  7818. $globals.HLProgressBarWidget.comment="I am a widget used to display a progress bar while iterating over a collection.";
  7819. //>>excludeEnd("ide");
  7820. $core.addMethod(
  7821. $core.method({
  7822. selector: "collection",
  7823. protocol: 'accessing',
  7824. fn: function (){
  7825. var self=this;
  7826. var $1;
  7827. $1=self["@collection"];
  7828. return $1;
  7829. },
  7830. //>>excludeStart("ide", pragmas.excludeIdeData);
  7831. args: [],
  7832. source: "collection\x0a\x09^ collection",
  7833. referencedClasses: [],
  7834. //>>excludeEnd("ide");
  7835. messageSends: []
  7836. }),
  7837. $globals.HLProgressBarWidget);
  7838. $core.addMethod(
  7839. $core.method({
  7840. selector: "collection:",
  7841. protocol: 'accessing',
  7842. fn: function (aCollection){
  7843. var self=this;
  7844. self["@collection"]=aCollection;
  7845. return self;
  7846. },
  7847. //>>excludeStart("ide", pragmas.excludeIdeData);
  7848. args: ["aCollection"],
  7849. source: "collection: aCollection\x0a\x09collection := aCollection",
  7850. referencedClasses: [],
  7851. //>>excludeEnd("ide");
  7852. messageSends: []
  7853. }),
  7854. $globals.HLProgressBarWidget);
  7855. $core.addMethod(
  7856. $core.method({
  7857. selector: "evaluateAt:",
  7858. protocol: 'actions',
  7859. fn: function (anInteger){
  7860. var self=this;
  7861. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7862. return $core.withContext(function($ctx1) {
  7863. //>>excludeEnd("ctx");
  7864. var $4,$3,$2,$1,$7,$6,$5;
  7865. $4=self._collection();
  7866. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7867. $ctx1.sendIdx["collection"]=1;
  7868. //>>excludeEnd("ctx");
  7869. $3=$recv($4)._size();
  7870. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7871. $ctx1.sendIdx["size"]=1;
  7872. //>>excludeEnd("ctx");
  7873. $2=$recv(anInteger).__slash($3);
  7874. $1=$recv($2).__star((100));
  7875. self._updateProgress_($1);
  7876. $7=self._collection();
  7877. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7878. $ctx1.sendIdx["collection"]=2;
  7879. //>>excludeEnd("ctx");
  7880. $6=$recv($7)._size();
  7881. $5=$recv(anInteger).__lt_eq($6);
  7882. if($core.assert($5)){
  7883. $recv((function(){
  7884. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7885. return $core.withContext(function($ctx2) {
  7886. //>>excludeEnd("ctx");
  7887. $recv(self._workBlock())._value_($recv(self._collection())._at_(anInteger));
  7888. return self._evaluateAt_($recv(anInteger).__plus((1)));
  7889. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7890. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  7891. //>>excludeEnd("ctx");
  7892. }))._valueWithTimeout_((10));
  7893. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7894. $ctx1.sendIdx["valueWithTimeout:"]=1;
  7895. //>>excludeEnd("ctx");
  7896. } else {
  7897. $recv((function(){
  7898. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7899. return $core.withContext(function($ctx2) {
  7900. //>>excludeEnd("ctx");
  7901. return self._remove();
  7902. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7903. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  7904. //>>excludeEnd("ctx");
  7905. }))._valueWithTimeout_((500));
  7906. };
  7907. return self;
  7908. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7909. }, function($ctx1) {$ctx1.fill(self,"evaluateAt:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  7910. //>>excludeEnd("ctx");
  7911. },
  7912. //>>excludeStart("ide", pragmas.excludeIdeData);
  7913. args: ["anInteger"],
  7914. 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 ]",
  7915. referencedClasses: [],
  7916. //>>excludeEnd("ide");
  7917. messageSends: ["updateProgress:", "*", "/", "size", "collection", "ifTrue:ifFalse:", "<=", "valueWithTimeout:", "value:", "workBlock", "at:", "evaluateAt:", "+", "remove"]
  7918. }),
  7919. $globals.HLProgressBarWidget);
  7920. $core.addMethod(
  7921. $core.method({
  7922. selector: "label",
  7923. protocol: 'accessing',
  7924. fn: function (){
  7925. var self=this;
  7926. var $1;
  7927. $1=self["@label"];
  7928. return $1;
  7929. },
  7930. //>>excludeStart("ide", pragmas.excludeIdeData);
  7931. args: [],
  7932. source: "label\x0a\x09^ label",
  7933. referencedClasses: [],
  7934. //>>excludeEnd("ide");
  7935. messageSends: []
  7936. }),
  7937. $globals.HLProgressBarWidget);
  7938. $core.addMethod(
  7939. $core.method({
  7940. selector: "label:",
  7941. protocol: 'accessing',
  7942. fn: function (aString){
  7943. var self=this;
  7944. self["@label"]=aString;
  7945. return self;
  7946. },
  7947. //>>excludeStart("ide", pragmas.excludeIdeData);
  7948. args: ["aString"],
  7949. source: "label: aString\x0a\x09label := aString",
  7950. referencedClasses: [],
  7951. //>>excludeEnd("ide");
  7952. messageSends: []
  7953. }),
  7954. $globals.HLProgressBarWidget);
  7955. $core.addMethod(
  7956. $core.method({
  7957. selector: "parent",
  7958. protocol: 'accessing',
  7959. fn: function (){
  7960. var self=this;
  7961. var $1;
  7962. $1=self["@parent"];
  7963. return $1;
  7964. },
  7965. //>>excludeStart("ide", pragmas.excludeIdeData);
  7966. args: [],
  7967. source: "parent\x0a\x09^ parent",
  7968. referencedClasses: [],
  7969. //>>excludeEnd("ide");
  7970. messageSends: []
  7971. }),
  7972. $globals.HLProgressBarWidget);
  7973. $core.addMethod(
  7974. $core.method({
  7975. selector: "parent:",
  7976. protocol: 'accessing',
  7977. fn: function (aProgress){
  7978. var self=this;
  7979. self["@parent"]=aProgress;
  7980. return self;
  7981. },
  7982. //>>excludeStart("ide", pragmas.excludeIdeData);
  7983. args: ["aProgress"],
  7984. source: "parent: aProgress\x0a\x09parent := aProgress",
  7985. referencedClasses: [],
  7986. //>>excludeEnd("ide");
  7987. messageSends: []
  7988. }),
  7989. $globals.HLProgressBarWidget);
  7990. $core.addMethod(
  7991. $core.method({
  7992. selector: "remove",
  7993. protocol: 'actions',
  7994. fn: function (){
  7995. var self=this;
  7996. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  7997. return $core.withContext(function($ctx1) {
  7998. //>>excludeEnd("ctx");
  7999. $recv(self._parent())._removeProgressBar_(self);
  8000. return self;
  8001. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8002. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLProgressBarWidget)});
  8003. //>>excludeEnd("ctx");
  8004. },
  8005. //>>excludeStart("ide", pragmas.excludeIdeData);
  8006. args: [],
  8007. source: "remove\x0a\x09self parent removeProgressBar: self",
  8008. referencedClasses: [],
  8009. //>>excludeEnd("ide");
  8010. messageSends: ["removeProgressBar:", "parent"]
  8011. }),
  8012. $globals.HLProgressBarWidget);
  8013. $core.addMethod(
  8014. $core.method({
  8015. selector: "renderContentOn:",
  8016. protocol: 'rendering',
  8017. fn: function (html){
  8018. var self=this;
  8019. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8020. return $core.withContext(function($ctx1) {
  8021. //>>excludeEnd("ctx");
  8022. var $1,$3,$4,$2;
  8023. $recv($recv(html)._span())._with_(self._label());
  8024. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8025. $ctx1.sendIdx["with:"]=1;
  8026. //>>excludeEnd("ctx");
  8027. $1=$recv(html)._div();
  8028. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8029. $ctx1.sendIdx["div"]=1;
  8030. //>>excludeEnd("ctx");
  8031. $recv($1)._class_("progress");
  8032. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8033. $ctx1.sendIdx["class:"]=1;
  8034. //>>excludeEnd("ctx");
  8035. $2=$recv($1)._with_((function(){
  8036. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8037. return $core.withContext(function($ctx2) {
  8038. //>>excludeEnd("ctx");
  8039. $3=$recv(html)._div();
  8040. $recv($3)._class_("bar");
  8041. $4=$recv($3)._style_("width: 0%");
  8042. self["@bar"]=$4;
  8043. return self["@bar"];
  8044. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8045. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  8046. //>>excludeEnd("ctx");
  8047. }));
  8048. return self;
  8049. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8050. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLProgressBarWidget)});
  8051. //>>excludeEnd("ctx");
  8052. },
  8053. //>>excludeStart("ide", pragmas.excludeIdeData);
  8054. args: ["html"],
  8055. 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%' ]",
  8056. referencedClasses: [],
  8057. //>>excludeEnd("ide");
  8058. messageSends: ["with:", "span", "label", "class:", "div", "style:"]
  8059. }),
  8060. $globals.HLProgressBarWidget);
  8061. $core.addMethod(
  8062. $core.method({
  8063. selector: "start",
  8064. protocol: 'actions',
  8065. fn: function (){
  8066. var self=this;
  8067. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8068. return $core.withContext(function($ctx1) {
  8069. //>>excludeEnd("ctx");
  8070. self._evaluateAt_((1));
  8071. return self;
  8072. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8073. }, function($ctx1) {$ctx1.fill(self,"start",{},$globals.HLProgressBarWidget)});
  8074. //>>excludeEnd("ctx");
  8075. },
  8076. //>>excludeStart("ide", pragmas.excludeIdeData);
  8077. args: [],
  8078. source: "start\x0a\x09\x22Make sure the UI has some time to update itself between each iteration\x22\x0a\x09\x0a\x09self evaluateAt: 1",
  8079. referencedClasses: [],
  8080. //>>excludeEnd("ide");
  8081. messageSends: ["evaluateAt:"]
  8082. }),
  8083. $globals.HLProgressBarWidget);
  8084. $core.addMethod(
  8085. $core.method({
  8086. selector: "updateProgress:",
  8087. protocol: 'actions',
  8088. fn: function (anInteger){
  8089. var self=this;
  8090. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8091. return $core.withContext(function($ctx1) {
  8092. //>>excludeEnd("ctx");
  8093. $recv($recv(self["@bar"])._asJQuery())._css_put_("width",$recv($recv(anInteger)._asString()).__comma("%"));
  8094. return self;
  8095. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8096. }, function($ctx1) {$ctx1.fill(self,"updateProgress:",{anInteger:anInteger},$globals.HLProgressBarWidget)});
  8097. //>>excludeEnd("ctx");
  8098. },
  8099. //>>excludeStart("ide", pragmas.excludeIdeData);
  8100. args: ["anInteger"],
  8101. source: "updateProgress: anInteger\x0a\x09bar asJQuery css: 'width' put: anInteger asString, '%'",
  8102. referencedClasses: [],
  8103. //>>excludeEnd("ide");
  8104. messageSends: ["css:put:", "asJQuery", ",", "asString"]
  8105. }),
  8106. $globals.HLProgressBarWidget);
  8107. $core.addMethod(
  8108. $core.method({
  8109. selector: "workBlock",
  8110. protocol: 'accessing',
  8111. fn: function (){
  8112. var self=this;
  8113. var $1;
  8114. $1=self["@workBlock"];
  8115. return $1;
  8116. },
  8117. //>>excludeStart("ide", pragmas.excludeIdeData);
  8118. args: [],
  8119. source: "workBlock\x0a\x09^ workBlock",
  8120. referencedClasses: [],
  8121. //>>excludeEnd("ide");
  8122. messageSends: []
  8123. }),
  8124. $globals.HLProgressBarWidget);
  8125. $core.addMethod(
  8126. $core.method({
  8127. selector: "workBlock:",
  8128. protocol: 'accessing',
  8129. fn: function (aBlock){
  8130. var self=this;
  8131. self["@workBlock"]=aBlock;
  8132. return self;
  8133. },
  8134. //>>excludeStart("ide", pragmas.excludeIdeData);
  8135. args: ["aBlock"],
  8136. source: "workBlock: aBlock\x0a\x09workBlock := aBlock",
  8137. referencedClasses: [],
  8138. //>>excludeEnd("ide");
  8139. messageSends: []
  8140. }),
  8141. $globals.HLProgressBarWidget);
  8142. $globals.HLProgressBarWidget.klass.iVarNames = ['default'];
  8143. $core.addMethod(
  8144. $core.method({
  8145. selector: "default",
  8146. protocol: 'accessing',
  8147. fn: function (){
  8148. var self=this;
  8149. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8150. return $core.withContext(function($ctx1) {
  8151. //>>excludeEnd("ctx");
  8152. var $2,$1,$receiver;
  8153. $2=self["@default"];
  8154. if(($receiver = $2) == null || $receiver.isNil){
  8155. self["@default"]=self._new();
  8156. $1=self["@default"];
  8157. } else {
  8158. $1=$2;
  8159. };
  8160. return $1;
  8161. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8162. }, function($ctx1) {$ctx1.fill(self,"default",{},$globals.HLProgressBarWidget.klass)});
  8163. //>>excludeEnd("ctx");
  8164. },
  8165. //>>excludeStart("ide", pragmas.excludeIdeData);
  8166. args: [],
  8167. source: "default\x0a\x09^ default ifNil: [ default := self new ]",
  8168. referencedClasses: [],
  8169. //>>excludeEnd("ide");
  8170. messageSends: ["ifNil:", "new"]
  8171. }),
  8172. $globals.HLProgressBarWidget.klass);
  8173. $core.addClass('HLTabWidget', $globals.HLWidget, ['widget', 'label', 'root'], 'Helios-Core');
  8174. //>>excludeStart("ide", pragmas.excludeIdeData);
  8175. $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";
  8176. //>>excludeEnd("ide");
  8177. $core.addMethod(
  8178. $core.method({
  8179. selector: "activate",
  8180. protocol: 'accessing',
  8181. fn: function (){
  8182. var self=this;
  8183. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8184. return $core.withContext(function($ctx1) {
  8185. //>>excludeEnd("ctx");
  8186. $recv(self._manager())._activate_(self);
  8187. return self;
  8188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8189. }, function($ctx1) {$ctx1.fill(self,"activate",{},$globals.HLTabWidget)});
  8190. //>>excludeEnd("ctx");
  8191. },
  8192. //>>excludeStart("ide", pragmas.excludeIdeData);
  8193. args: [],
  8194. source: "activate\x0a\x09self manager activate: self",
  8195. referencedClasses: [],
  8196. //>>excludeEnd("ide");
  8197. messageSends: ["activate:", "manager"]
  8198. }),
  8199. $globals.HLTabWidget);
  8200. $core.addMethod(
  8201. $core.method({
  8202. selector: "add",
  8203. protocol: 'actions',
  8204. fn: function (){
  8205. var self=this;
  8206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8207. return $core.withContext(function($ctx1) {
  8208. //>>excludeEnd("ctx");
  8209. $recv(self._manager())._addTab_(self);
  8210. self._observeManager();
  8211. return self;
  8212. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8213. }, function($ctx1) {$ctx1.fill(self,"add",{},$globals.HLTabWidget)});
  8214. //>>excludeEnd("ctx");
  8215. },
  8216. //>>excludeStart("ide", pragmas.excludeIdeData);
  8217. args: [],
  8218. source: "add\x0a\x09self manager addTab: self.\x0a\x09self observeManager",
  8219. referencedClasses: [],
  8220. //>>excludeEnd("ide");
  8221. messageSends: ["addTab:", "manager", "observeManager"]
  8222. }),
  8223. $globals.HLTabWidget);
  8224. $core.addMethod(
  8225. $core.method({
  8226. selector: "cssClass",
  8227. protocol: 'accessing',
  8228. fn: function (){
  8229. var self=this;
  8230. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8231. return $core.withContext(function($ctx1) {
  8232. //>>excludeEnd("ctx");
  8233. var $1;
  8234. $1=$recv(self._widget())._tabClass();
  8235. return $1;
  8236. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8237. }, function($ctx1) {$ctx1.fill(self,"cssClass",{},$globals.HLTabWidget)});
  8238. //>>excludeEnd("ctx");
  8239. },
  8240. //>>excludeStart("ide", pragmas.excludeIdeData);
  8241. args: [],
  8242. source: "cssClass\x0a\x09^ self widget tabClass",
  8243. referencedClasses: [],
  8244. //>>excludeEnd("ide");
  8245. messageSends: ["tabClass", "widget"]
  8246. }),
  8247. $globals.HLTabWidget);
  8248. $core.addMethod(
  8249. $core.method({
  8250. selector: "focus",
  8251. protocol: 'accessing',
  8252. fn: function (){
  8253. var self=this;
  8254. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8255. return $core.withContext(function($ctx1) {
  8256. //>>excludeEnd("ctx");
  8257. var $2,$1;
  8258. $2=self._widget();
  8259. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8260. $ctx1.sendIdx["widget"]=1;
  8261. //>>excludeEnd("ctx");
  8262. $1=$recv($2)._canHaveFocus();
  8263. if($core.assert($1)){
  8264. $recv(self._widget())._focus();
  8265. };
  8266. return self;
  8267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8268. }, function($ctx1) {$ctx1.fill(self,"focus",{},$globals.HLTabWidget)});
  8269. //>>excludeEnd("ctx");
  8270. },
  8271. //>>excludeStart("ide", pragmas.excludeIdeData);
  8272. args: [],
  8273. source: "focus\x0a\x09self widget canHaveFocus ifTrue: [\x0a\x09\x09self widget focus ]",
  8274. referencedClasses: [],
  8275. //>>excludeEnd("ide");
  8276. messageSends: ["ifTrue:", "canHaveFocus", "widget", "focus"]
  8277. }),
  8278. $globals.HLTabWidget);
  8279. $core.addMethod(
  8280. $core.method({
  8281. selector: "hide",
  8282. protocol: 'actions',
  8283. fn: function (){
  8284. var self=this;
  8285. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8286. return $core.withContext(function($ctx1) {
  8287. //>>excludeEnd("ctx");
  8288. var $1,$receiver;
  8289. $1=self["@root"];
  8290. if(($receiver = $1) == null || $receiver.isNil){
  8291. $1;
  8292. } else {
  8293. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","hidden");
  8294. };
  8295. return self;
  8296. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8297. }, function($ctx1) {$ctx1.fill(self,"hide",{},$globals.HLTabWidget)});
  8298. //>>excludeEnd("ctx");
  8299. },
  8300. //>>excludeStart("ide", pragmas.excludeIdeData);
  8301. args: [],
  8302. source: "hide\x0a\x09root ifNotNil: [ root asJQuery css: 'visibility' put: 'hidden' ]",
  8303. referencedClasses: [],
  8304. //>>excludeEnd("ide");
  8305. messageSends: ["ifNotNil:", "css:put:", "asJQuery"]
  8306. }),
  8307. $globals.HLTabWidget);
  8308. $core.addMethod(
  8309. $core.method({
  8310. selector: "isActive",
  8311. protocol: 'testing',
  8312. fn: function (){
  8313. var self=this;
  8314. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8315. return $core.withContext(function($ctx1) {
  8316. //>>excludeEnd("ctx");
  8317. var $1;
  8318. $1=$recv($recv(self._manager())._activeTab()).__eq(self);
  8319. return $1;
  8320. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8321. }, function($ctx1) {$ctx1.fill(self,"isActive",{},$globals.HLTabWidget)});
  8322. //>>excludeEnd("ctx");
  8323. },
  8324. //>>excludeStart("ide", pragmas.excludeIdeData);
  8325. args: [],
  8326. source: "isActive\x0a\x09^ self manager activeTab = self",
  8327. referencedClasses: [],
  8328. //>>excludeEnd("ide");
  8329. messageSends: ["=", "activeTab", "manager"]
  8330. }),
  8331. $globals.HLTabWidget);
  8332. $core.addMethod(
  8333. $core.method({
  8334. selector: "label",
  8335. protocol: 'accessing',
  8336. fn: function (){
  8337. var self=this;
  8338. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8339. return $core.withContext(function($ctx1) {
  8340. //>>excludeEnd("ctx");
  8341. var $2,$1,$receiver;
  8342. $2=self["@label"];
  8343. if(($receiver = $2) == null || $receiver.isNil){
  8344. $1="";
  8345. } else {
  8346. $1=$2;
  8347. };
  8348. return $1;
  8349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8350. }, function($ctx1) {$ctx1.fill(self,"label",{},$globals.HLTabWidget)});
  8351. //>>excludeEnd("ctx");
  8352. },
  8353. //>>excludeStart("ide", pragmas.excludeIdeData);
  8354. args: [],
  8355. source: "label\x0a\x09^ label ifNil: [ '' ]",
  8356. referencedClasses: [],
  8357. //>>excludeEnd("ide");
  8358. messageSends: ["ifNil:"]
  8359. }),
  8360. $globals.HLTabWidget);
  8361. $core.addMethod(
  8362. $core.method({
  8363. selector: "label:",
  8364. protocol: 'accessing',
  8365. fn: function (aString){
  8366. var self=this;
  8367. self["@label"]=aString;
  8368. return self;
  8369. },
  8370. //>>excludeStart("ide", pragmas.excludeIdeData);
  8371. args: ["aString"],
  8372. source: "label: aString\x0a\x09label := aString",
  8373. referencedClasses: [],
  8374. //>>excludeEnd("ide");
  8375. messageSends: []
  8376. }),
  8377. $globals.HLTabWidget);
  8378. $core.addMethod(
  8379. $core.method({
  8380. selector: "manager",
  8381. protocol: 'accessing',
  8382. fn: function (){
  8383. var self=this;
  8384. function $HLManager(){return $globals.HLManager||(typeof HLManager=="undefined"?nil:HLManager)}
  8385. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8386. return $core.withContext(function($ctx1) {
  8387. //>>excludeEnd("ctx");
  8388. var $1;
  8389. $1=$recv($HLManager())._current();
  8390. return $1;
  8391. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8392. }, function($ctx1) {$ctx1.fill(self,"manager",{},$globals.HLTabWidget)});
  8393. //>>excludeEnd("ctx");
  8394. },
  8395. //>>excludeStart("ide", pragmas.excludeIdeData);
  8396. args: [],
  8397. source: "manager\x0a\x09^ HLManager current",
  8398. referencedClasses: ["HLManager"],
  8399. //>>excludeEnd("ide");
  8400. messageSends: ["current"]
  8401. }),
  8402. $globals.HLTabWidget);
  8403. $core.addMethod(
  8404. $core.method({
  8405. selector: "observeManager",
  8406. protocol: 'actions',
  8407. fn: function (){
  8408. var self=this;
  8409. function $HLTabLabelChanged(){return $globals.HLTabLabelChanged||(typeof HLTabLabelChanged=="undefined"?nil:HLTabLabelChanged)}
  8410. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8411. return $core.withContext(function($ctx1) {
  8412. //>>excludeEnd("ctx");
  8413. $recv($recv(self._manager())._announcer())._on_send_to_($HLTabLabelChanged(),"onTabLabelChanged:",self);
  8414. return self;
  8415. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8416. }, function($ctx1) {$ctx1.fill(self,"observeManager",{},$globals.HLTabWidget)});
  8417. //>>excludeEnd("ctx");
  8418. },
  8419. //>>excludeStart("ide", pragmas.excludeIdeData);
  8420. args: [],
  8421. source: "observeManager\x0a\x09self manager announcer \x0a\x09\x09on: HLTabLabelChanged\x0a\x09\x09send: #onTabLabelChanged:\x0a\x09\x09to: self",
  8422. referencedClasses: ["HLTabLabelChanged"],
  8423. //>>excludeEnd("ide");
  8424. messageSends: ["on:send:to:", "announcer", "manager"]
  8425. }),
  8426. $globals.HLTabWidget);
  8427. $core.addMethod(
  8428. $core.method({
  8429. selector: "onTabLabelChanged:",
  8430. protocol: 'reactions',
  8431. fn: function (anAnnouncement){
  8432. var self=this;
  8433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8434. return $core.withContext(function($ctx1) {
  8435. //>>excludeEnd("ctx");
  8436. var $2,$1,$4,$5,$3;
  8437. $2=$recv(anAnnouncement)._widget();
  8438. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8439. $ctx1.sendIdx["widget"]=1;
  8440. //>>excludeEnd("ctx");
  8441. $1=$recv($2).__eq(self._widget());
  8442. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8443. $ctx1.sendIdx["="]=1;
  8444. //>>excludeEnd("ctx");
  8445. if($core.assert($1)){
  8446. $4=self._label();
  8447. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8448. $ctx1.sendIdx["label"]=1;
  8449. //>>excludeEnd("ctx");
  8450. $5=$recv(anAnnouncement)._label();
  8451. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8452. $ctx1.sendIdx["label"]=2;
  8453. //>>excludeEnd("ctx");
  8454. $3=$recv($4).__eq($5);
  8455. if(!$core.assert($3)){
  8456. self._label_($recv(anAnnouncement)._label());
  8457. $recv(self._manager())._refresh();
  8458. };
  8459. };
  8460. return self;
  8461. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8462. }, function($ctx1) {$ctx1.fill(self,"onTabLabelChanged:",{anAnnouncement:anAnnouncement},$globals.HLTabWidget)});
  8463. //>>excludeEnd("ctx");
  8464. },
  8465. //>>excludeStart("ide", pragmas.excludeIdeData);
  8466. args: ["anAnnouncement"],
  8467. 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 ] ]",
  8468. referencedClasses: [],
  8469. //>>excludeEnd("ide");
  8470. messageSends: ["ifTrue:", "=", "widget", "ifFalse:", "label", "label:", "refresh", "manager"]
  8471. }),
  8472. $globals.HLTabWidget);
  8473. $core.addMethod(
  8474. $core.method({
  8475. selector: "registerBindings",
  8476. protocol: 'actions',
  8477. fn: function (){
  8478. var self=this;
  8479. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8480. return $core.withContext(function($ctx1) {
  8481. //>>excludeEnd("ctx");
  8482. $recv(self._widget())._registerBindings();
  8483. return self;
  8484. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8485. }, function($ctx1) {$ctx1.fill(self,"registerBindings",{},$globals.HLTabWidget)});
  8486. //>>excludeEnd("ctx");
  8487. },
  8488. //>>excludeStart("ide", pragmas.excludeIdeData);
  8489. args: [],
  8490. source: "registerBindings\x0a\x09self widget registerBindings",
  8491. referencedClasses: [],
  8492. //>>excludeEnd("ide");
  8493. messageSends: ["registerBindings", "widget"]
  8494. }),
  8495. $globals.HLTabWidget);
  8496. $core.addMethod(
  8497. $core.method({
  8498. selector: "remove",
  8499. protocol: 'actions',
  8500. fn: function (){
  8501. var self=this;
  8502. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8503. return $core.withContext(function($ctx1) {
  8504. //>>excludeEnd("ctx");
  8505. var $1,$receiver;
  8506. self._unregister();
  8507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8508. $ctx1.sendIdx["unregister"]=1;
  8509. //>>excludeEnd("ctx");
  8510. $recv(self._widget())._unregister();
  8511. $1=self["@root"];
  8512. if(($receiver = $1) == null || $receiver.isNil){
  8513. $1;
  8514. } else {
  8515. $recv($recv(self["@root"])._asJQuery())._remove();
  8516. };
  8517. return self;
  8518. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8519. }, function($ctx1) {$ctx1.fill(self,"remove",{},$globals.HLTabWidget)});
  8520. //>>excludeEnd("ctx");
  8521. },
  8522. //>>excludeStart("ide", pragmas.excludeIdeData);
  8523. args: [],
  8524. source: "remove\x0a\x09self unregister.\x0a\x09self widget unregister.\x0a\x09root ifNotNil: [ root asJQuery remove ]",
  8525. referencedClasses: [],
  8526. //>>excludeEnd("ide");
  8527. messageSends: ["unregister", "widget", "ifNotNil:", "remove", "asJQuery"]
  8528. }),
  8529. $globals.HLTabWidget);
  8530. $core.addMethod(
  8531. $core.method({
  8532. selector: "renderOn:",
  8533. protocol: 'rendering',
  8534. fn: function (html){
  8535. var self=this;
  8536. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8537. return $core.withContext(function($ctx1) {
  8538. //>>excludeEnd("ctx");
  8539. var $1,$2;
  8540. $1=$recv(html)._div();
  8541. $recv($1)._class_("tab");
  8542. $2=$recv($1)._yourself();
  8543. self["@root"]=$2;
  8544. self._renderTab();
  8545. return self;
  8546. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8547. }, function($ctx1) {$ctx1.fill(self,"renderOn:",{html:html},$globals.HLTabWidget)});
  8548. //>>excludeEnd("ctx");
  8549. },
  8550. //>>excludeStart("ide", pragmas.excludeIdeData);
  8551. args: ["html"],
  8552. source: "renderOn: html\x0a\x09root := html div\x0a\x09\x09class: 'tab';\x0a\x09\x09yourself.\x0a\x09self renderTab",
  8553. referencedClasses: [],
  8554. //>>excludeEnd("ide");
  8555. messageSends: ["class:", "div", "yourself", "renderTab"]
  8556. }),
  8557. $globals.HLTabWidget);
  8558. $core.addMethod(
  8559. $core.method({
  8560. selector: "renderTab",
  8561. protocol: 'rendering',
  8562. fn: function (){
  8563. var self=this;
  8564. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8565. return $core.withContext(function($ctx1) {
  8566. //>>excludeEnd("ctx");
  8567. var $1,$2;
  8568. $recv(self["@root"])._contents_((function(html){
  8569. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8570. return $core.withContext(function($ctx2) {
  8571. //>>excludeEnd("ctx");
  8572. $1=$recv(html)._div();
  8573. $recv($1)._class_("amber_box");
  8574. $2=$recv($1)._with_((function(){
  8575. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8576. return $core.withContext(function($ctx3) {
  8577. //>>excludeEnd("ctx");
  8578. return $recv(self._widget())._renderOn_(html);
  8579. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8580. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  8581. //>>excludeEnd("ctx");
  8582. }));
  8583. return $2;
  8584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8585. }, function($ctx2) {$ctx2.fillBlock({html:html},$ctx1,1)});
  8586. //>>excludeEnd("ctx");
  8587. }));
  8588. return self;
  8589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8590. }, function($ctx1) {$ctx1.fill(self,"renderTab",{},$globals.HLTabWidget)});
  8591. //>>excludeEnd("ctx");
  8592. },
  8593. //>>excludeStart("ide", pragmas.excludeIdeData);
  8594. args: [],
  8595. source: "renderTab\x0a\x09root contents: [ :html |\x0a\x09\x09html div\x0a\x09\x09\x09class: 'amber_box';\x0a\x09\x09\x09with: [ self widget renderOn: html ] ]",
  8596. referencedClasses: [],
  8597. //>>excludeEnd("ide");
  8598. messageSends: ["contents:", "class:", "div", "with:", "renderOn:", "widget"]
  8599. }),
  8600. $globals.HLTabWidget);
  8601. $core.addMethod(
  8602. $core.method({
  8603. selector: "show",
  8604. protocol: 'actions',
  8605. fn: function (){
  8606. var self=this;
  8607. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8608. return $core.withContext(function($ctx1) {
  8609. //>>excludeEnd("ctx");
  8610. var $1,$2,$receiver;
  8611. $1=self["@root"];
  8612. if(($receiver = $1) == null || $receiver.isNil){
  8613. $2="body"._asJQuery();
  8614. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8615. $ctx1.sendIdx["asJQuery"]=1;
  8616. //>>excludeEnd("ctx");
  8617. self._appendToJQuery_($2);
  8618. } else {
  8619. $recv($recv(self["@root"])._asJQuery())._css_put_("visibility","visible");
  8620. };
  8621. return self;
  8622. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8623. }, function($ctx1) {$ctx1.fill(self,"show",{},$globals.HLTabWidget)});
  8624. //>>excludeEnd("ctx");
  8625. },
  8626. //>>excludeStart("ide", pragmas.excludeIdeData);
  8627. args: [],
  8628. source: "show\x0a\x09root\x0a\x09\x09ifNil: [ self appendToJQuery: 'body' asJQuery ]\x0a\x09\x09ifNotNil: [ root asJQuery css: 'visibility' put: 'visible' ]",
  8629. referencedClasses: [],
  8630. //>>excludeEnd("ide");
  8631. messageSends: ["ifNil:ifNotNil:", "appendToJQuery:", "asJQuery", "css:put:"]
  8632. }),
  8633. $globals.HLTabWidget);
  8634. $core.addMethod(
  8635. $core.method({
  8636. selector: "unregister",
  8637. protocol: 'actions',
  8638. fn: function (){
  8639. var self=this;
  8640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8641. return $core.withContext(function($ctx1) {
  8642. //>>excludeEnd("ctx");
  8643. $recv($recv(self._manager())._announcer())._unsubscribe_(self);
  8644. return self;
  8645. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8646. }, function($ctx1) {$ctx1.fill(self,"unregister",{},$globals.HLTabWidget)});
  8647. //>>excludeEnd("ctx");
  8648. },
  8649. //>>excludeStart("ide", pragmas.excludeIdeData);
  8650. args: [],
  8651. source: "unregister\x0a\x09self manager announcer unsubscribe: self",
  8652. referencedClasses: [],
  8653. //>>excludeEnd("ide");
  8654. messageSends: ["unsubscribe:", "announcer", "manager"]
  8655. }),
  8656. $globals.HLTabWidget);
  8657. $core.addMethod(
  8658. $core.method({
  8659. selector: "widget",
  8660. protocol: 'accessing',
  8661. fn: function (){
  8662. var self=this;
  8663. var $1;
  8664. $1=self["@widget"];
  8665. return $1;
  8666. },
  8667. //>>excludeStart("ide", pragmas.excludeIdeData);
  8668. args: [],
  8669. source: "widget\x0a\x09^ widget",
  8670. referencedClasses: [],
  8671. //>>excludeEnd("ide");
  8672. messageSends: []
  8673. }),
  8674. $globals.HLTabWidget);
  8675. $core.addMethod(
  8676. $core.method({
  8677. selector: "widget:",
  8678. protocol: 'accessing',
  8679. fn: function (aWidget){
  8680. var self=this;
  8681. self["@widget"]=aWidget;
  8682. return self;
  8683. },
  8684. //>>excludeStart("ide", pragmas.excludeIdeData);
  8685. args: ["aWidget"],
  8686. source: "widget: aWidget\x0a\x09widget := aWidget",
  8687. referencedClasses: [],
  8688. //>>excludeEnd("ide");
  8689. messageSends: []
  8690. }),
  8691. $globals.HLTabWidget);
  8692. $core.addMethod(
  8693. $core.method({
  8694. selector: "on:labelled:",
  8695. protocol: 'instance creation',
  8696. fn: function (aWidget,aString){
  8697. var self=this;
  8698. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8699. return $core.withContext(function($ctx1) {
  8700. //>>excludeEnd("ctx");
  8701. var $2,$3,$1;
  8702. $2=self._new();
  8703. $recv($2)._widget_(aWidget);
  8704. $recv($2)._label_(aString);
  8705. $3=$recv($2)._yourself();
  8706. $1=$3;
  8707. return $1;
  8708. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8709. }, function($ctx1) {$ctx1.fill(self,"on:labelled:",{aWidget:aWidget,aString:aString},$globals.HLTabWidget.klass)});
  8710. //>>excludeEnd("ctx");
  8711. },
  8712. //>>excludeStart("ide", pragmas.excludeIdeData);
  8713. args: ["aWidget", "aString"],
  8714. source: "on: aWidget labelled: aString\x0a\x09^ self new\x0a\x09\x09widget: aWidget;\x0a\x09\x09label: aString;\x0a\x09\x09yourself",
  8715. referencedClasses: [],
  8716. //>>excludeEnd("ide");
  8717. messageSends: ["widget:", "new", "label:", "yourself"]
  8718. }),
  8719. $globals.HLTabWidget.klass);
  8720. $core.addClass('HLTabsWidget', $globals.HLWidget, ['tabs', 'activeTab', 'history', 'selectionDisabled'], 'Helios-Core');
  8721. $core.addMethod(
  8722. $core.method({
  8723. selector: "activate:",
  8724. protocol: 'actions',
  8725. fn: function (aTab){
  8726. var self=this;
  8727. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8728. return $core.withContext(function($ctx1) {
  8729. //>>excludeEnd("ctx");
  8730. var $1,$2;
  8731. $1=self._isSelectionDisabled();
  8732. if($core.assert($1)){
  8733. return self;
  8734. };
  8735. $recv($recv(self._manager())._keyBinder())._flushBindings();
  8736. $recv(aTab)._registerBindings();
  8737. self["@activeTab"]=aTab;
  8738. self._refresh();
  8739. self._addToHistory_(aTab);
  8740. $2=self._show_(aTab);
  8741. return self;
  8742. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8743. }, function($ctx1) {$ctx1.fill(self,"activate:",{aTab:aTab},$globals.HLTabsWidget)});
  8744. //>>excludeEnd("ctx");
  8745. },
  8746. //>>excludeStart("ide", pragmas.excludeIdeData);
  8747. args: ["aTab"],
  8748. 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",
  8749. referencedClasses: [],
  8750. //>>excludeEnd("ide");
  8751. messageSends: ["ifTrue:", "isSelectionDisabled", "flushBindings", "keyBinder", "manager", "registerBindings", "refresh", "addToHistory:", "show:"]
  8752. }),
  8753. $globals.HLTabsWidget);
  8754. $core.addMethod(
  8755. $core.method({
  8756. selector: "activateNextTab",
  8757. protocol: 'actions',
  8758. fn: function (){
  8759. var self=this;
  8760. var nextTab;
  8761. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8762. return $core.withContext(function($ctx1) {
  8763. //>>excludeEnd("ctx");
  8764. var $1,$2,$5,$4,$3;
  8765. var $early={};
  8766. try {
  8767. $1=self._tabs();
  8768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8769. $ctx1.sendIdx["tabs"]=1;
  8770. //>>excludeEnd("ctx");
  8771. $recv($1)._ifEmpty_((function(){
  8772. throw $early=[self];
  8773. }));
  8774. $2=self._tabs();
  8775. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8776. $ctx1.sendIdx["tabs"]=2;
  8777. //>>excludeEnd("ctx");
  8778. $5=self._tabs();
  8779. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8780. $ctx1.sendIdx["tabs"]=3;
  8781. //>>excludeEnd("ctx");
  8782. $4=$recv($5)._indexOf_(self._activeTab());
  8783. $3=$recv($4).__plus((1));
  8784. nextTab=$recv($2)._at_ifAbsent_($3,(function(){
  8785. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8786. return $core.withContext(function($ctx2) {
  8787. //>>excludeEnd("ctx");
  8788. return $recv(self._tabs())._first();
  8789. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8790. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8791. //>>excludeEnd("ctx");
  8792. }));
  8793. self._activate_(nextTab);
  8794. return self;
  8795. }
  8796. catch(e) {if(e===$early)return e[0]; throw e}
  8797. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8798. }, function($ctx1) {$ctx1.fill(self,"activateNextTab",{nextTab:nextTab},$globals.HLTabsWidget)});
  8799. //>>excludeEnd("ctx");
  8800. },
  8801. //>>excludeStart("ide", pragmas.excludeIdeData);
  8802. args: [],
  8803. 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",
  8804. referencedClasses: [],
  8805. //>>excludeEnd("ide");
  8806. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "+", "indexOf:", "activeTab", "first", "activate:"]
  8807. }),
  8808. $globals.HLTabsWidget);
  8809. $core.addMethod(
  8810. $core.method({
  8811. selector: "activatePreviousTab",
  8812. protocol: 'actions',
  8813. fn: function (){
  8814. var self=this;
  8815. var previousTab;
  8816. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8817. return $core.withContext(function($ctx1) {
  8818. //>>excludeEnd("ctx");
  8819. var $1,$2,$5,$4,$3;
  8820. var $early={};
  8821. try {
  8822. $1=self._tabs();
  8823. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8824. $ctx1.sendIdx["tabs"]=1;
  8825. //>>excludeEnd("ctx");
  8826. $recv($1)._ifEmpty_((function(){
  8827. throw $early=[self];
  8828. }));
  8829. $2=self._tabs();
  8830. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8831. $ctx1.sendIdx["tabs"]=2;
  8832. //>>excludeEnd("ctx");
  8833. $5=self._tabs();
  8834. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8835. $ctx1.sendIdx["tabs"]=3;
  8836. //>>excludeEnd("ctx");
  8837. $4=$recv($5)._indexOf_(self._activeTab());
  8838. $3=$recv($4).__minus((1));
  8839. previousTab=$recv($2)._at_ifAbsent_($3,(function(){
  8840. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8841. return $core.withContext(function($ctx2) {
  8842. //>>excludeEnd("ctx");
  8843. return $recv(self._tabs())._last();
  8844. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8845. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  8846. //>>excludeEnd("ctx");
  8847. }));
  8848. self._activate_(previousTab);
  8849. return self;
  8850. }
  8851. catch(e) {if(e===$early)return e[0]; throw e}
  8852. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8853. }, function($ctx1) {$ctx1.fill(self,"activatePreviousTab",{previousTab:previousTab},$globals.HLTabsWidget)});
  8854. //>>excludeEnd("ctx");
  8855. },
  8856. //>>excludeStart("ide", pragmas.excludeIdeData);
  8857. args: [],
  8858. 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",
  8859. referencedClasses: [],
  8860. //>>excludeEnd("ide");
  8861. messageSends: ["ifEmpty:", "tabs", "at:ifAbsent:", "-", "indexOf:", "activeTab", "last", "activate:"]
  8862. }),
  8863. $globals.HLTabsWidget);
  8864. $core.addMethod(
  8865. $core.method({
  8866. selector: "activeTab",
  8867. protocol: 'accessing',
  8868. fn: function (){
  8869. var self=this;
  8870. var $1;
  8871. $1=self["@activeTab"];
  8872. return $1;
  8873. },
  8874. //>>excludeStart("ide", pragmas.excludeIdeData);
  8875. args: [],
  8876. source: "activeTab\x0a\x09^ activeTab",
  8877. referencedClasses: [],
  8878. //>>excludeEnd("ide");
  8879. messageSends: []
  8880. }),
  8881. $globals.HLTabsWidget);
  8882. $core.addMethod(
  8883. $core.method({
  8884. selector: "addTab:",
  8885. protocol: 'actions',
  8886. fn: function (aTab){
  8887. var self=this;
  8888. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8889. return $core.withContext(function($ctx1) {
  8890. //>>excludeEnd("ctx");
  8891. $recv(self._tabs())._add_(aTab);
  8892. self._activate_(aTab);
  8893. return self;
  8894. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8895. }, function($ctx1) {$ctx1.fill(self,"addTab:",{aTab:aTab},$globals.HLTabsWidget)});
  8896. //>>excludeEnd("ctx");
  8897. },
  8898. //>>excludeStart("ide", pragmas.excludeIdeData);
  8899. args: ["aTab"],
  8900. source: "addTab: aTab\x0a\x09self tabs add: aTab.\x0a self activate: aTab",
  8901. referencedClasses: [],
  8902. //>>excludeEnd("ide");
  8903. messageSends: ["add:", "tabs", "activate:"]
  8904. }),
  8905. $globals.HLTabsWidget);
  8906. $core.addMethod(
  8907. $core.method({
  8908. selector: "addToHistory:",
  8909. protocol: 'actions',
  8910. fn: function (aTab){
  8911. var self=this;
  8912. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8913. return $core.withContext(function($ctx1) {
  8914. //>>excludeEnd("ctx");
  8915. self._removeFromHistory_(aTab);
  8916. $recv(self._history())._add_(aTab);
  8917. return self;
  8918. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8919. }, function($ctx1) {$ctx1.fill(self,"addToHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  8920. //>>excludeEnd("ctx");
  8921. },
  8922. //>>excludeStart("ide", pragmas.excludeIdeData);
  8923. args: ["aTab"],
  8924. source: "addToHistory: aTab\x0a\x09self removeFromHistory: aTab.\x0a\x09self history add: aTab",
  8925. referencedClasses: [],
  8926. //>>excludeEnd("ide");
  8927. messageSends: ["removeFromHistory:", "add:", "history"]
  8928. }),
  8929. $globals.HLTabsWidget);
  8930. $core.addMethod(
  8931. $core.method({
  8932. selector: "disableSelection",
  8933. protocol: 'actions',
  8934. fn: function (){
  8935. var self=this;
  8936. self["@selectionDisabled"]=true;
  8937. return self;
  8938. },
  8939. //>>excludeStart("ide", pragmas.excludeIdeData);
  8940. args: [],
  8941. source: "disableSelection\x0a\x09selectionDisabled := true",
  8942. referencedClasses: [],
  8943. //>>excludeEnd("ide");
  8944. messageSends: []
  8945. }),
  8946. $globals.HLTabsWidget);
  8947. $core.addMethod(
  8948. $core.method({
  8949. selector: "enableSelection",
  8950. protocol: 'actions',
  8951. fn: function (){
  8952. var self=this;
  8953. self["@selectionDisabled"]=false;
  8954. return self;
  8955. },
  8956. //>>excludeStart("ide", pragmas.excludeIdeData);
  8957. args: [],
  8958. source: "enableSelection\x0a\x09selectionDisabled := false",
  8959. referencedClasses: [],
  8960. //>>excludeEnd("ide");
  8961. messageSends: []
  8962. }),
  8963. $globals.HLTabsWidget);
  8964. $core.addMethod(
  8965. $core.method({
  8966. selector: "history",
  8967. protocol: 'accessing',
  8968. fn: function (){
  8969. var self=this;
  8970. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  8971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8972. return $core.withContext(function($ctx1) {
  8973. //>>excludeEnd("ctx");
  8974. var $2,$1,$receiver;
  8975. $2=self["@history"];
  8976. if(($receiver = $2) == null || $receiver.isNil){
  8977. self["@history"]=$recv($OrderedCollection())._new();
  8978. $1=self["@history"];
  8979. } else {
  8980. $1=$2;
  8981. };
  8982. return $1;
  8983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  8984. }, function($ctx1) {$ctx1.fill(self,"history",{},$globals.HLTabsWidget)});
  8985. //>>excludeEnd("ctx");
  8986. },
  8987. //>>excludeStart("ide", pragmas.excludeIdeData);
  8988. args: [],
  8989. source: "history\x0a\x09^ history ifNil: [ history := OrderedCollection new ]",
  8990. referencedClasses: ["OrderedCollection"],
  8991. //>>excludeEnd("ide");
  8992. messageSends: ["ifNil:", "new"]
  8993. }),
  8994. $globals.HLTabsWidget);
  8995. $core.addMethod(
  8996. $core.method({
  8997. selector: "history:",
  8998. protocol: 'accessing',
  8999. fn: function (aCollection){
  9000. var self=this;
  9001. self["@history"]=aCollection;
  9002. return self;
  9003. },
  9004. //>>excludeStart("ide", pragmas.excludeIdeData);
  9005. args: ["aCollection"],
  9006. source: "history: aCollection\x0a\x09history := aCollection",
  9007. referencedClasses: [],
  9008. //>>excludeEnd("ide");
  9009. messageSends: []
  9010. }),
  9011. $globals.HLTabsWidget);
  9012. $core.addMethod(
  9013. $core.method({
  9014. selector: "isSelectionDisabled",
  9015. protocol: 'testing',
  9016. fn: function (){
  9017. var self=this;
  9018. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9019. return $core.withContext(function($ctx1) {
  9020. //>>excludeEnd("ctx");
  9021. var $2,$1,$receiver;
  9022. $2=self["@selectionDisabled"];
  9023. if(($receiver = $2) == null || $receiver.isNil){
  9024. $1=false;
  9025. } else {
  9026. $1=$2;
  9027. };
  9028. return $1;
  9029. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9030. }, function($ctx1) {$ctx1.fill(self,"isSelectionDisabled",{},$globals.HLTabsWidget)});
  9031. //>>excludeEnd("ctx");
  9032. },
  9033. //>>excludeStart("ide", pragmas.excludeIdeData);
  9034. args: [],
  9035. source: "isSelectionDisabled\x0a\x09^ selectionDisabled ifNil: [ false ]",
  9036. referencedClasses: [],
  9037. //>>excludeEnd("ide");
  9038. messageSends: ["ifNil:"]
  9039. }),
  9040. $globals.HLTabsWidget);
  9041. $core.addMethod(
  9042. $core.method({
  9043. selector: "removeActiveTab",
  9044. protocol: 'actions',
  9045. fn: function (){
  9046. var self=this;
  9047. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9048. return $core.withContext(function($ctx1) {
  9049. //>>excludeEnd("ctx");
  9050. self._removeTab_(self._activeTab());
  9051. return self;
  9052. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9053. }, function($ctx1) {$ctx1.fill(self,"removeActiveTab",{},$globals.HLTabsWidget)});
  9054. //>>excludeEnd("ctx");
  9055. },
  9056. //>>excludeStart("ide", pragmas.excludeIdeData);
  9057. args: [],
  9058. source: "removeActiveTab\x0a\x09self removeTab: self activeTab",
  9059. referencedClasses: [],
  9060. //>>excludeEnd("ide");
  9061. messageSends: ["removeTab:", "activeTab"]
  9062. }),
  9063. $globals.HLTabsWidget);
  9064. $core.addMethod(
  9065. $core.method({
  9066. selector: "removeFromHistory:",
  9067. protocol: 'actions',
  9068. fn: function (aTab){
  9069. var self=this;
  9070. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9071. return $core.withContext(function($ctx1) {
  9072. //>>excludeEnd("ctx");
  9073. self._history_($recv(self._history())._reject_((function(each){
  9074. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9075. return $core.withContext(function($ctx2) {
  9076. //>>excludeEnd("ctx");
  9077. return $recv(each).__eq_eq(aTab);
  9078. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9079. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9080. //>>excludeEnd("ctx");
  9081. })));
  9082. return self;
  9083. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9084. }, function($ctx1) {$ctx1.fill(self,"removeFromHistory:",{aTab:aTab},$globals.HLTabsWidget)});
  9085. //>>excludeEnd("ctx");
  9086. },
  9087. //>>excludeStart("ide", pragmas.excludeIdeData);
  9088. args: ["aTab"],
  9089. source: "removeFromHistory: aTab\x0a\x09self history: (self history reject: [ :each | each == aTab ])",
  9090. referencedClasses: [],
  9091. //>>excludeEnd("ide");
  9092. messageSends: ["history:", "reject:", "history", "=="]
  9093. }),
  9094. $globals.HLTabsWidget);
  9095. $core.addMethod(
  9096. $core.method({
  9097. selector: "removeTab:",
  9098. protocol: 'actions',
  9099. fn: function (aTab){
  9100. var self=this;
  9101. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9102. return $core.withContext(function($ctx1) {
  9103. //>>excludeEnd("ctx");
  9104. var $2,$1,$3;
  9105. $2=self._tabs();
  9106. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9107. $ctx1.sendIdx["tabs"]=1;
  9108. //>>excludeEnd("ctx");
  9109. $1=$recv($2)._includes_(aTab);
  9110. if(!$core.assert($1)){
  9111. return self;
  9112. };
  9113. self._removeFromHistory_(aTab);
  9114. $recv(self._tabs())._remove_(aTab);
  9115. $recv($recv(self._manager())._keyBinder())._flushBindings();
  9116. $recv(aTab)._remove();
  9117. self._refresh();
  9118. $3=self._history();
  9119. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9120. $ctx1.sendIdx["history"]=1;
  9121. //>>excludeEnd("ctx");
  9122. $recv($3)._ifNotEmpty_((function(){
  9123. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9124. return $core.withContext(function($ctx2) {
  9125. //>>excludeEnd("ctx");
  9126. return $recv($recv(self._history())._last())._activate();
  9127. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9128. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9129. //>>excludeEnd("ctx");
  9130. }));
  9131. return self;
  9132. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9133. }, function($ctx1) {$ctx1.fill(self,"removeTab:",{aTab:aTab},$globals.HLTabsWidget)});
  9134. //>>excludeEnd("ctx");
  9135. },
  9136. //>>excludeStart("ide", pragmas.excludeIdeData);
  9137. args: ["aTab"],
  9138. 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 ]",
  9139. referencedClasses: [],
  9140. //>>excludeEnd("ide");
  9141. messageSends: ["ifFalse:", "includes:", "tabs", "removeFromHistory:", "remove:", "flushBindings", "keyBinder", "manager", "remove", "refresh", "ifNotEmpty:", "history", "activate", "last"]
  9142. }),
  9143. $globals.HLTabsWidget);
  9144. $core.addMethod(
  9145. $core.method({
  9146. selector: "removeTabForWidget:",
  9147. protocol: 'actions',
  9148. fn: function (aWidget){
  9149. var self=this;
  9150. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9151. return $core.withContext(function($ctx1) {
  9152. //>>excludeEnd("ctx");
  9153. var $early={};
  9154. try {
  9155. self._removeTab_($recv(self._tabs())._detect_ifNone_((function(each){
  9156. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9157. return $core.withContext(function($ctx2) {
  9158. //>>excludeEnd("ctx");
  9159. return $recv($recv(each)._widget()).__eq(aWidget);
  9160. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9161. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9162. //>>excludeEnd("ctx");
  9163. }),(function(){
  9164. throw $early=[self];
  9165. })));
  9166. return self;
  9167. }
  9168. catch(e) {if(e===$early)return e[0]; throw e}
  9169. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9170. }, function($ctx1) {$ctx1.fill(self,"removeTabForWidget:",{aWidget:aWidget},$globals.HLTabsWidget)});
  9171. //>>excludeEnd("ctx");
  9172. },
  9173. //>>excludeStart("ide", pragmas.excludeIdeData);
  9174. args: ["aWidget"],
  9175. source: "removeTabForWidget: aWidget\x0a\x09self removeTab: (self tabs \x0a\x09\x09detect: [ :each | each widget = aWidget ]\x0a\x09\x09ifNone: [ ^ self ])",
  9176. referencedClasses: [],
  9177. //>>excludeEnd("ide");
  9178. messageSends: ["removeTab:", "detect:ifNone:", "tabs", "=", "widget"]
  9179. }),
  9180. $globals.HLTabsWidget);
  9181. $core.addMethod(
  9182. $core.method({
  9183. selector: "renderAddOn:",
  9184. protocol: 'rendering',
  9185. fn: function (html){
  9186. var self=this;
  9187. function $HLWidget(){return $globals.HLWidget||(typeof HLWidget=="undefined"?nil:HLWidget)}
  9188. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9189. return $core.withContext(function($ctx1) {
  9190. //>>excludeEnd("ctx");
  9191. var $1,$3,$4,$5,$7,$8,$9,$6,$2;
  9192. $1=$recv(html)._div();
  9193. $recv($1)._class_("dropdown new_tab");
  9194. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9195. $ctx1.sendIdx["class:"]=1;
  9196. //>>excludeEnd("ctx");
  9197. $2=$recv($1)._with_((function(){
  9198. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9199. return $core.withContext(function($ctx2) {
  9200. //>>excludeEnd("ctx");
  9201. $3=$recv(html)._a();
  9202. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9203. $ctx2.sendIdx["a"]=1;
  9204. //>>excludeEnd("ctx");
  9205. $recv($3)._class_("dropdown-toggle");
  9206. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9207. $ctx2.sendIdx["class:"]=2;
  9208. //>>excludeEnd("ctx");
  9209. $recv($3)._at_put_("data-toggle","dropdown");
  9210. $4=$recv($3)._with_((function(){
  9211. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9212. return $core.withContext(function($ctx3) {
  9213. //>>excludeEnd("ctx");
  9214. return $recv($recv(html)._tag_("b"))._class_("caret");
  9215. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9216. $ctx3.sendIdx["class:"]=3;
  9217. //>>excludeEnd("ctx");
  9218. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9219. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9220. //>>excludeEnd("ctx");
  9221. }));
  9222. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9223. $ctx2.sendIdx["with:"]=2;
  9224. //>>excludeEnd("ctx");
  9225. $4;
  9226. $5=$recv(html)._ul();
  9227. $recv($5)._class_("dropdown-menu");
  9228. $6=$recv($5)._with_((function(){
  9229. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9230. return $core.withContext(function($ctx3) {
  9231. //>>excludeEnd("ctx");
  9232. return $recv($recv($recv($recv($HLWidget())._withAllSubclasses())._select_((function(each){
  9233. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9234. return $core.withContext(function($ctx4) {
  9235. //>>excludeEnd("ctx");
  9236. return $recv(each)._canBeOpenAsTab();
  9237. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9238. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,4)});
  9239. //>>excludeEnd("ctx");
  9240. })))._sorted_((function(a,b){
  9241. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9242. return $core.withContext(function($ctx4) {
  9243. //>>excludeEnd("ctx");
  9244. $7=$recv(a)._tabPriority();
  9245. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9246. $ctx4.sendIdx["tabPriority"]=1;
  9247. //>>excludeEnd("ctx");
  9248. return $recv($7).__lt($recv(b)._tabPriority());
  9249. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9250. }, function($ctx4) {$ctx4.fillBlock({a:a,b:b},$ctx3,5)});
  9251. //>>excludeEnd("ctx");
  9252. })))._do_((function(each){
  9253. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9254. return $core.withContext(function($ctx4) {
  9255. //>>excludeEnd("ctx");
  9256. return $recv($recv(html)._li())._with_((function(){
  9257. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9258. return $core.withContext(function($ctx5) {
  9259. //>>excludeEnd("ctx");
  9260. $8=$recv(html)._a();
  9261. $recv($8)._with_($recv(each)._tabLabel());
  9262. $9=$recv($8)._onClick_((function(){
  9263. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9264. return $core.withContext(function($ctx6) {
  9265. //>>excludeEnd("ctx");
  9266. return $recv(each)._openAsTab();
  9267. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9268. }, function($ctx6) {$ctx6.fillBlock({},$ctx5,8)});
  9269. //>>excludeEnd("ctx");
  9270. }));
  9271. return $9;
  9272. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9273. }, function($ctx5) {$ctx5.fillBlock({},$ctx4,7)});
  9274. //>>excludeEnd("ctx");
  9275. }));
  9276. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9277. $ctx4.sendIdx["with:"]=4;
  9278. //>>excludeEnd("ctx");
  9279. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9280. }, function($ctx4) {$ctx4.fillBlock({each:each},$ctx3,6)});
  9281. //>>excludeEnd("ctx");
  9282. }));
  9283. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9284. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,3)});
  9285. //>>excludeEnd("ctx");
  9286. }));
  9287. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9288. $ctx2.sendIdx["with:"]=3;
  9289. //>>excludeEnd("ctx");
  9290. return $6;
  9291. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9292. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9293. //>>excludeEnd("ctx");
  9294. }));
  9295. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9296. $ctx1.sendIdx["with:"]=1;
  9297. //>>excludeEnd("ctx");
  9298. return self;
  9299. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9300. }, function($ctx1) {$ctx1.fill(self,"renderAddOn:",{html:html},$globals.HLTabsWidget)});
  9301. //>>excludeEnd("ctx");
  9302. },
  9303. //>>excludeStart("ide", pragmas.excludeIdeData);
  9304. args: ["html"],
  9305. 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 ] ] ] ] ]",
  9306. referencedClasses: ["HLWidget"],
  9307. //>>excludeEnd("ide");
  9308. messageSends: ["class:", "div", "with:", "a", "at:put:", "tag:", "ul", "do:", "sorted:", "select:", "withAllSubclasses", "canBeOpenAsTab", "<", "tabPriority", "li", "tabLabel", "onClick:", "openAsTab"]
  9309. }),
  9310. $globals.HLTabsWidget);
  9311. $core.addMethod(
  9312. $core.method({
  9313. selector: "renderContentOn:",
  9314. protocol: 'rendering',
  9315. fn: function (html){
  9316. var self=this;
  9317. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9318. return $core.withContext(function($ctx1) {
  9319. //>>excludeEnd("ctx");
  9320. var $1,$3,$4,$2;
  9321. $1=$recv(html)._div();
  9322. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9323. $ctx1.sendIdx["div"]=1;
  9324. //>>excludeEnd("ctx");
  9325. $recv($1)._class_("navbar navbar-fixed-top");
  9326. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9327. $ctx1.sendIdx["class:"]=1;
  9328. //>>excludeEnd("ctx");
  9329. $2=$recv($1)._with_((function(){
  9330. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9331. return $core.withContext(function($ctx2) {
  9332. //>>excludeEnd("ctx");
  9333. $3=$recv(html)._div();
  9334. $recv($3)._class_("navbar-inner");
  9335. $4=$recv($3)._with_((function(){
  9336. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9337. return $core.withContext(function($ctx3) {
  9338. //>>excludeEnd("ctx");
  9339. return self._renderTabsOn_(html);
  9340. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9341. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9342. //>>excludeEnd("ctx");
  9343. }));
  9344. return $4;
  9345. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9346. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9347. //>>excludeEnd("ctx");
  9348. }));
  9349. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9350. $ctx1.sendIdx["with:"]=1;
  9351. //>>excludeEnd("ctx");
  9352. self._renderAddOn_(html);
  9353. return self;
  9354. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9355. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLTabsWidget)});
  9356. //>>excludeEnd("ctx");
  9357. },
  9358. //>>excludeStart("ide", pragmas.excludeIdeData);
  9359. args: ["html"],
  9360. 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",
  9361. referencedClasses: [],
  9362. //>>excludeEnd("ide");
  9363. messageSends: ["class:", "div", "with:", "renderTabsOn:", "renderAddOn:"]
  9364. }),
  9365. $globals.HLTabsWidget);
  9366. $core.addMethod(
  9367. $core.method({
  9368. selector: "renderTab:on:",
  9369. protocol: 'rendering',
  9370. fn: function (aTab,html){
  9371. var self=this;
  9372. var li;
  9373. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9374. return $core.withContext(function($ctx1) {
  9375. //>>excludeEnd("ctx");
  9376. var $1,$2,$3,$4,$6,$5,$7,$8,$9,$10,$11,$12;
  9377. $1=$recv(html)._li();
  9378. $2=$1;
  9379. $3=$recv("width: ".__comma($recv(self._tabWidth())._asString())).__comma("px");
  9380. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9381. $ctx1.sendIdx[","]=1;
  9382. //>>excludeEnd("ctx");
  9383. $recv($2)._style_($3);
  9384. $4=$1;
  9385. $6=$recv(aTab)._isActive();
  9386. if($core.assert($6)){
  9387. $5="tab active";
  9388. } else {
  9389. $5="tab inactive";
  9390. };
  9391. $recv($4)._class_($5);
  9392. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9393. $ctx1.sendIdx["class:"]=1;
  9394. //>>excludeEnd("ctx");
  9395. $recv($1)._with_((function(){
  9396. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9397. return $core.withContext(function($ctx2) {
  9398. //>>excludeEnd("ctx");
  9399. return $recv($recv(html)._a())._with_((function(){
  9400. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9401. return $core.withContext(function($ctx3) {
  9402. //>>excludeEnd("ctx");
  9403. $7=$recv($recv(html)._tag_("i"))._class_("close");
  9404. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9405. $ctx3.sendIdx["class:"]=2;
  9406. //>>excludeEnd("ctx");
  9407. $recv($7)._onClick_((function(){
  9408. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9409. return $core.withContext(function($ctx4) {
  9410. //>>excludeEnd("ctx");
  9411. return self._removeTab_(aTab);
  9412. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9413. }, function($ctx4) {$ctx4.fillBlock({},$ctx3,5)});
  9414. //>>excludeEnd("ctx");
  9415. }));
  9416. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9417. $ctx3.sendIdx["onClick:"]=1;
  9418. //>>excludeEnd("ctx");
  9419. $8=$recv(html)._span();
  9420. $recv($8)._class_($recv(aTab)._cssClass());
  9421. $9=$8;
  9422. $10=$recv(aTab)._label();
  9423. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9424. $ctx3.sendIdx["label"]=1;
  9425. //>>excludeEnd("ctx");
  9426. $recv($9)._title_($10);
  9427. $11=$recv($8)._with_($recv(aTab)._label());
  9428. return $11;
  9429. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9430. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9431. //>>excludeEnd("ctx");
  9432. }));
  9433. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9434. $ctx2.sendIdx["with:"]=2;
  9435. //>>excludeEnd("ctx");
  9436. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9437. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9438. //>>excludeEnd("ctx");
  9439. }));
  9440. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9441. $ctx1.sendIdx["with:"]=1;
  9442. //>>excludeEnd("ctx");
  9443. $12=$recv($1)._onClick_((function(){
  9444. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9445. return $core.withContext(function($ctx2) {
  9446. //>>excludeEnd("ctx");
  9447. return $recv(aTab)._activate();
  9448. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9449. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9450. //>>excludeEnd("ctx");
  9451. }));
  9452. li=$12;
  9453. $recv($recv($recv(li)._asJQuery())._get_((0)))._at_put_("tab-data",aTab);
  9454. return self;
  9455. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9456. }, function($ctx1) {$ctx1.fill(self,"renderTab:on:",{aTab:aTab,html:html,li:li},$globals.HLTabsWidget)});
  9457. //>>excludeEnd("ctx");
  9458. },
  9459. //>>excludeStart("ide", pragmas.excludeIdeData);
  9460. args: ["aTab", "html"],
  9461. 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",
  9462. referencedClasses: [],
  9463. //>>excludeEnd("ide");
  9464. messageSends: ["style:", "li", ",", "asString", "tabWidth", "class:", "ifTrue:ifFalse:", "isActive", "with:", "a", "onClick:", "tag:", "removeTab:", "span", "cssClass", "title:", "label", "activate", "at:put:", "get:", "asJQuery"]
  9465. }),
  9466. $globals.HLTabsWidget);
  9467. $core.addMethod(
  9468. $core.method({
  9469. selector: "renderTabsOn:",
  9470. protocol: 'rendering',
  9471. fn: function (html){
  9472. var self=this;
  9473. var ul;
  9474. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9475. return $core.withContext(function($ctx1) {
  9476. //>>excludeEnd("ctx");
  9477. var $1,$2;
  9478. $1=$recv(html)._ul();
  9479. $recv($1)._class_("nav main-tabs");
  9480. $2=$recv($1)._with_((function(){
  9481. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9482. return $core.withContext(function($ctx2) {
  9483. //>>excludeEnd("ctx");
  9484. return $recv(self._tabs())._do_((function(each){
  9485. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9486. return $core.withContext(function($ctx3) {
  9487. //>>excludeEnd("ctx");
  9488. return self._renderTab_on_(each,html);
  9489. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9490. }, function($ctx3) {$ctx3.fillBlock({each:each},$ctx2,2)});
  9491. //>>excludeEnd("ctx");
  9492. }));
  9493. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9494. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9495. //>>excludeEnd("ctx");
  9496. }));
  9497. ul=$2;
  9498. $recv($recv(ul)._asJQuery())._sortable_($globals.HashedCollection._newFromPairs_(["containment","parent","start",(function(){
  9499. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9500. return $core.withContext(function($ctx2) {
  9501. //>>excludeEnd("ctx");
  9502. return self._disableSelection();
  9503. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9504. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9505. //>>excludeEnd("ctx");
  9506. }),"stop",(function(){
  9507. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9508. return $core.withContext(function($ctx2) {
  9509. //>>excludeEnd("ctx");
  9510. return $recv((function(){
  9511. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9512. return $core.withContext(function($ctx3) {
  9513. //>>excludeEnd("ctx");
  9514. return self._enableSelection();
  9515. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9516. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,5)});
  9517. //>>excludeEnd("ctx");
  9518. }))._valueWithTimeout_((300));
  9519. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9520. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,4)});
  9521. //>>excludeEnd("ctx");
  9522. }),"update",(function(){
  9523. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9524. return $core.withContext(function($ctx2) {
  9525. //>>excludeEnd("ctx");
  9526. return self._updateTabsOrder();
  9527. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9528. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,6)});
  9529. //>>excludeEnd("ctx");
  9530. })]));
  9531. return self;
  9532. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9533. }, function($ctx1) {$ctx1.fill(self,"renderTabsOn:",{html:html,ul:ul},$globals.HLTabsWidget)});
  9534. //>>excludeEnd("ctx");
  9535. },
  9536. //>>excludeStart("ide", pragmas.excludeIdeData);
  9537. args: ["html"],
  9538. 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}",
  9539. referencedClasses: [],
  9540. //>>excludeEnd("ide");
  9541. messageSends: ["class:", "ul", "with:", "do:", "tabs", "renderTab:on:", "sortable:", "asJQuery", "disableSelection", "valueWithTimeout:", "enableSelection", "updateTabsOrder"]
  9542. }),
  9543. $globals.HLTabsWidget);
  9544. $core.addMethod(
  9545. $core.method({
  9546. selector: "setupEvents",
  9547. protocol: 'private',
  9548. fn: function (){
  9549. var self=this;
  9550. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9551. return $core.withContext(function($ctx1) {
  9552. //>>excludeEnd("ctx");
  9553. var $2,$3,$1,$4;
  9554. $recv("body"._asJQuery())._keydown_((function(event){
  9555. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9556. return $core.withContext(function($ctx2) {
  9557. //>>excludeEnd("ctx");
  9558. $2=$recv(event)._ctrlKey();
  9559. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9560. $ctx2.sendIdx["ctrlKey"]=1;
  9561. //>>excludeEnd("ctx");
  9562. $1=$recv($2)._and_((function(){
  9563. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9564. return $core.withContext(function($ctx3) {
  9565. //>>excludeEnd("ctx");
  9566. $3=$recv(event)._which();
  9567. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9568. $ctx3.sendIdx["which"]=1;
  9569. //>>excludeEnd("ctx");
  9570. return $recv($3).__eq((188));
  9571. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9572. $ctx3.sendIdx["="]=1;
  9573. //>>excludeEnd("ctx");
  9574. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9575. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,2)});
  9576. //>>excludeEnd("ctx");
  9577. }));
  9578. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9579. $ctx2.sendIdx["and:"]=1;
  9580. //>>excludeEnd("ctx");
  9581. if($core.assert($1)){
  9582. self._activatePreviousTab();
  9583. $recv(event)._preventDefault();
  9584. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9585. $ctx2.sendIdx["preventDefault"]=1;
  9586. //>>excludeEnd("ctx");
  9587. };
  9588. $4=$recv($recv(event)._ctrlKey())._and_((function(){
  9589. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9590. return $core.withContext(function($ctx3) {
  9591. //>>excludeEnd("ctx");
  9592. return $recv($recv(event)._which()).__eq((190));
  9593. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9594. }, function($ctx3) {$ctx3.fillBlock({},$ctx2,4)});
  9595. //>>excludeEnd("ctx");
  9596. }));
  9597. if($core.assert($4)){
  9598. self._activateNextTab();
  9599. return $recv(event)._preventDefault();
  9600. };
  9601. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9602. }, function($ctx2) {$ctx2.fillBlock({event:event},$ctx1,1)});
  9603. //>>excludeEnd("ctx");
  9604. }));
  9605. return self;
  9606. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9607. }, function($ctx1) {$ctx1.fill(self,"setupEvents",{},$globals.HLTabsWidget)});
  9608. //>>excludeEnd("ctx");
  9609. },
  9610. //>>excludeStart("ide", pragmas.excludeIdeData);
  9611. args: [],
  9612. 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 ] ]",
  9613. referencedClasses: [],
  9614. //>>excludeEnd("ide");
  9615. messageSends: ["keydown:", "asJQuery", "ifTrue:", "and:", "ctrlKey", "=", "which", "activatePreviousTab", "preventDefault", "activateNextTab"]
  9616. }),
  9617. $globals.HLTabsWidget);
  9618. $core.addMethod(
  9619. $core.method({
  9620. selector: "show:",
  9621. protocol: 'rendering',
  9622. fn: function (aTab){
  9623. var self=this;
  9624. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9625. return $core.withContext(function($ctx1) {
  9626. //>>excludeEnd("ctx");
  9627. var $1;
  9628. $recv(self._tabs())._do_((function(each){
  9629. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9630. return $core.withContext(function($ctx2) {
  9631. //>>excludeEnd("ctx");
  9632. return $recv(each)._hide();
  9633. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9634. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9635. //>>excludeEnd("ctx");
  9636. }));
  9637. $recv(aTab)._show();
  9638. $1=$recv(aTab)._focus();
  9639. return self;
  9640. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9641. }, function($ctx1) {$ctx1.fill(self,"show:",{aTab:aTab},$globals.HLTabsWidget)});
  9642. //>>excludeEnd("ctx");
  9643. },
  9644. //>>excludeStart("ide", pragmas.excludeIdeData);
  9645. args: ["aTab"],
  9646. source: "show: aTab\x0a\x09self tabs do: [ :each | each hide ].\x0a\x09aTab show; focus",
  9647. referencedClasses: [],
  9648. //>>excludeEnd("ide");
  9649. messageSends: ["do:", "tabs", "hide", "show", "focus"]
  9650. }),
  9651. $globals.HLTabsWidget);
  9652. $core.addMethod(
  9653. $core.method({
  9654. selector: "tabWidth",
  9655. protocol: 'accessing',
  9656. fn: function (){
  9657. var self=this;
  9658. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9659. return $core.withContext(function($ctx1) {
  9660. //>>excludeEnd("ctx");
  9661. var $1;
  9662. $1=$recv($recv($recv($recv(window)._asJQuery())._width()).__minus((90))).__slash($recv(self._tabs())._size());
  9663. return $1;
  9664. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9665. }, function($ctx1) {$ctx1.fill(self,"tabWidth",{},$globals.HLTabsWidget)});
  9666. //>>excludeEnd("ctx");
  9667. },
  9668. //>>excludeStart("ide", pragmas.excludeIdeData);
  9669. args: [],
  9670. source: "tabWidth\x0a\x09^ (window asJQuery width - 90) / self tabs size",
  9671. referencedClasses: [],
  9672. //>>excludeEnd("ide");
  9673. messageSends: ["/", "-", "width", "asJQuery", "size", "tabs"]
  9674. }),
  9675. $globals.HLTabsWidget);
  9676. $core.addMethod(
  9677. $core.method({
  9678. selector: "tabs",
  9679. protocol: 'accessing',
  9680. fn: function (){
  9681. var self=this;
  9682. function $OrderedCollection(){return $globals.OrderedCollection||(typeof OrderedCollection=="undefined"?nil:OrderedCollection)}
  9683. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9684. return $core.withContext(function($ctx1) {
  9685. //>>excludeEnd("ctx");
  9686. var $2,$1,$receiver;
  9687. $2=self["@tabs"];
  9688. if(($receiver = $2) == null || $receiver.isNil){
  9689. self["@tabs"]=$recv($OrderedCollection())._new();
  9690. $1=self["@tabs"];
  9691. } else {
  9692. $1=$2;
  9693. };
  9694. return $1;
  9695. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9696. }, function($ctx1) {$ctx1.fill(self,"tabs",{},$globals.HLTabsWidget)});
  9697. //>>excludeEnd("ctx");
  9698. },
  9699. //>>excludeStart("ide", pragmas.excludeIdeData);
  9700. args: [],
  9701. source: "tabs\x0a\x09^ tabs ifNil: [ tabs := OrderedCollection new ]",
  9702. referencedClasses: ["OrderedCollection"],
  9703. //>>excludeEnd("ide");
  9704. messageSends: ["ifNil:", "new"]
  9705. }),
  9706. $globals.HLTabsWidget);
  9707. $core.addMethod(
  9708. $core.method({
  9709. selector: "updateTabsOrder",
  9710. protocol: 'actions',
  9711. fn: function (){
  9712. var self=this;
  9713. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9714. return $core.withContext(function($ctx1) {
  9715. //>>excludeEnd("ctx");
  9716. self["@tabs"]=$recv($recv(".main-tabs li"._asJQuery())._toArray())._collect_((function(each){
  9717. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9718. return $core.withContext(function($ctx2) {
  9719. //>>excludeEnd("ctx");
  9720. return $recv(each)._at_("tab-data");
  9721. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9722. }, function($ctx2) {$ctx2.fillBlock({each:each},$ctx1,1)});
  9723. //>>excludeEnd("ctx");
  9724. }));
  9725. return self;
  9726. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9727. }, function($ctx1) {$ctx1.fill(self,"updateTabsOrder",{},$globals.HLTabsWidget)});
  9728. //>>excludeEnd("ctx");
  9729. },
  9730. //>>excludeStart("ide", pragmas.excludeIdeData);
  9731. args: [],
  9732. source: "updateTabsOrder\x0a\x09tabs := '.main-tabs li' asJQuery toArray \x0a\x09\x09collect: [ :each | each at: 'tab-data' ]",
  9733. referencedClasses: [],
  9734. //>>excludeEnd("ide");
  9735. messageSends: ["collect:", "toArray", "asJQuery", "at:"]
  9736. }),
  9737. $globals.HLTabsWidget);
  9738. $globals.HLTabsWidget.klass.iVarNames = ['current'];
  9739. $core.addClass('HLWelcomeWidget', $globals.HLWidget, [], 'Helios-Core');
  9740. $core.addMethod(
  9741. $core.method({
  9742. selector: "cssClass",
  9743. protocol: 'accessing',
  9744. fn: function (){
  9745. var self=this;
  9746. return "welcome";
  9747. },
  9748. //>>excludeStart("ide", pragmas.excludeIdeData);
  9749. args: [],
  9750. source: "cssClass\x0a\x09^ 'welcome'",
  9751. referencedClasses: [],
  9752. //>>excludeEnd("ide");
  9753. messageSends: []
  9754. }),
  9755. $globals.HLWelcomeWidget);
  9756. $core.addMethod(
  9757. $core.method({
  9758. selector: "openClassBrowser",
  9759. protocol: 'actions',
  9760. fn: function (){
  9761. var self=this;
  9762. function $HLBrowser(){return $globals.HLBrowser||(typeof HLBrowser=="undefined"?nil:HLBrowser)}
  9763. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9764. return $core.withContext(function($ctx1) {
  9765. //>>excludeEnd("ctx");
  9766. $recv($HLBrowser())._openAsTab();
  9767. return self;
  9768. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9769. }, function($ctx1) {$ctx1.fill(self,"openClassBrowser",{},$globals.HLWelcomeWidget)});
  9770. //>>excludeEnd("ctx");
  9771. },
  9772. //>>excludeStart("ide", pragmas.excludeIdeData);
  9773. args: [],
  9774. source: "openClassBrowser\x0a\x09HLBrowser openAsTab",
  9775. referencedClasses: ["HLBrowser"],
  9776. //>>excludeEnd("ide");
  9777. messageSends: ["openAsTab"]
  9778. }),
  9779. $globals.HLWelcomeWidget);
  9780. $core.addMethod(
  9781. $core.method({
  9782. selector: "openHelp",
  9783. protocol: 'actions',
  9784. fn: function (){
  9785. var self=this;
  9786. return self;
  9787. },
  9788. //>>excludeStart("ide", pragmas.excludeIdeData);
  9789. args: [],
  9790. source: "openHelp",
  9791. referencedClasses: [],
  9792. //>>excludeEnd("ide");
  9793. messageSends: []
  9794. }),
  9795. $globals.HLWelcomeWidget);
  9796. $core.addMethod(
  9797. $core.method({
  9798. selector: "openTestRunner",
  9799. protocol: 'actions',
  9800. fn: function (){
  9801. var self=this;
  9802. function $HLSUnit(){return $globals.HLSUnit||(typeof HLSUnit=="undefined"?nil:HLSUnit)}
  9803. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9804. return $core.withContext(function($ctx1) {
  9805. //>>excludeEnd("ctx");
  9806. $recv($HLSUnit())._openAsTab();
  9807. return self;
  9808. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9809. }, function($ctx1) {$ctx1.fill(self,"openTestRunner",{},$globals.HLWelcomeWidget)});
  9810. //>>excludeEnd("ctx");
  9811. },
  9812. //>>excludeStart("ide", pragmas.excludeIdeData);
  9813. args: [],
  9814. source: "openTestRunner\x0a\x09HLSUnit openAsTab",
  9815. referencedClasses: ["HLSUnit"],
  9816. //>>excludeEnd("ide");
  9817. messageSends: ["openAsTab"]
  9818. }),
  9819. $globals.HLWelcomeWidget);
  9820. $core.addMethod(
  9821. $core.method({
  9822. selector: "openWorkspace",
  9823. protocol: 'actions',
  9824. fn: function (){
  9825. var self=this;
  9826. function $HLWorkspace(){return $globals.HLWorkspace||(typeof HLWorkspace=="undefined"?nil:HLWorkspace)}
  9827. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9828. return $core.withContext(function($ctx1) {
  9829. //>>excludeEnd("ctx");
  9830. $recv($HLWorkspace())._openAsTab();
  9831. return self;
  9832. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9833. }, function($ctx1) {$ctx1.fill(self,"openWorkspace",{},$globals.HLWelcomeWidget)});
  9834. //>>excludeEnd("ctx");
  9835. },
  9836. //>>excludeStart("ide", pragmas.excludeIdeData);
  9837. args: [],
  9838. source: "openWorkspace\x0a\x09HLWorkspace openAsTab",
  9839. referencedClasses: ["HLWorkspace"],
  9840. //>>excludeEnd("ide");
  9841. messageSends: ["openAsTab"]
  9842. }),
  9843. $globals.HLWelcomeWidget);
  9844. $core.addMethod(
  9845. $core.method({
  9846. selector: "renderButtonsOn:",
  9847. protocol: 'rendering',
  9848. fn: function (html){
  9849. var self=this;
  9850. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9851. return $core.withContext(function($ctx1) {
  9852. //>>excludeEnd("ctx");
  9853. var $1,$2,$3,$4,$5,$6;
  9854. $1=$recv(html)._button();
  9855. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9856. $ctx1.sendIdx["button"]=1;
  9857. //>>excludeEnd("ctx");
  9858. $recv($1)._class_("button");
  9859. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9860. $ctx1.sendIdx["class:"]=1;
  9861. //>>excludeEnd("ctx");
  9862. $recv($1)._with_("Class Browser");
  9863. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9864. $ctx1.sendIdx["with:"]=1;
  9865. //>>excludeEnd("ctx");
  9866. $2=$recv($1)._onClick_((function(){
  9867. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9868. return $core.withContext(function($ctx2) {
  9869. //>>excludeEnd("ctx");
  9870. return self._openClassBrowser();
  9871. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9872. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9873. //>>excludeEnd("ctx");
  9874. }));
  9875. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9876. $ctx1.sendIdx["onClick:"]=1;
  9877. //>>excludeEnd("ctx");
  9878. $3=$recv(html)._button();
  9879. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9880. $ctx1.sendIdx["button"]=2;
  9881. //>>excludeEnd("ctx");
  9882. $recv($3)._class_("button");
  9883. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9884. $ctx1.sendIdx["class:"]=2;
  9885. //>>excludeEnd("ctx");
  9886. $recv($3)._with_("Workspace");
  9887. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9888. $ctx1.sendIdx["with:"]=2;
  9889. //>>excludeEnd("ctx");
  9890. $4=$recv($3)._onClick_((function(){
  9891. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9892. return $core.withContext(function($ctx2) {
  9893. //>>excludeEnd("ctx");
  9894. return self._openWorkspace();
  9895. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9896. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,2)});
  9897. //>>excludeEnd("ctx");
  9898. }));
  9899. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9900. $ctx1.sendIdx["onClick:"]=2;
  9901. //>>excludeEnd("ctx");
  9902. $5=$recv(html)._button();
  9903. $recv($5)._class_("button");
  9904. $recv($5)._with_("Test Runner");
  9905. $6=$recv($5)._onClick_((function(){
  9906. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9907. return $core.withContext(function($ctx2) {
  9908. //>>excludeEnd("ctx");
  9909. return self._openTestRunner();
  9910. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9911. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,3)});
  9912. //>>excludeEnd("ctx");
  9913. }));
  9914. return self;
  9915. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9916. }, function($ctx1) {$ctx1.fill(self,"renderButtonsOn:",{html:html},$globals.HLWelcomeWidget)});
  9917. //>>excludeEnd("ctx");
  9918. },
  9919. //>>excludeStart("ide", pragmas.excludeIdeData);
  9920. args: ["html"],
  9921. 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",
  9922. referencedClasses: [],
  9923. //>>excludeEnd("ide");
  9924. messageSends: ["class:", "button", "with:", "onClick:", "openClassBrowser", "openWorkspace", "openTestRunner"]
  9925. }),
  9926. $globals.HLWelcomeWidget);
  9927. $core.addMethod(
  9928. $core.method({
  9929. selector: "renderContentOn:",
  9930. protocol: 'rendering',
  9931. fn: function (html){
  9932. var self=this;
  9933. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9934. return $core.withContext(function($ctx1) {
  9935. //>>excludeEnd("ctx");
  9936. var $1;
  9937. self._renderHelpOn_(html);
  9938. $1=self._renderButtonsOn_(html);
  9939. return self;
  9940. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9941. }, function($ctx1) {$ctx1.fill(self,"renderContentOn:",{html:html},$globals.HLWelcomeWidget)});
  9942. //>>excludeEnd("ctx");
  9943. },
  9944. //>>excludeStart("ide", pragmas.excludeIdeData);
  9945. args: ["html"],
  9946. source: "renderContentOn: html\x0a\x09self\x0a\x09\x09renderHelpOn: html;\x0a\x09\x09renderButtonsOn: html",
  9947. referencedClasses: [],
  9948. //>>excludeEnd("ide");
  9949. messageSends: ["renderHelpOn:", "renderButtonsOn:"]
  9950. }),
  9951. $globals.HLWelcomeWidget);
  9952. $core.addMethod(
  9953. $core.method({
  9954. selector: "renderHelpOn:",
  9955. protocol: 'rendering',
  9956. fn: function (html){
  9957. var self=this;
  9958. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9959. return $core.withContext(function($ctx1) {
  9960. //>>excludeEnd("ctx");
  9961. var $1;
  9962. $recv($recv(html)._h2())._with_("No tools are open");
  9963. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9964. $ctx1.sendIdx["with:"]=1;
  9965. //>>excludeEnd("ctx");
  9966. $recv($recv(html)._ul())._with_((function(){
  9967. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9968. return $core.withContext(function($ctx2) {
  9969. //>>excludeEnd("ctx");
  9970. $1=$recv(html)._li();
  9971. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9972. $ctx2.sendIdx["li"]=1;
  9973. //>>excludeEnd("ctx");
  9974. $recv($1)._with_("Perform actions with ctrl + space");
  9975. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9976. $ctx2.sendIdx["with:"]=3;
  9977. //>>excludeEnd("ctx");
  9978. return $recv($recv(html)._li())._with_("Open one of the common tools:");
  9979. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9980. }, function($ctx2) {$ctx2.fillBlock({},$ctx1,1)});
  9981. //>>excludeEnd("ctx");
  9982. }));
  9983. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9984. $ctx1.sendIdx["with:"]=2;
  9985. //>>excludeEnd("ctx");
  9986. return self;
  9987. //>>excludeStart("ctx", pragmas.excludeDebugContexts);
  9988. }, function($ctx1) {$ctx1.fill(self,"renderHelpOn:",{html:html},$globals.HLWelcomeWidget)});
  9989. //>>excludeEnd("ctx");
  9990. },
  9991. //>>excludeStart("ide", pragmas.excludeIdeData);
  9992. args: ["html"],
  9993. 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:' ]",
  9994. referencedClasses: [],
  9995. //>>excludeEnd("ide");
  9996. messageSends: ["with:", "h2", "ul", "li"]
  9997. }),
  9998. $globals.HLWelcomeWidget);
  9999. });